Wallet
Package wallets is blockchain key custody: create wallets, rotate their keys, and sign with them.
Package wallets is blockchain key custody: create wallets, rotate their keys, and sign with them.
| Base URL | https://api.hanzo.ai |
| Operations | 8 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Specification
Specification pending — no HIP in hanzoai/hips declares capability: wallet yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.
Four surfaces
| Surface | Reaches this capability as | Coverage |
|---|---|---|
| REST | wallet at its own prefix | 8 operations |
| CLI | hanzo wallets … | 8 of 8 |
| SDK | — | no published client declares one yet — regenerating the clients is what adds them |
| MCP | tool wallets on https://api.hanzo.ai/v1/mcp | 7 operations, 1 under the document's own id — ask describe for the rest |
Quickstart
export HANZO_API_KEY=sk-... # console.hanzo.ai → API keysThen the first call — a read that needs nothing but the key. GET /v1/wallet, operation get_wallet:
hanzo wallets listimport { Configuration, WalletApi } from 'hanzoai';
const api = new WalletApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getWallet();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import WalletApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = WalletApi(client).get_wallet()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.WalletAPI.GetWallet(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, wallet_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = wallet_api::get_wallet(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.WalletApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new WalletApi(client).getWallet();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/wallet \
-H "Authorization: Bearer $HANZO_API_KEY"Tool wallets, op get_wallet — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "wallets",
"arguments": {
"op": "get_wallet",
"input": {}
}
}
}'Answers 200 with object — ok.
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/wallet/{id}/keys | Rolls one wallet's signing material through its own custody backend and answers the wallet with whatever address that produced. |
POST /v1/wallet/{id}/sign | Produces a secp256k1 signature from one of the caller org's wallets over a 32-byte digest, through whichever custody backend that wallet uses. |
POST /v1/wallet/{id}/transactions | Composes a Safe transaction on the MPC ring and answers its EIP-712 hash together with the owner approval the ring's threshold signature produced. |
GET /v1/wallet/{id} | Returns one of the caller org's wallets: its scope, custody kind, tier, chain and on-chain address. |
GET /v1/wallet/accounts | Returns the caller org's wallet accounts, newest first. |
POST /v1/wallet/accounts | Opens a named wallet account for the caller's org. |
GET /v1/wallet | Returns the caller org's wallets, newest first, optionally NARROWED within the org by project, agent or account. |
POST /v1/wallet | Provisions a new signing identity under one of the caller org's accounts and answers the stored wallet including its on-chain address. |
How is this guide?