- Chain client adapters abstract away the complexity of different blockchain architectures. Each adapter manages blockchain-specific bridging operations.
- The Circle Wallet adapter is available if you already use Circle’s developer-controlled wallets. It uses your Circle Wallets account to let you transfer between supported blockchains.
Chain client adapter setups
Bridge Kit works with these client adapter libraries:viemv2 for EVM-compatible blockchainsethersv6 for EVM-compatible blockchainssolanafor the Solana blockchain
| Setup method | Description | Use case |
|---|---|---|
| Standard | Standard setup that creates an adapter from a private wallet key. Uses default built-in public RPC endpoints and factory functions. | Testing environments that need a quick start without custom RPC configuration. |
| Custom RPC | Private key setup that lets you configure an RPC endpoint. | Production deployments that require reliable RPC providers. |
| Browser wallet | Uses an injected wallet provider, such as MetaMask or Phantom, to create an adapter in the browser. | Browser-based apps that rely on user wallet providers. |
Standard setup
This setup is the fastest way to start. Create one adapter from your wallet private key to transfer tokens between EVM-compatible blockchains. Add the Solana adapter to transfer tokens to or from Solana. This setup uses public RPC endpoints and factory functions. For production, you should configure a custom RPC. Public connections have rate limits and might be slow. Select the tab to see code examples for your adapter choice.- Viem
- Ethers
- Solana
This code block initializes the Viem adapter to transfer tokens between
EVM-compatible chains:
TypeScript
Custom RPC
You can replace the public RPC from the standard setup with your own connection. For production, you should use a paid service like Alchemy or QuickNode. These services are more reliable than free connections. The following code shows how to set up your own RPC. Pick your adapter to see the code.- Viem
- Ethers
- Solana
To use your own connection, replace the default one and add your custom RPC
endpoint. This example uses an Alchemy connection:
TypeScript
Browser wallet
You can create an adapter from browser wallet apps like MetaMask or Phantom. The following code creates an adapter from a MetaMask wallet. Pick your adapter to see the code.- Viem
- Ethers
- Solana
TypeScript
Circle Wallets adapter setup
Note: This adapter is for server-side applications only. It requires private
keys and entity secrets that must never be exposed to browsers.
- Environment-prefixed:
TEST_API_KEY:abc123:def456orLIVE_API_KEY:xyz:uvw - Base64 encoded: standard Base64 string
- 64 lowercase alphanumeric characters
Typescript