@hashgraphonline/standards-sdk 0.0.80 → 0.0.82

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 (199) hide show
  1. package/dist/es/hcs-10/browser.d.ts.map +1 -1
  2. package/dist/es/standards-sdk.es100.js +32 -2
  3. package/dist/es/standards-sdk.es100.js.map +1 -1
  4. package/dist/es/standards-sdk.es101.js +14 -15
  5. package/dist/es/standards-sdk.es101.js.map +1 -1
  6. package/dist/es/standards-sdk.es102.js +3 -408
  7. package/dist/es/standards-sdk.es102.js.map +1 -1
  8. package/dist/es/standards-sdk.es103.js +3 -173
  9. package/dist/es/standards-sdk.es103.js.map +1 -1
  10. package/dist/es/standards-sdk.es104.js +14 -141
  11. package/dist/es/standards-sdk.es104.js.map +1 -1
  12. package/dist/es/standards-sdk.es105.js +5 -3
  13. package/dist/es/standards-sdk.es105.js.map +1 -1
  14. package/dist/es/standards-sdk.es106.js +39 -2
  15. package/dist/es/standards-sdk.es106.js.map +1 -1
  16. package/dist/es/standards-sdk.es107.js +40 -2
  17. package/dist/es/standards-sdk.es107.js.map +1 -1
  18. package/dist/es/standards-sdk.es108.js +37 -34
  19. package/dist/es/standards-sdk.es108.js.map +1 -1
  20. package/dist/es/standards-sdk.es109.js +74 -29
  21. package/dist/es/standards-sdk.es109.js.map +1 -1
  22. package/dist/es/standards-sdk.es110.js +3 -9
  23. package/dist/es/standards-sdk.es110.js.map +1 -1
  24. package/dist/es/standards-sdk.es111.js +2 -34
  25. package/dist/es/standards-sdk.es111.js.map +1 -1
  26. package/dist/es/standards-sdk.es112.js +2 -2282
  27. package/dist/es/standards-sdk.es112.js.map +1 -1
  28. package/dist/es/standards-sdk.es113.js +33 -20
  29. package/dist/es/standards-sdk.es113.js.map +1 -1
  30. package/dist/es/standards-sdk.es114.js +32 -26
  31. package/dist/es/standards-sdk.es114.js.map +1 -1
  32. package/dist/es/standards-sdk.es115.js +9 -26
  33. package/dist/es/standards-sdk.es115.js.map +1 -1
  34. package/dist/es/standards-sdk.es116.js +33 -37
  35. package/dist/es/standards-sdk.es116.js.map +1 -1
  36. package/dist/es/standards-sdk.es12.js +3 -3
  37. package/dist/es/standards-sdk.es17.js +2 -2
  38. package/dist/es/standards-sdk.es18.js +3 -3
  39. package/dist/es/standards-sdk.es21.js +1692 -966
  40. package/dist/es/standards-sdk.es21.js.map +1 -1
  41. package/dist/es/standards-sdk.es22.js +36 -1767
  42. package/dist/es/standards-sdk.es22.js.map +1 -1
  43. package/dist/es/standards-sdk.es23.js +48 -36
  44. package/dist/es/standards-sdk.es23.js.map +1 -1
  45. package/dist/es/standards-sdk.es24.js +7163 -21
  46. package/dist/es/standards-sdk.es24.js.map +1 -1
  47. package/dist/es/standards-sdk.es25.js +3 -7190
  48. package/dist/es/standards-sdk.es25.js.map +1 -1
  49. package/dist/es/standards-sdk.es26.js +2 -3
  50. package/dist/es/standards-sdk.es26.js.map +1 -1
  51. package/dist/es/standards-sdk.es27.js +4167 -2
  52. package/dist/es/standards-sdk.es27.js.map +1 -1
  53. package/dist/es/standards-sdk.es28.js +961 -4087
  54. package/dist/es/standards-sdk.es28.js.map +1 -1
  55. package/dist/es/standards-sdk.es29.js +1 -1
  56. package/dist/es/standards-sdk.es33.js +2 -364
  57. package/dist/es/standards-sdk.es33.js.map +1 -1
  58. package/dist/es/standards-sdk.es34.js +3 -5
  59. package/dist/es/standards-sdk.es34.js.map +1 -1
  60. package/dist/es/standards-sdk.es35.js +77 -172
  61. package/dist/es/standards-sdk.es35.js.map +1 -1
  62. package/dist/es/standards-sdk.es36.js +22 -80
  63. package/dist/es/standards-sdk.es36.js.map +1 -1
  64. package/dist/es/standards-sdk.es37.js +136 -102
  65. package/dist/es/standards-sdk.es37.js.map +1 -1
  66. package/dist/es/standards-sdk.es38.js +85 -46
  67. package/dist/es/standards-sdk.es38.js.map +1 -1
  68. package/dist/es/standards-sdk.es39.js +7136 -10
  69. package/dist/es/standards-sdk.es39.js.map +1 -1
  70. package/dist/es/standards-sdk.es4.js +1 -1
  71. package/dist/es/standards-sdk.es40.js +179 -81
  72. package/dist/es/standards-sdk.es40.js.map +1 -1
  73. package/dist/es/standards-sdk.es41.js +437 -3
  74. package/dist/es/standards-sdk.es41.js.map +1 -1
  75. package/dist/es/standards-sdk.es42.js +25 -2
  76. package/dist/es/standards-sdk.es42.js.map +1 -1
  77. package/dist/es/standards-sdk.es43.js +127 -101
  78. package/dist/es/standards-sdk.es43.js.map +1 -1
  79. package/dist/es/standards-sdk.es44.js +15 -71
  80. package/dist/es/standards-sdk.es44.js.map +1 -1
  81. package/dist/es/standards-sdk.es45.js +28 -5
  82. package/dist/es/standards-sdk.es45.js.map +1 -1
  83. package/dist/es/standards-sdk.es46.js +28 -4
  84. package/dist/es/standards-sdk.es46.js.map +1 -1
  85. package/dist/es/standards-sdk.es47.js +15 -215
  86. package/dist/es/standards-sdk.es47.js.map +1 -1
  87. package/dist/es/standards-sdk.es48.js +40 -54
  88. package/dist/es/standards-sdk.es48.js.map +1 -1
  89. package/dist/es/standards-sdk.es49.js +18 -69
  90. package/dist/es/standards-sdk.es49.js.map +1 -1
  91. package/dist/es/standards-sdk.es5.js +3 -3
  92. package/dist/es/standards-sdk.es50.js +60 -3
  93. package/dist/es/standards-sdk.es50.js.map +1 -1
  94. package/dist/es/standards-sdk.es51.js +1289 -3
  95. package/dist/es/standards-sdk.es51.js.map +1 -1
  96. package/dist/es/standards-sdk.es52.js +27 -159
  97. package/dist/es/standards-sdk.es52.js.map +1 -1
  98. package/dist/es/standards-sdk.es53.js +5 -31
  99. package/dist/es/standards-sdk.es53.js.map +1 -1
  100. package/dist/es/standards-sdk.es54.js +149 -53
  101. package/dist/es/standards-sdk.es54.js.map +1 -1
  102. package/dist/es/standards-sdk.es55.js +789 -46
  103. package/dist/es/standards-sdk.es55.js.map +1 -1
  104. package/dist/es/standards-sdk.es56.js +173 -9
  105. package/dist/es/standards-sdk.es56.js.map +1 -1
  106. package/dist/es/standards-sdk.es57.js +133 -55
  107. package/dist/es/standards-sdk.es57.js.map +1 -1
  108. package/dist/es/standards-sdk.es58.js +3 -6
  109. package/dist/es/standards-sdk.es58.js.map +1 -1
  110. package/dist/es/standards-sdk.es59.js +361 -12
  111. package/dist/es/standards-sdk.es59.js.map +1 -1
  112. package/dist/es/standards-sdk.es60.js +6 -7
  113. package/dist/es/standards-sdk.es60.js.map +1 -1
  114. package/dist/es/standards-sdk.es61.js +175 -41
  115. package/dist/es/standards-sdk.es61.js.map +1 -1
  116. package/dist/es/standards-sdk.es62.js +81 -2
  117. package/dist/es/standards-sdk.es62.js.map +1 -1
  118. package/dist/es/standards-sdk.es63.js +101 -123
  119. package/dist/es/standards-sdk.es63.js.map +1 -1
  120. package/dist/es/standards-sdk.es64.js +45 -165
  121. package/dist/es/standards-sdk.es64.js.map +1 -1
  122. package/dist/es/standards-sdk.es65.js +10 -2
  123. package/dist/es/standards-sdk.es65.js.map +1 -1
  124. package/dist/es/standards-sdk.es66.js +97 -13
  125. package/dist/es/standards-sdk.es66.js.map +1 -1
  126. package/dist/es/standards-sdk.es67.js +4 -13
  127. package/dist/es/standards-sdk.es67.js.map +1 -1
  128. package/dist/es/standards-sdk.es68.js +2 -7136
  129. package/dist/es/standards-sdk.es68.js.map +1 -1
  130. package/dist/es/standards-sdk.es69.js +111 -30
  131. package/dist/es/standards-sdk.es69.js.map +1 -1
  132. package/dist/es/standards-sdk.es7.js +3 -3
  133. package/dist/es/standards-sdk.es70.js +73 -14
  134. package/dist/es/standards-sdk.es70.js.map +1 -1
  135. package/dist/es/standards-sdk.es71.js +5 -3
  136. package/dist/es/standards-sdk.es71.js.map +1 -1
  137. package/dist/es/standards-sdk.es72.js +4 -3
  138. package/dist/es/standards-sdk.es72.js.map +1 -1
  139. package/dist/es/standards-sdk.es73.js +219 -14
  140. package/dist/es/standards-sdk.es73.js.map +1 -1
  141. package/dist/es/standards-sdk.es74.js +58 -5
  142. package/dist/es/standards-sdk.es74.js.map +1 -1
  143. package/dist/es/standards-sdk.es75.js +68 -38
  144. package/dist/es/standards-sdk.es75.js.map +1 -1
  145. package/dist/es/standards-sdk.es76.js +18 -37
  146. package/dist/es/standards-sdk.es76.js.map +1 -1
  147. package/dist/es/standards-sdk.es77.js +26 -36
  148. package/dist/es/standards-sdk.es77.js.map +1 -1
  149. package/dist/es/standards-sdk.es78.js +25 -77
  150. package/dist/es/standards-sdk.es78.js.map +1 -1
  151. package/dist/es/standards-sdk.es79.js +36 -193
  152. package/dist/es/standards-sdk.es79.js.map +1 -1
  153. package/dist/es/standards-sdk.es8.js +11 -7
  154. package/dist/es/standards-sdk.es8.js.map +1 -1
  155. package/dist/es/standards-sdk.es80.js +86 -423
  156. package/dist/es/standards-sdk.es80.js.map +1 -1
  157. package/dist/es/standards-sdk.es81.js +2 -25
  158. package/dist/es/standards-sdk.es81.js.map +1 -1
  159. package/dist/es/standards-sdk.es82.js +15 -138
  160. package/dist/es/standards-sdk.es82.js.map +1 -1
  161. package/dist/es/standards-sdk.es83.js +405 -14
  162. package/dist/es/standards-sdk.es83.js.map +1 -1
  163. package/dist/es/standards-sdk.es84.js +156 -21
  164. package/dist/es/standards-sdk.es84.js.map +1 -1
  165. package/dist/es/standards-sdk.es85.js +27 -24
  166. package/dist/es/standards-sdk.es85.js.map +1 -1
  167. package/dist/es/standards-sdk.es86.js +57 -15
  168. package/dist/es/standards-sdk.es86.js.map +1 -1
  169. package/dist/es/standards-sdk.es87.js +45 -39
  170. package/dist/es/standards-sdk.es87.js.map +1 -1
  171. package/dist/es/standards-sdk.es88.js +9 -17
  172. package/dist/es/standards-sdk.es88.js.map +1 -1
  173. package/dist/es/standards-sdk.es89.js +61 -57
  174. package/dist/es/standards-sdk.es89.js.map +1 -1
  175. package/dist/es/standards-sdk.es9.js +1 -1
  176. package/dist/es/standards-sdk.es90.js +5 -1288
  177. package/dist/es/standards-sdk.es90.js.map +1 -1
  178. package/dist/es/standards-sdk.es91.js +12 -145
  179. package/dist/es/standards-sdk.es91.js.map +1 -1
  180. package/dist/es/standards-sdk.es92.js +7 -91
  181. package/dist/es/standards-sdk.es92.js.map +1 -1
  182. package/dist/es/standards-sdk.es93.js +43 -82
  183. package/dist/es/standards-sdk.es93.js.map +1 -1
  184. package/dist/es/standards-sdk.es94.js +2 -32
  185. package/dist/es/standards-sdk.es94.js.map +1 -1
  186. package/dist/es/standards-sdk.es95.js +136 -6
  187. package/dist/es/standards-sdk.es95.js.map +1 -1
  188. package/dist/es/standards-sdk.es96.js +161 -148
  189. package/dist/es/standards-sdk.es96.js.map +1 -1
  190. package/dist/es/standards-sdk.es97.js +2281 -22
  191. package/dist/es/standards-sdk.es97.js.map +1 -1
  192. package/dist/es/standards-sdk.es98.js +12 -792
  193. package/dist/es/standards-sdk.es98.js.map +1 -1
  194. package/dist/es/standards-sdk.es99.js +13 -101
  195. package/dist/es/standards-sdk.es99.js.map +1 -1
  196. package/dist/umd/hcs-10/browser.d.ts.map +1 -1
  197. package/dist/umd/standards-sdk.umd.js +1 -1
  198. package/dist/umd/standards-sdk.umd.js.map +1 -1
  199. package/package.json +1 -1
