@hashgraphonline/standards-sdk 0.0.87 → 0.0.89

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 (206) hide show
  1. package/dist/es/hcs-10/connections-manager.d.ts +2 -0
  2. package/dist/es/hcs-10/connections-manager.d.ts.map +1 -1
  3. package/dist/es/standards-sdk.es10.js +18 -10
  4. package/dist/es/standards-sdk.es10.js.map +1 -1
  5. package/dist/es/standards-sdk.es100.js +30 -13
  6. package/dist/es/standards-sdk.es100.js.map +1 -1
  7. package/dist/es/standards-sdk.es101.js +14 -3
  8. package/dist/es/standards-sdk.es101.js.map +1 -1
  9. package/dist/es/standards-sdk.es102.js +3 -3
  10. package/dist/es/standards-sdk.es102.js.map +1 -1
  11. package/dist/es/standards-sdk.es103.js +3 -15
  12. package/dist/es/standards-sdk.es103.js.map +1 -1
  13. package/dist/es/standards-sdk.es104.js +15 -4
  14. package/dist/es/standards-sdk.es104.js.map +1 -1
  15. package/dist/es/standards-sdk.es105.js +5 -39
  16. package/dist/es/standards-sdk.es105.js.map +1 -1
  17. package/dist/es/standards-sdk.es106.js +38 -39
  18. package/dist/es/standards-sdk.es106.js.map +1 -1
  19. package/dist/es/standards-sdk.es107.js +37 -34
  20. package/dist/es/standards-sdk.es107.js.map +1 -1
  21. package/dist/es/standards-sdk.es108.js +34 -75
  22. package/dist/es/standards-sdk.es108.js.map +1 -1
  23. package/dist/es/standards-sdk.es109.js +77 -2281
  24. package/dist/es/standards-sdk.es109.js.map +1 -1
  25. package/dist/es/standards-sdk.es111.js +34 -3
  26. package/dist/es/standards-sdk.es111.js.map +1 -1
  27. package/dist/es/standards-sdk.es112.js +33 -2
  28. package/dist/es/standards-sdk.es112.js.map +1 -1
  29. package/dist/es/standards-sdk.es113.js +9 -2
  30. package/dist/es/standards-sdk.es113.js.map +1 -1
  31. package/dist/es/standards-sdk.es114.js +32 -32
  32. package/dist/es/standards-sdk.es114.js.map +1 -1
  33. package/dist/es/standards-sdk.es115.js +3 -33
  34. package/dist/es/standards-sdk.es115.js.map +1 -1
  35. package/dist/es/standards-sdk.es116.js +2 -9
  36. package/dist/es/standards-sdk.es116.js.map +1 -1
  37. package/dist/es/standards-sdk.es117.js +2 -34
  38. package/dist/es/standards-sdk.es117.js.map +1 -1
  39. package/dist/es/standards-sdk.es13.js +2 -2
  40. package/dist/es/standards-sdk.es15.js +1 -1
  41. package/dist/es/standards-sdk.es18.js +1 -1
  42. package/dist/es/standards-sdk.es19.js +2 -2
  43. package/dist/es/standards-sdk.es23.js +7190 -36
  44. package/dist/es/standards-sdk.es23.js.map +1 -1
  45. package/dist/es/standards-sdk.es24.js +1039 -46
  46. package/dist/es/standards-sdk.es24.js.map +1 -1
  47. package/dist/es/standards-sdk.es25.js +36 -7190
  48. package/dist/es/standards-sdk.es25.js.map +1 -1
  49. package/dist/es/standards-sdk.es26.js +48 -3
  50. package/dist/es/standards-sdk.es26.js.map +1 -1
  51. package/dist/es/standards-sdk.es27.js +3 -2
  52. package/dist/es/standards-sdk.es27.js.map +1 -1
  53. package/dist/es/standards-sdk.es28.js +2 -4167
  54. package/dist/es/standards-sdk.es28.js.map +1 -1
  55. package/dist/es/standards-sdk.es29.js +5 -1041
  56. package/dist/es/standards-sdk.es29.js.map +1 -1
  57. package/dist/es/standards-sdk.es30.js +4167 -5
  58. package/dist/es/standards-sdk.es30.js.map +1 -1
  59. package/dist/es/standards-sdk.es31.js +7136 -2
  60. package/dist/es/standards-sdk.es31.js.map +1 -1
  61. package/dist/es/standards-sdk.es32.js +3 -195
  62. package/dist/es/standards-sdk.es32.js.map +1 -1
  63. package/dist/es/standards-sdk.es33.js +86 -423
  64. package/dist/es/standards-sdk.es33.js.map +1 -1
  65. package/dist/es/standards-sdk.es34.js +2 -25
  66. package/dist/es/standards-sdk.es34.js.map +1 -1
  67. package/dist/es/standards-sdk.es35.js +15 -138
  68. package/dist/es/standards-sdk.es35.js.map +1 -1
  69. package/dist/es/standards-sdk.es36.js +405 -14
  70. package/dist/es/standards-sdk.es36.js.map +1 -1
  71. package/dist/es/standards-sdk.es37.js +2 -29
  72. package/dist/es/standards-sdk.es37.js.map +1 -1
  73. package/dist/es/standards-sdk.es38.js +362 -27
  74. package/dist/es/standards-sdk.es38.js.map +1 -1
  75. package/dist/es/standards-sdk.es39.js +5 -20
  76. package/dist/es/standards-sdk.es39.js.map +1 -1
  77. package/dist/es/standards-sdk.es4.js +1 -1
  78. package/dist/es/standards-sdk.es40.js +172 -37
  79. package/dist/es/standards-sdk.es40.js.map +1 -1
  80. package/dist/es/standards-sdk.es41.js +76 -13
  81. package/dist/es/standards-sdk.es41.js.map +1 -1
  82. package/dist/es/standards-sdk.es42.js +108 -55
  83. package/dist/es/standards-sdk.es42.js.map +1 -1
  84. package/dist/es/standards-sdk.es43.js +43 -1280
  85. package/dist/es/standards-sdk.es43.js.map +1 -1
  86. package/dist/es/standards-sdk.es44.js +10 -148
  87. package/dist/es/standards-sdk.es44.js.map +1 -1
  88. package/dist/es/standards-sdk.es45.js +87 -81
  89. package/dist/es/standards-sdk.es45.js.map +1 -1
  90. package/dist/es/standards-sdk.es46.js +3 -83
  91. package/dist/es/standards-sdk.es46.js.map +1 -1
  92. package/dist/es/standards-sdk.es47.js +2 -32
  93. package/dist/es/standards-sdk.es47.js.map +1 -1
  94. package/dist/es/standards-sdk.es48.js +112 -5
  95. package/dist/es/standards-sdk.es48.js.map +1 -1
  96. package/dist/es/standards-sdk.es49.js +69 -154
  97. package/dist/es/standards-sdk.es49.js.map +1 -1
  98. package/dist/es/standards-sdk.es5.js +2 -2
  99. package/dist/es/standards-sdk.es50.js +5 -22
  100. package/dist/es/standards-sdk.es50.js.map +1 -1
  101. package/dist/es/standards-sdk.es51.js +4 -792
  102. package/dist/es/standards-sdk.es51.js.map +1 -1
  103. package/dist/es/standards-sdk.es52.js +195 -338
  104. package/dist/es/standards-sdk.es52.js.map +1 -1
  105. package/dist/es/standards-sdk.es53.js +58 -6
  106. package/dist/es/standards-sdk.es53.js.map +1 -1
  107. package/dist/es/standards-sdk.es54.js +68 -178
  108. package/dist/es/standards-sdk.es54.js.map +1 -1
  109. package/dist/es/standards-sdk.es55.js +2282 -81
  110. package/dist/es/standards-sdk.es55.js.map +1 -1
  111. package/dist/es/standards-sdk.es56.js +154 -104
  112. package/dist/es/standards-sdk.es56.js.map +1 -1
  113. package/dist/es/standards-sdk.es57.js +78 -46
  114. package/dist/es/standards-sdk.es57.js.map +1 -1
  115. package/dist/es/standards-sdk.es58.js +22 -9
  116. package/dist/es/standards-sdk.es58.js.map +1 -1
  117. package/dist/es/standards-sdk.es59.js +134 -83
  118. package/dist/es/standards-sdk.es59.js.map +1 -1
  119. package/dist/es/standards-sdk.es60.js +90 -3
  120. package/dist/es/standards-sdk.es60.js.map +1 -1
  121. package/dist/es/standards-sdk.es61.js +195 -2
  122. package/dist/es/standards-sdk.es61.js.map +1 -1
  123. package/dist/es/standards-sdk.es62.js +423 -98
  124. package/dist/es/standards-sdk.es62.js.map +1 -1
  125. package/dist/es/standards-sdk.es63.js +22 -71
  126. package/dist/es/standards-sdk.es63.js.map +1 -1
  127. package/dist/es/standards-sdk.es64.js +138 -5
  128. package/dist/es/standards-sdk.es64.js.map +1 -1
  129. package/dist/es/standards-sdk.es65.js +17 -4
  130. package/dist/es/standards-sdk.es65.js.map +1 -1
  131. package/dist/es/standards-sdk.es66.js +21 -213
  132. package/dist/es/standards-sdk.es66.js.map +1 -1
  133. package/dist/es/standards-sdk.es67.js +27 -56
  134. package/dist/es/standards-sdk.es67.js.map +1 -1
  135. package/dist/es/standards-sdk.es68.js +21 -69
  136. package/dist/es/standards-sdk.es68.js.map +1 -1
  137. package/dist/es/standards-sdk.es69.js +38 -168
  138. package/dist/es/standards-sdk.es69.js.map +1 -1
  139. package/dist/es/standards-sdk.es7.js +2 -2
  140. package/dist/es/standards-sdk.es70.js +13 -138
  141. package/dist/es/standards-sdk.es70.js.map +1 -1
  142. package/dist/es/standards-sdk.es71.js +49 -407
  143. package/dist/es/standards-sdk.es71.js.map +1 -1
  144. package/dist/es/standards-sdk.es72.js +1289 -2
  145. package/dist/es/standards-sdk.es72.js.map +1 -1
  146. package/dist/es/standards-sdk.es73.js +27 -115
  147. package/dist/es/standards-sdk.es73.js.map +1 -1
  148. package/dist/es/standards-sdk.es74.js +5 -20
  149. package/dist/es/standards-sdk.es74.js.map +1 -1
  150. package/dist/es/standards-sdk.es75.js +159 -3
  151. package/dist/es/standards-sdk.es75.js.map +1 -1
  152. package/dist/es/standards-sdk.es76.js +780 -151
  153. package/dist/es/standards-sdk.es76.js.map +1 -1
  154. package/dist/es/standards-sdk.es77.js +170 -28
  155. package/dist/es/standards-sdk.es77.js.map +1 -1
  156. package/dist/es/standards-sdk.es78.js +136 -56
  157. package/dist/es/standards-sdk.es78.js.map +1 -1
  158. package/dist/es/standards-sdk.es79.js +27 -45
  159. package/dist/es/standards-sdk.es79.js.map +1 -1
  160. package/dist/es/standards-sdk.es8.js +2 -2
  161. package/dist/es/standards-sdk.es80.js +62 -9
  162. package/dist/es/standards-sdk.es80.js.map +1 -1
  163. package/dist/es/standards-sdk.es81.js +45 -60
  164. package/dist/es/standards-sdk.es81.js.map +1 -1
  165. package/dist/es/standards-sdk.es82.js +10 -6
  166. package/dist/es/standards-sdk.es82.js.map +1 -1
  167. package/dist/es/standards-sdk.es83.js +62 -12
  168. package/dist/es/standards-sdk.es83.js.map +1 -1
  169. package/dist/es/standards-sdk.es84.js +5 -6
  170. package/dist/es/standards-sdk.es84.js.map +1 -1
  171. package/dist/es/standards-sdk.es85.js +13 -43
  172. package/dist/es/standards-sdk.es85.js.map +1 -1
  173. package/dist/es/standards-sdk.es86.js +7 -2
  174. package/dist/es/standards-sdk.es86.js.map +1 -1
  175. package/dist/es/standards-sdk.es87.js +39 -130
  176. package/dist/es/standards-sdk.es87.js.map +1 -1
  177. package/dist/es/standards-sdk.es88.js +2 -172
  178. package/dist/es/standards-sdk.es88.js.map +1 -1
  179. package/dist/es/standards-sdk.es89.js +136 -27
  180. package/dist/es/standards-sdk.es89.js.map +1 -1
  181. package/dist/es/standards-sdk.es9.js +1 -1
  182. package/dist/es/standards-sdk.es90.js +172 -26
  183. package/dist/es/standards-sdk.es90.js.map +1 -1
  184. package/dist/es/standards-sdk.es91.js +19 -36
  185. package/dist/es/standards-sdk.es91.js.map +1 -1
  186. package/dist/es/standards-sdk.es92.js +26 -100
  187. package/dist/es/standards-sdk.es92.js.map +1 -1
  188. package/dist/es/standards-sdk.es93.js +26 -2
  189. package/dist/es/standards-sdk.es93.js.map +1 -1
  190. package/dist/es/standards-sdk.es94.js +37 -15
  191. package/dist/es/standards-sdk.es94.js.map +1 -1
  192. package/dist/es/standards-sdk.es95.js +397 -387
  193. package/dist/es/standards-sdk.es95.js.map +1 -1
  194. package/dist/es/standards-sdk.es96.js +2 -7136
  195. package/dist/es/standards-sdk.es96.js.map +1 -1
  196. package/dist/es/standards-sdk.es97.js +120 -13
  197. package/dist/es/standards-sdk.es97.js.map +1 -1
  198. package/dist/es/standards-sdk.es98.js +13 -13
  199. package/dist/es/standards-sdk.es98.js.map +1 -1
  200. package/dist/es/standards-sdk.es99.js +13 -32
  201. package/dist/es/standards-sdk.es99.js.map +1 -1
  202. package/dist/umd/hcs-10/connections-manager.d.ts +2 -0
  203. package/dist/umd/hcs-10/connections-manager.d.ts.map +1 -1
  204. package/dist/umd/standards-sdk.umd.js +1 -1
  205. package/dist/umd/standards-sdk.umd.js.map +1 -1
  206. package/package.json +1 -1
