Swap tokens with Velora
Quote and execute EVM token swaps through Velora for standard and smart-account wallet flows.
Use the Velora swap module to quote and execute token swaps on EVM chains. It works with standard EVM accounts and ERC-4337 smart accounts.
Features
- Token Swapping: Execute token swaps through velora on supported EVM networks
- Account Abstraction: Compatible with standard EVM accounts and ERC‑4337 smart accounts
- Fee Controls: Constructor and per-call
swapMaxFeefor standard and smart accounts, in the account quote's fee units - Approval-aware swaps: Approve input tokens with the wallet account before swapping when allowance is required
- Provider Flexibility: Works with JSON‑RPC URLs and EIP‑1193 providers
- TypeScript Support: Full TypeScript definitions included
Supported Networks
Works with EVM networks supported by velora (e.g., Ethereum, Polygon, Arbitrum, etc.). A working RPC provider is required.
Wallet Compatibility
The swap service supports multiple EVM wallet types:
- Standard EVM Wallets:
@tetherto/wdk-wallet-evmaccounts - ERC‑4337 Smart Accounts:
@tetherto/wdk-wallet-evm-erc-4337accounts with bundler/paymaster - Read‑Only Accounts: For quoting swaps without sending transactions
The constructor accepts shared wallet interfaces, while the implementation requires an EVM provider in account._config.provider. Compatible wrappers must also expose the account methods used for quotes and execution. A callable sendTransaction() establishes writability; it does not establish chain or provider compatibility.
Key Components
- velora Integration: Uses velora aggregator for routing and quotes
- Quote System: Pre‑transaction fee and amount estimation via
quoteSwap - AA Integration: Forward paymaster, sponsorship, and native-fee overrides to compatible ERC‑4337 accounts
- Read-only quoting: Quote swaps from read-only EVM and ERC‑4337 accounts
Next Steps
Node.js Quickstart
Get started with WDK in a Node.js environment
WDK velora Swap Protocol Configuration
Get started with WDK's velora Swap Protocol configuration
WDK velora Swap Protocol API
Get started with WDK's velora Swap Protocol API
WDK velora Swap Protocol Usage
Get started with WDK's velora Swap Protocol usage