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.

Next steps

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