@@ -1,61 +1,32 @@
1
- import utils from "./standards-sdk.es52.js";
2
- import httpAdapter from "./standards-sdk.es86.js";
3
- import xhrAdapter from "./standards-sdk.es87.js";
4
- import fetchAdapter from "./standards-sdk.es88.js";
5
- import AxiosError from "./standards-sdk.es63.js";
6
- const knownAdapters = {
7
- http: httpAdapter,
8
- xhr: xhrAdapter,
9
- fetch: fetchAdapter
10
- };
11
- utils.forEach(knownAdapters, (fn, value) => {
12
- if (fn) {
13
- try {
14
- Object.defineProperty(fn, "name", { value });
15
- } catch (e) {
16
- }
17
- Object.defineProperty(fn, "adapterName", { value });
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { Typed } from "./standards-sdk.es76.js";
5
+ import { Coder } from "./standards-sdk.es62.js";
6
+ import { defineProperties } from "./standards-sdk.es73.js";
7
+ import { getBytesCopy, hexlify } from "./standards-sdk.es60.js";
8
+ class FixedBytesCoder extends Coder {
9
+ constructor(size, localName) {
10
+ let name = "bytes" + String(size);
11
+ super(name, name, localName, false);
12
+ __publicField(this, "size");
13
+ defineProperties(this, { size }, { size: "number" });
18
14
  }
19
- });
20
- const renderReason = (reason) => `- ${reason}`;
21
- const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
22
- const adapters = {
23
- getAdapter: (adapters2) => {
24
- adapters2 = utils.isArray(adapters2) ? adapters2 : [adapters2];
25
- const { length } = adapters2;
26
- let nameOrAdapter;
27
- let adapter;
28
- const rejectedReasons = {};
29
- for (let i = 0; i < length; i++) {
30
- nameOrAdapter = adapters2[i];
31
- let id;
32
- adapter = nameOrAdapter;
33
- if (!isResolvedHandle(nameOrAdapter)) {
34
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
35
- if (adapter === void 0) {
36
- throw new AxiosError(`Unknown adapter '${id}'`);
37
- }
38
- }
39
- if (adapter) {
40
- break;
41
- }
42
- rejectedReasons[id || "#" + i] = adapter;
43
- }
44
- if (!adapter) {
45
- const reasons = Object.entries(rejectedReasons).map(
46
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
47
- );
48
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
49
- throw new AxiosError(
50
- `There is no suitable adapter to dispatch the request ` + s,
51
- "ERR_NOT_SUPPORT"
52
- );
15
+ defaultValue() {
16
+ return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0, 2 + this.size * 2);
17
+ }
18
+ encode(writer, _value) {
19
+ let data = getBytesCopy(Typed.dereference(_value, this.type));
20
+ if (data.length !== this.size) {
21
+ this._throwError("incorrect data length", _value);
53
22
  }
54
- return adapter;
55
- },
56
- adapters: knownAdapters
57
- };
23
+ return writer.writeBytes(data);
24
+ }
25
+ decode(reader) {
26
+ return hexlify(reader.readBytes(this.size));
27
+ }
28
+ }
58
29
  export {
59
- adapters as default
30
+ FixedBytesCoder
60
31
  };
61
32
  //# sourceMappingURL=standards-sdk.es67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es67.js","sources":["../../node_modules/axios/lib/adapters/adapters.js"],"sourcesContent":["import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n"],"names":["adapters"],"mappings":";;;;;AAMA,MAAM,gBAAgB;AAAA,EACpB,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AACT;AAEA,MAAM,QAAQ,eAAe,CAAC,IAAI,UAAU;AAC1C,MAAI,IAAI;AACN,QAAI;AACF,aAAO,eAAe,IAAI,QAAQ,EAAC,MAAK,CAAC;AAAA,IAC1C,SAAQ,GAAG;AAAA,IAEhB;AACI,WAAO,eAAe,IAAI,eAAe,EAAC,MAAK,CAAC;AAAA,EACpD;AACA,CAAC;AAED,MAAM,eAAe,CAAC,WAAW,KAAK,MAAM;AAE5C,MAAM,mBAAmB,CAAC,YAAY,MAAM,WAAW,OAAO,KAAK,YAAY,QAAQ,YAAY;AAEnG,MAAe,WAAA;AAAA,EACb,YAAY,CAACA,cAAa;AACxB,IAAAA,YAAW,MAAM,QAAQA,SAAQ,IAAIA,YAAW,CAACA,SAAQ;AAEzD,UAAM,EAAC,OAAM,IAAIA;AACjB,QAAI;AACJ,QAAI;AAEJ,UAAM,kBAAkB,CAAE;AAE1B,aAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,sBAAgBA,UAAS,CAAC;AAC1B,UAAI;AAEJ,gBAAU;AAEV,UAAI,CAAC,iBAAiB,aAAa,GAAG;AACpC,kBAAU,eAAe,KAAK,OAAO,aAAa,GAAG,aAAa;AAElE,YAAI,YAAY,QAAW;AACzB,gBAAM,IAAI,WAAW,oBAAoB,EAAE,GAAG;AAAA,QACxD;AAAA,MACA;AAEM,UAAI,SAAS;AACX;AAAA,MACR;AAEM,sBAAgB,MAAM,MAAM,CAAC,IAAI;AAAA,IACvC;AAEI,QAAI,CAAC,SAAS;AAEZ,YAAM,UAAU,OAAO,QAAQ,eAAe,EAC3C;AAAA,QAAI,CAAC,CAAC,IAAI,KAAK,MAAM,WAAW,EAAE,OAChC,UAAU,QAAQ,wCAAwC;AAAA,MAC5D;AAEH,UAAI,IAAI,SACL,QAAQ,SAAS,IAAI,cAAc,QAAQ,IAAI,YAAY,EAAE,KAAK,IAAI,IAAI,MAAM,aAAa,QAAQ,CAAC,CAAC,IACxG;AAEF,YAAM,IAAI;AAAA,QACR,0DAA0D;AAAA,QAC1D;AAAA,MACD;AAAA,IACP;AAEI,WAAO;AAAA,EACR;AAAA,EACD,UAAU;AACZ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es67.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/fixed-bytes.js"],"sourcesContent":["import { defineProperties, getBytesCopy, hexlify } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder } from \"./abstract-coder.js\";\n/**\n * @_ignore\n */\nexport class FixedBytesCoder extends Coder {\n size;\n constructor(size, localName) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n defineProperties(this, { size }, { size: \"number\" });\n }\n defaultValue() {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = getBytesCopy(Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return hexlify(reader.readBytes(this.size));\n }\n}\n//# sourceMappingURL=fixed-bytes.js.map"],"names":[],"mappings":";;;;;;;AAMO,MAAM,wBAAwB,MAAM;AAAA,EAEvC,YAAY,MAAM,WAAW;AACzB,QAAI,OAAO,UAAU,OAAO,IAAI;AAChC,UAAM,MAAM,MAAM,WAAW,KAAK;AAHtC;AAII,qBAAiB,MAAM,EAAE,KAAM,GAAE,EAAE,MAAM,UAAU;AAAA,EAC3D;AAAA,EACI,eAAe;AACX,WAAQ,qEAAsE,UAAU,GAAG,IAAI,KAAK,OAAO,CAAC;AAAA,EACpH;AAAA,EACI,OAAO,QAAQ,QAAQ;AACnB,QAAI,OAAO,aAAa,MAAM,YAAY,QAAQ,KAAK,IAAI,CAAC;AAC5D,QAAI,KAAK,WAAW,KAAK,MAAM;AAC3B,WAAK,YAAY,yBAAyB,MAAM;AAAA,IAC5D;AACQ,WAAO,OAAO,WAAW,IAAI;AAAA,EACrC;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,QAAQ,OAAO,UAAU,KAAK,IAAI,CAAC;AAAA,EAClD;AACA;","x_google_ignoreList":[0]}
@@ -1,72 +1,24 @@
1
- const HttpStatusCode = {
2
- Continue: 100,
3
- SwitchingProtocols: 101,
4
- Processing: 102,
5
- EarlyHints: 103,
6
- Ok: 200,
7
- Created: 201,
8
- Accepted: 202,
9
- NonAuthoritativeInformation: 203,
10
- NoContent: 204,
11
- ResetContent: 205,
12
- PartialContent: 206,
13
- MultiStatus: 207,
14
- AlreadyReported: 208,
15
- ImUsed: 226,
16
- MultipleChoices: 300,
17
- MovedPermanently: 301,
18
- Found: 302,
19
- SeeOther: 303,
20
- NotModified: 304,
21
- UseProxy: 305,
22
- Unused: 306,
23
- TemporaryRedirect: 307,
24
- PermanentRedirect: 308,
25
- BadRequest: 400,
26
- Unauthorized: 401,
27
- PaymentRequired: 402,
28
- Forbidden: 403,
29
- NotFound: 404,
30
- MethodNotAllowed: 405,
31
- NotAcceptable: 406,
32
- ProxyAuthenticationRequired: 407,
33
- RequestTimeout: 408,
34
- Conflict: 409,
35
- Gone: 410,
36
- LengthRequired: 411,
37
- PreconditionFailed: 412,
38
- PayloadTooLarge: 413,
39
- UriTooLong: 414,
40
- UnsupportedMediaType: 415,
41
- RangeNotSatisfiable: 416,
42
- ExpectationFailed: 417,
43
- ImATeapot: 418,
44
- MisdirectedRequest: 421,
45
- UnprocessableEntity: 422,
46
- Locked: 423,
47
- FailedDependency: 424,
48
- TooEarly: 425,
49
- UpgradeRequired: 426,
50
- PreconditionRequired: 428,
51
- TooManyRequests: 429,
52
- RequestHeaderFieldsTooLarge: 431,
53
- UnavailableForLegalReasons: 451,
54
- InternalServerError: 500,
55
- NotImplemented: 501,
56
- BadGateway: 502,
57
- ServiceUnavailable: 503,
58
- GatewayTimeout: 504,
59
- HttpVersionNotSupported: 505,
60
- VariantAlsoNegotiates: 506,
61
- InsufficientStorage: 507,
62
- LoopDetected: 508,
63
- NotExtended: 510,
64
- NetworkAuthenticationRequired: 511
65
- };
66
- Object.entries(HttpStatusCode).forEach(([key, value]) => {
67
- HttpStatusCode[value] = key;
68
- });
1
+ import { Coder } from "./standards-sdk.es62.js";
2
+ const Empty = new Uint8Array([]);
3
+ class NullCoder extends Coder {
4
+ constructor(localName) {
5
+ super("null", "", localName, false);
6
+ }
7
+ defaultValue() {
8
+ return null;
9
+ }
10
+ encode(writer, value) {
11
+ if (value != null) {
12
+ this._throwError("not null", value);
13
+ }
14
+ return writer.writeBytes(Empty);
15
+ }
16
+ decode(reader) {
17
+ reader.readBytes(0);
18
+ return null;
19
+ }
20
+ }
69
21
  export {
70
- HttpStatusCode as default
22
+ NullCoder
71
23
  };
72
24
  //# sourceMappingURL=standards-sdk.es68.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es68.js","sources":["../../node_modules/axios/lib/helpers/HttpStatusCode.js"],"sourcesContent":["const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n"],"names":[],"mappings":"AAAK,MAAC,iBAAiB;AAAA,EACrB,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,UAAU;AAAA,EACV,6BAA6B;AAAA,EAC7B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,aAAa;AAAA,EACb,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,6BAA6B;AAAA,EAC7B,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,6BAA6B;AAAA,EAC7B,4BAA4B;AAAA,EAC5B,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,yBAAyB;AAAA,EACzB,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,+BAA+B;AACjC;AAEA,OAAO,QAAQ,cAAc,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AACvD,iBAAe,KAAK,IAAI;AAC1B,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es68.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/null.js"],"sourcesContent":["import { Coder } from \"./abstract-coder.js\";\nconst Empty = new Uint8Array([]);\n/**\n * @_ignore\n */\nexport class NullCoder extends Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n}\n//# sourceMappingURL=null.js.map"],"names":[],"mappings":";AACA,MAAM,QAAQ,IAAI,WAAW,EAAE;AAIxB,MAAM,kBAAkB,MAAM;AAAA,EACjC,YAAY,WAAW;AACnB,UAAM,QAAQ,IAAI,WAAW,KAAK;AAAA,EAC1C;AAAA,EACI,eAAe;AACX,WAAO;AAAA,EACf;AAAA,EACI,OAAO,QAAQ,OAAO;AAClB,QAAI,SAAS,MAAM;AACf,WAAK,YAAY,YAAY,KAAK;AAAA,IAC9C;AACQ,WAAO,OAAO,WAAW,KAAK;AAAA,EACtC;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,UAAU,CAAC;AAClB,WAAO;AAAA,EACf;AACA;","x_google_ignoreList":[0]}
@@ -1,177 +1,47 @@
1
- import { number, exists, bytes, output } from "./standards-sdk.es89.js";
2
- import { rotlSH, rotlSL, rotlBH, rotlBL, split } from "./standards-sdk.es90.js";
3
- import { wrapConstructor, Hash, u32, toBytes } from "./standards-sdk.es91.js";
4
- const [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];
5
- const _0n = /* @__PURE__ */ BigInt(0);
6
- const _1n = /* @__PURE__ */ BigInt(1);
7
- const _2n = /* @__PURE__ */ BigInt(2);
8
- const _7n = /* @__PURE__ */ BigInt(7);
9
- const _256n = /* @__PURE__ */ BigInt(256);
10
- const _0x71n = /* @__PURE__ */ BigInt(113);
11
- for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
12
- [x, y] = [y, (2 * x + 3 * y) % 5];
13
- SHA3_PI.push(2 * (5 * y + x));
14
- SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
15
- let t = _0n;
16
- for (let j = 0; j < 7; j++) {
17
- R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
18
- if (R & _2n)
19
- t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
20
- }
21
- _SHA3_IOTA.push(t);
22
- }
23
- const [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);
24
- const rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);
25
- const rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);
26
- function keccakP(s, rounds = 24) {
27
- const B = new Uint32Array(5 * 2);
28
- for (let round = 24 - rounds; round < 24; round++) {
29
- for (let x = 0; x < 10; x++)
30
- B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
31
- for (let x = 0; x < 10; x += 2) {
32
- const idx1 = (x + 8) % 10;
33
- const idx0 = (x + 2) % 10;
34
- const B0 = B[idx0];
35
- const B1 = B[idx0 + 1];
36
- const Th = rotlH(B0, B1, 1) ^ B[idx1];
37
- const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
38
- for (let y = 0; y < 50; y += 10) {
39
- s[x + y] ^= Th;
40
- s[x + y + 1] ^= Tl;
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { Typed } from "./standards-sdk.es76.js";
5
+ import { Coder, WordSize } from "./standards-sdk.es62.js";
6
+ import { defineProperties } from "./standards-sdk.es73.js";
7
+ import { getBigInt, mask, toTwos, fromTwos } from "./standards-sdk.es75.js";
8
+ const BN_0 = BigInt(0);
9
+ const BN_1 = BigInt(1);
10
+ const BN_MAX_UINT256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
11
+ class NumberCoder extends Coder {
12
+ constructor(size, signed, localName) {
13
+ const name = (signed ? "int" : "uint") + size * 8;
14
+ super(name, name, localName, false);
15
+ __publicField(this, "size");
16
+ __publicField(this, "signed");
17
+ defineProperties(this, { size, signed }, { size: "number", signed: "boolean" });
18
+ }
19
+ defaultValue() {
20
+ return 0;
21
+ }
22
+ encode(writer, _value) {
23
+ let value = getBigInt(Typed.dereference(_value, this.type));
24
+ let maxUintValue = mask(BN_MAX_UINT256, WordSize * 8);
25
+ if (this.signed) {
26
+ let bounds = mask(maxUintValue, this.size * 8 - 1);
27
+ if (value > bounds || value < -(bounds + BN_1)) {
28
+ this._throwError("value out-of-bounds", _value);
41
29
  }
30
+ value = toTwos(value, 8 * WordSize);
31
+ } else if (value < BN_0 || value > mask(maxUintValue, this.size * 8)) {
32
+ this._throwError("value out-of-bounds", _value);
42
33
  }
43
- let curH = s[2];
44
- let curL = s[3];
45
- for (let t = 0; t < 24; t++) {
46
- const shift = SHA3_ROTL[t];
47
- const Th = rotlH(curH, curL, shift);
48
- const Tl = rotlL(curH, curL, shift);
49
- const PI = SHA3_PI[t];
50
- curH = s[PI];
51
- curL = s[PI + 1];
52
- s[PI] = Th;
53
- s[PI + 1] = Tl;
54
- }
55
- for (let y = 0; y < 50; y += 10) {
56
- for (let x = 0; x < 10; x++)
57
- B[x] = s[y + x];
58
- for (let x = 0; x < 10; x++)
59
- s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
60
- }
61
- s[0] ^= SHA3_IOTA_H[round];
62
- s[1] ^= SHA3_IOTA_L[round];
63
- }
64
- B.fill(0);
65
- }
66
- class Keccak extends Hash {
67
- // NOTE: we accept arguments in bytes instead of bits here.
68
- constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
69
- super();
70
- this.blockLen = blockLen;
71
- this.suffix = suffix;
72
- this.outputLen = outputLen;
73
- this.enableXOF = enableXOF;
74
- this.rounds = rounds;
75
- this.pos = 0;
76
- this.posOut = 0;
77
- this.finished = false;
78
- this.destroyed = false;
79
- number(outputLen);
80
- if (0 >= this.blockLen || this.blockLen >= 200)
81
- throw new Error("Sha3 supports only keccak-f1600 function");
82
- this.state = new Uint8Array(200);
83
- this.state32 = u32(this.state);
84
- }
85
- keccak() {
86
- keccakP(this.state32, this.rounds);
87
- this.posOut = 0;
88
- this.pos = 0;
89
- }
90
- update(data) {
91
- exists(this);
92
- const { blockLen, state } = this;
93
- data = toBytes(data);
94
- const len = data.length;
95
- for (let pos = 0; pos < len; ) {
96
- const take = Math.min(blockLen - this.pos, len - pos);
97
- for (let i = 0; i < take; i++)
98
- state[this.pos++] ^= data[pos++];
99
- if (this.pos === blockLen)
100
- this.keccak();
101
- }
102
- return this;
103
- }
104
- finish() {
105
- if (this.finished)
106
- return;
107
- this.finished = true;
108
- const { state, suffix, pos, blockLen } = this;
109
- state[pos] ^= suffix;
110
- if ((suffix & 128) !== 0 && pos === blockLen - 1)
111
- this.keccak();
112
- state[blockLen - 1] ^= 128;
113
- this.keccak();
34
+ return writer.writeValue(value);
114
35
  }
115
- writeInto(out) {
116
- exists(this, false);
117
- bytes(out);
118
- this.finish();
119
- const bufferOut = this.state;
120
- const { blockLen } = this;
121
- for (let pos = 0, len = out.length; pos < len; ) {
122
- if (this.posOut >= blockLen)
123
- this.keccak();
124
- const take = Math.min(blockLen - this.posOut, len - pos);
125
- out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
126
- this.posOut += take;
127
- pos += take;
36
+ decode(reader) {
37
+ let value = mask(reader.readValue(), this.size * 8);
38
+ if (this.signed) {
39
+ value = fromTwos(value, this.size * 8);
128
40
  }
129
- return out;
130
- }
131
- xofInto(out) {
132
- if (!this.enableXOF)
133
- throw new Error("XOF is not possible for this instance");
134
- return this.writeInto(out);
135
- }
136
- xof(bytes2) {
137
- number(bytes2);
138
- return this.xofInto(new Uint8Array(bytes2));
139
- }
140
- digestInto(out) {
141
- output(out, this);
142
- if (this.finished)
143
- throw new Error("digest() was already called");
144
- this.writeInto(out);
145
- this.destroy();
146
- return out;
147
- }
148
- digest() {
149
- return this.digestInto(new Uint8Array(this.outputLen));
150
- }
151
- destroy() {
152
- this.destroyed = true;
153
- this.state.fill(0);
154
- }
155
- _cloneInto(to) {
156
- const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
157
- to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
158
- to.state32.set(this.state32);
159
- to.pos = this.pos;
160
- to.posOut = this.posOut;
161
- to.finished = this.finished;
162
- to.rounds = rounds;
163
- to.suffix = suffix;
164
- to.outputLen = outputLen;
165
- to.enableXOF = enableXOF;
166
- to.destroyed = this.destroyed;
167
- return to;
41
+ return value;
168
42
  }
169
43
  }
170
- const gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));
171
- const keccak_256 = /* @__PURE__ */ gen(1, 136, 256 / 8);
172
44
  export {
173
- Keccak,
174
- keccakP,
175
- keccak_256
45
+ NumberCoder
176
46
  };
177
47
  //# sourceMappingURL=standards-sdk.es69.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es69.js","sources":["../../node_modules/@noble/hashes/esm/sha3.js"],"sourcesContent":["import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));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,WAAW,WAAW,MAAM;AACrE,OAAG,QAAQ,IAAI,KAAK,OAAO;AAC3B,OAAG,MAAM,KAAK;AACd,OAAG,SAAS,KAAK;AACjB,OAAG,WAAW,KAAK;AACnB,OAAG,SAAS;AAEZ,OAAG,SAAS;AACZ,OAAG,YAAY;AACf,OAAG,YAAY;AACf,OAAG,YAAY,KAAK;AACpB,WAAO;AAAA,EACf;AACA;AACA,MAAM,MAAM,CAAC,QAAQ,UAAU,cAAc,gBAAgB,MAAM,IAAI,OAAO,UAAU,QAAQ,SAAS,CAAC;AAc9F,MAAC,aAA6B,oBAAI,GAAM,KAAK,MAAM,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es69.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/number.js"],"sourcesContent":["import { defineProperties, fromTwos, getBigInt, mask, toTwos } from \"../../utils/index.js\";\nimport { Typed } from \"../typed.js\";\nimport { Coder, WordSize } from \"./abstract-coder.js\";\nconst BN_0 = BigInt(0);\nconst BN_1 = BigInt(1);\nconst BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n/**\n * @_ignore\n */\nexport class NumberCoder extends Coder {\n size;\n signed;\n constructor(size, signed, localName) {\n const name = ((signed ? \"int\" : \"uint\") + (size * 8));\n super(name, name, localName, false);\n defineProperties(this, { size, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = getBigInt(Typed.dereference(_value, this.type));\n // Check bounds are safe for encoding\n let maxUintValue = mask(BN_MAX_UINT256, WordSize * 8);\n if (this.signed) {\n let bounds = mask(maxUintValue, (this.size * 8) - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = toTwos(value, 8 * WordSize);\n }\n else if (value < BN_0 || value > mask(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = mask(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = fromTwos(value, this.size * 8);\n }\n return value;\n }\n}\n//# sourceMappingURL=number.js.map"],"names":[],"mappings":";;;;;;;AAGA,MAAM,OAAO,OAAO,CAAC;AACrB,MAAM,OAAO,OAAO,CAAC;AACrB,MAAM,iBAAiB,OAAO,oEAAoE;AAI3F,MAAM,oBAAoB,MAAM;AAAA,EAGnC,YAAY,MAAM,QAAQ,WAAW;AACjC,UAAM,QAAS,SAAS,QAAQ,UAAW,OAAO;AAClD,UAAM,MAAM,MAAM,WAAW,KAAK;AAJtC;AACA;AAII,qBAAiB,MAAM,EAAE,MAAM,OAAM,GAAI,EAAE,MAAM,UAAU,QAAQ,WAAW;AAAA,EACtF;AAAA,EACI,eAAe;AACX,WAAO;AAAA,EACf;AAAA,EACI,OAAO,QAAQ,QAAQ;AACnB,QAAI,QAAQ,UAAU,MAAM,YAAY,QAAQ,KAAK,IAAI,CAAC;AAE1D,QAAI,eAAe,KAAK,gBAAgB,WAAW,CAAC;AACpD,QAAI,KAAK,QAAQ;AACb,UAAI,SAAS,KAAK,cAAe,KAAK,OAAO,IAAK,CAAC;AACnD,UAAI,QAAQ,UAAU,QAAQ,EAAE,SAAS,OAAO;AAC5C,aAAK,YAAY,uBAAuB,MAAM;AAAA,MAC9D;AACY,cAAQ,OAAO,OAAO,IAAI,QAAQ;AAAA,IAC9C,WACiB,QAAQ,QAAQ,QAAQ,KAAK,cAAc,KAAK,OAAO,CAAC,GAAG;AAChE,WAAK,YAAY,uBAAuB,MAAM;AAAA,IAC1D;AACQ,WAAO,OAAO,WAAW,KAAK;AAAA,EACtC;AAAA,EACI,OAAO,QAAQ;AACX,QAAI,QAAQ,KAAK,OAAO,UAAS,GAAI,KAAK,OAAO,CAAC;AAClD,QAAI,KAAK,QAAQ;AACb,cAAQ,SAAS,OAAO,KAAK,OAAO,CAAC;AAAA,IACjD;AACQ,WAAO;AAAA,EACf;AACA;","x_google_ignoreList":[0]}
@@ -1,10 +1,10 @@
1
1
  import Buffer from "./standards-sdk.es22.js";
2
2
  import { Client, PrivateKey, AccountCreateTransaction, Hbar, CustomFixedFee, AccountId, TokenId, KeyList, TopicCreateTransaction, PublicKey, TopicMessageSubmitTransaction, TopicId, Transaction } from "@hashgraph/sdk";
3
3
  import { AccountCreationError, TopicCreationError, ConnectionConfirmationError, PayloadSizeError } from "./standards-sdk.es6.js";
4
- import { I as InscriptionSDK } from "./standards-sdk.es25.js";
4
+ import { I as InscriptionSDK } from "./standards-sdk.es23.js";
5
5
  import { Logger } from "./standards-sdk.es15.js";
6
6
  import { HCS10BaseClient, Hcs10MemoType } from "./standards-sdk.es5.js";
7
- import { m as mimeTypesExports } from "./standards-sdk.es26.js";
7
+ import { m as mimeTypesExports } from "./standards-sdk.es27.js";
8
8
  import { InboundTopicType } from "./standards-sdk.es14.js";
9
9
  import { HCS11Client } from "./standards-sdk.es13.js";
10
10
  import { accountIdsToExemptKeys } from "./standards-sdk.es16.js";
@@ -1,146 +1,21 @@
1
- import { getBytes } from "./standards-sdk.es45.js";
2
- import { assertArgument } from "./standards-sdk.es44.js";
3
- function errorFunc(reason, offset, bytes, output, badCodepoint) {
4
- assertArgument(false, `invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes);
5
- }
6
- function ignoreFunc(reason, offset, bytes, output, badCodepoint) {
7
- if (reason === "BAD_PREFIX" || reason === "UNEXPECTED_CONTINUE") {
8
- let i = 0;
9
- for (let o = offset + 1; o < bytes.length; o++) {
10
- if (bytes[o] >> 6 !== 2) {
11
- break;
12
- }
13
- i++;
14
- }
15
- return i;
16
- }
17
- if (reason === "OVERRUN") {
18
- return bytes.length - offset - 1;
19
- }
20
- return 0;
21
- }
22
- function replaceFunc(reason, offset, bytes, output, badCodepoint) {
23
- if (reason === "OVERLONG") {
24
- assertArgument(typeof badCodepoint === "number", "invalid bad code point for replacement", "badCodepoint", badCodepoint);
25
- output.push(badCodepoint);
26
- return 0;
1
+ import { toUtf8Bytes, toUtf8String } from "./standards-sdk.es78.js";
2
+ import { Typed } from "./standards-sdk.es76.js";
3
+ import { DynamicBytesCoder } from "./standards-sdk.es66.js";
4
+ class StringCoder extends DynamicBytesCoder {
5
+ constructor(localName) {
6
+ super("string", localName);
27
7
  }
28
- output.push(65533);
29
- return ignoreFunc(reason, offset, bytes);
30
- }
31
- const Utf8ErrorFuncs = Object.freeze({
32
- error: errorFunc,
33
- ignore: ignoreFunc,
34
- replace: replaceFunc
35
- });
36
- function getUtf8CodePoints(_bytes, onError) {
37
- if (onError == null) {
38
- onError = Utf8ErrorFuncs.error;
8
+ defaultValue() {
9
+ return "";
39
10
  }
40
- const bytes = getBytes(_bytes, "bytes");
41
- const result = [];
42
- let i = 0;
43
- while (i < bytes.length) {
44
- const c = bytes[i++];
45
- if (c >> 7 === 0) {
46
- result.push(c);
47
- continue;
48
- }
49
- let extraLength = null;
50
- let overlongMask = null;
51
- if ((c & 224) === 192) {
52
- extraLength = 1;
53
- overlongMask = 127;
54
- } else if ((c & 240) === 224) {
55
- extraLength = 2;
56
- overlongMask = 2047;
57
- } else if ((c & 248) === 240) {
58
- extraLength = 3;
59
- overlongMask = 65535;
60
- } else {
61
- if ((c & 192) === 128) {
62
- i += onError("UNEXPECTED_CONTINUE", i - 1, bytes, result);
63
- } else {
64
- i += onError("BAD_PREFIX", i - 1, bytes, result);
65
- }
66
- continue;
67
- }
68
- if (i - 1 + extraLength >= bytes.length) {
69
- i += onError("OVERRUN", i - 1, bytes, result);
70
- continue;
71
- }
72
- let res = c & (1 << 8 - extraLength - 1) - 1;
73
- for (let j = 0; j < extraLength; j++) {
74
- let nextChar = bytes[i];
75
- if ((nextChar & 192) != 128) {
76
- i += onError("MISSING_CONTINUE", i, bytes, result);
77
- res = null;
78
- break;
79
- }
80
- res = res << 6 | nextChar & 63;
81
- i++;
82
- }
83
- if (res === null) {
84
- continue;
85
- }
86
- if (res > 1114111) {
87
- i += onError("OUT_OF_RANGE", i - 1 - extraLength, bytes, result, res);
88
- continue;
89
- }
90
- if (res >= 55296 && res <= 57343) {
91
- i += onError("UTF16_SURROGATE", i - 1 - extraLength, bytes, result, res);
92
- continue;
93
- }
94
- if (res <= overlongMask) {
95
- i += onError("OVERLONG", i - 1 - extraLength, bytes, result, res);
96
- continue;
97
- }
98
- result.push(res);
11
+ encode(writer, _value) {
12
+ return super.encode(writer, toUtf8Bytes(Typed.dereference(_value, "string")));
99
13
  }
100
- return result;
101
- }
102
- function toUtf8Bytes(str, form) {
103
- assertArgument(typeof str === "string", "invalid string value", "str", str);
104
- let result = [];
105
- for (let i = 0; i < str.length; i++) {
106
- const c = str.charCodeAt(i);
107
- if (c < 128) {
108
- result.push(c);
109
- } else if (c < 2048) {
110
- result.push(c >> 6 | 192);
111
- result.push(c & 63 | 128);
112
- } else if ((c & 64512) == 55296) {
113
- i++;
114
- const c2 = str.charCodeAt(i);
115
- assertArgument(i < str.length && (c2 & 64512) === 56320, "invalid surrogate pair", "str", str);
116
- const pair = 65536 + ((c & 1023) << 10) + (c2 & 1023);
117
- result.push(pair >> 18 | 240);
118
- result.push(pair >> 12 & 63 | 128);
119
- result.push(pair >> 6 & 63 | 128);
120
- result.push(pair & 63 | 128);
121
- } else {
122
- result.push(c >> 12 | 224);
123
- result.push(c >> 6 & 63 | 128);
124
- result.push(c & 63 | 128);
125
- }
14
+ decode(reader) {
15
+ return toUtf8String(super.decode(reader));
126
16
  }
127
- return new Uint8Array(result);
128
- }
129
- function _toUtf8String(codePoints) {
130
- return codePoints.map((codePoint) => {
131
- if (codePoint <= 65535) {
132
- return String.fromCharCode(codePoint);
133
- }
134
- codePoint -= 65536;
135
- return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);
136
- }).join("");
137
- }
138
- function toUtf8String(bytes, onError) {
139
- return _toUtf8String(getUtf8CodePoints(bytes, onError));
140
17
  }
141
18
  export {
142
- Utf8ErrorFuncs,
143
- toUtf8Bytes,
144
- toUtf8String
19
+ StringCoder
145
20
  };
146
21
  //# sourceMappingURL=standards-sdk.es70.js.map