UNPKG

@hashgraphonline/standards-agent-kit

Version:

A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication. https://hol.org

46 lines (45 loc) 1.59 kB
import { z } from "zod"; import { BaseInscriberQueryTool } from "./standards-agent-kit.es35.js"; const retrieveInscriptionSchema = z.object({ transactionId: z.string().describe("The transaction ID of the inscription to retrieve"), apiKey: z.string().optional().describe("API key for inscription service") }); class RetrieveInscriptionTool extends BaseInscriberQueryTool { constructor() { super(...arguments); this.name = "retrieveInscription"; this.description = "Retrieve details of an existing inscription from the Hedera network"; } get specificInputSchema() { return retrieveInscriptionSchema; } async executeQuery(params, _runManager) { const result = await this.inscriberBuilder.retrieveInscription( params.transactionId, { apiKey: params.apiKey, network: this.inscriberBuilder["hederaKit"].client.network.toString().includes("mainnet") ? "mainnet" : "testnet" } ); return { inscriptionId: result.inscriptionId, transactionId: result.transactionId || "unknown", topicId: result.topic_id || result.topicId, status: result.status || "unknown", holderId: result.holderId, metadata: result.metadata, tags: result.tags, mode: result.mode, chunks: result.chunks, createdAt: result.createdAt, completedAt: result.completed || result.completedAt, fileUrl: result.fileUrl, mimeType: result.mimeType, fileSize: result.fileSize }; } } export { RetrieveInscriptionTool }; //# sourceMappingURL=standards-agent-kit.es40.js.map