/** * Variant accessors for `/blocks`. The chifra blocks endpoint is * polymorphic — depending on which boolean flag is set on the * request, it returns a different shape from a 10-type union. This * module wraps the base endpoint with one method per flag, each * with a concrete (non-union) return type, mirroring the Go SDK's * `BlocksOptions.Blocks*()` family. * * Base call (no variant) preserves the polymorphic union — useful * when the caller is constructing flag combos at runtime. */ import type { RequestFn } from '../client.js'; import type { components } from '../generated.js'; import { type Query, type VerbFn } from '../verbs.js'; type BlocksQuery = Query<'/blocks'>; /** Envelope shape mirroring the OpenAPI `200 application/json` body. */ type Envelope = { data?: T[]; }; export interface BlocksVerb extends VerbFn<'/blocks'> { /** * `GET /blocks?hashes=true` — returns lightweight blocks with * transaction hashes only (no full transaction bodies). */ hashes: (query: Omit) => Promise>; /** * `GET /blocks?uncles=true` — returns uncle blocks (if any) for * the requested block instead of the canonical block. */ uncles: (query: Omit) => Promise>; /** * `GET /blocks?traces=true` — returns the execution traces * generated within the requested block(s). */ traces: (query: Omit) => Promise>; /** * `GET /blocks?uniq=true` — returns the unique address * appearances within the requested block(s). */ uniq: (query: Omit) => Promise>; /** * `GET /blocks?logs=true` — returns the event logs emitted within * the requested block(s). */ logs: (query: Omit) => Promise>; /** * `GET /blocks?withdrawals=true` — returns the post-Shanghai * staking withdrawals contained in the requested block(s). */ withdrawals: (query: Omit) => Promise>; /** * `GET /blocks?count=true` — returns counts of appearances per * block without the full appearance data. */ count: (query: Omit) => Promise>; } /** * Builds the `/blocks` verb with its variant accessors. The base * verb (callable directly) returns the OpenAPI polymorphic union; * the attached methods narrow to a single response type by * preselecting the corresponding boolean flag. */ export declare function makeBlocksVerb(request: RequestFn): BlocksVerb; export {}; //# sourceMappingURL=blocks.d.ts.map