@hashgraphonline/standards-sdk 0.0.49 → 0.0.51

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 (337) hide show
  1. package/dist/es/hcs-10/agent-builder.d.ts +2 -1
  2. package/dist/es/hcs-10/agent-builder.d.ts.map +1 -0
  3. package/dist/es/hcs-10/base-client.d.ts +1 -0
  4. package/dist/es/hcs-10/base-client.d.ts.map +1 -0
  5. package/dist/es/hcs-10/browser.d.ts +2 -1
  6. package/dist/es/hcs-10/browser.d.ts.map +1 -0
  7. package/dist/es/hcs-10/errors.d.ts +1 -0
  8. package/dist/es/hcs-10/errors.d.ts.map +1 -0
  9. package/dist/es/hcs-10/fee-config-builder.d.ts +2 -1
  10. package/dist/es/hcs-10/fee-config-builder.d.ts.map +1 -0
  11. package/dist/es/hcs-10/index.d.ts +1 -0
  12. package/dist/es/hcs-10/index.d.ts.map +1 -0
  13. package/dist/es/hcs-10/registrations.d.ts +1 -0
  14. package/dist/es/hcs-10/registrations.d.ts.map +1 -0
  15. package/dist/es/hcs-10/sdk.d.ts +3 -2
  16. package/dist/es/hcs-10/sdk.d.ts.map +1 -0
  17. package/dist/es/hcs-10/types.d.ts +176 -0
  18. package/dist/es/hcs-10/types.d.ts.map +1 -0
  19. package/dist/es/hcs-11/index.d.ts +1 -0
  20. package/dist/es/hcs-11/index.d.ts.map +1 -0
  21. package/dist/es/hcs-3/index.d.ts +1 -0
  22. package/dist/es/hcs-3/index.d.ts.map +1 -0
  23. package/dist/es/hcs-3/src/index.d.ts +1 -0
  24. package/dist/es/hcs-3/src/index.d.ts.map +1 -0
  25. package/dist/es/hcs-7/evm-bridge.d.ts +1 -0
  26. package/dist/es/hcs-7/evm-bridge.d.ts.map +1 -0
  27. package/dist/es/hcs-7/index.d.ts +1 -0
  28. package/dist/es/hcs-7/index.d.ts.map +1 -0
  29. package/dist/es/hcs-7/redis-cache.d.ts +1 -0
  30. package/dist/es/hcs-7/redis-cache.d.ts.map +1 -0
  31. package/dist/es/hcs-7/wasm-bridge.d.ts +1 -0
  32. package/dist/es/hcs-7/wasm-bridge.d.ts.map +1 -0
  33. package/dist/es/index.d.ts +1 -0
  34. package/dist/es/index.d.ts.map +1 -0
  35. package/dist/es/inscribe/index.d.ts +1 -0
  36. package/dist/es/inscribe/index.d.ts.map +1 -0
  37. package/dist/es/inscribe/inscriber.d.ts +1 -0
  38. package/dist/es/inscribe/inscriber.d.ts.map +1 -0
  39. package/dist/es/inscribe/types.d.ts +1 -0
  40. package/dist/es/inscribe/types.d.ts.map +1 -0
  41. package/dist/es/services/index.d.ts +1 -0
  42. package/dist/es/services/index.d.ts.map +1 -0
  43. package/dist/es/services/mirror-node.d.ts +1 -0
  44. package/dist/es/services/mirror-node.d.ts.map +1 -0
  45. package/dist/es/services/types.d.ts +1 -0
  46. package/dist/es/services/types.d.ts.map +1 -0
  47. package/dist/es/standards-sdk.es.js +19 -26467
  48. package/dist/es/standards-sdk.es.js.map +1 -1
  49. package/dist/es/standards-sdk.es10.js +1058 -0
  50. package/dist/es/standards-sdk.es10.js.map +1 -0
  51. package/dist/es/standards-sdk.es100.js +8 -0
  52. package/dist/es/standards-sdk.es100.js.map +1 -0
  53. package/dist/es/standards-sdk.es101.js +42 -0
  54. package/dist/es/standards-sdk.es101.js.map +1 -0
  55. package/dist/es/standards-sdk.es102.js +43 -0
  56. package/dist/es/standards-sdk.es102.js.map +1 -0
  57. package/dist/es/standards-sdk.es103.js +40 -0
  58. package/dist/es/standards-sdk.es103.js.map +1 -0
  59. package/dist/es/standards-sdk.es104.js +81 -0
  60. package/dist/es/standards-sdk.es104.js.map +1 -0
  61. package/dist/es/standards-sdk.es105.js +6 -0
  62. package/dist/es/standards-sdk.es105.js.map +1 -0
  63. package/dist/es/standards-sdk.es106.js +5 -0
  64. package/dist/es/standards-sdk.es106.js.map +1 -0
  65. package/dist/es/standards-sdk.es107.js +5 -0
  66. package/dist/es/standards-sdk.es107.js.map +1 -0
  67. package/dist/es/standards-sdk.es108.js +37 -0
  68. package/dist/es/standards-sdk.es108.js.map +1 -0
  69. package/dist/es/standards-sdk.es109.js +36 -0
  70. package/dist/es/standards-sdk.es109.js.map +1 -0
  71. package/dist/es/standards-sdk.es11.js +98 -0
  72. package/dist/es/standards-sdk.es11.js.map +1 -0
  73. package/dist/es/standards-sdk.es110.js +12 -0
  74. package/dist/es/standards-sdk.es110.js.map +1 -0
  75. package/dist/es/standards-sdk.es111.js +37 -0
  76. package/dist/es/standards-sdk.es111.js.map +1 -0
  77. package/dist/es/standards-sdk.es12.js +741 -0
  78. package/dist/es/standards-sdk.es12.js.map +1 -0
  79. package/dist/es/standards-sdk.es13.js +72 -0
  80. package/dist/es/standards-sdk.es13.js.map +1 -0
  81. package/dist/es/standards-sdk.es14.js +25 -0
  82. package/dist/es/standards-sdk.es14.js.map +1 -0
  83. package/dist/es/standards-sdk.es15.js +163 -0
  84. package/dist/es/standards-sdk.es15.js.map +1 -0
  85. package/dist/es/standards-sdk.es16.js +409 -0
  86. package/dist/es/standards-sdk.es16.js.map +1 -0
  87. package/dist/es/standards-sdk.es17.js +235 -0
  88. package/dist/es/standards-sdk.es17.js.map +1 -0
  89. package/dist/es/standards-sdk.es18.js +10 -0
  90. package/dist/es/standards-sdk.es18.js.map +1 -0
  91. package/dist/es/standards-sdk.es19.js +6 -0
  92. package/dist/es/standards-sdk.es19.js.map +1 -0
  93. package/dist/es/standards-sdk.es2.js +697 -0
  94. package/dist/es/standards-sdk.es2.js.map +1 -0
  95. package/dist/es/standards-sdk.es20.js +4170 -0
  96. package/dist/es/standards-sdk.es20.js.map +1 -0
  97. package/dist/es/standards-sdk.es21.js +6627 -0
  98. package/dist/es/standards-sdk.es21.js.map +1 -0
  99. package/dist/es/standards-sdk.es22.js +39 -0
  100. package/dist/es/standards-sdk.es22.js.map +1 -0
  101. package/dist/es/standards-sdk.es23.js +51 -0
  102. package/dist/es/standards-sdk.es23.js.map +1 -0
  103. package/dist/es/standards-sdk.es24.js +5 -0
  104. package/dist/es/standards-sdk.es24.js.map +1 -0
  105. package/dist/es/standards-sdk.es25.js +1044 -0
  106. package/dist/es/standards-sdk.es25.js.map +1 -0
  107. package/dist/es/standards-sdk.es26.js +8 -0
  108. package/dist/es/standards-sdk.es26.js.map +1 -0
  109. package/dist/es/standards-sdk.es27.js +104 -0
  110. package/dist/es/standards-sdk.es27.js.map +1 -0
  111. package/dist/es/standards-sdk.es28.js +5 -0
  112. package/dist/es/standards-sdk.es28.js.map +1 -0
  113. package/dist/es/standards-sdk.es29.js +19 -0
  114. package/dist/es/standards-sdk.es29.js.map +1 -0
  115. package/dist/es/standards-sdk.es3.js +196 -0
  116. package/dist/es/standards-sdk.es3.js.map +1 -0
  117. package/dist/es/standards-sdk.es30.js +7 -0
  118. package/dist/es/standards-sdk.es30.js.map +1 -0
  119. package/dist/es/standards-sdk.es31.js +422 -0
  120. package/dist/es/standards-sdk.es31.js.map +1 -0
  121. package/dist/es/standards-sdk.es32.js +5 -0
  122. package/dist/es/standards-sdk.es32.js.map +1 -0
  123. package/dist/es/standards-sdk.es33.js +123 -0
  124. package/dist/es/standards-sdk.es33.js.map +1 -0
  125. package/dist/es/standards-sdk.es34.js +2285 -0
  126. package/dist/es/standards-sdk.es34.js.map +1 -0
  127. package/dist/es/standards-sdk.es35.js +5 -0
  128. package/dist/es/standards-sdk.es35.js.map +1 -0
  129. package/dist/es/standards-sdk.es36.js +32 -0
  130. package/dist/es/standards-sdk.es36.js.map +1 -0
  131. package/dist/es/standards-sdk.es37.js +5 -0
  132. package/dist/es/standards-sdk.es37.js.map +1 -0
  133. package/dist/es/standards-sdk.es38.js +87 -0
  134. package/dist/es/standards-sdk.es38.js.map +1 -0
  135. package/dist/es/standards-sdk.es39.js +26 -0
  136. package/dist/es/standards-sdk.es39.js.map +1 -0
  137. package/dist/es/standards-sdk.es4.js +174 -0
  138. package/dist/es/standards-sdk.es4.js.map +1 -0
  139. package/dist/es/standards-sdk.es40.js +151 -0
  140. package/dist/es/standards-sdk.es40.js.map +1 -0
  141. package/dist/es/standards-sdk.es41.js +94 -0
  142. package/dist/es/standards-sdk.es41.js.map +1 -0
  143. package/dist/es/standards-sdk.es42.js +177 -0
  144. package/dist/es/standards-sdk.es42.js.map +1 -0
  145. package/dist/es/standards-sdk.es43.js +198 -0
  146. package/dist/es/standards-sdk.es43.js.map +1 -0
  147. package/dist/es/standards-sdk.es44.js +441 -0
  148. package/dist/es/standards-sdk.es44.js.map +1 -0
  149. package/dist/es/standards-sdk.es45.js +28 -0
  150. package/dist/es/standards-sdk.es45.js.map +1 -0
  151. package/dist/es/standards-sdk.es46.js +142 -0
  152. package/dist/es/standards-sdk.es46.js.map +1 -0
  153. package/dist/es/standards-sdk.es47.js +21 -0
  154. package/dist/es/standards-sdk.es47.js.map +1 -0
  155. package/dist/es/standards-sdk.es48.js +32 -0
  156. package/dist/es/standards-sdk.es48.js.map +1 -0
  157. package/dist/es/standards-sdk.es49.js +32 -0
  158. package/dist/es/standards-sdk.es49.js.map +1 -0
  159. package/dist/es/standards-sdk.es5.js +1042 -0
  160. package/dist/es/standards-sdk.es5.js.map +1 -0
  161. package/dist/es/standards-sdk.es50.js +24 -0
  162. package/dist/es/standards-sdk.es50.js.map +1 -0
  163. package/dist/es/standards-sdk.es51.js +47 -0
  164. package/dist/es/standards-sdk.es51.js.map +1 -0
  165. package/dist/es/standards-sdk.es52.js +21 -0
  166. package/dist/es/standards-sdk.es52.js.map +1 -0
  167. package/dist/es/standards-sdk.es53.js +64 -0
  168. package/dist/es/standards-sdk.es53.js.map +1 -0
  169. package/dist/es/standards-sdk.es54.js +1292 -0
  170. package/dist/es/standards-sdk.es54.js.map +1 -0
  171. package/dist/es/standards-sdk.es55.js +35 -0
  172. package/dist/es/standards-sdk.es55.js.map +1 -0
  173. package/dist/es/standards-sdk.es56.js +9 -0
  174. package/dist/es/standards-sdk.es56.js.map +1 -0
  175. package/dist/es/standards-sdk.es57.js +162 -0
  176. package/dist/es/standards-sdk.es57.js.map +1 -0
  177. package/dist/es/standards-sdk.es58.js +796 -0
  178. package/dist/es/standards-sdk.es58.js.map +1 -0
  179. package/dist/es/standards-sdk.es59.js +146 -0
  180. package/dist/es/standards-sdk.es59.js.map +1 -0
  181. package/dist/es/standards-sdk.es6.js +32 -0
  182. package/dist/es/standards-sdk.es6.js.map +1 -0
  183. package/dist/es/standards-sdk.es60.js +30 -0
  184. package/dist/es/standards-sdk.es60.js.map +1 -0
  185. package/dist/es/standards-sdk.es61.js +29 -0
  186. package/dist/es/standards-sdk.es61.js.map +1 -0
  187. package/dist/es/standards-sdk.es62.js +41 -0
  188. package/dist/es/standards-sdk.es62.js.map +1 -0
  189. package/dist/es/standards-sdk.es63.js +365 -0
  190. package/dist/es/standards-sdk.es63.js.map +1 -0
  191. package/dist/es/standards-sdk.es64.js +9 -0
  192. package/dist/es/standards-sdk.es64.js.map +1 -0
  193. package/dist/es/standards-sdk.es65.js +182 -0
  194. package/dist/es/standards-sdk.es65.js.map +1 -0
  195. package/dist/es/standards-sdk.es66.js +84 -0
  196. package/dist/es/standards-sdk.es66.js.map +1 -0
  197. package/dist/es/standards-sdk.es67.js +117 -0
  198. package/dist/es/standards-sdk.es67.js.map +1 -0
  199. package/dist/es/standards-sdk.es68.js +55 -0
  200. package/dist/es/standards-sdk.es68.js.map +1 -0
  201. package/dist/es/standards-sdk.es69.js +13 -0
  202. package/dist/es/standards-sdk.es69.js.map +1 -0
  203. package/dist/es/standards-sdk.es7.js +124 -0
  204. package/dist/es/standards-sdk.es7.js.map +1 -0
  205. package/dist/es/standards-sdk.es70.js +100 -0
  206. package/dist/es/standards-sdk.es70.js.map +1 -0
  207. package/dist/es/standards-sdk.es71.js +7 -0
  208. package/dist/es/standards-sdk.es71.js.map +1 -0
  209. package/dist/es/standards-sdk.es72.js +5 -0
  210. package/dist/es/standards-sdk.es72.js.map +1 -0
  211. package/dist/es/standards-sdk.es73.js +115 -0
  212. package/dist/es/standards-sdk.es73.js.map +1 -0
  213. package/dist/es/standards-sdk.es74.js +77 -0
  214. package/dist/es/standards-sdk.es74.js.map +1 -0
  215. package/dist/es/standards-sdk.es75.js +9 -0
  216. package/dist/es/standards-sdk.es75.js.map +1 -0
  217. package/dist/es/standards-sdk.es76.js +8 -0
  218. package/dist/es/standards-sdk.es76.js.map +1 -0
  219. package/dist/es/standards-sdk.es77.js +224 -0
  220. package/dist/es/standards-sdk.es77.js.map +1 -0
  221. package/dist/es/standards-sdk.es78.js +61 -0
  222. package/dist/es/standards-sdk.es78.js.map +1 -0
  223. package/dist/es/standards-sdk.es79.js +72 -0
  224. package/dist/es/standards-sdk.es79.js.map +1 -0
  225. package/dist/es/standards-sdk.es8.js +343 -0
  226. package/dist/es/standards-sdk.es8.js.map +1 -0
  227. package/dist/es/standards-sdk.es80.js +24 -0
  228. package/dist/es/standards-sdk.es80.js.map +1 -0
  229. package/dist/es/standards-sdk.es81.js +35 -0
  230. package/dist/es/standards-sdk.es81.js.map +1 -0
  231. package/dist/es/standards-sdk.es82.js +66 -0
  232. package/dist/es/standards-sdk.es82.js.map +1 -0
  233. package/dist/es/standards-sdk.es83.js +53 -0
  234. package/dist/es/standards-sdk.es83.js.map +1 -0
  235. package/dist/es/standards-sdk.es84.js +13 -0
  236. package/dist/es/standards-sdk.es84.js.map +1 -0
  237. package/dist/es/standards-sdk.es85.js +68 -0
  238. package/dist/es/standards-sdk.es85.js.map +1 -0
  239. package/dist/es/standards-sdk.es86.js +9 -0
  240. package/dist/es/standards-sdk.es86.js.map +1 -0
  241. package/dist/es/standards-sdk.es87.js +18 -0
  242. package/dist/es/standards-sdk.es87.js.map +1 -0
  243. package/dist/es/standards-sdk.es88.js +10 -0
  244. package/dist/es/standards-sdk.es88.js.map +1 -0
  245. package/dist/es/standards-sdk.es89.js +48 -0
  246. package/dist/es/standards-sdk.es89.js.map +1 -0
  247. package/dist/es/standards-sdk.es9.js +270 -0
  248. package/dist/es/standards-sdk.es9.js.map +1 -0
  249. package/dist/es/standards-sdk.es90.js +5 -0
  250. package/dist/es/standards-sdk.es90.js.map +1 -0
  251. package/dist/es/standards-sdk.es91.js +139 -0
  252. package/dist/es/standards-sdk.es91.js.map +1 -0
  253. package/dist/es/standards-sdk.es92.js +175 -0
  254. package/dist/es/standards-sdk.es92.js.map +1 -0
  255. package/dist/es/standards-sdk.es93.js +35 -0
  256. package/dist/es/standards-sdk.es93.js.map +1 -0
  257. package/dist/es/standards-sdk.es94.js +18 -0
  258. package/dist/es/standards-sdk.es94.js.map +1 -0
  259. package/dist/es/standards-sdk.es95.js +7 -0
  260. package/dist/es/standards-sdk.es95.js.map +1 -0
  261. package/dist/es/standards-sdk.es96.js +7 -0
  262. package/dist/es/standards-sdk.es96.js.map +1 -0
  263. package/dist/es/standards-sdk.es97.js +16 -0
  264. package/dist/es/standards-sdk.es97.js.map +1 -0
  265. package/dist/es/standards-sdk.es98.js +16 -0
  266. package/dist/es/standards-sdk.es98.js.map +1 -0
  267. package/dist/es/standards-sdk.es99.js +19 -0
  268. package/dist/es/standards-sdk.es99.js.map +1 -0
  269. package/dist/es/utils/index.d.ts +1 -0
  270. package/dist/es/utils/index.d.ts.map +1 -0
  271. package/dist/es/utils/logger.d.ts +1 -0
  272. package/dist/es/utils/logger.d.ts.map +1 -0
  273. package/dist/es/utils/progress-reporter.d.ts +1 -0
  274. package/dist/es/utils/progress-reporter.d.ts.map +1 -0
  275. package/dist/es/utils/sleep.d.ts +1 -0
  276. package/dist/es/utils/sleep.d.ts.map +1 -0
  277. package/dist/es/utils/topic-fee-utils.d.ts +1 -0
  278. package/dist/es/utils/topic-fee-utils.d.ts.map +1 -0
  279. package/dist/umd/hcs-10/agent-builder.d.ts +2 -1
  280. package/dist/umd/hcs-10/agent-builder.d.ts.map +1 -0
  281. package/dist/umd/hcs-10/base-client.d.ts +1 -0
  282. package/dist/umd/hcs-10/base-client.d.ts.map +1 -0
  283. package/dist/umd/hcs-10/browser.d.ts +2 -1
  284. package/dist/umd/hcs-10/browser.d.ts.map +1 -0
  285. package/dist/umd/hcs-10/errors.d.ts +1 -0
  286. package/dist/umd/hcs-10/errors.d.ts.map +1 -0
  287. package/dist/umd/hcs-10/fee-config-builder.d.ts +2 -1
  288. package/dist/umd/hcs-10/fee-config-builder.d.ts.map +1 -0
  289. package/dist/umd/hcs-10/index.d.ts +1 -0
  290. package/dist/umd/hcs-10/index.d.ts.map +1 -0
  291. package/dist/umd/hcs-10/registrations.d.ts +1 -0
  292. package/dist/umd/hcs-10/registrations.d.ts.map +1 -0
  293. package/dist/umd/hcs-10/sdk.d.ts +3 -2
  294. package/dist/umd/hcs-10/sdk.d.ts.map +1 -0
  295. package/dist/umd/hcs-10/types.d.ts +176 -0
  296. package/dist/umd/hcs-10/types.d.ts.map +1 -0
  297. package/dist/umd/hcs-11/index.d.ts +1 -0
  298. package/dist/umd/hcs-11/index.d.ts.map +1 -0
  299. package/dist/umd/hcs-3/index.d.ts +1 -0
  300. package/dist/umd/hcs-3/index.d.ts.map +1 -0
  301. package/dist/umd/hcs-3/src/index.d.ts +1 -0
  302. package/dist/umd/hcs-3/src/index.d.ts.map +1 -0
  303. package/dist/umd/hcs-7/evm-bridge.d.ts +1 -0
  304. package/dist/umd/hcs-7/evm-bridge.d.ts.map +1 -0
  305. package/dist/umd/hcs-7/index.d.ts +1 -0
  306. package/dist/umd/hcs-7/index.d.ts.map +1 -0
  307. package/dist/umd/hcs-7/redis-cache.d.ts +1 -0
  308. package/dist/umd/hcs-7/redis-cache.d.ts.map +1 -0
  309. package/dist/umd/hcs-7/wasm-bridge.d.ts +1 -0
  310. package/dist/umd/hcs-7/wasm-bridge.d.ts.map +1 -0
  311. package/dist/umd/index.d.ts +1 -0
  312. package/dist/umd/index.d.ts.map +1 -0
  313. package/dist/umd/inscribe/index.d.ts +1 -0
  314. package/dist/umd/inscribe/index.d.ts.map +1 -0
  315. package/dist/umd/inscribe/inscriber.d.ts +1 -0
  316. package/dist/umd/inscribe/inscriber.d.ts.map +1 -0
  317. package/dist/umd/inscribe/types.d.ts +1 -0
  318. package/dist/umd/inscribe/types.d.ts.map +1 -0
  319. package/dist/umd/services/index.d.ts +1 -0
  320. package/dist/umd/services/index.d.ts.map +1 -0
  321. package/dist/umd/services/mirror-node.d.ts +1 -0
  322. package/dist/umd/services/mirror-node.d.ts.map +1 -0
  323. package/dist/umd/services/types.d.ts +1 -0
  324. package/dist/umd/services/types.d.ts.map +1 -0
  325. package/dist/umd/standards-sdk.umd.js +1 -1
  326. package/dist/umd/standards-sdk.umd.js.map +1 -1
  327. package/dist/umd/utils/index.d.ts +1 -0
  328. package/dist/umd/utils/index.d.ts.map +1 -0
  329. package/dist/umd/utils/logger.d.ts +1 -0
  330. package/dist/umd/utils/logger.d.ts.map +1 -0
  331. package/dist/umd/utils/progress-reporter.d.ts +1 -0
  332. package/dist/umd/utils/progress-reporter.d.ts.map +1 -0
  333. package/dist/umd/utils/sleep.d.ts +1 -0
  334. package/dist/umd/utils/sleep.d.ts.map +1 -0
  335. package/dist/umd/utils/topic-fee-utils.d.ts +1 -0
  336. package/dist/umd/utils/topic-fee-utils.d.ts.map +1 -0
  337. package/package.json +5 -9
