Choose your integration
Pick the path that matches how you build:Claude Code
One command. Auto-intercepts all wallet transactions.
OpenClaw
Install from ClawHub. Three tools, safety-net hook.
TypeScript SDK
Full control. MandateClient + MandateWallet.
CLI
Validate from scripts, CI, or MCP server mode.
Python / Any Language
REST API. Works with Python, Go, Rust, or any HTTP client.
Claude Code Plugin
The fastest path. Two commands, zero code changes. The plugin intercepts all wallet transactions Claude executes and validates them against your policy. Step 1: Add the marketplace and install the plugin:- Agent calls
mandate validatewith action + reason - If allowed: plugin records a 15-minute token, transaction proceeds
- If blocked: agent gets counter-evidence explaining why, stops voluntarily
- If no validation attempted: plugin blocks the tool call entirely
- Auto-scan on startup finds unprotected wallet calls in your project
- Works with any wallet: Bankr, MCP payment tools, direct RPC, custom CLIs
Full Claude Code guide
Two-phase enforcement, gate triggers, token TTLs, and advanced configuration.
OpenClaw Plugin
Install from ClawHub or npm. Your agent gets three Mandate tools automatically.
A safety-net hook blocks any financial tool call that skips
mandate_validate.
GitHub: SwiftAdviser/mandate-openclaw-plugin
ClawHub: clawhub.ai/swiftadviser/mandate
Full OpenClaw guide
Tool parameters, safety-net hook details, and configuration options.
TypeScript SDK
For custom agents. Full control over the validate, sign, broadcast flow.Install
- bun
- npm
Register your agent
Test validation (no wallet needed)
You can test the policy engine without a private key or wallet. This is the fastest way to verify your setup works.Execute the transfer
MandateWallet handles the full flow: validate, sign locally, broadcast, confirm. Your private key never leaves your machine.
validate() accepts amounts in USD (e.g., '50' means $50). wallet.transfer() accepts raw token units (e.g., '5000000' means 5 USDC, because USDC has 6 decimals). The policy engine always evaluates in USD.Complete runnable example (register + validate + transfer)
Complete runnable example (register + validate + transfer)
CLI
Run directly withnpx. No install needed.
Register
Validate
Scan your codebase
Find unprotected wallet calls before they reach production:sendTransaction, transfer, approve, and other financial calls missing Mandate validation. Exit code 1 if any found. Use it in CI.
MCP server mode
Turn the CLI into an MCP server for AI assistants:Full CLI reference
All 10 commands, flags, credential storage, and MCP configuration.
Python / Any Language
No SDK needed. Call the REST API directly with any HTTP client.Register
Validate
Default policy
After registration, every agent starts with:
Customize in the Dashboard policy builder.
What happens under the hood
- Validate. Your agent sends action + reason to Mandate. The policy engine runs 14 checks.
- Sign locally. After validation passes, the agent signs with its own key. Mandate never sees it.
- Broadcast. Signed transaction goes to the chain.
- Verify. Mandate confirms the on-chain tx matches what was validated. Mismatch trips the circuit breaker.
Resources
Next Steps
How It Works
Validation flow, intent lifecycle, and state machine.
Handle Errors
PolicyBlockedError, CircuitBreakerError, and 12 block reason codes.
Handle Approvals
Wait for human approval with polling, timeouts, and callbacks.
All Integrations
GOAT SDK, AgentKit, ElizaOS, GAME, ACP, MCP Server, and more.