@hashgraphonline/standards-sdk 0.0.64 → 0.0.66

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 (294) hide show
  1. package/dist/es/fees/fee-config-builder.d.ts.map +1 -0
  2. package/dist/es/fees/index.d.ts +3 -0
  3. package/dist/es/fees/index.d.ts.map +1 -0
  4. package/dist/es/fees/types.d.ts +24 -0
  5. package/dist/es/fees/types.d.ts.map +1 -0
  6. package/dist/es/hcs-10/base-client.d.ts +1 -1
  7. package/dist/es/hcs-10/base-client.d.ts.map +1 -1
  8. package/dist/es/hcs-10/browser.d.ts +20 -35
  9. package/dist/es/hcs-10/browser.d.ts.map +1 -1
  10. package/dist/es/hcs-10/index.d.ts +4 -6
  11. package/dist/es/hcs-10/index.d.ts.map +1 -1
  12. package/dist/es/hcs-10/registrations.d.ts.map +1 -1
  13. package/dist/es/hcs-10/sdk.d.ts +16 -8
  14. package/dist/es/hcs-10/sdk.d.ts.map +1 -1
  15. package/dist/es/hcs-10/types.d.ts +2 -62
  16. package/dist/es/hcs-10/types.d.ts.map +1 -1
  17. package/dist/es/hcs-11/agent-builder.d.ts +53 -0
  18. package/dist/es/hcs-11/agent-builder.d.ts.map +1 -0
  19. package/dist/es/hcs-11/client.d.ts +82 -0
  20. package/dist/es/hcs-11/client.d.ts.map +1 -0
  21. package/dist/es/hcs-11/index.d.ts +4 -190
  22. package/dist/es/hcs-11/index.d.ts.map +1 -1
  23. package/dist/es/hcs-11/person-builder.d.ts +29 -0
  24. package/dist/es/hcs-11/person-builder.d.ts.map +1 -0
  25. package/dist/es/hcs-11/types.d.ts +165 -0
  26. package/dist/es/hcs-11/types.d.ts.map +1 -0
  27. package/dist/es/index.d.ts +1 -0
  28. package/dist/es/index.d.ts.map +1 -1
  29. package/dist/es/services/mirror-node.d.ts +2 -1
  30. package/dist/es/services/mirror-node.d.ts.map +1 -1
  31. package/dist/es/services/types.d.ts +0 -1
  32. package/dist/es/services/types.d.ts.map +1 -1
  33. package/dist/es/standards-sdk.es.js +9 -7
  34. package/dist/es/standards-sdk.es.js.map +1 -1
  35. package/dist/es/standards-sdk.es10.js +114 -1046
  36. package/dist/es/standards-sdk.es10.js.map +1 -1
  37. package/dist/es/standards-sdk.es100.js +3 -792
  38. package/dist/es/standards-sdk.es100.js.map +1 -1
  39. package/dist/es/standards-sdk.es101.js +2282 -174
  40. package/dist/es/standards-sdk.es101.js.map +1 -1
  41. package/dist/es/standards-sdk.es102.js +14 -141
  42. package/dist/es/standards-sdk.es102.js.map +1 -1
  43. package/dist/es/standards-sdk.es103.js +5 -3
  44. package/dist/es/standards-sdk.es103.js.map +1 -1
  45. package/dist/es/standards-sdk.es104.js +39 -2
  46. package/dist/es/standards-sdk.es104.js.map +1 -1
  47. package/dist/es/standards-sdk.es105.js +40 -2
  48. package/dist/es/standards-sdk.es105.js.map +1 -1
  49. package/dist/es/standards-sdk.es106.js +37 -34
  50. package/dist/es/standards-sdk.es106.js.map +1 -1
  51. package/dist/es/standards-sdk.es107.js +74 -29
  52. package/dist/es/standards-sdk.es107.js.map +1 -1
  53. package/dist/es/standards-sdk.es108.js +3 -9
  54. package/dist/es/standards-sdk.es108.js.map +1 -1
  55. package/dist/es/standards-sdk.es109.js +2 -34
  56. package/dist/es/standards-sdk.es109.js.map +1 -1
  57. package/dist/es/standards-sdk.es11.js +80 -71
  58. package/dist/es/standards-sdk.es11.js.map +1 -1
  59. package/dist/es/standards-sdk.es110.js +2 -21
  60. package/dist/es/standards-sdk.es110.js.map +1 -1
  61. package/dist/es/standards-sdk.es111.js +33 -26
  62. package/dist/es/standards-sdk.es111.js.map +1 -1
  63. package/dist/es/standards-sdk.es112.js +32 -25
  64. package/dist/es/standards-sdk.es112.js.map +1 -1
  65. package/dist/es/standards-sdk.es113.js +9 -38
  66. package/dist/es/standards-sdk.es113.js.map +1 -1
  67. package/dist/es/standards-sdk.es114.js +37 -0
  68. package/dist/es/standards-sdk.es114.js.map +1 -0
  69. package/dist/es/standards-sdk.es12.js +650 -7
  70. package/dist/es/standards-sdk.es12.js.map +1 -1
  71. package/dist/es/standards-sdk.es13.js +10 -664
  72. package/dist/es/standards-sdk.es13.js.map +1 -1
  73. package/dist/es/standards-sdk.es14.js +3 -0
  74. package/dist/es/standards-sdk.es14.js.map +1 -1
  75. package/dist/es/standards-sdk.es17.js +2 -2
  76. package/dist/es/standards-sdk.es18.js +3 -3
  77. package/dist/es/standards-sdk.es18.js.map +1 -1
  78. package/dist/es/standards-sdk.es19.js +82 -1754
  79. package/dist/es/standards-sdk.es19.js.map +1 -1
  80. package/dist/es/standards-sdk.es20.js +1767 -3
  81. package/dist/es/standards-sdk.es20.js.map +1 -1
  82. package/dist/es/standards-sdk.es21.js +36 -4167
  83. package/dist/es/standards-sdk.es21.js.map +1 -1
  84. package/dist/es/standards-sdk.es22.js +21 -6600
  85. package/dist/es/standards-sdk.es22.js.map +1 -1
  86. package/dist/es/standards-sdk.es23.js +6627 -36
  87. package/dist/es/standards-sdk.es23.js.map +1 -1
  88. package/dist/es/standards-sdk.es24.js +3 -48
  89. package/dist/es/standards-sdk.es24.js.map +1 -1
  90. package/dist/es/standards-sdk.es26.js +10 -10
  91. package/dist/es/standards-sdk.es27.js +2 -2
  92. package/dist/es/standards-sdk.es28.js +4147 -81
  93. package/dist/es/standards-sdk.es28.js.map +1 -1
  94. package/dist/es/standards-sdk.es29.js +419 -2
  95. package/dist/es/standards-sdk.es29.js.map +1 -1
  96. package/dist/es/standards-sdk.es30.js +2 -16
  97. package/dist/es/standards-sdk.es30.js.map +1 -1
  98. package/dist/es/standards-sdk.es31.js +106 -395
  99. package/dist/es/standards-sdk.es31.js.map +1 -1
  100. package/dist/es/standards-sdk.es32.js +2 -2282
  101. package/dist/es/standards-sdk.es32.js.map +1 -1
  102. package/dist/es/standards-sdk.es33.js +68 -148
  103. package/dist/es/standards-sdk.es33.js.map +1 -1
  104. package/dist/es/standards-sdk.es34.js +23 -3
  105. package/dist/es/standards-sdk.es34.js.map +1 -1
  106. package/dist/es/standards-sdk.es35.js +131 -402
  107. package/dist/es/standards-sdk.es35.js.map +1 -1
  108. package/dist/es/standards-sdk.es36.js +91 -2
  109. package/dist/es/standards-sdk.es36.js.map +1 -1
  110. package/dist/es/standards-sdk.es37.js +190 -115
  111. package/dist/es/standards-sdk.es37.js.map +1 -1
  112. package/dist/es/standards-sdk.es38.js +437 -3
  113. package/dist/es/standards-sdk.es38.js.map +1 -1
  114. package/dist/es/standards-sdk.es39.js +19 -358
  115. package/dist/es/standards-sdk.es39.js.map +1 -1
  116. package/dist/es/standards-sdk.es40.js +138 -5
  117. package/dist/es/standards-sdk.es40.js.map +1 -1
  118. package/dist/es/standards-sdk.es41.js +13 -174
  119. package/dist/es/standards-sdk.es41.js.map +1 -1
  120. package/dist/es/standards-sdk.es42.js +23 -75
  121. package/dist/es/standards-sdk.es42.js.map +1 -1
  122. package/dist/es/standards-sdk.es43.js +26 -111
  123. package/dist/es/standards-sdk.es43.js.map +1 -1
  124. package/dist/es/standards-sdk.es44.js +16 -47
  125. package/dist/es/standards-sdk.es44.js.map +1 -1
  126. package/dist/es/standards-sdk.es45.js +43 -9
  127. package/dist/es/standards-sdk.es45.js.map +1 -1
  128. package/dist/es/standards-sdk.es46.js +13 -92
  129. package/dist/es/standards-sdk.es46.js.map +1 -1
  130. package/dist/es/standards-sdk.es47.js +60 -3
  131. package/dist/es/standards-sdk.es47.js.map +1 -1
  132. package/dist/es/standards-sdk.es48.js +1289 -2
  133. package/dist/es/standards-sdk.es48.js.map +1 -1
  134. package/dist/es/standards-sdk.es49.js +27 -108
  135. package/dist/es/standards-sdk.es49.js.map +1 -1
  136. package/dist/es/standards-sdk.es5.js +393 -891
  137. package/dist/es/standards-sdk.es5.js.map +1 -1
  138. package/dist/es/standards-sdk.es50.js +5 -73
  139. package/dist/es/standards-sdk.es50.js.map +1 -1
  140. package/dist/es/standards-sdk.es51.js +158 -5
  141. package/dist/es/standards-sdk.es51.js.map +1 -1
  142. package/dist/es/standards-sdk.es52.js +792 -4
  143. package/dist/es/standards-sdk.es52.js.map +1 -1
  144. package/dist/es/standards-sdk.es53.js +162 -209
  145. package/dist/es/standards-sdk.es53.js.map +1 -1
  146. package/dist/es/standards-sdk.es54.js +137 -52
  147. package/dist/es/standards-sdk.es54.js.map +1 -1
  148. package/dist/es/standards-sdk.es55.js +4 -69
  149. package/dist/es/standards-sdk.es55.js.map +1 -1
  150. package/dist/es/standards-sdk.es56.js +357 -25
  151. package/dist/es/standards-sdk.es56.js.map +1 -1
  152. package/dist/es/standards-sdk.es57.js +5 -62
  153. package/dist/es/standards-sdk.es57.js.map +1 -1
  154. package/dist/es/standards-sdk.es58.js +173 -44
  155. package/dist/es/standards-sdk.es58.js.map +1 -1
  156. package/dist/es/standards-sdk.es59.js +80 -9
  157. package/dist/es/standards-sdk.es59.js.map +1 -1
  158. package/dist/es/standards-sdk.es60.js +106 -57
  159. package/dist/es/standards-sdk.es60.js.map +1 -1
  160. package/dist/es/standards-sdk.es61.js +52 -6
  161. package/dist/es/standards-sdk.es61.js.map +1 -1
  162. package/dist/es/standards-sdk.es62.js +9 -14
  163. package/dist/es/standards-sdk.es62.js.map +1 -1
  164. package/dist/es/standards-sdk.es63.js +97 -7
  165. package/dist/es/standards-sdk.es63.js.map +1 -1
  166. package/dist/es/standards-sdk.es64.js +4 -45
  167. package/dist/es/standards-sdk.es64.js.map +1 -1
  168. package/dist/es/standards-sdk.es65.js +2 -2
  169. package/dist/es/standards-sdk.es65.js.map +1 -1
  170. package/dist/es/standards-sdk.es66.js +105 -128
  171. package/dist/es/standards-sdk.es66.js.map +1 -1
  172. package/dist/es/standards-sdk.es67.js +70 -168
  173. package/dist/es/standards-sdk.es67.js.map +1 -1
  174. package/dist/es/standards-sdk.es68.js +6 -2
  175. package/dist/es/standards-sdk.es68.js.map +1 -1
  176. package/dist/es/standards-sdk.es69.js +5 -13
  177. package/dist/es/standards-sdk.es69.js.map +1 -1
  178. package/dist/es/standards-sdk.es7.js +959 -94
  179. package/dist/es/standards-sdk.es7.js.map +1 -1
  180. package/dist/es/standards-sdk.es70.js +221 -13
  181. package/dist/es/standards-sdk.es70.js.map +1 -1
  182. package/dist/es/standards-sdk.es71.js +56 -30
  183. package/dist/es/standards-sdk.es71.js.map +1 -1
  184. package/dist/es/standards-sdk.es72.js +69 -15
  185. package/dist/es/standards-sdk.es72.js.map +1 -1
  186. package/dist/es/standards-sdk.es73.js +20 -3
  187. package/dist/es/standards-sdk.es73.js.map +1 -1
  188. package/dist/es/standards-sdk.es74.js +26 -3
  189. package/dist/es/standards-sdk.es74.js.map +1 -1
  190. package/dist/es/standards-sdk.es75.js +24 -14
  191. package/dist/es/standards-sdk.es75.js.map +1 -1
  192. package/dist/es/standards-sdk.es76.js +37 -4
  193. package/dist/es/standards-sdk.es76.js.map +1 -1
  194. package/dist/es/standards-sdk.es77.js +3 -39
  195. package/dist/es/standards-sdk.es77.js.map +1 -1
  196. package/dist/es/standards-sdk.es78.js +158 -34
  197. package/dist/es/standards-sdk.es78.js.map +1 -1
  198. package/dist/es/standards-sdk.es79.js +30 -35
  199. package/dist/es/standards-sdk.es79.js.map +1 -1
  200. package/dist/es/standards-sdk.es8.js +1049 -393
  201. package/dist/es/standards-sdk.es8.js.map +1 -1
  202. package/dist/es/standards-sdk.es80.js +57 -72
  203. package/dist/es/standards-sdk.es80.js.map +1 -1
  204. package/dist/es/standards-sdk.es81.js +46 -191
  205. package/dist/es/standards-sdk.es81.js.map +1 -1
  206. package/dist/es/standards-sdk.es82.js +8 -436
  207. package/dist/es/standards-sdk.es82.js.map +1 -1
  208. package/dist/es/standards-sdk.es83.js +60 -20
  209. package/dist/es/standards-sdk.es83.js.map +1 -1
  210. package/dist/es/standards-sdk.es84.js +6 -139
  211. package/dist/es/standards-sdk.es84.js.map +1 -1
  212. package/dist/es/standards-sdk.es85.js +14 -17
  213. package/dist/es/standards-sdk.es85.js.map +1 -1
  214. package/dist/es/standards-sdk.es86.js +7 -29
  215. package/dist/es/standards-sdk.es86.js.map +1 -1
  216. package/dist/es/standards-sdk.es87.js +44 -28
  217. package/dist/es/standards-sdk.es87.js.map +1 -1
  218. package/dist/es/standards-sdk.es88.js +2 -21
  219. package/dist/es/standards-sdk.es88.js.map +1 -1
  220. package/dist/es/standards-sdk.es89.js +135 -43
  221. package/dist/es/standards-sdk.es89.js.map +1 -1
  222. package/dist/es/standards-sdk.es9.js +1 -1
  223. package/dist/es/standards-sdk.es9.js.map +1 -1
  224. package/dist/es/standards-sdk.es90.js +168 -14
  225. package/dist/es/standards-sdk.es90.js.map +1 -1
  226. package/dist/es/standards-sdk.es91.js +95 -55
  227. package/dist/es/standards-sdk.es91.js.map +1 -1
  228. package/dist/es/standards-sdk.es92.js +2 -1289
  229. package/dist/es/standards-sdk.es92.js.map +1 -1
  230. package/dist/es/standards-sdk.es93.js +15 -147
  231. package/dist/es/standards-sdk.es93.js.map +1 -1
  232. package/dist/es/standards-sdk.es94.js +403 -85
  233. package/dist/es/standards-sdk.es94.js.map +1 -1
  234. package/dist/es/standards-sdk.es95.js +13 -84
  235. package/dist/es/standards-sdk.es95.js.map +1 -1
  236. package/dist/es/standards-sdk.es96.js +13 -32
  237. package/dist/es/standards-sdk.es96.js.map +1 -1
  238. package/dist/es/standards-sdk.es97.js +31 -5
  239. package/dist/es/standards-sdk.es97.js.map +1 -1
  240. package/dist/es/standards-sdk.es98.js +13 -157
  241. package/dist/es/standards-sdk.es98.js.map +1 -1
  242. package/dist/es/standards-sdk.es99.js +3 -22
  243. package/dist/es/standards-sdk.es99.js.map +1 -1
  244. package/dist/es/utils/logger.d.ts +1 -0
  245. package/dist/es/utils/logger.d.ts.map +1 -1
  246. package/dist/es/utils/types.d.ts +2 -0
  247. package/dist/es/utils/types.d.ts.map +1 -0
  248. package/dist/umd/fees/fee-config-builder.d.ts.map +1 -0
  249. package/dist/umd/fees/index.d.ts +3 -0
  250. package/dist/umd/fees/index.d.ts.map +1 -0
  251. package/dist/umd/fees/types.d.ts +24 -0
  252. package/dist/umd/fees/types.d.ts.map +1 -0
  253. package/dist/umd/hcs-10/base-client.d.ts +1 -1
  254. package/dist/umd/hcs-10/base-client.d.ts.map +1 -1
  255. package/dist/umd/hcs-10/browser.d.ts +20 -35
  256. package/dist/umd/hcs-10/browser.d.ts.map +1 -1
  257. package/dist/umd/hcs-10/index.d.ts +4 -6
  258. package/dist/umd/hcs-10/index.d.ts.map +1 -1
  259. package/dist/umd/hcs-10/registrations.d.ts.map +1 -1
  260. package/dist/umd/hcs-10/sdk.d.ts +16 -8
  261. package/dist/umd/hcs-10/sdk.d.ts.map +1 -1
  262. package/dist/umd/hcs-10/types.d.ts +2 -62
  263. package/dist/umd/hcs-10/types.d.ts.map +1 -1
  264. package/dist/umd/hcs-11/agent-builder.d.ts +53 -0
  265. package/dist/umd/hcs-11/agent-builder.d.ts.map +1 -0
  266. package/dist/umd/hcs-11/client.d.ts +82 -0
  267. package/dist/umd/hcs-11/client.d.ts.map +1 -0
  268. package/dist/umd/hcs-11/index.d.ts +4 -190
  269. package/dist/umd/hcs-11/index.d.ts.map +1 -1
  270. package/dist/umd/hcs-11/person-builder.d.ts +29 -0
  271. package/dist/umd/hcs-11/person-builder.d.ts.map +1 -0
  272. package/dist/umd/hcs-11/types.d.ts +165 -0
  273. package/dist/umd/hcs-11/types.d.ts.map +1 -0
  274. package/dist/umd/index.d.ts +1 -0
  275. package/dist/umd/index.d.ts.map +1 -1
  276. package/dist/umd/services/mirror-node.d.ts +2 -1
  277. package/dist/umd/services/mirror-node.d.ts.map +1 -1
  278. package/dist/umd/services/types.d.ts +0 -1
  279. package/dist/umd/services/types.d.ts.map +1 -1
  280. package/dist/umd/standards-sdk.umd.js +7 -7
  281. package/dist/umd/standards-sdk.umd.js.map +1 -1
  282. package/dist/umd/utils/logger.d.ts +1 -0
  283. package/dist/umd/utils/logger.d.ts.map +1 -1
  284. package/dist/umd/utils/types.d.ts +2 -0
  285. package/dist/umd/utils/types.d.ts.map +1 -0
  286. package/package.json +3 -4
  287. package/dist/es/hcs-10/agent-builder.d.ts +0 -45
  288. package/dist/es/hcs-10/agent-builder.d.ts.map +0 -1
  289. package/dist/es/hcs-10/fee-config-builder.d.ts.map +0 -1
  290. package/dist/umd/hcs-10/agent-builder.d.ts +0 -45
  291. package/dist/umd/hcs-10/agent-builder.d.ts.map +0 -1
  292. package/dist/umd/hcs-10/fee-config-builder.d.ts.map +0 -1
  293. /package/dist/es/{hcs-10 → fees}/fee-config-builder.d.ts +0 -0
  294. /package/dist/umd/{hcs-10 → fees}/fee-config-builder.d.ts +0 -0
