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

# Indexer

> Envio HyperIndex over the credit line: history, records, daily totals.

| | |
| - | - |
| Engine | [Envio HyperIndex](https://docs.envio.dev/docs/HyperIndex/overview), synced through HyperSync |
| Contract | `MatoCreditLine` proxy, from block `66922881` |
| GraphQL | `https://indexer.dev.hyperindex.xyz/b5ebb5c/v1/graphql` |

## Entities

| Entity | Used for |
| - | - |
| `Account` | Score, counters, outstanding balance, card top-ups on hold, lifetime totals |
| `Activity` | One row per event for an account: the history screen |
| `Cycle` | Each borrowing cycle with dates, peak, repayments and outcome: the public record |
| `ScoreChange` | Every score the contract reported, with the reason |
| `DailyTopUp` | Top-ups per UTC day, relayer and direct apart, plus reversals: reconciliation |
| `Pool` | Line-wide totals: outstanding, drawn, repaid, written off, lender flows |

Scores come from the contract's own events and are never recomputed. **Limits are not stored**, because collateral yield moves them without an event: read `limitOf` for a live figure.

## Queries

<CodeGroup>
  ```graphql History theme={null}
  {
    Activity(
      where: { account_id: { _eq: "0x…" } }
      order_by: { timestamp: desc }
    ) { kind amount counterparty method timestamp txHash }
  }
  ```

  ```graphql Public record theme={null}
  {
    Account_by_pk(id: "0x…") {
      score cycleCount repayCount defaulted
      cycles(order_by: { number: asc }) { number outcome openedAt closedAt peakDrawn }
    }
  }
  ```

  ```graphql Reconciliation theme={null}
  { DailyTopUp_by_pk(id: "2026-10-04") { relayerAssets relayerCount reversedShares } }
  ```
</CodeGroup>

Most apps never query it directly: `GET /me/activity` and `GET /verify/{wallet}` wrap it, and keep working with `indexer: "unavailable"` if it is down.

## Health

A scheduled check compares the indexer with the chain head and opens a GitHub issue if it falls more than 1,500 blocks (about ten minutes) behind. GitHub runs it every few hours rather than on its 30-minute schedule, so check `_meta` by hand before a demo. A self-hosted fallback is ready if the hosted one fails.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.