Skip to content

Commit 03fde5a

Browse files
authored
docs(graphql): add docs for escrow account query (#403)
1 parent 3dbf12a commit 03fde5a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

graphql/escrow_account.query.graphql

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# EscrowAccountQuery
2+
#
3+
# This query is used to retrieve escrow account information related to The Graph's Indexer
4+
# TAP (Token Allocation Program) payment system.
5+
#
6+
# Input Variables:
7+
# - $indexer (ID!): The unique ID of the Indexer whose escrow accounts are being queried.
8+
# - $thawEndTimestamp (BigInt!): A timestamp used to filter signers whose thaw period has ended or is about to end.
9+
#
10+
# Query Logic:
11+
# - Fetches escrow accounts where the `receiver` is the provided $indexer.
12+
# - Returns the following information for each escrow account:
13+
# - `balance`: The current balance of the escrow account.
14+
# - `totalAmountThawing`: The total amount currently thawing in the escrow.
15+
# - Retrieves the sender of the funds and filters the sender's `signers` based on the following:
16+
# - `thawEndTimestamp_lte`: Only includes signers whose thaw end timestamp is less than or equal to the provided $thawEndTimestamp.
17+
# - `isAuthorized: true`: Only includes signers that are authorized.
18+
#
19+
# Example Use Case:
20+
# This query helps Indexers track escrow payments, including which funds are in the process of
21+
# thawing and which signers are eligible to authorize transactions based on thaw end timestamps.
22+
123
query EscrowAccountQuery($indexer: ID!, $thawEndTimestamp: BigInt!) {
224
escrowAccounts(where: { receiver_: { id: $indexer } }) {
325
balance

0 commit comments

Comments
 (0)