Create 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.

POST /v1/wallet/{id}/transactions

Addresshttps://api.hanzo.ai/v1/wallet/{id}/transactions
MethodPOST
Operationpost_wallet_by_id_transactions
AuthAuthorization: Bearer $HANZO_API_KEY

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. Only a wallet whose custody is "safe" can do this — any other custody is a 400, because the backend itself is asked whether it can propose rather than the kind being switched on. The ring computes the Safe-tx hash bound to the Safe contract and the chain id, so the hash a caller gets back is the one the Safe will verify. This PROPOSES: it does not execute the transaction.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyes
chainIdbodyinteger (int64)—ChainID is the EVM chain the Safe transaction is bound to.
databodystring—Data is the call data, hex-encoded.
noncebodyinteger (int64)—Nonce is the Safe's transaction nonce.
tobodystring—To is the transaction's target address.
valuebodystring—Value is the native-token amount to send, as a decimal string in wei.

Response

StatusBodyMeaning
200wallet.safeProposalok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
rbodystring—R is the r component of the MPC threshold signature over the Safe-tx hash.
sbodystring—S is the s component of that signature.
safeAddressbodystring—SafeAddress is the Safe contract this transaction is for.
safeTxHashbodystring—SafeTxHash is the EIP-712 Safe transaction hash, bound to the Safe contract and the chain id — the value the owner approval signs.
walletIdbodystring—WalletID is the wallet whose Safe this is.

Failure carries the platform error shape — see Errors.

Examples

hanzo wallet transactions <id>
import { Configuration, WalletApi } from 'hanzoai';

const api = new WalletApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postWalletByIdTransactions({ id: 'id', chainId: 0, data: "<data>" });
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).post_wallet_by_id_transactions(id='id', chain_id=0, data="<data>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.WalletAPI.PostWalletByIdTransactions(context.Background()).Execute()
if err != nil {
	return err
}
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::post_wallet_by_id_transactions(&cfg, Default::default()).await?;
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).postWalletByIdTransactions();
curl -X POST https://api.hanzo.ai/v1/wallet/<id>/transactions \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "chainId": 0,
       "data": "<data>"
     }'

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:

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"
         }
       }
     }'

Wallet API · All Hanzo APIs · Interactive reference

Was this page useful?