@hashgraphonline/standards-sdk 0.0.153 → 0.0.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/hcs-10/base-client.d.ts +10 -2
  2. package/dist/cjs/hcs-10/base-client.d.ts.map +1 -1
  3. package/dist/cjs/hcs-10/browser.d.ts +1 -0
  4. package/dist/cjs/hcs-10/browser.d.ts.map +1 -1
  5. package/dist/cjs/{index-DpgcvPw0.cjs → index-BiqAcECs.cjs} +6 -6
  6. package/dist/cjs/{index-DpgcvPw0.cjs.map → index-BiqAcECs.cjs.map} +1 -1
  7. package/dist/cjs/{index-CyAbgH2f-BDpwZ44m.cjs → index-CyAbgH2f-DdtH7gNZ.cjs} +2 -2
  8. package/dist/cjs/{index-CyAbgH2f-BDpwZ44m.cjs.map → index-CyAbgH2f-DdtH7gNZ.cjs.map} +1 -1
  9. package/dist/cjs/standards-sdk.cjs +1 -1
  10. package/dist/cjs/{standards-sdk.es45-BxAtDqsy-kDQD4Hay.cjs → standards-sdk.es45-BxAtDqsy-Cl6MoCrj.cjs} +2 -2
  11. package/dist/cjs/{standards-sdk.es45-BxAtDqsy-kDQD4Hay.cjs.map → standards-sdk.es45-BxAtDqsy-Cl6MoCrj.cjs.map} +1 -1
  12. package/dist/cjs/{standards-sdk.es46-BI8ACeLM-CM_82nn-.cjs → standards-sdk.es46-BI8ACeLM-BR1WD_Xw.cjs} +2 -2
  13. package/dist/cjs/{standards-sdk.es46-BI8ACeLM-CM_82nn-.cjs.map → standards-sdk.es46-BI8ACeLM-BR1WD_Xw.cjs.map} +1 -1
  14. package/dist/cjs/{standards-sdk.es47-DbkY3FlD-Bfs3OBpF.cjs → standards-sdk.es47-DbkY3FlD-BXROBhk6.cjs} +2 -2
  15. package/dist/cjs/{standards-sdk.es47-DbkY3FlD-Bfs3OBpF.cjs.map → standards-sdk.es47-DbkY3FlD-BXROBhk6.cjs.map} +1 -1
  16. package/dist/cjs/{standards-sdk.es48-DzT9Qc3F-BWFsTC4R.cjs → standards-sdk.es48-DzT9Qc3F-CUBjLzNJ.cjs} +2 -2
  17. package/dist/cjs/{standards-sdk.es48-DzT9Qc3F-BWFsTC4R.cjs.map → standards-sdk.es48-DzT9Qc3F-CUBjLzNJ.cjs.map} +1 -1
  18. package/dist/es/hcs-10/base-client.d.ts +10 -2
  19. package/dist/es/hcs-10/base-client.d.ts.map +1 -1
  20. package/dist/es/hcs-10/browser.d.ts +1 -0
  21. package/dist/es/hcs-10/browser.d.ts.map +1 -1
  22. package/dist/es/standards-sdk.es14.js +1 -1
  23. package/dist/es/standards-sdk.es14.js.map +1 -1
  24. package/dist/es/standards-sdk.es18.js +1 -1
  25. package/dist/es/standards-sdk.es30.js +6 -6
  26. package/dist/es/standards-sdk.es39.js +501 -2
  27. package/dist/es/standards-sdk.es39.js.map +1 -1
  28. package/dist/es/standards-sdk.es40.js +64 -456
  29. package/dist/es/standards-sdk.es40.js.map +1 -1
  30. package/dist/es/standards-sdk.es41.js +36 -79
  31. package/dist/es/standards-sdk.es41.js.map +1 -1
  32. package/dist/es/standards-sdk.es42.js +222 -32
  33. package/dist/es/standards-sdk.es42.js.map +1 -1
  34. package/dist/es/standards-sdk.es43.js +100 -183
  35. package/dist/es/standards-sdk.es43.js.map +1 -1
  36. package/dist/es/standards-sdk.es44.js +5 -167
  37. package/dist/es/standards-sdk.es44.js.map +1 -1
  38. package/dist/es/standards-sdk.es45.js +2 -11
  39. package/dist/es/standards-sdk.es45.js.map +1 -1
  40. package/dist/es/standards-sdk.es5.js +87 -53
  41. package/dist/es/standards-sdk.es5.js.map +1 -1
  42. package/dist/es/standards-sdk.es8.js +29 -11
  43. package/dist/es/standards-sdk.es8.js.map +1 -1
  44. package/package.json +1 -1
