@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,5 +1,5 @@
1
1
  import { HCS11Client } from "./standards-sdk.es13.js";
2
- import { sleep } from "./standards-sdk.es27.js";
2
+ import { sleep } from "./standards-sdk.es28.js";
3
3
  class Registration {
4
4
  /**
5
5
  * Checks the status of a registration request.
@@ -1,29 +1,175 @@
1
- const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
2
- const _32n = /* @__PURE__ */ BigInt(32);
3
- function fromBig(n, le = false) {
4
- if (le)
5
- return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
6
- return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
7
- }
8
- function split(lst, le = false) {
9
- let Ah = new Uint32Array(lst.length);
10
- let Al = new Uint32Array(lst.length);
11
- for (let i = 0; i < lst.length; i++) {
12
- const { h, l } = fromBig(lst[i], le);
13
- [Ah[i], Al[i]] = [h, l];
14
- }
15
- return [Ah, Al];
16
- }
17
- const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
18
- const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
19
- const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
20
- const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
1
+ import platform from "./standards-sdk.es86.js";
2
+ import utils from "./standards-sdk.es38.js";
3
+ import AxiosError from "./standards-sdk.es49.js";
4
+ import composeSignals from "./standards-sdk.es108.js";
5
+ import { trackStream } from "./standards-sdk.es109.js";
6
+ import AxiosHeaders from "./standards-sdk.es52.js";
7
+ import { progressEventDecorator, progressEventReducer, asyncDecorator } from "./standards-sdk.es106.js";
8
+ import resolveConfig from "./standards-sdk.es107.js";
9
+ import settle from "./standards-sdk.es104.js";
10
+ const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
11
+ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
12
+ const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
13
+ const test = (fn, ...args) => {
14
+ try {
15
+ return !!fn(...args);
16
+ } catch (e) {
17
+ return false;
18
+ }
19
+ };
20
+ const supportsRequestStream = isReadableStreamSupported && test(() => {
21
+ let duplexAccessed = false;
22
+ const hasContentType = new Request(platform.origin, {
23
+ body: new ReadableStream(),
24
+ method: "POST",
25
+ get duplex() {
26
+ duplexAccessed = true;
27
+ return "half";
28
+ }
29
+ }).headers.has("Content-Type");
30
+ return duplexAccessed && !hasContentType;
31
+ });
32
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
33
+ const supportsResponseStream = isReadableStreamSupported && test(() => utils.isReadableStream(new Response("").body));
34
+ const resolvers = {
35
+ stream: supportsResponseStream && ((res) => res.body)
36
+ };
37
+ isFetchSupported && ((res) => {
38
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
39
+ !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
40
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
41
+ });
42
+ });
43
+ })(new Response());
44
+ const getBodyLength = async (body) => {
45
+ if (body == null) {
46
+ return 0;
47
+ }
48
+ if (utils.isBlob(body)) {
49
+ return body.size;
50
+ }
51
+ if (utils.isSpecCompliantForm(body)) {
52
+ const _request = new Request(platform.origin, {
53
+ method: "POST",
54
+ body
55
+ });
56
+ return (await _request.arrayBuffer()).byteLength;
57
+ }
58
+ if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {
59
+ return body.byteLength;
60
+ }
61
+ if (utils.isURLSearchParams(body)) {
62
+ body = body + "";
63
+ }
64
+ if (utils.isString(body)) {
65
+ return (await encodeText(body)).byteLength;
66
+ }
67
+ };
68
+ const resolveBodyLength = async (headers, body) => {
69
+ const length = utils.toFiniteNumber(headers.getContentLength());
70
+ return length == null ? getBodyLength(body) : length;
71
+ };
72
+ const fetchAdapter = isFetchSupported && (async (config) => {
73
+ let {
74
+ url,
75
+ method,
76
+ data,
77
+ signal,
78
+ cancelToken,
79
+ timeout,
80
+ onDownloadProgress,
81
+ onUploadProgress,
82
+ responseType,
83
+ headers,
84
+ withCredentials = "same-origin",
85
+ fetchOptions
86
+ } = resolveConfig(config);
87
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
88
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
89
+ let request;
90
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
91
+ composedSignal.unsubscribe();
92
+ });
93
+ let requestContentLength;
94
+ try {
95
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
96
+ let _request = new Request(url, {
97
+ method: "POST",
98
+ body: data,
99
+ duplex: "half"
100
+ });
101
+ let contentTypeHeader;
102
+ if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
103
+ headers.setContentType(contentTypeHeader);
104
+ }
105
+ if (_request.body) {
106
+ const [onProgress, flush] = progressEventDecorator(
107
+ requestContentLength,
108
+ progressEventReducer(asyncDecorator(onUploadProgress))
109
+ );
110
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
111
+ }
112
+ }
113
+ if (!utils.isString(withCredentials)) {
114
+ withCredentials = withCredentials ? "include" : "omit";
115
+ }
116
+ const isCredentialsSupported = "credentials" in Request.prototype;
117
+ request = new Request(url, {
118
+ ...fetchOptions,
119
+ signal: composedSignal,
120
+ method: method.toUpperCase(),
121
+ headers: headers.normalize().toJSON(),
122
+ body: data,
123
+ duplex: "half",
124
+ credentials: isCredentialsSupported ? withCredentials : void 0
125
+ });
126
+ let response = await fetch(request);
127
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
128
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
129
+ const options = {};
130
+ ["status", "statusText", "headers"].forEach((prop) => {
131
+ options[prop] = response[prop];
132
+ });
133
+ const responseContentLength = utils.toFiniteNumber(response.headers.get("content-length"));
134
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
135
+ responseContentLength,
136
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
137
+ ) || [];
138
+ response = new Response(
139
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
140
+ flush && flush();
141
+ unsubscribe && unsubscribe();
142
+ }),
143
+ options
144
+ );
145
+ }
146
+ responseType = responseType || "text";
147
+ let responseData = await resolvers[utils.findKey(resolvers, responseType) || "text"](response, config);
148
+ !isStreamResponse && unsubscribe && unsubscribe();
149
+ return await new Promise((resolve, reject) => {
150
+ settle(resolve, reject, {
151
+ data: responseData,
152
+ headers: AxiosHeaders.from(response.headers),
153
+ status: response.status,
154
+ statusText: response.statusText,
155
+ config,
156
+ request
157
+ });
158
+ });
159
+ } catch (err) {
160
+ unsubscribe && unsubscribe();
161
+ if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
162
+ throw Object.assign(
163
+ new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request),
164
+ {
165
+ cause: err.cause || err
166
+ }
167
+ );
168
+ }
169
+ throw AxiosError.from(err, err && err.code, config, request);
170
+ }
171
+ });
21
172
  export {
22
- fromBig,
23
- rotlBH,
24
- rotlBL,
25
- rotlSH,
26
- rotlSL,
27
- split
173
+ fetchAdapter as default
28
174
  };
