@hashgraphonline/standards-sdk 0.1.143-feat-solana-register.canary.1c6f446.78 → 0.1.144-feat-solana-register.canary.d5edcec.80

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 (340) hide show
  1. package/dist/cjs/hcs-10/sdk.d.ts.map +1 -1
  2. package/dist/cjs/hcs-14/issuers/hiero.d.ts.map +1 -1
  3. package/dist/cjs/index.d.ts.map +1 -1
  4. package/dist/cjs/services/registry-broker/schemas.d.ts +153 -153
  5. package/dist/cjs/standards-sdk.cjs +2 -2
  6. package/dist/cjs/standards-sdk.cjs.map +1 -1
  7. package/dist/cjs/utils/dynamic-import.d.ts +5 -1
  8. package/dist/cjs/utils/dynamic-import.d.ts.map +1 -1
  9. package/dist/es/hcs-10/sdk.d.ts.map +1 -1
  10. package/dist/es/hcs-14/issuers/hiero.d.ts.map +1 -1
  11. package/dist/es/index.d.ts.map +1 -1
  12. package/dist/es/services/registry-broker/schemas.d.ts +153 -153
  13. package/dist/es/standards-sdk.es.js +134 -135
  14. package/dist/es/standards-sdk.es.js.map +1 -1
  15. package/dist/es/standards-sdk.es10.js +70 -90
  16. package/dist/es/standards-sdk.es10.js.map +1 -1
  17. package/dist/es/standards-sdk.es100.js +229 -27
  18. package/dist/es/standards-sdk.es100.js.map +1 -1
  19. package/dist/es/standards-sdk.es101.js +109 -228
  20. package/dist/es/standards-sdk.es101.js.map +1 -1
  21. package/dist/es/standards-sdk.es102.js +15 -94
  22. package/dist/es/standards-sdk.es102.js.map +1 -1
  23. package/dist/es/standards-sdk.es103.js +80 -30
  24. package/dist/es/standards-sdk.es103.js.map +1 -1
  25. package/dist/es/standards-sdk.es104.js +27 -80
  26. package/dist/es/standards-sdk.es104.js.map +1 -1
  27. package/dist/es/standards-sdk.es105.js +136 -25
  28. package/dist/es/standards-sdk.es105.js.map +1 -1
  29. package/dist/es/standards-sdk.es106.js +27 -140
  30. package/dist/es/standards-sdk.es106.js.map +1 -1
  31. package/dist/es/standards-sdk.es107.js +20 -27
  32. package/dist/es/standards-sdk.es107.js.map +1 -1
  33. package/dist/es/standards-sdk.es108.js +156 -18
  34. package/dist/es/standards-sdk.es108.js.map +1 -1
  35. package/dist/es/standards-sdk.es109.js +198 -148
  36. package/dist/es/standards-sdk.es109.js.map +1 -1
  37. package/dist/es/standards-sdk.es11.js +121 -45
  38. package/dist/es/standards-sdk.es11.js.map +1 -1
  39. package/dist/es/standards-sdk.es110.js +747 -167
  40. package/dist/es/standards-sdk.es110.js.map +1 -1
  41. package/dist/es/standards-sdk.es111.js +9 -786
  42. package/dist/es/standards-sdk.es111.js.map +1 -1
  43. package/dist/es/standards-sdk.es112.js +567 -13
  44. package/dist/es/standards-sdk.es112.js.map +1 -1
  45. package/dist/es/standards-sdk.es113.js +576 -541
  46. package/dist/es/standards-sdk.es113.js.map +1 -1
  47. package/dist/es/standards-sdk.es114.js +12 -601
  48. package/dist/es/standards-sdk.es114.js.map +1 -1
  49. package/dist/es/standards-sdk.es115.js +2 -13
  50. package/dist/es/standards-sdk.es115.js.map +1 -1
  51. package/dist/es/standards-sdk.es116.js +87 -2
  52. package/dist/es/standards-sdk.es116.js.map +1 -1
  53. package/dist/es/standards-sdk.es117.js +37 -84
  54. package/dist/es/standards-sdk.es117.js.map +1 -1
  55. package/dist/es/standards-sdk.es118.js +2 -40
  56. package/dist/es/standards-sdk.es118.js.map +1 -1
  57. package/dist/es/standards-sdk.es119.js +231 -2
  58. package/dist/es/standards-sdk.es119.js.map +1 -1
  59. package/dist/es/standards-sdk.es12.js +60 -159
  60. package/dist/es/standards-sdk.es12.js.map +1 -1
  61. package/dist/es/standards-sdk.es120.js +1110 -201
  62. package/dist/es/standards-sdk.es120.js.map +1 -1
  63. package/dist/es/standards-sdk.es121.js +225 -1059
  64. package/dist/es/standards-sdk.es121.js.map +1 -1
  65. package/dist/es/standards-sdk.es122.js +419 -303
  66. package/dist/es/standards-sdk.es122.js.map +1 -1
  67. package/dist/es/standards-sdk.es123.js +351 -418
  68. package/dist/es/standards-sdk.es123.js.map +1 -1
  69. package/dist/es/standards-sdk.es124.js +872 -347
  70. package/dist/es/standards-sdk.es124.js.map +1 -1
  71. package/dist/es/standards-sdk.es125.js +182 -854
  72. package/dist/es/standards-sdk.es125.js.map +1 -1
  73. package/dist/es/standards-sdk.es126.js +1512 -153
  74. package/dist/es/standards-sdk.es126.js.map +1 -1
  75. package/dist/es/standards-sdk.es127.js +157 -1547
  76. package/dist/es/standards-sdk.es127.js.map +1 -1
  77. package/dist/es/standards-sdk.es128.js +192 -162
  78. package/dist/es/standards-sdk.es128.js.map +1 -1
  79. package/dist/es/standards-sdk.es129.js +61 -164
  80. package/dist/es/standards-sdk.es129.js.map +1 -1
  81. package/dist/es/standards-sdk.es13.js +200 -60
  82. package/dist/es/standards-sdk.es13.js.map +1 -1
  83. package/dist/es/standards-sdk.es130.js +102 -85
  84. package/dist/es/standards-sdk.es130.js.map +1 -1
  85. package/dist/es/standards-sdk.es131.js +222 -96
  86. package/dist/es/standards-sdk.es131.js.map +1 -1
  87. package/dist/es/standards-sdk.es132.js +153 -220
  88. package/dist/es/standards-sdk.es132.js.map +1 -1
  89. package/dist/es/standards-sdk.es133.js +104 -162
  90. package/dist/es/standards-sdk.es133.js.map +1 -1
  91. package/dist/es/standards-sdk.es134.js +296 -92
  92. package/dist/es/standards-sdk.es134.js.map +1 -1
  93. package/dist/es/standards-sdk.es135.js +432 -294
  94. package/dist/es/standards-sdk.es135.js.map +1 -1
  95. package/dist/es/standards-sdk.es136.js +14 -461
  96. package/dist/es/standards-sdk.es136.js.map +1 -1
  97. package/dist/es/standards-sdk.es137.js +79 -15
  98. package/dist/es/standards-sdk.es137.js.map +1 -1
  99. package/dist/es/standards-sdk.es138.js +77 -71
  100. package/dist/es/standards-sdk.es138.js.map +1 -1
  101. package/dist/es/standards-sdk.es139.js +152 -80
  102. package/dist/es/standards-sdk.es139.js.map +1 -1
  103. package/dist/es/standards-sdk.es14.js +149 -178
  104. package/dist/es/standards-sdk.es14.js.map +1 -1
  105. package/dist/es/standards-sdk.es140.js +7 -159
  106. package/dist/es/standards-sdk.es140.js.map +1 -1
  107. package/dist/es/standards-sdk.es141.js +86 -7
  108. package/dist/es/standards-sdk.es141.js.map +1 -1
  109. package/dist/es/standards-sdk.es142.js +44 -65
  110. package/dist/es/standards-sdk.es142.js.map +1 -1
  111. package/dist/es/standards-sdk.es143.js +30 -65
  112. package/dist/es/standards-sdk.es143.js.map +1 -1
  113. package/dist/es/standards-sdk.es144.js +34 -30
  114. package/dist/es/standards-sdk.es144.js.map +1 -1
  115. package/dist/es/standards-sdk.es145.js +28 -34
  116. package/dist/es/standards-sdk.es145.js.map +1 -1
  117. package/dist/es/standards-sdk.es146.js +138 -28
  118. package/dist/es/standards-sdk.es146.js.map +1 -1
  119. package/dist/es/standards-sdk.es147.js +37 -133
  120. package/dist/es/standards-sdk.es147.js.map +1 -1
  121. package/dist/es/standards-sdk.es148.js +12280 -33
  122. package/dist/es/standards-sdk.es148.js.map +1 -1
  123. package/dist/es/standards-sdk.es149.js +1 -1
  124. package/dist/es/standards-sdk.es15.js +152 -151
  125. package/dist/es/standards-sdk.es15.js.map +1 -1
  126. package/dist/es/standards-sdk.es150.js +12 -12284
  127. package/dist/es/standards-sdk.es150.js.map +1 -1
  128. package/dist/es/standards-sdk.es151.js +54 -15
  129. package/dist/es/standards-sdk.es151.js.map +1 -1
  130. package/dist/es/standards-sdk.es152.js +72 -160
  131. package/dist/es/standards-sdk.es152.js.map +1 -1
  132. package/dist/es/standards-sdk.es153.js +139 -289
  133. package/dist/es/standards-sdk.es153.js.map +1 -1
  134. package/dist/es/standards-sdk.es154.js +274 -298
  135. package/dist/es/standards-sdk.es154.js.map +1 -1
  136. package/dist/es/standards-sdk.es155.js +262 -369
  137. package/dist/es/standards-sdk.es155.js.map +1 -1
  138. package/dist/es/standards-sdk.es156.js +316 -194
  139. package/dist/es/standards-sdk.es156.js.map +1 -1
  140. package/dist/es/standards-sdk.es157.js +319 -64
  141. package/dist/es/standards-sdk.es157.js.map +1 -1
  142. package/dist/es/standards-sdk.es158.js +69 -49
  143. package/dist/es/standards-sdk.es158.js.map +1 -1
  144. package/dist/es/standards-sdk.es159.js +222 -65
  145. package/dist/es/standards-sdk.es159.js.map +1 -1
  146. package/dist/es/standards-sdk.es16.js +917 -136
  147. package/dist/es/standards-sdk.es16.js.map +1 -1
  148. package/dist/es/standards-sdk.es160.js +223 -218
  149. package/dist/es/standards-sdk.es160.js.map +1 -1
  150. package/dist/es/standards-sdk.es17.js +23 -948
  151. package/dist/es/standards-sdk.es17.js.map +1 -1
  152. package/dist/es/standards-sdk.es18.js +2422 -24
  153. package/dist/es/standards-sdk.es18.js.map +1 -1
  154. package/dist/es/standards-sdk.es19.js +818 -2092
  155. package/dist/es/standards-sdk.es19.js.map +1 -1
  156. package/dist/es/standards-sdk.es2.js +654 -189
  157. package/dist/es/standards-sdk.es2.js.map +1 -1
  158. package/dist/es/standards-sdk.es20.js +205 -1092
  159. package/dist/es/standards-sdk.es20.js.map +1 -1
  160. package/dist/es/standards-sdk.es21.js +858 -221
  161. package/dist/es/standards-sdk.es21.js.map +1 -1
  162. package/dist/es/standards-sdk.es22.js +179 -903
  163. package/dist/es/standards-sdk.es22.js.map +1 -1
  164. package/dist/es/standards-sdk.es23.js +164 -179
  165. package/dist/es/standards-sdk.es23.js.map +1 -1
  166. package/dist/es/standards-sdk.es24.js +62 -118
  167. package/dist/es/standards-sdk.es24.js.map +1 -1
  168. package/dist/es/standards-sdk.es25.js +377 -57
  169. package/dist/es/standards-sdk.es25.js.map +1 -1
  170. package/dist/es/standards-sdk.es26.js +36 -394
  171. package/dist/es/standards-sdk.es26.js.map +1 -1
  172. package/dist/es/standards-sdk.es27.js +901 -50
  173. package/dist/es/standards-sdk.es27.js.map +1 -1
  174. package/dist/es/standards-sdk.es28.js +134 -922
  175. package/dist/es/standards-sdk.es28.js.map +1 -1
  176. package/dist/es/standards-sdk.es29.js +7 -134
  177. package/dist/es/standards-sdk.es29.js.map +1 -1
  178. package/dist/es/standards-sdk.es3.js +63 -680
  179. package/dist/es/standards-sdk.es3.js.map +1 -1
  180. package/dist/es/standards-sdk.es30.js +344 -7
  181. package/dist/es/standards-sdk.es30.js.map +1 -1
  182. package/dist/es/standards-sdk.es31.js +302 -287
  183. package/dist/es/standards-sdk.es31.js.map +1 -1
  184. package/dist/es/standards-sdk.es32.js +94 -322
  185. package/dist/es/standards-sdk.es32.js.map +1 -1
  186. package/dist/es/standards-sdk.es33.js +458 -101
  187. package/dist/es/standards-sdk.es33.js.map +1 -1
  188. package/dist/es/standards-sdk.es34.js +132 -451
  189. package/dist/es/standards-sdk.es34.js.map +1 -1
  190. package/dist/es/standards-sdk.es35.js +216 -130
  191. package/dist/es/standards-sdk.es35.js.map +1 -1
  192. package/dist/es/standards-sdk.es36.js +273 -196
  193. package/dist/es/standards-sdk.es36.js.map +1 -1
  194. package/dist/es/standards-sdk.es37.js +148 -87
  195. package/dist/es/standards-sdk.es37.js.map +1 -1
  196. package/dist/es/standards-sdk.es38.js +183 -320
  197. package/dist/es/standards-sdk.es38.js.map +1 -1
  198. package/dist/es/standards-sdk.es39.js +238 -161
  199. package/dist/es/standards-sdk.es39.js.map +1 -1
  200. package/dist/es/standards-sdk.es4.js +425 -63
  201. package/dist/es/standards-sdk.es4.js.map +1 -1
  202. package/dist/es/standards-sdk.es40.js +136 -254
  203. package/dist/es/standards-sdk.es40.js.map +1 -1
  204. package/dist/es/standards-sdk.es41.js +225 -176
  205. package/dist/es/standards-sdk.es41.js.map +1 -1
  206. package/dist/es/standards-sdk.es42.js +199 -261
  207. package/dist/es/standards-sdk.es42.js.map +1 -1
  208. package/dist/es/standards-sdk.es43.js +237 -199
  209. package/dist/es/standards-sdk.es43.js.map +1 -1
  210. package/dist/es/standards-sdk.es44.js +209 -201
  211. package/dist/es/standards-sdk.es44.js.map +1 -1
  212. package/dist/es/standards-sdk.es45.js +305 -201
  213. package/dist/es/standards-sdk.es45.js.map +1 -1
  214. package/dist/es/standards-sdk.es46.js +371 -261
  215. package/dist/es/standards-sdk.es46.js.map +1 -1
  216. package/dist/es/standards-sdk.es47.js +316 -372
  217. package/dist/es/standards-sdk.es47.js.map +1 -1
  218. package/dist/es/standards-sdk.es48.js +404 -336
  219. package/dist/es/standards-sdk.es48.js.map +1 -1
  220. package/dist/es/standards-sdk.es49.js +83 -449
  221. package/dist/es/standards-sdk.es49.js.map +1 -1
  222. package/dist/es/standards-sdk.es5.js +232 -354
  223. package/dist/es/standards-sdk.es5.js.map +1 -1
  224. package/dist/es/standards-sdk.es50.js +179 -89
  225. package/dist/es/standards-sdk.es50.js.map +1 -1
  226. package/dist/es/standards-sdk.es51.js +231 -165
  227. package/dist/es/standards-sdk.es51.js.map +1 -1
  228. package/dist/es/standards-sdk.es52.js +25 -262
  229. package/dist/es/standards-sdk.es52.js.map +1 -1
  230. package/dist/es/standards-sdk.es53.js +56 -26
  231. package/dist/es/standards-sdk.es53.js.map +1 -1
  232. package/dist/es/standards-sdk.es54.js +12 -57
  233. package/dist/es/standards-sdk.es54.js.map +1 -1
  234. package/dist/es/standards-sdk.es55.js +49 -12
  235. package/dist/es/standards-sdk.es55.js.map +1 -1
  236. package/dist/es/standards-sdk.es56.js +115 -43
  237. package/dist/es/standards-sdk.es56.js.map +1 -1
  238. package/dist/es/standards-sdk.es57.js +42 -115
  239. package/dist/es/standards-sdk.es57.js.map +1 -1
  240. package/dist/es/standards-sdk.es58.js +52 -43
  241. package/dist/es/standards-sdk.es58.js.map +1 -1
  242. package/dist/es/standards-sdk.es59.js +36 -50
  243. package/dist/es/standards-sdk.es59.js.map +1 -1
  244. package/dist/es/standards-sdk.es6.js +125 -246
  245. package/dist/es/standards-sdk.es6.js.map +1 -1
  246. package/dist/es/standards-sdk.es60.js +207 -39
  247. package/dist/es/standards-sdk.es60.js.map +1 -1
  248. package/dist/es/standards-sdk.es61.js +24 -201
  249. package/dist/es/standards-sdk.es61.js.map +1 -1
  250. package/dist/es/standards-sdk.es62.js +87 -25
  251. package/dist/es/standards-sdk.es62.js.map +1 -1
  252. package/dist/es/standards-sdk.es63.js +3 -51
  253. package/dist/es/standards-sdk.es63.js.map +1 -1
  254. package/dist/es/standards-sdk.es64.js +100 -3
  255. package/dist/es/standards-sdk.es64.js.map +1 -1
  256. package/dist/es/standards-sdk.es65.js +61 -62
  257. package/dist/es/standards-sdk.es65.js.map +1 -1
  258. package/dist/es/standards-sdk.es66.js +17 -98
  259. package/dist/es/standards-sdk.es66.js.map +1 -1
  260. package/dist/es/standards-sdk.es67.js +77 -19
  261. package/dist/es/standards-sdk.es67.js.map +1 -1
  262. package/dist/es/standards-sdk.es68.js +458 -77
  263. package/dist/es/standards-sdk.es68.js.map +1 -1
  264. package/dist/es/standards-sdk.es69.js +106 -240
  265. package/dist/es/standards-sdk.es69.js.map +1 -1
  266. package/dist/es/standards-sdk.es7.js +28 -183
  267. package/dist/es/standards-sdk.es7.js.map +1 -1
  268. package/dist/es/standards-sdk.es70.js +170 -286
  269. package/dist/es/standards-sdk.es70.js.map +1 -1
  270. package/dist/es/standards-sdk.es71.js +71 -207
  271. package/dist/es/standards-sdk.es71.js.map +1 -1
  272. package/dist/es/standards-sdk.es72.js +71 -72
  273. package/dist/es/standards-sdk.es72.js.map +1 -1
  274. package/dist/es/standards-sdk.es73.js +143 -71
  275. package/dist/es/standards-sdk.es73.js.map +1 -1
  276. package/dist/es/standards-sdk.es74.js +62 -136
  277. package/dist/es/standards-sdk.es74.js.map +1 -1
  278. package/dist/es/standards-sdk.es75.js +380 -45
  279. package/dist/es/standards-sdk.es75.js.map +1 -1
  280. package/dist/es/standards-sdk.es76.js +222 -130
  281. package/dist/es/standards-sdk.es76.js.map +1 -1
  282. package/dist/es/standards-sdk.es77.js +320 -444
  283. package/dist/es/standards-sdk.es77.js.map +1 -1
  284. package/dist/es/standards-sdk.es78.js +88 -371
  285. package/dist/es/standards-sdk.es78.js.map +1 -1
  286. package/dist/es/standards-sdk.es79.js +125 -89
  287. package/dist/es/standards-sdk.es79.js.map +1 -1
  288. package/dist/es/standards-sdk.es8.js +80 -29
  289. package/dist/es/standards-sdk.es8.js.map +1 -1
  290. package/dist/es/standards-sdk.es80.js +8 -125
  291. package/dist/es/standards-sdk.es80.js.map +1 -1
  292. package/dist/es/standards-sdk.es81.js +45 -6
  293. package/dist/es/standards-sdk.es81.js.map +1 -1
  294. package/dist/es/standards-sdk.es82.js +98 -44
  295. package/dist/es/standards-sdk.es82.js.map +1 -1
  296. package/dist/es/standards-sdk.es83.js +331 -84
  297. package/dist/es/standards-sdk.es83.js.map +1 -1
  298. package/dist/es/standards-sdk.es84.js +93 -160
  299. package/dist/es/standards-sdk.es84.js.map +1 -1
  300. package/dist/es/standards-sdk.es85.js +55 -275
  301. package/dist/es/standards-sdk.es85.js.map +1 -1
  302. package/dist/es/standards-sdk.es86.js +43 -55
  303. package/dist/es/standards-sdk.es86.js.map +1 -1
  304. package/dist/es/standards-sdk.es87.js +145 -44
  305. package/dist/es/standards-sdk.es87.js.map +1 -1
  306. package/dist/es/standards-sdk.es88.js +30 -113
  307. package/dist/es/standards-sdk.es88.js.map +1 -1
  308. package/dist/es/standards-sdk.es89.js +22 -59
  309. package/dist/es/standards-sdk.es89.js.map +1 -1
  310. package/dist/es/standards-sdk.es9.js +104 -80
  311. package/dist/es/standards-sdk.es9.js.map +1 -1
  312. package/dist/es/standards-sdk.es90.js +23 -28
  313. package/dist/es/standards-sdk.es90.js.map +1 -1
  314. package/dist/es/standards-sdk.es91.js +238 -23
  315. package/dist/es/standards-sdk.es91.js.map +1 -1
  316. package/dist/es/standards-sdk.es92.js +267 -225
  317. package/dist/es/standards-sdk.es92.js.map +1 -1
  318. package/dist/es/standards-sdk.es93.js +95 -220
  319. package/dist/es/standards-sdk.es93.js.map +1 -1
  320. package/dist/es/standards-sdk.es94.js +124 -136
  321. package/dist/es/standards-sdk.es94.js.map +1 -1
  322. package/dist/es/standards-sdk.es95.js +42 -138
  323. package/dist/es/standards-sdk.es95.js.map +1 -1
  324. package/dist/es/standards-sdk.es96.js +259 -43
  325. package/dist/es/standards-sdk.es96.js.map +1 -1
  326. package/dist/es/standards-sdk.es97.js +82 -245
  327. package/dist/es/standards-sdk.es97.js.map +1 -1
  328. package/dist/es/standards-sdk.es98.js +49 -50
  329. package/dist/es/standards-sdk.es98.js.map +1 -1
  330. package/dist/es/standards-sdk.es99.js +29 -100
  331. package/dist/es/standards-sdk.es99.js.map +1 -1
  332. package/dist/es/utils/dynamic-import.d.ts +5 -1
  333. package/dist/es/utils/dynamic-import.d.ts.map +1 -1
  334. package/package.json +4 -4
  335. package/dist/cjs/patches/topic-autorenew-patch.d.ts +0 -2
  336. package/dist/cjs/patches/topic-autorenew-patch.d.ts.map +0 -1
  337. package/dist/es/patches/topic-autorenew-patch.d.ts +0 -2
  338. package/dist/es/patches/topic-autorenew-patch.d.ts.map +0 -1
  339. package/dist/es/standards-sdk.es161.js +0 -247
  340. package/dist/es/standards-sdk.es161.js.map +0 -1