@@ -145,9 +145,13 @@ export declare abstract class HCS10BaseClient extends Registration {
145
145
  * Retrieves the profile for an account
146
146
  * @param accountId The account ID to retrieve the profile for
147
147
  * @param disableCache Whether to disable caching of the result
148
+ * @param retryOptions Optional retry configuration
148
149
  * @returns The profile
149
150
  */
150
- retrieveProfile(accountId: string, disableCache?: boolean): Promise<ProfileResponse>;
151
+ retrieveProfile(accountId: string, disableCache?: boolean, retryOptions?: {
152
+ maxRetries?: number;
153
+ retryDelay?: number;
154
+ }): Promise<ProfileResponse>;
151
155
  /**
152
156
  * @deprecated Use retrieveCommunicationTopics instead
153
157
  * @param accountId The account ID to retrieve the outbound connect topic for
@@ -158,9 +162,13 @@ export declare abstract class HCS10BaseClient extends Registration {
158
162
  * Retrieves the communication topics for an account
159
163
  * @param accountId The account ID to retrieve the communication topics for
160
164
  * @param disableCache Whether to disable caching of the result
165
+ * @param retryOptions Optional retry configuration
161
166
  * @returns {TopicInfo} Topic Info from target profile.
162
167
  */
163
- retrieveCommunicationTopics(accountId: string, disableCache?: boolean): Promise<TopicInfo>;
168
+ retrieveCommunicationTopics(accountId: string, disableCache?: boolean, retryOptions?: {
169
+ maxRetries?: number;
170
+ retryDelay?: number;
171
+ }): Promise<TopicInfo>;
164
172
  /**
165
173
  * Retrieves outbound messages for an agent
166
174
  * @param agentAccountId The account ID of the agent
@@ -1 +1 @@
1
- {"version":3,"file":"base-client.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/base-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAa,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,qCAAqC,EACrC,eAAe,EAChB,MAAM,SAAS,C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OAIG;IACU,gBAAgB,CAC3B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;cA+ChB,uBAAuB,CACrC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QAAE,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;KAAE,CAAC;IA0BxD;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAmCxD;;;;;OAKG;IACU,sBAAsB,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACjC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;KACxB,GACA,OAAO,CAAC,eAAe,EAAE,CAAC;IAiC7B;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI;CAsD3E;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAa;IACpC,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;IAErC,OAAO;IAKP,MAAM,CAAC,WAAW,IAAI,UAAU;IAOhC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI;IAK9C,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAY7C,KAAK,IAAI,IAAI;CAId"}
@@ -99,6 +99,7 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
99
99
  }): Promise<AgentRegistrationResult>;
100
100
  storeHCS11Profile(agentName: string, agentBio: string, inboundTopicId: string, outboundTopicId: string, capabilities?: number[], metadata?: Record<string, any>, pfpBuffer?: Buffer, pfpFileName?: string, existingPfpTopicId?: string, options?: {
101
101
  progressCallback?: RegistrationProgressCallback;
102
+ updateAccountMemo?: boolean;
102
103
  }): Promise<StoreHCS11ProfileResponse>;
103
104
  createTopic(memo: string, adminKey?: boolean, submitKey?: boolean): Promise<{
104
105
  success: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/hcs-10/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAGT,kBAAkB,EAClB,UAAU,EAGX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAc,MAAM,UAAU,CAAC;AACxD,OAAO,EAEL,0BAA0B,EAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,+BAA+B,EAC/B,4BAA4B,EAC5B,kBAAkB,EAClB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,uBAAuB,EAGxB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAMzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,uCAAuC;IACvC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,2CAA2C;IAC3C,GAAG,EAAE,yBAAyB,CAAC;IAC/B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,sBAAsB,CAAC,EAAE,MAAM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{
683
683
  if (!memo?.startsWith("hcs-11:")) {
684
684
  return {
685
685
  success: false,
686
- error: `Account ${accountId.toString()} does not have a valid HCS-11 memo`
686
+ error: `Account ${accountId.toString()} does not have a valid HCS-11 memo. Current memo: ${memo || "empty"}`
687
687
  };
688
688
  }
689
689
  this.logger.info(`Found HCS-11 memo: ${memo}`);
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es14.js","sources":["../../src/hcs-11/client.ts"],"sourcesContent":["import {\n AccountId,\n AccountUpdateTransaction,\n Client,\n PrivateKey,\n Status,\n Transaction,\n} from '@hashgraph/sdk';\nimport {\n inscribe,\n inscribeWithSigner,\n InscriptionInput,\n InscriptionOptions,\n} from '../inscribe';\nimport { Logger, detectKeyTypeFromString, getTopicId } from '../utils';\nimport * as mime from 'mime-types';\nimport { z, ZodIssue } from 'zod';\nimport type { DAppSigner } from '@hashgraph/hedera-wallet-connect';\nimport { ProgressReporter } from '../utils/progress-reporter';\nimport { HederaMirrorNode } from '../services';\nimport { TopicInfo } from '../services/types';\nimport {\n ProfileType,\n AIAgentType,\n AIAgentCapability,\n SocialLink,\n PersonalProfile,\n AIAgentProfile,\n HCS11Profile,\n HCS11Auth,\n HCS11ClientConfig,\n TransactionResult,\n InscribeProfileResponse,\n InscribeImageResponse,\n AgentMetadata,\n InscribeImageOptions,\n InscribeProfileOptions,\n capabilityNameToCapabilityMap,\n MCPServerDetails,\n MCPServerProfile,\n MCPServerCapability,\n VerificationType,\n} from './types';\n\nconst SocialLinkSchema = z.object({\n platform: z.string().min(1),\n handle: z.string().min(1),\n});\n\nconst AIAgentDetailsSchema = z.object({\n type: z.nativeEnum(AIAgentType),\n capabilities: z.array(z.nativeEnum(AIAgentCapability)).min(1),\n model: z.string().min(1),\n creator: z.string().optional(),\n});\n\nconst MCPServerConnectionInfoSchema = z.object({\n url: z.string().min(1),\n transport: z.enum(['stdio', 'sse']),\n});\n\nconst MCPServerVerificationSchema = z.object({\n type: z.nativeEnum(VerificationType),\n value: z.string(),\n dns_field: z.string().optional(),\n challenge_path: z.string().optional(),\n});\n\nconst MCPServerHostSchema = z.object({\n minVersion: z.string().optional(),\n});\n\nconst MCPServerResourceSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n});\n\nconst MCPServerToolSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n});\n\nconst MCPServerDetailsSchema = z.object({\n version: z.string().min(1),\n connectionInfo: MCPServerConnectionInfoSchema,\n services: z.array(z.nativeEnum(MCPServerCapability)).min(1),\n description: z.string().min(1),\n verification: MCPServerVerificationSchema.optional(),\n host: MCPServerHostSchema.optional(),\n capabilities: z.array(z.string()).optional(),\n resources: z.array(MCPServerResourceSchema).optional(),\n tools: z.array(MCPServerToolSchema).optional(),\n maintainer: z.string().optional(),\n repository: z.string().optional(),\n docs: z.string().optional(),\n});\n\nconst BaseProfileSchema = z.object({\n version: z.string().min(1),\n type: z.nativeEnum(ProfileType),\n display_name: z.string().min(1),\n alias: z.string().optional(),\n bio: z.string().optional(),\n socials: z.array(SocialLinkSchema).optional(),\n profileImage: z.string().optional(),\n properties: z.record(z.any()).optional(),\n inboundTopicId: z.string().optional(),\n outboundTopicId: z.string().optional(),\n});\n\nconst PersonalProfileSchema = BaseProfileSchema.extend({\n type: z.literal(ProfileType.PERSONAL),\n language: z.string().optional(),\n timezone: z.string().optional(),\n});\n\nconst AIAgentProfileSchema = BaseProfileSchema.extend({\n type: z.literal(ProfileType.AI_AGENT),\n aiAgent: AIAgentDetailsSchema,\n});\n\nconst MCPServerProfileSchema = BaseProfileSchema.extend({\n type: z.literal(ProfileType.MCP_SERVER),\n mcpServer: MCPServerDetailsSchema,\n});\n\nconst HCS11ProfileSchema = z.union([\n PersonalProfileSchema,\n AIAgentProfileSchema,\n MCPServerProfileSchema,\n]);\n\nexport class HCS11Client {\n private client: Client;\n private auth: HCS11Auth;\n private network: string;\n private logger: Logger;\n private mirrorNode: HederaMirrorNode;\n private keyType: 'ed25519' | 'ecdsa';\n private operatorId: string;\n\n constructor(config: HCS11ClientConfig) {\n this.client =\n config.network === 'mainnet' ? Client.forMainnet() : Client.forTestnet();\n this.auth = config.auth;\n this.network = config.network;\n this.operatorId = config.auth.operatorId;\n\n this.logger = Logger.getInstance({\n level: config.logLevel || 'info',\n module: 'HCS-11',\n silent: config.silent,\n });\n\n this.mirrorNode = new HederaMirrorNode(\n this.network as 'mainnet' | 'testnet',\n this.logger,\n );\n\n if (this.auth.privateKey) {\n if (config.keyType) {\n this.keyType = config.keyType;\n this.initializeOperatorWithKeyType();\n } else {\n try {\n const keyDetection = detectKeyTypeFromString(this.auth.privateKey);\n this.keyType = keyDetection.detectedType;\n \n if (keyDetection.warning) {\n this.logger.warn(keyDetection.warning);\n }\n \n this.client.setOperator(this.operatorId, keyDetection.privateKey);\n } catch (error) {\n this.logger.warn(\n 'Failed to detect key type from private key format, will query mirror node',\n );\n this.keyType = 'ecdsa'; // Default to ECDSA\n }\n\n this.initializeOperator();\n }\n }\n }\n\n public getClient(): Client {\n return this.client;\n }\n\n public getOperatorId(): string {\n return this.auth.operatorId;\n }\n\n public async initializeOperator() {\n const account = await this.mirrorNode.requestAccount(this.operatorId);\n const keyType = account?.key?._type;\n\n if (keyType && keyType.includes('ECDSA')) {\n this.keyType = 'ecdsa';\n } else if (keyType && keyType.includes('ED25519')) {\n this.keyType = 'ed25519';\n } else {\n this.keyType = 'ecdsa'; // Default to ECDSA\n }\n\n this.initializeOperatorWithKeyType();\n }\n\n private initializeOperatorWithKeyType() {\n if (!this.auth.privateKey) {\n return;\n }\n\n const PK =\n this.keyType === 'ecdsa'\n ? PrivateKey.fromStringECDSA(this.auth.privateKey)\n : PrivateKey.fromStringED25519(this.auth.privateKey);\n\n this.client.setOperator(this.operatorId, PK);\n }\n\n public createPersonalProfile(\n displayName: string,\n options?: {\n alias?: string;\n bio?: string;\n socials?: SocialLink[];\n profileImage?: string;\n language?: string;\n timezone?: string;\n properties?: Record<string, any>;\n inboundTopicId?: string;\n outboundTopicId?: string;\n },\n ): PersonalProfile {\n return {\n version: '1.0',\n type: ProfileType.PERSONAL,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n };\n }\n\n public createAIAgentProfile(\n displayName: string,\n agentType: AIAgentType,\n capabilities: AIAgentCapability[],\n model: string,\n options?: {\n alias?: string;\n bio?: string;\n socials?: SocialLink[];\n profileImage?: string;\n properties?: Record<string, any>;\n inboundTopicId?: string;\n outboundTopicId?: string;\n creator?: string;\n },\n ): AIAgentProfile {\n const validation = this.validateProfile({\n version: '1.0',\n type: ProfileType.AI_AGENT,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n aiAgent: {\n type: agentType,\n capabilities,\n model,\n creator: options?.creator,\n },\n });\n\n if (!validation.valid) {\n throw new Error(\n `Invalid AI Agent Profile: ${validation.errors.join(', ')}`,\n );\n }\n\n return {\n version: '1.0',\n type: ProfileType.AI_AGENT,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n aiAgent: {\n type: agentType,\n capabilities,\n model,\n creator: options?.creator,\n },\n };\n }\n\n /**\n * Creates an MCP server profile.\n *\n * @param displayName - The display name for the MCP server\n * @param serverDetails - The MCP server details\n * @param options - Additional profile options\n * @returns An MCPServerProfile object\n */\n public createMCPServerProfile(\n displayName: string,\n serverDetails: MCPServerDetails,\n options?: {\n alias?: string;\n bio?: string;\n socials?: SocialLink[];\n profileImage?: string;\n properties?: Record<string, any>;\n inboundTopicId?: string;\n outboundTopicId?: string;\n },\n ): MCPServerProfile {\n const validation = this.validateProfile({\n version: '1.0',\n type: ProfileType.MCP_SERVER,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n mcpServer: serverDetails,\n });\n\n if (!validation.valid) {\n throw new Error(\n `Invalid MCP Server Profile: ${validation.errors.join(', ')}`,\n );\n }\n\n return {\n version: '1.0',\n type: ProfileType.MCP_SERVER,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n mcpServer: serverDetails,\n };\n }\n\n public validateProfile(profile: unknown): {\n valid: boolean;\n errors: string[];\n } {\n const result = HCS11ProfileSchema.safeParse(profile);\n\n if (result.success) {\n return { valid: true, errors: [] };\n }\n\n const formattedErrors = result.error.errors.map((err: ZodIssue) => {\n const path = err.path.join('.');\n let message = err.message;\n\n if (err.code === 'invalid_type') {\n message = `Expected ${err.expected}, got ${err.received}`;\n } else if (err.code === 'invalid_enum_value') {\n const validOptions = (err as any).options?.join(', ');\n message = `Invalid value. Valid options are: ${validOptions}`;\n } else if (err.code === 'too_small' && err.type === 'string') {\n message = 'Cannot be empty';\n }\n\n return `${path}: ${message}`;\n });\n\n return { valid: false, errors: formattedErrors };\n }\n\n public profileToJSONString(profile: HCS11Profile): string {\n return JSON.stringify(profile);\n }\n\n public parseProfileFromString(profileStr: string): HCS11Profile | null {\n try {\n const parsedProfile = JSON.parse(profileStr);\n const validation = this.validateProfile(parsedProfile);\n if (!validation.valid) {\n this.logger.error('Invalid profile format:', validation.errors);\n return null;\n }\n return parsedProfile as HCS11Profile;\n } catch (error) {\n this.logger.error('Error parsing profile:');\n return null;\n }\n }\n\n public setProfileForAccountMemo(\n topicId: string,\n topicStandard: 1 | 2 | 7 = 1,\n ): string {\n return `hcs-11:hcs://${topicStandard}/${topicId}`;\n }\n\n private async executeTransaction<T>(\n transaction: Transaction,\n ): Promise<TransactionResult<T>> {\n try {\n if (this.auth.privateKey) {\n const signedTx = await transaction.signWithOperator(this.client);\n const response = await signedTx.execute(this.client);\n const receipt = await response.getReceipt(this.client);\n\n if (receipt.status.toString() !== Status.Success.toString()) {\n return {\n success: false,\n error: `Transaction failed: ${receipt.status.toString()}`,\n };\n }\n\n return {\n success: true,\n result: receipt as T,\n };\n }\n\n if (!this.auth.signer) {\n throw new Error('No valid authentication method provided');\n }\n\n const signer = this.auth.signer;\n const frozenTransaction = await transaction.freezeWithSigner(signer);\n const response = await frozenTransaction.executeWithSigner(signer);\n const receipt = await response.getReceiptWithSigner(signer);\n\n if (receipt.status.toString() !== Status.Success.toString()) {\n return {\n success: false,\n error: `Transaction failed: ${receipt.status.toString()}: ${Status.Success.toString()}`,\n };\n }\n\n return {\n success: true,\n result: receipt as T,\n };\n } catch (error) {\n return {\n success: false,\n error:\n error instanceof Error\n ? error.message\n : 'Unknown error during transaction execution',\n };\n }\n }\n\n public async inscribeImage(\n buffer: Buffer,\n fileName: string,\n options?: InscribeImageOptions,\n ): Promise<InscribeImageResponse> {\n try {\n const progressCallback = options?.progressCallback;\n const progressReporter = new ProgressReporter({\n module: 'HCS11-Image',\n logger: this.logger,\n callback: progressCallback as any,\n });\n\n progressReporter.preparing('Preparing to inscribe image', 0);\n\n const mimeType = mime.lookup(fileName) || 'application/octet-stream';\n\n const waitForConfirmation = options?.waitForConfirmation ?? true;\n\n let inscriptionResponse;\n if (this.auth.signer) {\n if ('accountId' in this.auth.signer) {\n progressReporter.preparing('Using signer for inscription', 10);\n\n inscriptionResponse = await inscribeWithSigner(\n {\n type: 'buffer',\n buffer,\n fileName,\n mimeType,\n },\n this.auth.signer as DAppSigner,\n {\n network: this.network as 'mainnet' | 'testnet',\n waitForConfirmation,\n waitMaxAttempts: 150,\n waitIntervalMs: 4000,\n logging: {\n level: 'debug',\n },\n progressCallback: (data: any) => {\n const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;\n progressReporter.report({\n stage: data.stage,\n message: data.message,\n progressPercent: adjustedPercent,\n details: data.details,\n });\n },\n },\n );\n } else {\n progressReporter.failed(\n 'Signer must be a DAppSigner for inscription',\n );\n throw new Error('Signer must be a DAppSigner for inscription');\n }\n } else {\n if (!this.auth.privateKey) {\n progressReporter.failed('Private key is required for inscription');\n this.logger.error('Private key is required for inscription');\n throw new Error('Private key is required for inscription');\n }\n\n progressReporter.preparing('Using private key for inscription', 10);\n\n const PK =\n this.keyType === 'ecdsa'\n ? PrivateKey.fromStringECDSA(this.auth.privateKey)\n : PrivateKey.fromStringED25519(this.auth.privateKey);\n\n inscriptionResponse = await inscribe(\n {\n type: 'buffer',\n buffer,\n fileName,\n mimeType,\n },\n {\n accountId: this.auth.operatorId,\n // @ts-ignore\n privateKey: PK,\n network: this.network as 'mainnet' | 'testnet',\n },\n {\n waitForConfirmation,\n waitMaxAttempts: 150,\n waitIntervalMs: 2000,\n logging: {\n level: 'debug',\n },\n progressCallback: (data: any) => {\n const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;\n progressReporter.report({\n stage: data.stage,\n message: data.message,\n progressPercent: adjustedPercent,\n details: data.details,\n });\n },\n },\n );\n }\n\n if (inscriptionResponse.confirmed) {\n progressReporter.completed('Image inscription completed', {\n topicId: getTopicId(inscriptionResponse.inscription),\n });\n return {\n imageTopicId: getTopicId(inscriptionResponse.inscription) || '',\n transactionId: inscriptionResponse.result.jobId,\n success: true,\n };\n } else {\n progressReporter.verifying('Waiting for inscription confirmation', 50, {\n jobId: inscriptionResponse.result.jobId,\n });\n return {\n imageTopicId: '',\n transactionId: inscriptionResponse.result.jobId,\n success: false,\n error: 'Inscription not confirmed',\n };\n }\n } catch (error: any) {\n this.logger.error('Error inscribing image:', error);\n return {\n imageTopicId: '',\n transactionId: '',\n success: false,\n error: error.message || 'Error inscribing image',\n };\n }\n }\n\n public async inscribeProfile(\n profile: HCS11Profile,\n options?: InscribeProfileOptions,\n ): Promise<InscribeProfileResponse> {\n this.logger.info('Inscribing HCS-11 profile');\n\n const progressCallback = options?.progressCallback;\n const progressReporter = new ProgressReporter({\n module: 'HCS11-Profile',\n logger: this.logger,\n callback: progressCallback as any,\n });\n\n progressReporter.preparing('Validating profile data', 5);\n\n const validation = this.validateProfile(profile);\n if (!validation.valid) {\n progressReporter.failed(\n `Invalid profile: ${validation.errors.join(', ')}`,\n );\n return {\n profileTopicId: '',\n transactionId: '',\n success: false,\n error: `Invalid profile: ${validation.errors.join(', ')}`,\n };\n }\n\n progressReporter.preparing('Formatting profile for inscription', 15);\n\n const profileJson = this.profileToJSONString(profile);\n const fileName = `profile-${profile.display_name\n .toLowerCase()\n .replace(/\\s+/g, '-')}.json`;\n\n try {\n const contentBuffer = Buffer.from(profileJson, 'utf-8');\n const contentType = 'application/json';\n\n progressReporter.preparing('Preparing profile for inscription', 20);\n\n const input: InscriptionInput = {\n type: 'buffer',\n buffer: contentBuffer,\n fileName,\n mimeType: contentType,\n };\n\n const inscriptionOptions: InscriptionOptions = {\n waitForConfirmation: true,\n mode: 'file',\n network: this.network as 'mainnet' | 'testnet',\n waitMaxAttempts: 100,\n waitIntervalMs: 2000,\n progressCallback: (data: any) => {\n const adjustedPercent =\n 20 + Number(data?.progressPercent || 0) * 0.75;\n progressReporter?.report({\n stage: data.stage,\n message: data.message,\n progressPercent: adjustedPercent,\n details: data.details,\n });\n },\n };\n\n progressReporter.submitting('Submitting profile to Hedera network', 30);\n\n let inscriptionResponse;\n\n if (this.auth.privateKey) {\n const PK =\n this.keyType === 'ecdsa'\n ? PrivateKey.fromStringECDSA(this.auth.privateKey)\n : PrivateKey.fromStringED25519(this.auth.privateKey);\n\n inscriptionResponse = await inscribe(\n input,\n {\n accountId: this.auth.operatorId,\n // @ts-ignore\n privateKey: PK,\n network: this.network as 'mainnet' | 'testnet',\n },\n inscriptionOptions,\n );\n } else if (this.auth.signer) {\n inscriptionResponse = await inscribeWithSigner(\n input,\n this.auth.signer as DAppSigner,\n inscriptionOptions,\n );\n } else {\n throw new Error(\n 'No authentication method available - neither private key nor signer',\n );\n }\n\n if (\n !inscriptionResponse.confirmed ||\n !getTopicId(inscriptionResponse.inscription)\n ) {\n progressReporter.failed('Failed to inscribe profile content');\n return {\n profileTopicId: '',\n transactionId: '',\n success: false,\n error: 'Failed to inscribe profile content',\n };\n }\n const topicId = getTopicId(inscriptionResponse.inscription);\n\n progressReporter.completed('Profile inscription completed', {\n topicId,\n transactionId: inscriptionResponse.result.transactionId,\n });\n\n return {\n profileTopicId: topicId,\n transactionId: inscriptionResponse.result.transactionId,\n success: true,\n };\n } catch (error: any) {\n progressReporter.failed(\n `Error inscribing profile: ${error.message || 'Unknown error'}`,\n );\n return {\n profileTopicId: '',\n transactionId: '',\n success: false,\n error: error.message || 'Unknown error during inscription',\n };\n }\n }\n\n public async updateAccountMemoWithProfile(\n accountId: string | AccountId,\n profileTopicId: string,\n ): Promise<TransactionResult> {\n try {\n this.logger.info(\n `Updating account memo for ${accountId} with profile ${profileTopicId}`,\n );\n const memo = this.setProfileForAccountMemo(profileTopicId);\n\n const transaction = new AccountUpdateTransaction()\n .setAccountMemo(memo)\n .setAccountId(accountId);\n\n return this.executeTransaction(transaction);\n } catch (error) {\n this.logger.error(\n `Error updating account memo: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n );\n return {\n success: false,\n error:\n error instanceof Error\n ? error.message\n : 'Unknown error updating account memo',\n };\n }\n }\n\n /**\n * Creates and inscribes a profile.\n *\n * @param profile - The profile to create and inscribe.\n * @param updateAccountMemo - Whether to update the account memo with the profile.\n * @param options - Optional configuration options.\n * @returns A promise that resolves to the inscription result.\n */\n public async createAndInscribeProfile(\n profile: HCS11Profile,\n updateAccountMemo = true,\n options?: InscribeProfileOptions,\n ): Promise<InscribeProfileResponse> {\n const progressCallback = options?.progressCallback;\n const progressReporter = new ProgressReporter({\n module: 'HCS11-ProfileCreation',\n logger: this.logger,\n callback: progressCallback as any,\n });\n\n progressReporter.preparing('Starting profile creation process', 0);\n\n const inscriptionProgress = progressReporter.createSubProgress({\n minPercent: 0,\n maxPercent: 80,\n logPrefix: 'Inscription',\n });\n\n const inscriptionResult = await this.inscribeProfile(profile, {\n ...options,\n progressCallback: (data: any) => {\n inscriptionProgress.report({\n stage: data.stage,\n message: data.message,\n progressPercent: data.progressPercent,\n details: data.details,\n });\n },\n });\n\n if (!inscriptionResult?.success) {\n progressReporter.failed('Profile inscription failed', {\n error: inscriptionResult?.error,\n });\n return inscriptionResult;\n }\n\n progressReporter.confirming('Profile inscribed, updating account memo', 85);\n\n if (updateAccountMemo) {\n const memoResult = await this.updateAccountMemoWithProfile(\n this.auth.operatorId,\n inscriptionResult.profileTopicId,\n );\n\n if (!memoResult.success) {\n progressReporter.failed('Failed to update account memo', {\n error: memoResult?.error,\n });\n return {\n ...inscriptionResult,\n success: false,\n error: memoResult?.error,\n };\n }\n }\n\n progressReporter.completed('Profile creation completed successfully', {\n profileTopicId: inscriptionResult.profileTopicId,\n transactionId: inscriptionResult.transactionId,\n });\n\n return inscriptionResult;\n }\n\n /**\n * Gets the capabilities from the capability names.\n *\n * @param capabilityNames - The capability names to get the capabilities for.\n * @returns The capabilities.\n */\n public async getCapabilitiesFromTags(\n capabilityNames: string[],\n ): Promise<number[]> {\n const capabilities: number[] = [];\n\n if (capabilityNames.length === 0) {\n return [AIAgentCapability.TEXT_GENERATION];\n }\n\n for (const capabilityName of capabilityNames) {\n const capability =\n capabilityNameToCapabilityMap[capabilityName.toLowerCase()];\n if (capability !== undefined && !capabilities.includes(capability)) {\n capabilities.push(capability);\n }\n }\n\n if (capabilities.length === 0) {\n capabilities.push(AIAgentCapability.TEXT_GENERATION);\n }\n\n return capabilities;\n }\n\n /**\n * Gets the agent type from the metadata.\n *\n * @param metadata - The metadata of the agent.\n * @returns The agent type.\n */\n public getAgentTypeFromMetadata(metadata: AgentMetadata): AIAgentType {\n if (metadata.type === 'autonomous') {\n return AIAgentType.AUTONOMOUS;\n } else {\n return AIAgentType.MANUAL;\n }\n }\n\n /**\n * Fetches a profile from the account memo.\n *\n * @param accountId - The account ID of the agent to fetch the profile for.\n * @param network - The network to use for the fetch.\n * @returns A promise that resolves to the profile.\n */\n public async fetchProfileByAccountId(\n accountId: string | AccountId,\n network?: string,\n ): Promise<{\n success: boolean;\n profile?: HCS11Profile;\n error?: string;\n topicInfo?: TopicInfo;\n }> {\n try {\n this.logger.info(\n `Fetching profile for account ${accountId.toString()} on ${\n this.network\n }`,\n );\n\n const memo = await this.mirrorNode.getAccountMemo(accountId.toString());\n\n this.logger.info(`Got account memo: ${memo}`);\n\n if (!memo?.startsWith('hcs-11:')) {\n return {\n success: false,\n error: `Account ${accountId.toString()} does not have a valid HCS-11 memo`,\n };\n }\n\n this.logger.info(`Found HCS-11 memo: ${memo}`);\n\n const protocolReference = memo.substring(7);\n\n if (protocolReference?.startsWith('hcs://')) {\n const hcsFormat = protocolReference.match(/hcs:\\/\\/(\\d+)\\/(.+)/);\n\n if (!hcsFormat) {\n return {\n success: false,\n error: `Invalid HCS protocol reference format: ${protocolReference}`,\n };\n }\n\n const [_, protocolId, profileTopicId] = hcsFormat;\n const networkParam = network || this.network || 'mainnet';\n\n this.logger.info(\n `Retrieving profile from Kiloscribe CDN: ${profileTopicId}`,\n );\n const cdnUrl = `https://kiloscribe.com/api/inscription-cdn/${profileTopicId}?network=${networkParam}`;\n\n try {\n const response = await fetch(cdnUrl);\n\n if (!response.ok) {\n return {\n success: false,\n error: `Failed to fetch profile from Kiloscribe CDN: ${response.statusText}`,\n };\n }\n\n const profileData = await response.json();\n\n if (!profileData) {\n return {\n success: false,\n error: `No profile data found for topic ${profileTopicId}`,\n };\n }\n\n return {\n success: true,\n profile: profileData,\n topicInfo: {\n inboundTopic: profileData.inboundTopicId,\n outboundTopic: profileData.outboundTopicId,\n profileTopicId,\n },\n };\n } catch (cdnError: any) {\n this.logger.error(\n `Error retrieving from Kiloscribe CDN: ${cdnError.message}`,\n );\n return {\n success: false,\n error: `Error retrieving from Kiloscribe CDN: ${cdnError.message}`,\n };\n }\n } else if (protocolReference.startsWith('ipfs://')) {\n this.logger.warn('IPFS protocol references are not fully supported');\n const response = await fetch(\n `https://ipfs.io/ipfs/${protocolReference.replace('ipfs://', '')}`,\n );\n const profileData = await response.json();\n return {\n success: true,\n profile: profileData,\n topicInfo: {\n inboundTopic: profileData.inboundTopicId,\n outboundTopic: profileData.outboundTopicId,\n profileTopicId: profileData.profileTopicId,\n },\n };\n } else if (protocolReference.startsWith('ar://')) {\n const arTxId = protocolReference.replace('ar://', '');\n const response = await fetch(`https://arweave.net/${arTxId}`);\n\n if (!response.ok) {\n return {\n success: false,\n error: `Failed to fetch profile from Arweave ${arTxId}: ${response.statusText}`,\n };\n }\n\n const profileData = await response.json();\n\n return {\n success: true,\n profile: profileData,\n topicInfo: {\n inboundTopic: profileData.inboundTopicId,\n outboundTopic: profileData.outboundTopicId,\n profileTopicId: profileData.profileTopicId,\n },\n };\n } else {\n return {\n success: false,\n error: `Invalid protocol reference format: ${protocolReference}`,\n };\n }\n } catch (error: any) {\n this.logger.error(`Error fetching profile: ${error.message}`);\n return {\n success: false,\n error: `Error fetching profile: ${error.message}`,\n };\n }\n }\n}\n"],"names":["response","receipt"],"mappings":";;;;;;;;;;;;;;AA4CA,MAAM,mBAAmB,EAAE,OAAO;AAAA,EAChC,UAAU,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,QAAQ,EAAE,OAAA,EAAS,IAAI,CAAC;AAC1B,CAAC;AAED,MAAM,uBAAuB,EAAE,OAAO;AAAA,EACpC,MAAM,EAAE,WAAW,WAAW;AAAA,EAC9B,cAAc,EAAE,MAAM,EAAE,WAAW,iBAAiB,CAAC,EAAE,IAAI,CAAC;AAAA,EAC5D,OAAO,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,SAAS,EAAE,OAAA,EAAS,SAAA;AACtB,CAAC;AAED,MAAM,gCAAgC,EAAE,OAAO;AAAA,EAC7C,KA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,CAAC,SAAS,IAAI;AAChB,iBAAO;AAAA,YACL,SAAS;AAAA,YACT,OAAO,wCAAwC,MAAM,KAAK,SAAS,UAAU;AAAA,UAAA;AAAA,QAEjF;AAEA,cAAM,cAAc,MAAM,SAAS,KAAA;AAEnC,eAAO;AAAA,UACL,SAAS;AAAA,UACT,SAAS;AAAA,UACT,WAAW;AAAA,YACT,cAAc,YAAY;AAAA,YAC1B,eAAe,YAAY;AAAA,YAC3B,gBAAgB,YAAY;AAAA,UAAA;AAAA,QAC9B;AAAA,MAEJ,OAAO;AACL,eAAO;AAAA,UACL,SAAS;AAAA,UACT,OAAO,sCAAsC,iBAAiB;AAAA,QAAA;AAAA,MAElE;AAAA,IACF,SAAS,OAAY;AACnB,WAAK,OAAO,MAAM,2BAA2B,MAAM,OAAO,EAAE;AAC5D,aAAO;AAAA,QACL,SAAS;AAAA,QACT,OAAO,2BAA2B,MAAM,OAAO;AAAA,MAAA;AAAA,IAEnD;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"standards-sdk.es14.js","sources":["../../src/hcs-11/client.ts"],"sourcesContent":["import {\n AccountId,\n AccountUpdateTransaction,\n Client,\n PrivateKey,\n Status,\n Transaction,\n} from '@hashgraph/sdk';\nimport {\n inscribe,\n inscribeWithSigner,\n InscriptionInput,\n InscriptionOptions,\n} from '../inscribe';\nimport { Logger, detectKeyTypeFromString, getTopicId } from '../utils';\nimport * as mime from 'mime-types';\nimport { z, ZodIssue } from 'zod';\nimport type { DAppSigner } from '@hashgraph/hedera-wallet-connect';\nimport { ProgressReporter } from '../utils/progress-reporter';\nimport { HederaMirrorNode } from '../services';\nimport { TopicInfo } from '../services/types';\nimport {\n ProfileType,\n AIAgentType,\n AIAgentCapability,\n SocialLink,\n PersonalProfile,\n AIAgentProfile,\n HCS11Profile,\n HCS11Auth,\n HCS11ClientConfig,\n TransactionResult,\n InscribeProfileResponse,\n InscribeImageResponse,\n AgentMetadata,\n InscribeImageOptions,\n InscribeProfileOptions,\n capabilityNameToCapabilityMap,\n MCPServerDetails,\n MCPServerProfile,\n MCPServerCapability,\n VerificationType,\n} from './types';\n\nconst SocialLinkSchema = z.object({\n platform: z.string().min(1),\n handle: z.string().min(1),\n});\n\nconst AIAgentDetailsSchema = z.object({\n type: z.nativeEnum(AIAgentType),\n capabilities: z.array(z.nativeEnum(AIAgentCapability)).min(1),\n model: z.string().min(1),\n creator: z.string().optional(),\n});\n\nconst MCPServerConnectionInfoSchema = z.object({\n url: z.string().min(1),\n transport: z.enum(['stdio', 'sse']),\n});\n\nconst MCPServerVerificationSchema = z.object({\n type: z.nativeEnum(VerificationType),\n value: z.string(),\n dns_field: z.string().optional(),\n challenge_path: z.string().optional(),\n});\n\nconst MCPServerHostSchema = z.object({\n minVersion: z.string().optional(),\n});\n\nconst MCPServerResourceSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n});\n\nconst MCPServerToolSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n});\n\nconst MCPServerDetailsSchema = z.object({\n version: z.string().min(1),\n connectionInfo: MCPServerConnectionInfoSchema,\n services: z.array(z.nativeEnum(MCPServerCapability)).min(1),\n description: z.string().min(1),\n verification: MCPServerVerificationSchema.optional(),\n host: MCPServerHostSchema.optional(),\n capabilities: z.array(z.string()).optional(),\n resources: z.array(MCPServerResourceSchema).optional(),\n tools: z.array(MCPServerToolSchema).optional(),\n maintainer: z.string().optional(),\n repository: z.string().optional(),\n docs: z.string().optional(),\n});\n\nconst BaseProfileSchema = z.object({\n version: z.string().min(1),\n type: z.nativeEnum(ProfileType),\n display_name: z.string().min(1),\n alias: z.string().optional(),\n bio: z.string().optional(),\n socials: z.array(SocialLinkSchema).optional(),\n profileImage: z.string().optional(),\n properties: z.record(z.any()).optional(),\n inboundTopicId: z.string().optional(),\n outboundTopicId: z.string().optional(),\n});\n\nconst PersonalProfileSchema = BaseProfileSchema.extend({\n type: z.literal(ProfileType.PERSONAL),\n language: z.string().optional(),\n timezone: z.string().optional(),\n});\n\nconst AIAgentProfileSchema = BaseProfileSchema.extend({\n type: z.literal(ProfileType.AI_AGENT),\n aiAgent: AIAgentDetailsSchema,\n});\n\nconst MCPServerProfileSchema = BaseProfileSchema.extend({\n type: z.literal(ProfileType.MCP_SERVER),\n mcpServer: MCPServerDetailsSchema,\n});\n\nconst HCS11ProfileSchema = z.union([\n PersonalProfileSchema,\n AIAgentProfileSchema,\n MCPServerProfileSchema,\n]);\n\nexport class HCS11Client {\n private client: Client;\n private auth: HCS11Auth;\n private network: string;\n private logger: Logger;\n private mirrorNode: HederaMirrorNode;\n private keyType: 'ed25519' | 'ecdsa';\n private operatorId: string;\n\n constructor(config: HCS11ClientConfig) {\n this.client =\n config.network === 'mainnet' ? Client.forMainnet() : Client.forTestnet();\n this.auth = config.auth;\n this.network = config.network;\n this.operatorId = config.auth.operatorId;\n\n this.logger = Logger.getInstance({\n level: config.logLevel || 'info',\n module: 'HCS-11',\n silent: config.silent,\n });\n\n this.mirrorNode = new HederaMirrorNode(\n this.network as 'mainnet' | 'testnet',\n this.logger,\n );\n\n if (this.auth.privateKey) {\n if (config.keyType) {\n this.keyType = config.keyType;\n this.initializeOperatorWithKeyType();\n } else {\n try {\n const keyDetection = detectKeyTypeFromString(this.auth.privateKey);\n this.keyType = keyDetection.detectedType;\n \n if (keyDetection.warning) {\n this.logger.warn(keyDetection.warning);\n }\n \n this.client.setOperator(this.operatorId, keyDetection.privateKey);\n } catch (error) {\n this.logger.warn(\n 'Failed to detect key type from private key format, will query mirror node',\n );\n this.keyType = 'ecdsa'; // Default to ECDSA\n }\n\n this.initializeOperator();\n }\n }\n }\n\n public getClient(): Client {\n return this.client;\n }\n\n public getOperatorId(): string {\n return this.auth.operatorId;\n }\n\n public async initializeOperator() {\n const account = await this.mirrorNode.requestAccount(this.operatorId);\n const keyType = account?.key?._type;\n\n if (keyType && keyType.includes('ECDSA')) {\n this.keyType = 'ecdsa';\n } else if (keyType && keyType.includes('ED25519')) {\n this.keyType = 'ed25519';\n } else {\n this.keyType = 'ecdsa'; // Default to ECDSA\n }\n\n this.initializeOperatorWithKeyType();\n }\n\n private initializeOperatorWithKeyType() {\n if (!this.auth.privateKey) {\n return;\n }\n\n const PK =\n this.keyType === 'ecdsa'\n ? PrivateKey.fromStringECDSA(this.auth.privateKey)\n : PrivateKey.fromStringED25519(this.auth.privateKey);\n\n this.client.setOperator(this.operatorId, PK);\n }\n\n public createPersonalProfile(\n displayName: string,\n options?: {\n alias?: string;\n bio?: string;\n socials?: SocialLink[];\n profileImage?: string;\n language?: string;\n timezone?: string;\n properties?: Record<string, any>;\n inboundTopicId?: string;\n outboundTopicId?: string;\n },\n ): PersonalProfile {\n return {\n version: '1.0',\n type: ProfileType.PERSONAL,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n };\n }\n\n public createAIAgentProfile(\n displayName: string,\n agentType: AIAgentType,\n capabilities: AIAgentCapability[],\n model: string,\n options?: {\n alias?: string;\n bio?: string;\n socials?: SocialLink[];\n profileImage?: string;\n properties?: Record<string, any>;\n inboundTopicId?: string;\n outboundTopicId?: string;\n creator?: string;\n },\n ): AIAgentProfile {\n const validation = this.validateProfile({\n version: '1.0',\n type: ProfileType.AI_AGENT,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n aiAgent: {\n type: agentType,\n capabilities,\n model,\n creator: options?.creator,\n },\n });\n\n if (!validation.valid) {\n throw new Error(\n `Invalid AI Agent Profile: ${validation.errors.join(', ')}`,\n );\n }\n\n return {\n version: '1.0',\n type: ProfileType.AI_AGENT,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n aiAgent: {\n type: agentType,\n capabilities,\n model,\n creator: options?.creator,\n },\n };\n }\n\n /**\n * Creates an MCP server profile.\n *\n * @param displayName - The display name for the MCP server\n * @param serverDetails - The MCP server details\n * @param options - Additional profile options\n * @returns An MCPServerProfile object\n */\n public createMCPServerProfile(\n displayName: string,\n serverDetails: MCPServerDetails,\n options?: {\n alias?: string;\n bio?: string;\n socials?: SocialLink[];\n profileImage?: string;\n properties?: Record<string, any>;\n inboundTopicId?: string;\n outboundTopicId?: string;\n },\n ): MCPServerProfile {\n const validation = this.validateProfile({\n version: '1.0',\n type: ProfileType.MCP_SERVER,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n mcpServer: serverDetails,\n });\n\n if (!validation.valid) {\n throw new Error(\n `Invalid MCP Server Profile: ${validation.errors.join(', ')}`,\n );\n }\n\n return {\n version: '1.0',\n type: ProfileType.MCP_SERVER,\n display_name: displayName,\n alias: options?.alias,\n bio: options?.bio,\n socials: options?.socials,\n profileImage: options?.profileImage,\n properties: options?.properties,\n inboundTopicId: options?.inboundTopicId,\n outboundTopicId: options?.outboundTopicId,\n mcpServer: serverDetails,\n };\n }\n\n public validateProfile(profile: unknown): {\n valid: boolean;\n errors: string[];\n } {\n const result = HCS11ProfileSchema.safeParse(profile);\n\n if (result.success) {\n return { valid: true, errors: [] };\n }\n\n const formattedErrors = result.error.errors.map((err: ZodIssue) => {\n const path = err.path.join('.');\n let message = err.message;\n\n if (err.code === 'invalid_type') {\n message = `Expected ${err.expected}, got ${err.received}`;\n } else if (err.code === 'invalid_enum_value') {\n const validOptions = (err as any).options?.join(', ');\n message = `Invalid value. Valid options are: ${validOptions}`;\n } else if (err.code === 'too_small' && err.type === 'string') {\n message = 'Cannot be empty';\n }\n\n return `${path}: ${message}`;\n });\n\n return { valid: false, errors: formattedErrors };\n }\n\n public profileToJSONString(profile: HCS11Profile): string {\n return JSON.stringify(profile);\n }\n\n public parseProfileFromString(profileStr: string): HCS11Profile | null {\n try {\n const parsedProfile = JSON.parse(profileStr);\n const validation = this.validateProfile(parsedProfile);\n if (!validation.valid) {\n this.logger.error('Invalid profile format:', validation.errors);\n return null;\n }\n return parsedProfile as HCS11Profile;\n } catch (error) {\n this.logger.error('Error parsing profile:');\n return null;\n }\n }\n\n public setProfileForAccountMemo(\n topicId: string,\n topicStandard: 1 | 2 | 7 = 1,\n ): string {\n return `hcs-11:hcs://${topicStandard}/${topicId}`;\n }\n\n private async executeTransaction<T>(\n transaction: Transaction,\n ): Promise<TransactionResult<T>> {\n try {\n if (this.auth.privateKey) {\n const signedTx = await transaction.signWithOperator(this.client);\n const response = await signedTx.execute(this.client);\n const receipt = await response.getReceipt(this.client);\n\n if (receipt.status.toString() !== Status.Success.toString()) {\n return {\n success: false,\n error: `Transaction failed: ${receipt.status.toString()}`,\n };\n }\n\n return {\n success: true,\n result: receipt as T,\n };\n }\n\n if (!this.auth.signer) {\n throw new Error('No valid authentication method provided');\n }\n\n const signer = this.auth.signer;\n const frozenTransaction = await transaction.freezeWithSigner(signer);\n const response = await frozenTransaction.executeWithSigner(signer);\n const receipt = await response.getReceiptWithSigner(signer);\n\n if (receipt.status.toString() !== Status.Success.toString()) {\n return {\n success: false,\n error: `Transaction failed: ${receipt.status.toString()}: ${Status.Success.toString()}`,\n };\n }\n\n return {\n success: true,\n result: receipt as T,\n };\n } catch (error) {\n return {\n success: false,\n error:\n error instanceof Error\n ? error.message\n : 'Unknown error during transaction execution',\n };\n }\n }\n\n public async inscribeImage(\n buffer: Buffer,\n fileName: string,\n options?: InscribeImageOptions,\n ): Promise<InscribeImageResponse> {\n try {\n const progressCallback = options?.progressCallback;\n const progressReporter = new ProgressReporter({\n module: 'HCS11-Image',\n logger: this.logger,\n callback: progressCallback as any,\n });\n\n progressReporter.preparing('Preparing to inscribe image', 0);\n\n const mimeType = mime.lookup(fileName) || 'application/octet-stream';\n\n const waitForConfirmation = options?.waitForConfirmation ?? true;\n\n let inscriptionResponse;\n if (this.auth.signer) {\n if ('accountId' in this.auth.signer) {\n progressReporter.preparing('Using signer for inscription', 10);\n\n inscriptionResponse = await inscribeWithSigner(\n {\n type: 'buffer',\n buffer,\n fileName,\n mimeType,\n },\n this.auth.signer as DAppSigner,\n {\n network: this.network as 'mainnet' | 'testnet',\n waitForConfirmation,\n waitMaxAttempts: 150,\n waitIntervalMs: 4000,\n logging: {\n level: 'debug',\n },\n progressCallback: (data: any) => {\n const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;\n progressReporter.report({\n stage: data.stage,\n message: data.message,\n progressPercent: adjustedPercent,\n details: data.details,\n });\n },\n },\n );\n } else {\n progressReporter.failed(\n 'Signer must be a DAppSigner for inscription',\n );\n throw new Error('Signer must be a DAppSigner for inscription');\n }\n } else {\n if (!this.auth.privateKey) {\n progressReporter.failed('Private key is required for inscription');\n this.logger.error('Private key is required for inscription');\n throw new Error('Private key is required for inscription');\n }\n\n progressReporter.preparing('Using private key for inscription', 10);\n\n const PK =\n this.keyType === 'ecdsa'\n ? PrivateKey.fromStringECDSA(this.auth.privateKey)\n : PrivateKey.fromStringED25519(this.auth.privateKey);\n\n inscriptionResponse = await inscribe(\n {\n type: 'buffer',\n buffer,\n fileName,\n mimeType,\n },\n {\n accountId: this.auth.operatorId,\n // @ts-ignore\n privateKey: PK,\n network: this.network as 'mainnet' | 'testnet',\n },\n {\n waitForConfirmation,\n waitMaxAttempts: 150,\n waitIntervalMs: 2000,\n logging: {\n level: 'debug',\n },\n progressCallback: (data: any) => {\n const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;\n progressReporter.report({\n stage: data.stage,\n message: data.message,\n progressPercent: adjustedPercent,\n details: data.details,\n });\n },\n },\n );\n }\n\n if (inscriptionResponse.confirmed) {\n progressReporter.completed('Image inscription completed', {\n topicId: getTopicId(inscriptionResponse.inscription),\n });\n return {\n imageTopicId: getTopicId(inscriptionResponse.inscription) || '',\n transactionId: inscriptionResponse.result.jobId,\n success: true,\n };\n } else {\n progressReporter.verifying('Waiting for inscription confirmation', 50, {\n jobId: inscriptionResponse.result.jobId,\n });\n return {\n imageTopicId: '',\n transactionId: inscriptionResponse.result.jobId,\n success: false,\n error: 'Inscription not confirmed',\n };\n }\n } catch (error: any) {\n this.logger.error('Error inscribing image:', error);\n return {\n imageTopicId: '',\n transactionId: '',\n success: false,\n error: error.message || 'Error inscribing image',\n };\n }\n }\n\n public async inscribeProfile(\n profile: HCS11Profile,\n options?: InscribeProfileOptions,\n ): Promise<InscribeProfileResponse> {\n this.logger.info('Inscribing HCS-11 profile');\n\n const progressCallback = options?.progressCallback;\n const progressReporter = new ProgressReporter({\n module: 'HCS11-Profile',\n logger: this.logger,\n callback: progressCallback as any,\n });\n\n progressReporter.preparing('Validating profile data', 5);\n\n const validation = this.validateProfile(profile);\n if (!validation.valid) {\n progressReporter.failed(\n `Invalid profile: ${validation.errors.join(', ')}`,\n );\n return {\n profileTopicId: '',\n transactionId: '',\n success: false,\n error: `Invalid profile: ${validation.errors.join(', ')}`,\n };\n }\n\n progressReporter.preparing('Formatting profile for inscription', 15);\n\n const profileJson = this.profileToJSONString(profile);\n const fileName = `profile-${profile.display_name\n .toLowerCase()\n .replace(/\\s+/g, '-')}.json`;\n\n try {\n const contentBuffer = Buffer.from(profileJson, 'utf-8');\n const contentType = 'application/json';\n\n progressReporter.preparing('Preparing profile for inscription', 20);\n\n const input: InscriptionInput = {\n type: 'buffer',\n buffer: contentBuffer,\n fileName,\n mimeType: contentType,\n };\n\n const inscriptionOptions: InscriptionOptions = {\n waitForConfirmation: true,\n mode: 'file',\n network: this.network as 'mainnet' | 'testnet',\n waitMaxAttempts: 100,\n waitIntervalMs: 2000,\n progressCallback: (data: any) => {\n const adjustedPercent =\n 20 + Number(data?.progressPercent || 0) * 0.75;\n progressReporter?.report({\n stage: data.stage,\n message: data.message,\n progressPercent: adjustedPercent,\n details: data.details,\n });\n },\n };\n\n progressReporter.submitting('Submitting profile to Hedera network', 30);\n\n let inscriptionResponse;\n\n if (this.auth.privateKey) {\n const PK =\n this.keyType === 'ecdsa'\n ? PrivateKey.fromStringECDSA(this.auth.privateKey)\n : PrivateKey.fromStringED25519(this.auth.privateKey);\n\n inscriptionResponse = await inscribe(\n input,\n {\n accountId: this.auth.operatorId,\n // @ts-ignore\n privateKey: PK,\n network: this.network as 'mainnet' | 'testnet',\n },\n inscriptionOptions,\n );\n } else if (this.auth.signer) {\n inscriptionResponse = await inscribeWithSigner(\n input,\n this.auth.signer as DAppSigner,\n inscriptionOptions,\n );\n } else {\n throw new Error(\n 'No authentication method available - neither private key nor signer',\n );\n }\n\n if (\n !inscriptionResponse.confirmed ||\n !getTopicId(inscriptionResponse.inscription)\n ) {\n progressReporter.failed('Failed to inscribe profile content');\n return {\n profileTopicId: '',\n transactionId: '',\n success: false,\n error: 'Failed to inscribe profile content',\n };\n }\n const topicId = getTopicId(inscriptionResponse.inscription);\n\n progressReporter.completed('Profile inscription completed', {\n topicId,\n transactionId: inscriptionResponse.result.transactionId,\n });\n\n return {\n profileTopicId: topicId,\n transactionId: inscriptionResponse.result.transactionId,\n success: true,\n };\n } catch (error: any) {\n progressReporter.failed(\n `Error inscribing profile: ${error.message || 'Unknown error'}`,\n );\n return {\n profileTopicId: '',\n transactionId: '',\n success: false,\n error: error.message || 'Unknown error during inscription',\n };\n }\n }\n\n public async updateAccountMemoWithProfile(\n accountId: string | AccountId,\n profileTopicId: string,\n ): Promise<TransactionResult> {\n try {\n this.logger.info(\n `Updating account memo for ${accountId} with profile ${profileTopicId}`,\n );\n const memo = this.setProfileForAccountMemo(profileTopicId);\n\n const transaction = new AccountUpdateTransaction()\n .setAccountMemo(memo)\n .setAccountId(accountId);\n\n return this.executeTransaction(transaction);\n } catch (error) {\n this.logger.error(\n `Error updating account memo: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n );\n return {\n success: false,\n error:\n error instanceof Error\n ? error.message\n : 'Unknown error updating account memo',\n };\n }\n }\n\n /**\n * Creates and inscribes a profile.\n *\n * @param profile - The profile to create and inscribe.\n * @param updateAccountMemo - Whether to update the account memo with the profile.\n * @param options - Optional configuration options.\n * @returns A promise that resolves to the inscription result.\n */\n public async createAndInscribeProfile(\n profile: HCS11Profile,\n updateAccountMemo = true,\n options?: InscribeProfileOptions,\n ): Promise<InscribeProfileResponse> {\n const progressCallback = options?.progressCallback;\n const progressReporter = new ProgressReporter({\n module: 'HCS11-ProfileCreation',\n logger: this.logger,\n callback: progressCallback as any,\n });\n\n progressReporter.preparing('Starting profile creation process', 0);\n\n const inscriptionProgress = progressReporter.createSubProgress({\n minPercent: 0,\n maxPercent: 80,\n logPrefix: 'Inscription',\n });\n\n const inscriptionResult = await this.inscribeProfile(profile, {\n ...options,\n progressCallback: (data: any) => {\n inscriptionProgress.report({\n stage: data.stage,\n message: data.message,\n progressPercent: data.progressPercent,\n details: data.details,\n });\n },\n });\n\n if (!inscriptionResult?.success) {\n progressReporter.failed('Profile inscription failed', {\n error: inscriptionResult?.error,\n });\n return inscriptionResult;\n }\n\n progressReporter.confirming('Profile inscribed, updating account memo', 85);\n\n if (updateAccountMemo) {\n const memoResult = await this.updateAccountMemoWithProfile(\n this.auth.operatorId,\n inscriptionResult.profileTopicId,\n );\n\n if (!memoResult.success) {\n progressReporter.failed('Failed to update account memo', {\n error: memoResult?.error,\n });\n return {\n ...inscriptionResult,\n success: false,\n error: memoResult?.error,\n };\n }\n }\n\n progressReporter.completed('Profile creation completed successfully', {\n profileTopicId: inscriptionResult.profileTopicId,\n transactionId: inscriptionResult.transactionId,\n });\n\n return inscriptionResult;\n }\n\n /**\n * Gets the capabilities from the capability names.\n *\n * @param capabilityNames - The capability names to get the capabilities for.\n * @returns The capabilities.\n */\n public async getCapabilitiesFromTags(\n capabilityNames: string[],\n ): Promise<number[]> {\n const capabilities: number[] = [];\n\n if (capabilityNames.length === 0) {\n return [AIAgentCapability.TEXT_GENERATION];\n }\n\n for (const capabilityName of capabilityNames) {\n const capability =\n capabilityNameToCapabilityMap[capabilityName.toLowerCase()];\n if (capability !== undefined && !capabilities.includes(capability)) {\n capabilities.push(capability);\n }\n }\n\n if (capabilities.length === 0) {\n capabilities.push(AIAgentCapability.TEXT_GENERATION);\n }\n\n return capabilities;\n }\n\n /**\n * Gets the agent type from the metadata.\n *\n * @param metadata - The metadata of the agent.\n * @returns The agent type.\n */\n public getAgentTypeFromMetadata(metadata: AgentMetadata): AIAgentType {\n if (metadata.type === 'autonomous') {\n return AIAgentType.AUTONOMOUS;\n } else {\n return AIAgentType.MANUAL;\n }\n }\n\n /**\n * Fetches a profile from the account memo.\n *\n * @param accountId - The account ID of the agent to fetch the profile for.\n * @param network - The network to use for the fetch.\n * @returns A promise that resolves to the profile.\n */\n public async fetchProfileByAccountId(\n accountId: string | AccountId,\n network?: string,\n ): Promise<{\n success: boolean;\n profile?: HCS11Profile;\n error?: string;\n topicInfo?: TopicInfo;\n }> {\n try {\n this.logger.info(\n `Fetching profile for account ${accountId.toString()} on ${\n this.network\n }`,\n );\n\n const memo = await this.mirrorNode.getAccountMemo(accountId.toString());\n\n this.logger.info(`Got account memo: ${memo}`);\n\n if (!memo?.startsWith('hcs-11:')) {\n return {\n success: false,\n error: `Account ${accountId.toString()} does not have a valid HCS-11 memo. Current memo: ${memo || 'empty'}`,\n };\n }\n\n this.logger.info(`Found HCS-11 memo: ${memo}`);\n\n const protocolReference = memo.substring(7);\n\n if (protocolReference?.startsWith('hcs://')) {\n const hcsFormat = protocolReference.match(/hcs:\\/\\/(\\d+)\\/(.+)/);\n\n if (!hcsFormat) {\n return {\n success: false,\n error: `Invalid HCS protocol reference format: ${protocolReference}`,\n };\n }\n\n const [_, protocolId, profileTopicId] = hcsFormat;\n const networkParam = network || this.network || 'mainnet';\n\n this.logger.info(\n `Retrieving profile from Kiloscribe CDN: ${profileTopicId}`,\n );\n const cdnUrl = `https://kiloscribe.com/api/inscription-cdn/${profileTopicId}?network=${networkParam}`;\n\n try {\n const response = await fetch(cdnUrl);\n\n if (!response.ok) {\n return {\n success: false,\n error: `Failed to fetch profile from Kiloscribe CDN: ${response.statusText}`,\n };\n }\n\n const profileData = await response.json();\n\n if (!profileData) {\n return {\n success: false,\n error: `No profile data found for topic ${profileTopicId}`,\n };\n }\n\n return {\n success: true,\n profile: profileData,\n topicInfo: {\n inboundTopic: profileData.inboundTopicId,\n outboundTopic: profileData.outboundTopicId,\n profileTopicId,\n },\n };\n } catch (cdnError: any) {\n this.logger.error(\n `Error retrieving from Kiloscribe CDN: ${cdnError.message}`,\n );\n return {\n success: false,\n error: `Error retrieving from Kiloscribe CDN: ${cdnError.message}`,\n };\n }\n } else if (protocolReference.startsWith('ipfs://')) {\n this.logger.warn('IPFS protocol references are not fully supported');\n const response = await fetch(\n `https://ipfs.io/ipfs/${protocolReference.replace('ipfs://', '')}`,\n );\n const profileData = await response.json();\n return {\n success: true,\n profile: profileData,\n topicInfo: {\n inboundTopic: profileData.inboundTopicId,\n outboundTopic: profileData.outboundTopicId,\n profileTopicId: profileData.profileTopicId,\n },\n };\n } else if (protocolReference.startsWith('ar://')) {\n const arTxId = protocolReference.replace('ar://', '');\n const response = await fetch(`https://arweave.net/${arTxId}`);\n\n if (!response.ok) {\n return {\n success: false,\n error: `Failed to fetch profile from Arweave ${arTxId}: ${response.statusText}`,\n };\n }\n\n const profileData = await response.json();\n\n return {\n success: true,\n profile: profileData,\n topicInfo: {\n inboundTopic: profileData.inboundTopicId,\n outboundTopic: profileData.outboundTopicId,\n profileTopicId: profileData.profileTopicId,\n },\n };\n } else {\n return {\n success: false,\n error: `Invalid protocol reference format: ${protocolReference}`,\n };\n }\n } catch (error: any) {\n this.logger.error(`Error fetching profile: ${error.message}`);\n return {\n success: false,\n error: `Error fetching profile: ${error.message}`,\n };\n }\n }\n}\n"],"names":["response","receipt"],"mappings":";;;;;;;;;;;;;;AA4CA,MAAM,mBAAm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AM;AAAA,UACrB,wBAAwB,kBAAkB,QAAQ,WAAW,EAAE,CAAC;AAAA,QAAA;AAElE,cAAM,cAAc,MAAM,SAAS,KAAA;AACnC,eAAO;AAAA,UACL,SAAS;AAAA,UACT,SAAS;AAAA,UACT,WAAW;AAAA,YACT,cAAc,YAAY;AAAA,YAC1B,eAAe,YAAY;AAAA,YAC3B,gBAAgB,YAAY;AAAA,UAAA;AAAA,QAC9B;AAAA,MAEJ,WAAW,kBAAkB,WAAW,OAAO,GAAG;AAChD,cAAM,SAAS,kBAAkB,QAAQ,SAAS,EAAE;AACpD,cAAM,WAAW,MAAM,MAAM,uBAAuB,MAAM,EAAE;AAE5D,YAAI,CAAC,SAAS,IAAI;AAChB,iBAAO;AAAA,YACL,SAAS;AAAA,YACT,OAAO,wCAAwC,MAAM,KAAK,SAAS,UAAU;AAAA,UAAA;AAAA,QAEjF;AAEA,cAAM,cAAc,MAAM,SAAS,KAAA;AAEnC,eAAO;AAAA,UACL,SAAS;AAAA,UACT,SAAS;AAAA,UACT,WAAW;AAAA,YACT,cAAc,YAAY;AAAA,YAC1B,eAAe,YAAY;AAAA,YAC3B,gBAAgB,YAAY;AAAA,UAAA;AAAA,QAC9B;AAAA,MAEJ,OAAO;AACL,eAAO;AAAA,UACL,SAAS;AAAA,UACT,OAAO,sCAAsC,iBAAiB;AAAA,QAAA;AAAA,MAElE;AAAA,IACF,SAAS,OAAY;AACnB,WAAK,OAAO,MAAM,2BAA2B,MAAM,OAAO,EAAE;AAC5D,aAAO;AAAA,QACL,SAAS;AAAA,QACT,OAAO,2BAA2B,MAAM,OAAO;AAAA,MAAA;AAAA,IAEnD;AAAA,EACF;AACF;"}
@@ -1,7 +1,7 @@
1
1
  import { TopicCreateTransaction, PublicKey, TopicMessageSubmitTransaction, TopicId } from "@hashgraph/sdk";
2
2
  import { HCS2BaseClient } from "./standards-sdk.es19.js";
3
3
  import { HCS2RegistryType, HCS2Operation } from "./standards-sdk.es16.js";
4
- import { isBrowser } from "./standards-sdk.es39.js";
4
+ import { isBrowser } from "./standards-sdk.es45.js";
5
5
  class BrowserHCS2Client extends HCS2BaseClient {
6
6
  /**
7
7
  * Create a new browser HCS-2 client
@@ -2,12 +2,12 @@ import { proto } from "@hashgraph/proto";
2
2
  import { Buffer } from "buffer";
3
3
  import { Hbar, Long, HbarUnit } from "@hashgraph/sdk";
4
4
  import { ethers } from "ethers";
5
- import { HTSParser } from "./standards-sdk.es40.js";
6
- import { HCSParser } from "./standards-sdk.es41.js";
7
- import { FileParser } from "./standards-sdk.es42.js";
8
- import { CryptoParser } from "./standards-sdk.es43.js";
9
- import { SCSParser } from "./standards-sdk.es44.js";
10
- import { UtilParser } from "./standards-sdk.es45.js";
5
+ import { HTSParser } from "./standards-sdk.es39.js";
6
+ import { HCSParser } from "./standards-sdk.es40.js";
7
+ import { FileParser } from "./standards-sdk.es41.js";
8
+ import { CryptoParser } from "./standards-sdk.es42.js";
9
+ import { SCSParser } from "./standards-sdk.es43.js";
10
+ import { UtilParser } from "./standards-sdk.es44.js";
11
11
  class TransactionParser {
12
12
  /**
13
13
  * Parse a base64 encoded transaction body and return structured data