> For the complete documentation index, see [llms.txt](https://docs.trustlesswork.com/trustless-work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trustlesswork.com/trustless-work/v2-en/escrow-react-sdk/escrow-information.md).

# Escrow Information

## REST Reads

Typed helpers for Core **`GET /escrows*`**. Pair each hook with TanStack Query (or your own cache).

Import from `@trustless-work/escrow`, `@trustless-work/escrow/hooks`, or `@trustless-work/escrow/hooks/rest`.

#### Hooks

| Hook                      | Endpoint                               |
| ------------------------- | -------------------------------------- |
| `useListEscrows`          | `GET /escrows`                         |
| `useGetEscrow`            | `GET /escrows/:contractId`             |
| `useGetEscrowDetails`     | `GET /escrows/details?contractIds=`    |
| `useListEscrowEvents`     | `GET /escrows/:contractId/events`      |
| `useGetEscrowMilestones`  | `GET /escrows/:contractId/milestones`  |
| `useGetEscrowsMilestones` | `GET /escrows/milestones?contractIds=` |
| `useGetEscrowsFinancial`  | `GET /escrows/financial?contractIds=`  |

{% hint style="info" %}
Legacy indexer helpers (`useGetEscrowsFromIndexerBy*`, `useGetMultipleEscrowBalances`, …) were **removed** in v5. Use these REST (or GraphQL) hooks instead.
{% endhint %}

#### Quick example

```tsx
import { useListEscrows, useGetEscrow } from "@trustless-work/escrow/hooks/rest";
import { useQuery } from "@tanstack/react-query";

const { listEscrows } = useListEscrows();
const { getEscrow } = useGetEscrow();

useQuery({
  queryKey: ["escrows", "mine"],
  queryFn: () => listEscrows({ scope: "mine", limit: 20 }),
});

useQuery({
  queryKey: ["escrow", contractId],
  queryFn: () => getEscrow(contractId),
  enabled: !!contractId,
});
```

#### Filters & pagination

`ListEscrowsParams`: `scope`, `status`, `contractType`, `engagementId`, `contractIds`, `participant`, `role`, `platformId`, `subjectId`, `createdAfter`, `createdBefore`, `limit`, `cursor`, `sort`, `order`.

* Use `scope: "mine" | "all"` for segmentation (not per-escrow access grants).
* List/events return a **keyset page**: `{ data, hasMore, nextCursor }`.

#### Read-model shapes

| Type              | Notes                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------ |
| `EscrowSummary`   | List/detail row: `contractId`, `type`, `status`, `balance`, `asset`, camelCased `snapshot` |
| `EscrowDetail`    | `{ escrow, events, deposits }`                                                             |
| `EscrowFinancial` | Batch financial: deposited / released / pending / `balance`                                |
| `EscrowEvent`     | Indexed event — no UUID event `id`                                                         |
| `EscrowDeposit`   | Deposit row — no UUID deposit `id`                                                         |

Amounts on reads are **human decimal strings**. Prefer GraphQL when you need nested financial + deposits + events in one call — see GraphQL.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/escrow-react-sdk/escrow-information.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
