@hashgraphonline/standards-sdk 0.1.144 → 0.1.146

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