@@ -0,0 +1,741 @@
1
+ import { Client, PrivateKey, Status, AccountUpdateTransaction } from "@hashgraph/sdk";
2
+ import { inscribeWithSigner, inscribe } from "./standards-sdk.es16.js";
3
+ import { Logger } from "./standards-sdk.es13.js";
4
+ import { m as mimeTypesExports } from "./standards-sdk.es19.js";
5
+ import z from "./standards-sdk.es20.js";
6
+ import { ProgressReporter } from "./standards-sdk.es15.js";
7
+ import { HederaMirrorNode } from "./standards-sdk.es17.js";
8
+ var ProfileType = /* @__PURE__ */ ((ProfileType2) => {
9
+ ProfileType2[ProfileType2["PERSONAL"] = 0] = "PERSONAL";
10
+ ProfileType2[ProfileType2["AI_AGENT"] = 1] = "AI_AGENT";
11
+ return ProfileType2;
12
+ })(ProfileType || {});
13
+ var AIAgentType = /* @__PURE__ */ ((AIAgentType2) => {
14
+ AIAgentType2[AIAgentType2["MANUAL"] = 0] = "MANUAL";
15
+ AIAgentType2[AIAgentType2["AUTONOMOUS"] = 1] = "AUTONOMOUS";
16
+ return AIAgentType2;
17
+ })(AIAgentType || {});
18
+ var EndpointType = /* @__PURE__ */ ((EndpointType2) => {
19
+ EndpointType2[EndpointType2["REST"] = 0] = "REST";
20
+ EndpointType2[EndpointType2["WEBSOCKET"] = 1] = "WEBSOCKET";
21
+ EndpointType2[EndpointType2["GRPC"] = 2] = "GRPC";
22
+ return EndpointType2;
23
+ })(EndpointType || {});
24
+ var AIAgentCapability = /* @__PURE__ */ ((AIAgentCapability2) => {
25
+ AIAgentCapability2[AIAgentCapability2["TEXT_GENERATION"] = 0] = "TEXT_GENERATION";
26
+ AIAgentCapability2[AIAgentCapability2["IMAGE_GENERATION"] = 1] = "IMAGE_GENERATION";
27
+ AIAgentCapability2[AIAgentCapability2["AUDIO_GENERATION"] = 2] = "AUDIO_GENERATION";
28
+ AIAgentCapability2[AIAgentCapability2["VIDEO_GENERATION"] = 3] = "VIDEO_GENERATION";
29
+ AIAgentCapability2[AIAgentCapability2["CODE_GENERATION"] = 4] = "CODE_GENERATION";
30
+ AIAgentCapability2[AIAgentCapability2["LANGUAGE_TRANSLATION"] = 5] = "LANGUAGE_TRANSLATION";
31
+ AIAgentCapability2[AIAgentCapability2["SUMMARIZATION_EXTRACTION"] = 6] = "SUMMARIZATION_EXTRACTION";
32
+ AIAgentCapability2[AIAgentCapability2["KNOWLEDGE_RETRIEVAL"] = 7] = "KNOWLEDGE_RETRIEVAL";
33
+ AIAgentCapability2[AIAgentCapability2["DATA_INTEGRATION"] = 8] = "DATA_INTEGRATION";
34
+ AIAgentCapability2[AIAgentCapability2["MARKET_INTELLIGENCE"] = 9] = "MARKET_INTELLIGENCE";
35
+ AIAgentCapability2[AIAgentCapability2["TRANSACTION_ANALYTICS"] = 10] = "TRANSACTION_ANALYTICS";
36
+ AIAgentCapability2[AIAgentCapability2["SMART_CONTRACT_AUDIT"] = 11] = "SMART_CONTRACT_AUDIT";
37
+ AIAgentCapability2[AIAgentCapability2["GOVERNANCE_FACILITATION"] = 12] = "GOVERNANCE_FACILITATION";
38
+ AIAgentCapability2[AIAgentCapability2["SECURITY_MONITORING"] = 13] = "SECURITY_MONITORING";
39
+ AIAgentCapability2[AIAgentCapability2["COMPLIANCE_ANALYSIS"] = 14] = "COMPLIANCE_ANALYSIS";
40
+ AIAgentCapability2[AIAgentCapability2["FRAUD_DETECTION"] = 15] = "FRAUD_DETECTION";
41
+ AIAgentCapability2[AIAgentCapability2["MULTI_AGENT_COORDINATION"] = 16] = "MULTI_AGENT_COORDINATION";
42
+ AIAgentCapability2[AIAgentCapability2["API_INTEGRATION"] = 17] = "API_INTEGRATION";
43
+ AIAgentCapability2[AIAgentCapability2["WORKFLOW_AUTOMATION"] = 18] = "WORKFLOW_AUTOMATION";
44
+ return AIAgentCapability2;
45
+ })(AIAgentCapability || {});
46
+ const SUPPORTED_SOCIAL_PLATFORMS = [
47
+ "twitter",
48
+ "github",
49
+ "discord",
50
+ "telegram",
51
+ "linkedin",
52
+ "youtube"
53
+ ];
54
+ const SocialLinkSchema = z.object({
55
+ platform: z.string().min(1),
56
+ handle: z.string().min(1)
57
+ });
58
+ const AIAgentDetailsSchema = z.object({
59
+ type: z.nativeEnum(AIAgentType),
60
+ capabilities: z.array(z.nativeEnum(AIAgentCapability)).min(1),
61
+ model: z.string().min(1),
62
+ creator: z.string().optional()
63
+ });
64
+ const BaseProfileSchema = z.object({
65
+ version: z.string().min(1),
66
+ type: z.nativeEnum(ProfileType),
67
+ display_name: z.string().min(1),
68
+ alias: z.string().optional(),
69
+ bio: z.string().optional(),
70
+ socials: z.array(SocialLinkSchema).optional(),
71
+ profileImage: z.string().optional(),
72
+ properties: z.record(z.any()).optional(),
73
+ inboundTopicId: z.string().optional(),
74
+ outboundTopicId: z.string().optional()
75
+ });
76
+ const PersonalProfileSchema = BaseProfileSchema.extend({
77
+ type: z.literal(
78
+ 0
79
+ /* PERSONAL */
80
+ ),
81
+ language: z.string().optional(),
82
+ timezone: z.string().optional()
83
+ });
84
+ const AIAgentProfileSchema = BaseProfileSchema.extend({
85
+ type: z.literal(
86
+ 1
87
+ /* AI_AGENT */
88
+ ),
89
+ aiAgent: AIAgentDetailsSchema
90
+ });
91
+ const HCS11ProfileSchema = z.union([
92
+ PersonalProfileSchema,
93
+ AIAgentProfileSchema
94
+ ]);
95
+ const capabilityNameToCapabilityMap = {
96
+ text_generation: 0,
97
+ image_generation: 1,
98
+ audio_generation: 2,
99
+ video_generation: 3,
100
+ code_generation: 4,
101
+ language_translation: 5,
102
+ summarization: 6,
103
+ extraction: 6,
104
+ knowledge_retrieval: 7,
105
+ data_integration: 8,
106
+ data_visualization: 8,
107
+ market_intelligence: 9,
108
+ transaction_analytics: 10,
109
+ smart_contract_audit: 11,
110
+ governance: 12,
111
+ security_monitoring: 13,
112
+ compliance_analysis: 14,
113
+ fraud_detection: 15,
114
+ multi_agent: 16,
115
+ api_integration: 17,
116
+ workflow_automation: 18
117
+ /* WORKFLOW_AUTOMATION */
118
+ };
119
+ class HCS11Client {
120
+ constructor(config) {
121
+ this.client = config.network === "mainnet" ? Client.forMainnet() : Client.forTestnet();
122
+ this.auth = config.auth;
123
+ this.network = config.network;
124
+ this.mirrorNode = new HederaMirrorNode(
125
+ this.network,
126
+ this.logger
127
+ );
128
+ if (this.auth.privateKey) {
129
+ const privateKey = PrivateKey.fromString(this.auth.privateKey);
130
+ this.client.setOperator(this.auth.operatorId, privateKey);
131
+ }
132
+ this.logger = Logger.getInstance({
133
+ level: config.logLevel || "info",
134
+ module: "HCS-11"
135
+ });
136
+ }
137
+ getClient() {
138
+ return this.client;
139
+ }
140
+ getOperatorId() {
141
+ return this.auth.operatorId;
142
+ }
143
+ createPersonalProfile(displayName, options) {
144
+ return {
145
+ version: "1.0",
146
+ type: 0,
147
+ display_name: displayName,
148
+ alias: options?.alias,
149
+ bio: options?.bio,
150
+ socials: options?.socials,
151
+ profileImage: options?.profileImage,
152
+ language: options?.language,
153
+ timezone: options?.timezone,
154
+ properties: options?.properties,
155
+ inboundTopicId: options?.inboundTopicId,
156
+ outboundTopicId: options?.outboundTopicId
157
+ };
158
+ }
159
+ createAIAgentProfile(displayName, agentType, capabilities, model, options) {
160
+ const validation = this.validateProfile({
161
+ version: "1.0",
162
+ type: 1,
163
+ display_name: displayName,
164
+ alias: options?.alias,
165
+ bio: options?.bio,
166
+ socials: options?.socials,
167
+ profileImage: options?.profileImage,
168
+ properties: options?.properties,
169
+ inboundTopicId: options?.inboundTopicId,
170
+ outboundTopicId: options?.outboundTopicId,
171
+ aiAgent: {
172
+ type: agentType,
173
+ capabilities,
174
+ model,
175
+ creator: options?.creator
176
+ }
177
+ });
178
+ if (!validation.valid) {
179
+ throw new Error(
180
+ `Invalid AI Agent Profile: ${validation.errors.join(", ")}`
181
+ );
182
+ }
183
+ return {
184
+ version: "1.0",
185
+ type: 1,
186
+ display_name: displayName,
187
+ alias: options?.alias,
188
+ bio: options?.bio,
189
+ socials: options?.socials,
190
+ profileImage: options?.profileImage,
191
+ properties: options?.properties,
192
+ inboundTopicId: options?.inboundTopicId,
193
+ outboundTopicId: options?.outboundTopicId,
194
+ aiAgent: {
195
+ type: agentType,
196
+ capabilities,
197
+ model,
198
+ creator: options?.creator
199
+ }
200
+ };
201
+ }
202
+ validateProfile(profile) {
203
+ const result = HCS11ProfileSchema.safeParse(profile);
204
+ if (result.success) {
205
+ return { valid: true, errors: [] };
206
+ }
207
+ const formattedErrors = result.error.errors.map((err) => {
208
+ const path = err.path.join(".");
209
+ let message = err.message;
210
+ if (err.code === "invalid_type") {
211
+ message = `Expected ${err.expected}, got ${err.received}`;
212
+ } else if (err.code === "invalid_enum_value") {
213
+ const validOptions = err.options?.join(", ");
214
+ message = `Invalid value. Valid options are: ${validOptions}`;
215
+ } else if (err.code === "too_small" && err.type === "string") {
216
+ message = "Cannot be empty";
217
+ }
218
+ return `${path}: ${message}`;
219
+ });
220
+ return { valid: false, errors: formattedErrors };
221
+ }
222
+ profileToJSONString(profile) {
223
+ return JSON.stringify(profile);
224
+ }
225
+ parseProfileFromString(profileStr) {
226
+ try {
227
+ const parsedProfile = JSON.parse(profileStr);
228
+ const validation = this.validateProfile(parsedProfile);
229
+ if (!validation.valid) {
230
+ this.logger.error("Invalid profile format:", validation.errors);
231
+ return null;
232
+ }
233
+ return parsedProfile;
234
+ } catch (error) {
235
+ this.logger.error("Error parsing profile:", error);
236
+ return null;
237
+ }
238
+ }
239
+ setProfileForAccountMemo(topicId, topicStandard = 1) {
240
+ return `hcs-11:hcs://${topicStandard}/${topicId}`;
241
+ }
242
+ async executeTransaction(transaction) {
243
+ try {
244
+ if (this.auth.privateKey) {
245
+ const signedTx = await transaction.signWithOperator(this.client);
246
+ const response2 = await signedTx.execute(this.client);
247
+ const receipt2 = await response2.getReceipt(this.client);
248
+ if (receipt2.status !== Status.Success) {
249
+ return {
250
+ success: false,
251
+ error: `Transaction failed: ${receipt2.status.toString()}`
252
+ };
253
+ }
254
+ return {
255
+ success: true,
256
+ result: receipt2
257
+ };
258
+ }
259
+ if (!this.auth.signer) {
260
+ throw new Error("No valid authentication method provided");
261
+ }
262
+ const signer = this.auth.signer;
263
+ const frozenTransaction = await transaction.freezeWithSigner(signer);
264
+ const response = await frozenTransaction.executeWithSigner(signer);
265
+ const receipt = await response.getReceiptWithSigner(signer);
266
+ if (receipt.status !== Status.Success) {
267
+ return {
268
+ success: false,
269
+ error: `Transaction failed: ${receipt.status.toString()}`
270
+ };
271
+ }
272
+ return {
273
+ success: true,
274
+ result: receipt
275
+ };
276
+ } catch (error) {
277
+ return {
278
+ success: false,
279
+ error: error instanceof Error ? error.message : "Unknown error during transaction execution"
280
+ };
281
+ }
282
+ }
283
+ async inscribeImage(buffer, fileName, options) {
284
+ try {
285
+ const progressCallback = options?.progressCallback;
286
+ const progressReporter = new ProgressReporter({
287
+ module: "HCS11-Image",
288
+ logger: this.logger,
289
+ callback: progressCallback
290
+ });
291
+ progressReporter.preparing("Preparing to inscribe image", 0);
292
+ const mimeType = mimeTypesExports.lookup(fileName) || "application/octet-stream";
293
+ const waitForConfirmation = options?.waitForConfirmation ?? true;
294
+ let inscriptionResponse;
295
+ if (this.auth.signer) {
296
+ if ("accountId" in this.auth.signer) {
297
+ progressReporter.preparing("Using signer for inscription", 10);
298
+ inscriptionResponse = await inscribeWithSigner(
299
+ {
300
+ type: "buffer",
301
+ buffer,
302
+ fileName,
303
+ mimeType
304
+ },
305
+ this.auth.signer,
306
+ {
307
+ network: this.network,
308
+ waitForConfirmation,
309
+ waitMaxAttempts: 150,
310
+ waitIntervalMs: 4e3,
311
+ logging: {
312
+ level: "debug"
313
+ },
314
+ progressCallback: (data) => {
315
+ const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;
316
+ progressReporter.report({
317
+ stage: data.stage,
318
+ message: data.message,
319
+ progressPercent: adjustedPercent,
320
+ details: data.details
321
+ });
322
+ }
323
+ }
324
+ );
325
+ } else {
326
+ progressReporter.failed(
327
+ "Signer must be a DAppSigner for inscription"
328
+ );
329
+ throw new Error("Signer must be a DAppSigner for inscription");
330
+ }
331
+ } else {
332
+ if (!this.auth.privateKey) {
333
+ progressReporter.failed("Private key is required for inscription");
334
+ this.logger.error("Private key is required for inscription");
335
+ throw new Error("Private key is required for inscription");
336
+ }
337
+ progressReporter.preparing("Using private key for inscription", 10);
338
+ inscriptionResponse = await inscribe(
339
+ {
340
+ type: "buffer",
341
+ buffer,
342
+ fileName,
343
+ mimeType
344
+ },
345
+ {
346
+ accountId: this.auth.operatorId,
347
+ privateKey: this.auth.privateKey,
348
+ network: this.network
349
+ },
350
+ {
351
+ waitForConfirmation,
352
+ waitMaxAttempts: 150,
353
+ waitIntervalMs: 2e3,
354
+ logging: {
355
+ level: "debug"
356
+ },
357
+ progressCallback: (data) => {
358
+ const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;
359
+ progressReporter.report({
360
+ stage: data.stage,
361
+ message: data.message,
362
+ progressPercent: adjustedPercent,
363
+ details: data.details
364
+ });
365
+ }
366
+ }
367
+ );
368
+ }
369
+ if (inscriptionResponse.confirmed) {
370
+ progressReporter.completed("Image inscription completed", {
371
+ topic_id: inscriptionResponse.inscription.topic_id
372
+ });
373
+ return {
374
+ imageTopicId: inscriptionResponse.inscription.topic_id || "",
375
+ transactionId: inscriptionResponse.result.jobId,
376
+ success: true
377
+ };
378
+ } else {
379
+ progressReporter.verifying("Waiting for inscription confirmation", 50, {
380
+ jobId: inscriptionResponse.result.jobId
381
+ });
382
+ return {
383
+ imageTopicId: "",
384
+ transactionId: inscriptionResponse.result.jobId,
385
+ success: false,
386
+ error: "Inscription not confirmed"
387
+ };
388
+ }
389
+ } catch (error) {
390
+ this.logger.error("Error inscribing image:", error);
391
+ return {
392
+ imageTopicId: "",
393
+ transactionId: "",
394
+ success: false,
395
+ error: error.message || "Error inscribing image"
396
+ };
397
+ }
398
+ }
399
+ async inscribeProfile(profile, options) {
400
+ this.logger.info("Inscribing HCS-11 profile");
401
+ const progressCallback = options?.progressCallback;
402
+ const progressReporter = new ProgressReporter({
403
+ module: "HCS11-Profile",
404
+ logger: this.logger,
405
+ callback: progressCallback
406
+ });
407
+ progressReporter.preparing("Validating profile data", 5);
408
+ const validation = this.validateProfile(profile);
409
+ if (!validation.valid) {
410
+ progressReporter.failed(
411
+ `Invalid profile: ${validation.errors.join(", ")}`
412
+ );
413
+ return {
414
+ profileTopicId: "",
415
+ transactionId: "",
416
+ success: false,
417
+ error: `Invalid profile: ${validation.errors.join(", ")}`
418
+ };
419
+ }
420
+ progressReporter.preparing("Formatting profile for inscription", 15);
421
+ const profileJson = this.profileToJSONString(profile);
422
+ const fileName = `profile-${profile.display_name.toLowerCase().replace(/\s+/g, "-")}.json`;
423
+ try {
424
+ const contentBuffer = Buffer.from(profileJson, "utf-8");
425
+ const contentType = "application/json";
426
+ progressReporter.preparing("Preparing profile for inscription", 20);
427
+ const input = {
428
+ type: "buffer",
429
+ buffer: contentBuffer,
430
+ fileName,
431
+ mimeType: contentType
432
+ };
433
+ const inscriptionOptions = {
434
+ waitForConfirmation: true,
435
+ mode: "file",
436
+ network: this.network,
437
+ waitMaxAttempts: 100,
438
+ waitIntervalMs: 2e3,
439
+ progressCallback: (data) => {
440
+ const adjustedPercent = 20 + Number(data?.progressPercent || 0) * 0.75;
441
+ progressReporter?.report({
442
+ stage: data.stage,
443
+ message: data.message,
444
+ progressPercent: adjustedPercent,
445
+ details: data.details
446
+ });
447
+ }
448
+ };
449
+ progressReporter.submitting("Submitting profile to Hedera network", 30);
450
+ const inscriptionResponse = this.auth.privateKey ? await inscribe(
451
+ input,
452
+ {
453
+ accountId: this.auth.operatorId,
454
+ privateKey: this.auth.privateKey,
455
+ network: this.network
456
+ },
457
+ inscriptionOptions
458
+ ) : await inscribeWithSigner(
459
+ input,
460
+ this.auth.signer,
461
+ inscriptionOptions
462
+ );
463
+ if (!inscriptionResponse.confirmed || !inscriptionResponse.inscription.topic_id) {
464
+ progressReporter.failed("Failed to inscribe profile content");
465
+ return {
466
+ profileTopicId: "",
467
+ transactionId: "",
468
+ success: false,
469
+ error: "Failed to inscribe profile content"
470
+ };
471
+ }
472
+ const topicId = inscriptionResponse.inscription.topic_id;
473
+ progressReporter.completed("Profile inscription completed", {
474
+ topicId,
475
+ transactionId: inscriptionResponse.result.transactionId
476
+ });
477
+ return {
478
+ profileTopicId: topicId,
479
+ transactionId: inscriptionResponse.result.transactionId,
480
+ success: true
481
+ };
482
+ } catch (error) {
483
+ progressReporter.failed(
484
+ `Error inscribing profile: ${error.message || "Unknown error"}`
485
+ );
486
+ return {
487
+ profileTopicId: "",
488
+ transactionId: "",
489
+ success: false,
490
+ error: error.message || "Unknown error during inscription"
491
+ };
492
+ }
493
+ }
494
+ async updateAccountMemoWithProfile(accountId, profileTopicId) {
495
+ try {
496
+ this.logger.info(
497
+ `Updating account memo for ${accountId} with profile ${profileTopicId}`
498
+ );
499
+ const memo = this.setProfileForAccountMemo(profileTopicId);
500
+ const transaction = new AccountUpdateTransaction().setAccountMemo(memo).setAccountId(accountId);
501
+ return this.executeTransaction(transaction);
502
+ } catch (error) {
503
+ this.logger.error(
504
+ `Error updating account memo: ${error instanceof Error ? error.message : "Unknown error"}`
505
+ );
506
+ return {
507
+ success: false,
508
+ error: error instanceof Error ? error.message : "Unknown error updating account memo"
509
+ };
510
+ }
511
+ }
512
+ /**
513
+ * Creates and inscribes a profile.
514
+ *
515
+ * @param profile - The profile to create and inscribe.
516
+ * @param updateAccountMemo - Whether to update the account memo with the profile.
517
+ * @param options - Optional configuration options.
518
+ * @returns A promise that resolves to the inscription result.
519
+ */
520
+ async createAndInscribeProfile(profile, updateAccountMemo = true, options) {
521
+ const progressCallback = options?.progressCallback;
522
+ const progressReporter = new ProgressReporter({
523
+ module: "HCS11-ProfileCreation",
524
+ logger: this.logger,
525
+ callback: progressCallback
526
+ });
527
+ progressReporter.preparing("Starting profile creation process", 0);
528
+ const inscriptionProgress = progressReporter.createSubProgress({
529
+ minPercent: 0,
530
+ maxPercent: 80,
531
+ logPrefix: "Inscription"
532
+ });
533
+ const inscriptionResult = await this.inscribeProfile(profile, {
534
+ ...options,
535
+ progressCallback: (data) => {
536
+ inscriptionProgress.report({
537
+ stage: data.stage,
538
+ message: data.message,
539
+ progressPercent: data.progressPercent,
540
+ details: data.details
541
+ });
542
+ }
543
+ });
544
+ if (!inscriptionResult?.success) {
545
+ progressReporter.failed("Profile inscription failed", {
546
+ error: inscriptionResult?.error
547
+ });
548
+ return inscriptionResult;
549
+ }
550
+ progressReporter.confirming("Profile inscribed, updating account memo", 85);
551
+ if (updateAccountMemo) {
552
+ const memoResult = await this.updateAccountMemoWithProfile(
553
+ this.auth.operatorId,
554
+ inscriptionResult.profileTopicId
555
+ );
556
+ if (!memoResult.success) {
557
+ progressReporter.failed("Failed to update account memo", {
558
+ error: memoResult?.error
559
+ });
560
+ return {
561
+ ...inscriptionResult,
562
+ success: false,
563
+ error: memoResult?.error
564
+ };
565
+ }
566
+ }
567
+ progressReporter.completed("Profile creation completed successfully", {
568
+ profileTopicId: inscriptionResult.profileTopicId,
569
+ transactionId: inscriptionResult.transactionId
570
+ });
571
+ return inscriptionResult;
572
+ }
573
+ /**
574
+ * Gets the capabilities from the capability names.
575
+ *
576
+ * @param capabilityNames - The capability names to get the capabilities for.
577
+ * @returns The capabilities.
578
+ */
579
+ async getCapabilitiesFromTags(capabilityNames) {
580
+ const capabilities = [];
581
+ if (capabilityNames.length === 0) {
582
+ return [
583
+ 0
584
+ /* TEXT_GENERATION */
585
+ ];
586
+ }
587
+ for (const capabilityName of capabilityNames) {
588
+ const capability = capabilityNameToCapabilityMap[capabilityName.toLowerCase()];
589
+ if (capability !== void 0 && !capabilities.includes(capability)) {
590
+ capabilities.push(capability);
591
+ }
592
+ }
593
+ if (capabilities.length === 0) {
594
+ capabilities.push(
595
+ 0
596
+ /* TEXT_GENERATION */
597
+ );
598
+ }
599
+ return capabilities;
600
+ }
601
+ /**
602
+ * Gets the agent type from the metadata.
603
+ *
604
+ * @param metadata - The metadata of the agent.
605
+ * @returns The agent type.
606
+ */
607
+ getAgentTypeFromMetadata(metadata) {
608
+ if (metadata.type === "autonomous") {
609
+ return 1;
610
+ } else {
611
+ return 0;
612
+ }
613
+ }
614
+ /**
615
+ * Fetches a profile from the account memo.
616
+ *
617
+ * @param accountId - The account ID of the agent to fetch the profile for.
618
+ * @param network - The network to use for the fetch.
619
+ * @returns A promise that resolves to the profile.
620
+ */
621
+ async fetchProfileByAccountId(accountId, network) {
622
+ try {
623
+ this.logger.info(
624
+ `Fetching profile for account ${accountId.toString()} on ${this.network}`
625
+ );
626
+ const memo = await this.mirrorNode.getAccountMemo(accountId.toString());
627
+ this.logger.info(`Got account memo: ${memo}`);
628
+ if (!memo?.startsWith("hcs-11:")) {
629
+ return {
630
+ success: false,
631
+ error: `Account ${accountId.toString()} does not have a valid HCS-11 memo`
632
+ };
633
+ }
634
+ this.logger.info(`Found HCS-11 memo: ${memo}`);
635
+ const protocolReference = memo.substring(7);
636
+ if (protocolReference?.startsWith("hcs://")) {
637
+ const hcsFormat = protocolReference.match(/hcs:\/\/(\d+)\/(.+)/);
638
+ if (!hcsFormat) {
639
+ return {
640
+ success: false,
641
+ error: `Invalid HCS protocol reference format: ${protocolReference}`
642
+ };
643
+ }
644
+ const [_, protocolId, profileTopicId] = hcsFormat;
645
+ const networkParam = network || this.network || "mainnet";
646
+ this.logger.info(
647
+ `Retrieving profile from Kiloscribe CDN: ${profileTopicId}`
648
+ );
649
+ const cdnUrl = `https://kiloscribe.com/api/inscription-cdn/${profileTopicId}?network=${networkParam}`;
650
+ try {
651
+ const response = await fetch(cdnUrl);
652
+ if (!response.ok) {
653
+ return {
654
+ success: false,
655
+ error: `Failed to fetch profile from Kiloscribe CDN: ${response.statusText}`
656
+ };
657
+ }
658
+ const profileData = await response.json();
659
+ if (!profileData) {
660
+ return {
661
+ success: false,
662
+ error: `No profile data found for topic ${profileTopicId}`
663
+ };
664
+ }
665
+ return {
666
+ success: true,
667
+ profile: profileData,
668
+ topicInfo: {
669
+ inboundTopic: profileData.inboundTopicId,
670
+ outboundTopic: profileData.outboundTopicId,
671
+ profileTopicId
672
+ }
673
+ };
674
+ } catch (cdnError) {
675
+ this.logger.error(
676
+ `Error retrieving from Kiloscribe CDN: ${cdnError.message}`
677
+ );
678
+ return {
679
+ success: false,
680
+ error: `Error retrieving from Kiloscribe CDN: ${cdnError.message}`
681
+ };
682
+ }
683
+ } else if (protocolReference.startsWith("ipfs://")) {
684
+ this.logger.warn("IPFS protocol references are not fully supported");
685
+ const response = await fetch(
686
+ `https://ipfs.io/ipfs/${protocolReference.replace("ipfs://", "")}`
687
+ );
688
+ const profileData = await response.json();
689
+ return {
690
+ success: true,
691
+ profile: profileData,
692
+ topicInfo: {
693
+ inboundTopic: profileData.inboundTopicId,
694
+ outboundTopic: profileData.outboundTopicId,
695
+ profileTopicId: profileData.profileTopicId
696
+ }
697
+ };
698
+ } else if (protocolReference.startsWith("ar://")) {
699
+ const arTxId = protocolReference.replace("ar://", "");
700
+ const response = await fetch(`https://arweave.net/${arTxId}`);
701
+ if (!response.ok) {
702
+ return {
703
+ success: false,
704
+ error: `Failed to fetch profile from Arweave ${arTxId}: ${response.statusText}`
705
+ };
706
+ }
707
+ const profileData = await response.json();
708
+ return {
709
+ success: true,
710
+ profile: profileData,
711
+ topicInfo: {
712
+ inboundTopic: profileData.inboundTopicId,
713
+ outboundTopic: profileData.outboundTopicId,
714
+ profileTopicId: profileData.profileTopicId
715
+ }
716
+ };
717
+ } else {
718
+ return {
719
+ success: false,
720
+ error: `Invalid protocol reference format: ${protocolReference}`
721
+ };
722
+ }
723
+ } catch (error) {
724
+ this.logger.error(`Error fetching profile: ${error.message}`);
725
+ return {
726
+ success: false,
727
+ error: `Error fetching profile: ${error.message}`
728
+ };
729
+ }
730
+ }
731
+ }
732
+ export {
733
+ AIAgentCapability,
734
+ AIAgentType,
735
+ EndpointType,
736
+ HCS11Client,
737
+ ProfileType,
738
+ SUPPORTED_SOCIAL_PLATFORMS,
739
+ capabilityNameToCapabilityMap
740
+ };
741
+ //# sourceMappingURL=standards-sdk.es12.js.map