/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet } from "../../funcs/transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations .ListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGetRequest$inboundSchema, }; export const tool$transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet: ToolDefinition = { name: "transactions-list-v2", description: `Original tool name: transactions-list-transactions-api-v2-ledgers-ledger-canister-id-transactions-get List transactions 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).`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await transactionsListTransactionsApiV2LedgersLedgerCanisterIdTransactionsGet( 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); }, };