Skip to main content
constructSimpleSDK is the recommended entry point for most integrators. You pass it a chainId, an HTTP client, and (optionally) a wallet; in return you get an SDK with every Velora method available under flat namespaces.

When to use this

  • You want one import that exposes the whole API surface.
  • You’re fine with the SDK returning transaction hashes (string) for write calls, instead of library-typed responses.
  • You don’t need to share a single contract caller across multiple SDK instances.
For tighter control over the transaction-response type or bundle size, use the Full or Partial constructors instead.

Construct it

Pick your HTTP client. fetch keeps the bundle smaller; axios is convenient if you already use it.
Without a wallet, the SDK is read-only (quotes, prices, order status, supported tokens), but cannot approve, sign, or submit.

Add a wallet

Pass a second argument with your provider to enable write methods (approveToken, signDeltaOrder, submitDeltaOrder, buildTx-then-send).
Write calls always resolve to a transaction hash (string). If you need the library-typed response object (viem’s Hex, ethers.ContractTransaction, etc.), use constructFullSDK with the <TxResponse> generic.

Available methods

The returned SDK is namespaced by feature:

End-to-end example

Quote, approve, and submit a Delta order in one flow. (Falls back to a Market Swap if Delta isn’t available for the pair.)
See Swaps → Delta for the split build/sign/post flow and order-status polling, and Swaps → Market for the full Market-Swap walkthrough.
Last modified on June 14, 2026