UNPKG

@hashgraphonline/standards-agent-kit

Version:

A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication. https://hol.org

74 lines (73 loc) 3.23 kB
import { BaseHederaTransactionTool, BaseHederaQueryTool, BaseServiceBuilder } from 'hedera-agent-kit'; import { InscriberBuilder } from '../../builders/inscriber/inscriber-builder'; import { InscriberTransactionToolParams, InscriberQueryToolParams } from './inscriber-tool-params'; import { ContentResolverInterface } from '../../types/content-resolver'; import { InscriptionInput, InscriptionOptions, QuoteResult } from '@hashgraphonline/standards-sdk'; import { z } from 'zod'; /** * Event emitted when an entity is created during inscription */ export interface EntityCreationEvent { entityId: string; entityName: string; entityType: string; transactionId?: string; } /** * Base class for Inscriber transaction tools */ export declare abstract class BaseInscriberTransactionTool<T extends z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny> = z.ZodObject<z.ZodRawShape>> extends BaseHederaTransactionTool<T> { protected inscriberBuilder: InscriberBuilder; protected contentResolver: ContentResolverInterface | null; protected onEntityCreated?: (event: EntityCreationEvent) => void; namespace: "inscriber"; constructor(params: InscriberTransactionToolParams); /** * Override to return the InscriberBuilder */ protected getServiceBuilder(): BaseServiceBuilder; /** * Get content resolver with fallback to registry */ protected getContentResolver(): ContentResolverInterface | null; /** * Set entity creation handler for automatic entity storage */ setEntityCreationHandler(handler: (event: EntityCreationEvent) => void): void; /** * Generate a quote for an inscription without executing it * @param input - The inscription input data * @param options - Inscription options * @returns Promise containing the quote result */ protected generateInscriptionQuote(input: InscriptionInput, options: InscriptionOptions): Promise<QuoteResult>; } /** * Base class for Inscriber query tools */ export declare abstract class BaseInscriberQueryTool<T extends z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny> = z.ZodObject<z.ZodRawShape>> extends BaseHederaQueryTool<T> { protected inscriberBuilder: InscriberBuilder; protected contentResolver: ContentResolverInterface | null; protected onEntityCreated?: (event: EntityCreationEvent) => void; namespace: "inscriber"; constructor(params: InscriberQueryToolParams); /** * Override to return the InscriberBuilder */ protected getServiceBuilder(): BaseServiceBuilder; /** * Get content resolver with fallback to registry */ protected getContentResolver(): ContentResolverInterface | null; /** * Set entity creation handler for automatic entity storage */ setEntityCreationHandler(handler: (event: EntityCreationEvent) => void): void; /** * Generate a quote for an inscription without executing it * @param input - The inscription input data * @param options - Inscription options * @returns Promise containing the quote result */ protected generateInscriptionQuote(input: InscriptionInput, options: InscriptionOptions): Promise<QuoteResult>; }