Get Started
Install the bridge package, wire WalletAccountEvm, and review supported chains.
This guide shows how to install the package, create an EVM account, instantiate the bridge protocol, use a read-only account, and review supported chains.
Install the package
Prerequisites
You can add the published package to your project from npm: @tetherto/wdk-protocol-bridge-usdt0-evm.
npm install @tetherto/wdk-protocol-bridge-usdt0-evm @tetherto/wdk-wallet-evmCreate an EVM account
You can construct a signing account using new WalletAccountEvm(seed, path, config?) from @tetherto/wdk-wallet-evm with an RPC provider:
import { WalletAccountEvm } from '@tetherto/wdk-wallet-evm'
const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'
const account = new WalletAccountEvm(seedPhrase, "0'/0/0", {
provider: 'https://eth.drpc.org'
})Seed phrase: Store the mnemonic securely. Anyone with the phrase controls the funds on derived accounts.
Instantiate the bridge protocol
You can create a Usdt0ProtocolEvm instance with the new Usdt0ProtocolEvm(account, config?) constructor. Optional bridgeMaxFee rejects a bridge when the implementation's combined fee value is at or above the cap:
import Usdt0ProtocolEvm from '@tetherto/wdk-protocol-bridge-usdt0-evm'
const bridgeProtocol = new Usdt0ProtocolEvm(account, {
bridgeMaxFee: 1000000000000000n
})For standard EVM accounts, fee and bridgeFee are source-chain native base units. ERC-4337 fee units depend on the account's gas-payment mode while bridgeFee is returned in bridged-token base units. Read Fee units and bridgeMaxFee before setting a cap for an ERC-4337 flow.
The constructor also accepts the shared WDK account interfaces. bridge() requires a callable sendTransaction() method and EVM transaction support. Read account requirements before supplying a custom account or combining ERC-4337 package versions.
Use a read-only account (optional)
For quotes without signing, create a WalletAccountReadOnlyEvm for the source address and pass it to Usdt0ProtocolEvm:
import { WalletAccountReadOnlyEvm } from '@tetherto/wdk-wallet-evm'
const readOnlyAccount = new WalletAccountReadOnlyEvm(await account.getAddress(), {
provider: 'https://eth.drpc.org'
})
const readOnlyBridge = new Usdt0ProtocolEvm(readOnlyAccount)You can now call quoteBridge() with your route options. The source address needs any allowance and balance required by the route's gas estimate; a read-only account cannot grant that allowance. Calling bridge() on this instance rejects before sending a transaction.
Supported chains
Bridge operations use EVM source chains listed in the API reference. A configured EVM destination must have a matching USD₮0 or XAU₮0 contract for the selected token. Solana (EID 30168), TON (EID 30343), and TRON (EID 30420) are also configured as destinations. Use getSupportedTokens() to discover configured EVM token descriptors; it does not return these non-EVM destination-only entries. For every route, call quoteBridge() to verify the exact source-token and destination pair.
Source chains (EVM, targetChain keys)
| Chain | Key | Chain ID |
|---|---|---|
| Ethereum | ethereum | 1 |
| Arbitrum | arbitrum | 42161 |
| Optimism | optimism | 10 |
| Polygon | polygon | 137 |
| Berachain | berachain | 80094 |
| Ink | ink | 57073 |
| Plasma | plasma | 9745 |
| Conflux eSpace | conflux | 1030 |
| Corn | corn | 21000000 |
| Avalanche | avalanche | 43114 |
| Celo | celo | 42220 |
| Flare | flare | 14 |
| HyperEVM | hyperevm | 999 |
| Mantle | mantle | 5000 |
| MegaETH | megaeth | 4326 |
| Monad | monad | 143 |
| Morph | morph | 2818 |
| Rootstock | rootstock | 30 |
| Sei | sei | 1329 |
| Stable | stable | 988 |
| Unichain | unichain | 130 |
| XLayer | xlayer | 196 |
ERC-4337 helper workflows are available when the source chain is Ethereum, Arbitrum, Plasma, or Polygon. Other listed source chains support standard EVM accounts only. See Bridge with ERC-4337.
Non-EVM destinations
| Network | targetChain | Endpoint ID |
|---|---|---|
| Solana | solana | 30168 |
| TON | ton | 30343 |
| TRON | tron | 30420 |
Next Steps
Run a standard EVM-to-EVM transfer with Bridge tokens, or use Bridge with ERC-4337 for gasless flows on supported networks.