# Read a bond from any app

> Three ways to read a service's bond without a wallet: the service's own GET /v1/warranty, the public API, and a direct chain read with the protocol package.

*LOPW documentation · Guides.* Canonical page: https://lopw.com/docs/guides/read-bond.html · This Markdown twin: https://lopw.com/docs/guides/read-bond.md · Index of all pages: https://lopw.com/llms.txt · Everything in one file: https://lopw.com/llms-full.txt

Any app, dashboard or agent can see what a seller stands behind before paying it a cent.

## The service's own discovery endpoint

Reference services expose a free, CORS-open `GET /v1/warranty` that returns the live bond. It is a convention for sellers, not a contract function; the fields come straight from `get_service`:

```http
GET /v1/warranty
// {
//   "network": "testnet",
//   "registry": "C…",                 // Bond Registry contract
//   "service_id": "…64 hex…",
//   "state": "Active",
//   "stake": "2000000000",            // 200 USDC, 7-decimal units
//   "terms_hash": "…64 hex…",
//   "price": { "amount": "100000", "asset": "C…", "display": "$0.01" }
// }
```

```ts
const bond = await (await fetch(`${serviceUrl}/v1/warranty`)).json();
if (bond.state !== "Active" || BigInt(bond.stake) < 100n * 10_000_000n) {
  // do not pay this service
}
```

## The public API

```http
GET /v1/testnet/services/{service_id}
// state, stake, min_stake, pending_withdrawal, terms_hash, key_version and claim totals (paid, rejected, total_paid)
```

See [Getting started for app builders](https://lopw.com/docs/guides/apps.html) for conventions and the [API reference](https://lopw.com/docs/protocol/api.html) for every endpoint.

## Straight from the chain

```ts
const service = await binding.getService(serviceId);                    // state, stake, min_stake, terms_hash, key_version, max_claim_window, pending_withdrawal
const terms = await binding.getTerms(serviceId, service.terms_hash);    // the predicates and limits behind terms_hash
```

`get_service(service_id)` and `get_terms(service_id, terms_hash)` on the Bond Registry are the underlying calls; `get_terms` works for every terms version the service has ever registered, so a receipt’s `terms_hash` can always be resolved.