29
175
  //# sourceMappingURL=standards-sdk.es90.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es90.js","sources":["../../node_modules/@noble/hashes/esm/_u64.js"],"sourcesContent":["const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map"],"names":[],"mappings":"AAAA,MAAM,aAA6B,uBAAO,KAAK,KAAK,CAAC;AACrD,MAAM,OAAuB,uBAAO,EAAE;AAEtC,SAAS,QAAQ,GAAG,KAAK,OAAO;AAC5B,MAAI;AACA,WAAO,EAAE,GAAG,OAAO,IAAI,UAAU,GAAG,GAAG,OAAQ,KAAK,OAAQ,UAAU,EAAG;AAC7E,SAAO,EAAE,GAAG,OAAQ,KAAK,OAAQ,UAAU,IAAI,GAAG,GAAG,OAAO,IAAI,UAAU,IAAI,EAAG;AACrF;AACA,SAAS,MAAM,KAAK,KAAK,OAAO;AAC5B,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACjC,UAAM,EAAE,GAAG,EAAG,IAAG,QAAQ,IAAI,CAAC,GAAG,EAAE;AACnC,KAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAAA,EAC9B;AACI,SAAO,CAAC,IAAI,EAAE;AAClB;AAeK,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAC/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAE/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;AACtD,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es90.js","sources":["../../node_modules/axios/lib/adapters/fetch.js"],"sourcesContent":["import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n"],"names":["res"],"mappings":";;;;;;;;;AAUA,MAAM,mBAAmB,OAAO,UAAU,cAAc,OAAO,YAAY,cAAc,OAAO,aAA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kB,GAAG,IAAI;AAAA,MACrE,KAAW,CAAE;AAEP,iBAAW,IAAI;AAAA,QACb,YAAY,SAAS,MAAM,oBAAoB,YAAY,MAAM;AAC/D,mBAAS,MAAO;AAChB,yBAAe,YAAa;AAAA,QACtC,CAAS;AAAA,QACD;AAAA,MACD;AAAA,IACP;AAEI,mBAAe,gBAAgB;AAE/B,QAAI,eAAe,MAAM,UAAU,MAAM,QAAQ,WAAW,YAAY,KAAK,MAAM,EAAE,UAAU,MAAM;AAErG,KAAC,oBAAoB,eAAe,YAAa;AAEjD,WAAO,MAAM,IAAI,QAAQ,CAAC,SAAS,WAAW;AAC5C,aAAO,SAAS,QAAQ;AAAA,QACtB,MAAM;AAAA,QACN,SAAS,aAAa,KAAK,SAAS,OAAO;AAAA,QAC3C,QAAQ,SAAS;AAAA,QACjB,YAAY,SAAS;AAAA,QACrB;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACF,CAAA;AAAA,EACF,SAAQ,KAAK;AACZ,mBAAe,YAAa;AAE5B,QAAI,OAAO,IAAI,SAAS,eAAe,SAAS,KAAK,IAAI,OAAO,GAAG;AACjE,YAAM,OAAO;AAAA,QACX,IAAI,WAAW,iBAAiB,WAAW,aAAa,QAAQ,OAAO;AAAA,QACvE;AAAA,UACE,OAAO,IAAI,SAAS;AAAA,QAC9B;AAAA,MACA;AAAA,IACA;AAEI,UAAM,WAAW,KAAK,KAAK,OAAO,IAAI,MAAM,QAAQ,OAAO;AAAA,EAC/D;AACA;","x_google_ignoreList":[0]}
