Skip to main content
Create a wallet with a secp256k1 EOA key as its root authority. The root is role 0 with All permission. Follow Environment Setup for source setup, then select your root key through SIGNER_PRIVATE_KEY.

Choose the initial balance

Set these inputs alongside RPC_URL and the root signing key: Amounts are integer base units: on an ETH-denominated chain, 1000000000000000000 wei is 1 ETH. The root EOA needs the initial balance plus transaction gas; it pays both when creating the wallet. The example hashes WALLET_NAME into both the wallet ID and deployment salt. Reusing the same name and root settings targets the same address; a second deployment reverts. Keep secrets out of the name.

Create the wallet

Run from the language directory selected during setup:
The example predicts the address, submits the deployment, waits for a successful receipt, and checks the emitted address against the prediction. It prints:
  • accountAddress: the config contract; use this as ACCOUNT_ADDRESS.
  • vaultAddress: the wallet’s asset address, funded by INITIAL_BALANCE_WEI.
  • capsuleAddress: the wallet’s capsule contract.
  • transactionHash: the creation transaction.
Keep accountAddress for the next guides. Fund and read asset balances at vaultAddress; additional wallet funding belongs in the vault, not the config.

Continue with a delegate

Keep the root key selected and add a spending role. The delegate will use its own key to spend from this wallet within the allowance you assign. Full examples: TypeScript, Rust, Python.