UNPKG

@hashgraphonline/standards-sdk

Version:

The Hashgraph Online Standards SDK provides a complete implementation of the Hashgraph Consensus Standards (HCS), giving developers all the tools needed to build applications on Hedera.

103 lines 4.3 kB
import { AccountId, Client } from '@hashgraph/sdk'; import { TopicInfo } from '../services/types'; import { AIAgentType, AIAgentCapability, SocialLink, PersonalProfile, AIAgentProfile, HCS11Profile, HCS11ClientConfig, TransactionResult, InscribeProfileResponse, InscribeImageResponse, AgentMetadata, InscribeImageOptions, InscribeProfileOptions, MCPServerDetails, MCPServerProfile } from './types'; export declare class HCS11Client { private client; private auth; private network; private logger; private mirrorNode; private keyType; private operatorId; constructor(config: HCS11ClientConfig); getClient(): Client; getOperatorId(): string; initializeOperator(): Promise<void>; private initializeOperatorWithKeyType; createPersonalProfile(displayName: string, options?: { alias?: string; bio?: string; socials?: SocialLink[]; profileImage?: string; language?: string; timezone?: string; properties?: Record<string, any>; inboundTopicId?: string; outboundTopicId?: string; }): PersonalProfile; createAIAgentProfile(displayName: string, agentType: AIAgentType, capabilities: AIAgentCapability[], model: string, options?: { alias?: string; bio?: string; socials?: SocialLink[]; profileImage?: string; properties?: Record<string, any>; inboundTopicId?: string; outboundTopicId?: string; creator?: string; }): AIAgentProfile; /** * Creates an MCP server profile. * * @param displayName - The display name for the MCP server * @param serverDetails - The MCP server details * @param options - Additional profile options * @returns An MCPServerProfile object */ createMCPServerProfile(displayName: string, serverDetails: MCPServerDetails, options?: { alias?: string; bio?: string; socials?: SocialLink[]; profileImage?: string; properties?: Record<string, any>; inboundTopicId?: string; outboundTopicId?: string; }): MCPServerProfile; validateProfile(profile: unknown): { valid: boolean; errors: string[]; }; profileToJSONString(profile: HCS11Profile): string; parseProfileFromString(profileStr: string): HCS11Profile | null; setProfileForAccountMemo(topicId: string, topicStandard?: 1 | 2 | 7): string; private executeTransaction; inscribeImage(buffer: Buffer, fileName: string, options?: InscribeImageOptions): Promise<InscribeImageResponse>; inscribeProfile(profile: HCS11Profile, options?: InscribeProfileOptions): Promise<InscribeProfileResponse>; updateAccountMemoWithProfile(accountId: string | AccountId, profileTopicId: string): Promise<TransactionResult>; /** * Creates and inscribes a profile. * * @param profile - The profile to create and inscribe. * @param updateAccountMemo - Whether to update the account memo with the profile. * @param options - Optional configuration options. * @returns A promise that resolves to the inscription result. */ createAndInscribeProfile(profile: HCS11Profile, updateAccountMemo?: boolean, options?: InscribeProfileOptions): Promise<InscribeProfileResponse>; /** * Gets the capabilities from the capability names. * * @param capabilityNames - The capability names to get the capabilities for. * @returns The capabilities. */ getCapabilitiesFromTags(capabilityNames: string[]): Promise<number[]>; /** * Gets the agent type from the metadata. * * @param metadata - The metadata of the agent. * @returns The agent type. */ getAgentTypeFromMetadata(metadata: AgentMetadata): AIAgentType; /** * Fetches a profile from the account memo. * * @param accountId - The account ID of the agent to fetch the profile for. * @param network - The network to use for the fetch. * @returns A promise that resolves to the profile. */ fetchProfileByAccountId(accountId: string | AccountId, network?: string): Promise<{ success: boolean; profile?: HCS11Profile; error?: string; topicInfo?: TopicInfo; }>; } //# sourceMappingURL=client.d.ts.map