@@ -1,41 +1,24 @@
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));
11
- }
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();
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 { Coder } from "./standards-sdk.es62.js";
5
+ class AnonymousCoder extends Coder {
6
+ constructor(coder) {
7
+ super(coder.name, coder.type, "_", coder.dynamic);
8
+ __publicField(this, "coder");
9
+ this.coder = coder;
10
+ }
11
+ defaultValue() {
12
+ return this.coder.defaultValue();
13
+ }
14
+ encode(writer, value) {
15
+ return this.coder.encode(writer, value);
16
+ }
17
+ decode(reader) {
18
+ return this.coder.decode(reader);
23
19
  }
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
20
  }
33
21
  export {
34
- Hash,
35
- isLE,
36
- toBytes,
37
- u32,
38
- utf8ToBytes,
39
- wrapConstructor
22
+ AnonymousCoder
40
23
  };
41
24
  //# sourceMappingURL=standards-sdk.es91.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es91.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
+ {"version":3,"file":"standards-sdk.es91.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/anonymous.js"],"sourcesContent":["import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map"],"names":[],"mappings":";;;;AAMO,MAAM,uBAAuB,MAAM;AAAA,EAEtC,YAAY,OAAO;AACf,UAAM,MAAM,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAFpD;AAGI,SAAK,QAAQ;AAAA,EACrB;AAAA,EACI,eAAe;AACX,WAAO,KAAK,MAAM,aAAc;AAAA,EACxC;AAAA,EACI,OAAO,QAAQ,OAAO;AAClB,WAAO,KAAK,MAAM,OAAO,QAAQ,KAAK;AAAA,EAC9C;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,KAAK,MAAM,OAAO,MAAM;AAAA,EACvC;AACA;","x_google_ignoreList":[0]}
@@ -1,104 +1,30 @@
1
- import { __exports as mimeTypes } from "./standards-sdk.es93.js";
2
- import { __require as requireMimeDb } from "./standards-sdk.es94.js";
3
- import { __require as requirePathBrowserify } from "./standards-sdk.es95.js";
4
- /*!
5
- * mime-types
6
- * Copyright(c) 2014 Jonathan Ong
7
- * Copyright(c) 2015 Douglas Christopher Wilson
8
- * MIT Licensed
9
- */
10
- var hasRequiredMimeTypes;
11
- function requireMimeTypes() {
12
- if (hasRequiredMimeTypes) return mimeTypes;
13
- hasRequiredMimeTypes = 1;
14
- (function(exports) {
15
- var db = requireMimeDb();
16
- var extname = requirePathBrowserify().extname;
17
- var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
18
- var TEXT_TYPE_REGEXP = /^text\//i;
19
- exports.charset = charset;
20
- exports.charsets = { lookup: charset };
21
- exports.contentType = contentType;
22
- exports.extension = extension;
23
- exports.extensions = /* @__PURE__ */ Object.create(null);
24
- exports.lookup = lookup;
25
- exports.types = /* @__PURE__ */ Object.create(null);
26
- populateMaps(exports.extensions, exports.types);
27
- function charset(type) {
28
- if (!type || typeof type !== "string") {
29
- return false;
30
- }
31
- var match = EXTRACT_TYPE_REGEXP.exec(type);
32
- var mime = match && db[match[1].toLowerCase()];
33
- if (mime && mime.charset) {
34
- return mime.charset;
35
- }
36
- if (match && TEXT_TYPE_REGEXP.test(match[1])) {
37
- return "UTF-8";
38
- }
39
- return false;
40
- }
41
- function contentType(str) {
42
- if (!str || typeof str !== "string") {
43
- return false;
44
- }
45
- var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str;
46
- if (!mime) {
47
- return false;
48
- }
49
- if (mime.indexOf("charset") === -1) {
50
- var charset2 = exports.charset(mime);
51
- if (charset2) mime += "; charset=" + charset2.toLowerCase();
52
- }
53
- return mime;
54
- }
55
- function extension(type) {
56
- if (!type || typeof type !== "string") {
57
- return false;
58
- }
59
- var match = EXTRACT_TYPE_REGEXP.exec(type);
60
- var exts = match && exports.extensions[match[1].toLowerCase()];
61
- if (!exts || !exts.length) {
62
- return false;
63
- }
64
- return exts[0];
65
- }
66
- function lookup(path) {
67
- if (!path || typeof path !== "string") {
68
- return false;
69
- }
70
- var extension2 = extname("x." + path).toLowerCase().substr(1);
71
- if (!extension2) {
72
- return false;
73
- }
74
- return exports.types[extension2] || false;
75
- }
76
- function populateMaps(extensions, types) {
77
- var preference = ["nginx", "apache", void 0, "iana"];
78
- Object.keys(db).forEach(function forEachMimeType(type) {
79
- var mime = db[type];
80
- var exts = mime.extensions;
81
- if (!exts || !exts.length) {
82
- return;
83
- }
84
- extensions[type] = exts;
85
- for (var i = 0; i < exts.length; i++) {
86
- var extension2 = exts[i];
87
- if (types[extension2]) {
88
- var from = preference.indexOf(db[types[extension2]].source);
89
- var to = preference.indexOf(mime.source);
90
- if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr(0, 12) === "application/")) {
91
- continue;
92
- }
93
- }
94
- types[extension2] = type;
95
- }
96
- });
97
- }
98
- })(mimeTypes);
99
- return mimeTypes;
1
+ function number(n) {
2
+ if (!Number.isSafeInteger(n) || n < 0)
3
+ throw new Error(`Wrong positive integer: ${n}`);
4
+ }
5
+ function bytes(b, ...lengths) {
6
+ if (!(b instanceof Uint8Array))
7
+ throw new Error("Expected Uint8Array");
8
+ if (lengths.length > 0 && !lengths.includes(b.length))
9
+ throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);
10
+ }
11
+ function exists(instance, checkFinished = true) {
12
+ if (instance.destroyed)
13
+ throw new Error("Hash instance has been destroyed");
14
+ if (checkFinished && instance.finished)
15
+ throw new Error("Hash#digest() has already been called");
16
+ }
17
+ function output(out, instance) {
18
+ bytes(out);
19
+ const min = instance.outputLen;
20
+ if (out.length < min) {
21
+ throw new Error(`digestInto() expects output buffer of length at least ${min}`);
22
+ }
100
23
  }
