WDK logoWDK documentation
VeloraGuides

Get Started

Install the package, create VeloraProtocolEvm, and learn supported networks.

This guide covers installation, create the swap protocol, and supported networks. You need Node.js and npm to follow along.

Installation

Run the following to install @tetherto/wdk-protocol-swap-velora-evm:

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

You also need an EVM wallet account from @tetherto/wdk-wallet-evm (or an ERC-4337 account from @tetherto/wdk-wallet-evm-erc-4337) on the same chain as your RPC provider.

Create the swap protocol

You can construct a swap client with new VeloraProtocolEvm(account, config?) on top of VeloraProtocolEvm:

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

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

const swapProtocol = new VeloraProtocolEvm(account, {
  swapMaxFee: 200000000000000n
})

Optional swapMaxFee is an exclusive cap in the account's quoted fee units: wei for the standard EVM account above. A fee equal to or above the cap rejects the swap. See configuration for paymaster fee units and approval prerequisites.

Supported networks

Velora routing works on EVM networks the aggregator supports, including Ethereum, Polygon, Arbitrum, and other chains where Velora exposes liquidity. Use an RPC endpoint for the network your WalletAccountEvm is configured for so swap() and quoteSwap() target the correct chain.

Next Steps

On this page