/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { transactionsCountTransactionsApiV2LedgersLedgerCanisterIdTransactionsCountGet } from "../funcs/transactionsCountTransactionsApiV2LedgersLedgerCanisterIdTransactionsCountGet.js"; import { transactionsGetTansactionApiV1LedgersLedgerCanisterIdTransactionsIndexGet } from "../funcs/transactionsGetTansactionApiV1LedgersLedgerCanisterIdTransactionsIndexGet.js"; import { transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet } from "../funcs/transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet.js"; import { transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet } from "../funcs/transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet.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 Transactions extends ClientSDK { /** * List transactions * * @remarks * This endpoint returns transactions, the total transactions, and the max * transaction index. The max transaction 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 transactions from the * ledger canister (and associated archive canisters). */ async listTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet( request: operations.ListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync( transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet( this, request, options, ), ); } /** * Get transaction * * @remarks * ### How is data retrieved for this endpoint? * * Values from the endpoint are retrieved by scraping the transactions from the * ledger canister (and associated archive canisters). */ async getTansactionApiV1LedgersLedgerCanisterIdTransactionsIndexGet( request: operations.GetTansactionApiV1LedgersLedgerCanisterIdTransactionsIndexGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync( transactionsGetTansactionApiV1LedgersLedgerCanisterIdTransactionsIndexGet( this, request, options, ), ); } /** * List transactions * * @remarks * This endpoint returns a list of all transactions matching the given criteria. * It also returns a "next_cursor" and "previous_cursor" if there are more pages * of results * * ### How is data retrieved for this endpoint? * * Values from the endpoint are retrieved by scraping the transactions from the * ledger canister (and associated archive canisters). */ async listTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet( request: operations.ListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync( transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet( this, request, options, ), ); } /** * Get the total count of transactions matching the given criteria * * @remarks * This endpoint returns the total count of transactions matching the given criteria. */ async countTransactionsApiV2LedgersLedgerCanisterIdTransactionsCountGet( request: operations.CountTransactionsApiV2LedgersLedgerCanisterIdTransactionsCountGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync( transactionsCountTransactionsApiV2LedgersLedgerCanisterIdTransactionsCountGet( this, request, options, ), ); } }