101
24
  export {
102
- requireMimeTypes as __require
25
+ bytes,
26
+ exists,
27
+ number,
28
+ output
103
29
  };
104
30
  //# sourceMappingURL=standards-sdk.es92.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es92.js","sources":["../../node_modules/mime-types/index.js"],"sourcesContent":["/*!\n * mime-types\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar db = require('mime-db')\nvar extname = require('path').extname\n\n/**\n * Module variables.\n * @private\n */\n\nvar EXTRACT_TYPE_REGEXP = /^\\s*([^;\\s]*)(?:;|\\s|$)/\nvar TEXT_TYPE_REGEXP = /^text\\//i\n\n/**\n * Module exports.\n * @public\n */\n\nexports.charset = charset\nexports.charsets = { lookup: charset }\nexports.contentType = contentType\nexports.extension = extension\nexports.extensions = Object.create(null)\nexports.lookup = lookup\nexports.types = Object.create(null)\n\n// Populate the extensions/types maps\npopulateMaps(exports.extensions, exports.types)\n\n/**\n * Get the default charset for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction charset (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n var mime = match && db[match[1].toLowerCase()]\n\n if (mime && mime.charset) {\n return mime.charset\n }\n\n // default text/* to utf-8\n if (match && TEXT_TYPE_REGEXP.test(match[1])) {\n return 'UTF-8'\n }\n\n return false\n}\n\n/**\n * Create a full Content-Type header given a MIME type or extension.\n *\n * @param {string} str\n * @return {boolean|string}\n */\n\nfunction contentType (str) {\n // TODO: should this even be in this module?\n if (!str || typeof str !== 'string') {\n return false\n }\n\n var mime = str.indexOf('/') === -1\n ? exports.lookup(str)\n : str\n\n if (!mime) {\n return false\n }\n\n // TODO: use content-type or other module\n if (mime.indexOf('charset') === -1) {\n var charset = exports.charset(mime)\n if (charset) mime += '; charset=' + charset.toLowerCase()\n }\n\n return mime\n}\n\n/**\n * Get the default extension for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction extension (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n\n // get extensions\n var exts = match && exports.extensions[match[1].toLowerCase()]\n\n if (!exts || !exts.length) {\n return false\n }\n\n return exts[0]\n}\n\n/**\n * Lookup the MIME type for a file path/extension.\n *\n * @param {string} path\n * @return {boolean|string}\n */\n\nfunction lookup (path) {\n if (!path || typeof path !== 'string') {\n return false\n }\n\n // get the extension (\"ext\" or \".ext\" or full path)\n var extension = extname('x.' + path)\n .toLowerCase()\n .substr(1)\n\n if (!extension) {\n return false\n }\n\n return exports.types[extension] || false\n}\n\n/**\n * Populate the extensions and types maps.\n * @private\n */\n\nfunction populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}\n"],"names":["require$$0","require$$1","charset","extension"],"mappings":";;;;;;;;;;;;;;AAcA,QAAI,KAAKA,cAAA;AACT,QAAI,UAAUC,wBAAgB;AAO9B,QAAI,sBAAsB;AAC1B,QAAI,mBAAmB;AAOvB,YAAkB,UAAA;AAClB,YAAmB,WAAA,EAAE,QAAQ,QAAO;AACpC,YAAsB,cAAA;AACtB,YAAoB,YAAA;AACpB,YAAA,aAAqB,uBAAO,OAAO,IAAI;AACvC,YAAiB,SAAA;AACjB,YAAA,QAAgB,uBAAO,OAAO,IAAI;AAGlC,iBAAa,QAAQ,YAAY,QAAQ,KAAK;AAS9C,aAAS,QAAS,MAAM;AACtB,UAAI,CAAC,QAAQ,OAAO,SAAS,UAAU;AACrC,eAAO;AAAA,MACX;AAGE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AAI,aAAa,CAAC,SAAS,UAAU,QAAW,MAAM;AAEtD,aAAO,KAAK,EAAE,EAAE,QAAQ,SAAS,gBAAiB,MAAM;AACtD,YAAI,OAAO,GAAG,IAAI;AAClB,YAAI,OAAO,KAAK;AAEhB,YAAI,CAAC,QAAQ,CAAC,KAAK,QAAQ;AACzB;AAAA,QACN;AAGI,mBAAW,IAAI,IAAI;AAGnB,iBAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,cAAIA,aAAY,KAAK,CAAC;AAEtB,cAAI,MAAMA,UAAS,GAAG;AACpB,gBAAI,OAAO,WAAW,QAAQ,GAAG,MAAMA,UAAS,CAAC,EAAE,MAAM;AACzD,gBAAI,KAAK,WAAW,QAAQ,KAAK,MAAM;AAEvC,gBAAI,MAAMA,UAAS,MAAM,+BACtB,OAAO,MAAO,SAAS,MAAM,MAAMA,UAAS,EAAE,OAAO,GAAG,EAAE,MAAM,iBAAkB;AAEnF;AAAA,YACV;AAAA,UACA;AAGM,gBAAMA,UAAS,IAAI;AAAA,QACzB;AAAA,MACG,CAAA;AAAA,IACH;AAAA;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es92.js","sources":["../../node_modules/@noble/hashes/esm/_assert.js"],"sourcesContent":["function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map"],"names":[],"mappings":"AAAA,SAAS,OAAO,GAAG;AACf,MAAI,CAAC,OAAO,cAAc,CAAC,KAAK,IAAI;AAChC,UAAM,IAAI,MAAM,2BAA2B,CAAC,EAAE;AACtD;AAKA,SAAS,MAAM,MAAM,SAAS;AAC1B,MAAI,EAAE,aAAa;AACf,UAAM,IAAI,MAAM,qBAAqB;AACzC,MAAI,QAAQ,SAAS,KAAK,CAAC,QAAQ,SAAS,EAAE,MAAM;AAChD,UAAM,IAAI,MAAM,iCAAiC,OAAO,mBAAmB,EAAE,MAAM,EAAE;AAC7F;AAOA,SAAS,OAAO,UAAU,gBAAgB,MAAM;AAC5C,MAAI,SAAS;AACT,UAAM,IAAI,MAAM,kCAAkC;AACtD,MAAI,iBAAiB,SAAS;AAC1B,UAAM,IAAI,MAAM,uCAAuC;AAC/D;AACA,SAAS,OAAO,KAAK,UAAU;AAC3B,QAAM,GAAG;AACT,QAAM,MAAM,SAAS;AACrB,MAAI,IAAI,SAAS,KAAK;AAClB,UAAM,IAAI,MAAM,yDAAyD,GAAG,EAAE;AAAA,EACtF;AACA;","x_google_ignoreList":[0]}
