agentwallet

v1.14.22
io.github.hifriendbot/agentwallet Checked 2 days ago Published 16 hours ago

Wallet infrastructure for Ai agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_wallet

Create a new EVM or Solana wallet. Returns the wallet ID and address. Private key is encrypted server-side and never exposed.

ParameterTypeDescription
chain_idintegerDefault chain ID (1=Ethereum, 8453=Base, 42161=Arbitrum, 10=Optimism, 137=Polygon, 43114=Avalanche, 56=BSC, 7777777=Zora, 369=PulseChain, 900=Solana, 901=Solana Devnet)
labelstringFriendly name for the wallet

list_wallets

List all wallets owned by the authenticated user. Returns wallet IDs, addresses, labels, chain IDs, and status.

get_wallet

Get details for a specific wallet by ID. Returns address, label, chain, spending limits, and pause status.

ParameterTypeDescription
wallet_id *integerWallet ID

get_balance

Get the native token balance for a wallet on a specific chain. Returns balance in both wei (or lamports for Solana) and human-readable format.

ParameterTypeDescription
wallet_id *integerWallet ID
chain_idintegerChain ID to check (defaults to wallet's default chain)

sign_transaction

Sign a transaction with a wallet's private key. For EVM: returns signed raw transaction hex. For Solana: returns base64 signed transaction. Does NOT broadcast. Use send_transaction for sign + broadcast. A signed transaction is a spend: under a spend policy it is checked, reserved on the ledger and counted against the budgets exactly as send_transaction is, because the caller can broadcast it.

ParameterTypeDescription
to *stringDestination address (0x-prefixed for EVM, Base58 for Solana)
wallet_id *integerWallet ID
chain_idintegerChain ID (defaults to wallet's default)
datastringHex-encoded calldata (0x-prefixed) for EVM contract calls
gas_limitstringGas limit — EVM only (auto-estimated if omitted)
max_feestringMax fee per gas in wei — EVM only (auto if omitted)
priority_feestringMax priority fee per gas in wei — EVM only (auto if omitted)
token_decimalsintegerSPL token decimals, Solana only (6 for USDC)
token_mintstringSPL token mint address — Solana only (for SPL token transfers)
valuestringValue in wei/lamports (decimal integer string; no hex, no decimals)

send_transaction

Sign and broadcast a transaction. Returns the transaction hash (EVM) or signature (Solana) on success. The transaction is signed server-side and broadcast via RPC.

ParameterTypeDescription
to *stringDestination address (0x-prefixed for EVM, Base58 for Solana)
wallet_id *integerWallet ID
chain_idintegerChain ID (defaults to wallet's default)
datastringHex-encoded calldata (0x-prefixed) for EVM contract calls
gas_limitstringGas limit — EVM only (auto-estimated if omitted)
max_feestringMax fee per gas in wei — EVM only (auto if omitted)
priority_feestringMax priority fee per gas in wei — EVM only (auto if omitted)
token_decimalsintegerSPL token decimals, Solana only (6 for USDC)
token_mintstringSPL token mint address — Solana only (for SPL token transfers)
valuestringValue in wei/lamports (decimal integer string; no hex, no decimals)

transfer

Send native tokens (ETH, AVAX, BNB, POL, PLS, SOL) to an address. Specify the amount in human-readable format (e.g. "0.1" for 0.1 ETH). The amount is converted to wei/lamports automatically. Signs and broadcasts the transaction.

ParameterTypeDescription
amount *stringAmount to send in human-readable format (e.g. "0.1" for 0.1 ETH)
chain_id *integerChain ID (1=Ethereum, 8453=Base, 42161=Arbitrum, 10=Optimism, 137=Polygon, 43114=Avalanche, 56=BSC, 7777777=Zora, 369=PulseChain, 900=Solana, 901=Solana Devnet)
to *stringDestination address (0x-prefixed for EVM, Base58 for Solana)
wallet_id *integerWallet ID to send from

get_token_balance

Get the ERC-20 or SPL token balance for a wallet on a specific chain. Returns the raw balance and human-readable balance. Use get_chains to find stablecoin addresses for each chain.

ParameterTypeDescription
chain_id *integerChain ID to check on
token *stringToken address (0x-prefixed ERC-20 contract for EVM, Base58 mint for Solana)
wallet_id *integerWallet ID to check
decimalsintegerToken decimals. Taken from the response or the token contract when omitted

transfer_token

Send ERC-20 tokens (EVM) or SPL tokens (Solana) to an address. Specify the amount in human-readable format (e.g. "100" for 100 USDC). Signs and broadcasts the transaction. Use get_chains to find stablecoin addresses.

ParameterTypeDescription
amount *stringAmount in human-readable format (e.g. "100" for 100 USDC)
chain_id *integerChain ID
to *stringRecipient address (0x-prefixed for EVM, Base58 for Solana)
token *stringToken address (0x-prefixed ERC-20 contract for EVM, Base58 mint for Solana)
wallet_id *integerWallet ID to send from
decimalsintegerToken decimals. Resolved from the registry or the token contract when omitted; if given, it must match

call_contract

Execute a read-only call against a smart contract (eth_call). Returns the raw hex result. Does not cost gas or modify state. Useful for reading on-chain data like token balances, prices, positions.

ParameterTypeDescription
chain_id *integerChain ID
data *stringABI-encoded calldata (0x-prefixed hex)
to *stringContract address

approve_token

Approve a spender contract to transfer ERC-20 tokens on your behalf. Required before interacting with any DeFi protocol (DEXs, lending, etc.). Specify an exact amount. "max" (an unlimited allowance) is refused by default and always under a spend policy; only the operator can allow it, with AGENTWALLET_ALLOW_UNLIMITED_APPROVAL=1 while no policy is set. Under a spend policy an approval is a spend: it counts against the budgets and the spender is checked as a recipient.

ParameterTypeDescription
amount *stringAmount to approve in human-readable format (e.g. "1000"); "max" means unlimited and is refused unless the operator allowed it
chain_id *integerChain ID
spender *stringContract address to approve as spender
token *stringERC-20 token contract address
wallet_id *integerWallet ID
decimalsintegerToken decimals. Resolved from the registry or the token contract when omitted; if given, it must match

get_allowance

Check how many ERC-20 tokens a spender is approved to transfer. Returns the allowance in both raw and human-readable format. Use this to check if an approval is needed before a DeFi transaction.

ParameterTypeDescription
chain_id *integerChain ID
spender *stringSpender contract address to check
token *stringERC-20 token contract address
wallet_id *integerWallet ID (used to determine the owner address)
decimalsintegerToken decimals. Resolved from the registry or the token contract when omitted; if given, it must match

wrap_eth

Wrap native tokens (ETH, AVAX, BNB, POL, PLS) into their wrapped ERC-20 version (WETH, WAVAX, etc.). Required for most DeFi protocols that use ERC-20 tokens instead of raw native tokens. Specify amount in human-readable format (e.g. "0.5" for 0.5 ETH).

ParameterTypeDescription
amount *stringAmount to wrap in human-readable format (e.g. "0.5")
chain_id *integerChain ID
wallet_id *integerWallet ID

unwrap_eth

Unwrap wrapped tokens (WETH, WAVAX, WBNB, etc.) back to native tokens. Specify amount in human-readable format (e.g. "0.5" for 0.5 WETH).

ParameterTypeDescription
amount *stringAmount to unwrap in human-readable format (e.g. "0.5")
chain_id *integerChain ID
wallet_id *integerWallet ID

get_token_info

Get the name, symbol, and decimals of any ERC-20 token by its contract address. Useful for discovering token details before transfers or approvals.

ParameterTypeDescription
chain_id *integerChain ID
token *stringERC-20 token contract address

pay_x402

Handle an x402 payment flow. Fetches a URL, and if the server returns HTTP 402 Payment Required, parses the payment requirements (v1 body or v2 PAYMENT-REQUIRED header), signs an EIP-3009 TransferWithAuthorization for the "exact" scheme (no gas, nothing broadcast by the payer), and retries the request with the payment header. AgentWallet paywalls are paid by on-chain transfer instead. The "upto" scheme is settled with a Permit2 authorization bounded by the cap. Returns the final response and the settlement receipt. Supports the x402 open payment standard (https://x402.org). max_payment can onl…

ParameterTypeDescription
url *stringThe URL to access (will handle 402 payment if required)
wallet_id *integerWallet ID to pay from
approval_idstringAn approval id from an earlier over-cap attempt. Once the owner has approved it, pass it here to make that one payment.
bodystringOptional request body for POST/PUT requests
fresh_authorizationbooleanSign a new authorization even if one for the same endpoint, amount and recipient is still valid. By default a repeat call within the validity window re-sends the earlier signature (same nonce, so it c…
headersstringOptional JSON string of additional request headers. Credentials placed here (Authorization, Cookie, API keys) are sent only to the origin in `url`; if the endpoint redirects to a different origin they…
max_paymentstringMaximum payment in human-readable format (e.g. "1.00" for 1 USDC). Lowers the operator's AGENTWALLET_MAX_AUTOPAY ceiling (default "1") for this one call; it can never raise it, and a value above the c…
methodstringHTTP method (GET, POST, PUT, DELETE)
prefer_chainintegerPreferred chain ID if the server accepts payment on multiple chains (e.g. 8453 for Base, 1 for Ethereum)
request_approvalbooleanHosted wallets only. When the payment exceeds the cap, email the wallet owner an approve/deny link instead of refusing, and return an approval_id to retry with. Default true unless AGENTWALLET_APPROVA…

check_approval

Status of a payment approval created when pay_x402 exceeded the cap on a hosted wallet. Returns pending, approved, denied or expired. Once approved, call pay_x402 again with approval_id.

ParameterTypeDescription
approval_id *stringApproval id returned by pay_x402

approve_permit2

One-time ERC-20 approval of a token to the Permit2 contract, needed before paying x402 "upto" endpoints with that token. A normal on-chain transaction (needs gas). Pass amount to grant a bounded allowance; with no amount it asks for the maximum, which is refused by default, under AGENTWALLET_MAX_TX_TOKEN, and always under a spend policy (where the allowance counts against the budgets). Only the operator can allow a maximum approval, with AGENTWALLET_ALLOW_UNLIMITED_APPROVAL=1 while no policy is set. Permit2 itself only moves what each signed authorization allows.

ParameterTypeDescription
chain_id *integerChain ID
token *stringERC-20 token address (e.g. USDC on Base)
wallet_id *integerWallet ID
amountstringAllowance to grant in human units (e.g. "100"). Omit for unlimited.

check_token_risk

Assess an ERC-20 token before approving or swapping it: honeypot, taxes, owner powers, verified source, holder concentration, DEX liquidity. Uses GoPlus Security (free, no key) with an on-chain fallback. A warning for the caller to weigh, never a block.

ParameterTypeDescription
chain_id *integerChain ID
token *stringERC-20 token contract address

get_usage

Get the current month's usage statistics. Hosted AgentWallet is free: returns the operations count and what is left under the fair-use ceiling.

buy_verification_credits

Hosted AgentWallet is free and x402 verifications carry no fee, so there are no credits to buy: this call reports that and spends nothing. Kept so existing agent configurations do not break.

ParameterTypeDescription
countintegerIgnored: there is nothing to purchase. Accepted so existing calls do not fail.

pause_wallet

Emergency pause a wallet. No transactions can be signed while paused.

ParameterTypeDescription
wallet_id *integerWallet ID to pause

unpause_wallet

Resume a paused wallet so transactions can be signed again.

ParameterTypeDescription
wallet_id *integerWallet ID to unpause

get_chains

List all supported chains (EVM + Solana) with their chain IDs, native tokens, stablecoins, and RPC configuration status.

delete_wallet

Delete (soft-delete) a wallet. The wallet will no longer appear in listings and cannot be used for transactions. The wallet is read first and the delete names its address, so a wallet that cannot be read is never deleted.

ParameterTypeDescription
wallet_id *integerWallet ID to delete

create_paywall

Create an x402 paywall that charges agents/clients for accessing a resource. Returns a public access URL that returns HTTP 402 until paid. Agents pay on-chain, then retry with proof to get the content.

ParameterTypeDescription
amount *stringPrice in human-readable format (e.g. "0.01" for 0.01 USDC)
name *stringHuman-readable paywall name (e.g. "Premium API Access")
resource_url *stringURL of the protected resource to serve after payment verification
wallet_id *integerWallet ID to receive payments
chain_idintegerChain ID for payments (8453=Base, 1=Ethereum, etc.)
descriptionstringDescription shown in the 402 response
resource_mimestringMIME type of the resource (e.g. "application/json", "text/plain")
token_addressstringToken contract address (ERC-20 for EVM, SPL mint Base58 for Solana). Required if token_type is "erc20" or "spl". Use get_chains to find stablecoin addresses.
token_decimalsintegerToken decimals. Defaults to the chain native decimals for "native", else 6 (USDC); set it for any other token
token_namestringToken display name (e.g. "USDC", "ETH")
token_typestring"erc20" for EVM stablecoins, "spl" for Solana SPL tokens, "native" for ETH/SOL/POL/etc.

list_paywalls

List all your x402 paywalls. Returns paywall IDs, names, pricing, access URLs, payment counts, and revenue totals.

ParameterTypeDescription
pageintegerPage number
per_pageintegerResults per page (max 100)

get_paywall

Get details for a specific x402 paywall by ID. Returns pricing, access URL, payment stats, and configuration.

ParameterTypeDescription
paywall_id *integerPaywall ID

update_paywall

Update an x402 paywall configuration. Can change price, resource URL, active status, or any other field.

ParameterTypeDescription
paywall_id *integerPaywall ID to update
amountstringNew price in human-readable format (e.g. "0.05")
descriptionstringNew description
is_activebooleanEnable (true) or disable (false) the paywall
namestringNew paywall name
resource_mimestringNew MIME type
resource_urlstringNew resource URL
token_decimalsintegerToken decimals. Read from the paywall itself when omitted

delete_paywall

Delete an x402 paywall. The access URL will return 404 after deletion.

ParameterTypeDescription
paywall_id *integerPaywall ID to delete

get_paywall_payments

Get payment history for a specific x402 paywall. Returns verified payments with TX hashes, payer addresses, amounts, and timestamps.

ParameterTypeDescription
paywall_id *integerPaywall ID
pageintegerPage number
per_pageintegerResults per page (max 100)

get_x402_revenue

Get aggregate x402 revenue statistics across all your paywalls. Returns total payments and revenue broken down by chain and token.

quote_x402

Ask what an x402 endpoint charges without paying: fetches the URL, parses the 402 requirements, says which option this wallet would pay (chain, asset, amount, recipient), whether the per-payment cap, the spend policy and the rolling budgets would allow it, and nothing is signed. Call it before pay_x402 when the price is unknown.

ParameterTypeDescription
url *stringThe URL to quote
bodystringOptional request body, as for pay_x402
headersstringOptional JSON string of request headers, as for pay_x402
methodstringHTTP method the real request would use
prefer_chainintegerPreferred chain ID when several are offered

discover_x402

Find x402-paid APIs by subject in the public x402 index (the Bazaar published by the CDP facilitator). Returns resources with their method, price and chain, re-priced from this client's own registry. Listings are sellers' own words. Nothing is paid; follow up with quote_x402 or pay_x402.

ParameterTypeDescription
chain_idintegerOnly resources payable on this chain
limitintegerHow many matches to return
offsetintegerIndex offset to continue from (use next_offset from the previous call)
querystringWords that must all appear in the resource URL, service name, description or tags (case-insensitive)

list_payments

Spends recorded in this wallet's ledger (x402 payments, transfers, auto-pay), newest first, each with its latest outcome (signed, settled, declined, unknown, broadcast, void). The ledger is a hash-chained append-only file when AGENTWALLET_LEDGER or a policy names one; otherwise this process only.

ParameterTypeDescription
hoststringOnly payments to this endpoint host
limitinteger
outcomestringOnly this outcome
sincestringISO 8601 timestamp; only spends at or after it

export_receipts

Every spend in the ledger as CSV or JSONL text (oldest first), for expense records. Returns the text; write it wherever it belongs.

ParameterTypeDescription
formatstring
sincestringISO 8601 lower bound
untilstringISO 8601 upper bound

spend_policy

The spend policy this server enforces (AGENTWALLET_POLICY), its sha256, the rolling budgets with what is spent and what remains, per-host spending, the ledger's path and integrity, and whether the connected client can answer approval questions. Read-only.

simulate_transaction

Dry-run an EVM transaction with nothing signed: the local guards (native cap, token cap, fee cap), the spend policy, the node's gas estimate (which fails when the call would revert), the worst-case fee, whether the balance covers it, and the call's return data. Local mode runs the full check; hosted mode runs the policy and an eth_call.

ParameterTypeDescription
chain_id *integerEVM chain ID
to *stringDestination address
wallet_id *integerWallet ID (ignored in local mode)
datastringOptional calldata (0x-prefixed hex)
valuestringNative amount in human units (e.g. "0.01" ETH)

wallet_mode

Report whether this server is signing locally (self-custody, the private key never leaves this machine) or through the hosted AgentWallet API (custodial). Use this to verify custody before moving funds.

export_wallet_key

Explain how to export the private key of a hosted (custodial) AgentWallet so it can be moved to self-custody or any other wallet. Export itself is deliberately human-gated and is not performed by this tool.

ParameterTypeDescription
wallet_idintegerHosted wallet ID to export