@velora-dex/sdk. It has no required runtime dependencies; viem, ethers, web3, and axios are all optional peers that the SDK detects at construction time.
Install the package
Peer dependencies
Pick whichever wallet library and HTTP client you already use. All of these are optional peers, so install only the ones you need.| Package | Version | When you need it |
|---|---|---|
viem | ^2.21.0 | If you sign and submit transactions with viem. |
ethers | ^5.5.0 or ^6.0.0 | If you sign and submit transactions with ethers. |
web3 | ^4.14.0 | If you sign and submit transactions with web3.js. |
axios | >=0.25.0 <2.0.0 | If you wire the SDK fetcher to axios. (Use the built-in fetch instead to avoid this.) |
You can use the SDK in read-only mode without any of these. Pass
{ chainId, fetch } (or { chainId, axios }) and the SDK can call every API method (quotes, prices, order status), but it cannot sign or submit transactions.Your first call
The smallest possible setup: quote 10,000 USDC → ETH on mainnet using nativefetch.
Verify it works
The returnedpriceRoute contains at minimum:
srcAmount: the input amount you passed (echoed for confirmation).destAmountis the expected output amount in destination-token wei.bestRoute, the resolved swap path across DEXes.gasCostandgasCostUSD: estimated execution gas.
Network Error or a 4xx response, double-check chainId, partner, and that your firewall allows outbound HTTPS to the Velora API.
Add a wallet to send transactions
Pass aproviderOptions argument to enable approveToken, submitDeltaOrder, and buildTx-then-send flows. The shape varies by library; see Configure providers for the four supported stacks (viem, ethers v5, ethers v6, web3).
Next steps
Delta
Full Delta order flow: build → sign → post → poll.
Configure providers
Wire up viem, ethers, or web3 for signing and transactions.