Usage

How to install and use @tetherto/wdk-protocol-swap-velora-evm for swapping tokens on EVM

Installation

To install the @tetherto/wdk-protocol-swap-velora-evm package, run:

npm install @tetherto/wdk-protocol-swap-velora-evm

Quick Start

Setting Up a Swap Service

import veloraProtocolEvm from '@tetherto/wdk-protocol-swap-velora-evm'
import { WalletAccountEvm } from '@tetherto/wdk-wallet-evm'

// Create a wallet account first
const account = new WalletAccountEvm(seedPhrase, "0'/0/0", {
  provider: 'https://ethereum-rpc.publicnode.com'
})

// Create swap service
const swapProtocol = new veloraProtocolEvm(account, {
  swapMaxFee: 200000000000000n // Optional: Max swap fee (wei)
})

Basic Swap Operation

Getting Swap Quotes

Supported Networks

EVM Networks

  • Ethereum, Polygon, Arbitrum, and others supported by velora

Swap Operations

Standard EVM Account

ERC‑4337 Smart Account

Exact Output Swap

Error Handling

Complete Examples

Complete Swap Setup

Multiple Token Swaps


Need Help?