/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountsListAccountsApiV2LedgersLedgerCanisterIdAccountsGet } from "../../funcs/accountsListAccountsApiV2LedgersLedgerCanisterIdAccountsGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations .ListAccountsApiV2LedgersLedgerCanisterIdAccountsGetRequest$inboundSchema, }; export const tool$accountsListAccountsApiV2LedgersLedgerCanisterIdAccountsGet: ToolDefinition = { name: "accounts-list-v2", description: `Original tool name: accounts-list-accounts-api-v2-ledgers-ledger-canister-id-accounts-get List accounts ### How is data retrieved for this endpoint? Values from the endpoint are created by the retrieved transactions from the ledger canister. As transactions come in, the API updates the account information and balances in the database.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await accountsListAccountsApiV2LedgersLedgerCanisterIdAccountsGet( 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); }, };