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.

51 lines (50 loc) 2 kB
import { BaseServiceBuilder, HederaAgentKit } from 'hedera-agent-kit'; import { HCS2Client, CreateRegistryOptions, RegisterEntryOptions, UpdateEntryOptions, DeleteEntryOptions, MigrateTopicOptions, QueryRegistryOptions, TopicRegistrationResponse, RegistryOperationResponse, TopicRegistry } from '@hashgraphonline/standards-sdk'; /** * 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<TopicRegistrationResponse>; /** * Register a new entry in an HCS-2 registry */ registerEntry(registryTopicId: string, options: RegisterEntryOptions): Promise<RegistryOperationResponse>; /** * Update an existing entry in an HCS-2 registry */ updateEntry(registryTopicId: string, options: UpdateEntryOptions): Promise<RegistryOperationResponse>; /** * Delete an entry from an HCS-2 registry */ deleteEntry(registryTopicId: string, options: DeleteEntryOptions): Promise<RegistryOperationResponse>; /** * Migrate an HCS-2 registry to a new topic */ migrateRegistry(registryTopicId: string, options: MigrateTopicOptions): Promise<RegistryOperationResponse>; /** * 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<any>; /** * Get topic info from mirror node */ getTopicInfo(topicId: string): Promise<any>; /** * Close the HCS-2 client */ close(): Promise<void>; }