Treasury Wallets
Treasury wallets give human users native, HSM-backed wallets across six blockchains — no external wallet provider, no browser extension. Private keys are generated server-side inside the HSM, stored in a dedicated per-org __treasury-keys vault with MPC custody, and never leave the secure enclave unless explicitly exported.
Treasury wallets are available on all tiers and count toward your org wallet quota (Free 10, Pro 10,000, Team 250,000, Business 1,000,000, Enterprise unlimited).
Platform admins are unlimited via effective_billing_tier_for_limits.
Supported chains
| Chain | Curve | Example address format |
|---|---|---|
| Ethereum | secp256k1 | 0x4e83… (EIP-55 checksum) |
| Bitcoin | secp256k1 | bc1q… (bech32) |
| Solana | Ed25519 | 7xKX… (base58) |
| XRP | Ed25519 | rN7d… (base58check) |
| Cardano | Ed25519 | addr1… (bech32) |
| Tron | secp256k1 | T9yD… (base58check) |
Human-only access
All treasury wallet endpoints enforce require_human(). Agents calling any treasury wallet endpoint receive a 403 with "Treasury wallets are only available to human users." Agents that need on-chain signing should use the Intents API and multi-chain signing keys instead.
The __treasury-keys vault
When you generate your first treasury wallet, 1claw auto-creates a __treasury-keys vault in your org. This vault:
- Is not counted toward your vault or secrets quota
- Is excluded from the
GET /v1/vaultslisting (never appears in the dashboard vault list) - Is excluded from the admin secrets manifest (private keys are never loaded into Shroud's redaction automata)
- Has direct API reads blocked —
GET /v1/vaults/{id}/secrets/{path}returns 403 for system vaults; use the export endpoint instead - Has MPC custody auto-configured based on your billing tier:
| Tier | Custody mode | What it means |
|---|---|---|
| Pro / Team | XOR 2-of-2 client custody | One share on the server (GCP KMS), one returned to you |
| Business / Enterprise | Shamir 2-of-3 multi-HSM | Shares split across GCP KMS, AWS KMS, and Azure Key Vault |
Private keys are stored at the path users/{user_id}/chains/{chain}/private_key.
API endpoints
| Method | Path | Description |
|---|---|---|
| POST | /v1/treasury/wallets/generate | Generate wallets for specified chains |
| GET | /v1/treasury/wallets | List all active wallets |
| GET | /v1/treasury/wallets/{chain} | Get wallet for a specific chain |
| GET | /v1/treasury/wallets/{chain}/balance | Query native + ERC-20 balances |
| GET | /v1/treasury/wallets/spend-policy | Effective spend policy (user JWT) |
| POST | /v1/treasury/wallets/{chain}/send | Send tokens (password re-auth) |
| POST | /v1/treasury/wallets/{chain}/swap | Swap tokens via DEX (password re-auth) |
| POST | /v1/treasury/wallets/{chain}/export | Export wallet (password re-auth) |
| POST | /v1/treasury/wallets/{chain}/import | Import existing wallet (BYOK, password re-auth) |
| POST | /v1/treasury/wallets/{chain}/rotate | Rotate keypair |
| DELETE | /v1/treasury/wallets/{chain} | Deactivate wallet |
| POST | /v1/treasury/wallets/access-policies | Create wallet access policy (Pro+) |
| GET | /v1/treasury/wallets/access-policies | List wallet access policies |
| DELETE | /v1/treasury/wallets/access-policies/{id} | Delete wallet access policy |
Generate wallets
Generate wallets for one or more chains. If you omit chains, all six are created. Chains where you already have an active wallet are silently skipped.
curl -X POST "https://api.1claw.co/v1/treasury/wallets/generate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chains": ["ethereum", "solana", "bitcoin"]
}'
Response:
{
"wallets": [
{
"id": "a1b2c3d4-...",
"chain": "ethereum",
"curve": "secp256k1",
"public_key_hex": "04abcdef...",
"address": "0x4e83...",
"is_active": true,
"created_at": "2026-05-16T12:00:00Z",
"custody": "server"
},
{
"id": "e5f6a7b8-...",
"chain": "solana",
"curve": "ed25519",
"public_key_hex": "aabbccdd...",
"address": "7xKX...",
"is_active": true,
"created_at": "2026-05-16T12:00:00Z",
"custody": "server"
}
]
}
List active wallets
curl "https://api.1claw.co/v1/treasury/wallets" \
-H "Authorization: Bearer $TOKEN"
Get a specific chain wallet
curl "https://api.1claw.co/v1/treasury/wallets/ethereum" \
-H "Authorization: Bearer $TOKEN"
Query wallet balance
Get the native currency and ERC-20 token balances for a treasury wallet address. Balances are fetched in real time via the chain's RPC.
curl "https://api.1claw.co/v1/treasury/wallets/ethereum/balance" \
-H "Authorization: Bearer $TOKEN"
Response:
{
"chain": "ethereum",
"address": "0x4e83...",
"native": {
"symbol": "ETH",
"balance_wei": "1234567890000000000",
"balance_display": "1.23456789"
},
"tokens": []
}
Send from treasury wallet
Send native currency or ERC-20 tokens from your treasury wallet. Signs an EIP-1559 transaction and broadcasts via RPC. On EVM chains the amount is value_wei, an integer string in wei (value is accepted as an alias); on other chains it is a decimal in major units. Requires password re-authentication via the X-Auth-Confirm header. Audit-logged as treasury_wallet.send.
curl -X POST "https://api.1claw.co/v1/treasury/wallets/ethereum/send" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Auth-Confirm: your-account-password" \
-H "Content-Type: application/json" \
-d '{
"to": "0xRecipient...",
"value_wei": "500000000000000000"
}'
Failed password attempts increment your account's lockout counter (locked after 10 failures for 15 minutes).
Swap tokens
Swap tokens via the 0x DEX aggregator. Fetches a quote from the 0x API, signs the swap transaction, and broadcasts. Requires password re-authentication. Audit-logged as treasury_wallet.swap.
The server requires a ZERO_X_API_KEY environment variable to be configured.
curl -X POST "https://api.1claw.co/v1/treasury/wallets/ethereum/swap" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Auth-Confirm: your-account-password" \
-H "Content-Type: application/json" \
-d '{
"sell_token": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"buy_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"sell_amount": "1000000000000000000"
}'
Export wallet (with password re-authentication)
Exporting a wallet's private key requires your account password in the X-Auth-Confirm header. This is audit-logged as treasury_wallet.export.
curl -X POST "https://api.1claw.co/v1/treasury/wallets/ethereum/export" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Auth-Confirm: your-account-password"
Response:
{
"chain": "ethereum",
"address": "0x4e83...",
"private_key_hex": "0xabc123..."
}
The private key is returned in plaintext. Treat it as you would any other secret — never log it, never commit it, and store it only in a secure location. Failed password attempts increment your account's lockout counter (locked after 10 failures for 15 minutes).
Import wallet (BYOK)
Import an existing private key instead of generating one server-side. Human-only, requires password re-authentication via the X-Auth-Confirm header. Audit-logged as treasury_wallet.import.
curl -X POST "https://api.1claw.co/v1/treasury/wallets/ethereum/import" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Auth-Confirm: your-account-password" \
-H "Content-Type: application/json" \
-d '{
"private_key": "0xabc123...",
"format": "hex"
}'
| Field | Type | Required | Description |
|---|---|---|---|
private_key | string | ✅ | The raw private key |
format | string |