/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet } from "../../funcs/transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations .ListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGetRequest$inboundSchema, }; export const tool$transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet: ToolDefinition = { name: "transactions-list-v1", description: `Original tool name: transactions-list-transactions-api-v1-ledgers-ledger-canister-id-transactions-get List transactions 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).`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await transactionsListTransactionsApiV1LedgersLedgerCanisterIdTransactionsGet( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };