@hashgraphonline/conversational-agent
Version:
Hashgraph Online conversational AI agent implementing HCS-10 communication, HCS-2 registries, and content inscription on Hedera
80 lines (78 loc) • 2.75 kB
TypeScript
import { z } from 'zod';
import { BaseHederaTransactionTool, BaseServiceBuilder } from 'hedera-agent-kit';
declare const TransferHbarZodSchemaCore: z.ZodObject<{
transfers: z.ZodArray<z.ZodObject<{
accountId: z.ZodString;
amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
accountId: string;
amount: string | number;
}, {
accountId: string;
amount: string | number;
}>, "many">;
memo: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
transfers: {
accountId: string;
amount: string | number;
}[];
memo?: string | undefined;
}, {
transfers: {
accountId: string;
amount: string | number;
}[];
memo?: string | undefined;
}>;
/**
* A Hedera transaction tool for transferring HBAR between accounts.
* Supports single and multi-party transfers with automatic balance validation.
* Extends BaseHederaTransactionTool to handle HBAR transfer transactions on the Hedera Hashgraph.
*/
export declare class TransferHbarTool extends BaseHederaTransactionTool<typeof TransferHbarZodSchemaCore> {
name: string;
description: string;
specificInputSchema: z.ZodObject<{
transfers: z.ZodArray<z.ZodObject<{
accountId: z.ZodString;
amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
accountId: string;
amount: string | number;
}, {
accountId: string;
amount: string | number;
}>, "many">;
memo: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
transfers: {
accountId: string;
amount: string | number;
}[];
memo?: string | undefined;
}, {
transfers: {
accountId: string;
amount: string | number;
}[];
memo?: string | undefined;
}>;
namespace: string;
/**
* Creates and returns the service builder for account operations.
*
* @returns BaseServiceBuilder instance configured for account operations
*/
protected getServiceBuilder(): BaseServiceBuilder;
/**
* Executes the HBAR transfer using the provided builder and arguments.
* Validates that all transfers sum to zero before execution.
*
* @param builder - The service builder instance for executing transactions
* @param specificArgs - The validated transfer parameters including transfers array and optional memo
* @returns Promise that resolves when the transfer is complete
*/
protected callBuilderMethod(builder: BaseServiceBuilder, specificArgs: z.infer<typeof TransferHbarZodSchemaCore>): Promise<void>;
}
export {};