What is an adapter anyway?
An adapter is a function that takes parameters and returns an object that adheres to this interface. Let’s review the interface in depth:
What adapters are available out of the box?
The following adapters are officially maintained and developed by the Relay team:
SVM Adapter: This adapter gives the sdk the ability to submit transactions on SVM (Solana Virtual Machine) networks. It does not support signing messages and under the hood it uses the solana web3 sdk.
Bitcoin Adapter: This adapter gives the sdk the ability to submit transaction to the Bitcoin blockchain. Under the hood it uses bitcoinjs-lib to sign and submit transactions. Note that bitcoin transactions have a long finalization period and unlike quicker vms are not polled in real time for confirmation.
Viem Adapter: This adapter is the default one used when no adapter is provided. You can also import it yourself to convert any viem wallet client into an adapted wallet ready to be used in the sdk.
Ethers Adapter: If your application uses ethers then you’ll need this adapter to use the SDK. You’ll still need to install viem as that’s required for polling transactions but you can pass in your ethers signer to submit transactions and sign messages.
Tron Adapter: This adapter gives the sdk the ability to submit transactions to the Tron blockchain. Under the hood it uses the tronweb sdk.
Lighter Adapter: This adapter gives the SDK the ability to deposit to Lighter from any Relay-supported chain. It owns the full Lighter session lifecycle — resolving the user’s Lighter account index, generating an in-memory API key, and registering it via changeApiKey on first transfer. Integrators who already run their own Lighter session (backend-provisioned key, wallet-level integration) can pass a pre-built signerClient to bypass the bootstrap entirely.
TON Adapter: This adapter gives the SDK the ability to submit transactions on the TON blockchain. The user’s key stays in their wallet, so the adapter never signs — you pass a sendTransaction callback (for example wrapping Dynamic’s TON connector or TonConnect UI) that signs and broadcasts the request, while the adapter handles request building and on-chain confirmation. Confirmation reads use a read-only @ton/ton TonClient pointed at the TON chain’s httpRpcUrl from the Relay client’s chain configuration; to use a custom endpoint (e.g. a keyed provider in production), override that chain’s httpRpcUrl when configuring the SDK client rather than passing it to the adapter. TON support requires the @ton/core and @ton/ton peer dependencies in addition to viem and @relayprotocol/relay-sdk.
How can I use an adapter?
You can either make your own adapter, as long as it adheres to the interface above or you can use one of the officials adapters developed and maintained by the Relay team. All of our sdk methods handle a viem wallet or adapted wallet. The viem wallet adapter is used by default when a viem wallet is passed in for convenience. Refer below for implementation details:
Viem adapter options
adaptViemWallet accepts an optional second argument for adapter-level configuration:
The same flag is available directly on getQuote, execute, and claimAppFees when you pass a raw viem WalletClient — the SDK forwards it to adaptViemWallet internally.