Skip to main content

Wallets

A wallet is a Safe multisig deployed on Base, owned by one or more signer addresses and governed by a signature threshold. It holds USDC (and ETH for gas), and it's the source of every payment.

Wallets are created with a predicted address immediately, then deployed on-chain asynchronously. Track deployment via status:

PENDING_DEPLOYMENT → DEPLOYING → DEPLOYED   (or → FAILED)

Key endpoints

MethodPathScopePurpose
POST/v1/walletswallets:writeCreate a wallet.
GET/v1/walletswallets:readList wallets (paginated: skip, take).
GET/v1/wallets/{id}wallets:readGet one wallet, with balances.
POST/v1/wallets/{id}/fundwallets:fundFund from the faucet (sandbox).

See the REST reference for the complete wallet surface, including on-chain transaction proposal (POST /v1/wallets/{id}/transactions) and the sign/execute routes.

Create a wallet

Provide a name and at least one owner. threshold defaults to 1; chainId defaults to the environment's chain (Base Sepolia 84532 in sandbox).

curl -X POST https://api.sandbox.safebank.ai/v1/wallets \
-H "X-SafeBank-Api-Key: $SAFEBANK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Treasury",
"owners": [{ "address": "0xYourSigner", "role": "ADMIN_OWNER" }],
"threshold": 1,
"chainId": 84532
}'

Owner role is one of ADMIN_OWNER, FINANCE_OWNER, MERCHANT_OPERATOR, or AGENT. The response is a Wallet:

{
"id": "w_1a2b3c",
"address": "0x7Fb2…c41A",
"status": "PENDING_DEPLOYMENT",
"chainId": 84532,
"threshold": 1,
"predictedAddress": true,
"name": "Acme Treasury",
"owners": [{ "address": "0xYourSigner", "role": "ADMIN_OWNER", "label": null }],
"createdAt": "2026-08-09T12:00:00.000Z"
}

predictedAddress: true means the address is the deterministic counterfactual Safe address — it's stable and safe to fund before deployment completes.

List and inspect

const { wallets, total } = await sb.wallets.list({ take: 20 })
const one = await sb.wallets.get('w_1a2b3c') // includes `balances`
for (const b of one.balances ?? []) console.log(b.asset, b.amount)

GET /v1/wallets/{id} includes a balances array ({ asset, amount, decimals }).

Next