Caplane

bring a key · sign an order · the relayer settles it

Point your agent at the broker.

No account, no coordinator, no gatekeeper. Your agent signs one order with its own key, any relayer fronts the gas, and the capability and the payment settle in a single transaction. The first instruction is an address and a signature, not "create an account." For the SDK and the full reference, read the docs.

  1. 1

    Bring a key

    An EOA your agent controls. It needs TUSDC, not gas. No registration.

  2. 2

    Sign one order

    The SDK binds payment to adapter, params, amount, and payee in a single EIP-3009 signature: nonce = keccak256(abi.encode(order)).

  3. 3

    The relayer settles it

    Any relayer is msg.sender, paid your feeBps. Payment and grant land atomically, or the whole transaction reverts.

Every other agent network starts with a platform signup. Caplane starts with a signature.

Quickstart

Clone the repo, set your key, run one command, and watch your settlement land on the live network. The repository is the distribution.

terminal · recommendedthe repo is the distribution
git clone https://github.com/DavidZapataOh/Caplane && cd Caplane
pnpm install

# your key signs the order in your wallet; Caplane never sees it
CONSUMER_PK=0x… pnpm join

or, standalone, about ten lines:

join.ts · @caplane/consumer-agentnpm · preview
import { connect } from "@caplane/consumer-agent";

// `account` is your agent's viem LocalAccount, built from YOUR key in YOUR env.
// Caplane never sees the key, only the signature it produces. (Full code: quickstart README.)
const caplane = await connect({
  chainId: 46630,                               // Robinhood: the Allocation floor
  relayerUrl: process.env.CAPLANE_RELAYER_URL!, // any relayer; it is only msg.sender
});

const slot = await caplane.buyAllocation({
  account,                                      // signs locally, never broadcasts
  vaultId: 1n,
  feeBps: 100,                                  // the relayer's incentive
});

console.log(slot.txHash, slot.slotTokenId, slot.explorerUrl);

CONSUMER_PK is read from your environment only. Your key, your wallet. Caplane never sees, holds, or transmits it, only the resulting signature.

Three ways in, one settlement.

Pick the transport your agent already speaks. All three produce the same real on-chain settlement, through the same broker. The envelope is interchangeable; the spine is not: your signature, the relayer as msg.sender, atomic or revert. No coordinator, no escrow, no facilitator holding funds in any of them.

TypeScript SDKcustom Node agents, LangChain.js
sdk.ts
// discover -> build -> sign (your key) -> submit. The binding is nonce = orderHash.
const quote = await discover(publicClient, adapter, params);   // adapter.quote()
const order = buildOrder({ consumer: account.address, adapter, params,
  payToken: quote.payToken, amount: quote.price, feeBps: 100, payee });
const auth  = await signOrder(account, domainFromRegistry(reg), order,
  reg.contracts.CapabilityBroker, 0n, deadline);   // EIP-3009 nonce = keccak256(abi.encode(order))
await submit(relayerUrl, order, auth, reg.chainId);            // POST /broker
x402 / HTTP-402any agent that speaks 402
x402.http
// 1. ask for the capability; get a real 402 carrying the Caplane order params
GET  {x402}/x402                       -> 402 Payment Required  { adapter, params, amount, payee, feeBps }
// 2. sign the SAME order-bound nonce with your own key, resubmit with the payment header
GET  {x402}/x402   X-PAYMENT: <signed>  -> 200  { txHash }   // relayed to brokerCapability

x402 is the envelope only. Unlike pay-then-trust-the-server, the grant is atomic on-chain or the transaction reverts.

MCP toolClaude and MCP-native agents
mcp.tools
// the MCP server holds no key: build_order returns what to sign, you sign, broker_capability transmits
list_capabilities()                 -> [ allocation, gas, timeboost, ... ]
quote_capability("allocation")      -> { price, payToken, scarcity }
build_order({ capability, params }) -> the Order to sign  (server never signs for you)
broker_capability(signedOrder)      -> { txHash }         // your signature, the relayer is msg.sender

The server holds no key. build_order returns what to sign; broker_capability transmits a payload you already signed.

Endpoints

The SDK works against any relayer URL, including one you run locally today. Hosted URLs appear here once they are live. Nothing here is faked.

RelayerPOST /broker · GET /info
not hosted yet · run your ownRELAYER_PK=0x… pnpm --filter @caplane/relayer start # http://localhost:8787
x402 front doorPOST /x402 · the HTTP-402 envelope
not hosted yet · run your ownpnpm --filter @caplane/x402-gateway start
MCP serverlist_capabilities · quote_capability · build_order · broker_capability
not hosted yet · run your ownpnpm --filter @caplane/mcp start
Faucetclaim testnet TUSDC for the address you sign with
not hosted yet · run your ownpnpm --filter @caplane/faucet start

Contracts, on two live testnets.

Every address is read from the registry at build time and links to its explorer. The SDK resolves them the same way, so nothing is hard-coded.

robinhood-testnetchainId 46630

USDC EIP-712 domain: name Test USD Coin, version 2. The order encoding must match the contract byte for byte; the SDK guarantees it, anchored by the parity test.

arbitrum-sepoliachainId 421614

USDC EIP-712 domain: name Test USD Coin, version 2. The order encoding must match the contract byte for byte; the SDK guarantees it, anchored by the parity test.

Then watch it settle.

The example prints a /network?tx= link. Open it and find your own settlement in the live feed, explorer-verifiable, in the same stream as the autonomous agents already running.