@hashgraphonline/standards-sdk 0.0.100 → 0.0.101
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/standards-sdk.es100.js +63 -14
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +6 -5
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +15 -39
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +6 -39
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +43 -35
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +2 -78
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +136 -3
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +172 -2
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +13 -2
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +13 -21
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +30 -25
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +14 -25
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +3 -37
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +3 -33
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +15 -32
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +5 -9
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +39 -34
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +37 -98
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +37 -2
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es119.js +78 -16
- package/dist/es/standards-sdk.es119.js.map +1 -1
- package/dist/es/standards-sdk.es120.js +3 -409
- package/dist/es/standards-sdk.es120.js.map +1 -1
- package/dist/es/standards-sdk.es121.js +2 -2282
- package/dist/es/standards-sdk.es121.js.map +1 -1
- package/dist/es/standards-sdk.es122.js +2 -10
- package/dist/es/standards-sdk.es122.js.map +1 -1
- package/dist/es/standards-sdk.es123.js +33 -10
- package/dist/es/standards-sdk.es123.js.map +1 -1
- package/dist/es/standards-sdk.es124.js +31 -16
- package/dist/es/standards-sdk.es124.js.map +1 -1
- package/dist/es/standards-sdk.es125.js +9 -6
- package/dist/es/standards-sdk.es125.js.map +1 -1
- package/dist/es/standards-sdk.es126.js +34 -9
- package/dist/es/standards-sdk.es126.js.map +1 -1
- package/dist/es/standards-sdk.es13.js +3 -3
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es18.js +2 -2
- package/dist/es/standards-sdk.es19.js +83 -18
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +2 -2
- package/dist/es/standards-sdk.es21.js +3 -3
- package/dist/es/standards-sdk.es24.js +10 -10
- package/dist/es/standards-sdk.es25.js +1769 -5
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +3 -36
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +4168 -48
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +5543 -122
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +8 -9
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +2 -7190
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +36 -3
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +47 -8
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +5 -2
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +8 -4166
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +87 -405
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +2 -2
- package/dist/es/standards-sdk.es37.js +15 -119
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +398 -353
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +2 -6
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es40.js +2282 -179
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +153 -70
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +78 -108
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +21 -50
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +148 -10
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +81 -87
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +194 -3
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +438 -2
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +19 -107
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +135 -70
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +1 -1
- package/dist/es/standards-sdk.es50.js +17 -5
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +28 -4
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +27 -219
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +19 -56
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +44 -69
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +18 -2
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +61 -3
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +1260 -135
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +28 -28
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +5 -62
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +156 -47
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +792 -9
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +166 -57
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +143 -6
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +20 -14
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +27 -7
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +26 -45
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +38 -2
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +3 -136
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +4 -172
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +4 -4
- package/dist/es/standards-sdk.es70.js +7133 -1
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +10 -13
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +11 -13
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +14 -7132
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +4 -193
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +8 -437
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +415 -21
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +2 -139
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +117 -15
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +356 -21
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +3 -3
- package/dist/es/standards-sdk.es80.js +5 -28
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +173 -15
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +74 -37
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +112 -16
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +47 -56
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +9 -1288
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +83 -134
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +3 -90
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +2 -84
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +108 -27
- 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 +73 -5
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +5 -158
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +4 -22
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +206 -778
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +55 -171
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +68 -142
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +30 -30
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +62 -14
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +49 -3
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +9 -3
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/transaction-parser.d.ts +27 -0
- package/dist/es/utils/transaction-parser.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/transaction-parser.d.ts +27 -0
- package/dist/umd/utils/transaction-parser.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,48 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const parseHeaders = (rawHeaders) => {
|
|
22
|
-
const parsed = {};
|
|
23
|
-
let key;
|
|
24
|
-
let val;
|
|
25
|
-
let i;
|
|
26
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
27
|
-
i = line.indexOf(":");
|
|
28
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
29
|
-
val = line.substring(i + 1).trim();
|
|
30
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (key === "set-cookie") {
|
|
34
|
-
if (parsed[key]) {
|
|
35
|
-
parsed[key].push(val);
|
|
36
|
-
} else {
|
|
37
|
-
parsed[key] = [val];
|
|
38
|
-
}
|
|
39
|
-
} else {
|
|
40
|
-
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return parsed;
|
|
44
|
-
};
|
|
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;
|
|
45
21
|
export {
|
|
46
|
-
|
|
22
|
+
fromBig,
|
|
23
|
+
rotlBH,
|
|
24
|
+
rotlBL,
|
|
25
|
+
rotlSH,
|
|
26
|
+
rotlSL,
|
|
27
|
+
split
|
|
47
28
|
};
|
|
48
29
|
//# sourceMappingURL=standards-sdk.es66.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es66.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es66.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,5 +1,41 @@
|
|
|
1
|
-
|
|
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
|
+
}
|
|
2
33
|
export {
|
|
3
|
-
|
|
34
|
+
Hash,
|
|
35
|
+
isLE,
|
|
36
|
+
toBytes,
|
|
37
|
+
u32,
|
|
38
|
+
utf8ToBytes,
|
|
39
|
+
wrapConstructor
|
|
4
40
|
};
|
|
5
41
|
//# sourceMappingURL=standards-sdk.es67.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es67.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es67.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,139 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import settle from "./standards-sdk.es100.js";
|
|
3
|
-
import transitionalDefaults from "./standards-sdk.es63.js";
|
|
4
|
-
import AxiosError from "./standards-sdk.es49.js";
|
|
5
|
-
import CanceledError from "./standards-sdk.es44.js";
|
|
6
|
-
import parseProtocol from "./standards-sdk.es101.js";
|
|
7
|
-
import platform from "./standards-sdk.es65.js";
|
|
8
|
-
import AxiosHeaders from "./standards-sdk.es52.js";
|
|
9
|
-
import { progressEventReducer } from "./standards-sdk.es102.js";
|
|
10
|
-
import resolveConfig from "./standards-sdk.es103.js";
|
|
11
|
-
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
12
|
-
const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
13
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
14
|
-
const _config = resolveConfig(config);
|
|
15
|
-
let requestData = _config.data;
|
|
16
|
-
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
17
|
-
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
18
|
-
let onCanceled;
|
|
19
|
-
let uploadThrottled, downloadThrottled;
|
|
20
|
-
let flushUpload, flushDownload;
|
|
21
|
-
function done() {
|
|
22
|
-
flushUpload && flushUpload();
|
|
23
|
-
flushDownload && flushDownload();
|
|
24
|
-
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
25
|
-
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
26
|
-
}
|
|
27
|
-
let request = new XMLHttpRequest();
|
|
28
|
-
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
29
|
-
request.timeout = _config.timeout;
|
|
30
|
-
function onloadend() {
|
|
31
|
-
if (!request) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const responseHeaders = AxiosHeaders.from(
|
|
35
|
-
"getAllResponseHeaders" in request && request.getAllResponseHeaders()
|
|
36
|
-
);
|
|
37
|
-
const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
|
|
38
|
-
const response = {
|
|
39
|
-
data: responseData,
|
|
40
|
-
status: request.status,
|
|
41
|
-
statusText: request.statusText,
|
|
42
|
-
headers: responseHeaders,
|
|
43
|
-
config,
|
|
44
|
-
request
|
|
45
|
-
};
|
|
46
|
-
settle(function _resolve(value) {
|
|
47
|
-
resolve(value);
|
|
48
|
-
done();
|
|
49
|
-
}, function _reject(err) {
|
|
50
|
-
reject(err);
|
|
51
|
-
done();
|
|
52
|
-
}, response);
|
|
53
|
-
request = null;
|
|
54
|
-
}
|
|
55
|
-
if ("onloadend" in request) {
|
|
56
|
-
request.onloadend = onloadend;
|
|
57
|
-
} else {
|
|
58
|
-
request.onreadystatechange = function handleLoad() {
|
|
59
|
-
if (!request || request.readyState !== 4) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
setTimeout(onloadend);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
request.onabort = function handleAbort() {
|
|
69
|
-
if (!request) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
|
|
73
|
-
request = null;
|
|
74
|
-
};
|
|
75
|
-
request.onerror = function handleError() {
|
|
76
|
-
reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
|
|
77
|
-
request = null;
|
|
78
|
-
};
|
|
79
|
-
request.ontimeout = function handleTimeout() {
|
|
80
|
-
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
81
|
-
const transitional = _config.transitional || transitionalDefaults;
|
|
82
|
-
if (_config.timeoutErrorMessage) {
|
|
83
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
84
|
-
}
|
|
85
|
-
reject(new AxiosError(
|
|
86
|
-
timeoutErrorMessage,
|
|
87
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
88
|
-
config,
|
|
89
|
-
request
|
|
90
|
-
));
|
|
91
|
-
request = null;
|
|
92
|
-
};
|
|
93
|
-
requestData === void 0 && requestHeaders.setContentType(null);
|
|
94
|
-
if ("setRequestHeader" in request) {
|
|
95
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
96
|
-
request.setRequestHeader(key, val);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
if (!utils.isUndefined(_config.withCredentials)) {
|
|
100
|
-
request.withCredentials = !!_config.withCredentials;
|
|
101
|
-
}
|
|
102
|
-
if (responseType && responseType !== "json") {
|
|
103
|
-
request.responseType = _config.responseType;
|
|
104
|
-
}
|
|
105
|
-
if (onDownloadProgress) {
|
|
106
|
-
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
107
|
-
request.addEventListener("progress", downloadThrottled);
|
|
108
|
-
}
|
|
109
|
-
if (onUploadProgress && request.upload) {
|
|
110
|
-
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
111
|
-
request.upload.addEventListener("progress", uploadThrottled);
|
|
112
|
-
request.upload.addEventListener("loadend", flushUpload);
|
|
113
|
-
}
|
|
114
|
-
if (_config.cancelToken || _config.signal) {
|
|
115
|
-
onCanceled = (cancel) => {
|
|
116
|
-
if (!request) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
120
|
-
request.abort();
|
|
121
|
-
request = null;
|
|
122
|
-
};
|
|
123
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
124
|
-
if (_config.signal) {
|
|
125
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const protocol = parseProtocol(_config.url);
|
|
129
|
-
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
130
|
-
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
request.send(requestData || null);
|
|
134
|
-
});
|
|
135
|
-
};
|
|
1
|
+
const global = globalThis || void 0 || self;
|
|
136
2
|
export {
|
|
137
|
-
|
|
3
|
+
global as default,
|
|
4
|
+
global
|
|
138
5
|
};
|
|
139
6
|
//# sourceMappingURL=standards-sdk.es68.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es68.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es68.js","sources":["../../node_modules/vite-plugin-node-polyfills/shims/global/dist/index.js"],"sourcesContent":["const global = globalThis || void 0 || self;\n\nexport { global as default, global };\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":"AAAK,MAAC,SAAS,cAAc,UAAU;","x_google_ignoreList":[0]}
|
|
@@ -1,175 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import composeSignals from "./standards-sdk.es104.js";
|
|
5
|
-
import { trackStream } from "./standards-sdk.es105.js";
|
|
6
|
-
import AxiosHeaders from "./standards-sdk.es52.js";
|
|
7
|
-
import { progressEventDecorator, progressEventReducer, asyncDecorator } from "./standards-sdk.es102.js";
|
|
8
|
-
import resolveConfig from "./standards-sdk.es103.js";
|
|
9
|
-
import settle from "./standards-sdk.es100.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
|
-
});
|
|
1
|
+
function getDefaultExportFromCjs(x) {
|
|
2
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3
|
+
}
|
|
172
4
|
export {
|
|
173
|
-
|
|
5
|
+
getDefaultExportFromCjs
|
|
174
6
|
};
|
|
175
7
|
//# sourceMappingURL=standards-sdk.es69.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es69.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,aAAa;AAC7G,MAAM,4BAA4B,oBAAoB,O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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
|
+
{"version":3,"file":"standards-sdk.es69.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Buffer from "./standards-sdk.
|
|
1
|
+
import Buffer from "./standards-sdk.es25.js";
|
|
2
2
|
import { Client, PrivateKey, AccountCreateTransaction, Hbar, CustomFixedFee, AccountId, TokenId, KeyList, TopicCreateTransaction, PublicKey, TopicMessageSubmitTransaction, TopicId, Transaction, ScheduleCreateTransaction, Timestamp } from "@hashgraph/sdk";
|
|
3
3
|
import { AccountCreationError, TopicCreationError, ConnectionConfirmationError, PayloadSizeError } from "./standards-sdk.es6.js";
|
|
4
|
-
import { I as InscriptionSDK } from "./standards-sdk.
|
|
4
|
+
import { I as InscriptionSDK } from "./standards-sdk.es28.js";
|
|
5
5
|
import { Logger } from "./standards-sdk.es15.js";
|
|
6
6
|
import { HCS10BaseClient, Hcs10MemoType } from "./standards-sdk.es5.js";
|
|
7
|
-
import { m as mimeTypesExports } from "./standards-sdk.
|
|
7
|
+
import { m as mimeTypesExports } from "./standards-sdk.es26.js";
|
|
8
8
|
import { InboundTopicType } from "./standards-sdk.es14.js";
|
|
9
9
|
import { HCS11Client } from "./standards-sdk.es13.js";
|
|
10
10
|
import { accountIdsToExemptKeys } from "./standards-sdk.es16.js";
|
|
11
11
|
import { inscribe } from "./standards-sdk.es20.js";
|
|
12
|
-
import addSeconds from "./standards-sdk.
|
|
12
|
+
import addSeconds from "./standards-sdk.es29.js";
|
|
13
13
|
class HCS10Client extends HCS10BaseClient {
|
|
14
14
|
constructor(config) {
|
|
15
15
|
super({
|