@@ -1,925 +1,137 @@
1
- import { Client, Status, PrivateKey, AccountUpdateTransaction } from "@hashgraph/sdk";
2
- import { inscribeWithSigner, inscribe } from "./standards-sdk.es125.js";
3
- import "./standards-sdk.es150.js";
4
- import { Logger } from "./standards-sdk.es106.js";
5
- import { HederaMirrorNode } from "./standards-sdk.es127.js";
6
- import { ProgressReporter } from "./standards-sdk.es109.js";
7
- import "axios";
8
- import "./standards-sdk.es128.js";
9
- import "./standards-sdk.es129.js";
10
- import "./standards-sdk.es130.js";
11
- import "./standards-sdk.es131.js";
12
- import "./standards-sdk.es132.js";
13
- import "./standards-sdk.es133.js";
14
- import "./standards-sdk.es134.js";
15
- import "./standards-sdk.es135.js";
16
- import "buffer";
17
- import "crypto";
18
- import "@noble/curves/secp256k1.js";
19
- import { z } from "zod";
20
- import "./standards-sdk.es149.js";
21
- import "./standards-sdk.es139.js";
22
- import "@hashgraph/proto";
23
- import "ethers";
24
- import "./standards-sdk.es123.js";
25
- import "./standards-sdk.es114.js";
26
- import { getTopicId } from "./standards-sdk.es115.js";
27
- import * as mime from "mime-types";
28
- import { isHederaNetwork, toHederaCaip10 } from "./standards-sdk.es58.js";
29
- import { createNodeOperatorContext } from "./standards-sdk.es147.js";
30
- import { AIAgentCapability, AIAgentType, VerificationType, MCPServerCapability, ProfileType, capabilityNameToCapabilityMap } from "./standards-sdk.es29.js";
31
- const SocialLinkSchema = z.object({
32
- platform: z.string().min(1),
33
- handle: z.string().min(1)
34
- });
35
- const AIAgentDetailsSchema = z.object({
36
- type: z.nativeEnum(AIAgentType),
37
- capabilities: z.array(z.nativeEnum(AIAgentCapability)).min(1),
38
- model: z.string().min(1),
39
- creator: z.string().optional()
40
- });
41
- const MCPServerConnectionInfoSchema = z.object({
42
- url: z.string().min(1),
43
- transport: z.enum(["stdio", "sse"])
44
- });
45
- const MCPServerVerificationSchema = z.object({
46
- type: z.nativeEnum(VerificationType),
47
- value: z.string(),
48
- dns_field: z.string().optional(),
49
- challenge_path: z.string().optional()
50
- });
51
- const MCPServerHostSchema = z.object({
52
- minVersion: z.string().optional()
53
- });
54
- const MCPServerResourceSchema = z.object({
55
- name: z.string().min(1),
56
- description: z.string().min(1)
57
- });
58
- const MCPServerToolSchema = z.object({
59
- name: z.string().min(1),
60
- description: z.string().min(1)
61
- });
62
- const MCPServerDetailsSchema = z.object({
63
- version: z.string().min(1),
64
- connectionInfo: MCPServerConnectionInfoSchema,
65
- services: z.array(z.nativeEnum(MCPServerCapability)).min(1),
66
- description: z.string().min(1),
67
- verification: MCPServerVerificationSchema.optional(),
68
- host: MCPServerHostSchema.optional(),
69
- capabilities: z.array(z.string()).optional(),
70
- resources: z.array(MCPServerResourceSchema).optional(),
71
- tools: z.array(MCPServerToolSchema).optional(),
72
- maintainer: z.string().optional(),
73
- repository: z.string().optional(),
74
- docs: z.string().optional()
75
- });
76
- const BaseProfileSchema = z.object({
77
- version: z.string().min(1),
78
- type: z.nativeEnum(ProfileType),
79
- display_name: z.string().min(1),
80
- alias: z.string().optional(),
81
- bio: z.string().optional(),
82
- socials: z.array(SocialLinkSchema).optional(),
83
- profileImage: z.string().optional(),
84
- uaid: z.string().optional(),
85
- properties: z.record(z.any()).optional(),
86
- inboundTopicId: z.string().optional(),
87
- outboundTopicId: z.string().optional(),
88
- base_account: z.string().optional()
89
- });
90
- const PersonalProfileSchema = BaseProfileSchema.extend({
91
- type: z.literal(ProfileType.PERSONAL),
92
- language: z.string().optional(),
93
- timezone: z.string().optional()
94
- });
95
- const AIAgentProfileSchema = BaseProfileSchema.extend({
96
- type: z.literal(ProfileType.AI_AGENT),
97
- aiAgent: AIAgentDetailsSchema
98
- });
99
- const MCPServerProfileSchema = BaseProfileSchema.extend({
100
- type: z.literal(ProfileType.MCP_SERVER),
101
- mcpServer: MCPServerDetailsSchema
102
- });
103
- const FloraProfileSchema = z.object({
104
- version: z.string(),
105
- type: z.literal(ProfileType.FLORA),
106
- display_name: z.string().min(1),
107
- members: z.array(
108
- z.object({
109
- accountId: z.string(),
110
- publicKey: z.string().optional(),
111
- weight: z.number().optional()
112
- })
113
- ),
114
- threshold: z.number().min(1),
115
- topics: z.object({
116
- communication: z.string(),
117
- transaction: z.string(),
118
- state: z.string()
119
- }),
120
- inboundTopicId: z.string(),
121
- outboundTopicId: z.string(),
122
- bio: z.string().optional(),
123
- metadata: z.record(z.any()).optional(),
124
- policies: z.record(z.any()).optional()
125
- });
126
- const HCS11ProfileSchema = z.union([
127
- PersonalProfileSchema,
128
- AIAgentProfileSchema,
129
- MCPServerProfileSchema,
130
- FloraProfileSchema
131
- ]);
132
- class HCS11Client {
133
- constructor(config) {
134
- this.client = config.network === "mainnet" ? Client.forMainnet() : Client.forTestnet();
135
- this.auth = config.auth;
136
- this.network = config.network;
137
- this.operatorId = config.auth.operatorId;
138
- this.logger = Logger.getInstance({
139
- level: config.logLevel || "info",
140
- module: "HCS-11",
141
- silent: config.silent
142
- });
143
- this.mirrorNode = new HederaMirrorNode(
144
- this.network,
145
- this.logger
146
- );
147
- if (this.auth.privateKey) {
148
- this.operatorCtx = createNodeOperatorContext({
149
- network: this.network,
150
- operatorId: this.operatorId,
151
- operatorKey: this.auth.privateKey,
152
- keyType: config.keyType,
153
- mirrorNode: this.mirrorNode,
154
- logger: this.logger,
155
- client: this.client
156
- });
157
- this.client = this.operatorCtx.client;
158
- this.keyType = this.operatorCtx.keyType;
159
- void this.operatorCtx.ensureInitialized();
160
- this.client.setOperator(
161
- this.operatorId.toString(),
162
- this.operatorCtx.operatorKey
163
- );
164
- } else {
165
- this.keyType = config.keyType || "ed25519";
166
- }
167
- }
168
- getClient() {
169
- return this.client;
170
- }
171
- getOperatorId() {
172
- return this.auth.operatorId;
173
- }
174
- async initializeOperator() {
175
- if (!this.operatorCtx) {
176
- return;
177
- }
178
- try {
179
- await this.operatorCtx.ensureInitialized();
180
- this.keyType = this.operatorCtx.keyType;
181
- this.client.setOperator(this.operatorId, this.operatorCtx.operatorKey);
182
- } catch (error) {
183
- this.logger.warn(
184
- `Failed to verify operator key with mirror node: ${error.message}`
185
- );
186
- }
187
- }
188
- createPersonalProfile(displayName, options) {
189
- return {
190
- version: "1.0",
191
- type: ProfileType.PERSONAL,
192
- display_name: displayName,
193
- alias: options?.alias,
194
- bio: options?.bio,
195
- socials: options?.socials,
196
- profileImage: options?.profileImage,
197
- properties: options?.properties,
198
- inboundTopicId: options?.inboundTopicId,
199
- outboundTopicId: options?.outboundTopicId,
200
- base_account: options?.baseAccount
201
- };
202
- }
203
- createAIAgentProfile(displayName, agentType, capabilities, model, options) {
204
- const validation = this.validateProfile({
205
- version: "1.0",
206
- type: ProfileType.AI_AGENT,
207
- display_name: displayName,
208
- alias: options?.alias,
209
- bio: options?.bio,
210
- socials: options?.socials,
211
- profileImage: options?.profileImage,
212
- properties: options?.properties,
213
- inboundTopicId: options?.inboundTopicId,
214
- outboundTopicId: options?.outboundTopicId,
215
- base_account: options?.baseAccount,
216
- aiAgent: {
217
- type: agentType,
218
- capabilities,
219
- model,
220
- creator: options?.creator
221
- }
222
- });
223
- if (!validation.valid) {
224
- throw new Error(
225
- `Invalid AI Agent Profile: ${validation.errors.join(", ")}`
226
- );
227
- }
228
- return {
229
- version: "1.0",
230
- type: ProfileType.AI_AGENT,
231
- display_name: displayName,
232
- alias: options?.alias,
233
- bio: options?.bio,
234
- socials: options?.socials,
235
- profileImage: options?.profileImage,
236
- properties: options?.properties,
237
- inboundTopicId: options?.inboundTopicId,
238
- outboundTopicId: options?.outboundTopicId,
239
- base_account: options?.baseAccount,
240
- aiAgent: {
241
- type: agentType,
242
- capabilities,
243
- model,
244
- creator: options?.creator
245
- }
246
- };
247
- }
248
- /**
249
- * Creates an MCP server profile.
250
- *
251
- * @param displayName - The display name for the MCP server
252
- * @param serverDetails - The MCP server details
253
- * @param options - Additional profile options
254
- * @returns An MCPServerProfile object
255
- */
256
- createMCPServerProfile(displayName, serverDetails, options) {
257
- const validation = this.validateProfile({
258
- version: "1.0",
259
- type: ProfileType.MCP_SERVER,
260
- display_name: displayName,
261
- alias: options?.alias,
262
- bio: options?.bio,
263
- socials: options?.socials,
264
- profileImage: options?.profileImage,
265
- properties: options?.properties,
266
- inboundTopicId: options?.inboundTopicId,
267
- outboundTopicId: options?.outboundTopicId,
268
- mcpServer: serverDetails
269
- });
270
- if (!validation.valid) {
271
- throw new Error(
272
- `Invalid MCP Server Profile: ${validation.errors.join(", ")}`
273
- );
274
- }
275
- return {
276
- version: "1.0",
277
- type: ProfileType.MCP_SERVER,
278
- display_name: displayName,
279
- alias: options?.alias,
280
- bio: options?.bio,
281
- socials: options?.socials,
282
- profileImage: options?.profileImage,
283
- properties: options?.properties,
284
- inboundTopicId: options?.inboundTopicId,
285
- outboundTopicId: options?.outboundTopicId,
286
- mcpServer: serverDetails
287
- };
288
- }
289
- validateProfile(profile) {
290
- const result = HCS11ProfileSchema.safeParse(profile);
291
- if (result.success) {
292
- return { valid: true, errors: [] };
293
- }
294
- const formattedErrors = result.error.errors.map((err) => {
295
- const path = err.path.join(".");
296
- let message = err.message;
297
- if (err.code === "invalid_type") {
298
- message = `Expected ${err.expected}, got ${err.received}`;
299
- } else if (err.code === "invalid_enum_value") {
300
- const validOptions = err.options?.join(", ");
301
- message = `Invalid value. Valid options are: ${validOptions}`;
302
- } else if (err.code === "too_small" && err.type === "string") {
303
- message = "Cannot be empty";
304
- }
305
- return `${path}: ${message}`;
306
- });
307
- return { valid: false, errors: formattedErrors };
308
- }
309
- profileToJSONString(profile) {
310
- return JSON.stringify(profile);
311
- }
312
- parseProfileFromString(profileStr) {
313
- try {
314
- const parsedProfile = JSON.parse(profileStr);
315
- const validation = this.validateProfile(parsedProfile);
316
- if (!validation.valid) {
317
- this.logger.error("Invalid profile format:", validation.errors);
318
- return null;
319
- }
320
- return parsedProfile;
321
- } catch (error) {
322
- this.logger.error("Error parsing profile:");
323
- return null;
324
- }
325
- }
326
- setProfileForAccountMemo(topicId, topicStandard = 1) {
327
- return `hcs-11:hcs://${topicStandard}/${topicId}`;
328
- }
329
- async executeTransaction(transaction) {
330
- try {
331
- if (this.auth.privateKey) {
332
- const signedTx = await transaction.signWithOperator(this.client);
333
- const response2 = await signedTx.execute(this.client);
334
- const receipt2 = await response2.getReceipt(this.client);
335
- if (receipt2.status.toString() !== Status.Success.toString()) {
336
- return {
337
- success: false,
338
- error: `Transaction failed: ${receipt2.status.toString()}`
339
- };
340
- }
341
- return {
342
- success: true,
343
- result: receipt2
344
- };
345
- }
346
- if (!this.auth.signer) {
347
- throw new Error("No valid authentication method provided");
348
- }
349
- const signer = this.auth.signer;
350
- const frozenTransaction = await transaction.freezeWithSigner(signer);
351
- const response = await frozenTransaction.executeWithSigner(signer);
352
- const receipt = await response.getReceiptWithSigner(signer);
353
- if (receipt.status.toString() !== Status.Success.toString()) {
354
- return {
355
- success: false,
356
- error: `Transaction failed: ${receipt.status.toString()}: ${Status.Success.toString()}`
357
- };
358
- }
359
- return {
360
- success: true,
361
- result: receipt
362
- };
363
- } catch (error) {
364
- return {
365
- success: false,
366
- error: error instanceof Error ? error.message : "Unknown error during transaction execution"
367
- };
368
- }
369
- }
370
- async inscribeImage(buffer, fileName, options) {
371
- try {
372
- const progressCallback = options?.progressCallback;
373
- const progressReporter = new ProgressReporter({
374
- module: "HCS11-Image",
375
- logger: this.logger,
376
- callback: progressCallback
377
- });
378
- progressReporter.preparing("Preparing to inscribe image", 0);
379
- const mimeType = mime.lookup(fileName) || "application/octet-stream";
380
- const waitForConfirmation = options?.waitForConfirmation ?? true;
381
- let inscriptionResponse;
382
- if (this.auth.signer) {
383
- if ("accountId" in this.auth.signer) {
384
- progressReporter.preparing("Using signer for inscription", 10);
385
- inscriptionResponse = await inscribeWithSigner(
386
- {
387
- type: "buffer",
388
- buffer,
389
- fileName,
390
- mimeType
391
- },
392
- this.auth.signer,
393
- {
394
- network: this.network,
395
- waitForConfirmation,
396
- waitMaxAttempts: 150,
397
- waitIntervalMs: 4e3,
398
- logging: {
399
- level: "debug"
400
- },
401
- progressCallback: (data) => {
402
- const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;
403
- progressReporter.report({
404
- stage: data.stage,
405
- message: data.message,
406
- progressPercent: adjustedPercent,
407
- details: data.details
408
- });
409
- }
410
- }
411
- );
412
- } else {
413
- progressReporter.failed(
414
- "Signer must be a DAppSigner for inscription"
415
- );
416
- throw new Error("Signer must be a DAppSigner for inscription");
417
- }
418
- } else {
419
- if (!this.auth.privateKey) {
420
- progressReporter.failed("Private key is required for inscription");
421
- this.logger.error("Private key is required for inscription");
422
- throw new Error("Private key is required for inscription");
423
- }
424
- progressReporter.preparing("Using private key for inscription", 10);
425
- const PK = this.keyType === "ecdsa" ? PrivateKey.fromStringECDSA(this.auth.privateKey) : PrivateKey.fromStringED25519(this.auth.privateKey);
426
- inscriptionResponse = await inscribe(
427
- {
428
- type: "buffer",
429
- buffer,
430
- fileName,
431
- mimeType
432
- },
433
- {
434
- accountId: this.auth.operatorId,
435
- privateKey: PK,
436
- network: this.network
437
- },
438
- {
439
- waitForConfirmation,
440
- waitMaxAttempts: 150,
441
- waitIntervalMs: 2e3,
442
- logging: {
443
- level: "debug"
444
- },
445
- progressCallback: (data) => {
446
- const adjustedPercent = 10 + (data.progressPercent || 0) * 0.8;
447
- progressReporter.report({
448
- stage: data.stage,
449
- message: data.message,
450
- progressPercent: adjustedPercent,
451
- details: data.details
452
- });
453
- }
454
- }
455
- );
456
- }
457
- if (inscriptionResponse.confirmed) {
458
- progressReporter.completed("Image inscription completed", {
459
- topicId: getTopicId(inscriptionResponse.inscription)
460
- });
461
- return {
462
- imageTopicId: getTopicId(inscriptionResponse.inscription) || "",
463
- transactionId: inscriptionResponse.result.jobId,
464
- success: true
465
- };
466
- } else {
467
- const jobId = inscriptionResponse.quote ? "quote-only" : inscriptionResponse.result.jobId;
468
- progressReporter.verifying("Waiting for inscription confirmation", 50, {
469
- jobId
470
- });
471
- return {
472
- imageTopicId: "",
473
- transactionId: jobId,
474
- success: false,
475
- error: "Inscription not confirmed"
476
- };
477
- }
478
- } catch (error) {
479
- this.logger.error("Error inscribing image:", error);
480
- return {
481
- imageTopicId: "",
482
- transactionId: "",
483
- success: false,
484
- error: error instanceof Error ? error.message : "Error inscribing image"
485
- };
486
- }
487
- }
488
- async inscribeProfile(profile, options) {
489
- this.logger.info("Inscribing HCS-11 profile");
490
- const progressCallback = options?.progressCallback;
491
- const progressReporter = new ProgressReporter({
492
- module: "HCS11-Profile",
493
- logger: this.logger,
494
- callback: progressCallback
495
- });
496
- await this.attachUaidIfMissing(profile);
497
- progressReporter.preparing("Validating profile data", 5);
498
- const validation = this.validateProfile(profile);
499
- if (!validation.valid) {
500
- progressReporter.failed(
501
- `Invalid profile: ${validation.errors.join(", ")}`
502
- );
503
- return {
504
- profileTopicId: "",
505
- transactionId: "",
506
- success: false,
507
- error: `Invalid profile: ${validation.errors.join(", ")}`
508
- };
509
- }
510
- progressReporter.preparing("Formatting profile for inscription", 15);
511
- const profileJson = this.profileToJSONString(profile);
512
- const fileName = `profile-${profile.display_name.toLowerCase().replace(/\s+/g, "-")}.json`;
513
- try {
514
- const contentBuffer = Buffer.from(profileJson, "utf-8");
515
- const contentType = "application/json";
516
- progressReporter.preparing("Preparing profile for inscription", 20);
517
- const input = {
518
- type: "buffer",
519
- buffer: contentBuffer,
520
- fileName,
521
- mimeType: contentType
522
- };
523
- const inscriptionOptions = {
524
- waitForConfirmation: true,
525
- mode: "file",
526
- network: this.network,
527
- waitMaxAttempts: 100,
528
- waitIntervalMs: 2e3,
529
- progressCallback: (data) => {
530
- const adjustedPercent = 20 + Number(data?.progressPercent || 0) * 0.75;
531
- progressReporter?.report({
532
- stage: data.stage,
533
- message: data.message,
534
- progressPercent: adjustedPercent,
535
- details: data.details
536
- });
537
- }
538
- };
539
- progressReporter.submitting("Submitting profile to Hedera network", 30);
540
- let inscriptionResponse;
541
- if (this.auth.privateKey) {
542
- const PK = this.keyType === "ecdsa" ? PrivateKey.fromStringECDSA(this.auth.privateKey) : PrivateKey.fromStringED25519(this.auth.privateKey);
543
- inscriptionResponse = await inscribe(
544
- input,
545
- {
546
- accountId: this.auth.operatorId,
547
- privateKey: PK,
548
- network: this.network
549
- },
550
- inscriptionOptions
551
- );
552
- } else if (this.auth.signer) {
553
- inscriptionResponse = await inscribeWithSigner(
554
- input,
555
- this.auth.signer,
556
- inscriptionOptions
557
- );
558
- } else {
559
- throw new Error(
560
- "No authentication method available - neither private key nor signer"
561
- );
562
- }
563
- if (!inscriptionResponse.confirmed || !getTopicId(inscriptionResponse.inscription)) {
564
- progressReporter.failed("Failed to inscribe profile content");
565
- return {
566
- profileTopicId: "",
567
- transactionId: "",
568
- success: false,
569
- error: "Failed to inscribe profile content"
570
- };
571
- }
572
- const topicId = getTopicId(inscriptionResponse.inscription);
573
- progressReporter.completed("Profile inscription completed", {
574
- topicId,
575
- transactionId: inscriptionResponse.result.transactionId
576
- });
577
- return {
578
- profileTopicId: topicId,
579
- transactionId: inscriptionResponse.result.transactionId,
580
- success: true,
581
- totalCostHbar: inscriptionResponse.costSummary?.totalCostHbar
582
- };
583
- } catch (error) {
584
- progressReporter.failed(
585
- `Error inscribing profile: ${error.message || "Unknown error"}`
586
- );
587
- return {
588
- profileTopicId: "",
589
- transactionId: "",
590
- success: false,
591
- error: error.message || "Unknown error during inscription"
592
- };
593
- }
594
- }
595
- async attachUaidIfMissing(profile) {
596
- if (profile.uaid) {
597
- return;
598
- }
599
- if (!isHederaNetwork(this.network)) {
600
- return;
601
- }
602
- try {
603
- const { HCS14Client } = await import("./standards-sdk.es146.js");
604
- const hcs14 = new HCS14Client({ client: this.client });
605
- const did = await hcs14.createDid({
606
- method: "hedera",
607
- client: this.client
608
- });
609
- const nativeId = toHederaCaip10(this.network, this.auth.operatorId);
610
- let uid = this.auth.operatorId;
611
- const inboundFromProfile = profile.inboundTopicId;
612
- if (inboundFromProfile && inboundFromProfile.trim().length > 0) {
613
- uid = `${inboundFromProfile}@${this.auth.operatorId}`;
614
- } else {
615
- try {
616
- const fetched = await this.fetchProfileByAccountId(
617
- this.auth.operatorId,
618
- this.network
619
- );
620
- const inbound = fetched?.topicInfo?.inboundTopic;
621
- if (inbound && inbound.trim().length > 0) {
622
- uid = `${inbound}@${this.auth.operatorId}`;
623
- }
624
- } catch {
625
- }
626
- }
627
- const uaid = hcs14.createUaid(did, { proto: "hcs-10", nativeId, uid });
628
- profile.uaid = uaid;
629
- } catch (e) {
630
- this.logger.warn(
631
- "Hiero registrar not available; skipping UAID generation for profile",
632
- e
633
- );
634
- }
635
- }
636
- async updateAccountMemoWithProfile(accountId, profileTopicId, signerKeys) {
637
- try {
638
- this.logger.info(
639
- `Updating account memo for ${accountId} with profile ${profileTopicId}`
640
- );
641
- const memo = this.setProfileForAccountMemo(profileTopicId);
642
- const transaction = new AccountUpdateTransaction().setAccountMemo(memo).setAccountId(accountId);
643
- if (signerKeys && signerKeys.length > 0) {
644
- const frozen = await transaction.freezeWith(this.client);
645
- let signed = frozen;
646
- for (const key of signerKeys) {
647
- signed = await signed.sign(key);
648
- }
649
- const response = await signed.execute(this.client);
650
- const receipt = await response.getReceipt(this.client);
651
- if (receipt.status.toString() !== Status.Success.toString()) {
652
- return {
653
- success: false,
654
- error: `Transaction failed: ${receipt.status.toString()}`
655
- };
656
- }
657
- return {
658
- success: true,
659
- result: receipt
660
- };
661
- }
662
- return this.executeTransaction(transaction);
663
- } catch (error) {
664
- this.logger.error(
665
- `Error updating account memo: ${error instanceof Error ? error.message : "Unknown error"}`
666
- );
667
- return {
668
- success: false,
669
- error: error instanceof Error ? error.message : "Unknown error updating account memo"
670
- };
671
- }
672
- }
673
- /**
674
- * Creates and inscribes a profile.
675
- *
676
- * @param profile - The profile to create and inscribe.
677
- * @param updateAccountMemo - Whether to update the account memo with the profile.
678
- * @param options - Optional configuration options.
679
- * @returns A promise that resolves to the inscription result.
680
- */
681
- async createAndInscribeProfile(profile, updateAccountMemo = true, options) {
682
- const progressCallback = options?.progressCallback;
683
- const progressReporter = new ProgressReporter({
684
- module: "HCS11-ProfileCreation",
685
- logger: this.logger,
686
- callback: progressCallback
687
- });
688
- progressReporter.preparing("Starting profile creation process", 0);
689
- const inscriptionProgress = progressReporter.createSubProgress({
690
- minPercent: 0,
691
- maxPercent: 80,
692
- logPrefix: "Inscription"
693
- });
694
- const inscriptionResult = await this.inscribeProfile(profile, {
695
- ...options,
696
- progressCallback: (data) => {
697
- inscriptionProgress.report({
698
- stage: data.stage,
699
- message: data.message,
700
- progressPercent: data.progressPercent,
701
- details: data.details
702
- });
703
- }
704
- });
705
- if (!inscriptionResult?.success) {
706
- progressReporter.failed("Profile inscription failed", {
707
- error: inscriptionResult?.error
708
- });
709
- return inscriptionResult;
710
- }
711
- progressReporter.confirming("Profile inscribed, updating account memo", 85);
712
- if (updateAccountMemo) {
713
- const memoResult = await this.updateAccountMemoWithProfile(
714
- this.auth.operatorId,
715
- inscriptionResult.profileTopicId
716
- );
717
- if (!memoResult.success) {
718
- progressReporter.failed("Failed to update account memo", {
719
- error: memoResult?.error
720
- });
721
- return {
722
- ...inscriptionResult,
723
- success: false,
724
- error: memoResult?.error
725
- };
726
- }
727
- }
728
- progressReporter.completed("Profile creation completed successfully", {
729
- profileTopicId: inscriptionResult.profileTopicId,
730
- transactionId: inscriptionResult.transactionId,
731
- totalCostHbar: inscriptionResult.totalCostHbar
732
- });
733
- return inscriptionResult;
734
- }
735
- /**
736
- * Gets the capabilities from the capability names.
737
- *
738
- * @param capabilityNames - The capability names to get the capabilities for.
739
- * @returns The capabilities.
740
- */
741
- async getCapabilitiesFromTags(capabilityNames) {
742
- const capabilities = [];
743
- if (capabilityNames.length === 0) {
744
- return [AIAgentCapability.TEXT_GENERATION];
745
- }
746
- for (const capabilityName of capabilityNames) {
747
- const capability = capabilityNameToCapabilityMap[capabilityName.toLowerCase()];
748
- if (capability !== void 0 && !capabilities.includes(capability)) {
749
- capabilities.push(capability);
750
- }
751
- }
752
- if (capabilities.length === 0) {
753
- capabilities.push(AIAgentCapability.TEXT_GENERATION);
754
- }
755
- return capabilities;
756
- }
757
- /**
758
- * Gets the agent type from the metadata.
759
- *
760
- * @param metadata - The metadata of the agent.
761
- * @returns The agent type.
762
- */
763
- getAgentTypeFromMetadata(metadata) {
764
- if (metadata.type === "autonomous") {
765
- return AIAgentType.AUTONOMOUS;
766
- } else {
767
- return AIAgentType.MANUAL;
768
- }
769
- }
770
- /**
771
- * Fetches a profile from the account memo.
772
- *
773
- * @param accountId - The account ID of the agent to fetch the profile for.
774
- * @param network - The network to use for the fetch.
775
- * @returns A promise that resolves to the profile.
776
- */
777
- async fetchProfileByAccountId(accountId, network) {
778
- try {
779
- this.logger.debug(
780
- `Fetching profile for account ${accountId.toString()} on ${this.network}`
781
- );
782
- const memo = await this.mirrorNode.getAccountMemo(accountId.toString());
783
- this.logger.debug(`Got account memo: ${memo}`);
784
- if (!memo?.startsWith("hcs-11:")) {
785
- return {
786
- success: false,
787
- error: `Account ${accountId.toString()} does not have a valid HCS-11 memo. Current memo: ${memo || "empty"}`
788
- };
789
- }
790
- this.logger.debug(`Found HCS-11 memo: ${memo}`);
791
- const protocolReference = memo.substring(7);
792
- if (protocolReference?.startsWith("hcs://")) {
793
- const hcsFormat = protocolReference.match(/hcs:\/\/(\d+)\/(.+)/);
794
- if (!hcsFormat) {
795
- return {
796
- success: false,
797
- error: `Invalid HCS protocol reference format: ${protocolReference}`
798
- };
799
- }
800
- const [_, protocolId, profileTopicId] = hcsFormat;
801
- const networkParam = network || this.network || "mainnet";
802
- this.logger.debug(
803
- `Retrieving profile from Kiloscribe CDN: ${profileTopicId}`
804
- );
805
- const cdnUrl = `https://kiloscribe.com/api/inscription-cdn/${profileTopicId}?network=${networkParam}`;
806
- try {
807
- const response = await fetch(cdnUrl);
808
- if (!response.ok) {
809
- return {
810
- success: false,
811
- error: `Failed to fetch profile from Kiloscribe CDN: ${response.statusText}`
812
- };
813
- }
814
- const profileData = await response.json();
815
- if (!profileData) {
816
- return {
817
- success: false,
818
- error: `No profile data found for topic ${profileTopicId}`
819
- };
820
- }
821
- const parsed = HCS11ProfileSchema.safeParse(profileData);
822
- if (!parsed.success) {
823
- return {
824
- success: false,
825
- error: `Invalid HCS-11 profile data for topic ${profileTopicId}`
826
- };
827
- }
828
- return {
829
- success: true,
830
- profile: parsed.data,
831
- topicInfo: {
832
- inboundTopic: parsed.data.inboundTopicId || "",
833
- outboundTopic: parsed.data.outboundTopicId || "",
834
- profileTopicId
835
- }
836
- };
837
- } catch (cdnError) {
838
- this.logger.error(
839
- `Error retrieving from Kiloscribe CDN: ${cdnError.message}`
840
- );
841
- return {
842
- success: false,
843
- error: `Error retrieving from Kiloscribe CDN: ${cdnError.message}`
844
- };
845
- }
846
- } else if (protocolReference.startsWith("ipfs://")) {
847
- this.logger.warn("IPFS protocol references are not fully supported");
848
- const response = await fetch(
849
- `https://ipfs.io/ipfs/${protocolReference.replace("ipfs://", "")}`
850
- );
851
- const profileData = await response.json();
852
- const parsed = HCS11ProfileSchema.safeParse(profileData);
853
- if (!parsed.success) {
854
- return {
855
- success: false,
856
- error: `Invalid HCS-11 profile data from IPFS reference ${protocolReference}`
857
- };
858
- }
859
- return {
860
- success: true,
861
- profile: parsed.data,
862
- topicInfo: {
863
- inboundTopic: parsed.data.inboundTopicId || "",
864
- outboundTopic: parsed.data.outboundTopicId || "",
865
- profileTopicId: ""
866
- }
867
- };
868
- } else if (protocolReference.startsWith("ar://")) {
869
- const arTxId = protocolReference.replace("ar://", "");
870
- const response = await fetch(`https://arweave.net/${arTxId}`);
871
- if (!response.ok) {
872
- return {
873
- success: false,
874
- error: `Failed to fetch profile from Arweave ${arTxId}: ${response.statusText}`
875
- };
876
- }
877
- const profileData = await response.json();
878
- const parsed = HCS11ProfileSchema.safeParse(profileData);
879
- if (!parsed.success) {
880
- return {
881
- success: false,
882
- error: `Invalid HCS-11 profile data from Arweave reference ${arTxId}`
883
- };
884
- }
885
- return {
886
- success: true,
887
- profile: parsed.data,
888
- topicInfo: {
889
- inboundTopic: parsed.data.inboundTopicId || "",
890
- outboundTopic: parsed.data.outboundTopicId || "",
891
- profileTopicId: ""
892
- }
893
- };
894
- } else {
895
- return {
896
- success: false,
897
- error: `Invalid protocol reference format: ${protocolReference}`
898
- };
899
- }
900
- } catch (error) {
901
- this.logger.error(`Error fetching profile: ${error.message}`);
902
- return {
903
- success: false,
904
- error: `Error fetching profile: ${error.message}`
905
- };
906
- }
907
- }
908
- }
1
+ var ProfileType = /* @__PURE__ */ ((ProfileType2) => {
2
+ ProfileType2[ProfileType2["PERSONAL"] = 0] = "PERSONAL";
3
+ ProfileType2[ProfileType2["AI_AGENT"] = 1] = "AI_AGENT";
4
+ ProfileType2[ProfileType2["MCP_SERVER"] = 2] = "MCP_SERVER";
5
+ ProfileType2[ProfileType2["FLORA"] = 3] = "FLORA";
6
+ return ProfileType2;
7
+ })(ProfileType || {});
8
+ var AIAgentType = /* @__PURE__ */ ((AIAgentType2) => {
9
+ AIAgentType2[AIAgentType2["MANUAL"] = 0] = "MANUAL";
10
+ AIAgentType2[AIAgentType2["AUTONOMOUS"] = 1] = "AUTONOMOUS";
11
+ return AIAgentType2;
12
+ })(AIAgentType || {});
13
+ var EndpointType = /* @__PURE__ */ ((EndpointType2) => {
14
+ EndpointType2[EndpointType2["REST"] = 0] = "REST";
15
+ EndpointType2[EndpointType2["WEBSOCKET"] = 1] = "WEBSOCKET";
16
+ EndpointType2[EndpointType2["GRPC"] = 2] = "GRPC";
17
+ return EndpointType2;
18
+ })(EndpointType || {});
19
+ var AIAgentCapability = /* @__PURE__ */ ((AIAgentCapability2) => {
20
+ AIAgentCapability2[AIAgentCapability2["TEXT_GENERATION"] = 0] = "TEXT_GENERATION";
21
+ AIAgentCapability2[AIAgentCapability2["IMAGE_GENERATION"] = 1] = "IMAGE_GENERATION";
22
+ AIAgentCapability2[AIAgentCapability2["AUDIO_GENERATION"] = 2] = "AUDIO_GENERATION";
23
+ AIAgentCapability2[AIAgentCapability2["VIDEO_GENERATION"] = 3] = "VIDEO_GENERATION";
24
+ AIAgentCapability2[AIAgentCapability2["CODE_GENERATION"] = 4] = "CODE_GENERATION";
25
+ AIAgentCapability2[AIAgentCapability2["LANGUAGE_TRANSLATION"] = 5] = "LANGUAGE_TRANSLATION";
26
+ AIAgentCapability2[AIAgentCapability2["SUMMARIZATION_EXTRACTION"] = 6] = "SUMMARIZATION_EXTRACTION";
27
+ AIAgentCapability2[AIAgentCapability2["KNOWLEDGE_RETRIEVAL"] = 7] = "KNOWLEDGE_RETRIEVAL";
28
+ AIAgentCapability2[AIAgentCapability2["DATA_INTEGRATION"] = 8] = "DATA_INTEGRATION";
29
+ AIAgentCapability2[AIAgentCapability2["MARKET_INTELLIGENCE"] = 9] = "MARKET_INTELLIGENCE";
30
+ AIAgentCapability2[AIAgentCapability2["TRANSACTION_ANALYTICS"] = 10] = "TRANSACTION_ANALYTICS";
31
+ AIAgentCapability2[AIAgentCapability2["SMART_CONTRACT_AUDIT"] = 11] = "SMART_CONTRACT_AUDIT";
32
+ AIAgentCapability2[AIAgentCapability2["GOVERNANCE_FACILITATION"] = 12] = "GOVERNANCE_FACILITATION";
33
+ AIAgentCapability2[AIAgentCapability2["SECURITY_MONITORING"] = 13] = "SECURITY_MONITORING";
34
+ AIAgentCapability2[AIAgentCapability2["COMPLIANCE_ANALYSIS"] = 14] = "COMPLIANCE_ANALYSIS";
35
+ AIAgentCapability2[AIAgentCapability2["FRAUD_DETECTION"] = 15] = "FRAUD_DETECTION";
36
+ AIAgentCapability2[AIAgentCapability2["MULTI_AGENT_COORDINATION"] = 16] = "MULTI_AGENT_COORDINATION";
37
+ AIAgentCapability2[AIAgentCapability2["API_INTEGRATION"] = 17] = "API_INTEGRATION";
38
+ AIAgentCapability2[AIAgentCapability2["WORKFLOW_AUTOMATION"] = 18] = "WORKFLOW_AUTOMATION";
39
+ return AIAgentCapability2;
40
+ })(AIAgentCapability || {});
41
+ var MCPServerCapability = /* @__PURE__ */ ((MCPServerCapability2) => {
42
+ MCPServerCapability2[MCPServerCapability2["RESOURCE_PROVIDER"] = 0] = "RESOURCE_PROVIDER";
43
+ MCPServerCapability2[MCPServerCapability2["TOOL_PROVIDER"] = 1] = "TOOL_PROVIDER";
44
+ MCPServerCapability2[MCPServerCapability2["PROMPT_TEMPLATE_PROVIDER"] = 2] = "PROMPT_TEMPLATE_PROVIDER";
45
+ MCPServerCapability2[MCPServerCapability2["LOCAL_FILE_ACCESS"] = 3] = "LOCAL_FILE_ACCESS";
46
+ MCPServerCapability2[MCPServerCapability2["DATABASE_INTEGRATION"] = 4] = "DATABASE_INTEGRATION";
47
+ MCPServerCapability2[MCPServerCapability2["API_INTEGRATION"] = 5] = "API_INTEGRATION";
48
+ MCPServerCapability2[MCPServerCapability2["WEB_ACCESS"] = 6] = "WEB_ACCESS";
49
+ MCPServerCapability2[MCPServerCapability2["KNOWLEDGE_BASE"] = 7] = "KNOWLEDGE_BASE";
50
+ MCPServerCapability2[MCPServerCapability2["MEMORY_PERSISTENCE"] = 8] = "MEMORY_PERSISTENCE";
51
+ MCPServerCapability2[MCPServerCapability2["CODE_ANALYSIS"] = 9] = "CODE_ANALYSIS";
52
+ MCPServerCapability2[MCPServerCapability2["CONTENT_GENERATION"] = 10] = "CONTENT_GENERATION";
53
+ MCPServerCapability2[MCPServerCapability2["COMMUNICATION"] = 11] = "COMMUNICATION";
54
+ MCPServerCapability2[MCPServerCapability2["DOCUMENT_PROCESSING"] = 12] = "DOCUMENT_PROCESSING";
55
+ MCPServerCapability2[MCPServerCapability2["CALENDAR_SCHEDULE"] = 13] = "CALENDAR_SCHEDULE";
56
+ MCPServerCapability2[MCPServerCapability2["SEARCH"] = 14] = "SEARCH";
57
+ MCPServerCapability2[MCPServerCapability2["ASSISTANT_ORCHESTRATION"] = 15] = "ASSISTANT_ORCHESTRATION";
58
+ return MCPServerCapability2;
59
+ })(MCPServerCapability || {});
60
+ var VerificationType = /* @__PURE__ */ ((VerificationType2) => {
61
+ VerificationType2["DNS"] = "dns";
62
+ VerificationType2["SIGNATURE"] = "signature";
63
+ VerificationType2["CHALLENGE"] = "challenge";
64
+ return VerificationType2;
65
+ })(VerificationType || {});
66
+ var InboundTopicType = /* @__PURE__ */ ((InboundTopicType2) => {
67
+ InboundTopicType2["PUBLIC"] = "PUBLIC";
68
+ InboundTopicType2["CONTROLLED"] = "CONTROLLED";
69
+ InboundTopicType2["FEE_BASED"] = "FEE_BASED";
70
+ return InboundTopicType2;
71
+ })(InboundTopicType || {});
72
+ const SUPPORTED_SOCIAL_PLATFORMS = [
73
+ "twitter",
74
+ "github",
75
+ "discord",
76
+ "telegram",
77
+ "linkedin",
78
+ "youtube",
79
+ "website",
80
+ "x"
81
+ ];
82
+ const capabilityNameToCapabilityMap = {
83
+ text_generation: 0,
84
+ image_generation: 1,
85
+ audio_generation: 2,
86
+ video_generation: 3,
87
+ code_generation: 4,
88
+ language_translation: 5,
89
+ summarization: 6,
90
+ extraction: 6,
91
+ knowledge_retrieval: 7,
92
+ data_integration: 8,
93
+ data_visualization: 8,
94
+ market_intelligence: 9,
95
+ transaction_analytics: 10,
96
+ smart_contract_audit: 11,
97
+ governance: 12,
98
+ security_monitoring: 13,
99
+ compliance_analysis: 14,
100
+ fraud_detection: 15,
101
+ multi_agent: 16,
102
+ api_integration: 17,
103
+ workflow_automation: 18
104
+ /* WORKFLOW_AUTOMATION */
105
+ };
106
+ const mcpServiceNameToCapabilityMap = {
107
+ resource_provider: 0,
108
+ tool_provider: 1,
109
+ prompt_template_provider: 2,
110
+ local_file_access: 3,
111
+ database_integration: 4,
112
+ api_integration: 5,
113
+ web_access: 6,
114
+ knowledge_base: 7,
115
+ memory_persistence: 8,
116
+ code_analysis: 9,
117
+ content_generation: 10,
118
+ communication: 11,
119
+ document_processing: 12,
120
+ calendar_schedule: 13,
121
+ search: 14,
122
+ assistant_orchestration: 15
123
+ /* ASSISTANT_ORCHESTRATION */
124
+ };
909
125
  export {
910
- AIAgentDetailsSchema,
911
- AIAgentProfileSchema,
912
- BaseProfileSchema,
913
- HCS11Client,
914
- HCS11ProfileSchema,
915
- MCPServerConnectionInfoSchema,
916
- MCPServerDetailsSchema,
917
- MCPServerHostSchema,
918
- MCPServerProfileSchema,
919
- MCPServerResourceSchema,
920
- MCPServerToolSchema,
921
- MCPServerVerificationSchema,
922
- PersonalProfileSchema,
923
- SocialLinkSchema
126
+ AIAgentCapability,
127
+ AIAgentType,
128
+ EndpointType,
129
+ InboundTopicType,
130
+ MCPServerCapability,
131
+ ProfileType,
132
+ SUPPORTED_SOCIAL_PLATFORMS,
133
+ VerificationType,
134
+ capabilityNameToCapabilityMap,
135
+ mcpServiceNameToCapabilityMap
924
136
  };
925
137
  //# sourceMappingURL=standards-sdk.es28.js.map