# Wallet

URL: https://docs.hanzo.ai/docs/openapi/wallet

> Blockchain key custody: create wallets, rotate their keys, and sign with them.

Also for this capability: **API** · [CLI](https://docs.hanzo.ai/docs/cli/wallet) · [MCP](https://docs.hanzo.ai/docs/mcp-tools/wallet) · [SDKs](https://docs.hanzo.ai/docs/sdks)

Blockchain key custody: create wallets, rotate their keys, and sign with them.

> [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|                |                                        |
| -------------- | -------------------------------------- |
| **Base URL**   | `https://api.hanzo.ai`                 |
| **Operations** | 8                                      |
| **Auth**       | `Authorization: Bearer $HANZO_API_KEY` |

## Specification

Specification pending — no HIP in [hanzoai/hips](https://github.com/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 wallet …`                               | 8 of 8                                                                    |
| **SDK**  | `WalletApi` in every published client          | 8 methods                                                                 |
| **MCP**  | tool `wallet` on `https://api.hanzo.ai/v1/mcp` | 7 operations, 1 under the document's own id — ask `describe` for the rest |

## Quickstart

```bash
export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys
```

Then the first call — a read that needs nothing but the key. `GET /v1/wallet`, operation `get_wallet`:

**CLI**

```bash
hanzo wallet list
```

**SDK**

**.ts**

```ts
import { Configuration, WalletApi } from 'hanzoai';

const api = new WalletApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getWallet();
```

**.py**

```python
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()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.WalletAPI.GetWallet(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::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?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.WalletApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new WalletApi(client).getWallet();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/wallet \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **wallet** through the `wallet` tool, which names its 7 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_wallets"
         }
       }
     }'
```

Answers `200` with `object` — ok.

## Endpoints

| Endpoint                                                                                                        | What it does                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`POST /v1/wallet/{id}/keys`](https://docs.hanzo.ai/docs/openapi/wallet/post-wallet-by-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`](https://docs.hanzo.ai/docs/openapi/wallet/post-wallet-by-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`](https://docs.hanzo.ai/docs/openapi/wallet/post-wallet-by-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}`](https://docs.hanzo.ai/docs/openapi/wallet/get-wallet-by-id)                             | Returns one of the caller org's wallets: its scope, custody kind, tier, chain and on-chain address.                                                |
| [`GET /v1/wallet/accounts`](https://docs.hanzo.ai/docs/openapi/wallet/get-wallet-accounts)                      | Returns the caller org's wallet accounts, newest first.                                                                                            |
| [`POST /v1/wallet/accounts`](https://docs.hanzo.ai/docs/openapi/wallet/post-wallet-accounts)                    | Opens a named wallet account for the caller's org.                                                                                                 |
| [`GET /v1/wallet`](https://docs.hanzo.ai/docs/openapi/wallet/get-wallet)                                        | Returns the caller org's wallets, newest first, optionally NARROWED within the org by project, agent or account.                                   |
| [`POST /v1/wallet`](https://docs.hanzo.ai/docs/openapi/wallet/post-wallet)                                      | Provisions a new signing identity under one of the caller org's accounts and answers the stored wallet including its on-chain address.             |

---

[All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
