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.

33 lines (32 loc) 1.11 kB
import { z } from "zod"; import { BaseHederaTransactionTool } from "./index19.js"; const CreateFileZodSchemaCore = z.object({ contents: z.string().describe( "File contents. For binary data, provide as base64 encoded string. Builder handles decoding." ), keys: z.array(z.string()).optional().describe( "Optional. Array of serialized key strings (e.g., private key hex, public key hex/DER) that can modify/delete the file. Builder handles parsing." ), memo: z.string().optional().describe("Optional. Memo for the file.") }); class HederaCreateFileTool extends BaseHederaTransactionTool { constructor(params) { super(params); this.name = "hedera-file-create"; this.description = "Creates a new file. Builder handles content decoding and key parsing."; this.specificInputSchema = CreateFileZodSchemaCore; this.namespace = "file"; } getServiceBuilder() { return this.hederaKit.fs(); } async callBuilderMethod(builder, specificArgs) { await builder.createFile( specificArgs ); } } export { HederaCreateFileTool }; //# sourceMappingURL=index67.js.map