Skip to main content
The SDK ships three constructors that wrap the same per-method construct* primitives. They differ in how much of the SDK comes pre-wired and what the resulting API surface looks like.

At a glance

SimpleFullPartial
ConstructorconstructSimpleSDKconstructFullSDKconstructPartialSDK
API shapeNamespaced: sdk.swap.getRate(...), sdk.delta.submitDeltaOrder(...), sdk.quote.getQuote(...)Same namespaces, typed against your transaction-response generic (sdk.swap.*, sdk.delta.*)Flat: sdk.getRate(...), sdk.approveToken(...). Whatever you import is what you get.
Bundle sizeIncludes every moduleIncludes every moduleTree-shaken to the constructors you import
Provider wiringPass { axios } or { fetch } and (optionally) providerOptions; SDK builds the fetcher and contract caller for youYou build fetcher and contractCaller and pass them inYou build fetcher and contractCaller and pass them in
<TxResponse> genericReturns TxHash (string) for write callsYou choose: viem Hex, ethers.ContractTransaction, etc.Inherits from the contractCaller you pass
Best forQuickstarts, server-side scripts, integrators who want one importApps that use most modules and want typed transaction responsesBundle-size-sensitive front-ends

Pick by use case

  • “I just want a quote and a swap.” Use the Simple SDK: one constructor, ready to call.
  • “I have a Node service that does Delta orders, Market Swaps, and price polling.” Use the Full SDK. You get namespaced access plus a typed <TxResponse> so your code knows what approveToken returns.
  • “I’m shipping a front-end and only sign Delta orders.” Use the Partial SDK: import constructBuildDeltaOrder, constructSignDeltaOrder, constructPostDeltaOrder and tree-shake the rest.
  • “I want a custom HTTP client (got, undici, superagent…).” All three variants accept a custom fetcher. See Configure providers.

What stays the same

Every variant ultimately calls the same construct* factories under @velora-dex/sdk src/methods/. That means:
  • Same method signatures across variants: getRate, buildDeltaOrder, submitDeltaOrder, etc. behave identically.
  • Same partner-fee handling. See Monetize.
  • Same retries, errors, and FetcherError semantics regardless of constructor.

Simple SDK

constructSimpleSDK: one constructor, sensible defaults.

Full SDK

constructFullSDK. Namespaced, with typed transaction responses.

Partial SDK

constructPartialSDK: cherry-pick constructors, tree-shake the rest.
Last modified on June 14, 2026