@@ -1,198 +1,41 @@
1
- var __typeError = (msg) => {
2
- throw TypeError(msg);
3
- };
4
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
6
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
7
- var _AbiCoder_instances, getCoder_fn;
8
- import { Writer, Reader } from "./standards-sdk.es80.js";
9
- import { AddressCoder } from "./standards-sdk.es81.js";
10
- import { ArrayCoder } from "./standards-sdk.es82.js";
11
- import { BooleanCoder } from "./standards-sdk.es83.js";
12
- import { BytesCoder } from "./standards-sdk.es84.js";
13
- import { FixedBytesCoder } from "./standards-sdk.es85.js";
14
- import { NullCoder } from "./standards-sdk.es86.js";
15
- import { NumberCoder } from "./standards-sdk.es87.js";
16
- import { StringCoder } from "./standards-sdk.es88.js";
17
- import { TupleCoder } from "./standards-sdk.es89.js";
18
- import { ParamType } from "./standards-sdk.es90.js";
19
- import { assertArgument, assertArgumentCount, makeError } from "./standards-sdk.es91.js";
20
- import { getBytes, hexlify } from "./standards-sdk.es92.js";
21
- import { getAddress } from "./standards-sdk.es93.js";
22
- const PanicReasons = /* @__PURE__ */ new Map();
23
- PanicReasons.set(0, "GENERIC_PANIC");
24
- PanicReasons.set(1, "ASSERT_FALSE");
25
- PanicReasons.set(17, "OVERFLOW");
26
- PanicReasons.set(18, "DIVIDE_BY_ZERO");
27
- PanicReasons.set(33, "ENUM_RANGE_ERROR");
28
- PanicReasons.set(34, "BAD_STORAGE_DATA");
29
- PanicReasons.set(49, "STACK_UNDERFLOW");
30
- PanicReasons.set(50, "ARRAY_RANGE_ERROR");
31
- PanicReasons.set(65, "OUT_OF_MEMORY");
32
- PanicReasons.set(81, "UNINITIALIZED_FUNCTION_CALL");
33
- const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
34
- const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
35
- let defaultCoder = null;
36
- let defaultMaxInflation = 1024;
37
- function getBuiltinCallException(action, tx, data, abiCoder) {
38
- let message = "missing revert data";
39
- let reason = null;
40
- const invocation = null;
41
- let revert = null;
42
- if (data) {
43
- message = "execution reverted";
44
- const bytes = getBytes(data);
45
- data = hexlify(data);
46
- if (bytes.length === 0) {
47
- message += " (no data present; likely require(false) occurred";
48
- reason = "require(false)";
49
- } else if (bytes.length % 32 !== 4) {
50
- message += " (could not decode reason; invalid data length)";
51
- } else if (hexlify(bytes.slice(0, 4)) === "0x08c379a0") {
52
- try {
53
- reason = abiCoder.decode(["string"], bytes.slice(4))[0];
54
- revert = {
55
- signature: "Error(string)",
56
- name: "Error",
57
- args: [reason]
58
- };
59
- message += `: ${JSON.stringify(reason)}`;
60
- } catch (error) {
61
- message += " (could not decode reason; invalid string data)";
62
- }
63
- } else if (hexlify(bytes.slice(0, 4)) === "0x4e487b71") {
64
- try {
65
- const code = Number(abiCoder.decode(["uint256"], bytes.slice(4))[0]);
66
- revert = {
67
- signature: "Panic(uint256)",
68
- name: "Panic",
69
- args: [code]
70
- };
71
- reason = `Panic due to ${PanicReasons.get(code) || "UNKNOWN"}(${code})`;
72
- message += `: ${reason}`;
73
- } catch (error) {
74
- message += " (could not decode panic code)";
75
- }
76
- } else {
77
- message += " (unknown custom error)";
78
- }
79
- }
80
- const transaction = {
81
- to: tx.to ? getAddress(tx.to) : null,
82
- data: tx.data || "0x"
83
- };
84
- if (tx.from) {
85
- transaction.from = getAddress(tx.from);
86
- }
87
- return makeError(message, "CALL_EXCEPTION", {
88
- action,
89
- data,
90
- reason,
91
- transaction,
92
- invocation,
93
- revert
94
- });
1
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2
+ const u8a = (a) => a instanceof Uint8Array;
3
+ const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
4
+ const isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
5
+ if (!isLE)
6
+ throw new Error("Non little-endian hardware is not supported");
7
+ function utf8ToBytes(str) {
8
+ if (typeof str !== "string")
9
+ throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
10
+ return new Uint8Array(new TextEncoder().encode(str));
95
11
  }
96
- const _AbiCoder = class _AbiCoder {
97
- constructor() {
98
- __privateAdd(this, _AbiCoder_instances);
99
- }
100
- /**
101
- * Get the default values for the given %%types%%.
102
- *
103
- * For example, a ``uint`` is by default ``0`` and ``bool``
104
- * is by default ``false``.
105
- */
106
- getDefaultValue(types) {
107
- const coders = types.map((type) => __privateMethod(this, _AbiCoder_instances, getCoder_fn).call(this, ParamType.from(type)));
108
- const coder = new TupleCoder(coders, "_");
109
- return coder.defaultValue();
110
- }
111
- /**
112
- * Encode the %%values%% as the %%types%% into ABI data.
113
- *
114
- * @returns DataHexstring
115
- */
116
- encode(types, values) {
117
- assertArgumentCount(values.length, types.length, "types/values length mismatch");
118
- const coders = types.map((type) => __privateMethod(this, _AbiCoder_instances, getCoder_fn).call(this, ParamType.from(type)));
119
- const coder = new TupleCoder(coders, "_");
120
- const writer = new Writer();
121
- coder.encode(writer, values);
122
- return writer.data;
123
- }
124
- /**
125
- * Decode the ABI %%data%% as the %%types%% into values.
126
- *
127
- * If %%loose%% decoding is enabled, then strict padding is
128
- * not enforced. Some older versions of Solidity incorrectly
129
- * padded event data emitted from ``external`` functions.
130
- */
131
- decode(types, data, loose) {
132
- const coders = types.map((type) => __privateMethod(this, _AbiCoder_instances, getCoder_fn).call(this, ParamType.from(type)));
133
- const coder = new TupleCoder(coders, "_");
134
- return coder.decode(new Reader(data, loose, defaultMaxInflation));
135
- }
136
- static _setDefaultMaxInflation(value) {
137
- assertArgument(typeof value === "number" && Number.isInteger(value), "invalid defaultMaxInflation factor", "value", value);
138
- defaultMaxInflation = value;
139
- }
140
- /**
141
- * Returns the shared singleton instance of a default [[AbiCoder]].
142
- *
143
- * On the first call, the instance is created internally.
144
- */
145
- static defaultAbiCoder() {
146
- if (defaultCoder == null) {
147
- defaultCoder = new _AbiCoder();
148
- }
149
- return defaultCoder;
150
- }
151
- /**
152
- * Returns an ethers-compatible [[CallExceptionError]] Error for the given
153
- * result %%data%% for the [[CallExceptionAction]] %%action%% against
154
- * the Transaction %%tx%%.
155
- */
156
- static getBuiltinCallException(action, tx, data) {
157
- return getBuiltinCallException(action, tx, data, _AbiCoder.defaultAbiCoder());
158
- }
159
- };
160
- _AbiCoder_instances = new WeakSet();
161
- getCoder_fn = function(param) {
162
- if (param.isArray()) {
163
- return new ArrayCoder(__privateMethod(this, _AbiCoder_instances, getCoder_fn).call(this, param.arrayChildren), param.arrayLength, param.name);
164
- }
165
- if (param.isTuple()) {
166
- return new TupleCoder(param.components.map((c) => __privateMethod(this, _AbiCoder_instances, getCoder_fn).call(this, c)), param.name);
167
- }
168
- switch (param.baseType) {
169
- case "address":
170
- return new AddressCoder(param.name);
171
- case "bool":
172
- return new BooleanCoder(param.name);
173
- case "string":
174
- return new StringCoder(param.name);
175
- case "bytes":
176
- return new BytesCoder(param.name);
177
- case "":
178
- return new NullCoder(param.name);
179
- }
180
- let match = param.type.match(paramTypeNumber);
181
- if (match) {
182
- let size = parseInt(match[2] || "256");
183
- assertArgument(size !== 0 && size <= 256 && size % 8 === 0, "invalid " + match[1] + " bit length", "param", param);
184
- return new NumberCoder(size / 8, match[1] === "int", param.name);
185
- }
186
- match = param.type.match(paramTypeBytes);
187
- if (match) {
188
- let size = parseInt(match[1]);
189
- assertArgument(size !== 0 && size <= 32, "invalid bytes length", "param", param);
190
- return new FixedBytesCoder(size, param.name);
12
+ function toBytes(data) {
13
+ if (typeof data === "string")
14
+ data = utf8ToBytes(data);
15
+ if (!u8a(data))
16
+ throw new Error(`expected Uint8Array, got ${typeof data}`);
17
+ return data;
18
+ }
19
+ class Hash {
20
+ // Safe version that clones internal state
21
+ clone() {
22
+ return this._cloneInto();
191
23
  }
192
- assertArgument(false, "invalid type", "type", param.type);
193
- };
194
- let AbiCoder = _AbiCoder;
24
+ }
25
+ function wrapConstructor(hashCons) {
26
+ const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
27
+ const tmp = hashCons();
28
+ hashC.outputLen = tmp.outputLen;
29
+ hashC.blockLen = tmp.blockLen;
30
+ hashC.create = () => hashCons();
31
+ return hashC;
32
+ }
195
33
  export {
196
- AbiCoder
34
+ Hash,
35
+ isLE,
36
+ toBytes,
37
+ u32,
38
+ utf8ToBytes,
39
+ wrapConstructor
197
40
  };
198
41
  //# sourceMappingURL=standards-sdk.es79.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es79.js","sources":["../../node_modules/ethers/lib.esm/abi/abi-coder.js"],"sourcesContent":["/**\n * When sending values to or receiving values from a [[Contract]], the\n * data is generally encoded using the [ABI standard](link-solc-abi).\n *\n * The AbiCoder provides a utility to encode values to ABI data and\n * decode values from ABI data.\n *\n * Most of the time, developers should favour the [[Contract]] class,\n * which further abstracts a lot of the finer details of ABI data.\n *\n * @_section api/abi/abi-coder:ABI Encoding\n */\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\nimport { assertArgumentCount, assertArgument } from \"../utils/index.js\";\nimport { Reader, Writer } from \"./coders/abstract-coder.js\";\nimport { AddressCoder } from \"./coders/address.js\";\nimport { ArrayCoder } from \"./coders/array.js\";\nimport { BooleanCoder } from \"./coders/boolean.js\";\nimport { BytesCoder } from \"./coders/bytes.js\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes.js\";\nimport { NullCoder } from \"./coders/null.js\";\nimport { NumberCoder } from \"./coders/number.js\";\nimport { StringCoder } from \"./coders/string.js\";\nimport { TupleCoder } from \"./coders/tuple.js\";\nimport { ParamType } from \"./fragments.js\";\nimport { getAddress } from \"../address/index.js\";\nimport { getBytes, hexlify, makeError } from \"../utils/index.js\";\n// https://docs.soliditylang.org/en/v0.8.17/control-structures.html\nconst PanicReasons = new Map();\nPanicReasons.set(0x00, \"GENERIC_PANIC\");\nPanicReasons.set(0x01, \"ASSERT_FALSE\");\nPanicReasons.set(0x11, \"OVERFLOW\");\nPanicReasons.set(0x12, \"DIVIDE_BY_ZERO\");\nPanicReasons.set(0x21, \"ENUM_RANGE_ERROR\");\nPanicReasons.set(0x22, \"BAD_STORAGE_DATA\");\nPanicReasons.set(0x31, \"STACK_UNDERFLOW\");\nPanicReasons.set(0x32, \"ARRAY_RANGE_ERROR\");\nPanicReasons.set(0x41, \"OUT_OF_MEMORY\");\nPanicReasons.set(0x51, \"UNINITIALIZED_FUNCTION_CALL\");\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\nlet defaultCoder = null;\nlet defaultMaxInflation = 1024;\nfunction getBuiltinCallException(action, tx, data, abiCoder) {\n let message = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message = \"execution reverted\";\n const bytes = getBytes(data);\n data = hexlify(data);\n if (bytes.length === 0) {\n message += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n }\n else if (bytes.length % 32 !== 4) {\n message += \" (could not decode reason; invalid data length)\";\n }\n else if (hexlify(bytes.slice(0, 4)) === \"0x08c379a0\") {\n // Error(string)\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message += `: ${JSON.stringify(reason)}`;\n }\n catch (error) {\n message += \" (could not decode reason; invalid string data)\";\n }\n }\n else if (hexlify(bytes.slice(0, 4)) === \"0x4e487b71\") {\n // Panic(uint256)\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message += `: ${reason}`;\n }\n catch (error) {\n message += \" (could not decode panic code)\";\n }\n }\n else {\n message += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: (tx.to ? getAddress(tx.to) : null),\n data: (tx.data || \"0x\")\n };\n if (tx.from) {\n transaction.from = getAddress(tx.from);\n }\n return makeError(message, \"CALL_EXCEPTION\", {\n action, data, reason, transaction, invocation, revert\n });\n}\n/**\n * The **AbiCoder** is a low-level class responsible for encoding JavaScript\n * values into binary data and decoding binary data into JavaScript values.\n */\nexport class AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new TupleCoder(param.components.map((c) => this.#getCoder(c)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n assertArgument(size !== 0 && size <= 256 && (size % 8) === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n assertArgument(size !== 0 && size <= 32, \"invalid bytes length\", \"param\", param);\n return new FixedBytesCoder(size, param.name);\n }\n assertArgument(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types) {\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types, values) {\n assertArgumentCount(values.length, types.length, \"types/values length mismatch\");\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n const writer = new Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types, data, loose) {\n const coders = types.map((type) => this.#getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(new Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n assertArgument(typeof (value) === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, AbiCoder.defaultAbiCoder());\n }\n}\n//# sourceMappingURL=abi-coder.js.map"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es79.js","sources":["../../node_modules/@noble/hashes/esm/utils.js"],"sourcesContent":["/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map"],"names":[],"mappings":"AAAA;AAQA,MAAM,MAAM,CAAC,MAAM,aAAa;AAGpB,MAAC,MAAM,CAAC,QAAQ,IAAI,YAAY,IAAI,QAAQ,IAAI,YAAY,KAAK,MAAM,IAAI,aAAa,CAAC,CAAC;AAO1F,MAAC,OAAO,IAAI,WAAW,IAAI,YAAY,CAAC,SAAU,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM;AAChF,IAAI,CAAC;AACD,QAAM,IAAI,MAAM,6CAA6C;AAuD1D,SAAS,YAAY,KAAK;AAC7B,MAAI,OAAO,QAAQ;AACf,UAAM,IAAI,MAAM,oCAAoC,OAAO,GAAG,EAAE;AACpE,SAAO,IAAI,WAAW,IAAI,YAAa,EAAC,OAAO,GAAG,CAAC;AACvD;AAMO,SAAS,QAAQ,MAAM;AAC1B,MAAI,OAAO,SAAS;AAChB,WAAO,YAAY,IAAI;AAC3B,MAAI,CAAC,IAAI,IAAI;AACT,UAAM,IAAI,MAAM,4BAA4B,OAAO,IAAI,EAAE;AAC7D,SAAO;AACX;AAgBO,MAAM,KAAK;AAAA;AAAA,EAEd,QAAQ;AACJ,WAAO,KAAK,WAAY;AAAA,EAChC;AACA;AAQO,SAAS,gBAAgB,UAAU;AACtC,QAAM,QAAQ,CAAC,QAAQ,SAAU,EAAC,OAAO,QAAQ,GAAG,CAAC,EAAE,OAAQ;AAC/D,QAAM,MAAM,SAAU;AACtB,QAAM,YAAY,IAAI;AACtB,QAAM,WAAW,IAAI;AACrB,QAAM,SAAS,MAAM,SAAU;AAC/B,SAAO;AACX;","x_google_ignoreList":[0]}
@@ -1,9 +1,9 @@
1
- import Buffer from "./standards-sdk.es22.js";
1
+ import Buffer from "./standards-sdk.es21.js";
2
2
  import { KeyList, TopicCreateTransaction, AccountId, Transaction, TopicMessageSubmitTransaction, Hbar } from "@hashgraph/sdk";
3
3
  import { Logger } from "./standards-sdk.es14.js";
4
- import { I as InscriptionSDK } from "./standards-sdk.es25.js";
4
+ import { I as InscriptionSDK } from "./standards-sdk.es24.js";
5
5
  import { HCS10BaseClient, Hcs10MemoType } from "./standards-sdk.es5.js";
6
- import { m as mimeTypesExports } from "./standards-sdk.es26.js";
6
+ import { m as mimeTypesExports } from "./standards-sdk.es25.js";
7
7
  import { AgentBuilder } from "./standards-sdk.es10.js";
8
8
  import { HCS11Client } from "./standards-sdk.es12.js";
9
9
  import { ProgressReporter } from "./standards-sdk.es16.js";
@@ -957,13 +957,17 @@ class BrowserHCSClient extends HCS10BaseClient {
957
957
  return response.inscription;
958
958
  }
959
959
  getAccountAndSigner() {
960
- const accountInfo = this.hwc.getAccountInfo();
961
- const accountId = accountInfo.accountId.toString();
962
- const signer = this.hwc.dAppConnector.signers.find((s) => {
960
+ const accountInfo = this?.hwc?.getAccountInfo();
961
+ const accountId = accountInfo?.accountId?.toString();
962
+ const signer = this?.hwc?.dAppConnector?.signers?.find((s) => {
963
963
  return s.getAccountId().toString() === accountId;
964
964
  });
965
965
  if (!signer) {
966
- this.logger.error("Failed to find signer");
966
+ this.logger.error("Failed to find signer", {
967
+ accountId,
968
+ signers: this?.hwc?.dAppConnector?.signers,
969
+ accountInfo
970
+ });
967
971
  throw new Error("Failed to find signer");
968
972
  }
969
973
  return { accountId, signer };