/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { blocksGetTansactionApiV1LedgersLedgerCanisterIdBlocksBlockHashGet } from "../funcs/blocksGetTansactionApiV1LedgersLedgerCanisterIdBlocksBlockHashGet.js"; import { blocksListBlocksApiV1LedgersLedgerCanisterIdBlocksGet } from "../funcs/blocksListBlocksApiV1LedgersLedgerCanisterIdBlocksGet.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Blocks extends ClientSDK { /** * List blocks * * @remarks * This endpoint returns blocks, the total blocks, and the max * block index. The max block index is used to keep track of the * location in the dataset for pagination purposes. * * ### How is data retrieved for this endpoint? * * Values from the endpoint are retrieved by scraping the blocks from the * ledger canister (and associated archive canisters). */ async listBlocksApiV1LedgersLedgerCanisterIdBlocksGet( request: operations.ListBlocksApiV1LedgersLedgerCanisterIdBlocksGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(blocksListBlocksApiV1LedgersLedgerCanisterIdBlocksGet( this, request, options, )); } /** * Get block * * @remarks * ### How is data retrieved for this endpoint? * * Values from the endpoint are retrieved by scraping the blocks from the * ledger canister (and associated archive canisters). */ async getTansactionApiV1LedgersLedgerCanisterIdBlocksBlockHashGet( request: operations.GetTansactionApiV1LedgersLedgerCanisterIdBlocksBlockHashGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync( blocksGetTansactionApiV1LedgersLedgerCanisterIdBlocksBlockHashGet( this, request, options, ), ); } }