Bound

Quickstart

Verify a live certificate on Stellar testnet in about a minute.

The fastest useful thing you can do with Bound is read a certificate. It needs no keypair, no account and no configuration — the contract addresses ship inside the SDK.

Install

npm install @bound/sdk

@stellar/stellar-sdk comes with it, and the generated contract bindings are bundled. There is nothing else to install and nothing to configure: @bound/sdk targets Stellar testnet and carries the committed deployment addresses.

Verify a certificate

verify.ts
import { bound, toCertView } from "@bound/sdk";

const agent = "GCPOBMCWPO5A24KJJJRD27T4TKITHQI5MYY2FCQRR3HUXUFT4LO473ZT";

const result = await bound.verifyCertificate(agent);
console.log(toCertView(agent, result));
output
{
  "agent": "GCPOB...O473ZT",
  "valid": true,
  "status": "Verified",
  "boundUsd": "1500.00",
  "reserveUsd": "1500.00",
  "auditorStakeUsd": "500.00",
  "auditor": "GCBVH...FZN523",
  "expiresAt": 1780000000
}

bound is a ready-made client pointed at the committed deployment. verifyCertificate simulates the read against the chain — no signature, no fee, no state change. toCertView turns the raw result into a JSON-safe shape with bigints formatted as USD strings, which is what you want at an HTTP or UI boundary.

Gate a transaction on it

The whole point is to decide something. A counterparty accepting agent payments should read the certificate first and refuse work it cannot cover:

gate.ts
import { bound, toCertView } from "@bound/sdk";

export async function assertCovered(agent: string, priceUsd: number) {
  const cert = toCertView(agent, await bound.verifyCertificate(agent));

  if (!cert.valid) {
    throw new Error(`No valid certificate for ${agent} (status: ${cert.status})`);
  }
  if (Number(cert.reserveUsd) < priceUsd) {
    throw new Error(`Reserve ${cert.reserveUsd} does not cover ${priceUsd}`);
  }
  return cert;
}

Note what is being checked: the reserve, not the bound. The bound is what the certificate claims to cover; the reserve is the money that is actually locked. When they disagree, the certificate is challengeable — see How it works.

Check it yourself, without the SDK

Every address is public. You can read the vault balance straight off the chain and compare it to the certificate:

stellar contract invoke \
  --id CBM2UAVZFUI2QGZIS35VB6P3W5FYC3HW3KV3E2AF6KFQDUMFIZPPAJWV \
  --source-account default \
  --network testnet \
  -- verify --agent GCPOBMCWPO5A24KJJJRD27T4TKITHQI5MYY2FCQRR3HUXUFT4LO473ZT

Or open the contracts on stellar.expert — the live addresses are listed on Deployments.

Next

On this page