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.

31 lines (30 loc) 874 B
import { z } from "zod"; import { BaseHederaQueryTool } from "./index20.js"; const GetNetworkInfoZodSchema = z.object({}); class HederaGetNetworkInfoTool extends BaseHederaQueryTool { constructor(params) { super(params); this.name = "hedera-get-network-info"; this.description = "Retrieves network information from the Hedera network."; this.specificInputSchema = GetNetworkInfoZodSchema; this.namespace = "network"; } async executeQuery() { this.logger.info("Getting network information"); const networkInfo = await this.hederaKit.query().getNetworkInfo(); if (networkInfo === null) { return { success: false, error: "Could not retrieve network information" }; } return { success: true, networkInfo }; } } export { HederaGetNetworkInfoTool }; //# sourceMappingURL=index85.js.map