@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,347 +1,362 @@
1
- import { RegistryType } from "./standards-sdk.es30.js";
2
- import { inscribe, inscribeWithSigner } from "./standards-sdk.es125.js";
3
- import "./standards-sdk.es147.js";
4
- class BaseRegistry {
5
- constructor(networkType, logger, registryType, topicId, client) {
6
- this.entries = /* @__PURE__ */ new Map();
7
- this.networkType = networkType;
8
- this.logger = logger;
9
- this.registryType = registryType;
10
- this.topicId = topicId;
11
- this.client = client;
1
+ import { RegistryType } from "./standards-sdk.es29.js";
2
+ import { BaseRegistry } from "./standards-sdk.es30.js";
3
+ import { retrieveInscription } from "./standards-sdk.es124.js";
4
+ import "./standards-sdk.es148.js";
5
+ import { getCryptoAdapter } from "./standards-sdk.es119.js";
6
+ import { isSSREnvironment } from "./standards-sdk.es117.js";
7
+ import { validateActionRegistration } from "./standards-sdk.es42.js";
8
+ import { ZodError } from "zod";
9
+ class ActionRegistry extends BaseRegistry {
10
+ constructor(networkType, logger, topicId, client) {
11
+ super(networkType, logger, RegistryType.ACTION, topicId, client);
12
+ this.actionsByHash = /* @__PURE__ */ new Map();
13
+ this.cryptoAdapter = getCryptoAdapter();
12
14
  }
13
15
  /**
14
- * Retrieve an entry by ID
16
+ * Register a WASM module with its binary via HCS-1
15
17
  */
16
- async getEntry(id) {
17
- const cached = this.entries.get(id);
18
- if (cached) return cached;
19
- if (this.topicId && this.client) {
20
- await this.sync();
21
- return this.entries.get(id) || null;
18
+ async registerWithWasm(wasmBinary, moduleInfo, sourceVerification) {
19
+ let wasmHash;
20
+ let infoHash;
21
+ if (isSSREnvironment()) {
22
+ wasmHash = this.createSSRSafeHash(wasmBinary, "wasm");
23
+ const infoString2 = JSON.stringify(moduleInfo);
24
+ infoHash = this.createSSRSafeHash(Buffer.from(infoString2), "info");
25
+ } else {
26
+ const wasmHasher = this.cryptoAdapter.createHash("sha256");
27
+ const wasmResult = wasmHasher.update(wasmBinary).digest("hex");
28
+ const wasmHashValue = wasmResult instanceof Promise ? await wasmResult : wasmResult;
29
+ wasmHash = typeof wasmHashValue === "string" ? wasmHashValue : wasmHashValue.toString("hex");
30
+ const infoString2 = JSON.stringify(moduleInfo);
31
+ const infoHasher = this.cryptoAdapter.createHash("sha256");
32
+ const infoResult = infoHasher.update(Buffer.from(infoString2)).digest("hex");
33
+ const infoHashValue = infoResult instanceof Promise ? await infoResult : infoResult;
34
+ infoHash = typeof infoHashValue === "string" ? infoHashValue : infoHashValue.toString("hex");
22
35
  }
23
- return null;
36
+ const wasmTopicId = await this.inscribeContent(
37
+ wasmBinary,
38
+ "application/octet-stream",
39
+ {
40
+ name: moduleInfo.name,
41
+ version: moduleInfo.version,
42
+ hash: wasmHash,
43
+ fileType: "wasm"
44
+ }
45
+ );
46
+ let infoTopicId;
47
+ const infoString = JSON.stringify(moduleInfo);
48
+ if (Buffer.byteLength(infoString, "utf8") > 1024) {
49
+ infoTopicId = await this.inscribeContent(infoString, "application/json", {
50
+ name: `${moduleInfo.name}-info`,
51
+ version: moduleInfo.version
52
+ });
53
+ }
54
+ const registration = {
55
+ p: "hcs-12",
56
+ op: "register",
57
+ t_id: wasmTopicId,
58
+ hash: infoHash,
59
+ wasm_hash: wasmHash,
60
+ info_t_id: infoTopicId,
61
+ source_verification: sourceVerification,
62
+ m: `${moduleInfo.name} v${moduleInfo.version}`
63
+ };
64
+ await this.register(registration);
65
+ return registration;
24
66
  }
25
67
  /**
26
- * Get the latest entry from a specific topic ID (for non-indexed topics)
68
+ * Register a new WASM action
27
69
  */
28
- async getLatestEntry(topicId) {
29
- if (!this.client) {
30
- return null;
31
- }
32
- try {
33
- const messages = await this.client.mirrorNode.getTopicMessagesByFilter(
34
- topicId,
35
- {
36
- order: "desc",
37
- limit: 1
38
- }
70
+ async register(registration) {
71
+ this.validateRegistration(registration);
72
+ if (this.topicId && this.client) {
73
+ this.logger.info("Submitting action registration to HCS", {
74
+ topicId: this.topicId,
75
+ hash: registration.hash,
76
+ wasmHash: registration.wasm_hash
77
+ });
78
+ const result = await this.client.submitMessage(
79
+ this.topicId,
80
+ JSON.stringify(registration)
39
81
  );
40
- if (!messages || messages.length === 0) {
41
- return null;
42
- }
43
- const latestMessage = messages[0];
44
- let data;
45
- if (latestMessage.raw_content) {
46
- data = JSON.parse(latestMessage.raw_content);
47
- } else {
48
- const msgAny = latestMessage;
49
- if (msgAny.p === "hcs-12" && msgAny.op) {
50
- data = {
51
- p: msgAny.p,
52
- op: msgAny.op,
53
- name: msgAny.name,
54
- version: msgAny.version,
55
- description: msgAny.description,
56
- permissions: msgAny.permissions,
57
- metadata: msgAny.metadata,
58
- data: msgAny.data,
59
- category: msgAny.category,
60
- source: msgAny.source,
61
- inputs: msgAny.inputs,
62
- outputs: msgAny.outputs,
63
- tags: msgAny.tags,
64
- fields: msgAny.fields,
65
- styles: msgAny.styles,
66
- actions: msgAny.actions,
67
- blocks: msgAny.blocks,
68
- refs: msgAny.refs
69
- };
70
- Object.keys(data).forEach((key) => {
71
- if (data[key] === void 0) {
72
- delete data[key];
73
- }
74
- });
75
- } else {
76
- return null;
77
- }
82
+ const sequenceNumber = result.sequenceNumber;
83
+ if (!sequenceNumber) {
84
+ throw new Error("No sequence number returned from submission");
78
85
  }
79
- return {
80
- id: latestMessage.sequence_number.toString(),
81
- sequenceNumber: latestMessage.sequence_number,
82
- timestamp: latestMessage.consensus_timestamp || (/* @__PURE__ */ new Date()).toISOString(),
83
- submitter: latestMessage.payer || "unknown",
84
- data
86
+ const entry = {
87
+ id: sequenceNumber.toString(),
88
+ sequenceNumber,
89
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
90
+ submitter: "getHashConnect" in this.client ? (await this.client.getAccountAndSigner()).accountId : this.client.getOperatorAccountId(),
91
+ data: registration
85
92
  };
86
- } catch (error) {
87
- this.logger.error("Failed to get latest entry", { topicId, error });
88
- return null;
93
+ this.entries.set(entry.id, entry);
94
+ this.actionsByHash.set(registration.hash, registration);
95
+ this.logger.info("Action registered", {
96
+ hash: registration.hash,
97
+ sequenceNumber,
98
+ hasSourceVerification: !!registration.source_verification
99
+ });
100
+ return sequenceNumber.toString();
101
+ } else {
102
+ const sequenceNumber = this.entries.size + 1;
103
+ const entry = {
104
+ id: sequenceNumber.toString(),
105
+ sequenceNumber,
106
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
107
+ submitter: "local",
108
+ data: registration
109
+ };
110
+ this.entries.set(entry.id, entry);
111
+ this.actionsByHash.set(registration.hash, registration);
112
+ return sequenceNumber.toString();
89
113
  }
90
114
  }
91
115
  /**
92
- * List all entries with optional filtering
116
+ * Retrieve action by hash
93
117
  */
94
- async listEntries(filter) {
118
+ async getAction(hash) {
119
+ const cached = this.actionsByHash.get(hash);
120
+ if (cached) return cached;
95
121
  if (this.topicId && this.client) {
96
122
  await this.sync();
123
+ return this.actionsByHash.get(hash) || null;
97
124
  }
98
- const entries = Array.from(this.entries.values());
99
- if (!filter) return entries;
100
- return entries.filter((entry) => {
101
- if (filter.submitter && entry.submitter !== filter.submitter) {
102
- return false;
103
- }
104
- if (filter.afterTimestamp && entry.timestamp < filter.afterTimestamp) {
105
- return false;
125
+ return null;
126
+ }
127
+ /**
128
+ * Retrieve action by topic ID
129
+ */
130
+ async getActionByTopicId(topicId) {
131
+ this.logger.debug("getActionByTopicId called", { topicId });
132
+ console.log("DEBUG: getActionByTopicId called", {
133
+ topicId,
134
+ cacheSize: this.actionsByHash.size,
135
+ cachedTopicIds: Array.from(this.actionsByHash.values()).map((a) => a.t_id)
136
+ });
137
+ for (const action of this.actionsByHash.values()) {
138
+ if (action.t_id === topicId) {
139
+ this.logger.debug("Action found in cache", { topicId, action });
140
+ console.log("DEBUG: Action found in cache", { topicId, action });
141
+ return action;
106
142
  }
107
- if (filter.beforeTimestamp && entry.timestamp > filter.beforeTimestamp) {
108
- return false;
143
+ }
144
+ if (this.topicId && this.client) {
145
+ this.logger.debug("Action not in cache, syncing...", { topicId });
146
+ console.log("DEBUG: Action not in cache, syncing...");
147
+ await this.sync();
148
+ console.log("DEBUG: After sync", {
149
+ cacheSize: this.actionsByHash.size,
150
+ cachedTopicIds: Array.from(this.actionsByHash.values()).map(
151
+ (a) => a.t_id
152
+ )
153
+ });
154
+ for (const action of this.actionsByHash.values()) {
155
+ if (action.t_id === topicId) {
156
+ this.logger.debug("Action found after sync", { topicId, action });
157
+ console.log("DEBUG: Action found after sync", { topicId, action });
158
+ return action;
159
+ }
109
160
  }
110
- return true;
111
- });
161
+ }
162
+ this.logger.warn("Action not found", { topicId });
163
+ console.log("DEBUG: Action not found", { topicId });
164
+ return null;
112
165
  }
113
166
  /**
114
- * Sync entries from the network
167
+ * Retrieve action info by hash
115
168
  */
116
- async sync() {
117
- if (!this.topicId || !this.client) {
118
- this.logger.warn("Cannot sync without topic ID and client");
119
- return;
120
- }
121
- this.logger.info("Syncing registry entries", {
122
- topicId: this.topicId,
123
- registryType: RegistryType[this.registryType],
124
- lastSync: this.lastSyncTimestamp
125
- });
169
+ async getActionInfo(hash) {
170
+ const action = await this.getAction(hash);
171
+ if (!action) return null;
126
172
  try {
127
- const messages = await this.client.mirrorNode.getTopicMessagesByFilter(
128
- this.topicId,
129
- {
130
- startTime: this.lastSyncTimestamp,
131
- order: "asc",
132
- limit: 100
173
+ let infoString;
174
+ if (action.info_t_id) {
175
+ if (!this.client) {
176
+ this.logger.error("Client not initialized - cannot fetch INFO");
177
+ return null;
133
178
  }
134
- );
135
- for (const msg of messages) {
136
- try {
137
- let data;
138
- if (msg.raw_content) {
139
- data = JSON.parse(msg.raw_content);
140
- } else {
141
- const msgAny = msg;
142
- if (msgAny.p === "hcs-12" && msgAny.op) {
143
- data = {
144
- p: msgAny.p,
145
- op: msgAny.op,
146
- name: msgAny.name,
147
- version: msgAny.version,
148
- description: msgAny.description,
149
- permissions: msgAny.permissions,
150
- metadata: msgAny.metadata,
151
- data: msgAny.data,
152
- category: msgAny.category,
153
- source: msgAny.source,
154
- inputs: msgAny.inputs,
155
- outputs: msgAny.outputs,
156
- tags: msgAny.tags,
157
- fields: msgAny.fields,
158
- styles: msgAny.styles,
159
- actions: msgAny.actions,
160
- blocks: msgAny.blocks,
161
- refs: msgAny.refs,
162
- t_id: msgAny.t_id,
163
- hash: msgAny.hash,
164
- wasm_hash: msgAny.wasm_hash,
165
- info_t_id: msgAny.info_t_id,
166
- validation_rules: msgAny.validation_rules,
167
- js_t_id: msgAny.js_t_id,
168
- js_hash: msgAny.js_hash,
169
- interface_version: msgAny.interface_version,
170
- title: msgAny.title,
171
- template: msgAny.template,
172
- author: msgAny.author,
173
- m: msgAny.m
174
- };
175
- Object.keys(data).forEach((key) => {
176
- if (data[key] === void 0) {
177
- delete data[key];
178
- }
179
- });
180
- } else {
181
- continue;
182
- }
183
- }
184
- if (data.p !== "hcs-12") {
185
- continue;
186
- }
187
- const entry = {
188
- id: msg.sequence_number.toString(),
189
- sequenceNumber: msg.sequence_number,
190
- timestamp: msg.consensus_timestamp || (/* @__PURE__ */ new Date()).toISOString(),
191
- submitter: msg.payer || "unknown",
192
- data
193
- };
194
- this.entries.set(entry.id, entry);
195
- } catch (error) {
196
- this.logger.warn("Failed to parse registry message", {
197
- sequenceNumber: msg.sequence_number,
198
- error
179
+ let inscription;
180
+ if ("getOperatorAccountId" in this.client) {
181
+ inscription = await retrieveInscription(action.info_t_id, {
182
+ accountId: this.client.getOperatorAccountId(),
183
+ privateKey: this.client.getOperatorPrivateKey(),
184
+ network: this.networkType
185
+ });
186
+ } else {
187
+ const { accountId } = await this.client.getAccountAndSigner();
188
+ inscription = await retrieveInscription(action.info_t_id, {
189
+ accountId,
190
+ network: this.networkType
199
191
  });
200
192
  }
193
+ if (!inscription.content) {
194
+ this.logger.error("No content in inscription response");
195
+ return null;
196
+ }
197
+ infoString = typeof inscription.content === "string" ? inscription.content : Buffer.from(inscription.content).toString("utf8");
198
+ } else {
199
+ this.logger.warn("Inline INFO storage not yet implemented");
200
+ return null;
201
201
  }
202
- if (messages.length > 0) {
203
- this.lastSyncTimestamp = messages[messages.length - 1].consensus_timestamp || (/* @__PURE__ */ new Date()).toISOString();
202
+ const moduleInfo = JSON.parse(infoString);
203
+ let computedHash;
204
+ if (isSSREnvironment()) {
205
+ computedHash = this.createSSRSafeHash(Buffer.from(infoString), "info");
204
206
  } else {
205
- this.lastSyncTimestamp = (/* @__PURE__ */ new Date()).toISOString();
207
+ const hasher = this.cryptoAdapter.createHash("sha256");
208
+ const result = hasher.update(Buffer.from(infoString)).digest("hex");
209
+ const hashValue = result instanceof Promise ? await result : result;
210
+ computedHash = typeof hashValue === "string" ? hashValue : hashValue.toString("hex");
206
211
  }
207
- this.logger.info("Registry sync completed", {
208
- topicId: this.topicId,
209
- messageCount: messages.length,
210
- lastSync: this.lastSyncTimestamp
211
- });
212
+ if (computedHash !== action.hash) {
213
+ this.logger.error("INFO hash mismatch", {
214
+ expected: action.hash,
215
+ computed: computedHash
216
+ });
217
+ throw new Error("Module info verification failed");
218
+ }
219
+ return moduleInfo;
212
220
  } catch (error) {
213
- this.logger.error("Failed to sync registry", { error });
214
- throw error;
221
+ this.logger.error("Failed to fetch action INFO", {
222
+ hash,
223
+ error
224
+ });
225
+ return null;
215
226
  }
216
227
  }
217
228
  /**
218
- * Get the registry topic memo format
229
+ * Retrieve action WASM binary
219
230
  */
220
- getTopicMemo() {
221
- const indexed = 1;
222
- const ttl = 60;
223
- const type = this.registryType;
224
- return `hcs-12:${indexed}:${ttl}:${type}`;
225
- }
226
- /**
227
- * Create a new registry topic
228
- */
229
- async createRegistryTopic() {
231
+ async getActionWasm(hash) {
232
+ const action = await this.getAction(hash);
233
+ if (!action) return null;
230
234
  if (!this.client) {
231
- throw new Error("Client required to create topic");
235
+ this.logger.error("Client not initialized - cannot fetch WASM");
236
+ return null;
237
+ }
238
+ try {
239
+ let inscription;
240
+ if ("getOperatorAccountId" in this.client) {
241
+ inscription = await retrieveInscription(action.t_id, {
242
+ accountId: this.client.getOperatorAccountId(),
243
+ privateKey: this.client.getOperatorPrivateKey(),
244
+ network: this.networkType
245
+ });
246
+ } else {
247
+ const { accountId } = await this.client.getAccountAndSigner();
248
+ inscription = await retrieveInscription(action.t_id, {
249
+ accountId,
250
+ network: this.networkType
251
+ });
252
+ }
253
+ if (!inscription.content) {
254
+ this.logger.error("No content in inscription response");
255
+ return null;
256
+ }
257
+ const wasmBuffer = typeof inscription.content === "string" ? Buffer.from(inscription.content, "base64") : Buffer.from(inscription.content);
258
+ let computedHash;
259
+ if (isSSREnvironment()) {
260
+ computedHash = this.createSSRSafeHash(wasmBuffer, "wasm");
261
+ } else {
262
+ const hasher = this.cryptoAdapter.createHash("sha256");
263
+ const result = hasher.update(wasmBuffer).digest("hex");
264
+ const hashValue = result instanceof Promise ? await result : result;
265
+ computedHash = typeof hashValue === "string" ? hashValue : hashValue.toString("hex");
266
+ }
267
+ if (computedHash !== action.wasm_hash) {
268
+ this.logger.error("WASM hash mismatch", {
269
+ expected: action.wasm_hash,
270
+ computed: computedHash
271
+ });
272
+ throw new Error("WASM binary verification failed");
273
+ }
274
+ return new Uint8Array(wasmBuffer);
275
+ } catch (error) {
276
+ this.logger.error("Failed to fetch WASM from HCS-1", {
277
+ topicId: action.t_id,
278
+ error
279
+ });
280
+ return null;
232
281
  }
233
- const topicId = await this.client.createRegistryTopic(this.registryType);
234
- this.topicId = topicId;
235
- return topicId;
236
282
  }
237
283
  /**
238
- * Get registry configuration
284
+ * Search actions by criteria
239
285
  */
240
- getConfig() {
241
- return {
242
- type: this.registryType,
243
- indexed: false,
244
- ttl: 60,
245
- topicId: this.topicId,
246
- memo: this.getTopicMemo()
247
- };
286
+ async searchActions(criteria) {
287
+ const entries = await this.listEntries({
288
+ submitter: criteria.creator,
289
+ afterTimestamp: criteria.afterTimestamp,
290
+ beforeTimestamp: criteria.beforeTimestamp
291
+ });
292
+ return entries.map((entry) => entry.data).filter((action) => {
293
+ if (criteria.hasSourceVerification !== void 0) {
294
+ const hasVerification = !!action.source_verification;
295
+ if (hasVerification !== criteria.hasSourceVerification) return false;
296
+ }
297
+ return true;
298
+ });
248
299
  }
249
300
  /**
250
- * Store large content via HCS-1 inscription
301
+ * Get actions by version chain
251
302
  */
252
- async inscribeContent(content, mimeType, metadata) {
253
- if (!this.client) {
254
- throw new Error("Client required for inscription");
255
- }
256
- const buffer = typeof content === "string" ? Buffer.from(content) : content;
257
- this.logger.info("Inscribing content via HCS-1", {
258
- size: buffer.length,
259
- mimeType,
260
- registryType: RegistryType[this.registryType]
261
- });
262
- let response;
263
- if ("getOperatorAccountId" in this.client) {
264
- response = await inscribe(
265
- {
266
- type: "buffer",
267
- buffer,
268
- fileName: mimeType === "application/octet-stream" && metadata?.fileType === "wasm" ? `${metadata?.name || "content"}.wasm` : metadata?.name || "content",
269
- mimeType
270
- },
271
- {
272
- accountId: this.client.getOperatorAccountId(),
273
- privateKey: this.client.getOperatorPrivateKey(),
274
- network: this.networkType
275
- },
276
- {
277
- mode: "file",
278
- metadata,
279
- waitForConfirmation: true
280
- }
281
- );
282
- } else {
283
- const { accountId, signer } = await this.client.getAccountAndSigner();
284
- response = await inscribeWithSigner(
285
- {
286
- type: "buffer",
287
- buffer,
288
- fileName: mimeType === "application/octet-stream" && metadata?.fileType === "wasm" ? `${metadata?.name || "content"}.wasm` : metadata?.name || "content",
289
- mimeType
290
- },
291
- signer,
292
- {
293
- mode: "file",
294
- metadata,
295
- waitForConfirmation: true
296
- }
297
- );
303
+ async getVersionChain(latestHash) {
304
+ const chain = [];
305
+ let currentHash = latestHash;
306
+ while (currentHash) {
307
+ const action = await this.getAction(currentHash);
308
+ if (!action) break;
309
+ chain.push(action);
310
+ currentHash = void 0;
298
311
  }
299
- if (!response.confirmed) {
300
- throw new Error("Failed to inscribe content");
301
- }
302
- const topicId = response.inscription.topic_id;
303
- if (!topicId) {
304
- throw new Error("No topic ID in inscription response");
305
- }
306
- this.logger.info("Content inscribed successfully", {
307
- topicId
308
- });
309
- return topicId;
312
+ return chain;
310
313
  }
311
314
  /**
312
- * Validate common registration fields
315
+ * Validate action registration using Zod schema
313
316
  */
314
- validateBaseRegistration(data) {
315
- if (!data.p || data.p !== "hcs-12") {
316
- throw new Error("Invalid protocol identifier");
317
+ validateRegistration(registration) {
318
+ try {
319
+ validateActionRegistration(registration);
320
+ } catch (error) {
321
+ if (error instanceof ZodError) {
322
+ const firstError = error.errors[0];
323
+ throw new Error(
324
+ `Validation failed: ${firstError.path.join(".")} - ${firstError.message}`
325
+ );
326
+ }
327
+ throw error;
317
328
  }
318
- if (!data.op || data.op !== "register") {
319
- throw new Error("Invalid operation");
329
+ }
330
+ /**
331
+ * Override sync to handle action-specific processing
332
+ */
333
+ async sync() {
334
+ await super.sync();
335
+ this.actionsByHash.clear();
336
+ for (const entry of this.entries.values()) {
337
+ const action = entry.data;
338
+ this.actionsByHash.set(action.hash, action);
320
339
  }
321
340
  }
322
341
  /**
323
- * Clear local cache
342
+ * Override clear cache to also clear action hash index
324
343
  */
325
344
  clearCache() {
326
- this.entries.clear();
327
- this.lastSyncTimestamp = void 0;
328
- this.logger.info("Registry cache cleared", {
329
- registryType: RegistryType[this.registryType]
330
- });
345
+ super.clearCache();
346
+ this.actionsByHash.clear();
331
347
  }
332
348
  /**
333
- * Get registry statistics
349
+ * Create SSR-safe hash
334
350
  */
335
- getStats() {
336
- return {
337
- entryCount: this.entries.size,
338
- lastSync: this.lastSyncTimestamp,
339
- topicId: this.topicId,
340
- registryType: RegistryType[this.registryType]
341
- };
351
+ createSSRSafeHash(data, type) {
352
+ let hash = 0;
353
+ for (let i = 0; i < Math.min(data.length, 256); i++) {
354
+ hash = (hash << 5) - hash + data[i] & 4294967295;
355
+ }
356
+ return `ssr-${type}-${data.length}-${Math.abs(hash).toString(16).padStart(8, "0")}`;
342
357
  }
343
358
  }
344
359
  export {
345
- BaseRegistry
360
+ ActionRegistry
346
361
  };
347
362
  //# sourceMappingURL=standards-sdk.es31.js.map