/** Reads the operation name out of a GraphQL document, for the error message. */ export declare function operationNameOf(query: string): string; /** * POSTs a GraphQL request and returns its `data`, throwing {@link IndexerError} * on any failure to complete. * * **Details** * * - `endpoint`: Absolute URL of the GraphQL endpoint. * - `query`: The document text (its operation name is used in errors). * - `variables`: Variables for the document. * - `options`: `headers` merged into the request; `timeoutMs` bounds it; `signal` cancels it (combined with `timeoutMs` — whichever fires first wins); `label` overrides the operation name in error messages (use it when the endpoint is not the main indexer, e.g. `"price-feed getCandles"`). * - Returns: The response's `data` payload. * * **Gotchas** * * - Throws {@link IndexerError} — the request failed, returned a non-2xx, replied with a GraphQL `errors` payload, or carried no `data`. The underlying failure is in `cause`, and the server's own wording is preserved in the message (some callers branch on it — see `aggregateCount`'s missing-`_aggregate` fallback). * - Throws The caller's own abort reason, re-thrown UNWRAPPED when `signal` is what ended the request — a cancellation is not an indexer failure, and code that checks `err.name === "AbortError"` (or compares against its own `controller.signal.reason`) must still see it. A `timeoutMs` expiry is a failure and stays an {@link IndexerError}. */ export declare function postGraphql(endpoint: string, query: string, variables: Record, options?: { headers?: Record; timeoutMs?: number; signal?: AbortSignal; label?: string; }): Promise;