@@ -1,5 +1,29 @@
1
- var mimeTypes = {};
1
+ const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
2
+ const _32n = /* @__PURE__ */ BigInt(32);
3
+ function fromBig(n, le = false) {
4
+ if (le)
5
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
6
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
7
+ }
8
+ function split(lst, le = false) {
9
+ let Ah = new Uint32Array(lst.length);
10
+ let Al = new Uint32Array(lst.length);
11
+ for (let i = 0; i < lst.length; i++) {
12
+ const { h, l } = fromBig(lst[i], le);
13
+ [Ah[i], Al[i]] = [h, l];
14
+ }
15
+ return [Ah, Al];
16
+ }
17
+ const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
18
+ const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
19
+ const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
20
+ const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
2
21
  export {
3
- mimeTypes as __exports
22
+ fromBig,
23
+ rotlBH,
24
+ rotlBL,
25
+ rotlSH,
26
+ rotlSL,
27
+ split
4
28
  };
5
29
  //# sourceMappingURL=standards-sdk.es93.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es93.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"standards-sdk.es93.js","sources":["../../node_modules/@noble/hashes/esm/_u64.js"],"sourcesContent":["const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map"],"names":[],"mappings":"AAAA,MAAM,aAA6B,uBAAO,KAAK,KAAK,CAAC;AACrD,MAAM,OAAuB,uBAAO,EAAE;AAEtC,SAAS,QAAQ,GAAG,KAAK,OAAO;AAC5B,MAAI;AACA,WAAO,EAAE,GAAG,OAAO,IAAI,UAAU,GAAG,GAAG,OAAQ,KAAK,OAAQ,UAAU,EAAG;AAC7E,SAAO,EAAE,GAAG,OAAQ,KAAK,OAAQ,UAAU,IAAI,GAAG,GAAG,OAAO,IAAI,UAAU,IAAI,EAAG;AACrF;AACA,SAAS,MAAM,KAAK,KAAK,OAAO;AAC5B,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACjC,UAAM,EAAE,GAAG,EAAG,IAAG,QAAQ,IAAI,CAAC,GAAG,EAAE;AACnC,KAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAAA,EAC9B;AACI,SAAO,CAAC,IAAI,EAAE;AAClB;AAeK,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAC/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAE/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;AACtD,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;","x_google_ignoreList":[0]}
@@ -1,19 +1,41 @@
1
- import require$$0 from "./standards-sdk.es109.js";
2
- /*!
3
- * mime-db
4
- * Copyright(c) 2014 Jonathan Ong
5
- * Copyright(c) 2015-2022 Douglas Christopher Wilson
6
- * MIT Licensed
7
- */
8
- var mimeDb;
9
- var hasRequiredMimeDb;
10
- function requireMimeDb() {
11
- if (hasRequiredMimeDb) return mimeDb;
12
- hasRequiredMimeDb = 1;
13
- mimeDb = require$$0;
14
- return mimeDb;
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));
11
+ }
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();
23
+ }
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;
15
32
  }
16
33
  export {
17
- requireMimeDb as __require
34
+ Hash,
35
+ isLE,
36
+ toBytes,
37
+ u32,
38
+ utf8ToBytes,
39
+ wrapConstructor
18
40
  };
19
41
  //# sourceMappingURL=standards-sdk.es94.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es94.js","sources":["../../node_modules/mime-db/index.js"],"sourcesContent":["/*!\n * mime-db\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015-2022 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module exports.\n */\n\nmodule.exports = require('./db.json')\n"],"names":[],"mappings":";;;;;;;;;;;;AAWA,WAAiB;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es94.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]}