> ## Documentation Index
> Fetch the complete documentation index at: https://docs.caminotreasury.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Yield Tracking

> Look up a holder's YieldDistributor merkle claims with the Camino Treasury API

## Overview

Yield is distributed periodically via the on-chain `YieldDistributor` contract. For each period, the operator publishes a merkle root that commits to every holder's allocation; holders then submit a merkle proof to `claim()` and receive their funds directly. The Camino API serves the off-chain data callers need to construct that claim.

`GET /v1/yield/{address}` returns the holder's claims as a flat `data` list. Each entry is self-contained — it carries its own `chainId` and `distributor` address — so it can be passed directly into the corresponding contract's `claim()`. Entries are sorted by `periodId` ascending. Each entry carries a `status`:

* **`unclaimed`** — the holder can currently claim this one (finalized and within the claim window).
* **`claimed`** — the holder has already pulled this one on-chain.

Unpublished periods, periods still in the operator replace window, and expired-without-claim periods are omitted.

Requires an API key.

## Look up a holder

```javascript theme={null}
const holder = '0x742d35cc6634c0532925a3b844bc454e4438f44e';

const response = await fetch(
  `https://api.caminotreasury.com/v1/yield/${holder}`,
  { headers: { 'x-api-key': 'your-api-key' } },
);

// Restrict to a single chain by passing `?chainId=1`:
//   /v1/yield/0x…?chainId=1

const { data, count } = await response.json();

// {
//   "data": [
//     {
//       "chainId": 1,
//       "distributor": "0x…",
//       "periodId": "4",
//       "status": "claimed",
//       "root": "0x…",
//       "index": 12,
//       "account": "0x742d35…",
//       "amount": "1200000",
//       "proof": ["0x…", "0x…"]
//     },
//     {
//       "chainId": 1,
//       "distributor": "0x…",
//       "periodId": "5",
//       "status": "unclaimed",
//       "root": "0x…",
//       "index": 12,
//       "account": "0x742d35…",
//       "amount": "1500000",
//       "proof": ["0x…", "0x…"]
//     }
//   ],
//   "count": 2
// }

const claimable = data.filter((p) => p.status === "unclaimed");
```

## Entry shape

| Field         | Type                         | Description                                            |
| ------------- | ---------------------------- | ------------------------------------------------------ |
| `chainId`     | integer                      | Chain this period lives on.                            |
| `distributor` | string                       | YieldDistributor contract address on `chainId`.        |
| `periodId`    | string                       | Period ID on the distributor (uint as string).         |
| `status`      | `"claimed"` \| `"unclaimed"` | Whether the on-chain `isClaimed` flag is set.          |
| `root`        | string                       | Merkle root committed on-chain for this period.        |
| `index`       | integer                      | Leaf index in the period's merkle tree.                |
| `account`     | string                       | Recipient address — `claim()` always transfers here.   |
| `amount`      | string                       | Raw claim amount (use the token's decimals to format). |
| `proof`       | string\[]                    | Merkle proof for the leaf.                             |

To claim, call `claim(periodId, index, account, amount, proof)` on the `distributor` address (on `chainId`) with the fields from an `unclaimed` entry.

## Period artifact (verification)

`GET /v1/yield/artifacts?periodId=N` returns the full artifact (root, every leaf, every proof, totals) for a published period. Anyone can fetch this and independently verify what's committed on-chain.

```javascript theme={null}
const response = await fetch(
  `https://api.caminotreasury.com/v1/yield/artifacts?periodId=5`,
);

const artifact = await response.json();
// { version, periodId, blockRange, root, leaves: [...], ... }
```

<Note>
  Artifacts for finalized periods are immutable — once a period is published, its root, leaves, and proofs never change.
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="Deposit and Start Earning" icon="arrow-up-right" href="/guides/deposit-and-earn">
    Deposit stablecoins into C0 to begin accruing yield
  </Card>

  <Card title="Wallets" icon="wallet" href="/guides/wallets">
    Create and manage wallets, track token balances
  </Card>
</CardGroup>
