Overview
When integrating Multihopper into an automated or agentic workflow, the transfer lifecycle splits into two distinct halves:- API-managed — create, prepare, confirm-broadcast, and monitor via REST
- Client-managed — sign and broadcast transactions to Solana (requires wallet access)
Transfer lifecycle for agents
confirm-broadcast is called twice: once immediately after keeperFundingTx (step 4), and once after the rest (step 6). This prevents double-funding if deployment is interrupted and /prepare is called again.
Transaction signing
preparedTxs contains four groups of transactions that must be signed in order. Each group uses either a VersionedTransaction (v0) or a legacy Transaction — the signing approach differs.
Any field that is
null in preparedTxs is already confirmed on-chain from a previous broadcast attempt — skip it.
Python
Dependencies:pip install solders base58
TypeScript
Dependencies:npm install @solana/web3.js bs58
Broadcasting to Solana
Signed transactions must be broadcast in a strict order. Each group must reachconfirmed status before the next group is sent — later transactions depend on accounts created by earlier ones.
Broadcast order
Python
TypeScript
Handling expiry and resume
Solana blockhashes expire roughly 60 seconds after the/prepare call. If broadcast fails mid-way — due to expiry, an RPC error, or a process crash — call /prepare again with a new Idempotency-Key.
The server inspects the chain and returns null for any group already confirmed. The signing and broadcast helpers above skip null fields automatically.
Compliance & screening
On compliance-enabled networks (mainnet today) every route is screened against sanctions/risk data automatically, after deployment, by the keeper — your agent does nothing to “pass” screening. Two things to account for:- Budget the screening fee. A flat screening fee (currently 0.002 SOL on mainnet, a
configured value) is taken from
sourceOwnerat deploy by the/preparebundle and is not included in/estimate. It’s a refundable anti-abuse deposit — a clean route gets it back on verification, a flagged route forfeits it — but the wallet must hold it at deploy time on top of the transfer amount, protocol fees, account rent, and keeper funding, or the deploy can fail for insufficient lamports. - Expect a short verification window. After your final
confirm-broadcast, the transfer sits inprocessingwhile the keeper verifies compliance, then hops begin executing. Keep polling — no action is needed. If a wallet is flagged, the transfer ends asrefunded: the principal is returned and the screening fee is retained.
Full autonomous loop (TypeScript)
Agent context file (CLAUDE.md)
Drop the block below into your project’sCLAUDE.md (or any system prompt / context file your agent reads). It gives the agent everything it needs to call MultiHopper correctly without hallucinating endpoints or field names.
MCP server integration
When building an MCP-compatible agent (Claude, LangGraph, AutoGen), expose the API steps as individual tools and keepsign_and_broadcast as a local tool that holds wallet access.
sign_and_broadcast is the only tool that requires wallet access. All other tools are pure HTTP wrappers and can be exposed without key material.
API Reference
Full endpoint documentation, error codes, and rate limits.
Webhooks
Receive real-time transfer lifecycle events instead of polling.
Security model
Trust assumptions and on-chain guarantees.
Keeper network
How keepers execute hops after broadcast.

