@hashgraphonline/standards-sdk 0.1.189 → 0.1.190

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 (528) hide show
  1. package/dist/browser/hcs-25/adapters/agentverse.d.ts.map +1 -1
  2. package/dist/browser/hcs-25/adapters/availability.d.ts.map +1 -1
  3. package/dist/browser/hcs-25/adapters/connectivity.d.ts.map +1 -1
  4. package/dist/browser/hcs-25/adapters/ethos.d.ts.map +1 -1
  5. package/dist/browser/hcs-25/adapters/model-evals.d.ts.map +1 -1
  6. package/dist/browser/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  7. package/dist/browser/hcs-25/adapters/x402.d.ts.map +1 -1
  8. package/dist/browser/hcs-25/collectors/acp.d.ts +42 -0
  9. package/dist/browser/hcs-25/collectors/acp.d.ts.map +1 -0
  10. package/dist/browser/hcs-25/collectors/agentverse.d.ts +37 -0
  11. package/dist/browser/hcs-25/collectors/agentverse.d.ts.map +1 -0
  12. package/dist/browser/hcs-25/collectors/availability.d.ts +29 -0
  13. package/dist/browser/hcs-25/collectors/availability.d.ts.map +1 -0
  14. package/dist/browser/hcs-25/collectors/catalog.d.ts +57 -0
  15. package/dist/browser/hcs-25/collectors/catalog.d.ts.map +1 -0
  16. package/dist/browser/hcs-25/collectors/connectivity.d.ts +49 -0
  17. package/dist/browser/hcs-25/collectors/connectivity.d.ts.map +1 -0
  18. package/dist/browser/hcs-25/collectors/endpoints.d.ts +9 -0
  19. package/dist/browser/hcs-25/collectors/endpoints.d.ts.map +1 -0
  20. package/dist/browser/hcs-25/collectors/erc8004.d.ts +104 -0
  21. package/dist/browser/hcs-25/collectors/erc8004.d.ts.map +1 -0
  22. package/dist/browser/hcs-25/collectors/ethos.d.ts +95 -0
  23. package/dist/browser/hcs-25/collectors/ethos.d.ts.map +1 -0
  24. package/dist/browser/hcs-25/collectors/freshness.d.ts +36 -0
  25. package/dist/browser/hcs-25/collectors/freshness.d.ts.map +1 -0
  26. package/dist/browser/hcs-25/collectors/http.d.ts +67 -0
  27. package/dist/browser/hcs-25/collectors/http.d.ts.map +1 -0
  28. package/dist/browser/hcs-25/collectors/index.d.ts +21 -0
  29. package/dist/browser/hcs-25/collectors/index.d.ts.map +1 -0
  30. package/dist/browser/hcs-25/collectors/merge.d.ts +11 -0
  31. package/dist/browser/hcs-25/collectors/merge.d.ts.map +1 -0
  32. package/dist/browser/hcs-25/collectors/model-evals.d.ts +315 -0
  33. package/dist/browser/hcs-25/collectors/model-evals.d.ts.map +1 -0
  34. package/dist/browser/hcs-25/collectors/oss-popularity.d.ts +51 -0
  35. package/dist/browser/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  36. package/dist/browser/hcs-25/collectors/output-verification.d.ts +37 -0
  37. package/dist/browser/hcs-25/collectors/output-verification.d.ts.map +1 -0
  38. package/dist/browser/hcs-25/collectors/pipeline.d.ts +19 -0
  39. package/dist/browser/hcs-25/collectors/pipeline.d.ts.map +1 -0
  40. package/dist/browser/hcs-25/collectors/runner.d.ts +20 -0
  41. package/dist/browser/hcs-25/collectors/runner.d.ts.map +1 -0
  42. package/dist/browser/hcs-25/collectors/simple-evals.d.ts +91 -0
  43. package/dist/browser/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  44. package/dist/browser/hcs-25/collectors/types.d.ts +113 -0
  45. package/dist/browser/hcs-25/collectors/types.d.ts.map +1 -0
  46. package/dist/browser/hcs-25/collectors/x402-onchain.d.ts +105 -0
  47. package/dist/browser/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  48. package/dist/browser/hcs-25/collectors/x402.d.ts +48 -0
  49. package/dist/browser/hcs-25/collectors/x402.d.ts.map +1 -0
  50. package/dist/browser/hcs-25/index.d.ts +1 -0
  51. package/dist/browser/hcs-25/index.d.ts.map +1 -1
  52. package/dist/browser/hcs-25/signals/marketplace.d.ts +6 -6
  53. package/dist/browser/hcs-25/signals/marketplace.d.ts.map +1 -1
  54. package/dist/browser/hcs-25/signals/model-evals.d.ts +12 -12
  55. package/dist/browser/hcs-25/signals/model-evals.d.ts.map +1 -1
  56. package/dist/browser/hcs-25/signals/operational.d.ts +15 -12
  57. package/dist/browser/hcs-25/signals/operational.d.ts.map +1 -1
  58. package/dist/browser/hcs-25/signals/simple-evals.d.ts +1 -1
  59. package/dist/browser/hcs-25/signals/simple-evals.d.ts.map +1 -1
  60. package/dist/browser-root/hcs-25/adapters/agentverse.d.ts.map +1 -1
  61. package/dist/browser-root/hcs-25/adapters/availability.d.ts.map +1 -1
  62. package/dist/browser-root/hcs-25/adapters/connectivity.d.ts.map +1 -1
  63. package/dist/browser-root/hcs-25/adapters/ethos.d.ts.map +1 -1
  64. package/dist/browser-root/hcs-25/adapters/model-evals.d.ts.map +1 -1
  65. package/dist/browser-root/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  66. package/dist/browser-root/hcs-25/adapters/x402.d.ts.map +1 -1
  67. package/dist/browser-root/hcs-25/collectors/acp.d.ts +42 -0
  68. package/dist/browser-root/hcs-25/collectors/acp.d.ts.map +1 -0
  69. package/dist/browser-root/hcs-25/collectors/agentverse.d.ts +37 -0
  70. package/dist/browser-root/hcs-25/collectors/agentverse.d.ts.map +1 -0
  71. package/dist/browser-root/hcs-25/collectors/availability.d.ts +29 -0
  72. package/dist/browser-root/hcs-25/collectors/availability.d.ts.map +1 -0
  73. package/dist/browser-root/hcs-25/collectors/catalog.d.ts +57 -0
  74. package/dist/browser-root/hcs-25/collectors/catalog.d.ts.map +1 -0
  75. package/dist/browser-root/hcs-25/collectors/connectivity.d.ts +49 -0
  76. package/dist/browser-root/hcs-25/collectors/connectivity.d.ts.map +1 -0
  77. package/dist/browser-root/hcs-25/collectors/endpoints.d.ts +9 -0
  78. package/dist/browser-root/hcs-25/collectors/endpoints.d.ts.map +1 -0
  79. package/dist/browser-root/hcs-25/collectors/erc8004.d.ts +104 -0
  80. package/dist/browser-root/hcs-25/collectors/erc8004.d.ts.map +1 -0
  81. package/dist/browser-root/hcs-25/collectors/ethos.d.ts +95 -0
  82. package/dist/browser-root/hcs-25/collectors/ethos.d.ts.map +1 -0
  83. package/dist/browser-root/hcs-25/collectors/freshness.d.ts +36 -0
  84. package/dist/browser-root/hcs-25/collectors/freshness.d.ts.map +1 -0
  85. package/dist/browser-root/hcs-25/collectors/http.d.ts +67 -0
  86. package/dist/browser-root/hcs-25/collectors/http.d.ts.map +1 -0
  87. package/dist/browser-root/hcs-25/collectors/index.d.ts +21 -0
  88. package/dist/browser-root/hcs-25/collectors/index.d.ts.map +1 -0
  89. package/dist/browser-root/hcs-25/collectors/merge.d.ts +11 -0
  90. package/dist/browser-root/hcs-25/collectors/merge.d.ts.map +1 -0
  91. package/dist/browser-root/hcs-25/collectors/model-evals.d.ts +315 -0
  92. package/dist/browser-root/hcs-25/collectors/model-evals.d.ts.map +1 -0
  93. package/dist/browser-root/hcs-25/collectors/oss-popularity.d.ts +51 -0
  94. package/dist/browser-root/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  95. package/dist/browser-root/hcs-25/collectors/output-verification.d.ts +37 -0
  96. package/dist/browser-root/hcs-25/collectors/output-verification.d.ts.map +1 -0
  97. package/dist/browser-root/hcs-25/collectors/pipeline.d.ts +19 -0
  98. package/dist/browser-root/hcs-25/collectors/pipeline.d.ts.map +1 -0
  99. package/dist/browser-root/hcs-25/collectors/runner.d.ts +20 -0
  100. package/dist/browser-root/hcs-25/collectors/runner.d.ts.map +1 -0
  101. package/dist/browser-root/hcs-25/collectors/simple-evals.d.ts +91 -0
  102. package/dist/browser-root/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  103. package/dist/browser-root/hcs-25/collectors/types.d.ts +113 -0
  104. package/dist/browser-root/hcs-25/collectors/types.d.ts.map +1 -0
  105. package/dist/browser-root/hcs-25/collectors/x402-onchain.d.ts +105 -0
  106. package/dist/browser-root/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  107. package/dist/browser-root/hcs-25/collectors/x402.d.ts +48 -0
  108. package/dist/browser-root/hcs-25/collectors/x402.d.ts.map +1 -0
  109. package/dist/browser-root/hcs-25/index.d.ts +1 -0
  110. package/dist/browser-root/hcs-25/index.d.ts.map +1 -1
  111. package/dist/browser-root/hcs-25/signals/marketplace.d.ts +6 -6
  112. package/dist/browser-root/hcs-25/signals/marketplace.d.ts.map +1 -1
  113. package/dist/browser-root/hcs-25/signals/model-evals.d.ts +12 -12
  114. package/dist/browser-root/hcs-25/signals/model-evals.d.ts.map +1 -1
  115. package/dist/browser-root/hcs-25/signals/operational.d.ts +15 -12
  116. package/dist/browser-root/hcs-25/signals/operational.d.ts.map +1 -1
  117. package/dist/browser-root/hcs-25/signals/simple-evals.d.ts +1 -1
  118. package/dist/browser-root/hcs-25/signals/simple-evals.d.ts.map +1 -1
  119. package/dist/cjs/hcs-25/adapters/agentverse.d.ts.map +1 -1
  120. package/dist/cjs/hcs-25/adapters/availability.d.ts.map +1 -1
  121. package/dist/cjs/hcs-25/adapters/connectivity.d.ts.map +1 -1
  122. package/dist/cjs/hcs-25/adapters/ethos.d.ts.map +1 -1
  123. package/dist/cjs/hcs-25/adapters/model-evals.d.ts.map +1 -1
  124. package/dist/cjs/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  125. package/dist/cjs/hcs-25/adapters/x402.d.ts.map +1 -1
  126. package/dist/cjs/hcs-25/collectors/acp.d.ts +42 -0
  127. package/dist/cjs/hcs-25/collectors/acp.d.ts.map +1 -0
  128. package/dist/cjs/hcs-25/collectors/agentverse.d.ts +37 -0
  129. package/dist/cjs/hcs-25/collectors/agentverse.d.ts.map +1 -0
  130. package/dist/cjs/hcs-25/collectors/availability.d.ts +29 -0
  131. package/dist/cjs/hcs-25/collectors/availability.d.ts.map +1 -0
  132. package/dist/cjs/hcs-25/collectors/catalog.d.ts +57 -0
  133. package/dist/cjs/hcs-25/collectors/catalog.d.ts.map +1 -0
  134. package/dist/cjs/hcs-25/collectors/connectivity.d.ts +49 -0
  135. package/dist/cjs/hcs-25/collectors/connectivity.d.ts.map +1 -0
  136. package/dist/cjs/hcs-25/collectors/endpoints.d.ts +9 -0
  137. package/dist/cjs/hcs-25/collectors/endpoints.d.ts.map +1 -0
  138. package/dist/cjs/hcs-25/collectors/erc8004.d.ts +104 -0
  139. package/dist/cjs/hcs-25/collectors/erc8004.d.ts.map +1 -0
  140. package/dist/cjs/hcs-25/collectors/ethos.d.ts +95 -0
  141. package/dist/cjs/hcs-25/collectors/ethos.d.ts.map +1 -0
  142. package/dist/cjs/hcs-25/collectors/freshness.d.ts +36 -0
  143. package/dist/cjs/hcs-25/collectors/freshness.d.ts.map +1 -0
  144. package/dist/cjs/hcs-25/collectors/http.d.ts +67 -0
  145. package/dist/cjs/hcs-25/collectors/http.d.ts.map +1 -0
  146. package/dist/cjs/hcs-25/collectors/index.d.ts +21 -0
  147. package/dist/cjs/hcs-25/collectors/index.d.ts.map +1 -0
  148. package/dist/cjs/hcs-25/collectors/merge.d.ts +11 -0
  149. package/dist/cjs/hcs-25/collectors/merge.d.ts.map +1 -0
  150. package/dist/cjs/hcs-25/collectors/model-evals.d.ts +315 -0
  151. package/dist/cjs/hcs-25/collectors/model-evals.d.ts.map +1 -0
  152. package/dist/cjs/hcs-25/collectors/oss-popularity.d.ts +51 -0
  153. package/dist/cjs/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  154. package/dist/cjs/hcs-25/collectors/output-verification.d.ts +37 -0
  155. package/dist/cjs/hcs-25/collectors/output-verification.d.ts.map +1 -0
  156. package/dist/cjs/hcs-25/collectors/pipeline.d.ts +19 -0
  157. package/dist/cjs/hcs-25/collectors/pipeline.d.ts.map +1 -0
  158. package/dist/cjs/hcs-25/collectors/runner.d.ts +20 -0
  159. package/dist/cjs/hcs-25/collectors/runner.d.ts.map +1 -0
  160. package/dist/cjs/hcs-25/collectors/simple-evals.d.ts +91 -0
  161. package/dist/cjs/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  162. package/dist/cjs/hcs-25/collectors/types.d.ts +113 -0
  163. package/dist/cjs/hcs-25/collectors/types.d.ts.map +1 -0
  164. package/dist/cjs/hcs-25/collectors/x402-onchain.d.ts +105 -0
  165. package/dist/cjs/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  166. package/dist/cjs/hcs-25/collectors/x402.d.ts +48 -0
  167. package/dist/cjs/hcs-25/collectors/x402.d.ts.map +1 -0
  168. package/dist/cjs/hcs-25/index.d.ts +1 -0
  169. package/dist/cjs/hcs-25/index.d.ts.map +1 -1
  170. package/dist/cjs/hcs-25/signals/marketplace.d.ts +6 -6
  171. package/dist/cjs/hcs-25/signals/marketplace.d.ts.map +1 -1
  172. package/dist/cjs/hcs-25/signals/model-evals.d.ts +12 -12
  173. package/dist/cjs/hcs-25/signals/model-evals.d.ts.map +1 -1
  174. package/dist/cjs/hcs-25/signals/operational.d.ts +15 -12
  175. package/dist/cjs/hcs-25/signals/operational.d.ts.map +1 -1
  176. package/dist/cjs/hcs-25/signals/simple-evals.d.ts +1 -1
  177. package/dist/cjs/hcs-25/signals/simple-evals.d.ts.map +1 -1
  178. package/dist/cjs/standards-sdk.cjs +2 -2
  179. package/dist/cjs/standards-sdk.cjs.map +1 -1
  180. package/dist/es/hcs-25/adapters/agentverse.d.ts.map +1 -1
  181. package/dist/es/hcs-25/adapters/availability.d.ts.map +1 -1
  182. package/dist/es/hcs-25/adapters/connectivity.d.ts.map +1 -1
  183. package/dist/es/hcs-25/adapters/ethos.d.ts.map +1 -1
  184. package/dist/es/hcs-25/adapters/model-evals.d.ts.map +1 -1
  185. package/dist/es/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  186. package/dist/es/hcs-25/adapters/x402.d.ts.map +1 -1
  187. package/dist/es/hcs-25/collectors/acp.d.ts +42 -0
  188. package/dist/es/hcs-25/collectors/acp.d.ts.map +1 -0
  189. package/dist/es/hcs-25/collectors/agentverse.d.ts +37 -0
  190. package/dist/es/hcs-25/collectors/agentverse.d.ts.map +1 -0
  191. package/dist/es/hcs-25/collectors/availability.d.ts +29 -0
  192. package/dist/es/hcs-25/collectors/availability.d.ts.map +1 -0
  193. package/dist/es/hcs-25/collectors/catalog.d.ts +57 -0
  194. package/dist/es/hcs-25/collectors/catalog.d.ts.map +1 -0
  195. package/dist/es/hcs-25/collectors/connectivity.d.ts +49 -0
  196. package/dist/es/hcs-25/collectors/connectivity.d.ts.map +1 -0
  197. package/dist/es/hcs-25/collectors/endpoints.d.ts +9 -0
  198. package/dist/es/hcs-25/collectors/endpoints.d.ts.map +1 -0
  199. package/dist/es/hcs-25/collectors/erc8004.d.ts +104 -0
  200. package/dist/es/hcs-25/collectors/erc8004.d.ts.map +1 -0
  201. package/dist/es/hcs-25/collectors/ethos.d.ts +95 -0
  202. package/dist/es/hcs-25/collectors/ethos.d.ts.map +1 -0
  203. package/dist/es/hcs-25/collectors/freshness.d.ts +36 -0
  204. package/dist/es/hcs-25/collectors/freshness.d.ts.map +1 -0
  205. package/dist/es/hcs-25/collectors/http.d.ts +67 -0
  206. package/dist/es/hcs-25/collectors/http.d.ts.map +1 -0
  207. package/dist/es/hcs-25/collectors/index.d.ts +21 -0
  208. package/dist/es/hcs-25/collectors/index.d.ts.map +1 -0
  209. package/dist/es/hcs-25/collectors/merge.d.ts +11 -0
  210. package/dist/es/hcs-25/collectors/merge.d.ts.map +1 -0
  211. package/dist/es/hcs-25/collectors/model-evals.d.ts +315 -0
  212. package/dist/es/hcs-25/collectors/model-evals.d.ts.map +1 -0
  213. package/dist/es/hcs-25/collectors/oss-popularity.d.ts +51 -0
  214. package/dist/es/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  215. package/dist/es/hcs-25/collectors/output-verification.d.ts +37 -0
  216. package/dist/es/hcs-25/collectors/output-verification.d.ts.map +1 -0
  217. package/dist/es/hcs-25/collectors/pipeline.d.ts +19 -0
  218. package/dist/es/hcs-25/collectors/pipeline.d.ts.map +1 -0
  219. package/dist/es/hcs-25/collectors/runner.d.ts +20 -0
  220. package/dist/es/hcs-25/collectors/runner.d.ts.map +1 -0
  221. package/dist/es/hcs-25/collectors/simple-evals.d.ts +91 -0
  222. package/dist/es/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  223. package/dist/es/hcs-25/collectors/types.d.ts +113 -0
  224. package/dist/es/hcs-25/collectors/types.d.ts.map +1 -0
  225. package/dist/es/hcs-25/collectors/x402-onchain.d.ts +105 -0
  226. package/dist/es/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  227. package/dist/es/hcs-25/collectors/x402.d.ts +48 -0
  228. package/dist/es/hcs-25/collectors/x402.d.ts.map +1 -0
  229. package/dist/es/hcs-25/index.d.ts +1 -0
  230. package/dist/es/hcs-25/index.d.ts.map +1 -1
  231. package/dist/es/hcs-25/signals/marketplace.d.ts +6 -6
  232. package/dist/es/hcs-25/signals/marketplace.d.ts.map +1 -1
  233. package/dist/es/hcs-25/signals/model-evals.d.ts +12 -12
  234. package/dist/es/hcs-25/signals/model-evals.d.ts.map +1 -1
  235. package/dist/es/hcs-25/signals/operational.d.ts +15 -12
  236. package/dist/es/hcs-25/signals/operational.d.ts.map +1 -1
  237. package/dist/es/hcs-25/signals/simple-evals.d.ts +1 -1
  238. package/dist/es/hcs-25/signals/simple-evals.d.ts.map +1 -1
  239. package/dist/es/standards-sdk.es.js +137 -58
  240. package/dist/es/standards-sdk.es.js.map +1 -1
  241. package/dist/es/standards-sdk.es101.js +2 -2
  242. package/dist/es/standards-sdk.es103.js +2 -2
  243. package/dist/es/standards-sdk.es104.js +1 -1
  244. package/dist/es/standards-sdk.es106.js +1 -1
  245. package/dist/es/standards-sdk.es108.js +2 -2
  246. package/dist/es/standards-sdk.es11.js +1 -1
  247. package/dist/es/standards-sdk.es110.js +1 -1
  248. package/dist/es/standards-sdk.es111.js +2 -2
  249. package/dist/es/standards-sdk.es115.js +3 -3
  250. package/dist/es/standards-sdk.es116.js +4 -4
  251. package/dist/es/standards-sdk.es12.js +1 -1
  252. package/dist/es/standards-sdk.es120.js +4 -4
  253. package/dist/es/standards-sdk.es121.js +11 -11
  254. package/dist/es/standards-sdk.es122.js +176 -240
  255. package/dist/es/standards-sdk.es122.js.map +1 -1
  256. package/dist/es/standards-sdk.es123.js +41 -468
  257. package/dist/es/standards-sdk.es123.js.map +1 -1
  258. package/dist/es/standards-sdk.es124.js +28 -103
  259. package/dist/es/standards-sdk.es124.js.map +1 -1
  260. package/dist/es/standards-sdk.es125.js +185 -145
  261. package/dist/es/standards-sdk.es125.js.map +1 -1
  262. package/dist/es/standards-sdk.es126.js +13 -33
  263. package/dist/es/standards-sdk.es126.js.map +1 -1
  264. package/dist/es/standards-sdk.es127.js +44 -10
  265. package/dist/es/standards-sdk.es127.js.map +1 -1
  266. package/dist/es/standards-sdk.es128.js +150 -172
  267. package/dist/es/standards-sdk.es128.js.map +1 -1
  268. package/dist/es/standards-sdk.es129.js +166 -26
  269. package/dist/es/standards-sdk.es129.js.map +1 -1
  270. package/dist/es/standards-sdk.es13.js +1 -1
  271. package/dist/es/standards-sdk.es130.js +375 -18
  272. package/dist/es/standards-sdk.es130.js.map +1 -1
  273. package/dist/es/standards-sdk.es131.js +371 -139
  274. package/dist/es/standards-sdk.es131.js.map +1 -1
  275. package/dist/es/standards-sdk.es132.js +211 -180
  276. package/dist/es/standards-sdk.es132.js.map +1 -1
  277. package/dist/es/standards-sdk.es133.js +210 -770
  278. package/dist/es/standards-sdk.es133.js.map +1 -1
  279. package/dist/es/standards-sdk.es134.js +376 -10
  280. package/dist/es/standards-sdk.es134.js.map +1 -1
  281. package/dist/es/standards-sdk.es135.js +118 -564
  282. package/dist/es/standards-sdk.es135.js.map +1 -1
  283. package/dist/es/standards-sdk.es136.js +233 -608
  284. package/dist/es/standards-sdk.es136.js.map +1 -1
  285. package/dist/es/standards-sdk.es137.js +1328 -12
  286. package/dist/es/standards-sdk.es137.js.map +1 -1
  287. package/dist/es/standards-sdk.es138.js +133 -2
  288. package/dist/es/standards-sdk.es138.js.map +1 -1
  289. package/dist/es/standards-sdk.es139.js +258 -74
  290. package/dist/es/standards-sdk.es139.js.map +1 -1
  291. package/dist/es/standards-sdk.es14.js +1 -1
  292. package/dist/es/standards-sdk.es140.js +104 -38
  293. package/dist/es/standards-sdk.es140.js.map +1 -1
  294. package/dist/es/standards-sdk.es141.js +252 -2
  295. package/dist/es/standards-sdk.es141.js.map +1 -1
  296. package/dist/es/standards-sdk.es142.js +446 -203
  297. package/dist/es/standards-sdk.es142.js.map +1 -1
  298. package/dist/es/standards-sdk.es143.js +104 -1139
  299. package/dist/es/standards-sdk.es143.js.map +1 -1
  300. package/dist/es/standards-sdk.es144.js +144 -290
  301. package/dist/es/standards-sdk.es144.js.map +1 -1
  302. package/dist/es/standards-sdk.es145.js +31 -419
  303. package/dist/es/standards-sdk.es145.js.map +1 -1
  304. package/dist/es/standards-sdk.es146.js +10 -353
  305. package/dist/es/standards-sdk.es146.js.map +1 -1
  306. package/dist/es/standards-sdk.es147.js +144 -1084
  307. package/dist/es/standards-sdk.es147.js.map +1 -1
  308. package/dist/es/standards-sdk.es148.js +25 -204
  309. package/dist/es/standards-sdk.es148.js.map +1 -1
  310. package/dist/es/standards-sdk.es149.js +17 -1562
  311. package/dist/es/standards-sdk.es149.js.map +1 -1
  312. package/dist/es/standards-sdk.es15.js +1 -1
  313. package/dist/es/standards-sdk.es150.js +128 -1134
  314. package/dist/es/standards-sdk.es150.js.map +1 -1
  315. package/dist/es/standards-sdk.es151.js +199 -14
  316. package/dist/es/standards-sdk.es151.js.map +1 -1
  317. package/dist/es/standards-sdk.es152.js +773 -434
  318. package/dist/es/standards-sdk.es152.js.map +1 -1
  319. package/dist/es/standards-sdk.es153.js +10 -256
  320. package/dist/es/standards-sdk.es153.js.map +1 -1
  321. package/dist/es/standards-sdk.es154.js +567 -4
  322. package/dist/es/standards-sdk.es154.js.map +1 -1
  323. package/dist/es/standards-sdk.es155.js +619 -74
  324. package/dist/es/standards-sdk.es155.js.map +1 -1
  325. package/dist/es/standards-sdk.es156.js +12 -86
  326. package/dist/es/standards-sdk.es156.js.map +1 -1
  327. package/dist/es/standards-sdk.es157.js +2 -60
  328. package/dist/es/standards-sdk.es157.js.map +1 -1
  329. package/dist/es/standards-sdk.es158.js +87 -2547
  330. package/dist/es/standards-sdk.es158.js.map +1 -1
  331. package/dist/es/standards-sdk.es159.js +36 -155
  332. package/dist/es/standards-sdk.es159.js.map +1 -1
  333. package/dist/es/standards-sdk.es16.js +6 -6
  334. package/dist/es/standards-sdk.es160.js +2 -7
  335. package/dist/es/standards-sdk.es160.js.map +1 -1
  336. package/dist/es/standards-sdk.es161.js +223 -74
  337. package/dist/es/standards-sdk.es161.js.map +1 -1
  338. package/dist/es/standards-sdk.es162.js +1122 -47
  339. package/dist/es/standards-sdk.es162.js.map +1 -1
  340. package/dist/es/standards-sdk.es163.js +299 -187
  341. package/dist/es/standards-sdk.es163.js.map +1 -1
  342. package/dist/es/standards-sdk.es164.js +419 -23
  343. package/dist/es/standards-sdk.es164.js.map +1 -1
  344. package/dist/es/standards-sdk.es165.js +352 -55
  345. package/dist/es/standards-sdk.es165.js.map +1 -1
  346. package/dist/es/standards-sdk.es166.js +1113 -86
  347. package/dist/es/standards-sdk.es166.js.map +1 -1
  348. package/dist/es/standards-sdk.es167.js +200 -41
  349. package/dist/es/standards-sdk.es167.js.map +1 -1
  350. package/dist/es/standards-sdk.es168.js +1551 -188
  351. package/dist/es/standards-sdk.es168.js.map +1 -1
  352. package/dist/es/standards-sdk.es169.js +1161 -51
  353. package/dist/es/standards-sdk.es169.js.map +1 -1
  354. package/dist/es/standards-sdk.es170.js +15 -47
  355. package/dist/es/standards-sdk.es170.js.map +1 -1
  356. package/dist/es/standards-sdk.es171.js +445 -50
  357. package/dist/es/standards-sdk.es171.js.map +1 -1
  358. package/dist/es/standards-sdk.es172.js +255 -45
  359. package/dist/es/standards-sdk.es172.js.map +1 -1
  360. package/dist/es/standards-sdk.es173.js +4 -122
  361. package/dist/es/standards-sdk.es173.js.map +1 -1
  362. package/dist/es/standards-sdk.es174.js +77 -50
  363. package/dist/es/standards-sdk.es174.js.map +1 -1
  364. package/dist/es/standards-sdk.es175.js +85 -42
  365. package/dist/es/standards-sdk.es175.js.map +1 -1
  366. package/dist/es/standards-sdk.es176.js +60 -72
  367. package/dist/es/standards-sdk.es176.js.map +1 -1
  368. package/dist/es/standards-sdk.es177.js +2544 -65
  369. package/dist/es/standards-sdk.es177.js.map +1 -1
  370. package/dist/es/standards-sdk.es178.js +159 -44
  371. package/dist/es/standards-sdk.es178.js.map +1 -1
  372. package/dist/es/standards-sdk.es179.js +7 -36
  373. package/dist/es/standards-sdk.es179.js.map +1 -1
  374. package/dist/es/standards-sdk.es18.js +13 -13
  375. package/dist/es/standards-sdk.es180.js +86 -30
  376. package/dist/es/standards-sdk.es180.js.map +1 -1
  377. package/dist/es/standards-sdk.es181.js +65 -34
  378. package/dist/es/standards-sdk.es181.js.map +1 -1
  379. package/dist/es/standards-sdk.es182.js +196 -48
  380. package/dist/es/standards-sdk.es182.js.map +1 -1
  381. package/dist/es/standards-sdk.es183.js +23 -135
  382. package/dist/es/standards-sdk.es183.js.map +1 -1
  383. package/dist/es/standards-sdk.es184.js +54 -38
  384. package/dist/es/standards-sdk.es184.js.map +1 -1
  385. package/dist/es/standards-sdk.es185.js +102 -12470
  386. package/dist/es/standards-sdk.es185.js.map +1 -1
  387. package/dist/es/standards-sdk.es186.js +53 -52
  388. package/dist/es/standards-sdk.es186.js.map +1 -1
  389. package/dist/es/standards-sdk.es187.js +223 -103
  390. package/dist/es/standards-sdk.es187.js.map +1 -1
  391. package/dist/es/standards-sdk.es188.js +66 -75
  392. package/dist/es/standards-sdk.es188.js.map +1 -1
  393. package/dist/es/standards-sdk.es189.js +46 -197
  394. package/dist/es/standards-sdk.es189.js.map +1 -1
  395. package/dist/es/standards-sdk.es19.js +10 -10
  396. package/dist/es/standards-sdk.es190.js +58 -668
  397. package/dist/es/standards-sdk.es190.js.map +1 -1
  398. package/dist/es/standards-sdk.es191.js +45 -168
  399. package/dist/es/standards-sdk.es191.js.map +1 -1
  400. package/dist/es/standards-sdk.es192.js +115 -315
  401. package/dist/es/standards-sdk.es192.js.map +1 -1
  402. package/dist/es/standards-sdk.es193.js +51 -340
  403. package/dist/es/standards-sdk.es193.js.map +1 -1
  404. package/dist/es/standards-sdk.es194.js +54 -448
  405. package/dist/es/standards-sdk.es194.js.map +1 -1
  406. package/dist/es/standards-sdk.es195.js +72 -331
  407. package/dist/es/standards-sdk.es195.js.map +1 -1
  408. package/dist/es/standards-sdk.es196.js +75 -76
  409. package/dist/es/standards-sdk.es196.js.map +1 -1
  410. package/dist/es/standards-sdk.es197.js +44 -73
  411. package/dist/es/standards-sdk.es197.js.map +1 -1
  412. package/dist/es/standards-sdk.es198.js +34 -15
  413. package/dist/es/standards-sdk.es198.js.map +1 -1
  414. package/dist/es/standards-sdk.es199.js +30 -139
  415. package/dist/es/standards-sdk.es199.js.map +1 -1
  416. package/dist/es/standards-sdk.es2.js +2 -2
  417. package/dist/es/standards-sdk.es20.js +1 -1
  418. package/dist/es/standards-sdk.es200.js +34 -517
  419. package/dist/es/standards-sdk.es200.js.map +1 -1
  420. package/dist/es/standards-sdk.es201.js +48 -259
  421. package/dist/es/standards-sdk.es201.js.map +1 -1
  422. package/dist/es/standards-sdk.es202.js +127 -185
  423. package/dist/es/standards-sdk.es202.js.map +1 -1
  424. package/dist/es/standards-sdk.es203.js +36 -113
  425. package/dist/es/standards-sdk.es203.js.map +1 -1
  426. package/dist/es/standards-sdk.es204.js +12464 -134
  427. package/dist/es/standards-sdk.es204.js.map +1 -1
  428. package/dist/es/standards-sdk.es205.js +14 -181
  429. package/dist/es/standards-sdk.es205.js.map +1 -1
  430. package/dist/es/standards-sdk.es206.js +55 -683
  431. package/dist/es/standards-sdk.es206.js.map +1 -1
  432. package/dist/es/standards-sdk.es207.js +93 -167
  433. package/dist/es/standards-sdk.es207.js.map +1 -1
  434. package/dist/es/standards-sdk.es208.js +71 -225
  435. package/dist/es/standards-sdk.es208.js.map +1 -1
  436. package/dist/es/standards-sdk.es209.js +176 -215
  437. package/dist/es/standards-sdk.es209.js.map +1 -1
  438. package/dist/es/standards-sdk.es21.js +1 -1
  439. package/dist/es/standards-sdk.es210.js +675 -0
  440. package/dist/es/standards-sdk.es210.js.map +1 -0
  441. package/dist/es/standards-sdk.es211.js +76 -0
  442. package/dist/es/standards-sdk.es211.js.map +1 -0
  443. package/dist/es/standards-sdk.es212.js +175 -0
  444. package/dist/es/standards-sdk.es212.js.map +1 -0
  445. package/dist/es/standards-sdk.es213.js +325 -0
  446. package/dist/es/standards-sdk.es213.js.map +1 -0
  447. package/dist/es/standards-sdk.es214.js +349 -0
  448. package/dist/es/standards-sdk.es214.js.map +1 -0
  449. package/dist/es/standards-sdk.es215.js +456 -0
  450. package/dist/es/standards-sdk.es215.js.map +1 -0
  451. package/dist/es/standards-sdk.es216.js +334 -0
  452. package/dist/es/standards-sdk.es216.js.map +1 -0
  453. package/dist/es/standards-sdk.es217.js +79 -0
  454. package/dist/es/standards-sdk.es217.js.map +1 -0
  455. package/dist/es/standards-sdk.es218.js +142 -0
  456. package/dist/es/standards-sdk.es218.js.map +1 -0
  457. package/dist/es/standards-sdk.es219.js +520 -0
  458. package/dist/es/standards-sdk.es219.js.map +1 -0
  459. package/dist/es/standards-sdk.es22.js +1 -1
  460. package/dist/es/standards-sdk.es220.js +262 -0
  461. package/dist/es/standards-sdk.es220.js.map +1 -0
  462. package/dist/es/standards-sdk.es221.js +199 -0
  463. package/dist/es/standards-sdk.es221.js.map +1 -0
  464. package/dist/es/standards-sdk.es222.js +122 -0
  465. package/dist/es/standards-sdk.es222.js.map +1 -0
  466. package/dist/es/standards-sdk.es223.js +155 -0
  467. package/dist/es/standards-sdk.es223.js.map +1 -0
  468. package/dist/es/standards-sdk.es224.js +187 -0
  469. package/dist/es/standards-sdk.es224.js.map +1 -0
  470. package/dist/es/standards-sdk.es225.js +687 -0
  471. package/dist/es/standards-sdk.es225.js.map +1 -0
  472. package/dist/es/standards-sdk.es226.js +188 -0
  473. package/dist/es/standards-sdk.es226.js.map +1 -0
  474. package/dist/es/standards-sdk.es227.js +238 -0
  475. package/dist/es/standards-sdk.es227.js.map +1 -0
  476. package/dist/es/standards-sdk.es228.js +242 -0
  477. package/dist/es/standards-sdk.es228.js.map +1 -0
  478. package/dist/es/standards-sdk.es23.js +1 -1
  479. package/dist/es/standards-sdk.es24.js +1 -1
  480. package/dist/es/standards-sdk.es25.js +1 -1
  481. package/dist/es/standards-sdk.es26.js +1 -1
  482. package/dist/es/standards-sdk.es27.js +13 -13
  483. package/dist/es/standards-sdk.es30.js +2 -2
  484. package/dist/es/standards-sdk.es31.js +4 -4
  485. package/dist/es/standards-sdk.es32.js +1 -1
  486. package/dist/es/standards-sdk.es35.js +7 -7
  487. package/dist/es/standards-sdk.es36.js +4 -4
  488. package/dist/es/standards-sdk.es37.js +2 -2
  489. package/dist/es/standards-sdk.es38.js +2 -2
  490. package/dist/es/standards-sdk.es39.js +1 -1
  491. package/dist/es/standards-sdk.es4.js +2 -2
  492. package/dist/es/standards-sdk.es40.js +1 -1
  493. package/dist/es/standards-sdk.es41.js +2 -2
  494. package/dist/es/standards-sdk.es46.js +1 -1
  495. package/dist/es/standards-sdk.es5.js +2 -2
  496. package/dist/es/standards-sdk.es51.js +1 -1
  497. package/dist/es/standards-sdk.es53.js +1 -1
  498. package/dist/es/standards-sdk.es56.js +2 -2
  499. package/dist/es/standards-sdk.es59.js +1 -1
  500. package/dist/es/standards-sdk.es6.js +2 -2
  501. package/dist/es/standards-sdk.es60.js +1 -1
  502. package/dist/es/standards-sdk.es62.js +1 -1
  503. package/dist/es/standards-sdk.es63.js +2 -2
  504. package/dist/es/standards-sdk.es64.js +1 -1
  505. package/dist/es/standards-sdk.es65.js +1 -1
  506. package/dist/es/standards-sdk.es66.js +1 -1
  507. package/dist/es/standards-sdk.es67.js +8 -8
  508. package/dist/es/standards-sdk.es69.js +1 -1
  509. package/dist/es/standards-sdk.es7.js +1 -1
  510. package/dist/es/standards-sdk.es71.js +2 -2
  511. package/dist/es/standards-sdk.es72.js +3 -3
  512. package/dist/es/standards-sdk.es75.js +5 -5
  513. package/dist/es/standards-sdk.es76.js +3 -3
  514. package/dist/es/standards-sdk.es77.js +2 -2
  515. package/dist/es/standards-sdk.es78.js +1 -1
  516. package/dist/es/standards-sdk.es81.js +2 -2
  517. package/dist/es/standards-sdk.es83.js +2 -2
  518. package/dist/es/standards-sdk.es84.js +5 -5
  519. package/dist/es/standards-sdk.es85.js +1 -1
  520. package/dist/es/standards-sdk.es88.js +1 -1
  521. package/dist/es/standards-sdk.es89.js +2 -2
  522. package/dist/es/standards-sdk.es9.js +2 -2
  523. package/dist/es/standards-sdk.es90.js +4 -4
  524. package/dist/es/standards-sdk.es94.js +3 -3
  525. package/dist/es/standards-sdk.es96.js +2 -2
  526. package/dist/es/standards-sdk.es98.js +1 -1
  527. package/dist/es/standards-sdk.es99.js +3 -3
  528. package/package.json +1 -1
