Prerequisites
Before you begin, ensure that you’ve:- Installed Node.js v22+ and npm.
- Obtained a Circle API Key and Entity Secret from the Circle Console.
- Created developer-controlled wallets on Solana Devnet and Arc Testnet using the Circle Console.
- Funded your wallets with testnet tokens:
- Get testnet USDC from the Circle Faucet.
- Get test native tokens from the Console Faucet.
Step 1. Set up the project
This step shows you how to prepare your project and environment.1.1. Set up your development environment
Create a new directory and install Bridge Kit with the Circle Wallets adapter and supporting tools:Shell
1.2. Initialize and configure the project
First, initialize the project. This command creates atsconfig.json file:
Shell
tsconfig.json file:
Shell
1.3. Configure environment variables
Create a.env file in the project directory with your Circle credentials and
wallet addresses, replacing these placeholders with your value:
CIRCLE_API_KEY: your API key should be either environment-prefixed (for example,TEST_API_KEY:abc123:def456orLIVE_API_KEY:xyz:uvw) or base64-encoded strings.CIRCLE_ENTITY_SECRET: your entity secret should be 64 lowercase alphanumeric characters.YOUR_EVM_WALLET_ADDRESSandYOUR_SOLANA_WALLET_ADDRESSare the wallet addresses you control through Circle Wallets. You can fetch the addresses from the Circle Developer Console or the list wallets endpoint.
Shell
Step 2. Bridge USDC
This step shows you how to set up your script, execute the bridge transfer, and check the result.2.1. Create the script
Create anindex.ts file in the project directory and add the following code.
This code sets up your script and transfers 1 USDC from Solana Devnet to Arc
Testnet.
Using a different blockchain as the source or destination? Change the
chain
values in kit.bridge() and ensure your source wallet has USDC and both wallets
have native tokens.Typescript
2.2. Run the script
Save theindex.ts file and run the script in your terminal:
2.3. Verify the transfer
After the script finishes, find the returnedsteps array in the terminal
output. Each transaction step includes an explorerUrl. Use that link to verify
that the USDC amount matches the amount you transferred.
The following code is an example of how an approve step might look in the
terminal output. The values are used in this example only and are not a real
transaction:
Shell