@hashgraphonline/standards-sdk 0.1.167 → 0.1.169

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 (385) hide show
  1. package/README.md +21 -7
  2. package/dist/browser/hcs-10/sdk.d.ts.map +1 -1
  3. package/dist/browser/hcs-10/types.d.ts +3 -1
  4. package/dist/browser/hcs-10/types.d.ts.map +1 -1
  5. package/dist/browser/hcs-11/client.d.ts.map +1 -1
  6. package/dist/browser/hcs-11/types.d.ts +2 -1
  7. package/dist/browser/hcs-11/types.d.ts.map +1 -1
  8. package/dist/browser/hcs-12/sdk.d.ts +2 -0
  9. package/dist/browser/hcs-12/sdk.d.ts.map +1 -1
  10. package/dist/browser/hcs-15/sdk.d.ts.map +1 -1
  11. package/dist/browser/hcs-15/types.d.ts +2 -1
  12. package/dist/browser/hcs-15/types.d.ts.map +1 -1
  13. package/dist/browser/hcs-16/sdk.d.ts +2 -1
  14. package/dist/browser/hcs-16/sdk.d.ts.map +1 -1
  15. package/dist/browser/hcs-17/sdk.d.ts.map +1 -1
  16. package/dist/browser/hcs-17/types.d.ts +2 -1
  17. package/dist/browser/hcs-17/types.d.ts.map +1 -1
  18. package/dist/browser/hcs-18/sdk.d.ts +2 -1
  19. package/dist/browser/hcs-18/sdk.d.ts.map +1 -1
  20. package/dist/browser/hcs-2/client.d.ts +2 -1
  21. package/dist/browser/hcs-2/client.d.ts.map +1 -1
  22. package/dist/browser/hcs-20/sdk.d.ts.map +1 -1
  23. package/dist/browser/hcs-20/types.d.ts +2 -1
  24. package/dist/browser/hcs-20/types.d.ts.map +1 -1
  25. package/dist/browser/hcs-21/sdk.d.ts +2 -1
  26. package/dist/browser/hcs-21/sdk.d.ts.map +1 -1
  27. package/dist/browser/hcs-27/base-client.d.ts +41 -0
  28. package/dist/browser/hcs-27/base-client.d.ts.map +1 -0
  29. package/dist/browser/hcs-27/index.d.ts +6 -0
  30. package/dist/browser/hcs-27/index.d.ts.map +1 -0
  31. package/dist/browser/hcs-27/memos.d.ts +5 -0
  32. package/dist/browser/hcs-27/memos.d.ts.map +1 -0
  33. package/dist/browser/hcs-27/merkle.d.ts +23 -0
  34. package/dist/browser/hcs-27/merkle.d.ts.map +1 -0
  35. package/dist/browser/hcs-27/sdk.d.ts +23 -0
  36. package/dist/browser/hcs-27/sdk.d.ts.map +1 -0
  37. package/dist/browser/hcs-27/types.d.ts +1611 -0
  38. package/dist/browser/hcs-27/types.d.ts.map +1 -0
  39. package/dist/browser/hcs-5/sdk.d.ts.map +1 -1
  40. package/dist/browser/hcs-5/types.d.ts +2 -1
  41. package/dist/browser/hcs-5/types.d.ts.map +1 -1
  42. package/dist/browser/hcs-6/sdk.d.ts +2 -1
  43. package/dist/browser/hcs-6/sdk.d.ts.map +1 -1
  44. package/dist/browser/hcs-7/sdk.d.ts.map +1 -1
  45. package/dist/browser/hcs-7/types.d.ts +2 -1
  46. package/dist/browser/hcs-7/types.d.ts.map +1 -1
  47. package/dist/browser/index.d.ts +1 -0
  48. package/dist/browser/index.d.ts.map +1 -1
  49. package/dist/browser/standards-sdk.browser.js +33 -8
  50. package/dist/browser/standards-sdk.browser.js.map +1 -1
  51. package/dist/browser/utils/key-type-detector.d.ts.map +1 -1
  52. package/dist/cjs/hcs-10/sdk.d.ts.map +1 -1
  53. package/dist/cjs/hcs-10/types.d.ts +3 -1
  54. package/dist/cjs/hcs-10/types.d.ts.map +1 -1
  55. package/dist/cjs/hcs-11/client.d.ts.map +1 -1
  56. package/dist/cjs/hcs-11/types.d.ts +2 -1
  57. package/dist/cjs/hcs-11/types.d.ts.map +1 -1
  58. package/dist/cjs/hcs-12/sdk.d.ts +2 -0
  59. package/dist/cjs/hcs-12/sdk.d.ts.map +1 -1
  60. package/dist/cjs/hcs-15/sdk.d.ts.map +1 -1
  61. package/dist/cjs/hcs-15/types.d.ts +2 -1
  62. package/dist/cjs/hcs-15/types.d.ts.map +1 -1
  63. package/dist/cjs/hcs-16/sdk.d.ts +2 -1
  64. package/dist/cjs/hcs-16/sdk.d.ts.map +1 -1
  65. package/dist/cjs/hcs-17/sdk.d.ts.map +1 -1
  66. package/dist/cjs/hcs-17/types.d.ts +2 -1
  67. package/dist/cjs/hcs-17/types.d.ts.map +1 -1
  68. package/dist/cjs/hcs-18/sdk.d.ts +2 -1
  69. package/dist/cjs/hcs-18/sdk.d.ts.map +1 -1
  70. package/dist/cjs/hcs-2/client.d.ts +2 -1
  71. package/dist/cjs/hcs-2/client.d.ts.map +1 -1
  72. package/dist/cjs/hcs-20/sdk.d.ts.map +1 -1
  73. package/dist/cjs/hcs-20/types.d.ts +2 -1
  74. package/dist/cjs/hcs-20/types.d.ts.map +1 -1
  75. package/dist/cjs/hcs-21/sdk.d.ts +2 -1
  76. package/dist/cjs/hcs-21/sdk.d.ts.map +1 -1
  77. package/dist/cjs/hcs-27/base-client.d.ts +41 -0
  78. package/dist/cjs/hcs-27/base-client.d.ts.map +1 -0
  79. package/dist/cjs/hcs-27/index.d.ts +6 -0
  80. package/dist/cjs/hcs-27/index.d.ts.map +1 -0
  81. package/dist/cjs/hcs-27/memos.d.ts +5 -0
  82. package/dist/cjs/hcs-27/memos.d.ts.map +1 -0
  83. package/dist/cjs/hcs-27/merkle.d.ts +23 -0
  84. package/dist/cjs/hcs-27/merkle.d.ts.map +1 -0
  85. package/dist/cjs/hcs-27/sdk.d.ts +23 -0
  86. package/dist/cjs/hcs-27/sdk.d.ts.map +1 -0
  87. package/dist/cjs/hcs-27/types.d.ts +1611 -0
  88. package/dist/cjs/hcs-27/types.d.ts.map +1 -0
  89. package/dist/cjs/hcs-5/sdk.d.ts.map +1 -1
  90. package/dist/cjs/hcs-5/types.d.ts +2 -1
  91. package/dist/cjs/hcs-5/types.d.ts.map +1 -1
  92. package/dist/cjs/hcs-6/sdk.d.ts +2 -1
  93. package/dist/cjs/hcs-6/sdk.d.ts.map +1 -1
  94. package/dist/cjs/hcs-7/sdk.d.ts.map +1 -1
  95. package/dist/cjs/hcs-7/types.d.ts +2 -1
  96. package/dist/cjs/hcs-7/types.d.ts.map +1 -1
  97. package/dist/cjs/index.d.ts +1 -0
  98. package/dist/cjs/index.d.ts.map +1 -1
  99. package/dist/cjs/standards-sdk.cjs +2 -2
  100. package/dist/cjs/standards-sdk.cjs.map +1 -1
  101. package/dist/cjs/utils/key-type-detector.d.ts.map +1 -1
  102. package/dist/es/hcs-10/sdk.d.ts.map +1 -1
  103. package/dist/es/hcs-10/types.d.ts +3 -1
  104. package/dist/es/hcs-10/types.d.ts.map +1 -1
  105. package/dist/es/hcs-11/client.d.ts.map +1 -1
  106. package/dist/es/hcs-11/types.d.ts +2 -1
  107. package/dist/es/hcs-11/types.d.ts.map +1 -1
  108. package/dist/es/hcs-12/sdk.d.ts +2 -0
  109. package/dist/es/hcs-12/sdk.d.ts.map +1 -1
  110. package/dist/es/hcs-15/sdk.d.ts.map +1 -1
  111. package/dist/es/hcs-15/types.d.ts +2 -1
  112. package/dist/es/hcs-15/types.d.ts.map +1 -1
  113. package/dist/es/hcs-16/sdk.d.ts +2 -1
  114. package/dist/es/hcs-16/sdk.d.ts.map +1 -1
  115. package/dist/es/hcs-17/sdk.d.ts.map +1 -1
  116. package/dist/es/hcs-17/types.d.ts +2 -1
  117. package/dist/es/hcs-17/types.d.ts.map +1 -1
  118. package/dist/es/hcs-18/sdk.d.ts +2 -1
  119. package/dist/es/hcs-18/sdk.d.ts.map +1 -1
  120. package/dist/es/hcs-2/client.d.ts +2 -1
  121. package/dist/es/hcs-2/client.d.ts.map +1 -1
  122. package/dist/es/hcs-20/sdk.d.ts.map +1 -1
  123. package/dist/es/hcs-20/types.d.ts +2 -1
  124. package/dist/es/hcs-20/types.d.ts.map +1 -1
  125. package/dist/es/hcs-21/sdk.d.ts +2 -1
  126. package/dist/es/hcs-21/sdk.d.ts.map +1 -1
  127. package/dist/es/hcs-27/base-client.d.ts +41 -0
  128. package/dist/es/hcs-27/base-client.d.ts.map +1 -0
  129. package/dist/es/hcs-27/index.d.ts +6 -0
  130. package/dist/es/hcs-27/index.d.ts.map +1 -0
  131. package/dist/es/hcs-27/memos.d.ts +5 -0
  132. package/dist/es/hcs-27/memos.d.ts.map +1 -0
  133. package/dist/es/hcs-27/merkle.d.ts +23 -0
  134. package/dist/es/hcs-27/merkle.d.ts.map +1 -0
  135. package/dist/es/hcs-27/sdk.d.ts +23 -0
  136. package/dist/es/hcs-27/sdk.d.ts.map +1 -0
  137. package/dist/es/hcs-27/types.d.ts +1611 -0
  138. package/dist/es/hcs-27/types.d.ts.map +1 -0
  139. package/dist/es/hcs-5/sdk.d.ts.map +1 -1
  140. package/dist/es/hcs-5/types.d.ts +2 -1
  141. package/dist/es/hcs-5/types.d.ts.map +1 -1
  142. package/dist/es/hcs-6/sdk.d.ts +2 -1
  143. package/dist/es/hcs-6/sdk.d.ts.map +1 -1
  144. package/dist/es/hcs-7/sdk.d.ts.map +1 -1
  145. package/dist/es/hcs-7/types.d.ts +2 -1
  146. package/dist/es/hcs-7/types.d.ts.map +1 -1
  147. package/dist/es/index.d.ts +1 -0
  148. package/dist/es/index.d.ts.map +1 -1
  149. package/dist/es/standards-sdk.es.js +67 -38
  150. package/dist/es/standards-sdk.es.js.map +1 -1
  151. package/dist/es/standards-sdk.es101.js +2 -2
  152. package/dist/es/standards-sdk.es102.js.map +1 -1
  153. package/dist/es/standards-sdk.es103.js +2 -2
  154. package/dist/es/standards-sdk.es104.js +2 -2
  155. package/dist/es/standards-sdk.es104.js.map +1 -1
  156. package/dist/es/standards-sdk.es106.js +1 -1
  157. package/dist/es/standards-sdk.es108.js +3 -3
  158. package/dist/es/standards-sdk.es108.js.map +1 -1
  159. package/dist/es/standards-sdk.es11.js +3 -2
  160. package/dist/es/standards-sdk.es11.js.map +1 -1
  161. package/dist/es/standards-sdk.es110.js +1 -1
  162. package/dist/es/standards-sdk.es111.js +2 -2
  163. package/dist/es/standards-sdk.es112.js +151 -234
  164. package/dist/es/standards-sdk.es112.js.map +1 -1
  165. package/dist/es/standards-sdk.es113.js +20 -471
  166. package/dist/es/standards-sdk.es113.js.map +1 -1
  167. package/dist/es/standards-sdk.es114.js +263 -104
  168. package/dist/es/standards-sdk.es114.js.map +1 -1
  169. package/dist/es/standards-sdk.es115.js +167 -138
  170. package/dist/es/standards-sdk.es115.js.map +1 -1
  171. package/dist/es/standards-sdk.es116.js +315 -29
  172. package/dist/es/standards-sdk.es116.js.map +1 -1
  173. package/dist/es/standards-sdk.es117.js +250 -10
  174. package/dist/es/standards-sdk.es117.js.map +1 -1
  175. package/dist/es/standards-sdk.es118.js +448 -152
  176. package/dist/es/standards-sdk.es118.js.map +1 -1
  177. package/dist/es/standards-sdk.es119.js +101 -25
  178. package/dist/es/standards-sdk.es119.js.map +1 -1
  179. package/dist/es/standards-sdk.es12.js +1 -1
  180. package/dist/es/standards-sdk.es120.js +155 -17
  181. package/dist/es/standards-sdk.es120.js.map +1 -1
  182. package/dist/es/standards-sdk.es121.js +29 -155
  183. package/dist/es/standards-sdk.es121.js.map +1 -1
  184. package/dist/es/standards-sdk.es122.js +9 -200
  185. package/dist/es/standards-sdk.es122.js.map +1 -1
  186. package/dist/es/standards-sdk.es123.js +146 -754
  187. package/dist/es/standards-sdk.es123.js.map +1 -1
  188. package/dist/es/standards-sdk.es124.js +27 -11
  189. package/dist/es/standards-sdk.es124.js.map +1 -1
  190. package/dist/es/standards-sdk.es125.js +19 -564
  191. package/dist/es/standards-sdk.es125.js.map +1 -1
  192. package/dist/es/standards-sdk.es126.js +140 -582
  193. package/dist/es/standards-sdk.es126.js.map +1 -1
  194. package/dist/es/standards-sdk.es127.js +202 -12
  195. package/dist/es/standards-sdk.es127.js.map +1 -1
  196. package/dist/es/standards-sdk.es128.js +790 -2
  197. package/dist/es/standards-sdk.es128.js.map +1 -1
  198. package/dist/es/standards-sdk.es129.js +10 -84
  199. package/dist/es/standards-sdk.es129.js.map +1 -1
  200. package/dist/es/standards-sdk.es13.js +1 -1
  201. package/dist/es/standards-sdk.es130.js +567 -40
  202. package/dist/es/standards-sdk.es130.js.map +1 -1
  203. package/dist/es/standards-sdk.es131.js +626 -2
  204. package/dist/es/standards-sdk.es131.js.map +1 -1
  205. package/dist/es/standards-sdk.es132.js +12 -234
  206. package/dist/es/standards-sdk.es132.js.map +1 -1
  207. package/dist/es/standards-sdk.es133.js +2 -1140
  208. package/dist/es/standards-sdk.es133.js.map +1 -1
  209. package/dist/es/standards-sdk.es134.js +73 -292
  210. package/dist/es/standards-sdk.es134.js.map +1 -1
  211. package/dist/es/standards-sdk.es135.js +36 -418
  212. package/dist/es/standards-sdk.es135.js.map +1 -1
  213. package/dist/es/standards-sdk.es136.js +2 -355
  214. package/dist/es/standards-sdk.es136.js.map +1 -1
  215. package/dist/es/standards-sdk.es137.js +198 -1079
  216. package/dist/es/standards-sdk.es137.js.map +1 -1
  217. package/dist/es/standards-sdk.es138.js +1107 -175
  218. package/dist/es/standards-sdk.es138.js.map +1 -1
  219. package/dist/es/standards-sdk.es139.js +218 -1479
  220. package/dist/es/standards-sdk.es139.js.map +1 -1
  221. package/dist/es/standards-sdk.es14.js +1 -1
  222. package/dist/es/standards-sdk.es140.js +422 -1500
  223. package/dist/es/standards-sdk.es140.js.map +1 -1
  224. package/dist/es/standards-sdk.es141.js +351 -13
  225. package/dist/es/standards-sdk.es141.js.map +1 -1
  226. package/dist/es/standards-sdk.es142.js +1102 -73
  227. package/dist/es/standards-sdk.es142.js.map +1 -1
  228. package/dist/es/standards-sdk.es143.js +203 -76
  229. package/dist/es/standards-sdk.es143.js.map +1 -1
  230. package/dist/es/standards-sdk.es144.js +1459 -830
  231. package/dist/es/standards-sdk.es144.js.map +1 -1
  232. package/dist/es/standards-sdk.es145.js +1499 -59
  233. package/dist/es/standards-sdk.es145.js.map +1 -1
  234. package/dist/es/standards-sdk.es146.js +14 -156
  235. package/dist/es/standards-sdk.es146.js.map +1 -1
  236. package/dist/es/standards-sdk.es147.js +87 -7
  237. package/dist/es/standards-sdk.es147.js.map +1 -1
  238. package/dist/es/standards-sdk.es148.js +74 -79
  239. package/dist/es/standards-sdk.es148.js.map +1 -1
  240. package/dist/es/standards-sdk.es149.js +934 -61
  241. package/dist/es/standards-sdk.es149.js.map +1 -1
  242. package/dist/es/standards-sdk.es15.js +1 -1
  243. package/dist/es/standards-sdk.es150.js +60 -30
  244. package/dist/es/standards-sdk.es150.js.map +1 -1
  245. package/dist/es/standards-sdk.es151.js +159 -34
  246. package/dist/es/standards-sdk.es151.js.map +1 -1
  247. package/dist/es/standards-sdk.es152.js +7 -48
  248. package/dist/es/standards-sdk.es152.js.map +1 -1
  249. package/dist/es/standards-sdk.es153.js +70 -122
  250. package/dist/es/standards-sdk.es153.js.map +1 -1
  251. package/dist/es/standards-sdk.es154.js +58 -35
  252. package/dist/es/standards-sdk.es154.js.map +1 -1
  253. package/dist/es/standards-sdk.es155.js +30 -12482
  254. package/dist/es/standards-sdk.es155.js.map +1 -1
  255. package/dist/es/standards-sdk.es156.js +34 -56
  256. package/dist/es/standards-sdk.es156.js.map +1 -1
  257. package/dist/es/standards-sdk.es157.js +48 -84
  258. package/dist/es/standards-sdk.es157.js.map +1 -1
  259. package/dist/es/standards-sdk.es158.js +128 -71
  260. package/dist/es/standards-sdk.es158.js.map +1 -1
  261. package/dist/es/standards-sdk.es159.js +33 -191
  262. package/dist/es/standards-sdk.es159.js.map +1 -1
  263. package/dist/es/standards-sdk.es16.js +5 -5
  264. package/dist/es/standards-sdk.es160.js +12477 -12
  265. package/dist/es/standards-sdk.es160.js.map +1 -1
  266. package/dist/es/standards-sdk.es161.js +15 -548
  267. package/dist/es/standards-sdk.es161.js.map +1 -1
  268. package/dist/es/standards-sdk.es162.js +51 -167
  269. package/dist/es/standards-sdk.es162.js.map +1 -1
  270. package/dist/es/standards-sdk.es163.js +70 -308
  271. package/dist/es/standards-sdk.es163.js.map +1 -1
  272. package/dist/es/standards-sdk.es164.js +71 -336
  273. package/dist/es/standards-sdk.es164.js.map +1 -1
  274. package/dist/es/standards-sdk.es165.js +186 -439
  275. package/dist/es/standards-sdk.es165.js.map +1 -1
  276. package/dist/es/standards-sdk.es166.js +537 -318
  277. package/dist/es/standards-sdk.es166.js.map +1 -1
  278. package/dist/es/standards-sdk.es167.js +63 -66
  279. package/dist/es/standards-sdk.es167.js.map +1 -1
  280. package/dist/es/standards-sdk.es168.js +165 -66
  281. package/dist/es/standards-sdk.es168.js.map +1 -1
  282. package/dist/es/standards-sdk.es169.js +310 -160
  283. package/dist/es/standards-sdk.es169.js.map +1 -1
  284. package/dist/es/standards-sdk.es170.js +336 -212
  285. package/dist/es/standards-sdk.es170.js.map +1 -1
  286. package/dist/es/standards-sdk.es171.js +437 -223
  287. package/dist/es/standards-sdk.es171.js.map +1 -1
  288. package/dist/es/standards-sdk.es172.js +324 -112
  289. package/dist/es/standards-sdk.es172.js.map +1 -1
  290. package/dist/es/standards-sdk.es173.js +65 -115
  291. package/dist/es/standards-sdk.es173.js.map +1 -1
  292. package/dist/es/standards-sdk.es174.js +151 -140
  293. package/dist/es/standards-sdk.es174.js.map +1 -1
  294. package/dist/es/standards-sdk.es175.js +193 -156
  295. package/dist/es/standards-sdk.es175.js.map +1 -1
  296. package/dist/es/standards-sdk.es176.js +221 -121
  297. package/dist/es/standards-sdk.es176.js.map +1 -1
  298. package/dist/es/standards-sdk.es177.js +81 -293
  299. package/dist/es/standards-sdk.es177.js.map +1 -1
  300. package/dist/es/standards-sdk.es178.js +114 -247
  301. package/dist/es/standards-sdk.es178.js.map +1 -1
  302. package/dist/es/standards-sdk.es179.js +119 -110
  303. package/dist/es/standards-sdk.es179.js.map +1 -1
  304. package/dist/es/standards-sdk.es18.js +15 -14
  305. package/dist/es/standards-sdk.es18.js.map +1 -1
  306. package/dist/es/standards-sdk.es180.js +188 -0
  307. package/dist/es/standards-sdk.es180.js.map +1 -0
  308. package/dist/es/standards-sdk.es181.js +142 -0
  309. package/dist/es/standards-sdk.es181.js.map +1 -0
  310. package/dist/es/standards-sdk.es182.js +334 -0
  311. package/dist/es/standards-sdk.es182.js.map +1 -0
  312. package/dist/es/standards-sdk.es183.js +262 -0
  313. package/dist/es/standards-sdk.es183.js.map +1 -0
  314. package/dist/es/standards-sdk.es184.js +155 -0
  315. package/dist/es/standards-sdk.es184.js.map +1 -0
  316. package/dist/es/standards-sdk.es19.js +9 -9
  317. package/dist/es/standards-sdk.es2.js +2 -2
  318. package/dist/es/standards-sdk.es20.js +1 -1
  319. package/dist/es/standards-sdk.es21.js +1 -1
  320. package/dist/es/standards-sdk.es22.js +1 -1
  321. package/dist/es/standards-sdk.es23.js +1 -1
  322. package/dist/es/standards-sdk.es24.js +1 -1
  323. package/dist/es/standards-sdk.es25.js +1 -1
  324. package/dist/es/standards-sdk.es26.js +1 -1
  325. package/dist/es/standards-sdk.es27.js +13 -13
  326. package/dist/es/standards-sdk.es27.js.map +1 -1
  327. package/dist/es/standards-sdk.es28.js.map +1 -1
  328. package/dist/es/standards-sdk.es30.js +2 -2
  329. package/dist/es/standards-sdk.es31.js +4 -4
  330. package/dist/es/standards-sdk.es32.js +1 -1
  331. package/dist/es/standards-sdk.es35.js +6 -6
  332. package/dist/es/standards-sdk.es36.js +5 -5
  333. package/dist/es/standards-sdk.es36.js.map +1 -1
  334. package/dist/es/standards-sdk.es37.js +2 -2
  335. package/dist/es/standards-sdk.es38.js +2 -2
  336. package/dist/es/standards-sdk.es39.js +1 -1
  337. package/dist/es/standards-sdk.es4.js +3 -3
  338. package/dist/es/standards-sdk.es4.js.map +1 -1
  339. package/dist/es/standards-sdk.es40.js +1 -1
  340. package/dist/es/standards-sdk.es41.js +2 -2
  341. package/dist/es/standards-sdk.es46.js +1 -1
  342. package/dist/es/standards-sdk.es5.js +2 -2
  343. package/dist/es/standards-sdk.es51.js +1 -1
  344. package/dist/es/standards-sdk.es53.js +1 -1
  345. package/dist/es/standards-sdk.es56.js +2 -2
  346. package/dist/es/standards-sdk.es59.js +1 -1
  347. package/dist/es/standards-sdk.es6.js +2 -2
  348. package/dist/es/standards-sdk.es60.js +1 -1
  349. package/dist/es/standards-sdk.es62.js +1 -1
  350. package/dist/es/standards-sdk.es63.js +2 -2
  351. package/dist/es/standards-sdk.es64.js +1 -1
  352. package/dist/es/standards-sdk.es65.js +1 -1
  353. package/dist/es/standards-sdk.es66.js +1 -1
  354. package/dist/es/standards-sdk.es67.js +7 -7
  355. package/dist/es/standards-sdk.es69.js +1 -1
  356. package/dist/es/standards-sdk.es7.js +1 -1
  357. package/dist/es/standards-sdk.es70.js.map +1 -1
  358. package/dist/es/standards-sdk.es71.js +2 -2
  359. package/dist/es/standards-sdk.es72.js +5 -4
  360. package/dist/es/standards-sdk.es72.js.map +1 -1
  361. package/dist/es/standards-sdk.es75.js +6 -6
  362. package/dist/es/standards-sdk.es75.js.map +1 -1
  363. package/dist/es/standards-sdk.es76.js +3 -3
  364. package/dist/es/standards-sdk.es77.js +2 -2
  365. package/dist/es/standards-sdk.es78.js +1 -1
  366. package/dist/es/standards-sdk.es79.js.map +1 -1
  367. package/dist/es/standards-sdk.es8.js.map +1 -1
  368. package/dist/es/standards-sdk.es81.js +2 -2
  369. package/dist/es/standards-sdk.es83.js +7 -5
  370. package/dist/es/standards-sdk.es83.js.map +1 -1
  371. package/dist/es/standards-sdk.es84.js +4 -4
  372. package/dist/es/standards-sdk.es85.js +1 -1
  373. package/dist/es/standards-sdk.es88.js +1 -1
  374. package/dist/es/standards-sdk.es89.js +2 -2
  375. package/dist/es/standards-sdk.es9.js +2 -2
  376. package/dist/es/standards-sdk.es90.js +5 -5
  377. package/dist/es/standards-sdk.es90.js.map +1 -1
  378. package/dist/es/standards-sdk.es94.js +4 -4
  379. package/dist/es/standards-sdk.es94.js.map +1 -1
  380. package/dist/es/standards-sdk.es96.js +2 -2
  381. package/dist/es/standards-sdk.es98.js +1 -1
  382. package/dist/es/standards-sdk.es99.js +4 -4
  383. package/dist/es/standards-sdk.es99.js.map +1 -1
  384. package/dist/es/utils/key-type-detector.d.ts.map +1 -1
  385. package/package.json +1 -1