@@ -1,454 +1,793 @@
1
- import { z } from "zod";
2
- import { RegistryBrokerParseError } from "./standards-sdk.es151.js";
3
- const agentNetworkProviderSchema = z.enum([
4
- "openclaw",
5
- "grok",
6
- "dot",
7
- "muse",
8
- "api",
9
- "other"
10
- ]);
11
- const agentConnectionStateSchema = z.enum([
12
- "unavailable",
13
- "pending_pairing",
14
- "interactive_verified",
15
- "polling_verified",
16
- "push_verified",
17
- "needs_reconnect",
18
- "paused",
19
- "degraded"
20
- ]);
21
- const agentRegistrationStateSchema = z.enum([
22
- "unregistered",
23
- "quote_issued",
24
- "pending",
25
- "registered",
26
- "failed"
27
- ]);
28
- const agentRegistrationResultStateSchema = z.enum([
29
- "registered",
30
- "pending",
31
- "linked",
32
- "unregistered"
33
- ]);
34
- const agentReceiveModeSchema = z.enum(["none", "poll", "push"]);
35
- const agentRequestStateSchema = z.enum([
36
- "accepted",
37
- "awaiting_consent",
38
- "queued",
39
- "processing",
40
- "completed",
41
- "rejected",
42
- "failed",
43
- "expired",
44
- "canceled"
45
- ]);
46
- const agentDeliveryStateSchema = z.enum([
47
- "pending",
48
- "notifying",
49
- "provider_accepted",
50
- "acknowledged",
51
- "retry_scheduled",
52
- "permanently_failed"
53
- ]);
54
- const agentMessageKindSchema = z.enum(["request", "response", "event"]);
55
- const isoDate = z.string();
56
- const agentRuntimeViewSchema = z.object({
57
- runtimeId: z.string().uuid(),
58
- uaid: z.string().nullable(),
59
- ownerType: z.string(),
60
- ownerId: z.string(),
61
- declaredProvider: agentNetworkProviderSchema,
62
- connectionState: agentConnectionStateSchema,
63
- registrationState: agentRegistrationStateSchema,
64
- registrationAttemptId: z.string().nullable(),
65
- receiveMode: agentReceiveModeSchema,
66
- gatewayUrl: z.string().nullable(),
67
- paused: z.boolean(),
68
- allowedPeerUaids: z.array(z.string()).nullable(),
69
- capabilities: z.array(z.string()),
70
- lastActivityAt: isoDate.nullable(),
71
- createdAt: isoDate
72
- });
73
- const agentRuntimeQuoteSchema = z.object({
74
- quoteId: z.string(),
75
- expiresAt: isoDate,
76
- registrationFeeCredits: z.number().nullable(),
77
- gatewayUrl: z.string()
78
- });
79
- const agentPairingStartSchema = z.object({
80
- grantId: z.string().uuid(),
81
- pairingCode: z.string(),
82
- expiresAt: isoDate
83
- });
84
- const agentPairingCompleteSchema = z.object({
85
- grantId: z.string().uuid(),
86
- runtimeId: z.string().uuid(),
87
- token: z.string(),
88
- scopes: z.array(z.string())
89
- });
90
- const agentMessageViewSchema = z.object({
91
- messageId: z.string().uuid(),
92
- conversationId: z.string().uuid(),
93
- schemaVersion: z.literal("hol-agent-message/1"),
94
- kind: agentMessageKindSchema,
95
- senderUaid: z.string(),
96
- recipientUaid: z.string(),
97
- inReplyTo: z.string().uuid().nullable(),
98
- content: z.object({ type: z.literal("text"), text: z.string() }),
99
- requestState: agentRequestStateSchema,
100
- createdAt: isoDate,
101
- expiresAt: isoDate,
102
- traceId: z.string()
103
- });
104
- const agentMessageAcceptedSchema = z.object({
105
- messageId: z.string().uuid(),
106
- conversationId: z.string().uuid(),
107
- requestState: agentRequestStateSchema,
108
- createdAt: isoDate,
109
- expiresAt: isoDate,
110
- deduplicated: z.boolean()
111
- });
112
- const agentLeaseViewSchema = z.object({
113
- leaseId: z.string().uuid(),
114
- messageId: z.string().uuid(),
115
- fencingToken: z.number().int(),
116
- expiresAt: isoDate
117
- });
118
- const agentClaimedMessageSchema = z.object({
119
- message: agentMessageViewSchema,
120
- lease: agentLeaseViewSchema
121
- });
122
- const agentInboxItemSchema = z.object({
123
- messageId: z.string().uuid(),
124
- conversationId: z.string().uuid(),
125
- kind: agentMessageKindSchema,
126
- senderUaid: z.string(),
127
- content: z.object({ type: z.literal("text"), text: z.string() }),
128
- requestState: agentRequestStateSchema,
129
- deliveryState: agentDeliveryStateSchema,
130
- acknowledged: z.boolean(),
131
- leaseId: z.string().uuid().nullable(),
132
- fencingToken: z.number().int().nullable(),
133
- createdAt: isoDate,
134
- expiresAt: isoDate
135
- });
136
- const agentInboxListSchema = z.object({
137
- items: z.array(agentInboxItemSchema),
138
- nextCursor: z.string().nullable()
139
- });
140
- const agentConversationViewSchema = z.object({
141
- conversationId: z.string().uuid(),
142
- state: z.enum(["active", "canceled", "expired"]),
143
- participants: z.array(z.object({ uaid: z.string() })),
144
- messages: z.array(agentMessageViewSchema),
145
- nextCursor: z.string().nullable()
146
- });
147
- const agentReplyResultSchema = z.object({
148
- request: agentMessageViewSchema,
149
- response: agentMessageViewSchema
150
- });
151
- const agentRuntimeRegistrationResultSchema = z.object({
152
- runtime: agentRuntimeViewSchema,
153
- registration: agentRegistrationResultStateSchema
154
- });
155
- const agentProbeResultSchema = z.object({
156
- nonce: z.string(),
157
- issuedAt: isoDate
158
- });
159
- const agentSubscriptionEventTypeSchema = z.enum([
160
- "notify_request",
161
- "notify_event",
162
- "notify_response"
163
- ]);
164
- const agentSubscriptionViewSchema = z.object({
165
- subscriptionId: z.string().uuid(),
166
- runtimeId: z.string().uuid(),
167
- eventType: agentSubscriptionEventTypeSchema,
168
- callbackUrl: z.string().nullable(),
169
- state: z.string(),
170
- expiresAt: isoDate.nullable(),
171
- createdAt: isoDate
172
- });
173
- const agentSubscriptionListSchema = z.object({
174
- subscriptions: z.array(agentSubscriptionViewSchema)
175
- });
176
- const agentSubscriptionCreatedSchema = z.object({
177
- subscription: agentSubscriptionViewSchema
178
- });
179
- const sleep = (ms, signal) => new Promise((resolve, reject) => {
180
- const t = setTimeout(resolve, ms);
181
- signal?.addEventListener(
182
- "abort",
183
- () => {
184
- clearTimeout(t);
185
- reject(new Error("waitForReply aborted"));
186
- },
187
- { once: true }
188
- );
189
- });
190
- const bearerHeaders = (token) => ({
191
- authorization: `Bearer ${token}`
192
- });
193
- const encodePath = (value) => encodeURIComponent(value);
194
- const qs = (params) => {
195
- const query = new URLSearchParams();
196
- for (const [k, v] of Object.entries(params)) {
197
- if (v !== void 0) {
198
- query.set(k, String(v));
1
+ import { proto } from "@hashgraph/proto";
2
+ import { Buffer } from "buffer";
3
+ import { Hbar, Long, HbarUnit, Transaction } from "@hashgraph/sdk";
4
+ import { ethers } from "ethers";
5
+ import { TransactionParsingError } from "./standards-sdk.es153.js";
6
+ import { resolveTransactionSummary } from "./standards-sdk.es154.js";
7
+ import { HTSParser } from "./standards-sdk.es162.js";
8
+ import { HCSParser } from "./standards-sdk.es212.js";
9
+ import { FileParser } from "./standards-sdk.es213.js";
10
+ import { CryptoParser } from "./standards-sdk.es214.js";
11
+ import { SCSParser } from "./standards-sdk.es215.js";
12
+ import { UtilParser } from "./standards-sdk.es216.js";
13
+ import { ScheduleParser } from "./standards-sdk.es163.js";
14
+ import { transactionParserRegistry } from "./standards-sdk.es164.js";
15
+ import { getTransactionTypeFromBody, getHumanReadableTransactionType } from "./standards-sdk.es165.js";
16
+ class TransactionParser {
17
+ /**
18
+ * Parse transaction bytes in any supported format (base64 or hex, regular or scheduled)
19
+ * This is the main entry point for transaction parsing with enhanced retry logic
20
+ *
21
+ * @param transactionBytes - Transaction bytes in base64 or hex format
22
+ * @param options - Parsing options and configuration
23
+ * @returns Promise resolving to ParsedTransaction
24
+ */
25
+ static async parseTransactionBytes(transactionBytes, options = {}) {
26
+ const {
27
+ enableFallback = true,
28
+ strictMode = false,
29
+ includeRaw = true,
30
+ maxRetries = 2
31
+ } = options;
32
+ const validation = this.validateTransactionBytes(transactionBytes);
33
+ if (!validation.isValid && strictMode) {
34
+ throw new TransactionParsingError(
35
+ `Invalid transaction bytes format: ${validation.error}`,
36
+ "INVALID_FORMAT",
37
+ void 0,
38
+ transactionBytes
39
+ );
40
+ }
41
+ let lastError;
42
+ let retryCount = 0;
43
+ while (retryCount <= maxRetries) {
44
+ try {
45
+ const result = await this.parseTransaction(transactionBytes, options);
46
+ result.formatDetection = {
47
+ originalFormat: validation.format || "base64",
48
+ wasConverted: validation.format === "hex",
49
+ length: transactionBytes.length
50
+ };
51
+ return result;
52
+ } catch (error) {
53
+ lastError = error instanceof Error ? error : new Error(String(error));
54
+ retryCount++;
55
+ if (!enableFallback || retryCount > maxRetries) {
56
+ if (strictMode) {
57
+ throw new TransactionParsingError(
58
+ "Failed to parse transaction after all attempts",
59
+ "PARSING_FAILED",
60
+ lastError,
61
+ transactionBytes
62
+ );
63
+ }
64
+ break;
65
+ }
66
+ try {
67
+ const result = this.parseScheduledTransaction(
68
+ transactionBytes,
69
+ options
70
+ );
71
+ result.formatDetection = {
72
+ originalFormat: validation.format || "base64",
73
+ wasConverted: false,
74
+ length: transactionBytes.length
75
+ };
76
+ return result;
77
+ } catch (scheduledError) {
78
+ }
79
+ }
199
80
  }
81
+ const fallbackResult = this.createFallbackResult(
82
+ transactionBytes,
83
+ lastError,
84
+ void 0
85
+ );
86
+ if (fallbackResult.details) {
87
+ fallbackResult.details.parseAttempts = Math.max(retryCount, 1);
88
+ }
89
+ return fallbackResult;
200
90
  }
201
- const s = query.toString();
202
- return s ? `?${s}` : "";
203
- };
204
- function createAgentNetworkApi(client) {
205
- const json = async (path, schema, init) => {
206
- const raw = await client.requestJson(`${path}`, {
207
- method: init.method ?? "GET",
208
- body: init.body,
209
- headers: init.token ? bearerHeaders(init.token) : void 0
210
- });
211
- const parsed = schema.safeParse(raw);
212
- if (!parsed.success) {
213
- throw new RegistryBrokerParseError(
214
- "Unexpected agent-network response shape",
215
- JSON.stringify(raw).slice(0, 500)
216
- );
91
+ /**
92
+ * Parse a Transaction object directly using unified delegation approach
93
+ * This method delegates to specialized parsers for clean separation of concerns
94
+ *
95
+ * @param transaction - The Transaction object to parse
96
+ * @param originalBytes - The original transaction bytes (optional, for protobuf parsing)
97
+ * @param options - Parsing options
98
+ * @returns Parsed transaction data
99
+ */
100
+ static parseTransactionObject(transaction, originalBytesOrOptions, options = {}) {
101
+ let originalBytes;
102
+ let actualOptions;
103
+ if (originalBytesOrOptions && !Buffer.isBuffer(originalBytesOrOptions) && !(originalBytesOrOptions instanceof Uint8Array)) {
104
+ actualOptions = originalBytesOrOptions;
105
+ originalBytes = void 0;
106
+ } else {
107
+ originalBytes = originalBytesOrOptions;
108
+ actualOptions = options;
217
109
  }
218
- return parsed.data;
219
- };
220
- const bot204 = async (path, token, body) => {
221
- const response = await client.request(`${path}`, {
222
- method: "POST",
223
- body,
224
- headers: bearerHeaders(token)
225
- });
226
- return response.status === 204 ? null : response.json();
227
- };
228
- return {
229
- quoteRuntime: () => json("/agent-runtimes/quote", agentRuntimeQuoteSchema, {
230
- method: "POST"
231
- }),
232
- registerRuntime: (input) => json("/agent-runtimes/register", agentRuntimeRegistrationResultSchema, {
233
- method: "POST",
234
- body: input
235
- }),
236
- listRuntimes: async () => {
237
- const raw = await client.requestJson("/agent-runtimes", {});
238
- const parsed = z.object({ runtimes: z.array(agentRuntimeViewSchema) }).safeParse(raw);
239
- if (!parsed.success) {
240
- throw new RegistryBrokerParseError(
241
- "Unexpected runtime list shape",
242
- JSON.stringify(raw).slice(0, 500)
243
- );
110
+ try {
111
+ const metadata = this.extractTransactionMetadata(transaction);
112
+ const htsResult = HTSParser.parseFromTransactionObject(transaction);
113
+ const cryptoResult = CryptoParser.parseFromTransactionObject(transaction);
114
+ const hcsResult = HCSParser.parseFromTransactionObject(transaction);
115
+ const fileResult = FileParser.parseFromTransactionObject(transaction);
116
+ const scsResult = SCSParser.parseFromTransactionObject(transaction);
117
+ const scheduleResult = ScheduleParser.parseFromTransactionObject(transaction);
118
+ const utilResult = UtilParser.parseFromTransactionObject(transaction);
119
+ const results = [
120
+ htsResult,
121
+ cryptoResult,
122
+ hcsResult,
123
+ fileResult,
124
+ scsResult,
125
+ scheduleResult,
126
+ utilResult
127
+ ];
128
+ const primaryResult = results.find((result2) => result2.type && result2.type !== "UNKNOWN") || {};
129
+ let finalType = "UNKNOWN";
130
+ let finalHumanReadableType = "Unknown Transaction";
131
+ let parsedTokenCreation;
132
+ let protoParsingResult = {};
133
+ if (originalBytes || transaction.toBytes) {
134
+ try {
135
+ const bytesToParse = originalBytes || transaction.toBytes();
136
+ const decoded = proto.TransactionList.decode(bytesToParse);
137
+ if (decoded.transactionList && decoded.transactionList.length > 0) {
138
+ const tx = decoded.transactionList[0];
139
+ if (tx.bodyBytes && tx.bodyBytes.length > 0) {
140
+ const txBody = proto.TransactionBody.decode(tx.bodyBytes);
141
+ const typeResult = this.detectTransactionTypeFromBody(txBody);
142
+ finalType = typeResult.type;
143
+ finalHumanReadableType = typeResult.humanReadableType;
144
+ protoParsingResult = this.parseTransactionBodyDetails(
145
+ txBody,
146
+ finalType
147
+ );
148
+ if (protoParsingResult.tokenCreation) {
149
+ parsedTokenCreation = protoParsingResult.tokenCreation;
150
+ }
151
+ } else if (tx.signedTransactionBytes && tx.signedTransactionBytes.length > 0) {
152
+ const signedTx = proto.SignedTransaction.decode(
153
+ tx.signedTransactionBytes
154
+ );
155
+ if (signedTx.bodyBytes) {
156
+ const txBody = proto.TransactionBody.decode(signedTx.bodyBytes);
157
+ const typeResult = this.detectTransactionTypeFromBody(txBody);
158
+ finalType = typeResult.type;
159
+ finalHumanReadableType = typeResult.humanReadableType;
160
+ protoParsingResult = this.parseTransactionBodyDetails(
161
+ txBody,
162
+ finalType
163
+ );
164
+ if (protoParsingResult.tokenCreation) {
165
+ parsedTokenCreation = protoParsingResult.tokenCreation;
166
+ }
167
+ }
168
+ }
169
+ }
170
+ } catch (protoError) {
171
+ }
244
172
  }
245
- return parsed.data.runtimes;
246
- },
247
- updateRuntimePolicy: (runtimeId, input) => json(
248
- `/agent-runtimes/${encodePath(runtimeId)}`,
249
- agentRuntimeViewSchema,
250
- { method: "PATCH", body: input }
251
- ),
252
- probeRuntime: async (runtimeId) => await json(
253
- `/agent-runtimes/${encodePath(runtimeId)}/probe`,
254
- agentProbeResultSchema,
255
- { method: "POST" }
256
- ),
257
- startAgentConnection: (runtimeId) => json("/agent-connections", agentPairingStartSchema, {
258
- method: "POST",
259
- body: { runtimeId }
260
- }),
261
- completeAgentPairing: (pairingCode) => json("/agent-connections/pair", agentPairingCompleteSchema, {
262
- method: "POST",
263
- body: { pairingCode }
264
- }),
265
- revokeAgentConnection: async (grantId) => {
266
- await client.request(`/agent-connections/${encodePath(grantId)}`, {
267
- method: "DELETE"
268
- });
269
- },
270
- listRuntimeInbox: (runtimeId, query) => json(
271
- `/agent-runtimes/${encodePath(runtimeId)}/inbox${qs({
272
- cursor: query?.cursor,
273
- limit: query?.limit,
274
- includeAcknowledged: query?.includeAcknowledged
275
- })}`,
276
- agentInboxListSchema,
277
- {}
278
- ),
279
- getRuntimeConversation: (runtimeId, conversationId, query) => json(
280
- `/agent-runtimes/${encodePath(runtimeId)}/conversations/${encodePath(
281
- conversationId
282
- )}${qs({ cursor: query?.cursor, limit: query?.limit })}`,
283
- agentConversationViewSchema,
284
- {}
285
- ),
286
- createAgentSubscription: async (runtimeId, input) => (await json(
287
- `/agent-runtimes/${encodePath(runtimeId)}/subscriptions`,
288
- agentSubscriptionCreatedSchema,
289
- { method: "POST", body: input }
290
- )).subscription,
291
- listAgentSubscriptions: async (runtimeId) => (await json(
292
- `/agent-runtimes/${encodePath(runtimeId)}/subscriptions`,
293
- agentSubscriptionListSchema,
294
- {}
295
- )).subscriptions,
296
- revokeAgentSubscription: async (runtimeId, subscriptionId) => {
297
- await client.request(
298
- `/agent-runtimes/${encodePath(runtimeId)}/subscriptions/${encodePath(
299
- subscriptionId
300
- )}`,
301
- { method: "DELETE" }
302
- );
303
- },
304
- agentMe: async (token) => {
305
- const raw = await client.requestJson(
306
- "/agent-runtimes/me",
307
- { headers: bearerHeaders(token) }
173
+ if (finalType === "UNKNOWN" && primaryResult.type) {
174
+ finalType = primaryResult.type;
175
+ finalHumanReadableType = primaryResult.humanReadableType || finalHumanReadableType;
176
+ }
177
+ const result = {
178
+ type: finalType,
179
+ humanReadableType: finalHumanReadableType,
180
+ transfers: [],
181
+ tokenTransfers: [],
182
+ ...metadata,
183
+ ...primaryResult,
184
+ raw: actualOptions.includeRaw ? transaction._transactionBody || {} : void 0
185
+ };
186
+ this.mergeProtoParsingResults(
187
+ result,
188
+ protoParsingResult,
189
+ htsResult,
190
+ transaction,
191
+ originalBytes
308
192
  );
309
- const parsed = z.object({ runtime: agentRuntimeViewSchema }).safeParse(raw);
310
- if (!parsed.success) {
311
- throw new RegistryBrokerParseError(
312
- "Unexpected agent-runtimes/me shape",
313
- JSON.stringify(raw).slice(0, 500)
193
+ result.transfers = cryptoResult.transfers || result.transfers || [];
194
+ result.tokenTransfers = cryptoResult.tokenTransfers || result.tokenTransfers || [];
195
+ return result;
196
+ } catch (error) {
197
+ return {
198
+ type: "UNKNOWN",
199
+ humanReadableType: "Unknown Transaction",
200
+ transfers: [],
201
+ tokenTransfers: [],
202
+ raw: actualOptions.includeRaw ? {} : void 0,
203
+ details: {
204
+ error: `Failed to parse Transaction object: ${error instanceof Error ? error.message : String(error)}`
205
+ }
206
+ };
207
+ }
208
+ }
209
+ /**
210
+ * Parse a base64 encoded transaction body using registry pattern
211
+ * @param transactionBodyBase64 - The base64 encoded transaction body
212
+ * @returns The parsed transaction
213
+ */
214
+ static parseTransactionBody(transactionBodyBase64) {
215
+ try {
216
+ const buffer = ethers.decodeBase64(transactionBodyBase64);
217
+ const txBody = proto.SchedulableTransactionBody.decode(buffer);
218
+ const transactionType = this.getTransactionType(txBody);
219
+ const result = {
220
+ type: transactionType,
221
+ humanReadableType: this.getHumanReadableType(transactionType),
222
+ transfers: [],
223
+ tokenTransfers: [],
224
+ raw: txBody
225
+ };
226
+ if (txBody.memo) {
227
+ result.memo = txBody.memo;
228
+ }
229
+ if (txBody.transactionFee) {
230
+ const hbarAmount = Hbar.fromTinybars(
231
+ Long.fromValue(txBody.transactionFee)
314
232
  );
233
+ result.transactionFee = hbarAmount.toString(HbarUnit.Hbar);
315
234
  }
316
- return parsed.data.runtime;
317
- },
318
- sendAgentMessage: (token, input) => json("/agent-messages", agentMessageAcceptedSchema, {
319
- method: "POST",
320
- body: input,
321
- token
322
- }),
323
- getAgentMessage: (token, messageId) => json(
324
- `/agent-messages/${encodePath(messageId)}`,
325
- agentMessageViewSchema,
326
- { token }
327
- ),
328
- getAgentConversation: (token, conversationId, query) => json(
329
- `/agent-conversations/${encodePath(conversationId)}${qs({
330
- cursor: query?.cursor,
331
- limit: query?.limit
332
- })}`,
333
- agentConversationViewSchema,
334
- { token }
335
- ),
336
- listAgentInbox: (token, query) => json(
337
- `/agent-inbox${qs({
338
- cursor: query?.cursor,
339
- limit: query?.limit,
340
- includeAcknowledged: query?.includeAcknowledged
341
- })}`,
342
- agentInboxListSchema,
343
- { token }
344
- ),
345
- claimAgentMessage: async (token) => {
346
- const raw = await bot204("/agent-inbox/leases", token, {});
347
- if (raw === null) {
348
- return null;
235
+ this.applySchedulableTransactionParsing(txBody, result);
236
+ return result;
237
+ } catch (error) {
238
+ return {
239
+ type: "UNKNOWN",
240
+ humanReadableType: "Unknown Transaction",
241
+ transfers: [],
242
+ tokenTransfers: [],
243
+ raw: void 0,
244
+ details: {
245
+ error: `Failed to parse transaction body: ${error instanceof Error ? error.message : String(error)}`
246
+ }
247
+ };
248
+ }
249
+ }
250
+ /**
251
+ * Detect transaction type and human-readable type from transaction body protobuf
252
+ * Uses registry pattern to eliminate massive if-else chain
253
+ */
254
+ static detectTransactionTypeFromBody(txBody) {
255
+ return getTransactionTypeFromBody(txBody);
256
+ }
257
+ /**
258
+ * Parse details from a complete schedule response
259
+ * @param scheduleResponse - The schedule response to parse
260
+ * @returns The parsed transaction
261
+ */
262
+ static parseScheduleResponse(scheduleResponse) {
263
+ if (!scheduleResponse.transaction_body) {
264
+ return {
265
+ type: "UNKNOWN",
266
+ humanReadableType: "Unknown Transaction",
267
+ transfers: [],
268
+ tokenTransfers: [],
269
+ raw: void 0,
270
+ details: {
271
+ error: "Schedule response missing transaction_body"
272
+ }
273
+ };
274
+ }
275
+ const parsed = this.parseTransactionBody(scheduleResponse.transaction_body);
276
+ if (scheduleResponse.memo) {
277
+ parsed.memo = scheduleResponse.memo;
278
+ }
279
+ return parsed;
280
+ }
281
+ /**
282
+ * Determine the transaction type using registry pattern
283
+ * @param txBody - The transaction body to determine the type of
284
+ * @returns The type of the transaction
285
+ */
286
+ static getTransactionType(txBody) {
287
+ return getTransactionTypeFromBody(txBody).type;
288
+ }
289
+ /**
290
+ * Convert technical transaction type to human-readable format using registry pattern
291
+ * @param type - The technical transaction type
292
+ * @returns The human-readable transaction type
293
+ */
294
+ static getHumanReadableType(type) {
295
+ return getHumanReadableTransactionType(type);
296
+ }
297
+ /**
298
+ * Get a human-readable summary of the transaction
299
+ * @param parsedTx - The parsed transaction
300
+ * @returns The human-readable summary of the transaction
301
+ */
302
+ static getTransactionSummary(parsedTx) {
303
+ return resolveTransactionSummary(parsedTx);
304
+ }
305
+ /**
306
+ * Validate transaction bytes format and encoding
307
+ * Enhanced validation with better format detection
308
+ */
309
+ static validateTransactionBytes(transactionBytes) {
310
+ if (!transactionBytes || typeof transactionBytes !== "string") {
311
+ return {
312
+ isValid: false,
313
+ error: "Transaction bytes must be a non-empty string"
314
+ };
315
+ }
316
+ const format = this.detectTransactionFormat(transactionBytes);
317
+ const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/;
318
+ const hexRegex = /^0x[0-9a-fA-F]+$/;
319
+ let isValid = false;
320
+ let error;
321
+ if (format === "hex") {
322
+ isValid = hexRegex.test(transactionBytes) && transactionBytes.length > 2;
323
+ if (!isValid) {
324
+ error = "Invalid hex format";
349
325
  }
350
- const parsed = agentClaimedMessageSchema.safeParse(raw);
351
- if (!parsed.success) {
352
- throw new RegistryBrokerParseError(
353
- "Unexpected claim response shape",
354
- JSON.stringify(raw).slice(0, 500)
355
- );
326
+ } else {
327
+ isValid = base64Regex.test(transactionBytes) && transactionBytes.length > 0;
328
+ if (!isValid) {
329
+ error = "Invalid base64 format";
356
330
  }
357
- return parsed.data;
358
- },
359
- acknowledgeAgentMessage: (token, messageId, lease) => json(
360
- `/agent-inbox/${encodePath(messageId)}/ack`,
361
- agentMessageViewSchema,
362
- { method: "POST", body: lease, token }
363
- ),
364
- renewAgentMessageLease: (token, messageId, input) => json(
365
- `/agent-inbox/${encodePath(messageId)}/lease/renew`,
366
- agentLeaseViewSchema,
367
- { method: "POST", body: input, token }
368
- ),
369
- replyToAgentMessage: (token, messageId, input) => json(
370
- `/agent-messages/${encodePath(messageId)}/reply`,
371
- agentReplyResultSchema,
372
- { method: "POST", body: input, token }
373
- ),
374
- rejectAgentMessage: (token, messageId, input) => json(
375
- `/agent-messages/${encodePath(messageId)}/reject`,
376
- agentMessageViewSchema,
377
- { method: "POST", body: input, token }
378
- ),
379
- cancelAgentConversation: async (token, conversationId) => {
380
- const raw = await client.requestJson(
381
- `/agent-conversations/${encodePath(conversationId)}/cancel`,
382
- { method: "POST", body: {}, headers: bearerHeaders(token) }
331
+ }
332
+ return {
333
+ isValid,
334
+ format,
335
+ error,
336
+ length: transactionBytes.length
337
+ };
338
+ }
339
+ /**
340
+ * Detects the format of transaction bytes
341
+ * @param transactionBytes - The transaction bytes to analyze
342
+ * @returns The detected format ('base64' or 'hex')
343
+ */
344
+ static detectTransactionFormat(transactionBytes) {
345
+ return transactionBytes.startsWith("0x") ? "hex" : "base64";
346
+ }
347
+ /**
348
+ * Decodes transaction bytes from string to Uint8Array
349
+ * @param transactionBytes - The transaction bytes string (base64 or hex)
350
+ * @returns Decoded Uint8Array
351
+ * @throws TransactionParsingError if decoding fails
352
+ */
353
+ static decodeTransactionBytes(transactionBytes) {
354
+ try {
355
+ const format = this.detectTransactionFormat(transactionBytes);
356
+ if (format === "hex") {
357
+ const hexString = transactionBytes.slice(2);
358
+ return new Uint8Array(Buffer.from(hexString, "hex"));
359
+ } else {
360
+ return new Uint8Array(Buffer.from(transactionBytes, "base64"));
361
+ }
362
+ } catch (error) {
363
+ throw new TransactionParsingError(
364
+ "Failed to decode transaction bytes",
365
+ "DECODE_ERROR",
366
+ error instanceof Error ? error : void 0,
367
+ transactionBytes
383
368
  );
384
- const parsed = z.object({
385
- conversationId: z.string().uuid(),
386
- canceledMessages: z.number()
387
- }).safeParse(raw);
388
- if (!parsed.success) {
389
- throw new RegistryBrokerParseError(
390
- "Unexpected cancel response shape",
391
- JSON.stringify(raw).slice(0, 500)
392
- );
369
+ }
370
+ }
371
+ /**
372
+ * Check if transaction bytes represent a valid Hedera transaction
373
+ */
374
+ static async isValidHederaTransaction(transactionBytes) {
375
+ try {
376
+ if (!this.validateTransactionBytes(transactionBytes).isValid) {
377
+ return false;
393
378
  }
394
- return parsed.data;
395
- },
396
- waitForAgentReply: async (token, messageId, options) => {
397
- const timeoutMs = options?.timeoutMs ?? 6e4;
398
- const interval = Math.max(250, options?.pollIntervalMs ?? 2e3);
399
- const deadline = Date.now() + timeoutMs;
400
- while (Date.now() < deadline) {
401
- const message = await json(
402
- `/agent-messages/${encodePath(messageId)}`,
403
- agentMessageViewSchema,
404
- { token }
405
- );
406
- if (message.requestState === "completed") {
407
- const conversation = await json(
408
- `/agent-conversations/${encodePath(message.conversationId)}`,
409
- agentConversationViewSchema,
410
- { token }
379
+ const bytes = this.decodeTransactionBytes(transactionBytes);
380
+ Transaction.fromBytes(bytes);
381
+ return true;
382
+ } catch {
383
+ return false;
384
+ }
385
+ }
386
+ /**
387
+ * Legacy alias for decodeTransactionBytes - keeping for backward compatibility
388
+ */
389
+ static decodeBytesLegacy(transactionBytes) {
390
+ return this.decodeTransactionBytes(transactionBytes);
391
+ }
392
+ /**
393
+ * Parse transaction bytes into structured data using thin orchestration
394
+ * Delegates to specialized parsers for clean separation of concerns
395
+ */
396
+ static async parseTransaction(transactionBytes, options = {}) {
397
+ try {
398
+ const bytes = this.decodeTransactionBytes(transactionBytes);
399
+ const transaction = Transaction.fromBytes(bytes);
400
+ const metadata = this.extractTransactionMetadataEnhanced(transaction);
401
+ const parserResults = this.runAllParsers(transaction);
402
+ const primaryResult = parserResults.find(
403
+ (result2) => result2.type && result2.type !== "UNKNOWN"
404
+ ) || {};
405
+ const protoParsingResult = this.parseFromProtobuf(bytes);
406
+ const finalType = protoParsingResult.type || primaryResult.type || "UNKNOWN";
407
+ const finalHumanReadableType = protoParsingResult.humanReadableType || primaryResult.humanReadableType || "Unknown Transaction";
408
+ const result = {
409
+ type: finalType,
410
+ humanReadableType: finalHumanReadableType,
411
+ transfers: [],
412
+ tokenTransfers: [],
413
+ details: { ...metadata },
414
+ memo: typeof metadata.memo === "string" ? metadata.memo : void 0,
415
+ transactionId: typeof metadata.transactionId === "string" ? metadata.transactionId : void 0,
416
+ nodeAccountIds: Array.isArray(metadata.nodeAccountIds) ? metadata.nodeAccountIds : [],
417
+ maxTransactionFee: typeof metadata.maxTransactionFee === "string" ? metadata.maxTransactionFee : void 0,
418
+ validStart: typeof metadata.validStart === "string" ? metadata.validStart : void 0,
419
+ validDuration: typeof metadata.validDuration === "string" ? metadata.validDuration : void 0,
420
+ raw: options.includeRaw ? {} : void 0
421
+ };
422
+ this.mergeAllResults(
423
+ result,
424
+ protoParsingResult,
425
+ primaryResult,
426
+ parserResults
427
+ );
428
+ return result;
429
+ } catch (error) {
430
+ throw new TransactionParsingError(
431
+ "Failed to parse as regular transaction",
432
+ "REGULAR_PARSING_FAILED",
433
+ error instanceof Error ? error : void 0,
434
+ transactionBytes
435
+ );
436
+ }
437
+ }
438
+ /**
439
+ * Parse scheduled transaction body
440
+ */
441
+ static parseScheduledTransaction(transactionBytes, options = {}) {
442
+ try {
443
+ const parsedTx = this.parseTransactionBody(transactionBytes);
444
+ const validation = this.validateTransactionBytes(transactionBytes);
445
+ const enhancedResult = {
446
+ ...parsedTx,
447
+ details: {
448
+ ...parsedTx.details || {},
449
+ parseMethod: "scheduled",
450
+ validation,
451
+ parseAttempts: parsedTx.details?.parseAttempts || 1
452
+ },
453
+ formatDetection: {
454
+ originalFormat: validation.format || "base64",
455
+ wasConverted: false,
456
+ length: transactionBytes.length
457
+ }
458
+ };
459
+ return enhancedResult;
460
+ } catch (error) {
461
+ throw new TransactionParsingError(
462
+ "Failed to parse as scheduled transaction",
463
+ "SCHEDULED_PARSING_FAILED",
464
+ error instanceof Error ? error : void 0,
465
+ transactionBytes
466
+ );
467
+ }
468
+ }
469
+ /**
470
+ * Extract metadata from Transaction object (legacy method - keeping for backward compatibility)
471
+ */
472
+ static extractTransactionMetadata(transaction) {
473
+ return {
474
+ transactionId: transaction.transactionId?.toString(),
475
+ nodeAccountIds: transaction.nodeAccountIds?.map((id) => id.toString()) || [],
476
+ maxTransactionFee: transaction.maxTransactionFee?.toTinybars().toString() || "0",
477
+ memo: transaction._transactionMemo || void 0,
478
+ transfers: [],
479
+ tokenTransfers: []
480
+ };
481
+ }
482
+ /**
483
+ * Extract enhanced metadata from Transaction object
484
+ */
485
+ static extractTransactionMetadataEnhanced(transaction) {
486
+ return {
487
+ transactionId: transaction.transactionId?.toString(),
488
+ nodeAccountIds: transaction.nodeAccountIds?.map((id) => id.toString()) || [],
489
+ maxTransactionFee: transaction.maxTransactionFee?.toTinybars().toString() || "0",
490
+ memo: transaction._transactionMemo || void 0,
491
+ validStart: transaction._transactionValidStart?.toString(),
492
+ validDuration: transaction._transactionValidDuration?.toString()
493
+ };
494
+ }
495
+ /**
496
+ * Run all available parsers on a transaction
497
+ */
498
+ static runAllParsers(transaction) {
499
+ return [
500
+ HTSParser.parseFromTransactionObject(transaction),
501
+ CryptoParser.parseFromTransactionObject(transaction),
502
+ HCSParser.parseFromTransactionObject(transaction),
503
+ FileParser.parseFromTransactionObject(transaction),
504
+ SCSParser.parseFromTransactionObject(transaction),
505
+ ScheduleParser.parseFromTransactionObject(transaction),
506
+ UtilParser.parseFromTransactionObject(transaction)
507
+ ];
508
+ }
509
+ /**
510
+ * Parse transaction from protobuf bytes
511
+ */
512
+ static parseFromProtobuf(bytes) {
513
+ const result = {};
514
+ try {
515
+ const decoded = proto.TransactionList.decode(bytes);
516
+ if (decoded.transactionList && decoded.transactionList.length > 0) {
517
+ const tx = decoded.transactionList[0];
518
+ let txBody = null;
519
+ if (tx.bodyBytes && tx.bodyBytes.length > 0) {
520
+ txBody = proto.TransactionBody.decode(tx.bodyBytes);
521
+ } else if (tx.signedTransactionBytes && tx.signedTransactionBytes.length > 0) {
522
+ const signedTx = proto.SignedTransaction.decode(
523
+ tx.signedTransactionBytes
524
+ );
525
+ if (signedTx.bodyBytes) {
526
+ txBody = proto.TransactionBody.decode(signedTx.bodyBytes);
527
+ }
528
+ }
529
+ if (txBody) {
530
+ const typeResult = this.detectTransactionTypeFromBody(txBody);
531
+ result.type = typeResult.type;
532
+ result.humanReadableType = typeResult.humanReadableType;
533
+ const details = this.parseTransactionBodyDetails(
534
+ txBody,
535
+ typeResult.type
411
536
  );
412
- return conversation.messages.find(
413
- (m) => m.inReplyTo === messageId && m.kind === "response"
414
- ) ?? null;
537
+ Object.assign(result, details);
415
538
  }
416
- if (message.requestState === "rejected" || message.requestState === "failed" || message.requestState === "expired" || message.requestState === "canceled") {
417
- return null;
539
+ }
540
+ } catch (error) {
541
+ }
542
+ return result;
543
+ }
544
+ /**
545
+ * Intelligently merge all parsing results
546
+ */
547
+ static mergeAllResults(result, protoResult, primaryResult, parserResults) {
548
+ const cryptoResult = parserResults.find((r) => r.transfers || r.tokenTransfers) || {};
549
+ result.transfers = cryptoResult.transfers || result.transfers || [];
550
+ result.tokenTransfers = cryptoResult.tokenTransfers || result.tokenTransfers || [];
551
+ Object.keys(protoResult).forEach((key) => {
552
+ if (protoResult[key] !== void 0 && key !== "type" && key !== "humanReadableType") {
553
+ result[key] = protoResult[key];
554
+ }
555
+ });
556
+ Object.keys(primaryResult).forEach((key) => {
557
+ if (primaryResult[key] !== void 0 && !(key in result) && key !== "type" && key !== "humanReadableType") {
558
+ result[key] = primaryResult[key];
559
+ }
560
+ });
561
+ }
562
+ /**
563
+ * Apply schedulable transaction parsing using registry pattern
564
+ * Eliminates conditional logic in parseTransactionBody
565
+ */
566
+ static applySchedulableTransactionParsing(txBody, result) {
567
+ if (txBody.cryptoTransfer) {
568
+ CryptoParser.parseCryptoTransfers(txBody.cryptoTransfer, result);
569
+ }
570
+ if (txBody.cryptoDelete) {
571
+ result.cryptoDelete = CryptoParser.parseCryptoDelete(txBody.cryptoDelete);
572
+ }
573
+ if (txBody.cryptoCreateAccount) {
574
+ result.cryptoCreateAccount = CryptoParser.parseCryptoCreateAccount(
575
+ txBody.cryptoCreateAccount
576
+ );
577
+ }
578
+ if (txBody.cryptoUpdateAccount) {
579
+ result.cryptoUpdateAccount = CryptoParser.parseCryptoUpdateAccount(
580
+ txBody.cryptoUpdateAccount
581
+ );
582
+ }
583
+ if (txBody.cryptoApproveAllowance) {
584
+ result.cryptoApproveAllowance = CryptoParser.parseCryptoApproveAllowance(
585
+ txBody.cryptoApproveAllowance
586
+ );
587
+ }
588
+ if (txBody.cryptoDeleteAllowance) {
589
+ result.cryptoDeleteAllowance = CryptoParser.parseCryptoDeleteAllowance(
590
+ txBody.cryptoDeleteAllowance
591
+ );
592
+ }
593
+ if (txBody.contractCall) {
594
+ result.contractCall = SCSParser.parseContractCall(txBody.contractCall);
595
+ }
596
+ if (txBody.contractCreateInstance) {
597
+ result.contractCreate = SCSParser.parseContractCreate(
598
+ txBody.contractCreateInstance
599
+ );
600
+ }
601
+ if (txBody.contractUpdateInstance) {
602
+ result.contractUpdate = SCSParser.parseContractUpdate(
603
+ txBody.contractUpdateInstance
604
+ );
605
+ }
606
+ if (txBody.contractDeleteInstance) {
607
+ result.contractDelete = SCSParser.parseContractDelete(
608
+ txBody.contractDeleteInstance
609
+ );
610
+ }
611
+ if (txBody.tokenCreation) {
612
+ result.tokenCreation = HTSParser.parseTokenCreate(txBody.tokenCreation);
613
+ }
614
+ if (txBody.tokenMint) {
615
+ result.tokenMint = HTSParser.parseTokenMint(txBody.tokenMint);
616
+ }
617
+ if (txBody.tokenBurn) {
618
+ result.tokenBurn = HTSParser.parseTokenBurn(txBody.tokenBurn);
619
+ }
620
+ if (txBody.tokenUpdate) {
621
+ result.tokenUpdate = HTSParser.parseTokenUpdate(txBody.tokenUpdate);
622
+ }
623
+ if (txBody.tokenFeeScheduleUpdate) {
624
+ result.tokenFeeScheduleUpdate = HTSParser.parseTokenFeeScheduleUpdate(
625
+ txBody.tokenFeeScheduleUpdate
626
+ );
627
+ }
628
+ if (txBody.tokenFreeze) {
629
+ result.tokenFreeze = HTSParser.parseTokenFreeze(txBody.tokenFreeze);
630
+ }
631
+ if (txBody.tokenUnfreeze) {
632
+ result.tokenUnfreeze = HTSParser.parseTokenUnfreeze(txBody.tokenUnfreeze);
633
+ }
634
+ if (txBody.tokenGrantKyc) {
635
+ result.tokenGrantKyc = HTSParser.parseTokenGrantKyc(txBody.tokenGrantKyc);
636
+ }
637
+ if (txBody.tokenRevokeKyc) {
638
+ result.tokenRevokeKyc = HTSParser.parseTokenRevokeKyc(
639
+ txBody.tokenRevokeKyc
640
+ );
641
+ }
642
+ if (txBody.tokenPause) {
643
+ result.tokenPause = HTSParser.parseTokenPause(txBody.tokenPause);
644
+ }
645
+ if (txBody.tokenUnpause) {
646
+ result.tokenUnpause = HTSParser.parseTokenUnpause(txBody.tokenUnpause);
647
+ }
648
+ if (txBody.tokenWipe) {
649
+ result.tokenWipeAccount = HTSParser.parseTokenWipeAccount(
650
+ txBody.tokenWipe
651
+ );
652
+ }
653
+ if (txBody.tokenDeletion) {
654
+ result.tokenDelete = HTSParser.parseTokenDelete(txBody.tokenDeletion);
655
+ }
656
+ if (txBody.tokenAssociate) {
657
+ result.tokenAssociate = HTSParser.parseTokenAssociate(
658
+ txBody.tokenAssociate
659
+ );
660
+ }
661
+ if (txBody.tokenDissociate) {
662
+ result.tokenDissociate = HTSParser.parseTokenDissociate(
663
+ txBody.tokenDissociate
664
+ );
665
+ }
666
+ if (txBody.tokenAirdrop) {
667
+ result.tokenAirdrop = HTSParser.parseTokenAirdropFromProto(
668
+ txBody.tokenAirdrop
669
+ );
670
+ }
671
+ if (txBody.consensusCreateTopic) {
672
+ result.consensusCreateTopic = HCSParser.parseConsensusCreateTopic(
673
+ txBody.consensusCreateTopic
674
+ );
675
+ }
676
+ if (txBody.consensusSubmitMessage) {
677
+ result.consensusSubmitMessage = HCSParser.parseConsensusSubmitMessage(
678
+ txBody.consensusSubmitMessage
679
+ );
680
+ }
681
+ if (txBody.consensusUpdateTopic) {
682
+ result.consensusUpdateTopic = HCSParser.parseConsensusUpdateTopic(
683
+ txBody.consensusUpdateTopic
684
+ );
685
+ }
686
+ if (txBody.consensusDeleteTopic) {
687
+ result.consensusDeleteTopic = HCSParser.parseConsensusDeleteTopic(
688
+ txBody.consensusDeleteTopic
689
+ );
690
+ }
691
+ if (txBody.fileCreate) {
692
+ result.fileCreate = FileParser.parseFileCreate(txBody.fileCreate);
693
+ }
694
+ if (txBody.fileAppend) {
695
+ result.fileAppend = FileParser.parseFileAppend(txBody.fileAppend);
696
+ }
697
+ if (txBody.fileUpdate) {
698
+ result.fileUpdate = FileParser.parseFileUpdate(txBody.fileUpdate);
699
+ }
700
+ if (txBody.fileDelete) {
701
+ result.fileDelete = FileParser.parseFileDelete(txBody.fileDelete);
702
+ }
703
+ if (txBody.utilPrng) {
704
+ result.utilPrng = UtilParser.parseUtilPrng(txBody.utilPrng);
705
+ }
706
+ }
707
+ /**
708
+ * Parse transaction body details for all supported transaction types
709
+ * Uses a scalable registry pattern instead of if-else chains
710
+ */
711
+ static parseTransactionBodyDetails(txBody, transactionType) {
712
+ const result = {};
713
+ const parserConfig = transactionParserRegistry[transactionType];
714
+ if (parserConfig) {
715
+ const bodyData = txBody[parserConfig.bodyField];
716
+ if (bodyData) {
717
+ const parserResult = parserConfig.parser(bodyData);
718
+ if (parserConfig.spreadResult) {
719
+ Object.assign(result, parserResult);
720
+ } else {
721
+ result[parserConfig.resultField] = parserResult;
418
722
  }
419
- await sleep(Math.min(interval, deadline - Date.now()), options?.signal);
420
723
  }
421
- return null;
422
724
  }
423
- };
725
+ return result;
726
+ }
727
+ /**
728
+ * Merge protobuf parsing results with parser results using registry pattern
729
+ * Eliminates transactionFields array and forEach logic
730
+ */
731
+ static mergeProtoParsingResults(result, protoResult, htsResult, transaction, originalBytes) {
732
+ const fieldsToMerge = Object.values(transactionParserRegistry).map(
733
+ (config) => config.resultField
734
+ );
735
+ for (const field of fieldsToMerge) {
736
+ const protoValue = protoResult[field];
737
+ const htsValue = htsResult[field];
738
+ if (protoValue !== void 0) {
739
+ result[field] = protoValue;
740
+ } else if (htsValue !== void 0) {
741
+ result[field] = htsValue;
742
+ } else {
743
+ this.handleSpecialFieldExtraction(result, field, transaction);
744
+ }
745
+ }
746
+ }
747
+ /**
748
+ * Handle special field extraction cases using registry pattern
749
+ */
750
+ static handleSpecialFieldExtraction(result, field, transaction) {
751
+ if (field === "tokenCreation" && result.type === "TOKENCREATE") {
752
+ const extracted = HTSParser.extractTokenCreationFromTransaction(transaction);
753
+ if (extracted) {
754
+ result[field] = extracted;
755
+ }
756
+ } else if (field === "tokenAirdrop" && result.type === "TOKENAIRDROP") {
757
+ const extracted = HTSParser.extractTokenAirdropFromTransaction(transaction);
758
+ if (extracted) {
759
+ result[field] = extracted;
760
+ }
761
+ }
762
+ }
763
+ /**
764
+ * Create fallback result when all parsing methods fail
765
+ */
766
+ static createFallbackResult(transactionBytes, primaryError, secondaryError) {
767
+ const validation = this.validateTransactionBytes(transactionBytes);
768
+ return {
769
+ type: "UNKNOWN",
770
+ humanReadableType: "Unknown Transaction",
771
+ transfers: [],
772
+ tokenTransfers: [],
773
+ details: {
774
+ rawBytes: transactionBytes.length > 100 ? transactionBytes.substring(0, 100) + "..." : transactionBytes,
775
+ primaryError: primaryError?.message,
776
+ secondaryError: secondaryError?.message,
777
+ parseAttempts: secondaryError ? 2 : 1,
778
+ validation
779
+ },
780
+ formatDetection: {
781
+ originalFormat: validation.format || "base64",
782
+ wasConverted: false,
783
+ length: transactionBytes.length
784
+ },
785
+ raw: {}
786
+ };
787
+ }
424
788
  }
425
789
  export {
426
- agentClaimedMessageSchema,
427
- agentConnectionStateSchema,
428
- agentConversationViewSchema,
429
- agentDeliveryStateSchema,
430
- agentInboxItemSchema,
431
- agentInboxListSchema,
432
- agentLeaseViewSchema,
433
- agentMessageAcceptedSchema,
434
- agentMessageKindSchema,
435
- agentMessageViewSchema,
436
- agentNetworkProviderSchema,
437
- agentPairingCompleteSchema,
438
- agentPairingStartSchema,
439
- agentProbeResultSchema,
440
- agentReceiveModeSchema,
441
- agentRegistrationResultStateSchema,
442
- agentRegistrationStateSchema,
443
- agentReplyResultSchema,
444
- agentRequestStateSchema,
445
- agentRuntimeQuoteSchema,
446
- agentRuntimeRegistrationResultSchema,
447
- agentRuntimeViewSchema,
448
- agentSubscriptionCreatedSchema,
449
- agentSubscriptionEventTypeSchema,
450
- agentSubscriptionListSchema,
451
- agentSubscriptionViewSchema,
452
- createAgentNetworkApi
790
+ TransactionParser,
791
+ TransactionParsingError
453
792
  };
454
793
  //# sourceMappingURL=standards-sdk.es152.js.map