@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) • 958 B
JavaScript
import { z } from "zod";
import { BaseHederaQueryTool } from "./index20.js";
const GetNetworkFeesZodSchema = z.object({
timestamp: z.string().optional().describe("Optional timestamp for historical fees")
});
class HederaGetNetworkFeesTool extends BaseHederaQueryTool {
constructor(params) {
super(params);
this.name = "hedera-get-network-fees";
this.description = "Retrieves network fees from the Hedera network.";
this.specificInputSchema = GetNetworkFeesZodSchema;
this.namespace = "network";
}
async executeQuery(args) {
this.logger.info("Getting network fees");
const networkFees = await this.hederaKit.query().getNetworkFees(args.timestamp);
if (networkFees === null) {
return {
success: false,
error: "Could not retrieve network fees"
};
}
return {
success: true,
networkFees
};
}
}
export {
HederaGetNetworkFeesTool
};
//# sourceMappingURL=index86.js.map