@@ -1,1770 +1,98 @@
1
- var buffer = {};
2
- var base64Js = {};
3
- base64Js.byteLength = byteLength;
4
- base64Js.toByteArray = toByteArray;
5
- base64Js.fromByteArray = fromByteArray;
6
- var lookup = [];
7
- var revLookup = [];
8
- var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
9
- var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
10
- for (var i = 0, len = code.length; i < len; ++i) {
11
- lookup[i] = code[i];
12
- revLookup[code.charCodeAt(i)] = i;
13
- }
14
- revLookup["-".charCodeAt(0)] = 62;
15
- revLookup["_".charCodeAt(0)] = 63;
16
- function getLens(b64) {
17
- var len = b64.length;
18
- if (len % 4 > 0) {
19
- throw new Error("Invalid string. Length must be a multiple of 4");
20
- }
21
- var validLen = b64.indexOf("=");
22
- if (validLen === -1) validLen = len;
23
- var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
24
- return [validLen, placeHoldersLen];
25
- }
26
- function byteLength(b64) {
27
- var lens = getLens(b64);
28
- var validLen = lens[0];
29
- var placeHoldersLen = lens[1];
30
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
31
- }
32
- function _byteLength(b64, validLen, placeHoldersLen) {
33
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
34
- }
35
- function toByteArray(b64) {
36
- var tmp;
37
- var lens = getLens(b64);
38
- var validLen = lens[0];
39
- var placeHoldersLen = lens[1];
40
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
41
- var curByte = 0;
42
- var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
43
- var i;
44
- for (i = 0; i < len; i += 4) {
45
- tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
46
- arr[curByte++] = tmp >> 16 & 255;
47
- arr[curByte++] = tmp >> 8 & 255;
48
- arr[curByte++] = tmp & 255;
49
- }
50
- if (placeHoldersLen === 2) {
51
- tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
52
- arr[curByte++] = tmp & 255;
53
- }
54
- if (placeHoldersLen === 1) {
55
- tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
56
- arr[curByte++] = tmp >> 8 & 255;
57
- arr[curByte++] = tmp & 255;
58
- }
59
- return arr;
60
- }
61
- function tripletToBase64(num) {
62
- return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
63
- }
64
- function encodeChunk(uint8, start, end) {
65
- var tmp;
66
- var output = [];
67
- for (var i = start; i < end; i += 3) {
68
- tmp = (uint8[i] << 16 & 16711680) + (uint8[i + 1] << 8 & 65280) + (uint8[i + 2] & 255);
69
- output.push(tripletToBase64(tmp));
70
- }
71
- return output.join("");
72
- }
73
- function fromByteArray(uint8) {
74
- var tmp;
75
- var len = uint8.length;
76
- var extraBytes = len % 3;
77
- var parts = [];
78
- var maxChunkLength = 16383;
79
- for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
80
- parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
81
- }
82
- if (extraBytes === 1) {
83
- tmp = uint8[len - 1];
84
- parts.push(
85
- lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
86
- );
87
- } else if (extraBytes === 2) {
88
- tmp = (uint8[len - 2] << 8) + uint8[len - 1];
89
- parts.push(
90
- lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
91
- );
92
- }
93
- return parts.join("");
94
- }
95
- var ieee754 = {};
96
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
97
- ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
98
- var e, m;
99
- var eLen = nBytes * 8 - mLen - 1;
100
- var eMax = (1 << eLen) - 1;
101
- var eBias = eMax >> 1;
102
- var nBits = -7;
103
- var i = isLE ? nBytes - 1 : 0;
104
- var d = isLE ? -1 : 1;
105
- var s = buffer2[offset + i];
106
- i += d;
107
- e = s & (1 << -nBits) - 1;
108
- s >>= -nBits;
109
- nBits += eLen;
110
- for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
111
- }
112
- m = e & (1 << -nBits) - 1;
113
- e >>= -nBits;
114
- nBits += mLen;
115
- for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) {
116
- }
117
- if (e === 0) {
118
- e = 1 - eBias;
119
- } else if (e === eMax) {
120
- return m ? NaN : (s ? -1 : 1) * Infinity;
121
- } else {
122
- m = m + Math.pow(2, mLen);
123
- e = e - eBias;
124
- }
125
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
126
- };
127
- ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
128
- var e, m, c;
129
- var eLen = nBytes * 8 - mLen - 1;
130
- var eMax = (1 << eLen) - 1;
131
- var eBias = eMax >> 1;
132
- var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
133
- var i = isLE ? 0 : nBytes - 1;
134
- var d = isLE ? 1 : -1;
135
- var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
136
- value = Math.abs(value);
137
- if (isNaN(value) || value === Infinity) {
138
- m = isNaN(value) ? 1 : 0;
139
- e = eMax;
140
- } else {
141
- e = Math.floor(Math.log(value) / Math.LN2);
142
- if (value * (c = Math.pow(2, -e)) < 1) {
143
- e--;
144
- c *= 2;
145
- }
146
- if (e + eBias >= 1) {
147
- value += rt / c;
148
- } else {
149
- value += rt * Math.pow(2, 1 - eBias);
150
- }
151
- if (value * c >= 2) {
152
- e++;
153
- c /= 2;
154
- }
155
- if (e + eBias >= eMax) {
156
- m = 0;
157
- e = eMax;
158
- } else if (e + eBias >= 1) {
159
- m = (value * c - 1) * Math.pow(2, mLen);
160
- e = e + eBias;
161
- } else {
162
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
163
- e = 0;
164
- }
165
- }
166
- for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
167
- }
168
- e = e << mLen | m;
169
- eLen += mLen;
170
- for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
171
- }
172
- buffer2[offset + i - d] |= s * 128;
173
- };
174
- /*!
175
- * The buffer module from node.js, for the browser.
176
- *
177
- * @author Feross Aboukhadijeh <https://feross.org>
178
- * @license MIT
179
- */
180
- (function(exports) {
181
- const base64 = base64Js;
182
- const ieee754$1 = ieee754;
183
- const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
184
- exports.Buffer = Buffer2;
185
- exports.SlowBuffer = SlowBuffer;
186
- exports.INSPECT_MAX_BYTES = 50;
187
- const K_MAX_LENGTH = 2147483647;
188
- exports.kMaxLength = K_MAX_LENGTH;
189
- const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
190
- Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
191
- if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
192
- console.error(
193
- "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
194
- );
195
- }
196
- function typedArraySupport() {
197
- try {
198
- const arr = new GlobalUint8Array(1);
199
- const proto = { foo: function() {
200
- return 42;
201
- } };
202
- Object.setPrototypeOf(proto, GlobalUint8Array.prototype);
203
- Object.setPrototypeOf(arr, proto);
204
- return arr.foo() === 42;
205
- } catch (e) {
206
- return false;
207
- }
208
- }
209
- Object.defineProperty(Buffer2.prototype, "parent", {
210
- enumerable: true,
211
- get: function() {
212
- if (!Buffer2.isBuffer(this)) return void 0;
213
- return this.buffer;
214
- }
215
- });
216
- Object.defineProperty(Buffer2.prototype, "offset", {
217
- enumerable: true,
218
- get: function() {
219
- if (!Buffer2.isBuffer(this)) return void 0;
220
- return this.byteOffset;
221
- }
222
- });
223
- function createBuffer(length) {
224
- if (length > K_MAX_LENGTH) {
225
- throw new RangeError('The value "' + length + '" is invalid for option "size"');
226
- }
227
- const buf = new GlobalUint8Array(length);
228
- Object.setPrototypeOf(buf, Buffer2.prototype);
229
- return buf;
230
- }
231
- function Buffer2(arg, encodingOrOffset, length) {
232
- if (typeof arg === "number") {
233
- if (typeof encodingOrOffset === "string") {
234
- throw new TypeError(
235
- 'The "string" argument must be of type string. Received type number'
236
- );
237
- }
238
- return allocUnsafe(arg);
239
- }
240
- return from(arg, encodingOrOffset, length);
241
- }
242
- Buffer2.poolSize = 8192;
243
- function from(value, encodingOrOffset, length) {
244
- if (typeof value === "string") {
245
- return fromString(value, encodingOrOffset);
246
- }
247
- if (GlobalArrayBuffer.isView(value)) {
248
- return fromArrayView(value);
249
- }
250
- if (value == null) {
251
- throw new TypeError(
252
- "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
253
- );
254
- }
255
- if (isInstance(value, GlobalArrayBuffer) || value && isInstance(value.buffer, GlobalArrayBuffer)) {
256
- return fromArrayBuffer(value, encodingOrOffset, length);
257
- }
258
- if (typeof GlobalSharedArrayBuffer !== "undefined" && (isInstance(value, GlobalSharedArrayBuffer) || value && isInstance(value.buffer, GlobalSharedArrayBuffer))) {
259
- return fromArrayBuffer(value, encodingOrOffset, length);
260
- }
261
- if (typeof value === "number") {
262
- throw new TypeError(
263
- 'The "value" argument must not be of type number. Received type number'
264
- );
265
- }
266
- const valueOf = value.valueOf && value.valueOf();
267
- if (valueOf != null && valueOf !== value) {
268
- return Buffer2.from(valueOf, encodingOrOffset, length);
269
- }
270
- const b = fromObject(value);
271
- if (b) return b;
272
- if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
273
- return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
274
- }
275
- throw new TypeError(
276
- "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
277
- );
278
- }
279
- Buffer2.from = function(value, encodingOrOffset, length) {
280
- return from(value, encodingOrOffset, length);
281
- };
282
- Object.setPrototypeOf(Buffer2.prototype, GlobalUint8Array.prototype);
283
- Object.setPrototypeOf(Buffer2, GlobalUint8Array);
284
- function assertSize(size) {
285
- if (typeof size !== "number") {
286
- throw new TypeError('"size" argument must be of type number');
287
- } else if (size < 0) {
288
- throw new RangeError('The value "' + size + '" is invalid for option "size"');
289
- }
290
- }
291
- function alloc(size, fill, encoding) {
292
- assertSize(size);
293
- if (size <= 0) {
294
- return createBuffer(size);
295
- }
296
- if (fill !== void 0) {
297
- return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
298
- }
299
- return createBuffer(size);
300
- }
301
- Buffer2.alloc = function(size, fill, encoding) {
302
- return alloc(size, fill, encoding);
303
- };
304
- function allocUnsafe(size) {
305
- assertSize(size);
306
- return createBuffer(size < 0 ? 0 : checked(size) | 0);
307
- }
308
- Buffer2.allocUnsafe = function(size) {
309
- return allocUnsafe(size);
310
- };
311
- Buffer2.allocUnsafeSlow = function(size) {
312
- return allocUnsafe(size);
313
- };
314
- function fromString(string, encoding) {
315
- if (typeof encoding !== "string" || encoding === "") {
316
- encoding = "utf8";
317
- }
318
- if (!Buffer2.isEncoding(encoding)) {
319
- throw new TypeError("Unknown encoding: " + encoding);
320
- }
321
- const length = byteLength2(string, encoding) | 0;
322
- let buf = createBuffer(length);
323
- const actual = buf.write(string, encoding);
324
- if (actual !== length) {
325
- buf = buf.slice(0, actual);
326
- }
327
- return buf;
328
- }
329
- function fromArrayLike(array) {
330
- const length = array.length < 0 ? 0 : checked(array.length) | 0;
331
- const buf = createBuffer(length);
332
- for (let i = 0; i < length; i += 1) {
333
- buf[i] = array[i] & 255;
334
- }
335
- return buf;
336
- }
337
- function fromArrayView(arrayView) {
338
- if (isInstance(arrayView, GlobalUint8Array)) {
339
- const copy = new GlobalUint8Array(arrayView);
340
- return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
341
- }
342
- return fromArrayLike(arrayView);
343
- }
344
- function fromArrayBuffer(array, byteOffset, length) {
345
- if (byteOffset < 0 || array.byteLength < byteOffset) {
346
- throw new RangeError('"offset" is outside of buffer bounds');
347
- }
348
- if (array.byteLength < byteOffset + (length || 0)) {
349
- throw new RangeError('"length" is outside of buffer bounds');
350
- }
351
- let buf;
352
- if (byteOffset === void 0 && length === void 0) {
353
- buf = new GlobalUint8Array(array);
354
- } else if (length === void 0) {
355
- buf = new GlobalUint8Array(array, byteOffset);
356
- } else {
357
- buf = new GlobalUint8Array(array, byteOffset, length);
358
- }
359
- Object.setPrototypeOf(buf, Buffer2.prototype);
360
- return buf;
361
- }
362
- function fromObject(obj) {
363
- if (Buffer2.isBuffer(obj)) {
364
- const len = checked(obj.length) | 0;
365
- const buf = createBuffer(len);
366
- if (buf.length === 0) {
367
- return buf;
368
- }
369
- obj.copy(buf, 0, 0, len);
370
- return buf;
371
- }
372
- if (obj.length !== void 0) {
373
- if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
374
- return createBuffer(0);
375
- }
376
- return fromArrayLike(obj);
377
- }
378
- if (obj.type === "Buffer" && Array.isArray(obj.data)) {
379
- return fromArrayLike(obj.data);
380
- }
381
- }
382
- function checked(length) {
383
- if (length >= K_MAX_LENGTH) {
384
- throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
385
- }
386
- return length | 0;
387
- }
388
- function SlowBuffer(length) {
389
- if (+length != length) {
390
- length = 0;
391
- }
392
- return Buffer2.alloc(+length);
393
- }
394
- Buffer2.isBuffer = function isBuffer(b) {
395
- return b != null && b._isBuffer === true && b !== Buffer2.prototype;
396
- };
397
- Buffer2.compare = function compare(a, b) {
398
- if (isInstance(a, GlobalUint8Array)) a = Buffer2.from(a, a.offset, a.byteLength);
399
- if (isInstance(b, GlobalUint8Array)) b = Buffer2.from(b, b.offset, b.byteLength);
400
- if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
401
- throw new TypeError(
402
- 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
403
- );
404
- }
405
- if (a === b) return 0;
406
- let x = a.length;
407
- let y = b.length;
408
- for (let i = 0, len = Math.min(x, y); i < len; ++i) {
409
- if (a[i] !== b[i]) {
410
- x = a[i];
411
- y = b[i];
412
- break;
413
- }
414
- }
415
- if (x < y) return -1;
416
- if (y < x) return 1;
417
- return 0;
418
- };
419
- Buffer2.isEncoding = function isEncoding(encoding) {
420
- switch (String(encoding).toLowerCase()) {
421
- case "hex":
422
- case "utf8":
423
- case "utf-8":
424
- case "ascii":
425
- case "latin1":
426
- case "binary":
427
- case "base64":
428
- case "ucs2":
429
- case "ucs-2":
430
- case "utf16le":
431
- case "utf-16le":
432
- return true;
433
- default:
434
- return false;
435
- }
436
- };
437
- Buffer2.concat = function concat(list, length) {
438
- if (!Array.isArray(list)) {
439
- throw new TypeError('"list" argument must be an Array of Buffers');
440
- }
441
- if (list.length === 0) {
442
- return Buffer2.alloc(0);
443
- }
444
- let i;
445
- if (length === void 0) {
446
- length = 0;
447
- for (i = 0; i < list.length; ++i) {
448
- length += list[i].length;
449
- }
450
- }
451
- const buffer2 = Buffer2.allocUnsafe(length);
452
- let pos = 0;
453
- for (i = 0; i < list.length; ++i) {
454
- let buf = list[i];
455
- if (isInstance(buf, GlobalUint8Array)) {
456
- if (pos + buf.length > buffer2.length) {
457
- if (!Buffer2.isBuffer(buf)) buf = Buffer2.from(buf);
458
- buf.copy(buffer2, pos);
459
- } else {
460
- GlobalUint8Array.prototype.set.call(
461
- buffer2,
462
- buf,
463
- pos
464
- );
465
- }
466
- } else if (!Buffer2.isBuffer(buf)) {
467
- throw new TypeError('"list" argument must be an Array of Buffers');
468
- } else {
469
- buf.copy(buffer2, pos);
470
- }
471
- pos += buf.length;
472
- }
473
- return buffer2;
474
- };
475
- function byteLength2(string, encoding) {
476
- if (Buffer2.isBuffer(string)) {
477
- return string.length;
478
- }
479
- if (GlobalArrayBuffer.isView(string) || isInstance(string, GlobalArrayBuffer)) {
480
- return string.byteLength;
481
- }
482
- if (typeof string !== "string") {
483
- throw new TypeError(
484
- 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string
485
- );
486
- }
487
- const len = string.length;
488
- const mustMatch = arguments.length > 2 && arguments[2] === true;
489
- if (!mustMatch && len === 0) return 0;
490
- let loweredCase = false;
491
- for (; ; ) {
492
- switch (encoding) {
493
- case "ascii":
494
- case "latin1":
495
- case "binary":
496
- return len;
497
- case "utf8":
498
- case "utf-8":
499
- return utf8ToBytes(string).length;
500
- case "ucs2":
501
- case "ucs-2":
502
- case "utf16le":
503
- case "utf-16le":
504
- return len * 2;
505
- case "hex":
506
- return len >>> 1;
507
- case "base64":
508
- return base64ToBytes(string).length;
509
- default:
510
- if (loweredCase) {
511
- return mustMatch ? -1 : utf8ToBytes(string).length;
512
- }
513
- encoding = ("" + encoding).toLowerCase();
514
- loweredCase = true;
515
- }
516
- }
517
- }
518
- Buffer2.byteLength = byteLength2;
519
- function slowToString(encoding, start, end) {
520
- let loweredCase = false;
521
- if (start === void 0 || start < 0) {
522
- start = 0;
523
- }
524
- if (start > this.length) {
525
- return "";
526
- }
527
- if (end === void 0 || end > this.length) {
528
- end = this.length;
529
- }
530
- if (end <= 0) {
531
- return "";
532
- }
533
- end >>>= 0;
534
- start >>>= 0;
535
- if (end <= start) {
536
- return "";
537
- }
538
- if (!encoding) encoding = "utf8";
539
- while (true) {
540
- switch (encoding) {
541
- case "hex":
542
- return hexSlice(this, start, end);
543
- case "utf8":
544
- case "utf-8":
545
- return utf8Slice(this, start, end);
546
- case "ascii":
547
- return asciiSlice(this, start, end);
548
- case "latin1":
549
- case "binary":
550
- return latin1Slice(this, start, end);
551
- case "base64":
552
- return base64Slice(this, start, end);
553
- case "ucs2":
554
- case "ucs-2":
555
- case "utf16le":
556
- case "utf-16le":
557
- return utf16leSlice(this, start, end);
558
- default:
559
- if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
560
- encoding = (encoding + "").toLowerCase();
561
- loweredCase = true;
562
- }
563
- }
564
- }
565
- Buffer2.prototype._isBuffer = true;
566
- function swap(b, n, m) {
567
- const i = b[n];
568
- b[n] = b[m];
569
- b[m] = i;
570
- }
571
- Buffer2.prototype.swap16 = function swap16() {
572
- const len = this.length;
573
- if (len % 2 !== 0) {
574
- throw new RangeError("Buffer size must be a multiple of 16-bits");
575
- }
576
- for (let i = 0; i < len; i += 2) {
577
- swap(this, i, i + 1);
578
- }
1
+ class FeeConfigBuilder {
2
+ constructor() {
3
+ this.feeAmount = 0;
4
+ this.decimals = 0;
5
+ this.feeCollectorAccountId = "";
6
+ this.exemptAccountIds = [];
7
+ }
8
+ /**
9
+ * Static factory method to create a fee config with HBAR amount in one line
10
+ * @param hbarAmount Amount in HBAR
11
+ * @param collectorAccountId Account that will receive the fees
12
+ * @param exemptAccounts Optional array of exempt account IDs
13
+ * @returns A configured FeeConfigBuilder
14
+ */
15
+ static forHbar(hbarAmount, collectorAccountId, exemptAccounts = []) {
16
+ return new FeeConfigBuilder().setHbarAmount(hbarAmount).setFeeCollector(collectorAccountId).addExemptAccounts(exemptAccounts);
17
+ }
18
+ /**
19
+ * Sets the fee amount in HBAR (convenient method)
20
+ * @param hbarAmount The amount in HBAR (e.g., 5 for 5 HBAR)
21
+ * @returns This builder instance for method chaining
22
+ */
23
+ setHbarAmount(hbarAmount) {
24
+ if (hbarAmount <= 0) {
25
+ throw new Error("HBAR amount must be greater than zero");
26
+ }
27
+ this.feeAmount = hbarAmount * 1e8;
28
+ this.decimals = 0;
579
29
  return this;
580
- };
581
- Buffer2.prototype.swap32 = function swap32() {
582
- const len = this.length;
583
- if (len % 4 !== 0) {
584
- throw new RangeError("Buffer size must be a multiple of 32-bits");
585
- }
586
- for (let i = 0; i < len; i += 4) {
587
- swap(this, i, i + 3);
588
- swap(this, i + 1, i + 2);
589
- }
590
- return this;
591
- };
592
- Buffer2.prototype.swap64 = function swap64() {
593
- const len = this.length;
594
- if (len % 8 !== 0) {
595
- throw new RangeError("Buffer size must be a multiple of 64-bits");
596
- }
597
- for (let i = 0; i < len; i += 8) {
598
- swap(this, i, i + 7);
599
- swap(this, i + 1, i + 6);
600
- swap(this, i + 2, i + 5);
601
- swap(this, i + 3, i + 4);
602
- }
30
+ }
31
+ /**
32
+ * Sets the amount of the fee to be collected for topic submissions
33
+ * @param amount The fee amount (in tinybars or token units)
34
+ * @param decimals Decimal places for fixed point representation (default: 0)
35
+ * @returns This builder instance for method chaining
36
+ */
37
+ setFeeAmount(amount, decimals = 0) {
38
+ this.feeAmount = amount;
39
+ this.decimals = decimals;
603
40
  return this;
604
- };
605
- Buffer2.prototype.toString = function toString() {
606
- const length = this.length;
607
- if (length === 0) return "";
608
- if (arguments.length === 0) return utf8Slice(this, 0, length);
609
- return slowToString.apply(this, arguments);
610
- };
611
- Buffer2.prototype.toLocaleString = Buffer2.prototype.toString;
612
- Buffer2.prototype.equals = function equals(b) {
613
- if (!Buffer2.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
614
- if (this === b) return true;
615
- return Buffer2.compare(this, b) === 0;
616
- };
617
- Buffer2.prototype.inspect = function inspect() {
618
- let str = "";
619
- const max = exports.INSPECT_MAX_BYTES;
620
- str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
621
- if (this.length > max) str += " ... ";
622
- return "<Buffer " + str + ">";
623
- };
624
- if (customInspectSymbol) {
625
- Buffer2.prototype[customInspectSymbol] = Buffer2.prototype.inspect;
626
41
  }
627
- Buffer2.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
628
- if (isInstance(target, GlobalUint8Array)) {
629
- target = Buffer2.from(target, target.offset, target.byteLength);
630
- }
631
- if (!Buffer2.isBuffer(target)) {
632
- throw new TypeError(
633
- 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target
634
- );
635
- }
636
- if (start === void 0) {
637
- start = 0;
638
- }
639
- if (end === void 0) {
640
- end = target ? target.length : 0;
641
- }
642
- if (thisStart === void 0) {
643
- thisStart = 0;
644
- }
645
- if (thisEnd === void 0) {
646
- thisEnd = this.length;
647
- }
648
- if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
649
- throw new RangeError("out of range index");
650
- }
651
- if (thisStart >= thisEnd && start >= end) {
652
- return 0;
653
- }
654
- if (thisStart >= thisEnd) {
655
- return -1;
656
- }
657
- if (start >= end) {
658
- return 1;
659
- }
660
- start >>>= 0;
661
- end >>>= 0;
662
- thisStart >>>= 0;
663
- thisEnd >>>= 0;
664
- if (this === target) return 0;
665
- let x = thisEnd - thisStart;
666
- let y = end - start;
667
- const len = Math.min(x, y);
668
- const thisCopy = this.slice(thisStart, thisEnd);
669
- const targetCopy = target.slice(start, end);
670
- for (let i = 0; i < len; ++i) {
671
- if (thisCopy[i] !== targetCopy[i]) {
672
- x = thisCopy[i];
673
- y = targetCopy[i];
674
- break;
675
- }
676
- }
677
- if (x < y) return -1;
678
- if (y < x) return 1;
679
- return 0;
680
- };
681
- function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
682
- if (buffer2.length === 0) return -1;
683
- if (typeof byteOffset === "string") {
684
- encoding = byteOffset;
685
- byteOffset = 0;
686
- } else if (byteOffset > 2147483647) {
687
- byteOffset = 2147483647;
688
- } else if (byteOffset < -2147483648) {
689
- byteOffset = -2147483648;
690
- }
691
- byteOffset = +byteOffset;
692
- if (numberIsNaN(byteOffset)) {
693
- byteOffset = dir ? 0 : buffer2.length - 1;
694
- }
695
- if (byteOffset < 0) byteOffset = buffer2.length + byteOffset;
696
- if (byteOffset >= buffer2.length) {
697
- if (dir) return -1;
698
- else byteOffset = buffer2.length - 1;
699
- } else if (byteOffset < 0) {
700
- if (dir) byteOffset = 0;
701
- else return -1;
702
- }
703
- if (typeof val === "string") {
704
- val = Buffer2.from(val, encoding);
705
- }
706
- if (Buffer2.isBuffer(val)) {
707
- if (val.length === 0) {
708
- return -1;
709
- }
710
- return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);
711
- } else if (typeof val === "number") {
712
- val = val & 255;
713
- if (typeof GlobalUint8Array.prototype.indexOf === "function") {
714
- if (dir) {
715
- return GlobalUint8Array.prototype.indexOf.call(buffer2, val, byteOffset);
716
- } else {
717
- return GlobalUint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);
718
- }
719
- }
720
- return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);
721
- }
722
- throw new TypeError("val must be string, number or Buffer");
42
+ /**
43
+ * Sets the Hedera account ID that will collect the fees
44
+ * @param accountId The fee collector's account ID (e.g., '0.0.12345')
45
+ * @returns This builder instance for method chaining
46
+ */
47
+ setFeeCollector(accountId) {
48
+ this.feeCollectorAccountId = accountId;
49
+ return this;
723
50
  }
