- Browser wallet
- Circle Wallets
Use this flow to bridge USDC from a browser wallet. The wallet runs in the
browser, and the user signs transactions in the wallet extension, so connect the
wallet first and call Create a Then, update the 2.1. Discover a browser wallet with
3.1. Pass the browser wallet adapter into
This is the only App Kit-specific bridge call you need after the wallet is
connected:Download the runnable
browser demo
to see the EVM-to-EVM bridge flow in action.Pass the browser wallet adapters into
After you have a connected EVM provider from the earlier browser-wallet flow and
a connected Solana provider from Download the runnable
browser demo
to see the Solana-to-EVM bridge flow in action.
kit.bridge() only after the wallet is available.This example uses the
Viem adapter to
bridge between two EVM-compatible blockchains in an existing browser app. The
sample configuration uses Ethereum Sepolia and Arc Testnet, but you can use any
supported EVM chains as the source
or destination.Prerequisites
Before you begin, ensure that you have:- Installed Node.js v22+.
- Installed a browser wallet such as MetaMask and added the Ethereum Sepolia and Arc Testnet networks.
- Funded your wallet with testnet USDC from the Circle Faucet.
- Funded your wallet with ETH for Ethereum Sepolia from a public faucet.
Step 1. Set up the project
1.1. Create the project and install dependencies
Create a new directory, install the App Kit packages, and add local browser demo tooling:Shell
1.2. Configure TypeScript (optional)
This step is optional. It helps prevent missing types in your IDE or editor.
tsconfig.json file:Shell
tsconfig.json file:Shell
Step 2. Connect a browser wallet
This step shows the core browser wallet integration flow: discover anEIP-6963 provider, create an App
Kit adapter from the selected provider, and pass that adapter into an App Kit
SDK method.The snippets below keep wallet discovery, wallet connection, and adapter setup
in small helper functions for readability.2.1. Discover a browser wallet with EIP-6963
This pattern is standards-based. The example uses MetaMask as the selected
wallet, but the discovery flow works with any wallet that announces an
EIP-6963 provider.TypeScript
2.2. Connect the wallet and request account access
After you select a provider, request account access before attempting to bridge. This should happen in a user-triggered action such as aConnect wallet button.TypeScript
2.3. Create a Viem adapter from the selected wallet provider
Use the discovered provider to request account access, then create the App Kit adapter that signs bridge transactions in the browser:TypeScript
Step 3. Bridge USDC
3.1. Pass the browser wallet adapter into kit.bridge()
This is the only App Kit-specific bridge call you need after the wallet is
connected:TypeScript
3.2. Observe bridge lifecycle events
To inspect the bridge flow while it runs, subscribe to Bridge Kit events before you callkit.bridge(). This is useful for seeing the runtime step order and
payload shape. The companion browser demos render these events into an on-page
<pre> element, but logging them to the console is enough for the core
integration.TypeScript
Using other EVM chains? Change the
chain values in kit.bridge() and ensure
the connected wallet holds USDC on the source chain and enough gas to complete
the transfer flow.3.3. Verify the transaction
Afterkit.bridge() resolves, inspect the returned steps array. Each
transaction step includes an explorerUrl. Use those links to confirm the
approve, burn, and mint steps for the amount you bridged.The following code is an example of how an approve event might look in the
browser console after a successful bridge. The values are examples only and are
not a real transaction:Browser console
Extend: Add a Solana source wallet
If you want a Solana browser wallet as the source, keep the EVM destination adapter from the browser wallet flow above and add a Solana source adapter. The examples use Solana Devnet and Arc Testnet, but you can use Solana and any supported EVM chain as the destination.In this browser wallet flow, both wallets run in the browser and the user signs transactions in wallet extensions. Treat wallet connection and bridging as separate user actions: connect the destination EVM wallet first, connect the Solana source wallet second, then callkit.bridge() after both adapters are
available.Additional prerequisites
Before you begin, ensure that you have:- Worked through the EVM browser wallet flow above first. This Solana path adds a Solana source wallet to that same browser-wallet pattern.
- Installed a Solana browser wallet that exposes
window.solana. - Funded your Solana wallet with testnet USDC from the Circle Faucet.
- Funded your Solana wallet with SOL for Solana Devnet transaction fees from the Solana Faucet.
Add the Solana dependencies
Add the Solana adapter dependency to the same project:Shell
Connect the Solana source wallet
This step extends the EVM browser wallet flow by adding a Solana source wallet. You will connect the Solana wallet, create a Solana source adapter, keep the EVM destination adapter, and pass both adapters intokit.bridge().The snippets below keep each part of the flow in small helper functions for
readability. The companion browser demo wires this same sequence through
handleEvmConnect(), handleSolanaConnect(), and handleBridge() in a
runnable UI.Connect the Solana wallet and request account access
This pattern assumes a Solana browser wallet that exposes
window.solana. Keep
wallet connection and bridging as separate user actions so the wallet is fully
connected before you attempt the bridge. The destination EVM wallet should
already be connected by the time you add the Solana source wallet.TypeScript
Keep the EVM destination adapter and add a Solana source adapter
This Solana path builds on the EVM browser wallet flow above. Reuse the connected EVM wallet provider from that flow, then add a Solana provider and create one adapter for each chain:TypeScript
Pass the browser wallet adapters into kit.bridge()
After you have a connected EVM provider from the earlier browser-wallet flow and
a connected Solana provider from window.solana, create both adapters and pass
them into kit.bridge():TypeScript
Retry a failed bridge attempt
If the first bridge attempt returnsstate: "error", retry it with the same
freshly created adapters:TypeScript
Observe bridge lifecycle events
If you added thekit.on("*", (payload) => { ... }) listener in the previous
step, it already captures Solana bridge events, and no additional subscription
is needed.TypeScript
Using a different EVM chain as the destination? Change the
to.chain value and
ensure the connected Solana wallet holds USDC on the source chain and enough
native gas to complete the transfer flow.Verify the transaction
Afterkit.bridge() resolves, inspect the returned steps array. Each
transaction step includes an explorerUrl. Use those links to confirm the burn,
attestation, and mint steps for the amount you bridged.The following code is an example of how a burn step might look in the browser
console after a successful bridge. The values are examples only and are not a
real transaction:Browser console