UNPKG

@hashgraphonline/hedera-agent-kit

Version:

Build LLM-powered applications that interact with the Hedera Network. Create conversational agents that can understand user requests in natural language and execute Hedera transactions, or build backend systems that leverage AI for on-chain operations.

32 lines (31 loc) 1.17 kB
import { z } from "zod"; import { BaseHederaTransactionTool } from "./index19.js"; const AppendFileZodSchemaCore = z.object({ fileId: z.string().describe('The ID of the file to append to (e.g., "0.0.xxxx").'), contents: z.string().describe( "Content to append. For binary, use base64 string. Builder handles decoding & chunking." ), maxChunks: z.number().int().positive().optional().describe( "Optional. Max chunks for large content. Builder handles default." ), chunkSize: z.number().int().positive().optional().describe("Optional. Chunk size in bytes. Builder handles default.") }); class HederaAppendFileTool extends BaseHederaTransactionTool { constructor(params) { super(params); this.name = "hedera-file-append"; this.description = "Appends content to a file. Builder handles content decoding and chunking."; this.specificInputSchema = AppendFileZodSchemaCore; this.namespace = "file"; } getServiceBuilder() { return this.hederaKit.fs(); } async callBuilderMethod(builder, specificArgs) { await builder.appendFile(specificArgs); } } export { HederaAppendFileTool }; //# sourceMappingURL=index68.js.map