/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ledgersCountLedgersApiV2LedgersCountGet } from "../funcs/ledgersCountLedgersApiV2LedgersCountGet.js"; import { ledgersListApiV1LedgersGet } from "../funcs/ledgersListApiV1LedgersGet.js"; import { ledgersListApiV2LedgersGet } from "../funcs/ledgersListApiV2LedgersGet.js"; import { ledgersRetrieveApiV1LedgersLedgerCanisterIdGet } from "../funcs/ledgersRetrieveApiV1LedgersLedgerCanisterIdGet.js"; import { ledgersRetrieveApiV2LedgersLedgerCanisterIdGet } from "../funcs/ledgersRetrieveApiV2LedgersLedgerCanisterIdGet.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 Ledgers extends ClientSDK { /** * List ledgers * * @remarks * ### How is the data for this endpoint gathered? * * Ledgers belonging to an SNS are automatically detected by looking at the SNS-WASM canister. * Ledgers such as the ckBTC are currently added manually. */ async listApiV1LedgersGet( request?: operations.ListApiV1LedgersGetRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(ledgersListApiV1LedgersGet( this, request, options, )); } /** * Get ledger * * @remarks * ### How is the data for this endpoint gathered? * * Ledgers belonging to an SNS are automatically detected by looking at the SNS-WASM canister. * Ledgers such as the ckBTC are currently added manually. */ async retrieveApiV1LedgersLedgerCanisterIdGet( request: operations.RetrieveApiV1LedgersLedgerCanisterIdGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(ledgersRetrieveApiV1LedgersLedgerCanisterIdGet( this, request, options, )); } /** * List ledgers * * @remarks * ### How is the data for this endpoint gathered? * * Ledgers belonging to an SNS are automatically detected by looking at the SNS-WASM canister. * Ledgers such as the ckBTC are currently added manually. */ async listApiV2LedgersGet( request?: operations.ListApiV2LedgersGetRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(ledgersListApiV2LedgersGet( this, request, options, )); } /** * Count ledgers */ async countLedgersApiV2LedgersCountGet( request?: operations.CountLedgersApiV2LedgersCountGetRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(ledgersCountLedgersApiV2LedgersCountGet( this, request, options, )); } /** * Get ledger */ async retrieveApiV2LedgersLedgerCanisterIdGet( request: operations.RetrieveApiV2LedgersLedgerCanisterIdGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(ledgersRetrieveApiV2LedgersLedgerCanisterIdGet( this, request, options, )); } }