Sign in

Reference

Builders

An MCP server, a TypeScript SDK, x402 endpoints and an HTTP API, all live and all tested.

MCP server

Model Context ProtocolRemote, streamable HTTP, at https://infrabond.dev/mcp. Tools: find_bonded(kind, promise, minCapital), service_record(id), epoch(id, e), and back and issue, which return unsigned transactions.

For a sealed service, service_record and find_bonded return sealed: true and its commitment, never a URL. An agent that pays through the MCP server's results can name a payout address with the SDK's payX402.

ClaudeClaude Code: claude mcp add --transport http bond https://infrabond.dev/mcp

CursorCursor, in .cursor/mcp.json:

{ "mcpServers": { "bond": { "url": "https://infrabond.dev/mcp" } } }

SDK

One file, no dependencies: /sdk/bond.mjs. Its sha256 is in the dev log.

import { createBond, bonded, payX402 } from "./bond.mjs";

const bond = createBond({ site: "https://infrabond.dev" });
if (!(await bond.isBonded(2, { minCapital: 100, promise: "deviation" }))) throw new Error("unbonded dependency");

const { transactions } = await bond.back(2, "25");          // approve + back, unsigned
await bond.claimCompensation(1, 212, myAgentAddress);       // the claim for one slashed epoch

// your own service: serves /.well-known/bond.json and adds X-Bond to every response
app.use(bonded({ serviceId: 31, claim: myBondJson }));

// pay any x402 endpoint in USDG with a viem account
const res = await payX402("https://infrabond.dev/api/canary", { from: account.address, signTypedData: (a) => account.signTypedData(a) });

Privacy layer, in the same file: a one-time payout address for compensation, and sealed services.

import { createBond, payX402, freshPayout } from "./bond.mjs";

const payout = freshPayout();                 // { address, privateKey }: keep the key, it is the only copy
const res = await payX402("https://api.example.com/v1/quotes", {
  from: account.address,
  signTypedData: (a) => account.signTypedData(a),
  payout: payout.address,                     // bound by the EIP-3009 nonce you sign
  site: "https://infrabond.dev",                        // registers the link privately for endpoints elsewhere
});

// an operator bonds a service without publishing its URL
const bond = createBond({ site: "https://infrabond.dev" });
const sealed = await bond.sealEndpoint({ url: "https://internal.example.com/v1", kind: "http", name: "Pricing" });
// serve at that URL's /.well-known/bond.json: { commitment, operator, payTo, signature }
//   signature = personal_sign(sealedClaimMessage(sealed.commitment, operator))
await bond.claimSealed({ ...sealed, operator });

x402 endpoints

x402Exact scheme, USDG on eip155:4663, settled by Infrabond with EIP-3009 before the answer is served; the receipt is in X-PAYMENT-RESPONSE.

EndpointPriceReturns
GET /api/v1/records/:service?from&to$0.001raw records with Merkle proofs, up to six hours
POST /api/v1/watch$0.10adds any public endpoint to the probes for 30 days, or a sealed one with { sealed }
GET /api/canary$0.001the latest block and the time (a house bond)
GET /api/feeds/quotes$0.002stock-token prices with the Chainlink answer at the same block (a house bond)

HTTP API

GET /api/v1/servicesthe board: every service, bond, stats and the last 60 probes
GET /api/v1/services/:idone record with its last settled epochs
GET /api/v1/epochs/:bond/:epocha settled epoch with its compensation
POST /api/v1/tx/:actionunsigned transactions: back, issue, exit, withdraw, claim-premium, claim-compensation, approve
POST /api/claimsasks the registrar to check a bond.json, public or sealed
POST /api/v1/payoutbinds a settled x402 payment to a payout address: { tx, payer, nonce, payout, salt }, kept private
GET /api/v1/sealthe prober's public sealing key (P-256)
POST /api/relaywith { claim: { bondId, epoch, account } }: the relayer submits a compensation claim
GET /probes/:root.jsonthe records of one posted window
GET /api/livelive probes, counters and the latest post

Onchain

Another contract can require bonded dependencies with one view call: BondBook.isBonded(serviceId, minCapitalUSDG, promiseMask), where the mask is 1 availability, 2 latency, 4 freshness, 8 deviation, 16 tool stability. An agent's spending policy or a v4 hook can refuse to pay an unbonded service.