Skip to main content
A wallet set is a container that groups your developer-controlled wallets under a single entity secret. All wallets in a set share the same entity secret, and EVM wallets in the same set share the same address. After completing this tutorial, you’ll have a wallet set and a developer-controlled wallet. The examples use an externally owned account (EOA) on Arc Testnet, but you can create a smart contract account (SCA) or use any supported blockchain.

Prerequisites

Before you begin, ensure that you’ve:

Step 1. Set up your project

1.1. Install additional dependencies

From the same directory where you set up your entity secret, add a run script and install the TypeScript development dependencies.

1.2. Configure TypeScript (optional)

This step is optional. It helps prevent missing types in your IDE or editor.
Create a tsconfig.json file:
Then, update the tsconfig.json file:

1.3. Verify environment variables

Your .env file from the entity secret setup already contains both values you need. Confirm it includes:
.env
  • CIRCLE_API_KEY is your Circle API key.
  • CIRCLE_ENTITY_SECRET is your registered entity secret.

Step 2. Create your wallet

Write a script that creates a wallet set and a developer-controlled wallet, then prints the wallet set ID, wallet ID, and wallet address.

2.1. Create the script

In your project directory, create create-wallet.ts (Node.js) or create_wallet.py (Python) and add the following code. When run, this code creates a wallet set first, and then creates a wallet in it:
If you are calling the API directly instead of using the SDK, you need two requests: one to create the wallet set and one to create the wallet. Replace the entity secret ciphertext and idempotency key in your request. The SDKs handle this automatically.

2.2. Run the script

Run the script from your project directory:
The output looks similar to:
Save the wallet ID and address for future wallet operations such as transferring tokens or checking balances.

Step 3. Add more wallets to your set (optional)

To add more wallets to the same blockchain or to add wallets on a different blockchain, call createWallets again on the same wallet set. Pass your existing wallet set ID as walletSetId. The count parameter is the number of wallets created per blockchain. Add the following inside your main() function from Step 2:
This creates an EOA wallet by default. To create an SCA wallet instead, add accountType: "SCA" to the request. To add a wallet on a different blockchain, pass a different value for blockchains—for example, "SOL-DEVNET" for Solana Devnet. You can also pass multiple blockchains in a single call—createWallets creates count wallets per blockchain. All wallets created this way belong to the same wallet set and share the same entity secret.

Next steps

Now that you have a developer-controlled wallet, you can: