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.
Construct it
Pick your HTTP client.fetch keeps the bundle smaller; axios is convenient if you already use it.
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:| Namespace | What’s inside | Docs page |
|---|---|---|
sdk.delta | getDeltaPrice, buildDeltaOrder, signDeltaOrder, postDeltaOrder, submitDeltaOrder, approveTokenForDelta, preSignDeltaOrder, getDeltaContract, getDeltaOrderById, getDeltaOrderByHash, getDeltaOrders, cancelDeltaOrders, getBridgeRoutes, isTokenSupportedInDelta | Delta |
sdk.quote | getQuote — Delta price with fallback to Market | API → /v2/quote |
sdk.swap | getRate, buildTx, approveToken, getSpender, getBalances, getTokens, getAdapters, swapTx (Market execution path for swaps) | Market |
sdk.otcOrders | AugustusRFQ maker/taker orders for OTC trades. For target-price limit orders, use the Delta namespace instead. | OTC |