Prerequisites
Before you begin, ensure that you’ve:- Installed Node.js v22+
- Created a Circle Developer Console account
- Obtained an API key and registered your Entity Secret
-
Created an SCA wallet and an EOA wallet via Circle Developer-Controlled
Wallets
- The SCA wallet holds your Gateway USDC deposits
- The EOA wallet will sign burn intents on behalf of the SCA
- Deposited USDC into the Gateway Wallet from your SCA wallet
- Created a TypeScript project with the Developer-Controlled Wallets SDK installed
-
Set up a
.envfile with the following variables:.env
Add a Delegate
Follow these steps to authorize an EOA delegate to sign burn intents on behalf of your SCA wallet.Step 1. Create the add delegate script
Create a new file calledadd-delegate.ts in the root of your project and add
the following code. This calls the
addDelegate()
method on the Gateway Wallet contract on Arc Testnet.
add-delegate.ts
Step 2. Run the script
Run the script with the following command:Step 3. Repeat for other chains
To add the delegate on additional chains where the SCA holds Gateway deposits, repeat Steps 1-2 with differentBLOCKCHAIN and USDC_ADDRESS values for your
target chains. Check the
USDC contract addresses for the correct
values.
The delegate authorization remains valid until explicitly removed with the
removeDelegate()
method.Remove a Delegate
Follow these steps to revoke a delegate’s authorization to sign burn intents on behalf of your SCA wallet. After removing a delegate, note that:- The delegate can no longer create new burn intents for the SCA wallet
- Burn intents that were already signed by the delegate remain valid and can still be executed on-chain
- This ensures that burns may be executed safely even in the event of a revocation
- The Gateway API reflects revocations as soon as they’re finalized on-chain
Step 1. Create the remove delegate script
Create a new file calledremove-delegate.ts in the root of your project and
add the following code. This is nearly identical to the add delegate script, but
calls
removeDelegate()
instead.
remove-delegate.ts