/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { imagesGetLedgerTransactionsImageApiV1ImagesLedgersLedgerCanisterIdTransactionsPngGet, } from "../../funcs/imagesGetLedgerTransactionsImageApiV1ImagesLedgersLedgerCanisterIdTransactionsPngGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations .GetLedgerTransactionsImageApiV1ImagesLedgersLedgerCanisterIdTransactionsPngGetRequest$inboundSchema, }; export const tool$imagesGetLedgerTransactionsImageApiV1ImagesLedgersLedgerCanisterIdTransactionsPngGet: ToolDefinition = { name: "ledger-tx-image-v1", description: `Get open graph image for ICRC ledger transactions Original tool name: image-api-v1-images-ledgers-ledger-canister-id-transactions-png-get ### 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.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await imagesGetLedgerTransactionsImageApiV1ImagesLedgersLedgerCanisterIdTransactionsPngGet( 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); }, };