@hashgraphonline/standards-sdk 0.0.98 → 0.0.100
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.
- package/dist/es/hcs-10/base-client.d.ts +12 -4
- package/dist/es/hcs-10/base-client.d.ts.map +1 -1
- package/dist/es/hcs-10/connections-manager.d.ts +51 -0
- package/dist/es/hcs-10/connections-manager.d.ts.map +1 -1
- package/dist/es/hcs-10/sdk.d.ts +37 -1
- package/dist/es/hcs-10/sdk.d.ts.map +1 -1
- package/dist/es/hcs-10/types.d.ts +9 -3
- package/dist/es/hcs-10/types.d.ts.map +1 -1
- package/dist/es/inscribe/inscriber.d.ts +2 -0
- package/dist/es/inscribe/inscriber.d.ts.map +1 -1
- package/dist/es/services/index.d.ts +1 -0
- package/dist/es/services/index.d.ts.map +1 -1
- package/dist/es/services/mirror-node.d.ts +17 -1
- package/dist/es/services/mirror-node.d.ts.map +1 -1
- package/dist/es/services/types.d.ts +24 -0
- package/dist/es/services/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +8 -5
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es10.js +66 -0
- package/dist/es/standards-sdk.es10.js.map +1 -1
- package/dist/es/standards-sdk.es100.js +16 -13
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +5 -13
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +37 -30
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +40 -15
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +37 -4
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +78 -4
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +3 -16
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +2 -5
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +2 -39
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +18 -37
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +26 -36
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +25 -77
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +38 -3
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +34 -2
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +33 -2
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +9 -34
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +32 -31
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +101 -9
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +2 -34
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es119.js +19 -0
- package/dist/es/standards-sdk.es119.js.map +1 -0
- package/dist/es/standards-sdk.es120.js +412 -0
- package/dist/es/standards-sdk.es120.js.map +1 -0
- package/dist/es/standards-sdk.es121.js +2285 -0
- package/dist/es/standards-sdk.es121.js.map +1 -0
- package/dist/es/standards-sdk.es122.js +13 -0
- package/dist/es/standards-sdk.es122.js.map +1 -0
- package/dist/es/standards-sdk.es123.js +14 -0
- package/dist/es/standards-sdk.es123.js.map +1 -0
- package/dist/es/standards-sdk.es124.js +21 -0
- package/dist/es/standards-sdk.es124.js.map +1 -0
- package/dist/es/standards-sdk.es125.js +9 -0
- package/dist/es/standards-sdk.es125.js.map +1 -0
- package/dist/es/standards-sdk.es126.js +12 -0
- package/dist/es/standards-sdk.es126.js.map +1 -0
- package/dist/es/standards-sdk.es13.js +5 -5
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es16.js +1 -1
- package/dist/es/standards-sdk.es18.js +2 -2
- package/dist/es/standards-sdk.es19.js +397 -386
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +386 -315
- package/dist/es/standards-sdk.es20.js.map +1 -1
- package/dist/es/standards-sdk.es21.js +357 -128
- package/dist/es/standards-sdk.es21.js.map +1 -1
- package/dist/es/standards-sdk.es22.js +155 -7
- package/dist/es/standards-sdk.es22.js.map +1 -1
- package/dist/es/standards-sdk.es23.js +7 -1041
- package/dist/es/standards-sdk.es23.js.map +1 -1
- package/dist/es/standards-sdk.es24.js +966 -1692
- package/dist/es/standards-sdk.es24.js.map +1 -1
- package/dist/es/standards-sdk.es25.js +5 -3
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +36 -4167
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +21 -7163
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +1769 -2
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +10 -36
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +7163 -21
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +3 -5
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +8 -100
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +2 -2
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +4167 -15
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +397 -387
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +2 -2
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es37.js +120 -2282
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +343 -143
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +4 -193
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es4.js +1 -1
- package/dist/es/standards-sdk.es40.js +158 -417
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +75 -19
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +103 -128
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +48 -14
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +9 -28
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +91 -23
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +3 -20
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +2 -44
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +108 -13
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +71 -58
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +33 -9
- package/dist/es/standards-sdk.es5.js.map +1 -1
- package/dist/es/standards-sdk.es50.js +4 -1287
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +4 -147
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +208 -78
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +55 -81
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +69 -32
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +2 -6
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +3 -159
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +160 -19
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +29 -790
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +55 -166
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +43 -136
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +9 -20
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +63 -25
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +6 -26
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +14 -37
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +7 -3
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +45 -4
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +2 -7136
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +120 -403
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +172 -2
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +111 -5
- package/dist/es/standards-sdk.es7.js.map +1 -1
- package/dist/es/standards-sdk.es70.js +3 -119
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +12 -363
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +13 -6
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +7114 -157
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +188 -74
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +423 -99
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +20 -47
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +138 -9
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +13 -92
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +28 -3
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +4 -4
- package/dist/es/standards-sdk.es80.js +29 -2
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +15 -107
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +41 -71
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +17 -5
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +60 -4
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +1259 -191
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +142 -52
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +91 -69
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +80 -28
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +27 -58
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es9.js +1 -1
- package/dist/es/standards-sdk.es90.js +5 -49
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +157 -8
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +19 -61
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +792 -5
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +171 -12
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +143 -7
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +30 -43
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +15 -2
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +4 -136
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +4 -172
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/index.d.ts +1 -0
- package/dist/es/utils/index.d.ts.map +1 -1
- package/dist/es/utils/transaction-parser.d.ts +103 -0
- package/dist/es/utils/transaction-parser.d.ts.map +1 -0
- package/dist/umd/hcs-10/base-client.d.ts +12 -4
- package/dist/umd/hcs-10/base-client.d.ts.map +1 -1
- package/dist/umd/hcs-10/connections-manager.d.ts +51 -0
- package/dist/umd/hcs-10/connections-manager.d.ts.map +1 -1
- package/dist/umd/hcs-10/sdk.d.ts +37 -1
- package/dist/umd/hcs-10/sdk.d.ts.map +1 -1
- package/dist/umd/hcs-10/types.d.ts +9 -3
- package/dist/umd/hcs-10/types.d.ts.map +1 -1
- package/dist/umd/inscribe/inscriber.d.ts +2 -0
- package/dist/umd/inscribe/inscriber.d.ts.map +1 -1
- package/dist/umd/services/index.d.ts +1 -0
- package/dist/umd/services/index.d.ts.map +1 -1
- package/dist/umd/services/mirror-node.d.ts +17 -1
- package/dist/umd/services/mirror-node.d.ts.map +1 -1
- package/dist/umd/services/types.d.ts +24 -0
- package/dist/umd/services/types.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +12 -12
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/dist/umd/utils/index.d.ts +1 -0
- package/dist/umd/utils/index.d.ts.map +1 -1
- package/dist/umd/utils/transaction-parser.d.ts +103 -0
- package/dist/umd/utils/transaction-parser.d.ts.map +1 -0
- package/package.json +12 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es104.js","sources":["../../node_modules/axios/lib/helpers/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es104.js","sources":["../../node_modules/axios/lib/helpers/composeSignals.js"],"sourcesContent":["import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n"],"names":["signal"],"mappings":";;;AAIK,MAAC,iBAAiB,CAAC,SAAS,YAAY;AAC3C,QAAM,EAAC,OAAM,IAAK,UAAU,UAAU,QAAQ,OAAO,OAAO,IAAI;AAEhE,MAAI,WAAW,QAAQ;AACrB,QAAI,aAAa,IAAI,gBAAiB;AAEtC,QAAI;AAEJ,UAAM,UAAU,SAAU,QAAQ;AAChC,UAAI,CAAC,SAAS;AACZ,kBAAU;AACV,oBAAa;AACb,cAAM,MAAM,kBAAkB,QAAQ,SAAS,KAAK;AACpD,mBAAW,MAAM,eAAe,aAAa,MAAM,IAAI,cAAc,eAAe,QAAQ,IAAI,UAAU,GAAG,CAAC;AAAA,MACtH;AAAA,IACA;AAEI,QAAI,QAAQ,WAAW,WAAW,MAAM;AACtC,cAAQ;AACR,cAAQ,IAAI,WAAW,WAAW,OAAO,mBAAmB,WAAW,SAAS,CAAC;AAAA,IACvF,GAAO,OAAO;AAEV,UAAM,cAAc,MAAM;AACxB,UAAI,SAAS;AACX,iBAAS,aAAa,KAAK;AAC3B,gBAAQ;AACR,gBAAQ,QAAQ,CAAAA,YAAU;AACxB,UAAAA,QAAO,cAAcA,QAAO,YAAY,OAAO,IAAIA,QAAO,oBAAoB,SAAS,OAAO;AAAA,QACxG,CAAS;AACD,kBAAU;AAAA,MAClB;AAAA,IACA;AAEI,YAAQ,QAAQ,CAACA,YAAWA,QAAO,iBAAiB,SAAS,OAAO,CAAC;AAErE,UAAM,EAAC,OAAM,IAAI;AAEjB,WAAO,cAAc,MAAM,MAAM,KAAK,WAAW;AAEjD,WAAO;AAAA,EACX;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,81 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const streamChunk = function* (chunk, chunkSize) {
|
|
2
|
+
let len = chunk.byteLength;
|
|
3
|
+
if (len < chunkSize) {
|
|
4
|
+
yield chunk;
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
let pos = 0;
|
|
8
|
+
let end;
|
|
9
|
+
while (pos < len) {
|
|
10
|
+
end = pos + chunkSize;
|
|
11
|
+
yield chunk.slice(pos, end);
|
|
12
|
+
pos = end;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
16
|
+
for await (const chunk of readStream(iterable)) {
|
|
17
|
+
yield* streamChunk(chunk, chunkSize);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const readStream = async function* (stream) {
|
|
21
|
+
if (stream[Symbol.asyncIterator]) {
|
|
22
|
+
yield* stream;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const reader = stream.getReader();
|
|
26
|
+
try {
|
|
27
|
+
for (; ; ) {
|
|
28
|
+
const { done, value } = await reader.read();
|
|
29
|
+
if (done) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
yield value;
|
|
33
|
+
}
|
|
34
|
+
} finally {
|
|
35
|
+
await reader.cancel();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
39
|
+
const iterator = readBytes(stream, chunkSize);
|
|
40
|
+
let bytes = 0;
|
|
41
|
+
let done;
|
|
42
|
+
let _onFinish = (e) => {
|
|
43
|
+
if (!done) {
|
|
44
|
+
done = true;
|
|
45
|
+
onFinish && onFinish(e);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return new ReadableStream({
|
|
49
|
+
async pull(controller) {
|
|
50
|
+
try {
|
|
51
|
+
const { done: done2, value } = await iterator.next();
|
|
52
|
+
if (done2) {
|
|
53
|
+
_onFinish();
|
|
54
|
+
controller.close();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
let len = value.byteLength;
|
|
58
|
+
if (onProgress) {
|
|
59
|
+
let loadedBytes = bytes += len;
|
|
60
|
+
onProgress(loadedBytes);
|
|
61
|
+
}
|
|
62
|
+
controller.enqueue(new Uint8Array(value));
|
|
63
|
+
} catch (err) {
|
|
64
|
+
_onFinish(err);
|
|
65
|
+
throw err;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
cancel(reason) {
|
|
69
|
+
_onFinish(reason);
|
|
70
|
+
return iterator.return();
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
highWaterMark: 2
|
|
74
|
+
});
|
|
75
|
+
};
|
|
4
76
|
export {
|
|
5
|
-
|
|
77
|
+
readBytes,
|
|
78
|
+
streamChunk,
|
|
79
|
+
trackStream
|
|
6
80
|
};
|
|
7
81
|
//# sourceMappingURL=standards-sdk.es105.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es105.js","sources":["../../node_modules/axios/lib/helpers/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es105.js","sources":["../../node_modules/axios/lib/helpers/trackStream.js"],"sourcesContent":["\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n"],"names":["done"],"mappings":"AACY,MAAC,cAAc,WAAW,OAAO,WAAW;AACtD,MAAI,MAAM,MAAM;AAEhB,MAAkB,MAAM,WAAW;AACjC,UAAM;AACN;AAAA,EACJ;AAEE,MAAI,MAAM;AACV,MAAI;AAEJ,SAAO,MAAM,KAAK;AAChB,UAAM,MAAM;AACZ,UAAM,MAAM,MAAM,KAAK,GAAG;AAC1B,UAAM;AAAA,EACV;AACA;AAEY,MAAC,YAAY,iBAAiB,UAAU,WAAW;AAC7D,mBAAiB,SAAS,WAAW,QAAQ,GAAG;AAC9C,WAAO,YAAY,OAAO,SAAS;AAAA,EACvC;AACA;AAEA,MAAM,aAAa,iBAAiB,QAAQ;AAC1C,MAAI,OAAO,OAAO,aAAa,GAAG;AAChC,WAAO;AACP;AAAA,EACJ;AAEE,QAAM,SAAS,OAAO,UAAW;AACjC,MAAI;AACF,eAAS;AACP,YAAM,EAAC,MAAM,MAAK,IAAI,MAAM,OAAO,KAAM;AACzC,UAAI,MAAM;AACR;AAAA,MACR;AACM,YAAM;AAAA,IACZ;AAAA,EACA,UAAY;AACR,UAAM,OAAO,OAAQ;AAAA,EACzB;AACA;AAEY,MAAC,cAAc,CAAC,QAAQ,WAAW,YAAY,aAAa;AACtE,QAAM,WAAW,UAAU,QAAQ,SAAS;AAE5C,MAAI,QAAQ;AACZ,MAAI;AACJ,MAAI,YAAY,CAAC,MAAM;AACrB,QAAI,CAAC,MAAM;AACT,aAAO;AACP,kBAAY,SAAS,CAAC;AAAA,IAC5B;AAAA,EACA;AAEE,SAAO,IAAI,eAAe;AAAA,IACxB,MAAM,KAAK,YAAY;AACrB,UAAI;AACF,cAAM,EAAC,MAAAA,OAAM,MAAK,IAAI,MAAM,SAAS,KAAM;AAE3C,YAAIA,OAAM;AACT,oBAAW;AACV,qBAAW,MAAO;AAClB;AAAA,QACV;AAEQ,YAAI,MAAM,MAAM;AAChB,YAAI,YAAY;AACd,cAAI,cAAc,SAAS;AAC3B,qBAAW,WAAW;AAAA,QAChC;AACQ,mBAAW,QAAQ,IAAI,WAAW,KAAK,CAAC;AAAA,MACzC,SAAQ,KAAK;AACZ,kBAAU,GAAG;AACb,cAAM;AAAA,MACd;AAAA,IACK;AAAA,IACD,OAAO,QAAQ;AACb,gBAAU,MAAM;AAChB,aAAO,SAAS,OAAQ;AAAA,IAC9B;AAAA,EACA,GAAK;AAAA,IACD,eAAe;AAAA,EAChB,CAAA;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const validateStatus = response.config.validateStatus;
|
|
4
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
5
|
-
resolve(response);
|
|
6
|
-
} else {
|
|
7
|
-
reject(new AxiosError(
|
|
8
|
-
"Request failed with status code " + response.status,
|
|
9
|
-
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
10
|
-
response.config,
|
|
11
|
-
response.request,
|
|
12
|
-
response
|
|
13
|
-
));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
import AxiosURLSearchParams from "./standards-sdk.es96.js";
|
|
2
|
+
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
16
3
|
export {
|
|
17
|
-
|
|
4
|
+
URLSearchParams$1 as default
|
|
18
5
|
};
|
|
19
6
|
//# sourceMappingURL=standards-sdk.es106.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es106.js","sources":["../../node_modules/axios/lib/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es106.js","sources":["../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"],"sourcesContent":["'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n"],"names":[],"mappings":";AAGA,MAAA,oBAAe,OAAO,oBAAoB,cAAc,kBAAkB;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
3
|
-
return match && match[1] || "";
|
|
4
|
-
}
|
|
1
|
+
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
FormData$1 as default
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=standards-sdk.es107.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es107.js","sources":["../../node_modules/axios/lib/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es107.js","sources":["../../node_modules/axios/lib/platform/browser/classes/FormData.js"],"sourcesContent":["'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n"],"names":[],"mappings":"AAEA,MAAA,aAAe,OAAO,aAAa,cAAc,WAAW;","x_google_ignoreList":[0]}
|
|
@@ -1,42 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import throttle from "./standards-sdk.es116.js";
|
|
3
|
-
import utils from "./standards-sdk.es71.js";
|
|
4
|
-
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
5
|
-
let bytesNotified = 0;
|
|
6
|
-
const _speedometer = speedometer(50, 250);
|
|
7
|
-
return throttle((e) => {
|
|
8
|
-
const loaded = e.loaded;
|
|
9
|
-
const total = e.lengthComputable ? e.total : void 0;
|
|
10
|
-
const progressBytes = loaded - bytesNotified;
|
|
11
|
-
const rate = _speedometer(progressBytes);
|
|
12
|
-
const inRange = loaded <= total;
|
|
13
|
-
bytesNotified = loaded;
|
|
14
|
-
const data = {
|
|
15
|
-
loaded,
|
|
16
|
-
total,
|
|
17
|
-
progress: total ? loaded / total : void 0,
|
|
18
|
-
bytes: progressBytes,
|
|
19
|
-
rate: rate ? rate : void 0,
|
|
20
|
-
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
21
|
-
event: e,
|
|
22
|
-
lengthComputable: total != null,
|
|
23
|
-
[isDownloadStream ? "download" : "upload"]: true
|
|
24
|
-
};
|
|
25
|
-
listener(data);
|
|
26
|
-
}, freq);
|
|
27
|
-
};
|
|
28
|
-
const progressEventDecorator = (total, throttled) => {
|
|
29
|
-
const lengthComputable = total != null;
|
|
30
|
-
return [(loaded) => throttled[0]({
|
|
31
|
-
lengthComputable,
|
|
32
|
-
total,
|
|
33
|
-
loaded
|
|
34
|
-
}), throttled[1]];
|
|
35
|
-
};
|
|
36
|
-
const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));
|
|
1
|
+
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
37
2
|
export {
|
|
38
|
-
|
|
39
|
-
progressEventDecorator,
|
|
40
|
-
progressEventReducer
|
|
3
|
+
Blob$1 as default
|
|
41
4
|
};
|
|
42
5
|
//# sourceMappingURL=standards-sdk.es108.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es108.js","sources":["../../node_modules/axios/lib/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es108.js","sources":["../../node_modules/axios/lib/platform/browser/classes/Blob.js"],"sourcesContent":["'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n"],"names":[],"mappings":"AAEA,MAAA,SAAe,OAAO,SAAS,cAAc,OAAO;","x_google_ignoreList":[0]}
|
|
@@ -1,43 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const newConfig = mergeConfig({}, config);
|
|
11
|
-
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
12
|
-
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
13
|
-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
14
|
-
if (auth) {
|
|
15
|
-
headers.set(
|
|
16
|
-
"Authorization",
|
|
17
|
-
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
18
|
-
);
|
|
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.es75.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;
|
|
19
10
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
23
|
-
headers.setContentType(void 0);
|
|
24
|
-
} else if ((contentType = headers.getContentType()) !== false) {
|
|
25
|
-
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
26
|
-
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
27
|
-
}
|
|
11
|
+
defaultValue() {
|
|
12
|
+
return this.coder.defaultValue();
|
|
28
13
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
|
|
32
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
33
|
-
if (xsrfValue) {
|
|
34
|
-
headers.set(xsrfHeaderName, xsrfValue);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
14
|
+
encode(writer, value) {
|
|
15
|
+
return this.coder.encode(writer, value);
|
|
37
16
|
}
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
decode(reader) {
|
|
18
|
+
return this.coder.decode(reader);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
40
21
|
export {
|
|
41
|
-
|
|
22
|
+
AnonymousCoder
|
|
42
23
|
};
|
|
43
24
|
//# sourceMappingURL=standards-sdk.es109.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es109.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es109.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,40 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (signals) {
|
|
23
|
-
timer && clearTimeout(timer);
|
|
24
|
-
timer = null;
|
|
25
|
-
signals.forEach((signal2) => {
|
|
26
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
27
|
-
});
|
|
28
|
-
signals = null;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
32
|
-
const { signal } = controller;
|
|
33
|
-
signal.unsubscribe = () => utils.asap(unsubscribe);
|
|
34
|
-
return signal;
|
|
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}`);
|
|
35
22
|
}
|
|
36
|
-
}
|
|
23
|
+
}
|
|
37
24
|
export {
|
|
38
|
-
|
|
25
|
+
bytes,
|
|
26
|
+
exists,
|
|
27
|
+
number,
|
|
28
|
+
output
|
|
39
29
|
};
|
|
40
30
|
//# sourceMappingURL=standards-sdk.es110.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es110.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es110.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,81 +1,29 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return;
|
|
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];
|
|
6
14
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
const readBytes = async function* (iterable, chunkSize) {
|
|
16
|
-
for await (const chunk of readStream(iterable)) {
|
|
17
|
-
yield* streamChunk(chunk, chunkSize);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const readStream = async function* (stream) {
|
|
21
|
-
if (stream[Symbol.asyncIterator]) {
|
|
22
|
-
yield* stream;
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const reader = stream.getReader();
|
|
26
|
-
try {
|
|
27
|
-
for (; ; ) {
|
|
28
|
-
const { done, value } = await reader.read();
|
|
29
|
-
if (done) {
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
yield value;
|
|
33
|
-
}
|
|
34
|
-
} finally {
|
|
35
|
-
await reader.cancel();
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
39
|
-
const iterator = readBytes(stream, chunkSize);
|
|
40
|
-
let bytes = 0;
|
|
41
|
-
let done;
|
|
42
|
-
let _onFinish = (e) => {
|
|
43
|
-
if (!done) {
|
|
44
|
-
done = true;
|
|
45
|
-
onFinish && onFinish(e);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
return new ReadableStream({
|
|
49
|
-
async pull(controller) {
|
|
50
|
-
try {
|
|
51
|
-
const { done: done2, value } = await iterator.next();
|
|
52
|
-
if (done2) {
|
|
53
|
-
_onFinish();
|
|
54
|
-
controller.close();
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
let len = value.byteLength;
|
|
58
|
-
if (onProgress) {
|
|
59
|
-
let loadedBytes = bytes += len;
|
|
60
|
-
onProgress(loadedBytes);
|
|
61
|
-
}
|
|
62
|
-
controller.enqueue(new Uint8Array(value));
|
|
63
|
-
} catch (err) {
|
|
64
|
-
_onFinish(err);
|
|
65
|
-
throw err;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
cancel(reason) {
|
|
69
|
-
_onFinish(reason);
|
|
70
|
-
return iterator.return();
|
|
71
|
-
}
|
|
72
|
-
}, {
|
|
73
|
-
highWaterMark: 2
|
|
74
|
-
});
|
|
75
|
-
};
|
|
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;
|
|
76
21
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
22
|
+
fromBig,
|
|
23
|
+
rotlBH,
|
|
24
|
+
rotlBL,
|
|
25
|
+
rotlSH,
|
|
26
|
+
rotlSL,
|
|
27
|
+
split
|
|
80
28
|
};
|
|
81
29
|
//# sourceMappingURL=standards-sdk.es111.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es111.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es111.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,6 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
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;
|
|
32
|
+
}
|
|
3
33
|
export {
|
|
4
|
-
|
|
34
|
+
Hash,
|
|
35
|
+
isLE,
|
|
36
|
+
toBytes,
|
|
37
|
+
u32,
|
|
38
|
+
utf8ToBytes,
|
|
39
|
+
wrapConstructor
|
|
5
40
|
};
|
|
6
41
|
//# sourceMappingURL=standards-sdk.es112.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es112.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es112.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]}
|