Skip to main content

Prerequisites

  • A MultiHopper API key (mh_live_... for live, mh_test_... for test)
  • A Solana wallet with funds to transfer

Get API Keys

Sign in to the MultiHopper app to generate your API key.

Transfer flow overview

Creating a transfer takes three API calls, plus an intermediate confirmation step:
1. POST /transfers                        → create transfer, receive a quote
2. POST /transfers/:id/prepare            → get serialized transaction bundles
   [sign + broadcast keeperFundingTx FIRST]
   POST /transfers/:id/confirm-broadcast  → record keeperFundingSignature immediately
   [sign + broadcast remaining txs in order]
3. POST /transfers/:id/confirm-broadcast  → submit remaining signatures, trigger deployment
Once confirmed, the transfer moves into processing automatically.

Step 1: Estimate fees (optional)

Check expected costs before creating the transfer.
curl -X POST /api/v1/transfers/estimate \
  -H "x-api-key: mh_test_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "tokenMint": "So11111111111111111111111111111111111111112",
    "amountRaw": "1000000000",
    "tokenDecimals": 9,
    "hops": 7
  }'
{
  "tier": "standard",
  "percentFeeBps": 50,
  "totalFlatFeeLamports": 42000,
  "usdEquivalent": 1502.50
}

Step 2: Create the transfer

curl -X POST /api/v1/transfers \
  -H "x-api-key: mh_test_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "tokenMint": "So11111111111111111111111111111111111111112",
    "amountRaw": "1000000000",
    "amountTokens": "1.0",
    "tokenDecimals": 9,
    "tokenSymbol": "SOL",
    "sourceOwner": "<YOUR_WALLET>",
    "recipientWallet": "<RECIPIENT_WALLET>",
    "hops": 7,
    "arrivalSeconds": 300,
    "externalId": "my-order-001"
  }'
The response includes the quoted transfer object with a status of awaiting_signature.

Step 3: Prepare transactions

Call prepare to receive the serialized transaction bundles for this transfer:
curl -X POST /api/v1/transfers/42/prepare \
  -H "x-api-key: mh_test_abc123..."
{
  "transfer": { "...": "..." },
  "preparedTxs": {
    "routeInitTxs": [{ "base64": "AQAAAA..." }],
    "orchestratorInitTx": "AQAAAA...",
    "sessionInitTxs": ["AQAAAA..."],
    "keeperFundingTx": "AQAAAA...",
    "recentBlockhash": "5eykt4...",
    "lastValidBlockHeight": 291182440
  }
}
Sign each transaction in the bundle using your wallet and submit them to Solana. Record the resulting signatures.

Step 4: Confirm broadcast

Submit the collected signatures to confirm the broadcast:
curl -X POST /api/v1/transfers/42/confirm-broadcast \
  -H "x-api-key: mh_test_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "routeInitSignatures": ["4mGxFn7m..."],
    "orchestratorInitSignature": "2qYzLf1x...",
    "sessionInitSignatures": ["7nKpQr3z..."],
    "keeperFundingSignature": "9vLmXt8w..."
  }'
The transfer status moves to processing and the keeper network takes over deployment.

Step 5: Monitor status

curl /api/v1/transfers/42 \
  -H "x-api-key: mh_test_abc123..."
Or receive real-time updates by registering a webhook.

Next steps

API Reference

Full documentation for all endpoints, error codes, and rate limits.

Webhooks

Receive real-time transfer lifecycle events.

How it works

Understand the on-chain abstraction mechanism.

Security model

Trust assumptions and on-chain guarantees.