724
- function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
725
- let indexSize = 1;
726
- let arrLength = arr.length;
727
- let valLength = val.length;
728
- if (encoding !== void 0) {
729
- encoding = String(encoding).toLowerCase();
730
- if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
731
- if (arr.length < 2 || val.length < 2) {
732
- return -1;
733
- }
734
- indexSize = 2;
735
- arrLength /= 2;
736
- valLength /= 2;
737
- byteOffset /= 2;
738
- }
739
- }
740
- function read(buf, i2) {
741
- if (indexSize === 1) {
742
- return buf[i2];
743
- } else {
744
- return buf.readUInt16BE(i2 * indexSize);
745
- }
51
+ /**
52
+ * Adds an account ID to the list of accounts exempt from paying fees
53
+ * @param accountId The account ID to exempt from fees
54
+ * @returns This builder instance for method chaining
55
+ */
56
+ addExemptAccount(accountId) {
57
+ if (!this.exemptAccountIds.includes(accountId)) {
58
+ this.exemptAccountIds.push(accountId);
746
59
  }
747
- let i;
748
- if (dir) {
749
- let foundIndex = -1;
750
- for (i = byteOffset; i < arrLength; i++) {
751
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
752
- if (foundIndex === -1) foundIndex = i;
753
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
754
- } else {
755
- if (foundIndex !== -1) i -= i - foundIndex;
756
- foundIndex = -1;
757
- }
758
- }
759
- } else {
760
- if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
761
- for (i = byteOffset; i >= 0; i--) {
762
- let found = true;
763
- for (let j = 0; j < valLength; j++) {
764
- if (read(arr, i + j) !== read(val, j)) {
765
- found = false;
766
- break;
767
- }
768
- }
769
- if (found) return i;
770
- }
771
- }
772
- return -1;
60
+ return this;
773
61
  }
