Set up wallets
Goal
A registered agent has a canonical identifier. This guide provisions native wallets behind that identifier on every supported chain and connects them to a BYOK signer.
Prerequisites
- An agent registered at KYA Level 1 or higher. See agent registration.
- A custody provider account: Turnkey, Fireblocks, Circle, or a self-hosted EOA.
- API key and Ed25519 signing key in environment.
Step 1: Register the provider key
client.provider_keys.save( provider="turnkey", credentials={"api_key": "tk_prod_...", "organization_id": "..."},)await client.providerKeys.save({ provider: 'turnkey', credentials: { apiKey: 'tk_prod_...', organizationId: '...' },});Oris envelopes the key with envelope encryption. Plaintext never persists. See BYOK custody for the encryption model.
Step 2: Provision wallets
for chain in ["base-sepolia", "polygon", "arbitrum", "solana", "tron"]: w = client.wallets.create(agent_id=agent.id, chain=chain) print(chain, w.address)for (const chain of ['base-sepolia', 'polygon', 'arbitrum', 'solana', 'tron']) { const w = await client.wallets.create({ agentId: agent.id, chain }); console.log(chain, w.address);}ERC-4337 smart accounts on EVM chains are counterfactual — the address exists before the first on-chain transaction.
Step 3: Fund the wallets
Send stablecoins to each wallet address. The smart accounts deploy on first use; the Oris paymaster sponsors gas in stablecoin (no native ETH or MATIC required).
Verification
balances = client.wallets.list_balances(agent_id=agent.id)for b in balances: assert b.amount > 0, f"{b.chain} {b.asset} is empty"const balances = await client.wallets.listBalances({ agentId: agent.id });for (const b of balances) { if (b.amount <= 0) throw new Error(`${b.chain} ${b.asset} empty`);}Troubleshooting
OrisProviderErroron wallet create — provider credentials are not registered or the provider returned a quota error.- Counterfactual address does not match after deploy — the salt was reused across providers. Recreate the wallet with
force=trueand a fresh salt. - Empty balance after deposit — the deposit was sent to the wrong chain. Verify the chain id in the wallet response.
Where to go next
- Policy configuration to gate spending.
- Payment execution to send the first payment.
- Wallets feature for the wallet primitive reference.