Indexer
REST Reads
Hooks
Hook
Endpoint
Quick example
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
Read-model shapes
Type
Notes