774
- Buffer2.prototype.includes = function includes(val, byteOffset, encoding) {
775
- return this.indexOf(val, byteOffset, encoding) !== -1;
776
- };
777
- Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
778
- return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
779
- };
780
- Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
781
- return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
782
- };
783
- function hexWrite(buf, string, offset, length) {
784
- offset = Number(offset) || 0;
785
- const remaining = buf.length - offset;
786
- if (!length) {
787
- length = remaining;
788
- } else {
789
- length = Number(length);
790
- if (length > remaining) {
791
- length = remaining;
792
- }
793
- }
794
- const strLen = string.length;
795
- if (length > strLen / 2) {
796
- length = strLen / 2;
797
- }
798
- let i;
799
- for (i = 0; i < length; ++i) {
800
- const parsed = parseInt(string.substr(i * 2, 2), 16);
801
- if (numberIsNaN(parsed)) return i;
802
- buf[offset + i] = parsed;
62
+ /**
63
+ * Adds multiple account IDs to the list of accounts exempt from paying fees
64
+ * @param accountIds Array of account IDs to exempt from fees
65
+ * @returns This builder instance for method chaining
66
+ */
67
+ addExemptAccounts(accountIds) {
68
+ for (const accountId of accountIds) {
69
+ this.addExemptAccount(accountId);
803
70
  }
804
- return i;
805
- }
806
- function utf8Write(buf, string, offset, length) {
807
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
808
- }
809
- function asciiWrite(buf, string, offset, length) {
810
- return blitBuffer(asciiToBytes(string), buf, offset, length);
811
- }
812
- function base64Write(buf, string, offset, length) {
813
- return blitBuffer(base64ToBytes(string), buf, offset, length);
814
- }
815
- function ucs2Write(buf, string, offset, length) {
816
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
71
+ return this;
817
72
  }
818
- Buffer2.prototype.write = function write(string, offset, length, encoding) {
819
- if (offset === void 0) {
820
- encoding = "utf8";
821
- length = this.length;
822
- offset = 0;
823
- } else if (length === void 0 && typeof offset === "string") {
824
- encoding = offset;
825
- length = this.length;
826
- offset = 0;
827
- } else if (isFinite(offset)) {
828
- offset = offset >>> 0;
829
- if (isFinite(length)) {
830
- length = length >>> 0;
831
- if (encoding === void 0) encoding = "utf8";
832
- } else {
833
- encoding = length;
834
- length = void 0;
835
- }
836
- } else {
837
- throw new Error(
838
- "Buffer.write(string, encoding, offset[, length]) is no longer supported"
839
- );
840
- }
841
- const remaining = this.length - offset;
842
- if (length === void 0 || length > remaining) length = remaining;
843
- if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
844
- throw new RangeError("Attempt to write outside buffer bounds");
73
+ /**
74
+ * Builds and returns the final fee configuration object
75
+ * @throws Error if fee collector account ID is not set or if fee amount is not positive
76
+ * @returns A complete TopicFeeConfig object
77
+ */
78
+ build() {
79
+ if (!this.feeCollectorAccountId) {
80
+ throw new Error("Fee collector account ID is required");
845
81
  }
846
- if (!encoding) encoding = "utf8";
847
- let loweredCase = false;
848
- for (; ; ) {
849
- switch (encoding) {
850
- case "hex":
851
- return hexWrite(this, string, offset, length);
852
- case "utf8":
853
- case "utf-8":
854
- return utf8Write(this, string, offset, length);
855
- case "ascii":
856
- case "latin1":
857
- case "binary":
858
- return asciiWrite(this, string, offset, length);
859
- case "base64":
860
- return base64Write(this, string, offset, length);
861
- case "ucs2":
862
- case "ucs-2":
863
- case "utf16le":
864
- case "utf-16le":
865
- return ucs2Write(this, string, offset, length);
866
- default:
867
- if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
868
- encoding = ("" + encoding).toLowerCase();
869
- loweredCase = true;
870
- }
82
+ if (this.feeAmount <= 0) {
83
+ throw new Error("Fee amount must be greater than zero");
871
84
  }
872
- };
873
- Buffer2.prototype.toJSON = function toJSON() {
874
85
  return {
875
- type: "Buffer",
876
- data: Array.prototype.slice.call(this._arr || this, 0)
86
+ feeAmount: {
87
+ amount: this.feeAmount,
88
+ decimals: this.decimals
89
+ },
90
+ feeCollectorAccountId: this.feeCollectorAccountId,
91
+ exemptAccounts: this.exemptAccountIds
877
92
  };
878
- };
879
- function base64Slice(buf, start, end) {
880
- if (start === 0 && end === buf.length) {
881
- return base64.fromByteArray(buf);
882
- } else {
883
- return base64.fromByteArray(buf.slice(start, end));
884
- }
885
- }
886
- function utf8Slice(buf, start, end) {
887
- end = Math.min(buf.length, end);
888
- const res = [];
889
- let i = start;
890
- while (i < end) {
891
- const firstByte = buf[i];
892
- let codePoint = null;
893
- let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
894
- if (i + bytesPerSequence <= end) {
895
- let secondByte, thirdByte, fourthByte, tempCodePoint;
896
- switch (bytesPerSequence) {
897
- case 1:
898
- if (firstByte < 128) {
899
- codePoint = firstByte;
900
- }
901
- break;
902
- case 2:
903
- secondByte = buf[i + 1];
904
- if ((secondByte & 192) === 128) {
905
- tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
906
- if (tempCodePoint > 127) {
907
- codePoint = tempCodePoint;
908
- }
909
- }
910
- break;
911
- case 3:
912
- secondByte = buf[i + 1];
913
- thirdByte = buf[i + 2];
914
- if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
915
- tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
916
- if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
917
- codePoint = tempCodePoint;
918
- }
919
- }
920
- break;
921
- case 4:
922
- secondByte = buf[i + 1];
923
- thirdByte = buf[i + 2];
924
- fourthByte = buf[i + 3];
925
- if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
926
- tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
927
- if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
928
- codePoint = tempCodePoint;
929
- }
930
- }
931
- }
932
- }
933
- if (codePoint === null) {
934
- codePoint = 65533;
935
- bytesPerSequence = 1;
936
- } else if (codePoint > 65535) {
937
- codePoint -= 65536;
938
- res.push(codePoint >>> 10 & 1023 | 55296);
939
- codePoint = 56320 | codePoint & 1023;
940
- }
941
- res.push(codePoint);
942
- i += bytesPerSequence;
943
- }
944
- return decodeCodePointsArray(res);
945
93
  }
