@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.
190 lines (188 loc) • 6.24 kB
TypeScript
import { z } from 'zod';
import { BaseHederaTransactionTool, BaseHederaTransactionToolParams } from '../common/base-hedera-transaction-tool';
import { BaseServiceBuilder } from '../../../builders/base-service-builder';
declare const TransferTokensZodObjectSchema: z.ZodObject<{
tokenTransfers: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"fungible">;
tokenId: z.ZodString;
accountId: z.ZodString;
amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
}, {
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"nft">;
tokenId: z.ZodString;
serial: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
senderAccountId: z.ZodString;
receiverAccountId: z.ZodString;
isApproved: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
}, {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
}>]>, "many">;
hbarTransfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
accountId: z.ZodString;
amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
amount: string | number;
accountId: string;
}, {
amount: string | number;
accountId: string;
}>, "many">>;
memo: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
tokenTransfers: ({
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
} | {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
})[];
memo?: string | undefined;
hbarTransfers?: {
amount: string | number;
accountId: string;
}[] | undefined;
}, {
tokenTransfers: ({
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
} | {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
})[];
memo?: string | undefined;
hbarTransfers?: {
amount: string | number;
accountId: string;
}[] | undefined;
}>;
export declare class HederaTransferTokensTool extends BaseHederaTransactionTool<typeof TransferTokensZodObjectSchema> {
name: string;
description: string;
specificInputSchema: z.ZodObject<{
tokenTransfers: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"fungible">;
tokenId: z.ZodString;
accountId: z.ZodString;
amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
}, {
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"nft">;
tokenId: z.ZodString;
serial: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
senderAccountId: z.ZodString;
receiverAccountId: z.ZodString;
isApproved: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
}, {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
}>]>, "many">;
hbarTransfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
accountId: z.ZodString;
amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
amount: string | number;
accountId: string;
}, {
amount: string | number;
accountId: string;
}>, "many">>;
memo: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
tokenTransfers: ({
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
} | {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
})[];
memo?: string | undefined;
hbarTransfers?: {
amount: string | number;
accountId: string;
}[] | undefined;
}, {
tokenTransfers: ({
type: "fungible";
amount: string | number;
accountId: string;
tokenId: string;
} | {
type: "nft";
tokenId: string;
senderAccountId: string;
serial: string | number;
receiverAccountId: string;
isApproved?: boolean | undefined;
})[];
memo?: string | undefined;
hbarTransfers?: {
amount: string | number;
accountId: string;
}[] | undefined;
}>;
namespace: string;
constructor(params: BaseHederaTransactionToolParams);
protected getServiceBuilder(): BaseServiceBuilder;
protected callBuilderMethod(builder: BaseServiceBuilder, specificArgs: z.infer<typeof TransferTokensZodObjectSchema>): Promise<void>;
}
export {};