@@ -1,242 +1,456 @@
1
- const DEFAULT_USER_AGENT = "@hol-org/rb-client";
2
- const DEFAULT_PROGRESS_INTERVAL_MS = 1500;
3
- const DEFAULT_PROGRESS_TIMEOUT_MS = 5 * 60 * 1e3;
4
- const DEFAULT_BASE_URL = "https://hol.org/registry/api/v1";
5
- const JSON_CONTENT_TYPE = /application\/json/i;
6
- const DEFAULT_HISTORY_TOP_UP_HBAR = 0.25;
7
- const MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS = 1;
8
- const stripTrailingSlashes = (value) => {
9
- let end = value.length;
10
- while (end > 0 && value.charCodeAt(end - 1) === 47) {
11
- end -= 1;
12
- }
13
- return end === value.length ? value : value.slice(0, end);
14
- };
15
- const createAbortError = () => typeof DOMException === "function" ? new DOMException("Aborted", "AbortError") : new Error("The operation was aborted");
16
- const normaliseHeaderName = (name) => name.trim().toLowerCase();
17
- const isBrowserRuntime = () => typeof window !== "undefined" && typeof window.fetch === "function";
18
- const toJsonValue = (value) => {
19
- if (value === null) {
20
- return null;
21
- }
22
- if (value instanceof Date) {
23
- return value.toISOString();
24
- }
25
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
26
- return value;
27
- }
28
- if (Array.isArray(value)) {
29
- return value.map((item) => item === void 0 ? null : toJsonValue(item));
30
- }
31
- if (typeof value === "object") {
32
- const result = {};
33
- Object.entries(value).forEach(
34
- ([key, entryValue]) => {
35
- if (entryValue !== void 0) {
36
- result[key] = toJsonValue(entryValue);
1
+ import { proto } from "@hashgraph/proto";
2
+ import { Long, Hbar, HbarUnit, ContractId, AccountId, FileId } from "@hashgraph/sdk";
3
+ import { Buffer } from "buffer";
4
+ import { hasTransactionType, parseKey } from "./standards-sdk.es173.js";
5
+ class SCSParser {
6
+ /**
7
+ * Parse Smart Contract Service transaction using unified dual-branch approach
8
+ * This handles both regular transactions and signed transaction variants
9
+ */
10
+ static parseSCSTransaction(transaction, originalBytes) {
11
+ try {
12
+ if (originalBytes || transaction.toBytes) {
13
+ try {
14
+ const bytesToParse = originalBytes || transaction.toBytes();
15
+ const decoded = proto.TransactionList.decode(bytesToParse);
16
+ if (decoded.transactionList && decoded.transactionList.length > 0) {
17
+ const tx = decoded.transactionList[0];
18
+ let txBody = null;
19
+ if (tx.bodyBytes && tx.bodyBytes.length > 0) {
20
+ txBody = proto.TransactionBody.decode(tx.bodyBytes);
21
+ } else if (tx.signedTransactionBytes && tx.signedTransactionBytes.length > 0) {
22
+ const signedTx = proto.SignedTransaction.decode(
23
+ tx.signedTransactionBytes
24
+ );
25
+ if (signedTx.bodyBytes) {
26
+ txBody = proto.TransactionBody.decode(signedTx.bodyBytes);
27
+ }
28
+ }
29
+ if (txBody) {
30
+ const protoResult = this.parseFromProtobufTxBody(txBody);
31
+ if (protoResult.type && protoResult.type !== "UNKNOWN") {
32
+ return protoResult;
33
+ }
34
+ }
35
+ }
36
+ } catch (protoError) {
37
37
  }
38
38
  }
39
- );
40
- return result;
41
- }
42
- throw new TypeError("Only JSON-compatible values are supported");
43
- };
44
- const isJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
45
- const toJsonObject = (value) => {
46
- const normalised = toJsonValue(value);
47
- if (isJsonObject(normalised)) {
48
- return normalised;
49
- }
50
- throw new TypeError("Expected JSON object value");
51
- };
52
- const serialiseAuthConfig = (auth) => {
53
- const authPayload = {};
54
- if (auth.type) {
55
- authPayload.type = auth.type;
56
- }
57
- if (auth.token) {
58
- authPayload.token = auth.token;
59
- }
60
- if (auth.username) {
61
- authPayload.username = auth.username;
62
- }
63
- if (auth.password) {
64
- authPayload.password = auth.password;
65
- }
66
- if (auth.headerName) {
67
- authPayload.headerName = auth.headerName;
68
- }
69
- if (auth.headerValue) {
70
- authPayload.headerValue = auth.headerValue;
71
- }
72
- if (auth.headers) {
73
- authPayload.headers = { ...auth.headers };
74
- }
75
- return authPayload;
76
- };
77
- const serialiseAgentRegistrationRequest = (payload) => {
78
- const body = {
79
- profile: toJsonObject(payload.profile)
80
- };
81
- if (payload.endpoint !== void 0) {
82
- body.endpoint = payload.endpoint;
83
- }
84
- if (payload.protocol !== void 0) {
85
- body.protocol = payload.protocol;
86
- }
87
- if (payload.communicationProtocol !== void 0) {
88
- body.communicationProtocol = payload.communicationProtocol;
89
- }
90
- if (payload.registry !== void 0) {
91
- body.registry = payload.registry;
92
- }
93
- if (payload.additionalRegistries !== void 0) {
94
- body.additionalRegistries = payload.additionalRegistries;
95
- }
96
- if (payload.metadata !== void 0) {
97
- body.metadata = toJsonObject(payload.metadata);
98
- }
99
- return body;
100
- };
101
- const normalizeHexPrivateKey = (value) => {
102
- const trimmed = value.trim();
103
- if (!trimmed) {
104
- throw new Error("evmPrivateKey is required");
39
+ return this.parseFromTransactionInternals(transaction);
40
+ } catch (error) {
41
+ return {
42
+ type: "UNKNOWN",
43
+ humanReadableType: "Unknown Contract Transaction"
44
+ };
45
+ }
105
46
  }
106
- return trimmed.startsWith("0x") ? trimmed : `0x${trimmed}`;
107
- };
108
- function normaliseBaseUrl(input) {
109
- const trimmed = input?.trim();
110
- let baseCandidate = trimmed && trimmed.length > 0 ? trimmed : DEFAULT_BASE_URL;
111
- try {
112
- const url = new URL(stripTrailingSlashes(baseCandidate));
113
- const hostname = url.hostname.toLowerCase();
114
- const ensureRegistryPrefix = () => {
115
- if (!url.pathname.startsWith("/registry")) {
116
- url.pathname = url.pathname === "/" ? "/registry" : `/registry${url.pathname}`;
47
+ /**
48
+ * Parse contract transaction from protobuf TransactionBody
49
+ * Handles all contract operations from decoded protobuf data
50
+ */
51
+ static parseFromProtobufTxBody(txBody) {
52
+ if (txBody.contractCall) {
53
+ const contractCall = this.parseContractCall(txBody.contractCall);
54
+ if (contractCall) {
55
+ return {
56
+ type: "CONTRACTCALL",
57
+ humanReadableType: "Contract Call",
58
+ contractCall
59
+ };
117
60
  }
118
- };
119
- if (hostname === "hol.org") {
120
- ensureRegistryPrefix();
121
- baseCandidate = url.toString();
122
- } else if (hostname === "registry.hashgraphonline.com" || hostname === "hashgraphonline.com") {
123
- ensureRegistryPrefix();
124
- url.hostname = "hol.org";
125
- baseCandidate = url.toString();
126
- }
127
- } catch {
128
- }
129
- const withoutTrailing = stripTrailingSlashes(baseCandidate);
130
- if (/\/api\/v\d+$/i.test(withoutTrailing)) {
131
- return withoutTrailing;
132
- }
133
- if (/\/api$/i.test(withoutTrailing)) {
134
- return `${withoutTrailing}/v1`;
135
- }
136
- return `${withoutTrailing}/api/v1`;
137
- }
138
- function buildSearchQuery(params) {
139
- const query = new URLSearchParams();
140
- const appendList = (key, values) => {
141
- if (!values) {
142
- return;
143
- }
144
- values.forEach((value) => {
145
- if (typeof value === "string") {
146
- const trimmed = value.trim();
147
- if (trimmed.length > 0) {
148
- query.append(key, trimmed);
149
- }
61
+ }
62
+ if (txBody.contractCreateInstance) {
63
+ const contractCreate = this.parseContractCreate(
64
+ txBody.contractCreateInstance
65
+ );
66
+ if (contractCreate) {
67
+ return {
68
+ type: "CONTRACTCREATE",
69
+ humanReadableType: "Contract Create",
70
+ contractCreate
71
+ };
150
72
  }
151
- });
152
- };
153
- if (params.q) {
154
- const trimmed = params.q.trim();
155
- if (trimmed.length > 0) {
156
- query.set("q", trimmed);
157
73
  }
158
- }
159
- if (typeof params.page === "number") {
160
- query.set("page", params.page.toString());
161
- }
162
- if (typeof params.limit === "number") {
163
- query.set("limit", params.limit.toString());
164
- }
165
- if (params.registry) {
166
- const trimmed = params.registry.trim();
167
- if (trimmed.length > 0) {
168
- query.set("registry", trimmed);
74
+ if (txBody.contractUpdateInstance) {
75
+ const contractUpdate = this.parseContractUpdate(
76
+ txBody.contractUpdateInstance
77
+ );
78
+ if (contractUpdate) {
79
+ return {
80
+ type: "CONTRACTUPDATE",
81
+ humanReadableType: "Contract Update",
82
+ contractUpdate
83
+ };
84
+ }
169
85
  }
170
- }
171
- appendList("registries", params.registries);
172
- if (typeof params.minTrust === "number") {
173
- query.set("minTrust", params.minTrust.toString());
174
- }
175
- appendList("capabilities", params.capabilities);
176
- appendList("protocols", params.protocols);
177
- appendList("adapters", params.adapters);
178
- if (params.metadata) {
179
- Object.entries(params.metadata).forEach(([key, values]) => {
180
- if (!key || !Array.isArray(values) || values.length === 0) {
181
- return;
86
+ if (txBody.contractDeleteInstance) {
87
+ const contractDelete = this.parseContractDelete(
88
+ txBody.contractDeleteInstance
89
+ );
90
+ if (contractDelete) {
91
+ return {
92
+ type: "CONTRACTDELETE",
93
+ humanReadableType: "Contract Delete",
94
+ contractDelete
95
+ };
182
96
  }
183
- const trimmedKey = key.trim();
184
- if (trimmedKey.length === 0) {
185
- return;
97
+ }
98
+ if (txBody.ethereumTransaction) {
99
+ const ethereumCall = this.parseEthereumTransaction(
100
+ txBody.ethereumTransaction
101
+ );
102
+ if (ethereumCall) {
103
+ return {
104
+ type: "ETHEREUMTRANSACTION",
105
+ humanReadableType: "Ethereum Transaction",
106
+ ethereumTransaction: ethereumCall
107
+ };
186
108
  }
187
- values.forEach((value) => {
188
- if (value === void 0 || value === null) {
189
- return;
109
+ }
110
+ return {};
111
+ }
112
+ /**
113
+ * Extract contract data from Transaction internal fields
114
+ * This handles cases where data is stored in Transaction object internals
115
+ */
116
+ static parseFromTransactionInternals(transaction) {
117
+ try {
118
+ const tx = transaction;
119
+ if (tx._contractId && tx._gas) {
120
+ const contractCall = {
121
+ contractId: tx._contractId.toString(),
122
+ gas: typeof tx._gas === "number" ? tx._gas : Long.fromValue(tx._gas).toNumber(),
123
+ amount: tx._amount ? parseFloat(tx._amount.toString()) : 0
124
+ };
125
+ if (tx._functionParameters) {
126
+ const funcParams = Buffer.from(tx._functionParameters).toString(
127
+ "hex"
128
+ );
129
+ contractCall.functionParameters = funcParams;
130
+ contractCall.functionName = this.extractFunctionName(funcParams);
190
131
  }
191
- query.append(`metadata.${trimmedKey}`, String(value));
192
- });
193
- });
194
- }
195
- if (params.type) {
196
- const trimmedType = params.type.trim();
197
- if (trimmedType.length > 0 && trimmedType.toLowerCase() !== "all") {
198
- query.set("type", trimmedType);
132
+ return {
133
+ type: "CONTRACTCALL",
134
+ humanReadableType: "Contract Call",
135
+ contractCall
136
+ };
137
+ }
138
+ if (hasTransactionType(transaction, "contractCreateInstance")) {
139
+ const contractCreate = {
140
+ gas: tx._gas.toString(),
141
+ initialBalance: tx._initialBalance?.toString() || "0"
142
+ };
143
+ if (tx._fileId) {
144
+ contractCreate.initcodeSource = "fileID";
145
+ contractCreate.initcode = tx._fileId.toString();
146
+ } else if (tx._bytecode) {
147
+ contractCreate.initcodeSource = "bytes";
148
+ contractCreate.initcode = Buffer.from(tx._bytecode).toString("hex");
149
+ }
150
+ if (tx._constructorParameters) {
151
+ contractCreate.constructorParameters = Buffer.from(
152
+ tx._constructorParameters
153
+ ).toString("hex");
154
+ }
155
+ if (tx._memo) contractCreate.memo = tx._memo;
156
+ if (tx._adminKey) contractCreate.adminKey = parseKey(tx._adminKey);
157
+ if (tx._maxAutomaticTokenAssociations !== void 0) {
158
+ contractCreate.maxAutomaticTokenAssociations = tx._maxAutomaticTokenAssociations;
159
+ }
160
+ if (tx._stakedAccountId) {
161
+ contractCreate.stakedAccountId = tx._stakedAccountId.toString();
162
+ } else if (tx._stakedNodeId !== null && tx._stakedNodeId !== void 0) {
163
+ contractCreate.stakedNodeId = Long.fromValue(
164
+ tx._stakedNodeId
165
+ ).toString();
166
+ }
167
+ if (tx._declineReward !== void 0)
168
+ contractCreate.declineReward = tx._declineReward;
169
+ if (tx._autoRenewPeriod)
170
+ contractCreate.autoRenewPeriod = tx._autoRenewPeriod.toString();
171
+ return {
172
+ type: "CONTRACTCREATE",
173
+ humanReadableType: "Contract Create",
174
+ contractCreate
175
+ };
176
+ }
177
+ if (hasTransactionType(transaction, "contractUpdateInstance")) {
178
+ const contractUpdate = {
179
+ contractIdToUpdate: tx._contractId.toString()
180
+ };
181
+ if (tx._memo) contractUpdate.memo = tx._memo;
182
+ if (tx._adminKey) contractUpdate.adminKey = parseKey(tx._adminKey);
183
+ if (tx._maxAutomaticTokenAssociations !== void 0) {
184
+ contractUpdate.maxAutomaticTokenAssociations = tx._maxAutomaticTokenAssociations;
185
+ }
186
+ if (tx._stakedAccountId) {
187
+ contractUpdate.stakedAccountId = tx._stakedAccountId.toString();
188
+ } else if (tx._stakedNodeId !== null && tx._stakedNodeId !== void 0) {
189
+ contractUpdate.stakedNodeId = Long.fromValue(
190
+ tx._stakedNodeId
191
+ ).toString();
192
+ }
193
+ if (tx._declineReward !== void 0)
194
+ contractUpdate.declineReward = tx._declineReward;
195
+ if (tx._autoRenewPeriod)
196
+ contractUpdate.autoRenewPeriod = tx._autoRenewPeriod.toString();
197
+ return {
198
+ type: "CONTRACTUPDATE",
199
+ humanReadableType: "Contract Update",
200
+ contractUpdate
201
+ };
202
+ }
203
+ if (hasTransactionType(transaction, "contractDeleteInstance")) {
204
+ const contractDelete = {
205
+ contractIdToDelete: tx._contractId.toString()
206
+ };
207
+ if (tx._transferAccountId) {
208
+ contractDelete.transferAccountId = tx._transferAccountId.toString();
209
+ } else if (tx._transferContractId) {
210
+ contractDelete.transferContractId = tx._transferContractId.toString();
211
+ }
212
+ return {
213
+ type: "CONTRACTDELETE",
214
+ humanReadableType: "Contract Delete",
215
+ contractDelete
216
+ };
217
+ }
218
+ return {};
219
+ } catch (error) {
220
+ return {};
199
221
  }
200
222
  }
201
- if (params.verified === true) {
202
- query.set("verified", "true");
203
- }
204
- if (params.online === true) {
205
- query.set("online", "true");
206
- }
207
- if (params.sortBy) {
208
- const trimmedSort = params.sortBy.trim();
209
- if (trimmedSort.length > 0) {
210
- query.set("sortBy", trimmedSort);
223
+ /**
224
+ * Enhanced function name extraction from contract call parameters
225
+ * Attempts to decode function selector and map to known function names
226
+ */
227
+ static extractFunctionName(functionParameters) {
228
+ if (functionParameters.length < 8) return "unknown";
229
+ const selector = functionParameters.substring(0, 8);
230
+ const commonSelectors = {
231
+ a9059cbb: "transfer",
232
+ "095ea7b3": "approve",
233
+ "23b872dd": "transferFrom",
234
+ "70a08231": "balanceOf",
235
+ dd62ed3e: "allowance",
236
+ "18160ddd": "totalSupply",
237
+ "06fdde03": "name",
238
+ "95d89b41": "symbol",
239
+ "313ce567": "decimals",
240
+ "42842e0e": "safeTransferFrom",
241
+ b88d4fde: "safeTransferFrom",
242
+ e985e9c5: "isApprovedForAll",
243
+ a22cb465: "setApprovalForAll",
244
+ "6352211e": "ownerOf",
245
+ c87b56dd: "tokenURI",
246
+ "01ffc9a7": "supportsInterface",
247
+ "40c10f19": "mint",
248
+ "42966c68": "burn",
249
+ f2fde38b: "transferOwnership",
250
+ "715018a6": "renounceOwnership",
251
+ "8da5cb5b": "owner"
252
+ };
253
+ return commonSelectors[selector] || selector;
254
+ }
255
+ /**
256
+ * Parse Ethereum Transaction (was completely missing from original parser)
257
+ */
258
+ static parseEthereumTransaction(body) {
259
+ if (!body) return void 0;
260
+ const data = {
261
+ contractId: "EVM",
262
+ gas: body.maxGasAllowance ? Long.fromValue(body.maxGasAllowance).toNumber() : 0,
263
+ amount: 0
264
+ };
265
+ if (body.ethereumData && body.ethereumData.length > 0) {
266
+ const ethData = Buffer.from(body.ethereumData).toString("hex");
267
+ data.functionParameters = ethData;
268
+ if (ethData.length >= 8) {
269
+ data.functionName = this.extractFunctionName(ethData);
270
+ }
211
271
  }
212
- }
213
- if (params.sortOrder) {
214
- const lowered = params.sortOrder.toLowerCase();
215
- if (lowered === "asc" || lowered === "desc") {
216
- query.set("sortOrder", lowered);
272
+ return data;
273
+ }
274
+ static parseContractCall(body) {
275
+ if (!body) return void 0;
276
+ const hbarAmount = Hbar.fromTinybars(Long.fromValue(body.amount ?? 0));
277
+ const data = {
278
+ contractId: new ContractId(
279
+ body.contractID.shardNum ?? 0,
280
+ body.contractID.realmNum ?? 0,
281
+ body.contractID.contractNum ?? 0
282
+ ).toString(),
283
+ gas: Long.fromValue(body.gas ?? 0).toNumber(),
284
+ amount: parseFloat(hbarAmount.toString(HbarUnit.Hbar))
285
+ };
286
+ if (body.functionParameters) {
287
+ data.functionParameters = Buffer.from(body.functionParameters).toString(
288
+ "hex"
289
+ );
290
+ if (data.functionParameters.length >= 8) {
291
+ data.functionName = this.extractFunctionName(data.functionParameters);
292
+ }
293
+ }
294
+ return data;
295
+ }
296
+ static parseContractCreate(body) {
297
+ if (!body) return void 0;
298
+ const data = {};
299
+ if (body.initialBalance) {
300
+ data.initialBalance = Hbar.fromTinybars(
301
+ Long.fromValue(body.initialBalance)
302
+ ).toString(HbarUnit.Hbar);
303
+ }
304
+ if (body.gas) {
305
+ data.gas = Long.fromValue(body.gas).toString();
306
+ }
307
+ if (body.adminKey) {
308
+ data.adminKey = parseKey(body.adminKey);
217
309
  }
310
+ if (body.constructorParameters) {
311
+ data.constructorParameters = Buffer.from(
312
+ body.constructorParameters
313
+ ).toString("hex");
314
+ }
315
+ if (body.memo) {
316
+ data.memo = body.memo;
317
+ }
318
+ if (body.autoRenewPeriod?.seconds) {
319
+ data.autoRenewPeriod = Long.fromValue(
320
+ body.autoRenewPeriod.seconds
321
+ ).toString();
322
+ }
323
+ if (body.stakedAccountId) {
324
+ data.stakedAccountId = new AccountId(
325
+ body.stakedAccountId.shardNum ?? 0,
326
+ body.stakedAccountId.realmNum ?? 0,
327
+ body.stakedAccountId.accountNum ?? 0
328
+ ).toString();
329
+ } else if (body.stakedNodeId !== null && body.stakedNodeId !== void 0) {
330
+ data.stakedNodeId = Long.fromValue(body.stakedNodeId).toString();
331
+ }
332
+ if (body.declineReward !== void 0) {
333
+ data.declineReward = body.declineReward;
334
+ }
335
+ if (body.maxAutomaticTokenAssociations !== void 0) {
336
+ data.maxAutomaticTokenAssociations = body.maxAutomaticTokenAssociations;
337
+ }
338
+ if (body.fileID) {
339
+ data.initcodeSource = "fileID";
340
+ data.initcode = new FileId(
341
+ body.fileID.shardNum ?? 0,
342
+ body.fileID.realmNum ?? 0,
343
+ body.fileID.fileNum ?? 0
344
+ ).toString();
345
+ } else if (body.initcode && body.initcode.length > 0) {
346
+ data.initcodeSource = "bytes";
347
+ data.initcode = Buffer.from(body.initcode).toString("hex");
348
+ }
349
+ return data;
350
+ }
351
+ static parseContractUpdate(body) {
352
+ if (!body) return void 0;
353
+ const data = {};
354
+ if (body.contractID) {
355
+ data.contractIdToUpdate = new ContractId(
356
+ body.contractID.shardNum ?? 0,
357
+ body.contractID.realmNum ?? 0,
358
+ body.contractID.contractNum ?? 0
359
+ ).toString();
360
+ }
361
+ if (body.adminKey) {
362
+ data.adminKey = parseKey(body.adminKey);
363
+ }
364
+ if (body.expirationTime?.seconds) {
365
+ data.expirationTime = `${Long.fromValue(
366
+ body.expirationTime.seconds
367
+ ).toString()}.${body.expirationTime.nanos}`;
368
+ }
369
+ if (body.autoRenewPeriod?.seconds) {
370
+ data.autoRenewPeriod = Long.fromValue(
371
+ body.autoRenewPeriod.seconds
372
+ ).toString();
373
+ }
374
+ if (body.memo) {
375
+ const memoUnion = body.memo;
376
+ if (memoUnion && typeof memoUnion === "object" && Object.prototype.hasOwnProperty.call(memoUnion, "value")) {
377
+ const value = memoUnion.value;
378
+ if (value === null || value === void 0) {
379
+ data.memo = void 0;
380
+ } else {
381
+ data.memo = String(value);
382
+ }
383
+ } else if (typeof memoUnion === "string") {
384
+ data.memo = memoUnion;
385
+ } else {
386
+ data.memo = void 0;
387
+ }
388
+ } else {
389
+ data.memo = void 0;
390
+ }
391
+ if (body.stakedAccountId) {
392
+ data.stakedAccountId = new AccountId(
393
+ body.stakedAccountId.shardNum ?? 0,
394
+ body.stakedAccountId.realmNum ?? 0,
395
+ body.stakedAccountId.accountNum ?? 0
396
+ ).toString();
397
+ data.stakedNodeId = void 0;
398
+ } else if (body.stakedNodeId !== null && body.stakedNodeId !== void 0 && Long.fromValue(body.stakedNodeId).notEquals(-1)) {
399
+ data.stakedNodeId = Long.fromValue(body.stakedNodeId).toString();
400
+ data.stakedAccountId = void 0;
401
+ } else {
402
+ data.stakedNodeId = void 0;
403
+ data.stakedAccountId = void 0;
404
+ }
405
+ if (body.declineReward?.value !== void 0) {
406
+ data.declineReward = body.declineReward.value;
407
+ }
408
+ if (body.maxAutomaticTokenAssociations?.value !== void 0) {
409
+ data.maxAutomaticTokenAssociations = body.maxAutomaticTokenAssociations.value;
410
+ }
411
+ if (body.autoRenewAccountId) {
412
+ data.autoRenewAccountId = new AccountId(
413
+ body.autoRenewAccountId.shardNum ?? 0,
414
+ body.autoRenewAccountId.realmNum ?? 0,
415
+ body.autoRenewAccountId.accountNum ?? 0
416
+ ).toString();
417
+ }
418
+ return data;
419
+ }
420
+ static parseContractDelete(body) {
421
+ if (!body) return void 0;
422
+ const data = {};
423
+ if (body.contractID) {
424
+ data.contractIdToDelete = new ContractId(
425
+ body.contractID.shardNum ?? 0,
426
+ body.contractID.realmNum ?? 0,
427
+ body.contractID.contractNum ?? 0
428
+ ).toString();
429
+ }
430
+ if (body.transferAccountID) {
431
+ data.transferAccountId = new AccountId(
432
+ body.transferAccountID.shardNum ?? 0,
433
+ body.transferAccountID.realmNum ?? 0,
434
+ body.transferAccountID.accountNum ?? 0
435
+ ).toString();
436
+ } else if (body.transferContractID) {
437
+ data.transferContractId = new ContractId(
438
+ body.transferContractID.shardNum ?? 0,
439
+ body.transferContractID.realmNum ?? 0,
440
+ body.transferContractID.contractNum ?? 0
441
+ ).toString();
442
+ }
443
+ return data;
444
+ }
445
+ /**
446
+ * Parse SCS (Smart Contract Service) transaction from Transaction object
447
+ * This is the unified entry point that delegates to the comprehensive parsing logic
448
+ */
449
+ static parseFromTransactionObject(transaction) {
450
+ return this.parseSCSTransaction(transaction);
218
451
  }
219
- const queryString = query.toString();
220
- return queryString.length > 0 ? `?${queryString}` : "";
221
452
  }
222
453
  export {
223
- DEFAULT_BASE_URL,
224
- DEFAULT_HISTORY_TOP_UP_HBAR,
225
- DEFAULT_PROGRESS_INTERVAL_MS,
226
- DEFAULT_PROGRESS_TIMEOUT_MS,
227
- DEFAULT_USER_AGENT,
228
- JSON_CONTENT_TYPE,
229
- MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS,
230
- buildSearchQuery,
231
- createAbortError,
232
- isBrowserRuntime,
233
- isJsonObject,
234
- normaliseBaseUrl,
235
- normaliseHeaderName,
236
- normalizeHexPrivateKey,
237
- serialiseAgentRegistrationRequest,
238
- serialiseAuthConfig,
239
- toJsonObject,
240
- toJsonValue
454
+ SCSParser
241
455
  };
242
456
  //# sourceMappingURL=standards-sdk.es171.js.map