946
- const MAX_ARGUMENTS_LENGTH = 4096;
947
- function decodeCodePointsArray(codePoints) {
948
- const len = codePoints.length;
949
- if (len <= MAX_ARGUMENTS_LENGTH) {
950
- return String.fromCharCode.apply(String, codePoints);
951
- }
952
- let res = "";
953
- let i = 0;
954
- while (i < len) {
955
- res += String.fromCharCode.apply(
956
- String,
957
- codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
958
- );
959
- }
960
- return res;
961
- }
962
- function asciiSlice(buf, start, end) {
963
- let ret = "";
964
- end = Math.min(buf.length, end);
965
- for (let i = start; i < end; ++i) {
966
- ret += String.fromCharCode(buf[i] & 127);
967
- }
968
- return ret;
969
- }
970
- function latin1Slice(buf, start, end) {
971
- let ret = "";
972
- end = Math.min(buf.length, end);
973
- for (let i = start; i < end; ++i) {
974
- ret += String.fromCharCode(buf[i]);
975
- }
976
- return ret;
977
- }
978
- function hexSlice(buf, start, end) {
979
- const len = buf.length;
980
- if (!start || start < 0) start = 0;
981
- if (!end || end < 0 || end > len) end = len;
982
- let out = "";
983
- for (let i = start; i < end; ++i) {
984
- out += hexSliceLookupTable[buf[i]];
985
- }
986
- return out;
987
- }
988
- function utf16leSlice(buf, start, end) {
989
- const bytes = buf.slice(start, end);
990
- let res = "";
991
- for (let i = 0; i < bytes.length - 1; i += 2) {
992
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
993
- }
994
- return res;
995
- }
996
- Buffer2.prototype.slice = function slice(start, end) {
997
- const len = this.length;
998
- start = ~~start;
999
- end = end === void 0 ? len : ~~end;
1000
- if (start < 0) {
1001
- start += len;
1002
- if (start < 0) start = 0;
1003
- } else if (start > len) {
1004
- start = len;
1005
- }
1006
- if (end < 0) {
1007
- end += len;
1008
- if (end < 0) end = 0;
1009
- } else if (end > len) {
1010
- end = len;
1011
- }
1012
- if (end < start) end = start;
1013
- const newBuf = this.subarray(start, end);
1014
- Object.setPrototypeOf(newBuf, Buffer2.prototype);
1015
- return newBuf;
1016
- };
1017
- function checkOffset(offset, ext, length) {
1018
- if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
1019
- if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
1020
- }
1021
- Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength3, noAssert) {
1022
- offset = offset >>> 0;
1023
- byteLength3 = byteLength3 >>> 0;
1024
- if (!noAssert) checkOffset(offset, byteLength3, this.length);
1025
- let val = this[offset];
1026
- let mul = 1;
1027
- let i = 0;
1028
- while (++i < byteLength3 && (mul *= 256)) {
1029
- val += this[offset + i] * mul;
1030
- }
1031
- return val;
1032
- };
1033
- Buffer2.prototype.readUintBE = Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength3, noAssert) {
1034
- offset = offset >>> 0;
1035
- byteLength3 = byteLength3 >>> 0;
1036
- if (!noAssert) {
1037
- checkOffset(offset, byteLength3, this.length);
1038
- }
1039
- let val = this[offset + --byteLength3];
1040
- let mul = 1;
1041
- while (byteLength3 > 0 && (mul *= 256)) {
1042
- val += this[offset + --byteLength3] * mul;
1043
- }
1044
- return val;
1045
- };
1046
- Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) {
1047
- offset = offset >>> 0;
1048
- if (!noAssert) checkOffset(offset, 1, this.length);
1049
- return this[offset];
1050
- };
1051
- Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
1052
- offset = offset >>> 0;
1053
- if (!noAssert) checkOffset(offset, 2, this.length);
1054
- return this[offset] | this[offset + 1] << 8;
1055
- };
1056
- Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
1057
- offset = offset >>> 0;
1058
- if (!noAssert) checkOffset(offset, 2, this.length);
1059
- return this[offset] << 8 | this[offset + 1];
1060
- };
1061
- Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
1062
- offset = offset >>> 0;
1063
- if (!noAssert) checkOffset(offset, 4, this.length);
1064
- return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
1065
- };
1066
- Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
1067
- offset = offset >>> 0;
1068
- if (!noAssert) checkOffset(offset, 4, this.length);
1069
- return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1070
- };
1071
- Buffer2.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
1072
- offset = offset >>> 0;
1073
- validateNumber(offset, "offset");
1074
- const first = this[offset];
1075
- const last = this[offset + 7];
1076
- if (first === void 0 || last === void 0) {
1077
- boundsError(offset, this.length - 8);
1078
- }
1079
- const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
1080
- const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
1081
- return BigInt(lo) + (BigInt(hi) << BigInt(32));
1082
- });
1083
- Buffer2.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
1084
- offset = offset >>> 0;
1085
- validateNumber(offset, "offset");
1086
- const first = this[offset];
1087
- const last = this[offset + 7];
1088
- if (first === void 0 || last === void 0) {
1089
- boundsError(offset, this.length - 8);
1090
- }
1091
- const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1092
- const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
1093
- return (BigInt(hi) << BigInt(32)) + BigInt(lo);
1094
- });
1095
- Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength3, noAssert) {
1096
- offset = offset >>> 0;
1097
- byteLength3 = byteLength3 >>> 0;
1098
- if (!noAssert) checkOffset(offset, byteLength3, this.length);
1099
- let val = this[offset];
1100
- let mul = 1;
1101
- let i = 0;
1102
- while (++i < byteLength3 && (mul *= 256)) {
1103
- val += this[offset + i] * mul;
1104
- }
1105
- mul *= 128;
1106
- if (val >= mul) val -= Math.pow(2, 8 * byteLength3);
1107
- return val;
1108
- };
1109
- Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength3, noAssert) {
1110
- offset = offset >>> 0;
1111
- byteLength3 = byteLength3 >>> 0;
1112
- if (!noAssert) checkOffset(offset, byteLength3, this.length);
1113
- let i = byteLength3;
1114
- let mul = 1;
1115
- let val = this[offset + --i];
1116
- while (i > 0 && (mul *= 256)) {
1117
- val += this[offset + --i] * mul;
1118
- }
1119
- mul *= 128;
1120
- if (val >= mul) val -= Math.pow(2, 8 * byteLength3);
1121
- return val;
1122
- };
1123
- Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) {
1124
- offset = offset >>> 0;
1125
- if (!noAssert) checkOffset(offset, 1, this.length);
1126
- if (!(this[offset] & 128)) return this[offset];
1127
- return (255 - this[offset] + 1) * -1;
1128
- };
1129
- Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
1130
- offset = offset >>> 0;
1131
- if (!noAssert) checkOffset(offset, 2, this.length);
1132
- const val = this[offset] | this[offset + 1] << 8;
1133
- return val & 32768 ? val | 4294901760 : val;
1134
- };
1135
- Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
1136
- offset = offset >>> 0;
1137
- if (!noAssert) checkOffset(offset, 2, this.length);
1138
- const val = this[offset + 1] | this[offset] << 8;
1139
- return val & 32768 ? val | 4294901760 : val;
1140
- };
1141
- Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
1142
- offset = offset >>> 0;
1143
- if (!noAssert) checkOffset(offset, 4, this.length);
1144
- return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1145
- };
1146
- Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
1147
- offset = offset >>> 0;
1148
- if (!noAssert) checkOffset(offset, 4, this.length);
1149
- return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1150
- };
1151
- Buffer2.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
1152
- offset = offset >>> 0;
1153
- validateNumber(offset, "offset");
1154
- const first = this[offset];
1155
- const last = this[offset + 7];
1156
- if (first === void 0 || last === void 0) {
1157
- boundsError(offset, this.length - 8);
1158
- }
1159
- const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
1160
- return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
1161
- });
1162
- Buffer2.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
1163
- offset = offset >>> 0;
1164
- validateNumber(offset, "offset");
1165
- const first = this[offset];
1166
- const last = this[offset + 7];
1167
- if (first === void 0 || last === void 0) {
1168
- boundsError(offset, this.length - 8);
1169
- }
1170
- const val = (first << 24) + // Overflow
1171
- this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1172
- return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
1173
- });
1174
- Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
1175
- offset = offset >>> 0;
1176
- if (!noAssert) checkOffset(offset, 4, this.length);
1177
- return ieee754$1.read(this, offset, true, 23, 4);
1178
- };
1179
- Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
1180
- offset = offset >>> 0;
1181
- if (!noAssert) checkOffset(offset, 4, this.length);
1182
- return ieee754$1.read(this, offset, false, 23, 4);
1183
- };
1184
- Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
1185
- offset = offset >>> 0;
1186
- if (!noAssert) checkOffset(offset, 8, this.length);
1187
- return ieee754$1.read(this, offset, true, 52, 8);
1188
- };
1189
- Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
1190
- offset = offset >>> 0;
1191
- if (!noAssert) checkOffset(offset, 8, this.length);
1192
- return ieee754$1.read(this, offset, false, 52, 8);
1193
- };
1194
- function checkInt(buf, value, offset, ext, max, min) {
1195
- if (!Buffer2.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
1196
- if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
1197
- if (offset + ext > buf.length) throw new RangeError("Index out of range");
1198
- }
1199
- Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength3, noAssert) {
1200
- value = +value;
1201
- offset = offset >>> 0;
1202
- byteLength3 = byteLength3 >>> 0;
1203
- if (!noAssert) {
1204
- const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
1205
- checkInt(this, value, offset, byteLength3, maxBytes, 0);
1206
- }
1207
- let mul = 1;
1208
- let i = 0;
1209
- this[offset] = value & 255;
1210
- while (++i < byteLength3 && (mul *= 256)) {
1211
- this[offset + i] = value / mul & 255;
1212
- }
1213
- return offset + byteLength3;
1214
- };
1215
- Buffer2.prototype.writeUintBE = Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength3, noAssert) {
1216
- value = +value;
1217
- offset = offset >>> 0;
1218
- byteLength3 = byteLength3 >>> 0;
1219
- if (!noAssert) {
1220
- const maxBytes = Math.pow(2, 8 * byteLength3) - 1;
1221
- checkInt(this, value, offset, byteLength3, maxBytes, 0);
1222
- }
1223
- let i = byteLength3 - 1;
1224
- let mul = 1;
1225
- this[offset + i] = value & 255;
1226
- while (--i >= 0 && (mul *= 256)) {
1227
- this[offset + i] = value / mul & 255;
1228
- }
1229
- return offset + byteLength3;
1230
- };
1231
- Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
1232
- value = +value;
1233
- offset = offset >>> 0;
1234
- if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
1235
- this[offset] = value & 255;
1236
- return offset + 1;
1237
- };
1238
- Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
1239
- value = +value;
1240
- offset = offset >>> 0;
1241
- if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1242
- this[offset] = value & 255;
1243
- this[offset + 1] = value >>> 8;
1244
- return offset + 2;
1245
- };
1246
- Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
1247
- value = +value;
1248
- offset = offset >>> 0;
1249
- if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1250
- this[offset] = value >>> 8;
1251
- this[offset + 1] = value & 255;
1252
- return offset + 2;
1253
- };
1254
- Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
1255
- value = +value;
1256
- offset = offset >>> 0;
1257
- if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1258
- this[offset + 3] = value >>> 24;
1259
- this[offset + 2] = value >>> 16;
1260
- this[offset + 1] = value >>> 8;
1261
- this[offset] = value & 255;
1262
- return offset + 4;
1263
- };
1264
- Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
1265
- value = +value;
1266
- offset = offset >>> 0;
1267
- if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1268
- this[offset] = value >>> 24;
1269
- this[offset + 1] = value >>> 16;
1270
- this[offset + 2] = value >>> 8;
1271
- this[offset + 3] = value & 255;
1272
- return offset + 4;
1273
- };
1274
- function wrtBigUInt64LE(buf, value, offset, min, max) {
1275
- checkIntBI(value, min, max, buf, offset, 7);
1276
- let lo = Number(value & BigInt(4294967295));
1277
- buf[offset++] = lo;
1278
- lo = lo >> 8;
1279
- buf[offset++] = lo;
1280
- lo = lo >> 8;
1281
- buf[offset++] = lo;
1282
- lo = lo >> 8;
1283
- buf[offset++] = lo;
1284
- let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1285
- buf[offset++] = hi;
1286
- hi = hi >> 8;
1287
- buf[offset++] = hi;
1288
- hi = hi >> 8;
1289
- buf[offset++] = hi;
1290
- hi = hi >> 8;
1291
- buf[offset++] = hi;
1292
- return offset;
1293
- }
1294
- function wrtBigUInt64BE(buf, value, offset, min, max) {
1295
- checkIntBI(value, min, max, buf, offset, 7);
1296
- let lo = Number(value & BigInt(4294967295));
1297
- buf[offset + 7] = lo;
1298
- lo = lo >> 8;
1299
- buf[offset + 6] = lo;
1300
- lo = lo >> 8;
1301
- buf[offset + 5] = lo;
1302
- lo = lo >> 8;
1303
- buf[offset + 4] = lo;
1304
- let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1305
- buf[offset + 3] = hi;
1306
- hi = hi >> 8;
1307
- buf[offset + 2] = hi;
1308
- hi = hi >> 8;
1309
- buf[offset + 1] = hi;
1310
- hi = hi >> 8;
1311
- buf[offset] = hi;
1312
- return offset + 8;
1313
- }
1314
- Buffer2.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
1315
- return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
1316
- });
1317
- Buffer2.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
1318
- return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
1319
- });
1320
- Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength3, noAssert) {
1321
- value = +value;
1322
- offset = offset >>> 0;
1323
- if (!noAssert) {
1324
- const limit = Math.pow(2, 8 * byteLength3 - 1);
1325
- checkInt(this, value, offset, byteLength3, limit - 1, -limit);
1326
- }
1327
- let i = 0;
1328
- let mul = 1;
1329
- let sub = 0;
1330
- this[offset] = value & 255;
1331
- while (++i < byteLength3 && (mul *= 256)) {
1332
- if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
1333
- sub = 1;
1334
- }
1335
- this[offset + i] = (value / mul >> 0) - sub & 255;
1336
- }
1337
- return offset + byteLength3;
1338
- };
1339
- Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength3, noAssert) {
1340
- value = +value;
1341
- offset = offset >>> 0;
1342
- if (!noAssert) {
1343
- const limit = Math.pow(2, 8 * byteLength3 - 1);
1344
- checkInt(this, value, offset, byteLength3, limit - 1, -limit);
1345
- }
1346
- let i = byteLength3 - 1;
1347
- let mul = 1;
1348
- let sub = 0;
1349
- this[offset + i] = value & 255;
1350
- while (--i >= 0 && (mul *= 256)) {
1351
- if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
1352
- sub = 1;
1353
- }
1354
- this[offset + i] = (value / mul >> 0) - sub & 255;
1355
- }
1356
- return offset + byteLength3;
1357
- };
1358
- Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
1359
- value = +value;
1360
- offset = offset >>> 0;
1361
- if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
1362
- if (value < 0) value = 255 + value + 1;
1363
- this[offset] = value & 255;
1364
- return offset + 1;
1365
- };
1366
- Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
1367
- value = +value;
1368
- offset = offset >>> 0;
1369
- if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1370
- this[offset] = value & 255;
1371
- this[offset + 1] = value >>> 8;
1372
- return offset + 2;
1373
- };
1374
- Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
1375
- value = +value;
1376
- offset = offset >>> 0;
1377
- if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1378
- this[offset] = value >>> 8;
1379
- this[offset + 1] = value & 255;
1380
- return offset + 2;
1381
- };
1382
- Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
1383
- value = +value;
1384
- offset = offset >>> 0;
1385
- if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1386
- this[offset] = value & 255;
1387
- this[offset + 1] = value >>> 8;
1388
- this[offset + 2] = value >>> 16;
1389
- this[offset + 3] = value >>> 24;
1390
- return offset + 4;
1391
- };
1392
- Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
1393
- value = +value;
1394
- offset = offset >>> 0;
1395
- if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1396
- if (value < 0) value = 4294967295 + value + 1;
1397
- this[offset] = value >>> 24;
1398
- this[offset + 1] = value >>> 16;
1399
- this[offset + 2] = value >>> 8;
1400
- this[offset + 3] = value & 255;
1401
- return offset + 4;
1402
- };
1403
- Buffer2.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
1404
- return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1405
- });
1406
- Buffer2.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
1407
- return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1408
- });
1409
- function checkIEEE754(buf, value, offset, ext, max, min) {
1410
- if (offset + ext > buf.length) throw new RangeError("Index out of range");
1411
- if (offset < 0) throw new RangeError("Index out of range");
1412
- }
1413
- function writeFloat(buf, value, offset, littleEndian, noAssert) {
1414
- value = +value;
1415
- offset = offset >>> 0;
1416
- if (!noAssert) {
1417
- checkIEEE754(buf, value, offset, 4);
1418
- }
1419
- ieee754$1.write(buf, value, offset, littleEndian, 23, 4);
1420
- return offset + 4;
1421
- }
1422
- Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
1423
- return writeFloat(this, value, offset, true, noAssert);
1424
- };
1425
- Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
1426
- return writeFloat(this, value, offset, false, noAssert);
1427
- };
1428
- function writeDouble(buf, value, offset, littleEndian, noAssert) {
1429
- value = +value;
1430
- offset = offset >>> 0;
1431
- if (!noAssert) {
1432
- checkIEEE754(buf, value, offset, 8);
1433
- }
1434
- ieee754$1.write(buf, value, offset, littleEndian, 52, 8);
1435
- return offset + 8;
1436
- }
1437
- Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
1438
- return writeDouble(this, value, offset, true, noAssert);
1439
- };
1440
- Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
1441
- return writeDouble(this, value, offset, false, noAssert);
1442
- };
1443
- Buffer2.prototype.copy = function copy(target, targetStart, start, end) {
1444
- if (!Buffer2.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1445
- if (!start) start = 0;
1446
- if (!end && end !== 0) end = this.length;
1447
- if (targetStart >= target.length) targetStart = target.length;
1448
- if (!targetStart) targetStart = 0;
1449
- if (end > 0 && end < start) end = start;
1450
- if (end === start) return 0;
1451
- if (target.length === 0 || this.length === 0) return 0;
1452
- if (targetStart < 0) {
1453
- throw new RangeError("targetStart out of bounds");
1454
- }
1455
- if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
1456
- if (end < 0) throw new RangeError("sourceEnd out of bounds");
1457
- if (end > this.length) end = this.length;
1458
- if (target.length - targetStart < end - start) {
1459
- end = target.length - targetStart + start;
1460
- }
1461
- const len = end - start;
1462
- if (this === target && typeof GlobalUint8Array.prototype.copyWithin === "function") {
1463
- this.copyWithin(targetStart, start, end);
1464
- } else {
1465
- GlobalUint8Array.prototype.set.call(
1466
- target,
1467
- this.subarray(start, end),
1468
- targetStart
1469
- );
1470
- }
1471
- return len;
1472
- };
1473
- Buffer2.prototype.fill = function fill(val, start, end, encoding) {
1474
- if (typeof val === "string") {
1475
- if (typeof start === "string") {
1476
- encoding = start;
1477
- start = 0;
1478
- end = this.length;
1479
- } else if (typeof end === "string") {
1480
- encoding = end;
1481
- end = this.length;
1482
- }
1483
- if (encoding !== void 0 && typeof encoding !== "string") {
1484
- throw new TypeError("encoding must be a string");
1485
- }
1486
- if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) {
1487
- throw new TypeError("Unknown encoding: " + encoding);
1488
- }
1489
- if (val.length === 1) {
1490
- const code2 = val.charCodeAt(0);
1491
- if (encoding === "utf8" && code2 < 128 || encoding === "latin1") {
1492
- val = code2;
1493
- }
1494
- }
1495
- } else if (typeof val === "number") {
1496
- val = val & 255;
1497
- } else if (typeof val === "boolean") {
1498
- val = Number(val);
1499
- }
1500
- if (start < 0 || this.length < start || this.length < end) {
1501
- throw new RangeError("Out of range index");
1502
- }
1503
- if (end <= start) {
1504
- return this;
1505
- }
1506
- start = start >>> 0;
1507
- end = end === void 0 ? this.length : end >>> 0;
1508
- if (!val) val = 0;
1509
- let i;
1510
- if (typeof val === "number") {
1511
- for (i = start; i < end; ++i) {
1512
- this[i] = val;
1513
- }
1514
- } else {
1515
- const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding);
1516
- const len = bytes.length;
1517
- if (len === 0) {
1518
- throw new TypeError('The value "' + val + '" is invalid for argument "value"');
1519
- }
1520
- for (i = 0; i < end - start; ++i) {
1521
- this[i + start] = bytes[i % len];
1522
- }
1523
- }
1524
- return this;
1525
- };
1526
- const errors = {};
1527
- function E(sym, getMessage, Base) {
1528
- errors[sym] = class NodeError extends Base {
1529
- constructor() {
1530
- super();
1531
- Object.defineProperty(this, "message", {
1532
- value: getMessage.apply(this, arguments),
1533
- writable: true,
1534
- configurable: true
1535
- });
1536
- this.name = `${this.name} [${sym}]`;
1537
- this.stack;
1538
- delete this.name;
1539
- }
1540
- get code() {
1541
- return sym;
1542
- }
1543
- set code(value) {
1544
- Object.defineProperty(this, "code", {
1545
- configurable: true,
1546
- enumerable: true,
1547
- value,
1548
- writable: true
1549
- });
1550
- }
1551
- toString() {
1552
- return `${this.name} [${sym}]: ${this.message}`;
1553
- }
1554
- };
1555
- }
1556
- E(
1557
- "ERR_BUFFER_OUT_OF_BOUNDS",
1558
- function(name) {
1559
- if (name) {
1560
- return `${name} is outside of buffer bounds`;
1561
- }
1562
- return "Attempt to access memory outside buffer bounds";
1563
- },
1564
- RangeError
1565
- );
1566
- E(
1567
- "ERR_INVALID_ARG_TYPE",
1568
- function(name, actual) {
1569
- return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1570
- },
1571
- TypeError
1572
- );
1573
- E(
1574
- "ERR_OUT_OF_RANGE",
1575
- function(str, range, input) {
1576
- let msg = `The value of "${str}" is out of range.`;
1577
- let received = input;
1578
- if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
1579
- received = addNumericalSeparator(String(input));
1580
- } else if (typeof input === "bigint") {
1581
- received = String(input);
1582
- if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
1583
- received = addNumericalSeparator(received);
1584
- }
1585
- received += "n";
1586
- }
1587
- msg += ` It must be ${range}. Received ${received}`;
1588
- return msg;
1589
- },
1590
- RangeError
1591
- );
1592
- function addNumericalSeparator(val) {
1593
- let res = "";
1594
- let i = val.length;
1595
- const start = val[0] === "-" ? 1 : 0;
1596
- for (; i >= start + 4; i -= 3) {
1597
- res = `_${val.slice(i - 3, i)}${res}`;
1598
- }
1599
- return `${val.slice(0, i)}${res}`;
1600
- }
1601
- function checkBounds(buf, offset, byteLength3) {
1602
- validateNumber(offset, "offset");
1603
- if (buf[offset] === void 0 || buf[offset + byteLength3] === void 0) {
1604
- boundsError(offset, buf.length - (byteLength3 + 1));
1605
- }
1606
- }
1607
- function checkIntBI(value, min, max, buf, offset, byteLength3) {
1608
- if (value > max || value < min) {
1609
- const n = typeof min === "bigint" ? "n" : "";
1610
- let range;
1611
- {
1612
- if (min === 0 || min === BigInt(0)) {
1613
- range = `>= 0${n} and < 2${n} ** ${(byteLength3 + 1) * 8}${n}`;
1614
- } else {
1615
- range = `>= -(2${n} ** ${(byteLength3 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength3 + 1) * 8 - 1}${n}`;
1616
- }
1617
- }
1618
- throw new errors.ERR_OUT_OF_RANGE("value", range, value);
1619
- }
1620
- checkBounds(buf, offset, byteLength3);
1621
- }
1622
- function validateNumber(value, name) {
1623
- if (typeof value !== "number") {
1624
- throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
1625
- }
1626
- }
1627
- function boundsError(value, length, type) {
1628
- if (Math.floor(value) !== value) {
1629
- validateNumber(value, type);
1630
- throw new errors.ERR_OUT_OF_RANGE("offset", "an integer", value);
1631
- }
1632
- if (length < 0) {
1633
- throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
1634
- }
1635
- throw new errors.ERR_OUT_OF_RANGE(
1636
- "offset",
1637
- `>= ${0} and <= ${length}`,
1638
- value
1639
- );
1640
- }
1641
- const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
1642
- function base64clean(str) {
1643
- str = str.split("=")[0];
1644
- str = str.trim().replace(INVALID_BASE64_RE, "");
1645
- if (str.length < 2) return "";
1646
- while (str.length % 4 !== 0) {
1647
- str = str + "=";
1648
- }
1649
- return str;
1650
- }
1651
- function utf8ToBytes(string, units) {
1652
- units = units || Infinity;
1653
- let codePoint;
1654
- const length = string.length;
1655
- let leadSurrogate = null;
1656
- const bytes = [];
1657
- for (let i = 0; i < length; ++i) {
1658
- codePoint = string.charCodeAt(i);
1659
- if (codePoint > 55295 && codePoint < 57344) {
1660
- if (!leadSurrogate) {
1661
- if (codePoint > 56319) {
1662
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
1663
- continue;
1664
- } else if (i + 1 === length) {
1665
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
1666
- continue;
1667
- }
1668
- leadSurrogate = codePoint;
1669
- continue;
1670
- }
1671
- if (codePoint < 56320) {
1672
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
1673
- leadSurrogate = codePoint;
1674
- continue;
1675
- }
1676
- codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
1677
- } else if (leadSurrogate) {
1678
- if ((units -= 3) > -1) bytes.push(239, 191, 189);
1679
- }
1680
- leadSurrogate = null;
1681
- if (codePoint < 128) {
1682
- if ((units -= 1) < 0) break;
1683
- bytes.push(codePoint);
1684
- } else if (codePoint < 2048) {
1685
- if ((units -= 2) < 0) break;
1686
- bytes.push(
1687
- codePoint >> 6 | 192,
1688
- codePoint & 63 | 128
1689
- );
1690
- } else if (codePoint < 65536) {
1691
- if ((units -= 3) < 0) break;
1692
- bytes.push(
1693
- codePoint >> 12 | 224,
1694
- codePoint >> 6 & 63 | 128,
1695
- codePoint & 63 | 128
1696
- );
1697
- } else if (codePoint < 1114112) {
1698
- if ((units -= 4) < 0) break;
1699
- bytes.push(
1700
- codePoint >> 18 | 240,
1701
- codePoint >> 12 & 63 | 128,
1702
- codePoint >> 6 & 63 | 128,
1703
- codePoint & 63 | 128
1704
- );
1705
- } else {
1706
- throw new Error("Invalid code point");
1707
- }
1708
- }
1709
- return bytes;
1710
- }
1711
- function asciiToBytes(str) {
1712
- const byteArray = [];
1713
- for (let i = 0; i < str.length; ++i) {
1714
- byteArray.push(str.charCodeAt(i) & 255);
1715
- }
1716
- return byteArray;
1717
- }
1718
- function utf16leToBytes(str, units) {
1719
- let c, hi, lo;
1720
- const byteArray = [];
1721
- for (let i = 0; i < str.length; ++i) {
1722
- if ((units -= 2) < 0) break;
1723
- c = str.charCodeAt(i);
1724
- hi = c >> 8;
1725
- lo = c % 256;
1726
- byteArray.push(lo);
1727
- byteArray.push(hi);
1728
- }
1729
- return byteArray;
1730
- }
1731
- function base64ToBytes(str) {
1732
- return base64.toByteArray(base64clean(str));
1733
- }
1734
- function blitBuffer(src, dst, offset, length) {
1735
- let i;
1736
- for (i = 0; i < length; ++i) {
1737
- if (i + offset >= dst.length || i >= src.length) break;
1738
- dst[i + offset] = src[i];
1739
- }
1740
- return i;
1741
- }
1742
- function isInstance(obj, type) {
1743
- return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
1744
- }
1745
- function numberIsNaN(obj) {
1746
- return obj !== obj;
1747
- }
1748
- const hexSliceLookupTable = function() {
1749
- const alphabet = "0123456789abcdef";
1750
- const table = new Array(256);
1751
- for (let i = 0; i < 16; ++i) {
1752
- const i16 = i * 16;
1753
- for (let j = 0; j < 16; ++j) {
1754
- table[i16 + j] = alphabet[i] + alphabet[j];
1755
- }
1756
- }
1757
- return table;
1758
- }();
1759
- function defineBigIntMethod(fn) {
1760
- return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
1761
- }
1762
- function BufferBigIntNotDefined() {
1763
- throw new Error("BigInt not supported");
1764
- }
1765
- })(buffer);
1766
- const Buffer = buffer.Buffer;
94
+ }
1767
95
  export {
1768
- Buffer as default
96
+ FeeConfigBuilder
1769
97
  };
1770
98
  //# sourceMappingURL=standards-sdk.es19.js.map