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

52 lines (51 loc) 2.07 kB
import { BaseServiceBuilder, HederaAgentKit } from 'hedera-agent-kit'; import { HCS2Client, CreateRegistryOptions, RegisterEntryOptions, UpdateEntryOptions, DeleteEntryOptions, MigrateTopicOptions, QueryRegistryOptions, TopicRegistry } from '@hashgraphonline/standards-sdk'; import { TopicRegistrationResult, RegistryOperationResult, SubmitMessageResult } from '../../types/tx-results'; /** * Builder for HCS-2 operations that delegates to HCS2Client */ export declare class HCS2Builder extends BaseServiceBuilder { protected hcs2Client?: HCS2Client; constructor(hederaKit: HederaAgentKit); /** * Get or create HCS-2 client */ protected getHCS2Client(): Promise<HCS2Client>; /** * Create a new HCS-2 registry * Note: This executes the transaction directly via HCS2Client */ createRegistry(options?: CreateRegistryOptions): Promise<TopicRegistrationResult>; /** * Register a new entry in an HCS-2 registry */ registerEntry(registryTopicId: string, options: RegisterEntryOptions): Promise<RegistryOperationResult>; /** * Update an existing entry in an HCS-2 registry */ updateEntry(registryTopicId: string, options: UpdateEntryOptions): Promise<RegistryOperationResult>; /** * Delete an entry from an HCS-2 registry */ deleteEntry(registryTopicId: string, options: DeleteEntryOptions): Promise<RegistryOperationResult>; /** * Migrate an HCS-2 registry to a new topic */ migrateRegistry(registryTopicId: string, options: MigrateTopicOptions): Promise<RegistryOperationResult>; /** * Query entries from an HCS-2 registry */ getRegistry(topicId: string, options?: QueryRegistryOptions): Promise<TopicRegistry>; /** * Submit a raw message to an HCS-2 topic */ submitMessage(topicId: string, payload: any): Promise<SubmitMessageResult>; /** * Get topic info from mirror node */ getTopicInfo(topicId: string): Promise<any>; /** * Close the HCS-2 client */ close(): Promise<void>; }