@omnity/ree-client-ts-sdk 0.4.6 → 0.4.8
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/ree-sdk.cjs.js +30 -30
- package/dist/ree-sdk.es.js +683 -683
- package/package.json +1 -1
package/dist/ree-sdk.es.js
CHANGED
|
@@ -32,10 +32,10 @@ function U1(e, t) {
|
|
|
32
32
|
function Hy(e) {
|
|
33
33
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
34
34
|
}
|
|
35
|
-
var Bu = {},
|
|
35
|
+
var Bu = {}, Js = {}, Dh;
|
|
36
36
|
function C1() {
|
|
37
|
-
if (Dh) return
|
|
38
|
-
Dh = 1,
|
|
37
|
+
if (Dh) return Js;
|
|
38
|
+
Dh = 1, Js.byteLength = c, Js.toByteArray = u, Js.fromByteArray = d;
|
|
39
39
|
for (var e = [], t = [], n = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, s = r.length; i < s; ++i)
|
|
40
40
|
e[i] = r[i], t[r.charCodeAt(i)] = i;
|
|
41
41
|
t[45] = 62, t[95] = 63;
|
|
@@ -78,13 +78,13 @@ function C1() {
|
|
|
78
78
|
e[g >> 10] + e[g >> 4 & 63] + e[g << 2 & 63] + "="
|
|
79
79
|
)), _.join("");
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return Js;
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var Ac = {};
|
|
84
84
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
85
85
|
var jh;
|
|
86
86
|
function H1() {
|
|
87
|
-
return jh || (jh = 1,
|
|
87
|
+
return jh || (jh = 1, Ac.read = function(e, t, n, r, i) {
|
|
88
88
|
var s, o, c = i * 8 - r - 1, a = (1 << c) - 1, u = a >> 1, f = -7, l = n ? i - 1 : 0, d = n ? -1 : 1, y = e[t + l];
|
|
89
89
|
for (l += d, s = y & (1 << -f) - 1, y >>= -f, f += c; f > 0; s = s * 256 + e[t + l], l += d, f -= 8)
|
|
90
90
|
;
|
|
@@ -98,14 +98,14 @@ function H1() {
|
|
|
98
98
|
o = o + Math.pow(2, r), s = s - u;
|
|
99
99
|
}
|
|
100
100
|
return (y ? -1 : 1) * o * Math.pow(2, s - r);
|
|
101
|
-
},
|
|
101
|
+
}, Ac.write = function(e, t, n, r, i, s) {
|
|
102
102
|
var o, c, a, u = s * 8 - i - 1, f = (1 << u) - 1, l = f >> 1, d = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = r ? 0 : s - 1, g = r ? 1 : -1, m = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
103
103
|
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (c = isNaN(t) ? 1 : 0, o = f) : (o = Math.floor(Math.log(t) / Math.LN2), t * (a = Math.pow(2, -o)) < 1 && (o--, a *= 2), o + l >= 1 ? t += d / a : t += d * Math.pow(2, 1 - l), t * a >= 2 && (o++, a /= 2), o + l >= f ? (c = 0, o = f) : o + l >= 1 ? (c = (t * a - 1) * Math.pow(2, i), o = o + l) : (c = t * Math.pow(2, l - 1) * Math.pow(2, i), o = 0)); i >= 8; e[n + y] = c & 255, y += g, c /= 256, i -= 8)
|
|
104
104
|
;
|
|
105
105
|
for (o = o << i | c, u += i; u > 0; e[n + y] = o & 255, y += g, o /= 256, u -= 8)
|
|
106
106
|
;
|
|
107
107
|
e[n + y - g] |= m * 128;
|
|
108
|
-
}),
|
|
108
|
+
}), Ac;
|
|
109
109
|
}
|
|
110
110
|
/*!
|
|
111
111
|
* The buffer module from node.js, for the browser.
|
|
@@ -114,7 +114,7 @@ function H1() {
|
|
|
114
114
|
* @license MIT
|
|
115
115
|
*/
|
|
116
116
|
var Kh;
|
|
117
|
-
function
|
|
117
|
+
function ic() {
|
|
118
118
|
return Kh || (Kh = 1, (function(e) {
|
|
119
119
|
const t = C1(), n = H1(), r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
120
120
|
e.Buffer = c, e.SlowBuffer = S, e.INSPECT_MAX_BYTES = 50;
|
|
@@ -1054,7 +1054,7 @@ function rc() {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
})(Bu)), Bu;
|
|
1056
1056
|
}
|
|
1057
|
-
var F1 =
|
|
1057
|
+
var F1 = ic(), Nu = { exports: {} }, Gh;
|
|
1058
1058
|
function M1() {
|
|
1059
1059
|
if (Gh) return Nu.exports;
|
|
1060
1060
|
Gh = 1;
|
|
@@ -1155,9 +1155,9 @@ const L1 = /* @__PURE__ */ Hy(q1);
|
|
|
1155
1155
|
typeof globalThis > "u" && (globalThis.global = globalThis);
|
|
1156
1156
|
typeof globalThis.Buffer > "u" && (globalThis.Buffer = F1.Buffer);
|
|
1157
1157
|
typeof globalThis.process > "u" && (globalThis.process = L1);
|
|
1158
|
-
var ot = {}, ku = {}, We = {}, Lt = {}, Pu = {},
|
|
1158
|
+
var ot = {}, ku = {}, We = {}, Lt = {}, Pu = {}, Qs = {}, Wh;
|
|
1159
1159
|
function V1() {
|
|
1160
|
-
return Wh || (Wh = 1, Object.defineProperty(
|
|
1160
|
+
return Wh || (Wh = 1, Object.defineProperty(Qs, "__esModule", { value: !0 }), Qs.crypto = void 0, Qs.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Qs;
|
|
1161
1161
|
}
|
|
1162
1162
|
var Xh;
|
|
1163
1163
|
function fi() {
|
|
@@ -1820,7 +1820,7 @@ function My() {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
return We.SHA512_256 = _, We.sha256 = (0, n.createHasher)(() => new s()), We.sha224 = (0, n.createHasher)(() => new o()), We.sha512 = (0, n.createHasher)(() => new d()), We.sha384 = (0, n.createHasher)(() => new y()), We.sha512_256 = (0, n.createHasher)(() => new _()), We.sha512_224 = (0, n.createHasher)(() => new E()), We;
|
|
1822
1822
|
}
|
|
1823
|
-
var
|
|
1823
|
+
var eo = {}, Ru = {}, Uu = {}, Jh;
|
|
1824
1824
|
function D1() {
|
|
1825
1825
|
return Jh || (Jh = 1, (function(e) {
|
|
1826
1826
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.hmac = e.HMAC = void 0;
|
|
@@ -1869,7 +1869,7 @@ function D1() {
|
|
|
1869
1869
|
})(Uu)), Uu;
|
|
1870
1870
|
}
|
|
1871
1871
|
var Cu = {}, Qh;
|
|
1872
|
-
function
|
|
1872
|
+
function Vs() {
|
|
1873
1873
|
return Qh || (Qh = 1, (function(e) {
|
|
1874
1874
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.notImplemented = e.bitMask = e.utf8ToBytes = e.randomBytes = e.isBytes = e.hexToBytes = e.concatBytes = e.bytesToUtf8 = e.bytesToHex = e.anumber = e.abytes = void 0, e.abool = s, e._abool2 = o, e._abytes2 = c, e.numberToHexUnpadded = a, e.hexToNumber = u, e.bytesToNumberBE = f, e.bytesToNumberLE = l, e.numberToBytesBE = d, e.numberToBytesLE = y, e.numberToVarBytesBE = g, e.ensureBytes = m, e.equalBytes = E, e.copyBytes = _, e.asciiToBytes = S, e.inRange = T, e.aInRange = O, e.bitLen = A, e.bitGet = R, e.bitSet = M, e.createHmacDrbg = U, e.validateObject = K, e.isHash = H, e._validateObject = $, e.memoized = D;
|
|
1875
1875
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -2088,11 +2088,11 @@ function Ls() {
|
|
|
2088
2088
|
})(Cu)), Cu;
|
|
2089
2089
|
}
|
|
2090
2090
|
var Tn = {}, Je = {}, ed;
|
|
2091
|
-
function
|
|
2091
|
+
function sc() {
|
|
2092
2092
|
if (ed) return Je;
|
|
2093
2093
|
ed = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.isNegativeLE = void 0, Je.mod = l, Je.pow = d, Je.pow2 = y, Je.invert = g, Je.tonelliShanks = w, Je.FpSqrt = T, Je.validateField = R, Je.FpPow = M, Je.FpInvertBatch = v, Je.FpDiv = U, Je.FpLegendre = L, Je.FpIsSquare = K, Je.nLength = H, Je.Field = $, Je.FpSqrtOdd = P, Je.FpSqrtEven = D, Je.hashToPrivateScalar = F, Je.getFieldBytesLength = x, Je.getMinHashLength = B, Je.mapHashToField = q;
|
|
2094
2094
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2095
|
-
const e = /* @__PURE__ */
|
|
2095
|
+
const e = /* @__PURE__ */ Vs(), t = BigInt(0), n = BigInt(1), r = /* @__PURE__ */ BigInt(2), i = /* @__PURE__ */ BigInt(3), s = /* @__PURE__ */ BigInt(4), o = /* @__PURE__ */ BigInt(5), c = /* @__PURE__ */ BigInt(7), a = /* @__PURE__ */ BigInt(8), u = /* @__PURE__ */ BigInt(9), f = /* @__PURE__ */ BigInt(16);
|
|
2096
2096
|
function l(N, V) {
|
|
2097
2097
|
const G = N % V;
|
|
2098
2098
|
return G >= t ? G : V + G;
|
|
@@ -2358,7 +2358,7 @@ function j1() {
|
|
|
2358
2358
|
if (td) return Tn;
|
|
2359
2359
|
td = 1, Object.defineProperty(Tn, "__esModule", { value: !0 }), Tn.wNAF = void 0, Tn.negateCt = i, Tn.normalizeZ = s, Tn.mulEndoUnsafe = E, Tn.pippenger = _, Tn.precomputeMSMUnsafe = S, Tn.validateBasic = w, Tn._createCurveFields = O;
|
|
2360
2360
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2361
|
-
const e = /* @__PURE__ */
|
|
2361
|
+
const e = /* @__PURE__ */ Vs(), t = /* @__PURE__ */ sc(), n = BigInt(0), r = BigInt(1);
|
|
2362
2362
|
function i(A, R) {
|
|
2363
2363
|
const M = R.negate();
|
|
2364
2364
|
return A ? M : R;
|
|
@@ -2598,7 +2598,7 @@ function qy() {
|
|
|
2598
2598
|
return nd || (nd = 1, (function(e) {
|
|
2599
2599
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DER = e.DERErr = void 0, e._splitEndoScalar = c, e._normFnElement = E, e.weierstrassN = _, e.SWUFpSqrtRatio = w, e.mapToCurveSimpleSWU = T, e.ecdh = A, e.ecdsa = R, e.weierstrassPoints = M, e._legacyHelperEquat = L, e.weierstrass = $;
|
|
2600
2600
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2601
|
-
const t = /* @__PURE__ */ D1(), n = /* @__PURE__ */ fi(), r = /* @__PURE__ */
|
|
2601
|
+
const t = /* @__PURE__ */ D1(), n = /* @__PURE__ */ fi(), r = /* @__PURE__ */ Vs(), i = /* @__PURE__ */ j1(), s = /* @__PURE__ */ sc(), o = (P, D) => (P + (P >= 0 ? D : -D) / y) / D;
|
|
2602
2602
|
function c(P, D, F) {
|
|
2603
2603
|
const [[x, B], [q, N]] = D, V = o(N * P, F), G = o(-B * P, F);
|
|
2604
2604
|
let X = P - V * x - G * q, Y = -V * B - G * N;
|
|
@@ -3462,8 +3462,8 @@ function qy() {
|
|
|
3462
3462
|
}
|
|
3463
3463
|
var rd;
|
|
3464
3464
|
function K1() {
|
|
3465
|
-
if (rd) return
|
|
3466
|
-
rd = 1, Object.defineProperty(
|
|
3465
|
+
if (rd) return eo;
|
|
3466
|
+
rd = 1, Object.defineProperty(eo, "__esModule", { value: !0 }), eo.getHash = t, eo.createCurve = n;
|
|
3467
3467
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3468
3468
|
const e = /* @__PURE__ */ qy();
|
|
3469
3469
|
function t(r) {
|
|
@@ -3473,13 +3473,13 @@ function K1() {
|
|
|
3473
3473
|
const s = (o) => (0, e.weierstrass)({ ...r, hash: o });
|
|
3474
3474
|
return { ...s(i), create: s };
|
|
3475
3475
|
}
|
|
3476
|
-
return
|
|
3476
|
+
return eo;
|
|
3477
3477
|
}
|
|
3478
3478
|
var Hu = {}, id;
|
|
3479
3479
|
function G1() {
|
|
3480
3480
|
return id || (id = 1, (function(e) {
|
|
3481
3481
|
Object.defineProperty(e, "__esModule", { value: !0 }), e._DST_scalar = void 0, e.expand_message_xmd = a, e.expand_message_xof = u, e.hash_to_field = f, e.isogenyMap = l, e.createHasher = d;
|
|
3482
|
-
const t = /* @__PURE__ */
|
|
3482
|
+
const t = /* @__PURE__ */ Vs(), n = /* @__PURE__ */ sc(), r = t.bytesToNumberBE;
|
|
3483
3483
|
function i(y, g) {
|
|
3484
3484
|
if (o(y), o(g), y < 0 || y >= 1 << 8 * g)
|
|
3485
3485
|
throw new Error("invalid I2OSP input: " + y);
|
|
@@ -3609,7 +3609,7 @@ function W1() {
|
|
|
3609
3609
|
return sd || (sd = 1, (function(e) {
|
|
3610
3610
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.encodeToCurve = e.hashToCurve = e.secp256k1_hasher = e.schnorr = e.secp256k1 = void 0;
|
|
3611
3611
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3612
|
-
const t = /* @__PURE__ */ My(), n = /* @__PURE__ */ fi(), r = /* @__PURE__ */ K1(), i = /* @__PURE__ */ G1(), s = /* @__PURE__ */
|
|
3612
|
+
const t = /* @__PURE__ */ My(), n = /* @__PURE__ */ fi(), r = /* @__PURE__ */ K1(), i = /* @__PURE__ */ G1(), s = /* @__PURE__ */ sc(), o = /* @__PURE__ */ qy(), c = /* @__PURE__ */ Vs(), a = {
|
|
3613
3613
|
p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
|
|
3614
3614
|
n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
|
|
3615
3615
|
h: BigInt(1),
|
|
@@ -3770,14 +3770,14 @@ var pe = {}, od;
|
|
|
3770
3770
|
function X1() {
|
|
3771
3771
|
if (od) return pe;
|
|
3772
3772
|
od = 1, Object.defineProperty(pe, "__esModule", { value: !0 }), pe.isHash = pe.validateObject = pe.memoized = pe.notImplemented = pe.createHmacDrbg = pe.bitMask = pe.bitSet = pe.bitGet = pe.bitLen = pe.aInRange = pe.inRange = pe.asciiToBytes = pe.copyBytes = pe.equalBytes = pe.ensureBytes = pe.numberToVarBytesBE = pe.numberToBytesLE = pe.numberToBytesBE = pe.bytesToNumberLE = pe.bytesToNumberBE = pe.hexToNumber = pe.numberToHexUnpadded = pe.abool = pe.utf8ToBytes = pe.randomBytes = pe.isBytes = pe.hexToBytes = pe.concatBytes = pe.bytesToUtf8 = pe.bytesToHex = pe.anumber = pe.abytes = void 0;
|
|
3773
|
-
const e = /* @__PURE__ */
|
|
3773
|
+
const e = /* @__PURE__ */ Vs();
|
|
3774
3774
|
return pe.abytes = e.abytes, pe.anumber = e.anumber, pe.bytesToHex = e.bytesToHex, pe.bytesToUtf8 = e.bytesToUtf8, pe.concatBytes = e.concatBytes, pe.hexToBytes = e.hexToBytes, pe.isBytes = e.isBytes, pe.randomBytes = e.randomBytes, pe.utf8ToBytes = e.utf8ToBytes, pe.abool = e.abool, pe.numberToHexUnpadded = e.numberToHexUnpadded, pe.hexToNumber = e.hexToNumber, pe.bytesToNumberBE = e.bytesToNumberBE, pe.bytesToNumberLE = e.bytesToNumberLE, pe.numberToBytesBE = e.numberToBytesBE, pe.numberToBytesLE = e.numberToBytesLE, pe.numberToVarBytesBE = e.numberToVarBytesBE, pe.ensureBytes = e.ensureBytes, pe.equalBytes = e.equalBytes, pe.copyBytes = e.copyBytes, pe.asciiToBytes = e.asciiToBytes, pe.inRange = e.inRange, pe.aInRange = e.aInRange, pe.bitLen = e.bitLen, pe.bitGet = e.bitGet, pe.bitSet = e.bitSet, pe.bitMask = e.bitMask, pe.createHmacDrbg = e.createHmacDrbg, pe.notImplemented = e.notImplemented, pe.memoized = e.memoized, pe.validateObject = e.validateObject, pe.isHash = e.isHash, pe;
|
|
3775
3775
|
}
|
|
3776
3776
|
var cd;
|
|
3777
3777
|
function z1() {
|
|
3778
3778
|
if (cd) return ot;
|
|
3779
3779
|
cd = 1;
|
|
3780
|
-
var e = /* @__PURE__ */ W1(), t = /* @__PURE__ */
|
|
3780
|
+
var e = /* @__PURE__ */ W1(), t = /* @__PURE__ */ sc(), n = /* @__PURE__ */ X1();
|
|
3781
3781
|
function r(p) {
|
|
3782
3782
|
var h = /* @__PURE__ */ Object.create(null);
|
|
3783
3783
|
return p && Object.keys(p).forEach(function(b) {
|
|
@@ -4418,7 +4418,7 @@ function cb(e, t, n, r) {
|
|
|
4418
4418
|
throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 65535. Received ${n}`);
|
|
4419
4419
|
return r === "LE" ? (e[t] = n & 255, e[t + 1] = n >> 8 & 255) : (e[t] = n >> 8 & 255, e[t + 1] = n & 255), t + 2;
|
|
4420
4420
|
}
|
|
4421
|
-
function
|
|
4421
|
+
function oc(e, t, n, r) {
|
|
4422
4422
|
if (t + 4 > e.length)
|
|
4423
4423
|
throw new Error("Offset is outside the bounds of Uint8Array");
|
|
4424
4424
|
if (r = r.toUpperCase(), n > 4294967295)
|
|
@@ -4448,7 +4448,7 @@ function ub(e, t, n) {
|
|
|
4448
4448
|
return r = (r << 8) + e[t], r = (r << 8) + e[t + 1], r;
|
|
4449
4449
|
}
|
|
4450
4450
|
}
|
|
4451
|
-
function
|
|
4451
|
+
function $s(e, t, n) {
|
|
4452
4452
|
if (t + 4 > e.length)
|
|
4453
4453
|
throw new Error("Offset is outside the bounds of Uint8Array");
|
|
4454
4454
|
if (n = n.toUpperCase(), n === "LE") {
|
|
@@ -4501,7 +4501,7 @@ function zy(e) {
|
|
|
4501
4501
|
}
|
|
4502
4502
|
function lb(e, t, n) {
|
|
4503
4503
|
const r = zy(t);
|
|
4504
|
-
return r === 1 ? En(e, n, t) : r === 2 ? (En(e, n, Ge.OP_PUSHDATA1), En(e, n + 1, t)) : r === 3 ? (En(e, n, Ge.OP_PUSHDATA2), cb(e, n + 1, t, "LE")) : (En(e, n, Ge.OP_PUSHDATA4),
|
|
4504
|
+
return r === 1 ? En(e, n, t) : r === 2 ? (En(e, n, Ge.OP_PUSHDATA1), En(e, n + 1, t)) : r === 3 ? (En(e, n, Ge.OP_PUSHDATA2), cb(e, n + 1, t, "LE")) : (En(e, n, Ge.OP_PUSHDATA4), oc(e, n + 1, t, "LE")), r;
|
|
4505
4505
|
}
|
|
4506
4506
|
function hb(e, t) {
|
|
4507
4507
|
const n = Br(e, t);
|
|
@@ -4517,7 +4517,7 @@ function hb(e, t) {
|
|
|
4517
4517
|
} else {
|
|
4518
4518
|
if (t + 5 > e.length) return null;
|
|
4519
4519
|
if (n !== Ge.OP_PUSHDATA4) throw new Error("Unexpected opcode");
|
|
4520
|
-
r =
|
|
4520
|
+
r = $s(e, t + 1, "LE"), i = 5;
|
|
4521
4521
|
}
|
|
4522
4522
|
return {
|
|
4523
4523
|
opcode: n,
|
|
@@ -4556,12 +4556,12 @@ var Eb;
|
|
|
4556
4556
|
function _b(e, t) {
|
|
4557
4557
|
return Eb?.get(e)?.get(t);
|
|
4558
4558
|
}
|
|
4559
|
-
function
|
|
4559
|
+
function Oo(e) {
|
|
4560
4560
|
const t = typeof e;
|
|
4561
4561
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
4562
4562
|
}
|
|
4563
4563
|
function Wt(e, t, n, r, i) {
|
|
4564
|
-
const s = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, c = i?.received ??
|
|
4564
|
+
const s = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, c = i?.received ?? Oo(s), a = {
|
|
4565
4565
|
kind: e.kind,
|
|
4566
4566
|
type: e.type,
|
|
4567
4567
|
input: s,
|
|
@@ -4647,12 +4647,12 @@ function Ka(e, t) {
|
|
|
4647
4647
|
type: "max_value",
|
|
4648
4648
|
reference: Ka,
|
|
4649
4649
|
async: !1,
|
|
4650
|
-
expects: `<=${e instanceof Date ? e.toJSON() :
|
|
4650
|
+
expects: `<=${e instanceof Date ? e.toJSON() : Oo(e)}`,
|
|
4651
4651
|
requirement: e,
|
|
4652
4652
|
message: t,
|
|
4653
4653
|
_run(n, r) {
|
|
4654
4654
|
return n.typed && n.value > this.requirement && Wt(this, "value", n, r, {
|
|
4655
|
-
received: n.value instanceof Date ? n.value.toJSON() :
|
|
4655
|
+
received: n.value instanceof Date ? n.value.toJSON() : Oo(n.value)
|
|
4656
4656
|
}), n;
|
|
4657
4657
|
}
|
|
4658
4658
|
};
|
|
@@ -4663,12 +4663,12 @@ function Ga(e, t) {
|
|
|
4663
4663
|
type: "min_value",
|
|
4664
4664
|
reference: Ga,
|
|
4665
4665
|
async: !1,
|
|
4666
|
-
expects: `>=${e instanceof Date ? e.toJSON() :
|
|
4666
|
+
expects: `>=${e instanceof Date ? e.toJSON() : Oo(e)}`,
|
|
4667
4667
|
requirement: e,
|
|
4668
4668
|
message: t,
|
|
4669
4669
|
_run(n, r) {
|
|
4670
4670
|
return n.typed && n.value < this.requirement && Wt(this, "value", n, r, {
|
|
4671
|
-
received: n.value instanceof Date ? n.value.toJSON() :
|
|
4671
|
+
received: n.value instanceof Date ? n.value.toJSON() : Oo(n.value)
|
|
4672
4672
|
}), n;
|
|
4673
4673
|
}
|
|
4674
4674
|
};
|
|
@@ -5022,7 +5022,7 @@ function li(e, t) {
|
|
|
5022
5022
|
n[r] = pa(e.entries[r]);
|
|
5023
5023
|
return { ...e, entries: n };
|
|
5024
5024
|
}
|
|
5025
|
-
function
|
|
5025
|
+
function Ds(...e) {
|
|
5026
5026
|
return {
|
|
5027
5027
|
...e[0],
|
|
5028
5028
|
pipe: e,
|
|
@@ -5041,8 +5041,8 @@ function $s(...e) {
|
|
|
5041
5041
|
}
|
|
5042
5042
|
const ud = new Uint8Array(32), fd = Ur(
|
|
5043
5043
|
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"
|
|
5044
|
-
), vt = (e) =>
|
|
5045
|
-
function
|
|
5044
|
+
), vt = (e) => Ds(Xa(Uint8Array), Zy(e));
|
|
5045
|
+
function Bo(e, t) {
|
|
5046
5046
|
return e.length !== t.length ? !1 : e.every((n, r) => de(n, t[r]) === 0);
|
|
5047
5047
|
}
|
|
5048
5048
|
function Kn(e) {
|
|
@@ -5062,18 +5062,18 @@ function ng(e) {
|
|
|
5062
5062
|
return Array.isArray(e) ? e.length !== 2 ? !1 : e.every((t) => ng(t)) : Bl(e);
|
|
5063
5063
|
}
|
|
5064
5064
|
const xb = vt(32), Ab = vt(20), ld = vt(32), De = Xa(Uint8Array);
|
|
5065
|
-
|
|
5066
|
-
const vb =
|
|
5065
|
+
Ds(Ji(), Jy(/^([0-9a-f]{2})+$/i));
|
|
5066
|
+
const vb = Ds(
|
|
5067
5067
|
ln(),
|
|
5068
5068
|
vl(),
|
|
5069
5069
|
Ga(0),
|
|
5070
5070
|
Ka(255)
|
|
5071
|
-
), wr =
|
|
5071
|
+
), wr = Ds(
|
|
5072
5072
|
ln(),
|
|
5073
5073
|
vl(),
|
|
5074
5074
|
Ga(0),
|
|
5075
5075
|
Ka(4294967295)
|
|
5076
|
-
), Mu =
|
|
5076
|
+
), Mu = Ds(
|
|
5077
5077
|
eg(),
|
|
5078
5078
|
Ga(0n),
|
|
5079
5079
|
Ka(0x7fffffffffffffffn)
|
|
@@ -5126,7 +5126,7 @@ function sg(e) {
|
|
|
5126
5126
|
return Wa(De, e) || Nb(e);
|
|
5127
5127
|
}
|
|
5128
5128
|
function Nl(e) {
|
|
5129
|
-
return Wa(
|
|
5129
|
+
return Wa(Ds(Qy(), Yy(sg)), e);
|
|
5130
5130
|
}
|
|
5131
5131
|
function og(e) {
|
|
5132
5132
|
return e.length - e.filter(sg).length;
|
|
@@ -5209,7 +5209,7 @@ function kl(e) {
|
|
|
5209
5209
|
function Nr(e) {
|
|
5210
5210
|
return !(e instanceof Uint8Array) || !kl(e[e.length - 1]) ? !1 : Q1(e.slice(0, -1));
|
|
5211
5211
|
}
|
|
5212
|
-
const
|
|
5212
|
+
const xo = Bb;
|
|
5213
5213
|
function Te(e, t, n) {
|
|
5214
5214
|
Object.defineProperty(e, t, {
|
|
5215
5215
|
configurable: !0,
|
|
@@ -5232,13 +5232,13 @@ function On(e) {
|
|
|
5232
5232
|
let t;
|
|
5233
5233
|
return () => (t !== void 0 || (t = e()), t);
|
|
5234
5234
|
}
|
|
5235
|
-
const
|
|
5235
|
+
const gs = Ge, vc = gs.OP_RESERVED;
|
|
5236
5236
|
function za(e, t) {
|
|
5237
5237
|
if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures)
|
|
5238
5238
|
throw new TypeError("Not enough data");
|
|
5239
5239
|
t = Object.assign({ validate: !0 }, t || {});
|
|
5240
5240
|
function n(a) {
|
|
5241
|
-
return Nr(a) || (t.allowIncomplete && a ===
|
|
5241
|
+
return Nr(a) || (t.allowIncomplete && a === gs.OP_0) !== void 0;
|
|
5242
5242
|
}
|
|
5243
5243
|
at(
|
|
5244
5244
|
li(
|
|
@@ -5260,16 +5260,16 @@ function za(e, t) {
|
|
|
5260
5260
|
const i = { network: e.network || Un };
|
|
5261
5261
|
let s = [], o = !1;
|
|
5262
5262
|
function c(a) {
|
|
5263
|
-
o || (o = !0, s = ht(a), i.m = s[0] -
|
|
5263
|
+
o || (o = !0, s = ht(a), i.m = s[0] - vc, i.n = s[s.length - 2] - vc, i.pubkeys = s.slice(1, -2));
|
|
5264
5264
|
}
|
|
5265
5265
|
if (Te(i, "output", () => {
|
|
5266
5266
|
if (e.m && i.n && e.pubkeys)
|
|
5267
5267
|
return nn(
|
|
5268
5268
|
[].concat(
|
|
5269
|
-
|
|
5269
|
+
vc + e.m,
|
|
5270
5270
|
e.pubkeys,
|
|
5271
|
-
|
|
5272
|
-
|
|
5271
|
+
vc + i.n,
|
|
5272
|
+
gs.OP_CHECKMULTISIG
|
|
5273
5273
|
)
|
|
5274
5274
|
);
|
|
5275
5275
|
}), Te(i, "m", () => {
|
|
@@ -5286,7 +5286,7 @@ function za(e, t) {
|
|
|
5286
5286
|
return ht(e.input).slice(1);
|
|
5287
5287
|
}), Te(i, "input", () => {
|
|
5288
5288
|
if (e.signatures)
|
|
5289
|
-
return nn([
|
|
5289
|
+
return nn([gs.OP_0].concat(e.signatures));
|
|
5290
5290
|
}), Te(i, "witness", () => {
|
|
5291
5291
|
if (i.input)
|
|
5292
5292
|
return [];
|
|
@@ -5297,7 +5297,7 @@ function za(e, t) {
|
|
|
5297
5297
|
if (e.output) {
|
|
5298
5298
|
if (c(e.output), at(ln(), s[0], { message: "Output is invalid" }), at(ln(), s[s.length - 2], {
|
|
5299
5299
|
message: "Output is invalid"
|
|
5300
|
-
}), s[s.length - 1] !==
|
|
5300
|
+
}), s[s.length - 1] !== gs.OP_CHECKMULTISIG)
|
|
5301
5301
|
throw new TypeError("Output is invalid");
|
|
5302
5302
|
if (i.m <= 0 || i.n > 16 || i.m > i.n || i.n !== s.length - 3)
|
|
5303
5303
|
throw new TypeError("Output is invalid");
|
|
@@ -5305,7 +5305,7 @@ function za(e, t) {
|
|
|
5305
5305
|
throw new TypeError("Output is invalid");
|
|
5306
5306
|
if (e.m !== void 0 && e.m !== i.m) throw new TypeError("m mismatch");
|
|
5307
5307
|
if (e.n !== void 0 && e.n !== i.n) throw new TypeError("n mismatch");
|
|
5308
|
-
if (e.pubkeys && !
|
|
5308
|
+
if (e.pubkeys && !Bo(e.pubkeys, i.pubkeys))
|
|
5309
5309
|
throw new TypeError("Pubkeys mismatch");
|
|
5310
5310
|
}
|
|
5311
5311
|
if (e.pubkeys) {
|
|
@@ -5320,10 +5320,10 @@ function za(e, t) {
|
|
|
5320
5320
|
throw new TypeError("Too many signatures provided");
|
|
5321
5321
|
}
|
|
5322
5322
|
if (e.input) {
|
|
5323
|
-
if (e.input[0] !==
|
|
5323
|
+
if (e.input[0] !== gs.OP_0) throw new TypeError("Input is invalid");
|
|
5324
5324
|
if (i.signatures.length === 0 || !i.signatures.every(n))
|
|
5325
5325
|
throw new TypeError("Input has invalid signature(s)");
|
|
5326
|
-
if (e.signatures && !
|
|
5326
|
+
if (e.signatures && !Bo(e.signatures, i.signatures))
|
|
5327
5327
|
throw new TypeError("Signature mismatch");
|
|
5328
5328
|
if (e.m !== void 0 && e.m !== e.signatures.length)
|
|
5329
5329
|
throw new TypeError("Signature count mismatch");
|
|
@@ -5386,7 +5386,7 @@ function ag(e, t) {
|
|
|
5386
5386
|
}
|
|
5387
5387
|
const ss = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
5388
5388
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
5389
|
-
function
|
|
5389
|
+
function cc(e) {
|
|
5390
5390
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
5391
5391
|
}
|
|
5392
5392
|
function Cb(e) {
|
|
@@ -5394,7 +5394,7 @@ function Cb(e) {
|
|
|
5394
5394
|
throw new Error("positive integer expected, got " + e);
|
|
5395
5395
|
}
|
|
5396
5396
|
function Nn(e, ...t) {
|
|
5397
|
-
if (!
|
|
5397
|
+
if (!cc(e))
|
|
5398
5398
|
throw new Error("Uint8Array expected");
|
|
5399
5399
|
if (t.length > 0 && !t.includes(e.length))
|
|
5400
5400
|
throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
|
|
@@ -5421,7 +5421,7 @@ function qu(e) {
|
|
|
5421
5421
|
function Jn(e, t) {
|
|
5422
5422
|
return e << 32 - t | e >>> t;
|
|
5423
5423
|
}
|
|
5424
|
-
function
|
|
5424
|
+
function Ic(e, t) {
|
|
5425
5425
|
return e << t | e >>> 32 - t >>> 0;
|
|
5426
5426
|
}
|
|
5427
5427
|
const ug = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", Fb = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -5442,7 +5442,7 @@ function wd(e) {
|
|
|
5442
5442
|
if (e >= ar.a && e <= ar.f)
|
|
5443
5443
|
return e - (ar.a - 10);
|
|
5444
5444
|
}
|
|
5445
|
-
function
|
|
5445
|
+
function ac(e) {
|
|
5446
5446
|
if (typeof e != "string")
|
|
5447
5447
|
throw new Error("hex string expected, got " + typeof e);
|
|
5448
5448
|
if (ug)
|
|
@@ -5638,7 +5638,7 @@ const Fr = /* @__PURE__ */ Uint32Array.from([
|
|
|
5638
5638
|
function bd(e, t, n, r) {
|
|
5639
5639
|
return e === 0 ? t ^ n ^ r : e === 1 ? t & n | ~t & r : e === 2 ? (t | ~n) ^ r : e === 3 ? t & r | n & ~r : t ^ (n | ~r);
|
|
5640
5640
|
}
|
|
5641
|
-
const
|
|
5641
|
+
const Oc = /* @__PURE__ */ new Uint32Array(16);
|
|
5642
5642
|
class Xb extends Pl {
|
|
5643
5643
|
constructor() {
|
|
5644
5644
|
super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
|
|
@@ -5652,31 +5652,31 @@ class Xb extends Pl {
|
|
|
5652
5652
|
}
|
|
5653
5653
|
process(t, n) {
|
|
5654
5654
|
for (let y = 0; y < 16; y++, n += 4)
|
|
5655
|
-
|
|
5655
|
+
Oc[y] = t.getUint32(n, !0);
|
|
5656
5656
|
let r = this.h0 | 0, i = r, s = this.h1 | 0, o = s, c = this.h2 | 0, a = c, u = this.h3 | 0, f = u, l = this.h4 | 0, d = l;
|
|
5657
5657
|
for (let y = 0; y < 5; y++) {
|
|
5658
5658
|
const g = 4 - y, m = Gb[y], E = Wb[y], _ = pg[y], S = yg[y], w = jb[y], T = Kb[y];
|
|
5659
5659
|
for (let O = 0; O < 16; O++) {
|
|
5660
|
-
const A =
|
|
5661
|
-
r = l, l = u, u =
|
|
5660
|
+
const A = Ic(r + bd(y, s, c, u) + Oc[_[O]] + m, w[O]) + l | 0;
|
|
5661
|
+
r = l, l = u, u = Ic(c, 10) | 0, c = s, s = A;
|
|
5662
5662
|
}
|
|
5663
5663
|
for (let O = 0; O < 16; O++) {
|
|
5664
|
-
const A =
|
|
5665
|
-
i = d, d = f, f =
|
|
5664
|
+
const A = Ic(i + bd(g, o, a, f) + Oc[S[O]] + E, T[O]) + d | 0;
|
|
5665
|
+
i = d, d = f, f = Ic(a, 10) | 0, a = o, o = A;
|
|
5666
5666
|
}
|
|
5667
5667
|
}
|
|
5668
5668
|
this.set(this.h1 + c + f | 0, this.h2 + u + d | 0, this.h3 + l + i | 0, this.h4 + r + o | 0, this.h0 + s + a | 0);
|
|
5669
5669
|
}
|
|
5670
5670
|
roundClean() {
|
|
5671
|
-
ji(
|
|
5671
|
+
ji(Oc);
|
|
5672
5672
|
}
|
|
5673
5673
|
destroy() {
|
|
5674
5674
|
this.destroyed = !0, ji(this.buffer), this.set(0, 0, 0, 0, 0);
|
|
5675
5675
|
}
|
|
5676
5676
|
}
|
|
5677
|
-
const zb = /* @__PURE__ */ Ya(() => new Xb()), Yb = zb,
|
|
5677
|
+
const zb = /* @__PURE__ */ Ya(() => new Xb()), Yb = zb, Bc = /* @__PURE__ */ BigInt(2 ** 32 - 1), Ed = /* @__PURE__ */ BigInt(32);
|
|
5678
5678
|
function Zb(e, t = !1) {
|
|
5679
|
-
return t ? { h: Number(e &
|
|
5679
|
+
return t ? { h: Number(e & Bc), l: Number(e >> Ed & Bc) } : { h: Number(e >> Ed & Bc) | 0, l: Number(e & Bc) | 0 };
|
|
5680
5680
|
}
|
|
5681
5681
|
function Jb(e, t = !1) {
|
|
5682
5682
|
const n = e.length;
|
|
@@ -5687,7 +5687,7 @@ function Jb(e, t = !1) {
|
|
|
5687
5687
|
}
|
|
5688
5688
|
return [r, i];
|
|
5689
5689
|
}
|
|
5690
|
-
const _d = (e, t, n) => e >>> n, Sd = (e, t, n) => e << 32 - n | t >>> n, os = (e, t, n) => e >>> n | t << 32 - n, cs = (e, t, n) => e << 32 - n | t >>> n,
|
|
5690
|
+
const _d = (e, t, n) => e >>> n, Sd = (e, t, n) => e << 32 - n | t >>> n, os = (e, t, n) => e >>> n | t << 32 - n, cs = (e, t, n) => e << 32 - n | t >>> n, Nc = (e, t, n) => e << 64 - n | t >>> n - 32, kc = (e, t, n) => e >>> n - 32 | t << 64 - n;
|
|
5691
5691
|
function ur(e, t, n, r) {
|
|
5692
5692
|
const i = (t >>> 0) + (r >>> 0);
|
|
5693
5693
|
return { h: e + n + (i / 2 ** 32 | 0) | 0, l: i | 0 };
|
|
@@ -5895,12 +5895,12 @@ class uE extends Pl {
|
|
|
5895
5895
|
for (let w = 0; w < 16; w++, n += 4)
|
|
5896
5896
|
Lr[w] = t.getUint32(n), Vr[w] = t.getUint32(n += 4);
|
|
5897
5897
|
for (let w = 16; w < 80; w++) {
|
|
5898
|
-
const T = Lr[w - 15] | 0, O = Vr[w - 15] | 0, A = os(T, O, 1) ^ os(T, O, 8) ^ _d(T, O, 7), R = cs(T, O, 1) ^ cs(T, O, 8) ^ Sd(T, O, 7), M = Lr[w - 2] | 0, v = Vr[w - 2] | 0, U = os(M, v, 19) ^
|
|
5898
|
+
const T = Lr[w - 15] | 0, O = Vr[w - 15] | 0, A = os(T, O, 1) ^ os(T, O, 8) ^ _d(T, O, 7), R = cs(T, O, 1) ^ cs(T, O, 8) ^ Sd(T, O, 7), M = Lr[w - 2] | 0, v = Vr[w - 2] | 0, U = os(M, v, 19) ^ Nc(M, v, 61) ^ _d(M, v, 6), L = cs(M, v, 19) ^ kc(M, v, 61) ^ Sd(M, v, 6), K = tE(R, L, Vr[w - 7], Vr[w - 16]), H = nE(K, A, U, Lr[w - 7], Lr[w - 16]);
|
|
5899
5899
|
Lr[w] = H | 0, Vr[w] = K | 0;
|
|
5900
5900
|
}
|
|
5901
5901
|
let { Ah: r, Al: i, Bh: s, Bl: o, Ch: c, Cl: a, Dh: u, Dl: f, Eh: l, El: d, Fh: y, Fl: g, Gh: m, Gl: E, Hh: _, Hl: S } = this;
|
|
5902
5902
|
for (let w = 0; w < 80; w++) {
|
|
5903
|
-
const T = os(l, d, 14) ^ os(l, d, 18) ^
|
|
5903
|
+
const T = os(l, d, 14) ^ os(l, d, 18) ^ Nc(l, d, 41), O = cs(l, d, 14) ^ cs(l, d, 18) ^ kc(l, d, 41), A = l & y ^ ~l & m, R = d & g ^ ~d & E, M = rE(S, O, R, aE[w], Vr[w]), v = iE(M, _, T, A, cE[w], Lr[w]), U = M | 0, L = os(r, i, 28) ^ Nc(r, i, 34) ^ Nc(r, i, 39), K = cs(r, i, 28) ^ kc(r, i, 34) ^ kc(r, i, 39), H = r & s ^ r & c ^ s & c, $ = i & o ^ i & a ^ o & a;
|
|
5904
5904
|
_ = m | 0, S = E | 0, m = y | 0, E = g | 0, y = l | 0, g = d | 0, { h: l, l: d } = ur(u | 0, f | 0, v | 0, U | 0), u = c | 0, f = a | 0, c = s | 0, a = o | 0, s = r | 0, o = i | 0;
|
|
5905
5905
|
const P = Qb(U, K, $);
|
|
5906
5906
|
r = eE(P, v, L, H), i = P | 0;
|
|
@@ -6635,8 +6635,8 @@ function yE(e) {
|
|
|
6635
6635
|
function gE(e) {
|
|
6636
6636
|
return en(en(e));
|
|
6637
6637
|
}
|
|
6638
|
-
const
|
|
6639
|
-
function
|
|
6638
|
+
const No = yE(gE), $r = Ge;
|
|
6639
|
+
function uc(e, t) {
|
|
6640
6640
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.input)
|
|
6641
6641
|
throw new TypeError("Not enough data");
|
|
6642
6642
|
t = Object.assign({ validate: !0 }, t || {}), at(
|
|
@@ -6654,13 +6654,13 @@ function ac(e, t) {
|
|
|
6654
6654
|
e
|
|
6655
6655
|
);
|
|
6656
6656
|
const n = On(() => {
|
|
6657
|
-
const o =
|
|
6657
|
+
const o = No.decode(e.address), c = Br(o, 0), a = o.slice(1);
|
|
6658
6658
|
return { version: c, hash: a };
|
|
6659
6659
|
}), r = On(() => ht(e.input)), i = e.network || Un, s = { name: "p2pkh", network: i };
|
|
6660
6660
|
if (Te(s, "address", () => {
|
|
6661
6661
|
if (!s.hash) return;
|
|
6662
6662
|
const o = new Uint8Array(21);
|
|
6663
|
-
return En(o, 0, i.pubKeyHash), o.set(s.hash, 1),
|
|
6663
|
+
return En(o, 0, i.pubKeyHash), o.set(s.hash, 1), No.encode(o);
|
|
6664
6664
|
}), Te(s, "hash", () => {
|
|
6665
6665
|
if (e.output) return e.output.slice(3, 23);
|
|
6666
6666
|
if (e.address) return n().hash;
|
|
@@ -6730,8 +6730,8 @@ function ac(e, t) {
|
|
|
6730
6730
|
}
|
|
6731
6731
|
return Object.assign(s, e);
|
|
6732
6732
|
}
|
|
6733
|
-
const
|
|
6734
|
-
function
|
|
6733
|
+
const to = Ge;
|
|
6734
|
+
function fc(e, t) {
|
|
6735
6735
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.input)
|
|
6736
6736
|
throw new TypeError("Not enough data");
|
|
6737
6737
|
t = Object.assign({ validate: !0 }, t || {}), at(
|
|
@@ -6758,13 +6758,13 @@ function uc(e, t) {
|
|
|
6758
6758
|
let n = e.network;
|
|
6759
6759
|
n || (n = e.redeem && e.redeem.network || Un);
|
|
6760
6760
|
const r = { network: n }, i = On(() => {
|
|
6761
|
-
const c =
|
|
6761
|
+
const c = No.decode(e.address), a = Br(c, 0), u = c.slice(1);
|
|
6762
6762
|
return { version: a, hash: u };
|
|
6763
6763
|
}), s = On(() => ht(e.input)), o = On(() => {
|
|
6764
6764
|
const c = s(), a = c[c.length - 1];
|
|
6765
6765
|
return {
|
|
6766
6766
|
network: n,
|
|
6767
|
-
output: a ===
|
|
6767
|
+
output: a === to.OP_FALSE ? Uint8Array.from([]) : a,
|
|
6768
6768
|
input: nn(c.slice(0, -1)),
|
|
6769
6769
|
witness: e.witness || []
|
|
6770
6770
|
};
|
|
@@ -6772,14 +6772,14 @@ function uc(e, t) {
|
|
|
6772
6772
|
if (Te(r, "address", () => {
|
|
6773
6773
|
if (!r.hash) return;
|
|
6774
6774
|
const c = new Uint8Array(21);
|
|
6775
|
-
return En(c, 0, r.network.scriptHash), c.set(r.hash, 1),
|
|
6775
|
+
return En(c, 0, r.network.scriptHash), c.set(r.hash, 1), No.encode(c);
|
|
6776
6776
|
}), Te(r, "hash", () => {
|
|
6777
6777
|
if (e.output) return e.output.slice(2, 22);
|
|
6778
6778
|
if (e.address) return i().hash;
|
|
6779
6779
|
if (r.redeem && r.redeem.output) return Or(r.redeem.output);
|
|
6780
6780
|
}), Te(r, "output", () => {
|
|
6781
6781
|
if (r.hash)
|
|
6782
|
-
return nn([
|
|
6782
|
+
return nn([to.OP_HASH160, r.hash, to.OP_EQUAL]);
|
|
6783
6783
|
}), Te(r, "redeem", () => {
|
|
6784
6784
|
if (e.input)
|
|
6785
6785
|
return o();
|
|
@@ -6808,7 +6808,7 @@ function uc(e, t) {
|
|
|
6808
6808
|
c = e.hash;
|
|
6809
6809
|
}
|
|
6810
6810
|
if (e.output) {
|
|
6811
|
-
if (e.output.length !== 23 || e.output[0] !==
|
|
6811
|
+
if (e.output.length !== 23 || e.output[0] !== to.OP_HASH160 || e.output[1] !== 20 || e.output[22] !== to.OP_EQUAL)
|
|
6812
6812
|
throw new TypeError("Output is invalid");
|
|
6813
6813
|
const u = e.output.slice(2, 22);
|
|
6814
6814
|
if (c.length > 0 && de(c, u) !== 0)
|
|
@@ -6864,13 +6864,13 @@ function uc(e, t) {
|
|
|
6864
6864
|
}
|
|
6865
6865
|
a(e.redeem);
|
|
6866
6866
|
}
|
|
6867
|
-
if (e.witness && e.redeem && e.redeem.witness && !
|
|
6867
|
+
if (e.witness && e.redeem && e.redeem.witness && !Bo(e.redeem.witness, e.witness))
|
|
6868
6868
|
throw new TypeError("Witness and redeem.witness mismatch");
|
|
6869
6869
|
}
|
|
6870
6870
|
return Object.assign(r, e);
|
|
6871
6871
|
}
|
|
6872
6872
|
var Ei = {}, Td;
|
|
6873
|
-
function
|
|
6873
|
+
function lc() {
|
|
6874
6874
|
if (Td) return Ei;
|
|
6875
6875
|
Td = 1, Object.defineProperty(Ei, "__esModule", { value: !0 }), Ei.bech32m = Ei.bech32 = void 0;
|
|
6876
6876
|
const e = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", t = {};
|
|
@@ -7004,7 +7004,7 @@ function fc() {
|
|
|
7004
7004
|
}
|
|
7005
7005
|
return Ei.bech32 = a("bech32"), Ei.bech32m = a("bech32m"), Ei;
|
|
7006
7006
|
}
|
|
7007
|
-
var Gt =
|
|
7007
|
+
var Gt = lc();
|
|
7008
7008
|
const xd = Ge, mE = new Uint8Array(0);
|
|
7009
7009
|
function Ja(e, t) {
|
|
7010
7010
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.witness)
|
|
@@ -7104,10 +7104,10 @@ function Ja(e, t) {
|
|
|
7104
7104
|
return Object.assign(i, e);
|
|
7105
7105
|
}
|
|
7106
7106
|
const Ad = Ge, Vu = new Uint8Array(0);
|
|
7107
|
-
function
|
|
7107
|
+
function Pc(e) {
|
|
7108
7108
|
return !!(e instanceof Uint8Array && e.length === 65 && e[0] === 4 && Kn(e));
|
|
7109
7109
|
}
|
|
7110
|
-
function
|
|
7110
|
+
function hc(e, t) {
|
|
7111
7111
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.witness)
|
|
7112
7112
|
throw new TypeError("Not enough data");
|
|
7113
7113
|
t = Object.assign({ validate: !0 }, t || {}), at(
|
|
@@ -7217,10 +7217,10 @@ function lc(e, t) {
|
|
|
7217
7217
|
}
|
|
7218
7218
|
if (e.redeem.input && !Nl(r()))
|
|
7219
7219
|
throw new TypeError("Non push-only scriptSig");
|
|
7220
|
-
if (e.witness && e.redeem.witness && !
|
|
7220
|
+
if (e.witness && e.redeem.witness && !Bo(e.witness, e.redeem.witness))
|
|
7221
7221
|
throw new TypeError("Witness and redeem.witness mismatch");
|
|
7222
|
-
if (e.redeem.input && r().some(
|
|
7223
|
-
|
|
7222
|
+
if (e.redeem.input && r().some(Pc) || e.redeem.output && (ht(e.redeem.output) || []).some(
|
|
7223
|
+
Pc
|
|
7224
7224
|
))
|
|
7225
7225
|
throw new TypeError(
|
|
7226
7226
|
"redeem.input or redeem.output contains uncompressed pubkey"
|
|
@@ -7230,22 +7230,22 @@ function lc(e, t) {
|
|
|
7230
7230
|
const c = e.witness[e.witness.length - 1];
|
|
7231
7231
|
if (e.redeem && e.redeem.output && de(e.redeem.output, c) !== 0)
|
|
7232
7232
|
throw new TypeError("Witness and redeem.output mismatch");
|
|
7233
|
-
if (e.witness.some(
|
|
7233
|
+
if (e.witness.some(Pc) || (ht(c) || []).some(Pc))
|
|
7234
7234
|
throw new TypeError("Witness contains uncompressed pubkey");
|
|
7235
7235
|
}
|
|
7236
7236
|
}
|
|
7237
7237
|
return Object.assign(s, e);
|
|
7238
7238
|
}
|
|
7239
|
-
const
|
|
7239
|
+
const Ao = {};
|
|
7240
7240
|
function wE(e) {
|
|
7241
|
-
e ? e !==
|
|
7241
|
+
e ? e !== Ao.eccLib && (bE(e), Ao.eccLib = e) : Ao.eccLib = e;
|
|
7242
7242
|
}
|
|
7243
7243
|
function $f() {
|
|
7244
|
-
if (!
|
|
7244
|
+
if (!Ao.eccLib)
|
|
7245
7245
|
throw new Error(
|
|
7246
7246
|
"No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance"
|
|
7247
7247
|
);
|
|
7248
|
-
return
|
|
7248
|
+
return Ao.eccLib;
|
|
7249
7249
|
}
|
|
7250
7250
|
const fr = (e) => Ur(e);
|
|
7251
7251
|
function bE(e) {
|
|
@@ -7378,7 +7378,7 @@ function hi(e, t, n) {
|
|
|
7378
7378
|
let r = 0;
|
|
7379
7379
|
return e < 253 ? (t.set([Number(e)], n), r = 1) : e <= 65535 ? (t.set([253], n), _E(t, n + 1, Number(e), "LE"), r = 3) : e <= 4294967295 ? (t.set([254], n), SE(t, n + 1, Number(e), "LE"), r = 5) : (t.set([255], n), TE(t, n + 1, BigInt(e), "LE"), r = 9), { buffer: t, bytes: r };
|
|
7380
7380
|
}
|
|
7381
|
-
function
|
|
7381
|
+
function js(e, t) {
|
|
7382
7382
|
t === void 0 && (t = 0);
|
|
7383
7383
|
const n = e.at(t);
|
|
7384
7384
|
if (n === void 0)
|
|
@@ -7451,7 +7451,7 @@ class Dt {
|
|
|
7451
7451
|
this.offset = Wy(this.buffer, this.offset, BigInt(t), "LE");
|
|
7452
7452
|
}
|
|
7453
7453
|
writeUInt32(t) {
|
|
7454
|
-
this.offset =
|
|
7454
|
+
this.offset = oc(this.buffer, this.offset, t, "LE");
|
|
7455
7455
|
}
|
|
7456
7456
|
writeUInt64(t) {
|
|
7457
7457
|
this.offset = ab(this.buffer, this.offset, BigInt(t), "LE");
|
|
@@ -7495,7 +7495,7 @@ class kE {
|
|
|
7495
7495
|
return this.offset += 4, t;
|
|
7496
7496
|
}
|
|
7497
7497
|
readUInt32() {
|
|
7498
|
-
const t =
|
|
7498
|
+
const t = $s(this.buffer, this.offset, "LE");
|
|
7499
7499
|
return this.offset += 4, t;
|
|
7500
7500
|
}
|
|
7501
7501
|
readInt64() {
|
|
@@ -7503,7 +7503,7 @@ class kE {
|
|
|
7503
7503
|
return this.offset += 8, t;
|
|
7504
7504
|
}
|
|
7505
7505
|
readVarInt() {
|
|
7506
|
-
const { bigintValue: t, bytes: n } =
|
|
7506
|
+
const { bigintValue: t, bytes: n } = js(this.buffer, this.offset);
|
|
7507
7507
|
return this.offset += n, t;
|
|
7508
7508
|
}
|
|
7509
7509
|
readSlice(t) {
|
|
@@ -7570,7 +7570,7 @@ function UE(e, t) {
|
|
|
7570
7570
|
ut(t ? [e, t] : [e])
|
|
7571
7571
|
);
|
|
7572
7572
|
}
|
|
7573
|
-
function
|
|
7573
|
+
function Rc(e, t) {
|
|
7574
7574
|
if (!(e instanceof Uint8Array) || e.length !== 32 || t && t.length !== 32) return null;
|
|
7575
7575
|
const n = UE(e, t), r = $f().xOnlyPointAddTweak(e, n);
|
|
7576
7576
|
return !r || r.xOnlyPubkey === null ? null : {
|
|
@@ -7586,7 +7586,7 @@ function CE(e) {
|
|
|
7586
7586
|
return hi(e.length, n), ut([n, e]);
|
|
7587
7587
|
}
|
|
7588
7588
|
const Id = Ge, Od = 1, HE = 80;
|
|
7589
|
-
function
|
|
7589
|
+
function dc(e, t) {
|
|
7590
7590
|
if (!e.address && !e.output && !e.pubkey && !e.internalPubkey && !(e.witness && e.witness.length > 1))
|
|
7591
7591
|
throw new TypeError("Not enough data");
|
|
7592
7592
|
t = Object.assign({ validate: !0 }, t || {}), at(
|
|
@@ -7657,7 +7657,7 @@ function hc(e, t) {
|
|
|
7657
7657
|
if (e.output) return e.output.slice(2);
|
|
7658
7658
|
if (e.address) return n().data;
|
|
7659
7659
|
if (o.internalPubkey) {
|
|
7660
|
-
const c =
|
|
7660
|
+
const c = Rc(o.internalPubkey, o.hash);
|
|
7661
7661
|
if (c) return c.x;
|
|
7662
7662
|
}
|
|
7663
7663
|
}), Te(o, "internalPubkey", () => {
|
|
@@ -7679,7 +7679,7 @@ function hc(e, t) {
|
|
|
7679
7679
|
version: o.redeemVersion
|
|
7680
7680
|
}), u = ma(c, a);
|
|
7681
7681
|
if (!u) return;
|
|
7682
|
-
const f =
|
|
7682
|
+
const f = Rc(e.internalPubkey, c.hash);
|
|
7683
7683
|
if (!f) return;
|
|
7684
7684
|
const l = ut(
|
|
7685
7685
|
[
|
|
@@ -7714,7 +7714,7 @@ function hc(e, t) {
|
|
|
7714
7714
|
c = e.output.slice(2);
|
|
7715
7715
|
}
|
|
7716
7716
|
if (e.internalPubkey) {
|
|
7717
|
-
const f =
|
|
7717
|
+
const f = Rc(e.internalPubkey, o.hash);
|
|
7718
7718
|
if (c.length > 0 && de(c, f.x) !== 0)
|
|
7719
7719
|
throw new TypeError("Pubkey mismatch");
|
|
7720
7720
|
c = f.x;
|
|
@@ -7742,7 +7742,7 @@ function hc(e, t) {
|
|
|
7742
7742
|
if (o.redeem.output && de(e.redeem.output, o.redeem.output) !== 0)
|
|
7743
7743
|
throw new TypeError("Redeem.output and witness mismatch");
|
|
7744
7744
|
}
|
|
7745
|
-
if (e.redeem.witness && o.redeem.witness && !
|
|
7745
|
+
if (e.redeem.witness && o.redeem.witness && !Bo(e.redeem.witness, o.redeem.witness))
|
|
7746
7746
|
throw new TypeError("Redeem.witness and witness mismatch");
|
|
7747
7747
|
}
|
|
7748
7748
|
if (u && u.length)
|
|
@@ -7769,7 +7769,7 @@ function hc(e, t) {
|
|
|
7769
7769
|
throw new TypeError("Internal pubkey mismatch");
|
|
7770
7770
|
if (!$f().isXOnlyPoint(d))
|
|
7771
7771
|
throw new TypeError("Invalid internalPubkey for p2tr witness");
|
|
7772
|
-
const y = f[0] & Zc, g = u[u.length - 2], m = Tr({ output: g, version: y }), E = Df(f, m), _ =
|
|
7772
|
+
const y = f[0] & Zc, g = u[u.length - 2], m = Tr({ output: g, version: y }), E = Df(f, m), _ = Rc(d, E);
|
|
7773
7773
|
if (!_)
|
|
7774
7774
|
throw new TypeError("Invalid outputKey for p2tr witness");
|
|
7775
7775
|
if (c.length && de(c, _.x) !== 0)
|
|
@@ -7793,7 +7793,7 @@ function FE(e, t) {
|
|
|
7793
7793
|
return console.warn(Ig), ME(n, r, t.bech32);
|
|
7794
7794
|
}
|
|
7795
7795
|
function Og(e) {
|
|
7796
|
-
const t =
|
|
7796
|
+
const t = No.decode(e);
|
|
7797
7797
|
if (t.length < 21) throw new TypeError(e + " is too short");
|
|
7798
7798
|
if (t.length > 21) throw new TypeError(e + " is too long");
|
|
7799
7799
|
const n = Br(t, 0), r = t.slice(1);
|
|
@@ -7822,11 +7822,11 @@ function ME(e, t, n) {
|
|
|
7822
7822
|
function qE(e, t) {
|
|
7823
7823
|
t = t || Un;
|
|
7824
7824
|
try {
|
|
7825
|
-
return
|
|
7825
|
+
return uc({ output: e, network: t }).address;
|
|
7826
7826
|
} catch {
|
|
7827
7827
|
}
|
|
7828
7828
|
try {
|
|
7829
|
-
return
|
|
7829
|
+
return fc({ output: e, network: t }).address;
|
|
7830
7830
|
} catch {
|
|
7831
7831
|
}
|
|
7832
7832
|
try {
|
|
@@ -7834,11 +7834,11 @@ function qE(e, t) {
|
|
|
7834
7834
|
} catch {
|
|
7835
7835
|
}
|
|
7836
7836
|
try {
|
|
7837
|
-
return
|
|
7837
|
+
return hc({ output: e, network: t }).address;
|
|
7838
7838
|
} catch {
|
|
7839
7839
|
}
|
|
7840
7840
|
try {
|
|
7841
|
-
return
|
|
7841
|
+
return dc({ output: e, network: t }).address;
|
|
7842
7842
|
} catch {
|
|
7843
7843
|
}
|
|
7844
7844
|
try {
|
|
@@ -7856,9 +7856,9 @@ function Bg(e, t) {
|
|
|
7856
7856
|
}
|
|
7857
7857
|
if (n) {
|
|
7858
7858
|
if (n.version === t.pubKeyHash)
|
|
7859
|
-
return ac({ hash: n.hash }).output;
|
|
7860
|
-
if (n.version === t.scriptHash)
|
|
7861
7859
|
return uc({ hash: n.hash }).output;
|
|
7860
|
+
if (n.version === t.scriptHash)
|
|
7861
|
+
return fc({ hash: n.hash }).output;
|
|
7862
7862
|
} else {
|
|
7863
7863
|
try {
|
|
7864
7864
|
r = Ul(e);
|
|
@@ -7871,10 +7871,10 @@ function Bg(e, t) {
|
|
|
7871
7871
|
if (r.data.length === 20)
|
|
7872
7872
|
return Ja({ hash: r.data }).output;
|
|
7873
7873
|
if (r.data.length === 32)
|
|
7874
|
-
return
|
|
7874
|
+
return hc({ hash: r.data }).output;
|
|
7875
7875
|
} else if (r.version === 1) {
|
|
7876
7876
|
if (r.data.length === 32)
|
|
7877
|
-
return
|
|
7877
|
+
return dc({ pubkey: r.data }).output;
|
|
7878
7878
|
} else if (r.version >= Ag && r.version <= xg && r.data.length >= Tg && r.data.length <= Sg)
|
|
7879
7879
|
return console.warn(Ig), nn([
|
|
7880
7880
|
r.version + vg,
|
|
@@ -8199,7 +8199,7 @@ function KE(e) {
|
|
|
8199
8199
|
path: "m"
|
|
8200
8200
|
};
|
|
8201
8201
|
for (const r of jE(e.value.length / 4 - 1)) {
|
|
8202
|
-
const i =
|
|
8202
|
+
const i = $s(e.value, r * 4 + 4, "LE"), s = !!(i & 2147483648), o = i & 2147483647;
|
|
8203
8203
|
n.path += "/" + o.toString(10) + (s ? "'" : "");
|
|
8204
8204
|
}
|
|
8205
8205
|
return n;
|
|
@@ -8211,7 +8211,7 @@ function GE(e) {
|
|
|
8211
8211
|
return r.slice(1).forEach((o) => {
|
|
8212
8212
|
const c = o.slice(-1) === "'";
|
|
8213
8213
|
let a = 2147483647 & parseInt(c ? o.slice(0, -1) : o, 10);
|
|
8214
|
-
c && (a += 2147483648),
|
|
8214
|
+
c && (a += 2147483648), oc(i, s, a, "LE"), s += 4;
|
|
8215
8215
|
}), {
|
|
8216
8216
|
key: n,
|
|
8217
8217
|
value: i
|
|
@@ -8405,11 +8405,11 @@ function N2(e) {
|
|
|
8405
8405
|
throw new Error(
|
|
8406
8406
|
"Decode Error: could not decode sighashType with key 0x" + xe(e.key)
|
|
8407
8407
|
);
|
|
8408
|
-
return Number(
|
|
8408
|
+
return Number($s(e.value, 0, "LE"));
|
|
8409
8409
|
}
|
|
8410
8410
|
function k2(e) {
|
|
8411
8411
|
const t = Uint8Array.from([me.SIGHASH_TYPE]), n = new Uint8Array(4);
|
|
8412
|
-
return
|
|
8412
|
+
return oc(n, 0, e, "LE"), {
|
|
8413
8413
|
key: t,
|
|
8414
8414
|
value: n
|
|
8415
8415
|
};
|
|
@@ -8577,7 +8577,7 @@ function i_(e) {
|
|
|
8577
8577
|
);
|
|
8578
8578
|
const t = Xy(e.value, 0, "LE");
|
|
8579
8579
|
let n = 8;
|
|
8580
|
-
const { numberValue: r, bytes: i } =
|
|
8580
|
+
const { numberValue: r, bytes: i } = js(
|
|
8581
8581
|
e.value,
|
|
8582
8582
|
n
|
|
8583
8583
|
);
|
|
@@ -8620,7 +8620,7 @@ function f_(e) {
|
|
|
8620
8620
|
let t = 0;
|
|
8621
8621
|
const n = [];
|
|
8622
8622
|
for (; t < e.value.length; ) {
|
|
8623
|
-
const r = e.value[t++], i = e.value[t++], { numberValue: s, bytes: o } =
|
|
8623
|
+
const r = e.value[t++], i = e.value[t++], { numberValue: s, bytes: o } = js(
|
|
8624
8624
|
e.value,
|
|
8625
8625
|
t
|
|
8626
8626
|
);
|
|
@@ -8683,7 +8683,7 @@ function Cl(e, t = m_) {
|
|
|
8683
8683
|
path: "m"
|
|
8684
8684
|
};
|
|
8685
8685
|
for (const f of g_(c.value.length / 4 - 1)) {
|
|
8686
|
-
const l =
|
|
8686
|
+
const l = $s(c.value, f * 4 + 4, "LE"), d = !!(l & 2147483648), y = l & 2147483647;
|
|
8687
8687
|
u.path += "/" + y.toString(10) + (d ? "'" : "");
|
|
8688
8688
|
}
|
|
8689
8689
|
return u;
|
|
@@ -8695,7 +8695,7 @@ function Cl(e, t = m_) {
|
|
|
8695
8695
|
return f.slice(1).forEach((y) => {
|
|
8696
8696
|
const g = y.slice(-1) === "'";
|
|
8697
8697
|
let m = 2147483647 & parseInt(g ? y.slice(0, -1) : y, 10);
|
|
8698
|
-
g && (m += 2147483648),
|
|
8698
|
+
g && (m += 2147483648), oc(l, d, m, "LE"), d += 4;
|
|
8699
8699
|
}), {
|
|
8700
8700
|
key: u,
|
|
8701
8701
|
value: l
|
|
@@ -8761,7 +8761,7 @@ const w_ = (e) => e.length === 32;
|
|
|
8761
8761
|
function Rg(e) {
|
|
8762
8762
|
const t = Cl(e, w_);
|
|
8763
8763
|
function n(o) {
|
|
8764
|
-
const { numberValue: c, bytes: a } =
|
|
8764
|
+
const { numberValue: c, bytes: a } = js(
|
|
8765
8765
|
o.value
|
|
8766
8766
|
), u = t.decode({
|
|
8767
8767
|
key: o.key,
|
|
@@ -8905,13 +8905,13 @@ function E_(e) {
|
|
|
8905
8905
|
function __(e, t) {
|
|
8906
8906
|
let n = 0;
|
|
8907
8907
|
function r() {
|
|
8908
|
-
const { numberValue: E, bytes: _ } =
|
|
8908
|
+
const { numberValue: E, bytes: _ } = js(e, n);
|
|
8909
8909
|
n += _;
|
|
8910
8910
|
const S = e.slice(n, n + Number(E));
|
|
8911
8911
|
return n += Number(E), S;
|
|
8912
8912
|
}
|
|
8913
8913
|
function i() {
|
|
8914
|
-
const E =
|
|
8914
|
+
const E = $s(e, n, "BE");
|
|
8915
8915
|
return n += 4, E;
|
|
8916
8916
|
}
|
|
8917
8917
|
function s() {
|
|
@@ -9222,7 +9222,7 @@ function Ut(e, t) {
|
|
|
9222
9222
|
if (n === void 0) throw new Error(`No input #${t}`);
|
|
9223
9223
|
return n;
|
|
9224
9224
|
}
|
|
9225
|
-
function
|
|
9225
|
+
function ko(e, t) {
|
|
9226
9226
|
const n = e[t];
|
|
9227
9227
|
if (n === void 0) throw new Error(`No output #${t}`);
|
|
9228
9228
|
return n;
|
|
@@ -9288,7 +9288,7 @@ function I_(e, t) {
|
|
|
9288
9288
|
Fg(t, r);
|
|
9289
9289
|
}
|
|
9290
9290
|
function O_(e, t) {
|
|
9291
|
-
const n = e.length - 1, r =
|
|
9291
|
+
const n = e.length - 1, r = ko(e, n);
|
|
9292
9292
|
Mg(t, r);
|
|
9293
9293
|
}
|
|
9294
9294
|
let Ud = class {
|
|
@@ -9328,7 +9328,7 @@ let Ud = class {
|
|
|
9328
9328
|
return Fg(n, r), this;
|
|
9329
9329
|
}
|
|
9330
9330
|
updateOutput(t, n) {
|
|
9331
|
-
const r =
|
|
9331
|
+
const r = ko(this.outputs, t);
|
|
9332
9332
|
return Mg(n, r), this;
|
|
9333
9333
|
}
|
|
9334
9334
|
addUnknownKeyValToGlobal(t) {
|
|
@@ -9343,7 +9343,7 @@ let Ud = class {
|
|
|
9343
9343
|
return Ku(n, r.unknownKeyVals, Gu(me)), r.unknownKeyVals || (r.unknownKeyVals = []), r.unknownKeyVals.push(n), this;
|
|
9344
9344
|
}
|
|
9345
9345
|
addUnknownKeyValToOutput(t, n) {
|
|
9346
|
-
const r =
|
|
9346
|
+
const r = ko(this.outputs, t);
|
|
9347
9347
|
return Ku(n, r.unknownKeyVals, Gu(yt)), r.unknownKeyVals || (r.unknownKeyVals = []), r.unknownKeyVals.push(n), this;
|
|
9348
9348
|
}
|
|
9349
9349
|
addInput(t) {
|
|
@@ -9398,7 +9398,7 @@ function Qi(e) {
|
|
|
9398
9398
|
}
|
|
9399
9399
|
};
|
|
9400
9400
|
}
|
|
9401
|
-
const B_ = Qi(za), N_ = Qi(ag), k_ = Qi(
|
|
9401
|
+
const B_ = Qi(za), N_ = Qi(ag), k_ = Qi(uc), Qa = Qi(Ja), Cd = Qi(hc), qg = Qi(fc), Lg = Qi(dc);
|
|
9402
9402
|
function ba(e) {
|
|
9403
9403
|
let t = new Uint8Array(0);
|
|
9404
9404
|
function n(o) {
|
|
@@ -9426,7 +9426,7 @@ function eu(e, t) {
|
|
|
9426
9426
|
}
|
|
9427
9427
|
function P_(e, t) {
|
|
9428
9428
|
return R_(e).some(
|
|
9429
|
-
(r) => $g(r,
|
|
9429
|
+
(r) => $g(r, xo.decode, t)
|
|
9430
9430
|
);
|
|
9431
9431
|
}
|
|
9432
9432
|
function $g(e, t, n) {
|
|
@@ -9468,7 +9468,7 @@ function Hd(e, t, n) {
|
|
|
9468
9468
|
throw new Error(`Can not finalize taproot input #${e}: ${i}`);
|
|
9469
9469
|
}
|
|
9470
9470
|
}
|
|
9471
|
-
function
|
|
9471
|
+
function Uc(e, t) {
|
|
9472
9472
|
const n = t ? Uint8Array.from([t]) : Uint8Array.from([]);
|
|
9473
9473
|
return ut([e, n]);
|
|
9474
9474
|
}
|
|
@@ -9494,7 +9494,7 @@ function C_(e, t) {
|
|
|
9494
9494
|
}
|
|
9495
9495
|
}
|
|
9496
9496
|
function H_(e, t) {
|
|
9497
|
-
const n = t && F_(t.leaves), { output: r } =
|
|
9497
|
+
const n = t && F_(t.leaves), { output: r } = dc({
|
|
9498
9498
|
internalPubkey: e,
|
|
9499
9499
|
scriptTree: n
|
|
9500
9500
|
});
|
|
@@ -9550,14 +9550,14 @@ function Wf(e, t, n = 0) {
|
|
|
9550
9550
|
if (i) return [t && t[0], i];
|
|
9551
9551
|
}
|
|
9552
9552
|
function D_(e, t, n) {
|
|
9553
|
-
const r = Ln(e) &&
|
|
9553
|
+
const r = Ln(e) && Ts(t), i = Ts(e) && Ln(t), s = e === t && Ln(t) && Ts(t);
|
|
9554
9554
|
if (r || i || s)
|
|
9555
9555
|
throw new Error(
|
|
9556
9556
|
`Invalid arguments for Psbt.${n}. Cannot use both taproot and non-taproot fields.`
|
|
9557
9557
|
);
|
|
9558
9558
|
}
|
|
9559
9559
|
function j_(e, t, n) {
|
|
9560
|
-
const r = Wu(e) &&
|
|
9560
|
+
const r = Wu(e) && Ts(t), i = Ts(e) && Wu(t), s = e === t && Wu(t) && Ts(t);
|
|
9561
9561
|
if (r || i || s)
|
|
9562
9562
|
throw new Error(
|
|
9563
9563
|
`Invalid arguments for Psbt.${n}. Cannot use both taproot and non-taproot fields.`
|
|
@@ -9625,7 +9625,7 @@ function z_(e, t, n) {
|
|
|
9625
9625
|
});
|
|
9626
9626
|
return (!n || de(r, n) === 0) && t.find((s) => de(s.leafHash, r) === 0) !== void 0;
|
|
9627
9627
|
}
|
|
9628
|
-
function
|
|
9628
|
+
function Ts(e) {
|
|
9629
9629
|
return e && !!(e.redeemScript || e.witnessScript || e.bip32Derivation && e.bip32Derivation.length);
|
|
9630
9630
|
}
|
|
9631
9631
|
const Y_ = {
|
|
@@ -9724,20 +9724,20 @@ class Ea {
|
|
|
9724
9724
|
return t.opts = JSON.parse(JSON.stringify(this.opts)), t;
|
|
9725
9725
|
}
|
|
9726
9726
|
setMaximumFeeRate(t) {
|
|
9727
|
-
|
|
9727
|
+
Cc(t), this.opts.maximumFeeRate = t;
|
|
9728
9728
|
}
|
|
9729
9729
|
setVersion(t) {
|
|
9730
|
-
|
|
9730
|
+
Cc(t), no(this.data.inputs, "setVersion");
|
|
9731
9731
|
const n = this.__CACHE;
|
|
9732
9732
|
return n.__TX.version = t, n.__EXTRACTED_TX = void 0, this;
|
|
9733
9733
|
}
|
|
9734
9734
|
setLocktime(t) {
|
|
9735
|
-
|
|
9735
|
+
Cc(t), no(this.data.inputs, "setLocktime");
|
|
9736
9736
|
const n = this.__CACHE;
|
|
9737
9737
|
return n.__TX.locktime = t, n.__EXTRACTED_TX = void 0, this;
|
|
9738
9738
|
}
|
|
9739
9739
|
setInputSequence(t, n) {
|
|
9740
|
-
|
|
9740
|
+
Cc(n), no(this.data.inputs, "setInputSequence");
|
|
9741
9741
|
const r = this.__CACHE;
|
|
9742
9742
|
if (r.__TX.ins.length <= t)
|
|
9743
9743
|
throw new Error("Input index too high");
|
|
@@ -9751,7 +9751,7 @@ class Ea {
|
|
|
9751
9751
|
throw new Error(
|
|
9752
9752
|
"Invalid arguments for Psbt.addInput. Requires single object with at least [hash] and [index]"
|
|
9753
9753
|
);
|
|
9754
|
-
Fd(t, t, "addInput"),
|
|
9754
|
+
Fd(t, t, "addInput"), no(this.data.inputs, "addInput"), t.witnessScript && _a(t.witnessScript);
|
|
9755
9755
|
const n = this.__CACHE;
|
|
9756
9756
|
this.data.addInput(t);
|
|
9757
9757
|
const r = n.__TX.ins[n.__TX.ins.length - 1];
|
|
@@ -9767,7 +9767,7 @@ class Ea {
|
|
|
9767
9767
|
throw new Error(
|
|
9768
9768
|
"Invalid arguments for Psbt.addOutput. Requires single object with at least [script or address] and [value]"
|
|
9769
9769
|
);
|
|
9770
|
-
|
|
9770
|
+
no(this.data.inputs, "addOutput");
|
|
9771
9771
|
const { address: n } = t;
|
|
9772
9772
|
if (typeof n == "string") {
|
|
9773
9773
|
const { network: i } = this.opts, s = Bg(n, i);
|
|
@@ -9796,7 +9796,7 @@ class Ea {
|
|
|
9796
9796
|
return Dd("__FEE", "fee", this.data.inputs, this.__CACHE);
|
|
9797
9797
|
}
|
|
9798
9798
|
finalizeAllInputs() {
|
|
9799
|
-
return Ut(this.data.inputs, 0),
|
|
9799
|
+
return Ut(this.data.inputs, 0), ro(this.data.inputs.length).forEach((t) => this.finalizeInput(t)), this;
|
|
9800
9800
|
}
|
|
9801
9801
|
finalizeInput(t, n) {
|
|
9802
9802
|
const r = Ut(this.data.inputs, t);
|
|
@@ -9844,7 +9844,7 @@ class Ea {
|
|
|
9844
9844
|
`Cannot finalize input #${t}. Missing withness utxo.`
|
|
9845
9845
|
);
|
|
9846
9846
|
if (n.tapKeySig) {
|
|
9847
|
-
const s =
|
|
9847
|
+
const s = dc({
|
|
9848
9848
|
output: n.witnessUtxo.script,
|
|
9849
9849
|
signature: n.tapKeySig
|
|
9850
9850
|
}), o = ba(s.witness);
|
|
@@ -9878,15 +9878,15 @@ class Ea {
|
|
|
9878
9878
|
return !!r.bip32Derivation && r.bip32Derivation.some(i);
|
|
9879
9879
|
}
|
|
9880
9880
|
outputHasPubkey(t, n) {
|
|
9881
|
-
const r =
|
|
9881
|
+
const r = ko(this.data.outputs, t);
|
|
9882
9882
|
return lS(n, r, t, this.__CACHE);
|
|
9883
9883
|
}
|
|
9884
9884
|
outputHasHDKey(t, n) {
|
|
9885
|
-
const r =
|
|
9885
|
+
const r = ko(this.data.outputs, t), i = Ld(n);
|
|
9886
9886
|
return !!r.bip32Derivation && r.bip32Derivation.some(i);
|
|
9887
9887
|
}
|
|
9888
9888
|
validateSignaturesOfAllInputs(t) {
|
|
9889
|
-
return Ut(this.data.inputs, 0),
|
|
9889
|
+
return Ut(this.data.inputs, 0), ro(this.data.inputs.length).map(
|
|
9890
9890
|
(r) => this.validateSignaturesOfInput(r, t)
|
|
9891
9891
|
).reduce((r, i) => i === !0 && r, !0);
|
|
9892
9892
|
}
|
|
@@ -9909,7 +9909,7 @@ class Ea {
|
|
|
9909
9909
|
const c = [];
|
|
9910
9910
|
let a, u, f;
|
|
9911
9911
|
for (const l of o) {
|
|
9912
|
-
const d =
|
|
9912
|
+
const d = xo.decode(l.signature), { hash: y, script: g } = f !== d.hashType ? Xg(
|
|
9913
9913
|
t,
|
|
9914
9914
|
Object.assign({}, i, { sighashType: d.hashType }),
|
|
9915
9915
|
this.__CACHE,
|
|
@@ -9969,7 +9969,7 @@ class Ea {
|
|
|
9969
9969
|
if (!t || !t.publicKey || !t.fingerprint)
|
|
9970
9970
|
throw new Error("Need HDSigner to sign input");
|
|
9971
9971
|
const r = [];
|
|
9972
|
-
for (const i of
|
|
9972
|
+
for (const i of ro(this.data.inputs.length))
|
|
9973
9973
|
try {
|
|
9974
9974
|
this.signInputHD(i, t, n), r.push(!0);
|
|
9975
9975
|
} catch {
|
|
@@ -9984,7 +9984,7 @@ class Ea {
|
|
|
9984
9984
|
if (!t || !t.publicKey || !t.fingerprint)
|
|
9985
9985
|
return i(new Error("Need HDSigner to sign input"));
|
|
9986
9986
|
const s = [], o = [];
|
|
9987
|
-
for (const c of
|
|
9987
|
+
for (const c of ro(this.data.inputs.length))
|
|
9988
9988
|
o.push(
|
|
9989
9989
|
this.signInputHDAsync(c, t, n).then(
|
|
9990
9990
|
() => {
|
|
@@ -10023,7 +10023,7 @@ class Ea {
|
|
|
10023
10023
|
if (!t || !t.publicKey)
|
|
10024
10024
|
throw new Error("Need Signer to sign input");
|
|
10025
10025
|
const r = [];
|
|
10026
|
-
for (const i of
|
|
10026
|
+
for (const i of ro(this.data.inputs.length))
|
|
10027
10027
|
try {
|
|
10028
10028
|
this.signInput(i, t, n), r.push(!0);
|
|
10029
10029
|
} catch {
|
|
@@ -10092,7 +10092,7 @@ class Ea {
|
|
|
10092
10092
|
), o = [
|
|
10093
10093
|
{
|
|
10094
10094
|
pubkey: n.publicKey,
|
|
10095
|
-
signature:
|
|
10095
|
+
signature: xo.encode(n.sign(i), s)
|
|
10096
10096
|
}
|
|
10097
10097
|
];
|
|
10098
10098
|
return this.data.updateInput(t, { partialSig: o }), this;
|
|
@@ -10105,13 +10105,13 @@ class Ea {
|
|
|
10105
10105
|
i,
|
|
10106
10106
|
s
|
|
10107
10107
|
), c = o.filter((u) => !u.leafHash).map(
|
|
10108
|
-
(u) =>
|
|
10108
|
+
(u) => Uc(
|
|
10109
10109
|
r.signSchnorr(u.hash),
|
|
10110
10110
|
n.sighashType
|
|
10111
10111
|
)
|
|
10112
10112
|
)[0], a = o.filter((u) => !!u.leafHash).map((u) => ({
|
|
10113
10113
|
pubkey: Jc(r.publicKey),
|
|
10114
|
-
signature:
|
|
10114
|
+
signature: Uc(
|
|
10115
10115
|
r.signSchnorr(u.hash),
|
|
10116
10116
|
n.sighashType
|
|
10117
10117
|
),
|
|
@@ -10161,7 +10161,7 @@ class Ea {
|
|
|
10161
10161
|
const c = [
|
|
10162
10162
|
{
|
|
10163
10163
|
pubkey: n.publicKey,
|
|
10164
|
-
signature:
|
|
10164
|
+
signature: xo.encode(o, s)
|
|
10165
10165
|
}
|
|
10166
10166
|
];
|
|
10167
10167
|
this.data.updateInput(t, { partialSig: c });
|
|
@@ -10178,7 +10178,7 @@ class Ea {
|
|
|
10178
10178
|
if (a) {
|
|
10179
10179
|
const f = Promise.resolve(
|
|
10180
10180
|
r.signSchnorr(a.hash)
|
|
10181
|
-
).then((l) => ({ tapKeySig:
|
|
10181
|
+
).then((l) => ({ tapKeySig: Uc(l, n.sighashType) }));
|
|
10182
10182
|
c.push(f);
|
|
10183
10183
|
}
|
|
10184
10184
|
const u = o.filter((f) => !!f.leafHash);
|
|
@@ -10187,7 +10187,7 @@ class Ea {
|
|
|
10187
10187
|
(d) => ({ tapScriptSig: [
|
|
10188
10188
|
{
|
|
10189
10189
|
pubkey: Jc(r.publicKey),
|
|
10190
|
-
signature:
|
|
10190
|
+
signature: Uc(
|
|
10191
10191
|
d,
|
|
10192
10192
|
n.sighashType
|
|
10193
10193
|
),
|
|
@@ -10325,7 +10325,7 @@ function jg(e) {
|
|
|
10325
10325
|
function Ld(e) {
|
|
10326
10326
|
return (t) => !(de(e.fingerprint, t.masterFingerprint) || de(e.derivePath(t.path).publicKey, t.pubkey));
|
|
10327
10327
|
}
|
|
10328
|
-
function
|
|
10328
|
+
function Cc(e) {
|
|
10329
10329
|
if (typeof e != "number" || e !== Math.floor(e) || e > 4294967295 || e < 0)
|
|
10330
10330
|
throw new Error("Invalid 32 bit integer");
|
|
10331
10331
|
}
|
|
@@ -10336,7 +10336,7 @@ function Q_(e, t, n) {
|
|
|
10336
10336
|
`Warning: You are paying around ${(s / 1e8).toFixed(8)} in fees, which is ${r} satoshi per byte for a transaction with a VSize of ${i} bytes (segwit counted as 0.25 byte per byte). Use setMaximumFeeRate method to raise your threshold, or pass true to the first arg of extractTransaction.`
|
|
10337
10337
|
);
|
|
10338
10338
|
}
|
|
10339
|
-
function
|
|
10339
|
+
function no(e, t) {
|
|
10340
10340
|
e.forEach((n) => {
|
|
10341
10341
|
if (Ln(n) ? M_(n, t) : P_(n, t))
|
|
10342
10342
|
throw new Error("Can not modify transaction, signatures exist.");
|
|
@@ -10346,7 +10346,7 @@ function eS(e) {
|
|
|
10346
10346
|
if (!e.sighashType || !e.partialSig) return;
|
|
10347
10347
|
const { partialSig: t, sighashType: n } = e;
|
|
10348
10348
|
t.forEach((r) => {
|
|
10349
|
-
const { hashType: i } =
|
|
10349
|
+
const { hashType: i } = xo.decode(r.signature);
|
|
10350
10350
|
if (n !== i)
|
|
10351
10351
|
throw new Error("Signature sighash does not match input sighash type");
|
|
10352
10352
|
});
|
|
@@ -10384,8 +10384,8 @@ function Wg(e, t) {
|
|
|
10384
10384
|
);
|
|
10385
10385
|
};
|
|
10386
10386
|
}
|
|
10387
|
-
const Vd = Wg(
|
|
10388
|
-
|
|
10387
|
+
const Vd = Wg(fc, "Redeem script"), $d = Wg(
|
|
10388
|
+
hc,
|
|
10389
10389
|
"Witness script"
|
|
10390
10390
|
);
|
|
10391
10391
|
function Dd(e, t, n, r) {
|
|
@@ -10412,7 +10412,7 @@ function rS(e, t, n, r, i, s) {
|
|
|
10412
10412
|
}
|
|
10413
10413
|
function iS(e, t, n, r, i, s) {
|
|
10414
10414
|
let o, c;
|
|
10415
|
-
const a = oS(e, t, n), u = s ?
|
|
10415
|
+
const a = oS(e, t, n), u = s ? hc({ redeem: a }) : null, f = i ? fc({ redeem: u || a }) : null;
|
|
10416
10416
|
return r ? (u ? c = ba(u.witness) : c = ba(a.witness), f && (o = f.input)) : f ? o = f.input : o = a.input, {
|
|
10417
10417
|
finalScriptSig: o,
|
|
10418
10418
|
finalScriptWitness: c
|
|
@@ -10466,7 +10466,7 @@ function Xg(e, t, n, r, i) {
|
|
|
10466
10466
|
o
|
|
10467
10467
|
);
|
|
10468
10468
|
else if (Qa(u)) {
|
|
10469
|
-
const l =
|
|
10469
|
+
const l = uc({
|
|
10470
10470
|
hash: u.slice(2)
|
|
10471
10471
|
}).output;
|
|
10472
10472
|
c = s.hashForWitnessV0(
|
|
@@ -10585,7 +10585,7 @@ function oS(e, t, n) {
|
|
|
10585
10585
|
});
|
|
10586
10586
|
break;
|
|
10587
10587
|
case "pubkeyhash":
|
|
10588
|
-
r =
|
|
10588
|
+
r = uc({
|
|
10589
10589
|
output: e,
|
|
10590
10590
|
pubkey: n[0].pubkey,
|
|
10591
10591
|
signature: n[0].signature
|
|
@@ -10650,7 +10650,7 @@ function Zg(e) {
|
|
|
10650
10650
|
return t += o, e.slice(t - o, t);
|
|
10651
10651
|
}
|
|
10652
10652
|
function r() {
|
|
10653
|
-
const o =
|
|
10653
|
+
const o = js(e, t);
|
|
10654
10654
|
return t += kn(o.bigintValue), o.numberValue;
|
|
10655
10655
|
}
|
|
10656
10656
|
function i() {
|
|
@@ -10809,18 +10809,18 @@ function _a(e) {
|
|
|
10809
10809
|
function tm(e) {
|
|
10810
10810
|
return Qa(e) ? "witnesspubkeyhash" : k_(e) ? "pubkeyhash" : B_(e) ? "multisig" : N_(e) ? "pubkey" : "nonstandard";
|
|
10811
10811
|
}
|
|
10812
|
-
function
|
|
10812
|
+
function ro(e) {
|
|
10813
10813
|
return [...Array(e).keys()];
|
|
10814
10814
|
}
|
|
10815
10815
|
wE(Z1);
|
|
10816
|
-
const
|
|
10816
|
+
const Po = {
|
|
10817
10817
|
Mainnet: "mainnet",
|
|
10818
10818
|
Testnet: "testnet"
|
|
10819
|
-
}, Sa = "abcdefghijklmnopqrstuvwxyz234567",
|
|
10819
|
+
}, Sa = "abcdefghijklmnopqrstuvwxyz234567", Us = /* @__PURE__ */ Object.create(null);
|
|
10820
10820
|
for (let e = 0; e < Sa.length; e++)
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10821
|
+
Us[Sa[e]] = e;
|
|
10822
|
+
Us[0] = Us.o;
|
|
10823
|
+
Us[1] = Us.i;
|
|
10824
10824
|
function gS(e) {
|
|
10825
10825
|
let t = 0, n = 0, r = "";
|
|
10826
10826
|
function i(s) {
|
|
@@ -10835,7 +10835,7 @@ function mS(e) {
|
|
|
10835
10835
|
const r = new Uint8Array(e.length * 4 / 3 | 0);
|
|
10836
10836
|
let i = 0;
|
|
10837
10837
|
function s(o) {
|
|
10838
|
-
let c =
|
|
10838
|
+
let c = Us[o.toLowerCase()];
|
|
10839
10839
|
if (c === void 0)
|
|
10840
10840
|
throw new Error(`Invalid character: ${JSON.stringify(o)}`);
|
|
10841
10841
|
c <<= 3, n |= c >>> t, t += 5, t >= 8 && (r[i++] = n, t -= 8, t > 0 ? n = c << 5 - t & 255 : n = 0);
|
|
@@ -11110,8 +11110,8 @@ function bS(e) {
|
|
|
11110
11110
|
}
|
|
11111
11111
|
return (t ^ -1) >>> 0;
|
|
11112
11112
|
}
|
|
11113
|
-
const
|
|
11114
|
-
let Ke = class
|
|
11113
|
+
const Hc = "__principal__", ES = 2, Wd = 4, _S = "aaaaa-aa";
|
|
11114
|
+
let Ke = class ms {
|
|
11115
11115
|
static anonymous() {
|
|
11116
11116
|
return new this(new Uint8Array([Wd]));
|
|
11117
11117
|
}
|
|
@@ -11128,21 +11128,21 @@ let Ke = class gs {
|
|
|
11128
11128
|
}
|
|
11129
11129
|
static from(t) {
|
|
11130
11130
|
if (typeof t == "string")
|
|
11131
|
-
return
|
|
11131
|
+
return ms.fromText(t);
|
|
11132
11132
|
if (Object.getPrototypeOf(t) === Uint8Array.prototype)
|
|
11133
|
-
return new
|
|
11134
|
-
if (
|
|
11135
|
-
return new
|
|
11133
|
+
return new ms(t);
|
|
11134
|
+
if (ms.isPrincipal(t))
|
|
11135
|
+
return new ms(t._arr);
|
|
11136
11136
|
throw new Error(`Impossible to convert ${JSON.stringify(t)} to Principal.`);
|
|
11137
11137
|
}
|
|
11138
11138
|
static fromHex(t) {
|
|
11139
|
-
return new this(
|
|
11139
|
+
return new this(ac(t));
|
|
11140
11140
|
}
|
|
11141
11141
|
static fromText(t) {
|
|
11142
11142
|
let n = t;
|
|
11143
|
-
if (t.includes(
|
|
11143
|
+
if (t.includes(Hc)) {
|
|
11144
11144
|
const o = JSON.parse(t);
|
|
11145
|
-
|
|
11145
|
+
Hc in o && (n = o[Hc]);
|
|
11146
11146
|
}
|
|
11147
11147
|
const r = n.toLowerCase().replace(/-/g, "");
|
|
11148
11148
|
let i = mS(r);
|
|
@@ -11156,7 +11156,7 @@ let Ke = class gs {
|
|
|
11156
11156
|
return new this(t);
|
|
11157
11157
|
}
|
|
11158
11158
|
static isPrincipal(t) {
|
|
11159
|
-
return t instanceof
|
|
11159
|
+
return t instanceof ms || typeof t == "object" && t !== null && "_isPrincipal" in t && t._isPrincipal === !0 && "_arr" in t && t._arr instanceof Uint8Array;
|
|
11160
11160
|
}
|
|
11161
11161
|
constructor(t) {
|
|
11162
11162
|
this._arr = t, this._isPrincipal = !0;
|
|
@@ -11186,7 +11186,7 @@ let Ke = class gs {
|
|
|
11186
11186
|
* @returns {JsonnablePrincipal} a JSON object with a single key, {@link JSON_KEY_PRINCIPAL}, whose value is the principal as a string
|
|
11187
11187
|
*/
|
|
11188
11188
|
toJSON() {
|
|
11189
|
-
return { [
|
|
11189
|
+
return { [Hc]: this.toText() };
|
|
11190
11190
|
}
|
|
11191
11191
|
/**
|
|
11192
11192
|
* Utility method taking a Principal to compare against. Used for determining canister ranges in certificate verification
|
|
@@ -11228,7 +11228,7 @@ function Ve(...e) {
|
|
|
11228
11228
|
t.set(r, n), n += r.byteLength;
|
|
11229
11229
|
return t;
|
|
11230
11230
|
}
|
|
11231
|
-
class
|
|
11231
|
+
class Ks {
|
|
11232
11232
|
/**
|
|
11233
11233
|
* Save a checkpoint of the reading view (for backtracking)
|
|
11234
11234
|
*/
|
|
@@ -11367,7 +11367,7 @@ function Gi(e) {
|
|
|
11367
11367
|
function lt(e) {
|
|
11368
11368
|
if (typeof e == "number" && (e = BigInt(e)), e < BigInt(0))
|
|
11369
11369
|
throw new Error("Cannot leb encode negative values.");
|
|
11370
|
-
const t = (e === BigInt(0) ? 0 : rm(e)) + 1, n = new
|
|
11370
|
+
const t = (e === BigInt(0) ? 0 : rm(e)) + 1, n = new Ks(new Uint8Array(t), 0);
|
|
11371
11371
|
for (; ; ) {
|
|
11372
11372
|
const r = Number(e & BigInt(127));
|
|
11373
11373
|
if (e /= BigInt(128), e === BigInt(0)) {
|
|
@@ -11389,7 +11389,7 @@ function It(e) {
|
|
|
11389
11389
|
typeof e == "number" && (e = BigInt(e));
|
|
11390
11390
|
const t = e < BigInt(0);
|
|
11391
11391
|
t && (e = -e - BigInt(1));
|
|
11392
|
-
const n = (e === BigInt(0) ? 0 : rm(e)) + 1, r = new
|
|
11392
|
+
const n = (e === BigInt(0) ? 0 : rm(e)) + 1, r = new Ks(new Uint8Array(n), 0);
|
|
11393
11393
|
for (; ; ) {
|
|
11394
11394
|
const s = i(e);
|
|
11395
11395
|
if (e /= BigInt(128), t && e === BigInt(0) && (s & 64) !== 0 || !t && e === BigInt(0) && (s & 64) === 0) {
|
|
@@ -11426,7 +11426,7 @@ function AS(e, t) {
|
|
|
11426
11426
|
}
|
|
11427
11427
|
function sm(e, t) {
|
|
11428
11428
|
e = BigInt(e);
|
|
11429
|
-
const n = new
|
|
11429
|
+
const n = new Ks(new Uint8Array(Math.min(1, t)), 0);
|
|
11430
11430
|
let r = 0, i = BigInt(256), s = BigInt(0), o = Number(e % i);
|
|
11431
11431
|
for (n.write(new Uint8Array([o])); ++r < t; )
|
|
11432
11432
|
e < 0 && s === BigInt(0) && o !== 0 && (s = BigInt(1)), o = Number((e / i - s) % BigInt(256)), n.write(new Uint8Array([o])), i *= BigInt(256);
|
|
@@ -11455,7 +11455,7 @@ var Le;
|
|
|
11455
11455
|
e[e.Null = -1] = "Null", e[e.Bool = -2] = "Bool", e[e.Nat = -3] = "Nat", e[e.Int = -4] = "Int", e[e.Float32 = -13] = "Float32", e[e.Float64 = -14] = "Float64", e[e.Text = -15] = "Text", e[e.Reserved = -16] = "Reserved", e[e.Empty = -17] = "Empty", e[e.Opt = -18] = "Opt", e[e.Vector = -19] = "Vector", e[e.Record = -20] = "Record", e[e.Variant = -21] = "Variant", e[e.Func = -22] = "Func", e[e.Service = -23] = "Service", e[e.Principal = -24] = "Principal";
|
|
11456
11456
|
})(Le || (Le = {}));
|
|
11457
11457
|
const Qc = "DIDL", Xd = 400;
|
|
11458
|
-
function
|
|
11458
|
+
function Ro(e, t, n) {
|
|
11459
11459
|
return e.map((r, i) => n(r, t[i]));
|
|
11460
11460
|
}
|
|
11461
11461
|
class IS {
|
|
@@ -11719,7 +11719,7 @@ class am extends Cn {
|
|
|
11719
11719
|
return "bool";
|
|
11720
11720
|
}
|
|
11721
11721
|
}
|
|
11722
|
-
class
|
|
11722
|
+
class Uo extends Cn {
|
|
11723
11723
|
get typeName() {
|
|
11724
11724
|
return Be.NullClass;
|
|
11725
11725
|
}
|
|
@@ -11993,7 +11993,7 @@ class ui extends Cn {
|
|
|
11993
11993
|
return t.toString();
|
|
11994
11994
|
}
|
|
11995
11995
|
}
|
|
11996
|
-
class
|
|
11996
|
+
class Cs extends yi {
|
|
11997
11997
|
get typeName() {
|
|
11998
11998
|
return Be.VecClass;
|
|
11999
11999
|
}
|
|
@@ -12042,7 +12042,7 @@ index ${i} -> ${s.message}`);
|
|
|
12042
12042
|
return Ve(n, new Uint8Array(i.buffer));
|
|
12043
12043
|
} else
|
|
12044
12044
|
return Ve(n, new Uint8Array(t.buffer, t.byteOffset, t.byteLength));
|
|
12045
|
-
const r = new
|
|
12045
|
+
const r = new Ks(new Uint8Array(n.byteLength + t.length), 0);
|
|
12046
12046
|
r.write(n);
|
|
12047
12047
|
for (const i of t) {
|
|
12048
12048
|
const s = this._type.encodeValue(i);
|
|
@@ -12057,7 +12057,7 @@ index ${i} -> ${s.message}`);
|
|
|
12057
12057
|
}
|
|
12058
12058
|
decodeValue(t, n) {
|
|
12059
12059
|
const r = this.checkType(n);
|
|
12060
|
-
if (!(r instanceof
|
|
12060
|
+
if (!(r instanceof Cs))
|
|
12061
12061
|
throw new Error("Not a vector type");
|
|
12062
12062
|
const i = Number(Nt(t));
|
|
12063
12063
|
if (this._type instanceof ui) {
|
|
@@ -12144,7 +12144,7 @@ class kr extends yi {
|
|
|
12144
12144
|
t.add(this, Ve(n, r));
|
|
12145
12145
|
}
|
|
12146
12146
|
decodeValue(t, n) {
|
|
12147
|
-
if (n instanceof
|
|
12147
|
+
if (n instanceof Uo)
|
|
12148
12148
|
return [];
|
|
12149
12149
|
if (n instanceof di)
|
|
12150
12150
|
return [];
|
|
@@ -12173,7 +12173,7 @@ class kr extends yi {
|
|
|
12173
12173
|
else {
|
|
12174
12174
|
if (
|
|
12175
12175
|
// this check corresponds to `not (null <: <t>)` in the spec
|
|
12176
|
-
this._type instanceof
|
|
12176
|
+
this._type instanceof Uo || this._type instanceof kr || this._type instanceof di
|
|
12177
12177
|
)
|
|
12178
12178
|
return r.decodeValue(t, r), [];
|
|
12179
12179
|
{
|
|
@@ -12235,7 +12235,7 @@ field ${n} -> ${i.message}`);
|
|
|
12235
12235
|
throw new Error(`Invalid ${this.display()} argument: ${bt(t)}`);
|
|
12236
12236
|
}
|
|
12237
12237
|
encodeValue(t) {
|
|
12238
|
-
const n = this._fields.map(([i]) => t[i]), r =
|
|
12238
|
+
const n = this._fields.map(([i]) => t[i]), r = Ro(this._fields, n, ([, i], s) => i.encodeValue(s));
|
|
12239
12239
|
return Ve(...r);
|
|
12240
12240
|
}
|
|
12241
12241
|
_buildTypeTableImpl(t) {
|
|
@@ -12287,7 +12287,7 @@ field ${n} -> ${i.message}`);
|
|
|
12287
12287
|
}
|
|
12288
12288
|
valueToString(t) {
|
|
12289
12289
|
const n = this._fields.map(([i]) => t[i]);
|
|
12290
|
-
return `record {${
|
|
12290
|
+
return `record {${Ro(this._fields, n, ([i, s], o) => i + "=" + s.valueToString(o)).join("; ")}}`;
|
|
12291
12291
|
}
|
|
12292
12292
|
}
|
|
12293
12293
|
class iu extends Xi {
|
|
@@ -12318,7 +12318,7 @@ index ${r} -> ${i.message}`);
|
|
|
12318
12318
|
throw new Error(`Invalid ${this.display()} argument: ${bt(t)}`);
|
|
12319
12319
|
}
|
|
12320
12320
|
encodeValue(t) {
|
|
12321
|
-
const n =
|
|
12321
|
+
const n = Ro(this._components, t, (r, i) => r.encodeValue(i));
|
|
12322
12322
|
return Ve(...n);
|
|
12323
12323
|
}
|
|
12324
12324
|
decodeValue(t, n) {
|
|
@@ -12336,10 +12336,10 @@ index ${r} -> ${i.message}`);
|
|
|
12336
12336
|
return `record {${this._components.map((n) => n.display()).join("; ")}}`;
|
|
12337
12337
|
}
|
|
12338
12338
|
valueToString(t) {
|
|
12339
|
-
return `record {${
|
|
12339
|
+
return `record {${Ro(this._components, t, (r, i) => r.valueToString(i)).join("; ")}}`;
|
|
12340
12340
|
}
|
|
12341
12341
|
}
|
|
12342
|
-
class
|
|
12342
|
+
class Hs extends yi {
|
|
12343
12343
|
get typeName() {
|
|
12344
12344
|
return Be.VariantClass;
|
|
12345
12345
|
}
|
|
@@ -12384,7 +12384,7 @@ variant ${n} -> ${i.message}`);
|
|
|
12384
12384
|
}
|
|
12385
12385
|
decodeValue(t, n) {
|
|
12386
12386
|
const r = this.checkType(n);
|
|
12387
|
-
if (!(r instanceof
|
|
12387
|
+
if (!(r instanceof Hs))
|
|
12388
12388
|
throw new Error("Not a variant type");
|
|
12389
12389
|
const i = Number(Nt(t));
|
|
12390
12390
|
if (i >= r._fields.length)
|
|
@@ -12513,7 +12513,7 @@ class fm extends Cn {
|
|
|
12513
12513
|
return `${this.name} "${t.toText()}"`;
|
|
12514
12514
|
}
|
|
12515
12515
|
}
|
|
12516
|
-
class
|
|
12516
|
+
class Co extends yi {
|
|
12517
12517
|
get typeName() {
|
|
12518
12518
|
return Be.FuncClass;
|
|
12519
12519
|
}
|
|
@@ -12633,7 +12633,7 @@ function Zf(e, t) {
|
|
|
12633
12633
|
throw Error("Wrong number of message arguments");
|
|
12634
12634
|
const n = new IS();
|
|
12635
12635
|
e.forEach((a) => a.buildTypeTable(n));
|
|
12636
|
-
const r = new TextEncoder().encode(Qc), i = n.encode(), s = lt(t.length), o = Ve(...e.map((a) => a.encodeType(n))), c = Ve(...
|
|
12636
|
+
const r = new TextEncoder().encode(Qc), i = n.encode(), s = lt(t.length), o = Ve(...e.map((a) => a.encodeType(n))), c = Ve(...Ro(e, t, (a, u) => {
|
|
12637
12637
|
try {
|
|
12638
12638
|
a.covariant(u);
|
|
12639
12639
|
} catch (f) {
|
|
@@ -12646,7 +12646,7 @@ function Zf(e, t) {
|
|
|
12646
12646
|
return Ve(r, i, s, o, c);
|
|
12647
12647
|
}
|
|
12648
12648
|
function lm(e, t) {
|
|
12649
|
-
const n = new
|
|
12649
|
+
const n = new Ks(t);
|
|
12650
12650
|
if (t.byteLength < Qc.length)
|
|
12651
12651
|
throw new Error("Message length smaller than magic number");
|
|
12652
12652
|
const r = Ki(n, Qc.length), i = new TextDecoder().decode(r);
|
|
@@ -12817,7 +12817,7 @@ function lm(e, t) {
|
|
|
12817
12817
|
const y = {}, g = d[1];
|
|
12818
12818
|
for (const [m, E] of g) {
|
|
12819
12819
|
let _ = u(E);
|
|
12820
|
-
if (_ instanceof Pn && (_ = _.getType()), !(_ instanceof
|
|
12820
|
+
if (_ instanceof Pn && (_ = _.getType()), !(_ instanceof Co))
|
|
12821
12821
|
throw new Error("Illegal service definition: services can only contain functions");
|
|
12822
12822
|
y[m] = _;
|
|
12823
12823
|
}
|
|
@@ -12850,12 +12850,12 @@ function lm(e, t) {
|
|
|
12850
12850
|
Jf();
|
|
12851
12851
|
}
|
|
12852
12852
|
}
|
|
12853
|
-
const hm = new Ll(), dm = new di(), BS = new cm(), pm = new am(), ym = new
|
|
12853
|
+
const hm = new Ll(), dm = new di(), BS = new cm(), pm = new am(), ym = new Uo(), gm = new um(), mm = new Vl(), wm = new $l(), bm = new Dl(32), Em = new Dl(64), _m = new Wi(8), Sm = new Wi(16), Tm = new Wi(32), xm = new Wi(64), Am = new ui(8), vm = new ui(16), Im = new ui(32), Om = new ui(64), Bm = new fm();
|
|
12854
12854
|
function Nm(...e) {
|
|
12855
12855
|
return new iu(e);
|
|
12856
12856
|
}
|
|
12857
12857
|
function km(e) {
|
|
12858
|
-
return new
|
|
12858
|
+
return new Cs(e);
|
|
12859
12859
|
}
|
|
12860
12860
|
function Pm(e) {
|
|
12861
12861
|
return new kr(e);
|
|
@@ -12864,13 +12864,13 @@ function Rm(e) {
|
|
|
12864
12864
|
return new Xi(e);
|
|
12865
12865
|
}
|
|
12866
12866
|
function Um(e) {
|
|
12867
|
-
return new
|
|
12867
|
+
return new Hs(e);
|
|
12868
12868
|
}
|
|
12869
12869
|
function Cm() {
|
|
12870
12870
|
return new Pn();
|
|
12871
12871
|
}
|
|
12872
12872
|
function Hm(e, t, n = []) {
|
|
12873
|
-
return new
|
|
12873
|
+
return new Co(e, t, n);
|
|
12874
12874
|
}
|
|
12875
12875
|
function Fm(e) {
|
|
12876
12876
|
return new Ta(e);
|
|
@@ -12929,7 +12929,7 @@ function NS(e, t) {
|
|
|
12929
12929
|
return !0;
|
|
12930
12930
|
}
|
|
12931
12931
|
function Yu(e) {
|
|
12932
|
-
return e instanceof kr || e instanceof
|
|
12932
|
+
return e instanceof kr || e instanceof Uo || e instanceof di;
|
|
12933
12933
|
}
|
|
12934
12934
|
function Kl(e, t) {
|
|
12935
12935
|
const n = ea.copy(), r = gr(n, e, t);
|
|
@@ -12943,7 +12943,7 @@ function gr(e, t, n) {
|
|
|
12943
12943
|
return r;
|
|
12944
12944
|
if (e.add(t, n), n instanceof di || t instanceof Ll || t instanceof $l && n instanceof Vl)
|
|
12945
12945
|
return !0;
|
|
12946
|
-
if (t instanceof
|
|
12946
|
+
if (t instanceof Cs && n instanceof Cs)
|
|
12947
12947
|
return gr(e, t._type, n._type);
|
|
12948
12948
|
if (n instanceof kr)
|
|
12949
12949
|
return !0;
|
|
@@ -12959,7 +12959,7 @@ function gr(e, t, n) {
|
|
|
12959
12959
|
}
|
|
12960
12960
|
return !0;
|
|
12961
12961
|
}
|
|
12962
|
-
if (t instanceof
|
|
12962
|
+
if (t instanceof Co && n instanceof Co) {
|
|
12963
12963
|
if (!NS(t, n))
|
|
12964
12964
|
return !1;
|
|
12965
12965
|
for (let i = 0; i < t.argTypes.length; i++) {
|
|
@@ -12980,7 +12980,7 @@ function gr(e, t, n) {
|
|
|
12980
12980
|
}
|
|
12981
12981
|
return !0;
|
|
12982
12982
|
}
|
|
12983
|
-
if (t instanceof
|
|
12983
|
+
if (t instanceof Hs && n instanceof Hs) {
|
|
12984
12984
|
const i = n.alternativesAsObject;
|
|
12985
12985
|
for (const [s, o] of t._fields) {
|
|
12986
12986
|
const c = i[an(s)];
|
|
@@ -13013,7 +13013,7 @@ const kS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13013
13013
|
Float64: Em,
|
|
13014
13014
|
FloatClass: Dl,
|
|
13015
13015
|
Func: Hm,
|
|
13016
|
-
FuncClass:
|
|
13016
|
+
FuncClass: Co,
|
|
13017
13017
|
Int: mm,
|
|
13018
13018
|
Int16: Sm,
|
|
13019
13019
|
Int32: Tm,
|
|
@@ -13027,7 +13027,7 @@ const kS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13027
13027
|
Nat8: Am,
|
|
13028
13028
|
NatClass: $l,
|
|
13029
13029
|
Null: ym,
|
|
13030
|
-
NullClass:
|
|
13030
|
+
NullClass: Uo,
|
|
13031
13031
|
Opt: Pm,
|
|
13032
13032
|
OptClass: kr,
|
|
13033
13033
|
PrimitiveType: Cn,
|
|
@@ -13049,9 +13049,9 @@ const kS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13049
13049
|
Unknown: BS,
|
|
13050
13050
|
UnknownClass: cm,
|
|
13051
13051
|
Variant: Um,
|
|
13052
|
-
VariantClass:
|
|
13052
|
+
VariantClass: Hs,
|
|
13053
13053
|
Vec: km,
|
|
13054
|
-
VecClass:
|
|
13054
|
+
VecClass: Cs,
|
|
13055
13055
|
Visitor: OS,
|
|
13056
13056
|
decode: lm,
|
|
13057
13057
|
encode: Zf,
|
|
@@ -13066,42 +13066,42 @@ function Mm(e, t) {
|
|
|
13066
13066
|
const { toString: PS } = Object.prototype, { getPrototypeOf: Gl } = Object, { iterator: ou, toStringTag: qm } = Symbol, cu = /* @__PURE__ */ ((e) => (t) => {
|
|
13067
13067
|
const n = PS.call(t);
|
|
13068
13068
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
13069
|
-
})(/* @__PURE__ */ Object.create(null)), zn = (e) => (e = e.toLowerCase(), (t) => cu(t) === e), au = (e) => (t) => typeof t === e, { isArray:
|
|
13070
|
-
function
|
|
13071
|
-
return e !== null && !
|
|
13069
|
+
})(/* @__PURE__ */ Object.create(null)), zn = (e) => (e = e.toLowerCase(), (t) => cu(t) === e), au = (e) => (t) => typeof t === e, { isArray: Gs } = Array, Ho = au("undefined");
|
|
13070
|
+
function pc(e) {
|
|
13071
|
+
return e !== null && !Ho(e) && e.constructor !== null && !Ho(e.constructor) && pn(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13072
13072
|
}
|
|
13073
13073
|
const Lm = zn("ArrayBuffer");
|
|
13074
13074
|
function RS(e) {
|
|
13075
13075
|
let t;
|
|
13076
13076
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Lm(e.buffer), t;
|
|
13077
13077
|
}
|
|
13078
|
-
const US = au("string"), pn = au("function"), Vm = au("number"),
|
|
13078
|
+
const US = au("string"), pn = au("function"), Vm = au("number"), yc = (e) => e !== null && typeof e == "object", CS = (e) => e === !0 || e === !1, ta = (e) => {
|
|
13079
13079
|
if (cu(e) !== "object")
|
|
13080
13080
|
return !1;
|
|
13081
13081
|
const t = Gl(e);
|
|
13082
13082
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(qm in e) && !(ou in e);
|
|
13083
13083
|
}, HS = (e) => {
|
|
13084
|
-
if (!
|
|
13084
|
+
if (!yc(e) || pc(e))
|
|
13085
13085
|
return !1;
|
|
13086
13086
|
try {
|
|
13087
13087
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
13088
13088
|
} catch {
|
|
13089
13089
|
return !1;
|
|
13090
13090
|
}
|
|
13091
|
-
}, FS = zn("Date"), MS = zn("File"), qS = zn("Blob"), LS = zn("FileList"), VS = (e) =>
|
|
13091
|
+
}, FS = zn("Date"), MS = zn("File"), qS = zn("Blob"), LS = zn("FileList"), VS = (e) => yc(e) && pn(e.pipe), $S = (e) => {
|
|
13092
13092
|
let t;
|
|
13093
13093
|
return e && (typeof FormData == "function" && e instanceof FormData || pn(e.append) && ((t = cu(e)) === "formdata" || // detect form-data instance
|
|
13094
13094
|
t === "object" && pn(e.toString) && e.toString() === "[object FormData]"));
|
|
13095
13095
|
}, DS = zn("URLSearchParams"), [jS, KS, GS, WS] = ["ReadableStream", "Request", "Response", "Headers"].map(zn), XS = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
13096
|
-
function
|
|
13096
|
+
function gc(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
13097
13097
|
if (e === null || typeof e > "u")
|
|
13098
13098
|
return;
|
|
13099
13099
|
let r, i;
|
|
13100
|
-
if (typeof e != "object" && (e = [e]),
|
|
13100
|
+
if (typeof e != "object" && (e = [e]), Gs(e))
|
|
13101
13101
|
for (r = 0, i = e.length; r < i; r++)
|
|
13102
13102
|
t.call(null, e[r], r, e);
|
|
13103
13103
|
else {
|
|
13104
|
-
if (
|
|
13104
|
+
if (pc(e))
|
|
13105
13105
|
return;
|
|
13106
13106
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = s.length;
|
|
13107
13107
|
let c;
|
|
@@ -13110,7 +13110,7 @@ function yc(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
13110
13110
|
}
|
|
13111
13111
|
}
|
|
13112
13112
|
function $m(e, t) {
|
|
13113
|
-
if (
|
|
13113
|
+
if (pc(e))
|
|
13114
13114
|
return null;
|
|
13115
13115
|
t = t.toLowerCase();
|
|
13116
13116
|
const n = Object.keys(e);
|
|
@@ -13120,17 +13120,17 @@ function $m(e, t) {
|
|
|
13120
13120
|
return i;
|
|
13121
13121
|
return null;
|
|
13122
13122
|
}
|
|
13123
|
-
const Ci = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : globalThis, Dm = (e) => !
|
|
13123
|
+
const Ci = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : globalThis, Dm = (e) => !Ho(e) && e !== Ci;
|
|
13124
13124
|
function Qf() {
|
|
13125
13125
|
const { caseless: e } = Dm(this) && this || {}, t = {}, n = (r, i) => {
|
|
13126
13126
|
const s = e && $m(t, i) || i;
|
|
13127
|
-
ta(t[s]) && ta(r) ? t[s] = Qf(t[s], r) : ta(r) ? t[s] = Qf({}, r) :
|
|
13127
|
+
ta(t[s]) && ta(r) ? t[s] = Qf(t[s], r) : ta(r) ? t[s] = Qf({}, r) : Gs(r) ? t[s] = r.slice() : t[s] = r;
|
|
13128
13128
|
};
|
|
13129
13129
|
for (let r = 0, i = arguments.length; r < i; r++)
|
|
13130
|
-
arguments[r] &&
|
|
13130
|
+
arguments[r] && gc(arguments[r], n);
|
|
13131
13131
|
return t;
|
|
13132
13132
|
}
|
|
13133
|
-
const zS = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
13133
|
+
const zS = (e, t, n, { allOwnKeys: r } = {}) => (gc(t, (i, s) => {
|
|
13134
13134
|
n && pn(i) ? e[s] = Mm(i, n) : e[s] = i;
|
|
13135
13135
|
}, { allOwnKeys: r }), e), YS = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ZS = (e, t, n, r) => {
|
|
13136
13136
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -13152,7 +13152,7 @@ const zS = (e, t, n, { allOwnKeys: r } = {}) => (yc(t, (i, s) => {
|
|
|
13152
13152
|
return r !== -1 && r === n;
|
|
13153
13153
|
}, eT = (e) => {
|
|
13154
13154
|
if (!e) return null;
|
|
13155
|
-
if (
|
|
13155
|
+
if (Gs(e)) return e;
|
|
13156
13156
|
let t = e.length;
|
|
13157
13157
|
if (!Vm(t)) return null;
|
|
13158
13158
|
const n = new Array(t);
|
|
@@ -13179,7 +13179,7 @@ const zS = (e, t, n, { allOwnKeys: r } = {}) => (yc(t, (i, s) => {
|
|
|
13179
13179
|
}
|
|
13180
13180
|
), zd = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), oT = zn("RegExp"), jm = (e, t) => {
|
|
13181
13181
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
13182
|
-
|
|
13182
|
+
gc(n, (i, s) => {
|
|
13183
13183
|
let o;
|
|
13184
13184
|
(o = t(i, s, e)) !== !1 && (r[s] = o || i);
|
|
13185
13185
|
}), Object.defineProperties(e, r);
|
|
@@ -13204,7 +13204,7 @@ const zS = (e, t, n, { allOwnKeys: r } = {}) => (yc(t, (i, s) => {
|
|
|
13204
13204
|
n[s] = !0;
|
|
13205
13205
|
});
|
|
13206
13206
|
};
|
|
13207
|
-
return
|
|
13207
|
+
return Gs(e) ? r(e) : r(String(e).split(t)), n;
|
|
13208
13208
|
}, uT = () => {
|
|
13209
13209
|
}, fT = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
13210
13210
|
function lT(e) {
|
|
@@ -13212,24 +13212,24 @@ function lT(e) {
|
|
|
13212
13212
|
}
|
|
13213
13213
|
const hT = (e) => {
|
|
13214
13214
|
const t = new Array(10), n = (r, i) => {
|
|
13215
|
-
if (
|
|
13215
|
+
if (yc(r)) {
|
|
13216
13216
|
if (t.indexOf(r) >= 0)
|
|
13217
13217
|
return;
|
|
13218
|
-
if (
|
|
13218
|
+
if (pc(r))
|
|
13219
13219
|
return r;
|
|
13220
13220
|
if (!("toJSON" in r)) {
|
|
13221
13221
|
t[i] = r;
|
|
13222
|
-
const s =
|
|
13223
|
-
return
|
|
13222
|
+
const s = Gs(r) ? [] : {};
|
|
13223
|
+
return gc(r, (o, c) => {
|
|
13224
13224
|
const a = n(o, i + 1);
|
|
13225
|
-
!
|
|
13225
|
+
!Ho(a) && (s[c] = a);
|
|
13226
13226
|
}), t[i] = void 0, s;
|
|
13227
13227
|
}
|
|
13228
13228
|
}
|
|
13229
13229
|
return r;
|
|
13230
13230
|
};
|
|
13231
13231
|
return n(e, 0);
|
|
13232
|
-
}, dT = zn("AsyncFunction"), pT = (e) => e && (
|
|
13232
|
+
}, dT = zn("AsyncFunction"), pT = (e) => e && (yc(e) || pn(e)) && pn(e.then) && pn(e.catch), Km = ((e, t) => e ? setImmediate : t ? ((n, r) => (Ci.addEventListener("message", ({ source: i, data: s }) => {
|
|
13233
13233
|
i === Ci && s === n && r.length && r.shift()();
|
|
13234
13234
|
}, !1), (i) => {
|
|
13235
13235
|
r.push(i), Ci.postMessage(n, "*");
|
|
@@ -13237,22 +13237,22 @@ const hT = (e) => {
|
|
|
13237
13237
|
typeof setImmediate == "function",
|
|
13238
13238
|
pn(Ci.postMessage)
|
|
13239
13239
|
), yT = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ci) : typeof process < "u" && process.nextTick || Km, gT = (e) => e != null && pn(e[ou]), z = {
|
|
13240
|
-
isArray:
|
|
13240
|
+
isArray: Gs,
|
|
13241
13241
|
isArrayBuffer: Lm,
|
|
13242
|
-
isBuffer:
|
|
13242
|
+
isBuffer: pc,
|
|
13243
13243
|
isFormData: $S,
|
|
13244
13244
|
isArrayBufferView: RS,
|
|
13245
13245
|
isString: US,
|
|
13246
13246
|
isNumber: Vm,
|
|
13247
13247
|
isBoolean: CS,
|
|
13248
|
-
isObject:
|
|
13248
|
+
isObject: yc,
|
|
13249
13249
|
isPlainObject: ta,
|
|
13250
13250
|
isEmptyObject: HS,
|
|
13251
13251
|
isReadableStream: jS,
|
|
13252
13252
|
isRequest: KS,
|
|
13253
13253
|
isResponse: GS,
|
|
13254
13254
|
isHeaders: WS,
|
|
13255
|
-
isUndefined:
|
|
13255
|
+
isUndefined: Ho,
|
|
13256
13256
|
isDate: FS,
|
|
13257
13257
|
isFile: MS,
|
|
13258
13258
|
isBlob: qS,
|
|
@@ -13262,7 +13262,7 @@ const hT = (e) => {
|
|
|
13262
13262
|
isURLSearchParams: DS,
|
|
13263
13263
|
isTypedArray: tT,
|
|
13264
13264
|
isFileList: LS,
|
|
13265
|
-
forEach:
|
|
13265
|
+
forEach: gc,
|
|
13266
13266
|
merge: Qf,
|
|
13267
13267
|
extend: zS,
|
|
13268
13268
|
trim: XS,
|
|
@@ -13597,7 +13597,7 @@ function PT(e, t, n) {
|
|
|
13597
13597
|
}
|
|
13598
13598
|
return (n || JSON.stringify)(e);
|
|
13599
13599
|
}
|
|
13600
|
-
const
|
|
13600
|
+
const mc = {
|
|
13601
13601
|
transitional: Zm,
|
|
13602
13602
|
adapter: ["xhr", "http", "fetch"],
|
|
13603
13603
|
transformRequest: [function(t, n) {
|
|
@@ -13626,7 +13626,7 @@ const gc = {
|
|
|
13626
13626
|
return s || i ? (n.setContentType("application/json", !1), PT(t)) : t;
|
|
13627
13627
|
}],
|
|
13628
13628
|
transformResponse: [function(t) {
|
|
13629
|
-
const n = this.transitional ||
|
|
13629
|
+
const n = this.transitional || mc.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json";
|
|
13630
13630
|
if (z.isResponse(t) || z.isReadableStream(t))
|
|
13631
13631
|
return t;
|
|
13632
13632
|
if (t && z.isString(t) && (r && !this.responseType || i)) {
|
|
@@ -13664,7 +13664,7 @@ const gc = {
|
|
|
13664
13664
|
}
|
|
13665
13665
|
};
|
|
13666
13666
|
z.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
13667
|
-
|
|
13667
|
+
mc.headers[e] = {};
|
|
13668
13668
|
});
|
|
13669
13669
|
const RT = z.toObjectSet([
|
|
13670
13670
|
"age",
|
|
@@ -13692,7 +13692,7 @@ const RT = z.toObjectSet([
|
|
|
13692
13692
|
i = o.indexOf(":"), n = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!n || t[n] && RT[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
13693
13693
|
}), t;
|
|
13694
13694
|
}, Qd = Symbol("internals");
|
|
13695
|
-
function
|
|
13695
|
+
function io(e) {
|
|
13696
13696
|
return e && String(e).trim().toLowerCase();
|
|
13697
13697
|
}
|
|
13698
13698
|
function na(e) {
|
|
@@ -13737,7 +13737,7 @@ let yn = class {
|
|
|
13737
13737
|
set(t, n, r) {
|
|
13738
13738
|
const i = this;
|
|
13739
13739
|
function s(c, a, u) {
|
|
13740
|
-
const f =
|
|
13740
|
+
const f = io(a);
|
|
13741
13741
|
if (!f)
|
|
13742
13742
|
throw new Error("header name must be a non-empty string");
|
|
13743
13743
|
const l = z.findKey(i, f);
|
|
@@ -13761,7 +13761,7 @@ let yn = class {
|
|
|
13761
13761
|
return this;
|
|
13762
13762
|
}
|
|
13763
13763
|
get(t, n) {
|
|
13764
|
-
if (t =
|
|
13764
|
+
if (t = io(t), t) {
|
|
13765
13765
|
const r = z.findKey(this, t);
|
|
13766
13766
|
if (r) {
|
|
13767
13767
|
const i = this[r];
|
|
@@ -13778,7 +13778,7 @@ let yn = class {
|
|
|
13778
13778
|
}
|
|
13779
13779
|
}
|
|
13780
13780
|
has(t, n) {
|
|
13781
|
-
if (t =
|
|
13781
|
+
if (t = io(t), t) {
|
|
13782
13782
|
const r = z.findKey(this, t);
|
|
13783
13783
|
return !!(r && this[r] !== void 0 && (!n || Zu(this, this[r], r, n)));
|
|
13784
13784
|
}
|
|
@@ -13788,7 +13788,7 @@ let yn = class {
|
|
|
13788
13788
|
const r = this;
|
|
13789
13789
|
let i = !1;
|
|
13790
13790
|
function s(o) {
|
|
13791
|
-
if (o =
|
|
13791
|
+
if (o = io(o), o) {
|
|
13792
13792
|
const c = z.findKey(r, o);
|
|
13793
13793
|
c && (!n || Zu(r, r[c], c, n)) && (delete r[c], i = !0);
|
|
13794
13794
|
}
|
|
@@ -13850,7 +13850,7 @@ let yn = class {
|
|
|
13850
13850
|
accessors: {}
|
|
13851
13851
|
}).accessors, i = this.prototype;
|
|
13852
13852
|
function s(o) {
|
|
13853
|
-
const c =
|
|
13853
|
+
const c = io(o);
|
|
13854
13854
|
r[c] || (MT(i, o), r[c] = !0);
|
|
13855
13855
|
}
|
|
13856
13856
|
return z.isArray(t) ? t.forEach(s) : s(t), this;
|
|
@@ -13868,7 +13868,7 @@ z.reduceDescriptors(yn.prototype, ({ value: e }, t) => {
|
|
|
13868
13868
|
});
|
|
13869
13869
|
z.freezeMethods(yn);
|
|
13870
13870
|
function Ju(e, t) {
|
|
13871
|
-
const n = this ||
|
|
13871
|
+
const n = this || mc, r = t || n, i = yn.from(r.headers);
|
|
13872
13872
|
let s = r.data;
|
|
13873
13873
|
return z.forEach(e, function(c) {
|
|
13874
13874
|
s = c.call(n, s, i.normalize(), t ? t.status : void 0);
|
|
@@ -13877,10 +13877,10 @@ function Ju(e, t) {
|
|
|
13877
13877
|
function Qm(e) {
|
|
13878
13878
|
return !!(e && e.__CANCEL__);
|
|
13879
13879
|
}
|
|
13880
|
-
function
|
|
13880
|
+
function Ws(e, t, n) {
|
|
13881
13881
|
ke.call(this, e ?? "canceled", ke.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
13882
13882
|
}
|
|
13883
|
-
z.inherits(
|
|
13883
|
+
z.inherits(Ws, ke, {
|
|
13884
13884
|
__CANCEL__: !0
|
|
13885
13885
|
});
|
|
13886
13886
|
function ew(e, t, n) {
|
|
@@ -14125,7 +14125,7 @@ const nw = (e) => {
|
|
|
14125
14125
|
}, s === void 0 && o.setContentType(null), "setRequestHeader" in E && z.forEach(o.toJSON(), function(T, O) {
|
|
14126
14126
|
E.setRequestHeader(O, T);
|
|
14127
14127
|
}), z.isUndefined(i.withCredentials) || (E.withCredentials = !!i.withCredentials), c && c !== "json" && (E.responseType = i.responseType), u && ([d, g] = xa(u, !0), E.addEventListener("progress", d)), a && E.upload && ([l, y] = xa(a), E.upload.addEventListener("progress", l), E.upload.addEventListener("loadend", y)), (i.cancelToken || i.signal) && (f = (w) => {
|
|
14128
|
-
E && (r(!w || w.type ? new
|
|
14128
|
+
E && (r(!w || w.type ? new Ws(null, e, E) : w), E.abort(), E = null);
|
|
14129
14129
|
}, i.cancelToken && i.cancelToken.subscribe(f), i.signal && (i.signal.aborted ? f() : i.signal.addEventListener("abort", f)));
|
|
14130
14130
|
const S = qT(i.url);
|
|
14131
14131
|
if (S && jt.protocols.indexOf(S) === -1) {
|
|
@@ -14142,7 +14142,7 @@ const nw = (e) => {
|
|
|
14142
14142
|
if (!i) {
|
|
14143
14143
|
i = !0, c();
|
|
14144
14144
|
const f = u instanceof Error ? u : this.reason;
|
|
14145
|
-
r.abort(f instanceof ke ? f : new
|
|
14145
|
+
r.abort(f instanceof ke ? f : new Ws(f instanceof Error ? f.message : f));
|
|
14146
14146
|
}
|
|
14147
14147
|
};
|
|
14148
14148
|
let o = t && setTimeout(() => {
|
|
@@ -14389,13 +14389,13 @@ const s0 = (e) => `- ${e}`, rx = (e) => z.isFunction(e) || e === null || e === !
|
|
|
14389
14389
|
};
|
|
14390
14390
|
function Qu(e) {
|
|
14391
14391
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
14392
|
-
throw new
|
|
14392
|
+
throw new Ws(null, e);
|
|
14393
14393
|
}
|
|
14394
14394
|
function o0(e) {
|
|
14395
14395
|
return Qu(e), e.headers = yn.from(e.headers), e.data = Ju.call(
|
|
14396
14396
|
e,
|
|
14397
14397
|
e.transformRequest
|
|
14398
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), sw.getAdapter(e.adapter ||
|
|
14398
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), sw.getAdapter(e.adapter || mc.adapter)(e).then(function(r) {
|
|
14399
14399
|
return Qu(e), r.data = Ju.call(
|
|
14400
14400
|
e,
|
|
14401
14401
|
e.transformResponse,
|
|
@@ -14606,7 +14606,7 @@ let sx = class cw {
|
|
|
14606
14606
|
r.unsubscribe(s);
|
|
14607
14607
|
}, o;
|
|
14608
14608
|
}, t(function(s, o, c) {
|
|
14609
|
-
r.reason || (r.reason = new
|
|
14609
|
+
r.reason || (r.reason = new Ws(s, o, c), n(r.reason));
|
|
14610
14610
|
});
|
|
14611
14611
|
}
|
|
14612
14612
|
/**
|
|
@@ -14737,9 +14737,9 @@ function aw(e) {
|
|
|
14737
14737
|
return aw(zi(e, i));
|
|
14738
14738
|
}, n;
|
|
14739
14739
|
}
|
|
14740
|
-
const dt = aw(
|
|
14740
|
+
const dt = aw(mc);
|
|
14741
14741
|
dt.Axios = Vi;
|
|
14742
|
-
dt.CanceledError =
|
|
14742
|
+
dt.CanceledError = Ws;
|
|
14743
14743
|
dt.CancelToken = sx;
|
|
14744
14744
|
dt.isCancel = Qm;
|
|
14745
14745
|
dt.VERSION = ow;
|
|
@@ -14810,10 +14810,10 @@ var a0;
|
|
|
14810
14810
|
(function(e) {
|
|
14811
14811
|
e[e.SysFatal = 1] = "SysFatal", e[e.SysTransient = 2] = "SysTransient", e[e.DestinationInvalid = 3] = "DestinationInvalid", e[e.CanisterReject = 4] = "CanisterReject", e[e.CanisterError = 5] = "CanisterError";
|
|
14812
14812
|
})(a0 || (a0 = {}));
|
|
14813
|
-
var
|
|
14813
|
+
var Fs;
|
|
14814
14814
|
(function(e) {
|
|
14815
14815
|
e.Replied = "replied", e.Rejected = "rejected";
|
|
14816
|
-
})(
|
|
14816
|
+
})(Fs || (Fs = {}));
|
|
14817
14817
|
function ux(e) {
|
|
14818
14818
|
return e != null && "reject_code" in e;
|
|
14819
14819
|
}
|
|
@@ -14887,9 +14887,9 @@ class gt extends es {
|
|
|
14887
14887
|
super(t, Pr.Protocol), this.name = "ProtocolError", Object.setPrototypeOf(this, gt.prototype);
|
|
14888
14888
|
}
|
|
14889
14889
|
}
|
|
14890
|
-
class
|
|
14890
|
+
class xs extends es {
|
|
14891
14891
|
constructor(t) {
|
|
14892
|
-
super(t, Pr.Reject), this.name = "RejectError", Object.setPrototypeOf(this,
|
|
14892
|
+
super(t, Pr.Reject), this.name = "RejectError", Object.setPrototypeOf(this, xs.prototype);
|
|
14893
14893
|
}
|
|
14894
14894
|
}
|
|
14895
14895
|
class va extends es {
|
|
@@ -14912,18 +14912,18 @@ class fn extends es {
|
|
|
14912
14912
|
super(t, Pr.Unknown), this.name = "UnknownError", Object.setPrototypeOf(this, fn.prototype);
|
|
14913
14913
|
}
|
|
14914
14914
|
}
|
|
14915
|
-
class
|
|
14915
|
+
class As extends Ue {
|
|
14916
14916
|
constructor(t, n) {
|
|
14917
|
-
super(), this.reason = t, this.error = n, this.name = "CertificateVerificationErrorCode", Object.setPrototypeOf(this,
|
|
14917
|
+
super(), this.reason = t, this.error = n, this.name = "CertificateVerificationErrorCode", Object.setPrototypeOf(this, As.prototype);
|
|
14918
14918
|
}
|
|
14919
14919
|
toErrorMessage() {
|
|
14920
14920
|
let t = this.reason;
|
|
14921
|
-
return this.error && (t += `: ${
|
|
14921
|
+
return this.error && (t += `: ${bc(this.error)}`), `Certificate verification error: "${t}"`;
|
|
14922
14922
|
}
|
|
14923
14923
|
}
|
|
14924
|
-
class
|
|
14924
|
+
class Fo extends Ue {
|
|
14925
14925
|
constructor(t, n, r, i, s) {
|
|
14926
|
-
super(), this.maxAgeInMinutes = t, this.certificateTime = n, this.currentTime = r, this.timeDiffMsecs = i, this.ageType = s, this.name = "CertificateTimeErrorCode", Object.setPrototypeOf(this,
|
|
14926
|
+
super(), this.maxAgeInMinutes = t, this.certificateTime = n, this.currentTime = r, this.timeDiffMsecs = i, this.ageType = s, this.name = "CertificateTimeErrorCode", Object.setPrototypeOf(this, Fo.prototype);
|
|
14927
14927
|
}
|
|
14928
14928
|
toErrorMessage() {
|
|
14929
14929
|
return `Certificate is signed more than ${this.maxAgeInMinutes} minutes in the ${this.ageType}. Certificate time: ${this.certificateTime.toISOString()} Current time: ${this.currentTime.toISOString()} Clock drift: ${this.timeDiffMsecs}ms`;
|
|
@@ -14945,9 +14945,9 @@ class hu extends Ue {
|
|
|
14945
14945
|
return `The certificate contains a delegation that does not include the canister ${this.canisterId.toText()} in the canister_ranges field. Subnet ID: ${this.subnetId.toText()}`;
|
|
14946
14946
|
}
|
|
14947
14947
|
}
|
|
14948
|
-
class
|
|
14948
|
+
class Ms extends Ue {
|
|
14949
14949
|
constructor(t, n) {
|
|
14950
|
-
super(), this.message = t, this.lookupStatus = n, this.name = "LookupErrorCode", Object.setPrototypeOf(this,
|
|
14950
|
+
super(), this.message = t, this.lookupStatus = n, this.name = "LookupErrorCode", Object.setPrototypeOf(this, Ms.prototype);
|
|
14951
14951
|
}
|
|
14952
14952
|
toErrorMessage() {
|
|
14953
14953
|
return `${this.message}. Lookup status: ${this.lookupStatus}`;
|
|
@@ -15014,7 +15014,7 @@ class Ql extends Ue {
|
|
|
15014
15014
|
super(), this.error = t, this.input = n, this.name = "CborDecodeErrorCode", Object.setPrototypeOf(this, Ql.prototype);
|
|
15015
15015
|
}
|
|
15016
15016
|
toErrorMessage() {
|
|
15017
|
-
return `Failed to decode CBOR: ${
|
|
15017
|
+
return `Failed to decode CBOR: ${bc(this.error)}, input: ${it(this.input)}`;
|
|
15018
15018
|
}
|
|
15019
15019
|
}
|
|
15020
15020
|
class eh extends Ue {
|
|
@@ -15022,12 +15022,12 @@ class eh extends Ue {
|
|
|
15022
15022
|
super(), this.error = t, this.value = n, this.name = "CborEncodeErrorCode", Object.setPrototypeOf(this, eh.prototype);
|
|
15023
15023
|
}
|
|
15024
15024
|
toErrorMessage() {
|
|
15025
|
-
return `Failed to encode CBOR: ${
|
|
15025
|
+
return `Failed to encode CBOR: ${bc(this.error)}, input: ${this.value}`;
|
|
15026
15026
|
}
|
|
15027
15027
|
}
|
|
15028
|
-
class
|
|
15028
|
+
class Mo extends Ue {
|
|
15029
15029
|
constructor(t, n, r) {
|
|
15030
|
-
super(), this.message = t, this.requestId = n, this.status = r, this.name = "TimeoutWaitingForResponseErrorCode", Object.setPrototypeOf(this,
|
|
15030
|
+
super(), this.message = t, this.requestId = n, this.status = r, this.name = "TimeoutWaitingForResponseErrorCode", Object.setPrototypeOf(this, Mo.prototype);
|
|
15031
15031
|
}
|
|
15032
15032
|
toErrorMessage() {
|
|
15033
15033
|
let t = `${this.message}
|
|
@@ -15097,9 +15097,9 @@ class ih extends Ue {
|
|
|
15097
15097
|
`;
|
|
15098
15098
|
}
|
|
15099
15099
|
}
|
|
15100
|
-
class
|
|
15100
|
+
class Xs extends Ue {
|
|
15101
15101
|
constructor(t) {
|
|
15102
|
-
super(), this.shouldFetchRootKey = t, this.name = "MissingRootKeyErrorCode", Object.setPrototypeOf(this,
|
|
15102
|
+
super(), this.shouldFetchRootKey = t, this.name = "MissingRootKeyErrorCode", Object.setPrototypeOf(this, Xs.prototype);
|
|
15103
15103
|
}
|
|
15104
15104
|
toErrorMessage() {
|
|
15105
15105
|
return this.shouldFetchRootKey === void 0 ? "Agent is missing root key" : `Agent is missing root key and the shouldFetchRootKey value is set to ${this.shouldFetchRootKey}. The root key should only be unknown if you are in local development. Otherwise you should avoid fetching and use the default IC Root Key or the known root key of your environment.`;
|
|
@@ -15113,9 +15113,9 @@ class sh extends Ue {
|
|
|
15113
15113
|
return `Attempt to hash a value of unsupported type: ${this.value}`;
|
|
15114
15114
|
}
|
|
15115
15115
|
}
|
|
15116
|
-
class
|
|
15116
|
+
class vo extends Ue {
|
|
15117
15117
|
constructor(t) {
|
|
15118
|
-
super(), this.error = t, this.name = "HttpDefaultFetchErrorCode", Object.setPrototypeOf(this,
|
|
15118
|
+
super(), this.error = t, this.name = "HttpDefaultFetchErrorCode", Object.setPrototypeOf(this, vo.prototype);
|
|
15119
15119
|
}
|
|
15120
15120
|
toErrorMessage() {
|
|
15121
15121
|
return this.error;
|
|
@@ -15129,9 +15129,9 @@ class Pi extends Ue {
|
|
|
15129
15129
|
return "This identity has expired due this application's security policy. Please refresh your authentication.";
|
|
15130
15130
|
}
|
|
15131
15131
|
}
|
|
15132
|
-
class
|
|
15132
|
+
class ws extends Ue {
|
|
15133
15133
|
constructor(t, n) {
|
|
15134
|
-
super(), this.message = t, this.providedIngressExpiryInMinutes = n, this.name = "IngressExpiryInvalidErrorCode", Object.setPrototypeOf(this,
|
|
15134
|
+
super(), this.message = t, this.providedIngressExpiryInMinutes = n, this.name = "IngressExpiryInvalidErrorCode", Object.setPrototypeOf(this, ws.prototype);
|
|
15135
15135
|
}
|
|
15136
15136
|
toErrorMessage() {
|
|
15137
15137
|
return `${this.message}. Provided ingress expiry time is ${this.providedIngressExpiryInMinutes} minutes.`;
|
|
@@ -15182,12 +15182,12 @@ class $n extends Ue {
|
|
|
15182
15182
|
super(), this.error = t, this.name = "UnexpectedErrorCode", Object.setPrototypeOf(this, $n.prototype);
|
|
15183
15183
|
}
|
|
15184
15184
|
toErrorMessage() {
|
|
15185
|
-
return `Unexpected error: ${
|
|
15185
|
+
return `Unexpected error: ${bc(this.error)}`;
|
|
15186
15186
|
}
|
|
15187
15187
|
}
|
|
15188
|
-
class
|
|
15188
|
+
class wc extends Ue {
|
|
15189
15189
|
constructor(t) {
|
|
15190
|
-
super(), this.error = t, this.name = "HashTreeDecodeErrorCode", Object.setPrototypeOf(this,
|
|
15190
|
+
super(), this.error = t, this.name = "HashTreeDecodeErrorCode", Object.setPrototypeOf(this, wc.prototype);
|
|
15191
15191
|
}
|
|
15192
15192
|
toErrorMessage() {
|
|
15193
15193
|
return `Failed to decode certificate: ${this.error}`;
|
|
@@ -15219,7 +15219,7 @@ class Ba extends Ue {
|
|
|
15219
15219
|
super(), this.error = t, this.name = "HttpFetchErrorCode", Object.setPrototypeOf(this, Ba.prototype);
|
|
15220
15220
|
}
|
|
15221
15221
|
toErrorMessage() {
|
|
15222
|
-
return `Failed to fetch HTTP request: ${
|
|
15222
|
+
return `Failed to fetch HTTP request: ${bc(this.error)}`;
|
|
15223
15223
|
}
|
|
15224
15224
|
}
|
|
15225
15225
|
class Na extends Ue {
|
|
@@ -15246,7 +15246,7 @@ class ka extends Ue {
|
|
|
15246
15246
|
return `Failed to deserialize expiry: ${this.error}`;
|
|
15247
15247
|
}
|
|
15248
15248
|
}
|
|
15249
|
-
function
|
|
15249
|
+
function bc(e) {
|
|
15250
15250
|
if (e instanceof Error)
|
|
15251
15251
|
return e.stack ?? e.message;
|
|
15252
15252
|
try {
|
|
@@ -15255,7 +15255,7 @@ function wc(e) {
|
|
|
15255
15255
|
return String(e);
|
|
15256
15256
|
}
|
|
15257
15257
|
}
|
|
15258
|
-
const
|
|
15258
|
+
const vs = new Error("unreachable");
|
|
15259
15259
|
function Pa(e) {
|
|
15260
15260
|
if (!e)
|
|
15261
15261
|
throw new Error("Input cannot be null or undefined");
|
|
@@ -15329,7 +15329,7 @@ const fw = 55799, lw = Symbol("CBOR_STOP_CODE");
|
|
|
15329
15329
|
var Dn = /* @__PURE__ */ ((e) => (e[e.False = 20] = "False", e[e.True = 21] = "True", e[e.Null = 22] = "Null", e[e.Undefined = 23] = "Undefined", e[e.Break = 31] = "Break", e))(Dn || {}), xt = /* @__PURE__ */ ((e) => (e[e.UnsignedInteger = 0] = "UnsignedInteger", e[e.NegativeInteger = 1] = "NegativeInteger", e[e.ByteString = 2] = "ByteString", e[e.TextString = 3] = "TextString", e[e.Array = 4] = "Array", e[e.Map = 5] = "Map", e[e.Tag = 6] = "Tag", e[e.Simple = 7] = "Simple", e))(xt || {});
|
|
15330
15330
|
const hx = 23, dx = 255, px = 65535, yx = 4294967295, gx = BigInt("0xffffffffffffffff");
|
|
15331
15331
|
var Vn = /* @__PURE__ */ ((e) => (e[e.Value = 23] = "Value", e[e.OneByte = 24] = "OneByte", e[e.TwoBytes = 25] = "TwoBytes", e[e.FourBytes = 26] = "FourBytes", e[e.EightBytes = 27] = "EightBytes", e[e.Indefinite = 31] = "Indefinite", e))(Vn || {});
|
|
15332
|
-
const
|
|
15332
|
+
const Is = !1;
|
|
15333
15333
|
function mx(e) {
|
|
15334
15334
|
return e == null;
|
|
15335
15335
|
}
|
|
@@ -15344,9 +15344,9 @@ function bx(e) {
|
|
|
15344
15344
|
function Ex(e) {
|
|
15345
15345
|
return e & 31;
|
|
15346
15346
|
}
|
|
15347
|
-
let
|
|
15347
|
+
let qo = new Uint8Array(), so, jn = 0;
|
|
15348
15348
|
function _x(e, t) {
|
|
15349
|
-
|
|
15349
|
+
qo = e, jn = 0;
|
|
15350
15350
|
const n = $i();
|
|
15351
15351
|
return t?.(n) ?? n;
|
|
15352
15352
|
}
|
|
@@ -15354,7 +15354,7 @@ function $i(e) {
|
|
|
15354
15354
|
const [t, n] = ia();
|
|
15355
15355
|
switch (t) {
|
|
15356
15356
|
case xt.UnsignedInteger:
|
|
15357
|
-
return
|
|
15357
|
+
return zs(n);
|
|
15358
15358
|
case xt.NegativeInteger:
|
|
15359
15359
|
return Ax(n);
|
|
15360
15360
|
case xt.ByteString:
|
|
@@ -15373,14 +15373,14 @@ function $i(e) {
|
|
|
15373
15373
|
throw new ts(`Unsupported major type: ${t}`);
|
|
15374
15374
|
}
|
|
15375
15375
|
function ia() {
|
|
15376
|
-
const e =
|
|
15376
|
+
const e = qo.at(jn);
|
|
15377
15377
|
if (mx(e))
|
|
15378
15378
|
throw new ts("Provided CBOR data is empty");
|
|
15379
15379
|
const t = bx(e), n = Ex(e);
|
|
15380
15380
|
return jn++, [t, n];
|
|
15381
15381
|
}
|
|
15382
15382
|
function Sx(e, t) {
|
|
15383
|
-
const n =
|
|
15383
|
+
const n = zs(e);
|
|
15384
15384
|
if (n === 1 / 0) {
|
|
15385
15385
|
const i = [];
|
|
15386
15386
|
let s = $i();
|
|
@@ -15411,7 +15411,7 @@ function Tx(e) {
|
|
|
15411
15411
|
throw new ts(`Unrecognized simple type: ${e.toString(2)}`);
|
|
15412
15412
|
}
|
|
15413
15413
|
function xx(e, t) {
|
|
15414
|
-
const n =
|
|
15414
|
+
const n = zs(e), r = {};
|
|
15415
15415
|
if (n === 1 / 0) {
|
|
15416
15416
|
let [i, s] = ia();
|
|
15417
15417
|
for (; i !== xt.Simple && s !== Dn.Break; ) {
|
|
@@ -15429,18 +15429,18 @@ function xx(e, t) {
|
|
|
15429
15429
|
}
|
|
15430
15430
|
return r;
|
|
15431
15431
|
}
|
|
15432
|
-
function
|
|
15432
|
+
function zs(e) {
|
|
15433
15433
|
if (e <= Vn.Value)
|
|
15434
15434
|
return e;
|
|
15435
|
-
switch (
|
|
15435
|
+
switch (so = new DataView(qo.buffer, qo.byteOffset + jn), e) {
|
|
15436
15436
|
case Vn.OneByte:
|
|
15437
|
-
return jn++,
|
|
15437
|
+
return jn++, so.getUint8(0);
|
|
15438
15438
|
case Vn.TwoBytes:
|
|
15439
|
-
return jn += 2,
|
|
15439
|
+
return jn += 2, so.getUint16(0, Is);
|
|
15440
15440
|
case Vn.FourBytes:
|
|
15441
|
-
return jn += 4,
|
|
15441
|
+
return jn += 4, so.getUint32(0, Is);
|
|
15442
15442
|
case Vn.EightBytes:
|
|
15443
|
-
return jn += 8,
|
|
15443
|
+
return jn += 8, so.getBigUint64(0, Is);
|
|
15444
15444
|
case Vn.Indefinite:
|
|
15445
15445
|
return 1 / 0;
|
|
15446
15446
|
default:
|
|
@@ -15448,22 +15448,22 @@ function Xs(e) {
|
|
|
15448
15448
|
}
|
|
15449
15449
|
}
|
|
15450
15450
|
function Ax(e) {
|
|
15451
|
-
const t =
|
|
15451
|
+
const t = zs(e);
|
|
15452
15452
|
return typeof t == "number" ? -1 - t : -1n - t;
|
|
15453
15453
|
}
|
|
15454
15454
|
function dw(e) {
|
|
15455
|
-
const t =
|
|
15455
|
+
const t = zs(e);
|
|
15456
15456
|
if (t > Number.MAX_SAFE_INTEGER)
|
|
15457
15457
|
throw new ts("Byte length is too large");
|
|
15458
15458
|
const n = Number(t);
|
|
15459
|
-
return jn += n,
|
|
15459
|
+
return jn += n, qo.slice(jn - n, jn);
|
|
15460
15460
|
}
|
|
15461
15461
|
function ol(e) {
|
|
15462
15462
|
const t = dw(e);
|
|
15463
15463
|
return wx.decode(t);
|
|
15464
15464
|
}
|
|
15465
15465
|
function vx(e, t) {
|
|
15466
|
-
const n =
|
|
15466
|
+
const n = zs(e);
|
|
15467
15467
|
if (n === fw)
|
|
15468
15468
|
return $i();
|
|
15469
15469
|
throw new ts(`Unsupported tag: ${n}.`);
|
|
@@ -15474,7 +15474,7 @@ class hh extends Error {
|
|
|
15474
15474
|
}
|
|
15475
15475
|
}
|
|
15476
15476
|
const Ix = 2 * 1024, Ox = 100, Bx = new TextEncoder();
|
|
15477
|
-
function
|
|
15477
|
+
function oo(e) {
|
|
15478
15478
|
return e << 5;
|
|
15479
15479
|
}
|
|
15480
15480
|
let bn = new Uint8Array(Ix), Mn = new DataView(bn.buffer), Tt = 0, tf = [];
|
|
@@ -15515,55 +15515,55 @@ function dh(e, t) {
|
|
|
15515
15515
|
throw new hh(`Unsupported type: ${typeof e}`);
|
|
15516
15516
|
}
|
|
15517
15517
|
function kx(e, t) {
|
|
15518
|
-
|
|
15518
|
+
Ys(xt.Array, e.length), e.forEach((n, r) => {
|
|
15519
15519
|
dh(t?.(n, r.toString()) ?? n, t);
|
|
15520
15520
|
});
|
|
15521
15521
|
}
|
|
15522
15522
|
function Px(e, t) {
|
|
15523
|
-
tf = Object.entries(e),
|
|
15523
|
+
tf = Object.entries(e), Ys(xt.Map, tf.length), tf.forEach(([n, r]) => {
|
|
15524
15524
|
gw(n), dh(t?.(r, n) ?? r, t);
|
|
15525
15525
|
});
|
|
15526
15526
|
}
|
|
15527
|
-
function
|
|
15527
|
+
function Ys(e, t) {
|
|
15528
15528
|
if (t <= hx) {
|
|
15529
15529
|
Mn.setUint8(
|
|
15530
15530
|
Tt++,
|
|
15531
|
-
|
|
15531
|
+
oo(e) | Number(t)
|
|
15532
15532
|
);
|
|
15533
15533
|
return;
|
|
15534
15534
|
}
|
|
15535
15535
|
if (t <= dx) {
|
|
15536
15536
|
Mn.setUint8(
|
|
15537
15537
|
Tt++,
|
|
15538
|
-
|
|
15538
|
+
oo(e) | Vn.OneByte
|
|
15539
15539
|
), Mn.setUint8(Tt, Number(t)), Tt += 1;
|
|
15540
15540
|
return;
|
|
15541
15541
|
}
|
|
15542
15542
|
if (t <= px) {
|
|
15543
15543
|
Mn.setUint8(
|
|
15544
15544
|
Tt++,
|
|
15545
|
-
|
|
15546
|
-
), Mn.setUint16(Tt, Number(t),
|
|
15545
|
+
oo(e) | Vn.TwoBytes
|
|
15546
|
+
), Mn.setUint16(Tt, Number(t), Is), Tt += 2;
|
|
15547
15547
|
return;
|
|
15548
15548
|
}
|
|
15549
15549
|
if (t <= yx) {
|
|
15550
15550
|
Mn.setUint8(
|
|
15551
15551
|
Tt++,
|
|
15552
|
-
|
|
15553
|
-
), Mn.setUint32(Tt, Number(t),
|
|
15552
|
+
oo(e) | Vn.FourBytes
|
|
15553
|
+
), Mn.setUint32(Tt, Number(t), Is), Tt += 4;
|
|
15554
15554
|
return;
|
|
15555
15555
|
}
|
|
15556
15556
|
if (t <= gx) {
|
|
15557
15557
|
Mn.setUint8(
|
|
15558
15558
|
Tt++,
|
|
15559
|
-
|
|
15560
|
-
), Mn.setBigUint64(Tt, BigInt(t),
|
|
15559
|
+
oo(e) | Vn.EightBytes
|
|
15560
|
+
), Mn.setBigUint64(Tt, BigInt(t), Is), Tt += 8;
|
|
15561
15561
|
return;
|
|
15562
15562
|
}
|
|
15563
15563
|
throw new hh(`Value too large to encode: ${t}`);
|
|
15564
15564
|
}
|
|
15565
15565
|
function Rx(e) {
|
|
15566
|
-
|
|
15566
|
+
Ys(xt.Simple, Ux(e));
|
|
15567
15567
|
}
|
|
15568
15568
|
function Ux(e) {
|
|
15569
15569
|
if (e === !1)
|
|
@@ -15577,10 +15577,10 @@ function Ux(e) {
|
|
|
15577
15577
|
throw new hh(`Unrecognized simple value: ${e.toString()}`);
|
|
15578
15578
|
}
|
|
15579
15579
|
function pw(e, t) {
|
|
15580
|
-
|
|
15580
|
+
Ys(e, t.length), Tt > bn.length - t.length && (bn = hw(bn, bn.length + t.length), Mn = new DataView(bn.buffer)), bn.set(t, Tt), Tt += t.length;
|
|
15581
15581
|
}
|
|
15582
15582
|
function yw(e, t) {
|
|
15583
|
-
|
|
15583
|
+
Ys(e, t);
|
|
15584
15584
|
}
|
|
15585
15585
|
function Cx(e) {
|
|
15586
15586
|
yw(xt.UnsignedInteger, e);
|
|
@@ -15601,14 +15601,14 @@ function f0(e) {
|
|
|
15601
15601
|
pw(xt.ByteString, e);
|
|
15602
15602
|
}
|
|
15603
15603
|
function Mx(e, t, n) {
|
|
15604
|
-
|
|
15604
|
+
Ys(xt.Tag, e), dh(t, n);
|
|
15605
15605
|
}
|
|
15606
15606
|
function qx(e) {
|
|
15607
15607
|
return typeof e == "object" && e !== null && "toCborValue" in e;
|
|
15608
15608
|
}
|
|
15609
15609
|
function nf(e) {
|
|
15610
15610
|
try {
|
|
15611
|
-
return Nx(e, (t) => Ke.isPrincipal(t) ? t.toUint8Array() :
|
|
15611
|
+
return Nx(e, (t) => Ke.isPrincipal(t) ? t.toUint8Array() : Os.isExpiry(t) ? t.toBigInt() : qx(t) ? t.toCborValue() : t);
|
|
15612
15612
|
} catch (t) {
|
|
15613
15613
|
throw et.fromCode(new eh(t, e));
|
|
15614
15614
|
}
|
|
@@ -15620,7 +15620,7 @@ function rr(e) {
|
|
|
15620
15620
|
throw et.fromCode(new Ql(t, e));
|
|
15621
15621
|
}
|
|
15622
15622
|
}
|
|
15623
|
-
const
|
|
15623
|
+
const Fc = () => {
|
|
15624
15624
|
if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
|
|
15625
15625
|
const e = new Uint32Array(1);
|
|
15626
15626
|
return window.crypto.getRandomValues(e), e[0];
|
|
@@ -15639,22 +15639,22 @@ var cl;
|
|
|
15639
15639
|
(function(e) {
|
|
15640
15640
|
e.Call = "call";
|
|
15641
15641
|
})(cl || (cl = {}));
|
|
15642
|
-
var
|
|
15642
|
+
var Lo;
|
|
15643
15643
|
(function(e) {
|
|
15644
15644
|
e.Query = "query", e.ReadState = "read_state";
|
|
15645
|
-
})(
|
|
15645
|
+
})(Lo || (Lo = {}));
|
|
15646
15646
|
function al() {
|
|
15647
|
-
const e = new ArrayBuffer(16), t = new DataView(e), n =
|
|
15647
|
+
const e = new ArrayBuffer(16), t = new DataView(e), n = Fc(), r = Fc(), i = Fc(), s = Fc();
|
|
15648
15648
|
return t.setUint32(0, n), t.setUint32(4, r), t.setUint32(8, i), t.setUint32(12, s), Object.assign(new Uint8Array(e), { __nonce__: void 0 });
|
|
15649
15649
|
}
|
|
15650
|
-
const
|
|
15650
|
+
const Mc = "__expiry__", ph = BigInt(1e3), Lx = BigInt(1e6), mw = BigInt(60), Vx = BigInt(90) * ph;
|
|
15651
15651
|
function ww(e) {
|
|
15652
15652
|
return e / ph;
|
|
15653
15653
|
}
|
|
15654
15654
|
function $x(e) {
|
|
15655
15655
|
return ww(e) / mw;
|
|
15656
15656
|
}
|
|
15657
|
-
class
|
|
15657
|
+
class Os {
|
|
15658
15658
|
constructor(t) {
|
|
15659
15659
|
this.__expiry__ = t, this._isExpiry = !0;
|
|
15660
15660
|
}
|
|
@@ -15669,7 +15669,7 @@ class Is {
|
|
|
15669
15669
|
static fromDeltaInMilliseconds(t, n = 0) {
|
|
15670
15670
|
const r = BigInt(t), i = BigInt(Date.now()) + r + BigInt(n);
|
|
15671
15671
|
let s;
|
|
15672
|
-
return r < Vx ? s = ww(i) : s = $x(i) * mw, new
|
|
15672
|
+
return r < Vx ? s = ww(i) : s = $x(i) * mw, new Os(s * ph * Lx);
|
|
15673
15673
|
}
|
|
15674
15674
|
toBigInt() {
|
|
15675
15675
|
return this.__expiry__;
|
|
@@ -15685,7 +15685,7 @@ class Is {
|
|
|
15685
15685
|
* @returns {JsonnableExpiry} a JSON object with a single key, {@link JSON_KEY_EXPIRY}, whose value is the expiry as a string
|
|
15686
15686
|
*/
|
|
15687
15687
|
toJSON() {
|
|
15688
|
-
return { [
|
|
15688
|
+
return { [Mc]: this.toString() };
|
|
15689
15689
|
}
|
|
15690
15690
|
/**
|
|
15691
15691
|
* Deserializes a {@link JsonnableExpiry} object from a JSON string.
|
|
@@ -15694,17 +15694,17 @@ class Is {
|
|
|
15694
15694
|
*/
|
|
15695
15695
|
static fromJSON(t) {
|
|
15696
15696
|
const n = JSON.parse(t);
|
|
15697
|
-
if (n[
|
|
15697
|
+
if (n[Mc])
|
|
15698
15698
|
try {
|
|
15699
|
-
const r = BigInt(n[
|
|
15700
|
-
return new
|
|
15699
|
+
const r = BigInt(n[Mc]);
|
|
15700
|
+
return new Os(r);
|
|
15701
15701
|
} catch (r) {
|
|
15702
15702
|
throw new et(new ka(`Not a valid BigInt: ${r}`));
|
|
15703
15703
|
}
|
|
15704
|
-
throw new et(new ka(`The input does not contain the key ${
|
|
15704
|
+
throw new et(new ka(`The input does not contain the key ${Mc}`));
|
|
15705
15705
|
}
|
|
15706
15706
|
static isExpiry(t) {
|
|
15707
|
-
return t instanceof
|
|
15707
|
+
return t instanceof Os || typeof t == "object" && t !== null && "_isExpiry" in t && t._isExpiry === !0 && "__expiry__" in t && typeof t.__expiry__ == "bigint";
|
|
15708
15708
|
}
|
|
15709
15709
|
}
|
|
15710
15710
|
function l0(e = al) {
|
|
@@ -15721,15 +15721,15 @@ function rf(e) {
|
|
|
15721
15721
|
}
|
|
15722
15722
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
15723
15723
|
const yh = /* @__PURE__ */ BigInt(0), Ua = /* @__PURE__ */ BigInt(1);
|
|
15724
|
-
function
|
|
15724
|
+
function Vo(e, t = "") {
|
|
15725
15725
|
if (typeof e != "boolean") {
|
|
15726
15726
|
const n = t && `"${t}"`;
|
|
15727
15727
|
throw new Error(n + "expected boolean, got type=" + typeof e);
|
|
15728
15728
|
}
|
|
15729
15729
|
return e;
|
|
15730
15730
|
}
|
|
15731
|
-
function
|
|
15732
|
-
const r =
|
|
15731
|
+
function Bs(e, t, n = "") {
|
|
15732
|
+
const r = cc(e), i = e?.length, s = t !== void 0;
|
|
15733
15733
|
if (!r || s && i !== t) {
|
|
15734
15734
|
const o = n && `"${n}" `, c = s ? ` of length ${t}` : "", a = r ? `length=${i}` : `type=${typeof e}`;
|
|
15735
15735
|
throw new Error(o + "expected Uint8Array" + c + ", got " + a);
|
|
@@ -15744,11 +15744,11 @@ function bw(e) {
|
|
|
15744
15744
|
function or(e) {
|
|
15745
15745
|
return bw(it(e));
|
|
15746
15746
|
}
|
|
15747
|
-
function
|
|
15747
|
+
function $o(e) {
|
|
15748
15748
|
return Nn(e), bw(it(Uint8Array.from(e).reverse()));
|
|
15749
15749
|
}
|
|
15750
15750
|
function Ct(e, t) {
|
|
15751
|
-
return
|
|
15751
|
+
return ac(e.toString(16).padStart(t * 2, "0"));
|
|
15752
15752
|
}
|
|
15753
15753
|
function Ew(e, t) {
|
|
15754
15754
|
return Ct(e, t).reverse();
|
|
@@ -15757,11 +15757,11 @@ function cn(e, t, n) {
|
|
|
15757
15757
|
let r;
|
|
15758
15758
|
if (typeof t == "string")
|
|
15759
15759
|
try {
|
|
15760
|
-
r =
|
|
15760
|
+
r = ac(t);
|
|
15761
15761
|
} catch (s) {
|
|
15762
15762
|
throw new Error(e + " must be hex string or Uint8Array, cause: " + s);
|
|
15763
15763
|
}
|
|
15764
|
-
else if (
|
|
15764
|
+
else if (cc(t))
|
|
15765
15765
|
r = Uint8Array.from(t);
|
|
15766
15766
|
else
|
|
15767
15767
|
throw new Error(e + " must be hex string or Uint8Array");
|
|
@@ -15781,7 +15781,7 @@ function d0(e, t, n, r) {
|
|
|
15781
15781
|
if (!_w(t, n, r))
|
|
15782
15782
|
throw new Error("expected valid " + e + ": " + n + " <= n < " + r + ", got " + t);
|
|
15783
15783
|
}
|
|
15784
|
-
function
|
|
15784
|
+
function Do(e) {
|
|
15785
15785
|
let t;
|
|
15786
15786
|
for (t = 0; e > yh; e >>= Ua, t += 1)
|
|
15787
15787
|
;
|
|
@@ -15794,7 +15794,7 @@ const ns = (e) => (Ua << BigInt(e)) - Ua;
|
|
|
15794
15794
|
function jx(e) {
|
|
15795
15795
|
return typeof e == "function" && Number.isSafeInteger(e.outputLen);
|
|
15796
15796
|
}
|
|
15797
|
-
function
|
|
15797
|
+
function Ec(e, t, n = {}) {
|
|
15798
15798
|
if (!e || typeof e != "object")
|
|
15799
15799
|
throw new Error("expected valid options object");
|
|
15800
15800
|
function r(i, s, o) {
|
|
@@ -15810,7 +15810,7 @@ function bc(e, t, n = {}) {
|
|
|
15810
15810
|
const Sw = () => {
|
|
15811
15811
|
throw new Error("not implemented");
|
|
15812
15812
|
};
|
|
15813
|
-
function
|
|
15813
|
+
function jo(e) {
|
|
15814
15814
|
const t = /* @__PURE__ */ new WeakMap();
|
|
15815
15815
|
return (n, ...r) => {
|
|
15816
15816
|
const i = t.get(n);
|
|
@@ -15931,7 +15931,7 @@ function Nw(e) {
|
|
|
15931
15931
|
BYTES: "number",
|
|
15932
15932
|
BITS: "number"
|
|
15933
15933
|
}, n = Zx.reduce((r, i) => (r[i] = "function", r), t);
|
|
15934
|
-
return
|
|
15934
|
+
return Ec(e, n), e;
|
|
15935
15935
|
}
|
|
15936
15936
|
function wu(e, t, n) {
|
|
15937
15937
|
if (n < hn)
|
|
@@ -16019,7 +16019,7 @@ function gi(e, t, n = !1, r = {}) {
|
|
|
16019
16019
|
}
|
|
16020
16020
|
if (d.length !== u)
|
|
16021
16021
|
throw new Error("Field.fromBytes: expected " + u + " bytes, got " + d.length);
|
|
16022
|
-
let g = n ?
|
|
16022
|
+
let g = n ? $o(d) : or(d);
|
|
16023
16023
|
if (o && (g = wt(g, e)), !y && !l.isValid(g))
|
|
16024
16024
|
throw new Error("invalid field element: outside of range 0..ORDER");
|
|
16025
16025
|
return g;
|
|
@@ -16046,11 +16046,11 @@ function Qx(e, t, n = !1) {
|
|
|
16046
16046
|
const r = e.length, i = kw(t), s = Pw(t);
|
|
16047
16047
|
if (r < 16 || r < s || r > 1024)
|
|
16048
16048
|
throw new Error("expected " + s + "-1024 bytes of input, got " + r);
|
|
16049
|
-
const o = n ?
|
|
16049
|
+
const o = n ? $o(e) : or(e), c = wt(o, t - Mt) + Mt;
|
|
16050
16050
|
return n ? Ew(c, i) : Ct(c, i);
|
|
16051
16051
|
}
|
|
16052
16052
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
16053
|
-
const
|
|
16053
|
+
const qs = BigInt(0), Mi = BigInt(1);
|
|
16054
16054
|
function Ha(e, t) {
|
|
16055
16055
|
const n = t.negate();
|
|
16056
16056
|
return e ? n : t;
|
|
@@ -16096,7 +16096,7 @@ function af(e) {
|
|
|
16096
16096
|
return Uw.get(e) || 1;
|
|
16097
16097
|
}
|
|
16098
16098
|
function g0(e) {
|
|
16099
|
-
if (e !==
|
|
16099
|
+
if (e !== qs)
|
|
16100
16100
|
throw new Error("invalid wNAF");
|
|
16101
16101
|
}
|
|
16102
16102
|
class Cw {
|
|
@@ -16107,7 +16107,7 @@ class Cw {
|
|
|
16107
16107
|
// non-const time multiplication ladder
|
|
16108
16108
|
_unsafeLadder(t, n, r = this.ZERO) {
|
|
16109
16109
|
let i = t;
|
|
16110
|
-
for (; n >
|
|
16110
|
+
for (; n > qs; )
|
|
16111
16111
|
n & Mi && (r = r.add(i)), i = i.double(), n >>= Mi;
|
|
16112
16112
|
return r;
|
|
16113
16113
|
}
|
|
@@ -16158,7 +16158,7 @@ class Cw {
|
|
|
16158
16158
|
*/
|
|
16159
16159
|
wNAFUnsafe(t, n, r, i = this.ZERO) {
|
|
16160
16160
|
const s = of(t, this.bits);
|
|
16161
|
-
for (let o = 0; o < s.windows && r !==
|
|
16161
|
+
for (let o = 0; o < s.windows && r !== qs; o++) {
|
|
16162
16162
|
const { nextN: c, offset: a, isZero: u, isNeg: f } = y0(r, o, s);
|
|
16163
16163
|
if (r = c, !u) {
|
|
16164
16164
|
const l = n[a];
|
|
@@ -16191,7 +16191,7 @@ class Cw {
|
|
|
16191
16191
|
}
|
|
16192
16192
|
function n3(e, t, n, r) {
|
|
16193
16193
|
let i = t, s = e.ZERO, o = e.ZERO;
|
|
16194
|
-
for (; n >
|
|
16194
|
+
for (; n > qs || r > qs; )
|
|
16195
16195
|
n & Mi && (s = s.add(i)), r & Mi && (o = o.add(i)), i = i.double(), n >>= Mi, r >>= Mi;
|
|
16196
16196
|
return { p1: s, p2: o };
|
|
16197
16197
|
}
|
|
@@ -16200,7 +16200,7 @@ function Hw(e, t, n, r) {
|
|
|
16200
16200
|
const i = n.length, s = r.length;
|
|
16201
16201
|
if (i !== s)
|
|
16202
16202
|
throw new Error("arrays of points and scalars must have equal length");
|
|
16203
|
-
const o = e.ZERO, c =
|
|
16203
|
+
const o = e.ZERO, c = Do(BigInt(i));
|
|
16204
16204
|
let a = 1;
|
|
16205
16205
|
c > 12 ? a = c - 3 : c > 4 ? a = c - 2 : c > 0 && (a = 2);
|
|
16206
16206
|
const u = ns(a), f = new Array(Number(u) + 1).fill(o), l = Math.floor((t.BITS - 1) / a) * a;
|
|
@@ -16233,7 +16233,7 @@ function Fw(e, t, n = {}, r) {
|
|
|
16233
16233
|
throw new Error(`expected valid ${e} CURVE object`);
|
|
16234
16234
|
for (const a of ["p", "n", "h"]) {
|
|
16235
16235
|
const u = t[a];
|
|
16236
|
-
if (!(typeof u == "bigint" && u >
|
|
16236
|
+
if (!(typeof u == "bigint" && u > qs))
|
|
16237
16237
|
throw new Error(`CURVE.${a} must be positive bigint`);
|
|
16238
16238
|
}
|
|
16239
16239
|
const i = m0(t.p, n.Fp, r), s = m0(t.n, n.Fn, r), c = ["Gx", "Gy", "a", e === "weierstrass" ? "b" : "d"];
|
|
@@ -16244,7 +16244,7 @@ function Fw(e, t, n = {}, r) {
|
|
|
16244
16244
|
}
|
|
16245
16245
|
const r3 = or;
|
|
16246
16246
|
function si(e, t) {
|
|
16247
|
-
if (
|
|
16247
|
+
if (Ko(e), Ko(t), e < 0 || e >= 1 << 8 * t)
|
|
16248
16248
|
throw new Error("invalid I2OSP input: " + e);
|
|
16249
16249
|
const n = Array.from({ length: t }).fill(0);
|
|
16250
16250
|
for (let r = t - 1; r >= 0; r--)
|
|
@@ -16257,17 +16257,17 @@ function i3(e, t) {
|
|
|
16257
16257
|
n[r] = e[r] ^ t[r];
|
|
16258
16258
|
return n;
|
|
16259
16259
|
}
|
|
16260
|
-
function
|
|
16260
|
+
function Ko(e) {
|
|
16261
16261
|
if (!Number.isSafeInteger(e))
|
|
16262
16262
|
throw new Error("number expected");
|
|
16263
16263
|
}
|
|
16264
16264
|
function Mw(e) {
|
|
16265
|
-
if (!
|
|
16265
|
+
if (!cc(e) && typeof e != "string")
|
|
16266
16266
|
throw new Error("DST must be Uint8Array or string");
|
|
16267
16267
|
return typeof e == "string" ? pt(e) : e;
|
|
16268
16268
|
}
|
|
16269
16269
|
function s3(e, t, n, r) {
|
|
16270
|
-
Nn(e),
|
|
16270
|
+
Nn(e), Ko(n), t = Mw(t), t.length > 255 && (t = r($e(pt("H2C-OVERSIZE-DST-"), t)));
|
|
16271
16271
|
const { outputLen: i, blockLen: s } = r, o = Math.ceil(n / i);
|
|
16272
16272
|
if (n > 65535 || o > 255)
|
|
16273
16273
|
throw new Error("expand_message_xmd: invalid lenInBytes");
|
|
@@ -16280,7 +16280,7 @@ function s3(e, t, n, r) {
|
|
|
16280
16280
|
return $e(...f).slice(0, n);
|
|
16281
16281
|
}
|
|
16282
16282
|
function o3(e, t, n, r, i) {
|
|
16283
|
-
if (Nn(e),
|
|
16283
|
+
if (Nn(e), Ko(n), t = Mw(t), t.length > 255) {
|
|
16284
16284
|
const s = Math.ceil(2 * r / 8);
|
|
16285
16285
|
t = i.create({ dkLen: s }).update(pt("H2C-OVERSIZE-DST-")).update(t).digest();
|
|
16286
16286
|
}
|
|
@@ -16289,7 +16289,7 @@ function o3(e, t, n, r, i) {
|
|
|
16289
16289
|
return i.create({ dkLen: n }).update(e).update(si(n, 2)).update(t).update(si(t.length, 1)).digest();
|
|
16290
16290
|
}
|
|
16291
16291
|
function uf(e, t, n) {
|
|
16292
|
-
|
|
16292
|
+
Ec(n, {
|
|
16293
16293
|
p: "bigint",
|
|
16294
16294
|
m: "number",
|
|
16295
16295
|
k: "number",
|
|
@@ -16298,7 +16298,7 @@ function uf(e, t, n) {
|
|
|
16298
16298
|
const { p: r, k: i, m: s, hash: o, expand: c, DST: a } = n;
|
|
16299
16299
|
if (!jx(n.hash))
|
|
16300
16300
|
throw new Error("expected valid hash");
|
|
16301
|
-
Nn(e),
|
|
16301
|
+
Nn(e), Ko(t);
|
|
16302
16302
|
const u = r.toString(2).length, f = Math.ceil((u + i) / 8), l = t * s * f;
|
|
16303
16303
|
let d;
|
|
16304
16304
|
if (c === "xmd")
|
|
@@ -16372,12 +16372,12 @@ function a3(e, t, n) {
|
|
|
16372
16372
|
let u = e - c * r - a * s, f = -c * i - a * o;
|
|
16373
16373
|
const l = u < qi, d = f < qi;
|
|
16374
16374
|
l && (u = -u), d && (f = -f);
|
|
16375
|
-
const y = ns(Math.ceil(
|
|
16375
|
+
const y = ns(Math.ceil(Do(n) / 2)) + Qt;
|
|
16376
16376
|
if (u < qi || u >= y || f < qi || f >= y)
|
|
16377
16377
|
throw new Error("splitScalar (endomorphism): failed, k=" + e);
|
|
16378
16378
|
return { k1neg: l, k1: u, k2neg: d, k2: f };
|
|
16379
16379
|
}
|
|
16380
|
-
const qi = BigInt(0), Qt = BigInt(1), mr = BigInt(2),
|
|
16380
|
+
const qi = BigInt(0), Qt = BigInt(1), mr = BigInt(2), bs = BigInt(3), ul = BigInt(4);
|
|
16381
16381
|
function Fa(e, t) {
|
|
16382
16382
|
const { BYTES: n } = e;
|
|
16383
16383
|
let r;
|
|
@@ -16399,7 +16399,7 @@ function u3(e, t = {}) {
|
|
|
16399
16399
|
const n = Fw("weierstrass", e, t), { Fp: r, Fn: i } = n;
|
|
16400
16400
|
let s = n.CURVE;
|
|
16401
16401
|
const { h: o, n: c } = s;
|
|
16402
|
-
|
|
16402
|
+
Ec(t, {}, {
|
|
16403
16403
|
allowInfinityPoint: "boolean",
|
|
16404
16404
|
clearCofactor: "function",
|
|
16405
16405
|
isTorsionFree: "function",
|
|
@@ -16418,7 +16418,7 @@ function u3(e, t = {}) {
|
|
|
16418
16418
|
}
|
|
16419
16419
|
function l(K, H, $) {
|
|
16420
16420
|
const { x: P, y: D } = H.toAffine(), F = r.toBytes(P);
|
|
16421
|
-
if (
|
|
16421
|
+
if (Vo($, "isCompressed"), $) {
|
|
16422
16422
|
f();
|
|
16423
16423
|
const x = !r.isOdd(D);
|
|
16424
16424
|
return $e(f3(x), F);
|
|
@@ -16426,7 +16426,7 @@ function u3(e, t = {}) {
|
|
|
16426
16426
|
return $e(Uint8Array.of(4), F, r.toBytes(D));
|
|
16427
16427
|
}
|
|
16428
16428
|
function d(K) {
|
|
16429
|
-
|
|
16429
|
+
Bs(K, void 0, "Point");
|
|
16430
16430
|
const { publicKey: H, publicKeyUncompressed: $ } = u, P = K.length, D = K[0], F = K.subarray(1);
|
|
16431
16431
|
if (P === H && (D === 2 || D === 3)) {
|
|
16432
16432
|
const x = r.fromBytes(F);
|
|
@@ -16462,7 +16462,7 @@ function u3(e, t = {}) {
|
|
|
16462
16462
|
}
|
|
16463
16463
|
if (!E(s.Gx, s.Gy))
|
|
16464
16464
|
throw new Error("bad curve params: generator point");
|
|
16465
|
-
const _ = r.mul(r.pow(s.a,
|
|
16465
|
+
const _ = r.mul(r.pow(s.a, bs), ul), S = r.mul(r.sqr(s.b), BigInt(27));
|
|
16466
16466
|
if (r.is0(r.add(_, S)))
|
|
16467
16467
|
throw new Error("bad curve params: a or b");
|
|
16468
16468
|
function w(K, H, $ = !1) {
|
|
@@ -16479,7 +16479,7 @@ function u3(e, t = {}) {
|
|
|
16479
16479
|
throw new Error("no endo");
|
|
16480
16480
|
return a3(K, a.basises, i.ORDER);
|
|
16481
16481
|
}
|
|
16482
|
-
const A =
|
|
16482
|
+
const A = jo((K, H) => {
|
|
16483
16483
|
const { X: $, Y: P, Z: D } = K;
|
|
16484
16484
|
if (r.eql(D, r.ONE))
|
|
16485
16485
|
return { x: $, y: P };
|
|
@@ -16491,7 +16491,7 @@ function u3(e, t = {}) {
|
|
|
16491
16491
|
if (!r.eql(q, r.ONE))
|
|
16492
16492
|
throw new Error("invZ was invalid");
|
|
16493
16493
|
return { x, y: B };
|
|
16494
|
-
}), R =
|
|
16494
|
+
}), R = jo((K) => {
|
|
16495
16495
|
if (K.is0()) {
|
|
16496
16496
|
if (t.allowInfinityPoint && !r.is0(K.Y))
|
|
16497
16497
|
return;
|
|
@@ -16527,7 +16527,7 @@ function u3(e, t = {}) {
|
|
|
16527
16527
|
return r.is0($) && r.is0(P) ? v.ZERO : new v($, P, r.ONE);
|
|
16528
16528
|
}
|
|
16529
16529
|
static fromBytes(H) {
|
|
16530
|
-
const $ = v.fromAffine(g(
|
|
16530
|
+
const $ = v.fromAffine(g(Bs(H, void 0, "point")));
|
|
16531
16531
|
return $.assertValidity(), $;
|
|
16532
16532
|
}
|
|
16533
16533
|
static fromHex(H) {
|
|
@@ -16546,7 +16546,7 @@ function u3(e, t = {}) {
|
|
|
16546
16546
|
* @returns
|
|
16547
16547
|
*/
|
|
16548
16548
|
precompute(H = 8, $ = !0) {
|
|
16549
|
-
return L.createCache(this, H), $ || this.multiply(
|
|
16549
|
+
return L.createCache(this, H), $ || this.multiply(bs), this;
|
|
16550
16550
|
}
|
|
16551
16551
|
// TODO: return `this`
|
|
16552
16552
|
/** A point on curve is valid if it conforms to equation. */
|
|
@@ -16574,7 +16574,7 @@ function u3(e, t = {}) {
|
|
|
16574
16574
|
// https://eprint.iacr.org/2015/1060, algorithm 3
|
|
16575
16575
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
16576
16576
|
double() {
|
|
16577
|
-
const { a: H, b: $ } = s, P = r.mul($,
|
|
16577
|
+
const { a: H, b: $ } = s, P = r.mul($, bs), { X: D, Y: F, Z: x } = this;
|
|
16578
16578
|
let B = r.ZERO, q = r.ZERO, N = r.ZERO, V = r.mul(D, D), G = r.mul(F, F), X = r.mul(x, x), Y = r.mul(D, F);
|
|
16579
16579
|
return Y = r.add(Y, Y), N = r.mul(D, x), N = r.add(N, N), B = r.mul(H, N), q = r.mul(P, X), q = r.add(B, q), B = r.sub(G, q), q = r.add(G, q), q = r.mul(B, q), B = r.mul(Y, B), N = r.mul(P, N), X = r.mul(H, X), Y = r.sub(V, X), Y = r.mul(H, Y), Y = r.add(Y, N), N = r.add(V, V), V = r.add(N, V), V = r.add(V, X), V = r.mul(V, Y), q = r.add(q, V), X = r.mul(F, x), X = r.add(X, X), V = r.mul(X, Y), B = r.sub(B, V), N = r.mul(X, G), N = r.add(N, N), N = r.add(N, N), new v(B, q, N);
|
|
16580
16580
|
}
|
|
@@ -16586,7 +16586,7 @@ function u3(e, t = {}) {
|
|
|
16586
16586
|
T(H);
|
|
16587
16587
|
const { X: $, Y: P, Z: D } = this, { X: F, Y: x, Z: B } = H;
|
|
16588
16588
|
let q = r.ZERO, N = r.ZERO, V = r.ZERO;
|
|
16589
|
-
const G = s.a, X = r.mul(s.b,
|
|
16589
|
+
const G = s.a, X = r.mul(s.b, bs);
|
|
16590
16590
|
let Y = r.mul($, F), ce = r.mul(P, x), ue = r.mul(D, B), te = r.add($, P), Z = r.add(F, x);
|
|
16591
16591
|
te = r.mul(te, Z), Z = r.add(Y, ce), te = r.sub(te, Z), Z = r.add($, D);
|
|
16592
16592
|
let ae = r.add(F, B);
|
|
@@ -16670,7 +16670,7 @@ function u3(e, t = {}) {
|
|
|
16670
16670
|
return this.multiplyUnsafe(o).is0();
|
|
16671
16671
|
}
|
|
16672
16672
|
toBytes(H = !0) {
|
|
16673
|
-
return
|
|
16673
|
+
return Vo(H, "isCompressed"), this.assertValidity(), y(v, this, H);
|
|
16674
16674
|
}
|
|
16675
16675
|
toHex(H = !0) {
|
|
16676
16676
|
return it(this.toBytes(H));
|
|
@@ -16735,8 +16735,8 @@ function l3(e, t) {
|
|
|
16735
16735
|
}
|
|
16736
16736
|
return { isValid: O, value: S };
|
|
16737
16737
|
};
|
|
16738
|
-
if (e.ORDER % ul ===
|
|
16739
|
-
const g = (e.ORDER -
|
|
16738
|
+
if (e.ORDER % ul === bs) {
|
|
16739
|
+
const g = (e.ORDER - bs) / ul, m = e.sqrt(e.neg(t));
|
|
16740
16740
|
y = (E, _) => {
|
|
16741
16741
|
let S = e.sqr(_);
|
|
16742
16742
|
const w = e.mul(E, _);
|
|
@@ -16832,11 +16832,11 @@ function y3(e, t) {
|
|
|
16832
16832
|
});
|
|
16833
16833
|
}
|
|
16834
16834
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
16835
|
-
const g3 = BigInt(0),
|
|
16835
|
+
const g3 = BigInt(0), qc = BigInt(1), _0 = BigInt(2), Es = BigInt(3);
|
|
16836
16836
|
function m3(e) {
|
|
16837
16837
|
const t = [];
|
|
16838
|
-
for (; e >
|
|
16839
|
-
(e &
|
|
16838
|
+
for (; e > qc; e >>= qc)
|
|
16839
|
+
(e & qc) === g3 ? t.unshift(0) : (e & Es) === Es ? (t.unshift(-1), e += qc) : t.unshift(1);
|
|
16840
16840
|
return t;
|
|
16841
16841
|
}
|
|
16842
16842
|
function ff(e) {
|
|
@@ -16854,8 +16854,8 @@ function w3(e, t, n, r) {
|
|
|
16854
16854
|
throw new Error("bls: unknown twist type");
|
|
16855
16855
|
const l = i.div(i.ONE, i.mul(i.ONE, _0));
|
|
16856
16856
|
function d(w, T, O, A) {
|
|
16857
|
-
const R = i.sqr(O), M = i.sqr(A), v = i.mulByB(i.mul(M,
|
|
16858
|
-
return w.push([K, H, $]), T = i.mul(i.mul(i.mul(i.sub(R, U), T), O), l), O = i.sub(i.sqr(i.mul(i.add(R, U), l)), i.mul(i.sqr(v),
|
|
16857
|
+
const R = i.sqr(O), M = i.sqr(A), v = i.mulByB(i.mul(M, Es)), U = i.mul(v, Es), L = i.sub(i.sub(i.sqr(i.add(O, A)), M), R), K = i.sub(v, R), H = i.mul(i.sqr(T), Es), $ = i.neg(L);
|
|
16858
|
+
return w.push([K, H, $]), T = i.mul(i.mul(i.mul(i.sub(R, U), T), O), l), O = i.sub(i.sqr(i.mul(i.add(R, U), l)), i.mul(i.sqr(v), Es)), A = i.mul(R, L), { Rx: T, Ry: O, Rz: A };
|
|
16859
16859
|
}
|
|
16860
16860
|
function y(w, T, O, A, R, M) {
|
|
16861
16861
|
const v = i.sub(O, i.mul(M, A)), U = i.sub(T, i.mul(R, A)), L = i.sub(i.mul(v, R), i.mul(U, M)), K = i.neg(v), H = U;
|
|
@@ -16863,7 +16863,7 @@ function w3(e, t, n, r) {
|
|
|
16863
16863
|
const $ = i.sqr(U), P = i.mul($, U), D = i.mul($, T), F = i.add(i.sub(P, i.mul(D, _0)), i.mul(i.sqr(v), A));
|
|
16864
16864
|
return T = i.mul(U, F), O = i.sub(i.mul(i.sub(D, F), v), i.mul(P, O)), A = i.mul(A, P), { Rx: T, Ry: O, Rz: A };
|
|
16865
16865
|
}
|
|
16866
|
-
const g = m3(c), m =
|
|
16866
|
+
const g = m3(c), m = jo((w) => {
|
|
16867
16867
|
const T = w, { x: O, y: A } = T.toAffine(), R = O, M = A, v = i.neg(A);
|
|
16868
16868
|
let U = R, L = M, K = i.ONE;
|
|
16869
16869
|
const H = [];
|
|
@@ -17139,7 +17139,7 @@ class _3 {
|
|
|
17139
17139
|
constructor(t, n = {}) {
|
|
17140
17140
|
this.MASK = Ar;
|
|
17141
17141
|
const r = t.ORDER, i = r * r;
|
|
17142
|
-
this.Fp = t, this.ORDER = i, this.BITS =
|
|
17142
|
+
this.Fp = t, this.ORDER = i, this.BITS = Do(i), this.BYTES = Math.ceil(Do(i) / 8), this.isLE = t.isLE, this.ZERO = { c0: t.ZERO, c1: t.ZERO }, this.ONE = { c0: t.ONE, c1: t.ZERO }, this.Fp_NONRESIDUE = t.create(n.NONRESIDUE || BigInt(-1)), this.Fp_div2 = t.div(t.ONE, tn), this.NONRESIDUE = A0(t, n.FP2_NONRESIDUE), this.FROBENIUS_COEFFICIENTS = mh(t, this.Fp_NONRESIDUE, t.ORDER, 2)[0], this.mulByB = n.Fp2mulByB, Object.seal(this);
|
|
17143
17143
|
}
|
|
17144
17144
|
fromBigTuple(t) {
|
|
17145
17145
|
return A0(this.Fp, t);
|
|
@@ -17671,12 +17671,12 @@ function x3(e) {
|
|
|
17671
17671
|
return { Fp: t, Fp2: n, Fp6: r, Fp12: i };
|
|
17672
17672
|
}
|
|
17673
17673
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
17674
|
-
const Kt = BigInt(0), Ma = BigInt(1), Rn = BigInt(2), bu = BigInt(3),
|
|
17674
|
+
const Kt = BigInt(0), Ma = BigInt(1), Rn = BigInt(2), bu = BigInt(3), Go = BigInt(4), oi = BigInt("0xd201000000010000"), A3 = Do(oi), Yi = {
|
|
17675
17675
|
p: BigInt("0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab"),
|
|
17676
17676
|
n: BigInt("0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"),
|
|
17677
17677
|
h: BigInt("0x396c8c005555e1568c00aaab0000aaab"),
|
|
17678
17678
|
a: Kt,
|
|
17679
|
-
b:
|
|
17679
|
+
b: Go,
|
|
17680
17680
|
Gx: BigInt("0x17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb"),
|
|
17681
17681
|
Gy: BigInt("0x08b3f481e3aaa0f1a09e30ed741d8ae4fcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1")
|
|
17682
17682
|
}, v3 = gi(Yi.n, {
|
|
@@ -17689,7 +17689,7 @@ const Kt = BigInt(0), Ma = BigInt(1), Rn = BigInt(2), bu = BigInt(3), Ko = BigIn
|
|
|
17689
17689
|
// Fp(u) / (u² - β) where β = -1
|
|
17690
17690
|
FP2_NONRESIDUE: [Ma, Ma],
|
|
17691
17691
|
Fp2mulByB: ({ c0: e, c1: t }) => {
|
|
17692
|
-
const n = Ee.mul(e,
|
|
17692
|
+
const n = Ee.mul(e, Go), r = Ee.mul(t, Go);
|
|
17693
17693
|
return { c0: Ee.sub(n, r), c1: Ee.add(n, r) };
|
|
17694
17694
|
},
|
|
17695
17695
|
Fp12finalExponentiate: (e) => {
|
|
@@ -17709,7 +17709,7 @@ const Kt = BigInt(0), Ma = BigInt(1), Rn = BigInt(2), bu = BigInt(3), Ko = BigIn
|
|
|
17709
17709
|
n: Yi.n,
|
|
17710
17710
|
h: BigInt("0x5d543a95414e7f1091d50792876a202cd91de4547085abaa68a205b2e5a7ddfa628f1cb4d9e82ef21537e293a6691ae1616ec6e786f0c70cf1c38e31c7238e5"),
|
|
17711
17711
|
a: Re.ZERO,
|
|
17712
|
-
b: Re.fromBigTuple([
|
|
17712
|
+
b: Re.fromBigTuple([Go, Go]),
|
|
17713
17713
|
Gx: Re.fromBigTuple([
|
|
17714
17714
|
BigInt("0x024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8"),
|
|
17715
17715
|
BigInt("0x13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e")
|
|
@@ -17718,13 +17718,13 @@ const Kt = BigInt(0), Ma = BigInt(1), Rn = BigInt(2), bu = BigInt(3), Ko = BigIn
|
|
|
17718
17718
|
BigInt("0x0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801"),
|
|
17719
17719
|
BigInt("0x0606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79be")
|
|
17720
17720
|
])
|
|
17721
|
-
}, Eu =
|
|
17721
|
+
}, Eu = _c(Ee.toBytes(Kt), { infinity: !0, compressed: !0 });
|
|
17722
17722
|
function _u(e) {
|
|
17723
17723
|
e = e.slice();
|
|
17724
17724
|
const t = e[0] & 224, n = !!(t >> 7 & 1), r = !!(t >> 6 & 1), i = !!(t >> 5 & 1);
|
|
17725
17725
|
return e[0] &= 31, { compressed: n, infinity: r, sort: i, value: e };
|
|
17726
17726
|
}
|
|
17727
|
-
function
|
|
17727
|
+
function _c(e, t) {
|
|
17728
17728
|
if (e[0] & 224)
|
|
17729
17729
|
throw new Error("setMask: non-empty mask");
|
|
17730
17730
|
return t.compressed && (e[0] |= 128), t.infinity && (e[0] |= 64), t.sort && (e[0] |= 32), e;
|
|
@@ -17735,7 +17735,7 @@ function B3(e, t, n) {
|
|
|
17735
17735
|
if (s)
|
|
17736
17736
|
return Eu.slice();
|
|
17737
17737
|
const a = !!(c * Rn / i);
|
|
17738
|
-
return
|
|
17738
|
+
return _c(Ct(o, r), { compressed: !0, sort: a });
|
|
17739
17739
|
} else
|
|
17740
17740
|
return s ? $e(Uint8Array.of(64), new Uint8Array(2 * r - 1)) : $e(Ct(o, r), Ct(c, r));
|
|
17741
17741
|
}
|
|
@@ -17745,7 +17745,7 @@ function hf(e) {
|
|
|
17745
17745
|
if (e.is0())
|
|
17746
17746
|
return Eu.slice();
|
|
17747
17747
|
const s = !!(i * Rn / n);
|
|
17748
|
-
return
|
|
17748
|
+
return _c(Ct(r, t), { compressed: !0, sort: s });
|
|
17749
17749
|
}
|
|
17750
17750
|
function N3(e) {
|
|
17751
17751
|
const { compressed: t, infinity: n, sort: r, value: i } = _u(e), { BYTES: s, ORDER: o } = Ee;
|
|
@@ -17791,7 +17791,7 @@ function k3(e, t, n) {
|
|
|
17791
17791
|
if (s)
|
|
17792
17792
|
return $e(Eu, Ct(Kt, r));
|
|
17793
17793
|
const a = !!(c.c1 === Kt ? c.c0 * Rn / i : c.c1 * Rn / i);
|
|
17794
|
-
return $e(
|
|
17794
|
+
return $e(_c(Ct(o.c1, r), { compressed: !0, sort: a }), Ct(o.c0, r));
|
|
17795
17795
|
} else {
|
|
17796
17796
|
if (s)
|
|
17797
17797
|
return $e(Uint8Array.of(64), new Uint8Array(4 * r - 1));
|
|
@@ -17805,7 +17805,7 @@ function df(e) {
|
|
|
17805
17805
|
if (e.is0())
|
|
17806
17806
|
return $e(Eu, Ct(Kt, t));
|
|
17807
17807
|
const { x: n, y: r } = e.toAffine(), { re: i, im: s } = Re.reim(n), { re: o, im: c } = Re.reim(r), u = !!((c > Kt ? c * Rn : o * Rn) / Ee.ORDER & Ma), f = i;
|
|
17808
|
-
return $e(
|
|
17808
|
+
return $e(_c(Ct(s, t), { sort: u, compressed: !0 }), Ct(f, t));
|
|
17809
17809
|
}
|
|
17810
17810
|
function P3(e) {
|
|
17811
17811
|
const { BYTES: t, ORDER: n } = Ee, { compressed: r, infinity: i, sort: s, value: o } = _u(e);
|
|
@@ -18116,7 +18116,7 @@ function q3(e, t, n) {
|
|
|
18116
18116
|
const r = typeof e == "string" ? e : it(e), i = typeof t == "string" ? t : it(t), s = typeof n == "string" ? n : it(n);
|
|
18117
18117
|
return Su.verifyShortSignature(i, s, r);
|
|
18118
18118
|
}
|
|
18119
|
-
const L3 = BigInt(1e6), Vw = (e) => Nt(new
|
|
18119
|
+
const L3 = BigInt(1e6), Vw = (e) => Nt(new Ks(e)), bh = (e) => {
|
|
18120
18120
|
const n = Vw(e) / L3;
|
|
18121
18121
|
return new Date(Number(n));
|
|
18122
18122
|
}, B0 = 60 * 1e3, V3 = 60, $3 = 24, D3 = $3 * V3, j3 = 5, K3 = 5, G3 = 30 * D3;
|
|
@@ -18154,7 +18154,7 @@ class Di {
|
|
|
18154
18154
|
* @returns The result of the lookup.
|
|
18155
18155
|
*/
|
|
18156
18156
|
lookup_path(t) {
|
|
18157
|
-
return
|
|
18157
|
+
return Sc(t, this.cert.tree);
|
|
18158
18158
|
}
|
|
18159
18159
|
/**
|
|
18160
18160
|
* Lookup a subtree in the certificate tree, using {@link lookup_subtree}.
|
|
@@ -18165,23 +18165,23 @@ class Di {
|
|
|
18165
18165
|
return Eh(t, this.cert.tree);
|
|
18166
18166
|
}
|
|
18167
18167
|
async verify() {
|
|
18168
|
-
const t = await sa(this.cert.tree), n = await this._checkDelegationAndGetKey(this.cert.delegation), r = this.cert.signature, i = z3(n), s = $e(
|
|
18168
|
+
const t = await sa(this.cert.tree), n = await this._checkDelegationAndGetKey(this.cert.delegation), r = this.cert.signature, i = z3(n), s = $e(So("ic-state-root"), t), o = Sn(this.lookup_path(["time"]));
|
|
18169
18169
|
if (!o)
|
|
18170
|
-
throw gt.fromCode(new
|
|
18170
|
+
throw gt.fromCode(new As("Certificate does not contain a time"));
|
|
18171
18171
|
if (!this.#t) {
|
|
18172
18172
|
const c = this.#e?.getTimeDiffMsecs() ?? 0, a = this._maxAgeInMinutes * B0, u = /* @__PURE__ */ new Date(), f = u.getTime() + c, l = f - a, d = f + K3 * B0, y = bh(o), g = y.getTime() < l, m = y.getTime() > d;
|
|
18173
18173
|
if ((g || m) && this.#e && !this.#e.hasSyncedTime())
|
|
18174
18174
|
return await this.#e.syncTime(this._canisterId), await this.verify();
|
|
18175
18175
|
if (g)
|
|
18176
|
-
throw vn.fromCode(new
|
|
18176
|
+
throw vn.fromCode(new Fo(this._maxAgeInMinutes, y, u, c, "past"));
|
|
18177
18177
|
if (m)
|
|
18178
|
-
throw this.#e?.hasSyncedTime() ? fn.fromCode(new $n("System time has been synced with the IC network, but certificate is still too far in the future.")) : vn.fromCode(new
|
|
18178
|
+
throw this.#e?.hasSyncedTime() ? fn.fromCode(new $n("System time has been synced with the IC network, but certificate is still too far in the future.")) : vn.fromCode(new Fo(5, y, u, c, "future"));
|
|
18179
18179
|
}
|
|
18180
18180
|
try {
|
|
18181
18181
|
if (!await this._blsVerify(i, r, s))
|
|
18182
|
-
throw vn.fromCode(new
|
|
18182
|
+
throw vn.fromCode(new As("Invalid signature"));
|
|
18183
18183
|
} catch (c) {
|
|
18184
|
-
throw vn.fromCode(new
|
|
18184
|
+
throw vn.fromCode(new As("Signature verification failed", c));
|
|
18185
18185
|
}
|
|
18186
18186
|
}
|
|
18187
18187
|
async _checkDelegationAndGetKey(t) {
|
|
@@ -18212,15 +18212,15 @@ class Di {
|
|
|
18212
18212
|
return o;
|
|
18213
18213
|
}
|
|
18214
18214
|
}
|
|
18215
|
-
const
|
|
18215
|
+
const co = ac("308182301d060d2b0601040182dc7c0503010201060c2b0601040182dc7c05030201036100"), X3 = 96;
|
|
18216
18216
|
function z3(e) {
|
|
18217
|
-
const t =
|
|
18217
|
+
const t = co.byteLength + X3;
|
|
18218
18218
|
if (e.byteLength !== t)
|
|
18219
18219
|
throw gt.fromCode(new pu(t, e.byteLength));
|
|
18220
|
-
const n = e.slice(0,
|
|
18221
|
-
if (!mu(n,
|
|
18222
|
-
throw gt.fromCode(new Zl(
|
|
18223
|
-
return e.slice(
|
|
18220
|
+
const n = e.slice(0, co.byteLength);
|
|
18221
|
+
if (!mu(n, co))
|
|
18222
|
+
throw gt.fromCode(new Zl(co, n));
|
|
18223
|
+
return e.slice(co.byteLength);
|
|
18224
18224
|
}
|
|
18225
18225
|
function Sn(e) {
|
|
18226
18226
|
if (e.status === In.Found && e.value instanceof Uint8Array)
|
|
@@ -18229,20 +18229,20 @@ function Sn(e) {
|
|
|
18229
18229
|
async function sa(e) {
|
|
18230
18230
|
switch (e[0]) {
|
|
18231
18231
|
case Ht.Empty:
|
|
18232
|
-
return _n(
|
|
18232
|
+
return _n(So("ic-hashtree-empty"));
|
|
18233
18233
|
case Ht.Pruned:
|
|
18234
18234
|
return e[1];
|
|
18235
18235
|
case Ht.Leaf:
|
|
18236
|
-
return _n($e(
|
|
18236
|
+
return _n($e(So("ic-hashtree-leaf"), e[1]));
|
|
18237
18237
|
case Ht.Labeled:
|
|
18238
|
-
return _n($e(
|
|
18238
|
+
return _n($e(So("ic-hashtree-labeled"), e[1], await sa(e[2])));
|
|
18239
18239
|
case Ht.Fork:
|
|
18240
|
-
return _n($e(
|
|
18240
|
+
return _n($e(So("ic-hashtree-fork"), await sa(e[1]), await sa(e[2])));
|
|
18241
18241
|
default:
|
|
18242
|
-
throw
|
|
18242
|
+
throw vs;
|
|
18243
18243
|
}
|
|
18244
18244
|
}
|
|
18245
|
-
function
|
|
18245
|
+
function So(e) {
|
|
18246
18246
|
const t = new Uint8Array([e.length]), n = new TextEncoder().encode(e);
|
|
18247
18247
|
return $e(t, n);
|
|
18248
18248
|
}
|
|
@@ -18253,15 +18253,15 @@ var In;
|
|
|
18253
18253
|
(function(e) {
|
|
18254
18254
|
e.Unknown = "Unknown", e.Absent = "Absent", e.Found = "Found", e.Error = "Error";
|
|
18255
18255
|
})(In || (In = {}));
|
|
18256
|
-
var
|
|
18256
|
+
var Ns;
|
|
18257
18257
|
(function(e) {
|
|
18258
18258
|
e.Absent = "Absent", e.Unknown = "Unknown", e.Found = "Found";
|
|
18259
|
-
})(
|
|
18259
|
+
})(Ns || (Ns = {}));
|
|
18260
18260
|
var ct;
|
|
18261
18261
|
(function(e) {
|
|
18262
18262
|
e.Absent = "Absent", e.Unknown = "Unknown", e.Found = "Found", e.Less = "Less", e.Greater = "Greater";
|
|
18263
18263
|
})(ct || (ct = {}));
|
|
18264
|
-
function
|
|
18264
|
+
function Sc(e, t) {
|
|
18265
18265
|
if (e.length === 0)
|
|
18266
18266
|
switch (t[0]) {
|
|
18267
18267
|
case Ht.Empty:
|
|
@@ -18270,13 +18270,13 @@ function _c(e, t) {
|
|
|
18270
18270
|
};
|
|
18271
18271
|
case Ht.Leaf: {
|
|
18272
18272
|
if (!t[1])
|
|
18273
|
-
throw fn.fromCode(new
|
|
18273
|
+
throw fn.fromCode(new wc("Invalid tree structure for leaf"));
|
|
18274
18274
|
if (t[1] instanceof Uint8Array)
|
|
18275
18275
|
return {
|
|
18276
18276
|
status: In.Found,
|
|
18277
18277
|
value: t[1].slice(t[1].byteOffset, t[1].byteLength + t[1].byteOffset)
|
|
18278
18278
|
};
|
|
18279
|
-
throw
|
|
18279
|
+
throw vs;
|
|
18280
18280
|
}
|
|
18281
18281
|
case Ht.Pruned:
|
|
18282
18282
|
return {
|
|
@@ -18288,12 +18288,12 @@ function _c(e, t) {
|
|
|
18288
18288
|
status: In.Error
|
|
18289
18289
|
};
|
|
18290
18290
|
default:
|
|
18291
|
-
throw
|
|
18291
|
+
throw vs;
|
|
18292
18292
|
}
|
|
18293
|
-
const n = $w(e), r =
|
|
18293
|
+
const n = $w(e), r = Io(n, t);
|
|
18294
18294
|
switch (r.status) {
|
|
18295
18295
|
case ct.Found:
|
|
18296
|
-
return
|
|
18296
|
+
return Sc(e.slice(1), r.value);
|
|
18297
18297
|
case ct.Absent:
|
|
18298
18298
|
case ct.Greater:
|
|
18299
18299
|
case ct.Less:
|
|
@@ -18305,31 +18305,31 @@ function _c(e, t) {
|
|
|
18305
18305
|
status: In.Unknown
|
|
18306
18306
|
};
|
|
18307
18307
|
default:
|
|
18308
|
-
throw
|
|
18308
|
+
throw vs;
|
|
18309
18309
|
}
|
|
18310
18310
|
}
|
|
18311
18311
|
function Eh(e, t) {
|
|
18312
18312
|
if (e.length === 0)
|
|
18313
18313
|
return {
|
|
18314
|
-
status:
|
|
18314
|
+
status: Ns.Found,
|
|
18315
18315
|
value: t
|
|
18316
18316
|
};
|
|
18317
|
-
const n = $w(e), r =
|
|
18317
|
+
const n = $w(e), r = Io(n, t);
|
|
18318
18318
|
switch (r.status) {
|
|
18319
18319
|
case ct.Found:
|
|
18320
18320
|
return Eh(e.slice(1), r.value);
|
|
18321
18321
|
case ct.Unknown:
|
|
18322
18322
|
return {
|
|
18323
|
-
status:
|
|
18323
|
+
status: Ns.Unknown
|
|
18324
18324
|
};
|
|
18325
18325
|
case ct.Absent:
|
|
18326
18326
|
case ct.Greater:
|
|
18327
18327
|
case ct.Less:
|
|
18328
18328
|
return {
|
|
18329
|
-
status:
|
|
18329
|
+
status: Ns.Absent
|
|
18330
18330
|
};
|
|
18331
18331
|
default:
|
|
18332
|
-
throw
|
|
18332
|
+
throw vs;
|
|
18333
18333
|
}
|
|
18334
18334
|
}
|
|
18335
18335
|
function fl(e) {
|
|
@@ -18342,7 +18342,7 @@ function fl(e) {
|
|
|
18342
18342
|
return [e];
|
|
18343
18343
|
}
|
|
18344
18344
|
}
|
|
18345
|
-
function
|
|
18345
|
+
function Io(e, t) {
|
|
18346
18346
|
switch (t[0]) {
|
|
18347
18347
|
// if we have a labelled node, compare the node's label to the one we are
|
|
18348
18348
|
// looking for
|
|
@@ -18357,12 +18357,12 @@ function vo(e, t) {
|
|
|
18357
18357
|
};
|
|
18358
18358
|
// if we have a fork node, we need to search both sides, starting with the left
|
|
18359
18359
|
case Ht.Fork: {
|
|
18360
|
-
const n =
|
|
18360
|
+
const n = Io(e, t[1]);
|
|
18361
18361
|
switch (n.status) {
|
|
18362
18362
|
// if the label we're searching for is greater than the left node lookup,
|
|
18363
18363
|
// we need to search the right node
|
|
18364
18364
|
case ct.Greater: {
|
|
18365
|
-
const r =
|
|
18365
|
+
const r = Io(e, t[2]);
|
|
18366
18366
|
return r.status === ct.Less ? {
|
|
18367
18367
|
status: ct.Absent
|
|
18368
18368
|
} : r;
|
|
@@ -18370,7 +18370,7 @@ function vo(e, t) {
|
|
|
18370
18370
|
// if the left node returns an uncertain result, we need to search the
|
|
18371
18371
|
// right node
|
|
18372
18372
|
case ct.Unknown: {
|
|
18373
|
-
const r =
|
|
18373
|
+
const r = Io(e, t[2]);
|
|
18374
18374
|
return r.status === ct.Less ? {
|
|
18375
18375
|
status: ct.Unknown
|
|
18376
18376
|
} : r;
|
|
@@ -18398,9 +18398,9 @@ function vo(e, t) {
|
|
|
18398
18398
|
}
|
|
18399
18399
|
}
|
|
18400
18400
|
function Dw(e) {
|
|
18401
|
-
const { canisterId: t, subnetId: n, tree: r } = e, i =
|
|
18401
|
+
const { canisterId: t, subnetId: n, tree: r } = e, i = Sc(["subnet", n.toUint8Array(), "canister_ranges"], r);
|
|
18402
18402
|
if (i.status !== In.Found)
|
|
18403
|
-
throw gt.fromCode(new
|
|
18403
|
+
throw gt.fromCode(new Ms(`Could not find canister ranges for subnet ${n.toText()}`, i.status));
|
|
18404
18404
|
if (!(i.value instanceof Uint8Array))
|
|
18405
18405
|
throw gt.fromCode(new du(`Could not find canister ranges for subnet ${n.toText()}`));
|
|
18406
18406
|
return rr(i.value).map((a) => [
|
|
@@ -18414,7 +18414,7 @@ const N0 = async (e) => {
|
|
|
18414
18414
|
return (async () => {
|
|
18415
18415
|
try {
|
|
18416
18416
|
if (t.rootKey === null)
|
|
18417
|
-
throw un.fromCode(new
|
|
18417
|
+
throw un.fromCode(new Xs());
|
|
18418
18418
|
const l = t.rootKey, d = await t.readState(i, {
|
|
18419
18419
|
paths: [f]
|
|
18420
18420
|
}), y = await Di.create({
|
|
@@ -18483,7 +18483,7 @@ const N0 = async (e) => {
|
|
|
18483
18483
|
}
|
|
18484
18484
|
}
|
|
18485
18485
|
} catch (l) {
|
|
18486
|
-
if (l instanceof _r && (l.hasCode(
|
|
18486
|
+
if (l instanceof _r && (l.hasCode(As) || l.hasCode(Fo)))
|
|
18487
18487
|
throw l;
|
|
18488
18488
|
typeof a != "string" && "key" in a && "path" in a ? o.set(a.key, null) : o.set(a, null), console.group(), console.warn(`Expected to find result for path ${a}, but instead found nothing.`), console.warn(l), console.groupEnd();
|
|
18489
18489
|
}
|
|
@@ -18504,15 +18504,15 @@ const N0 = async (e) => {
|
|
|
18504
18504
|
}), !Dw({ canisterId: t, subnetId: o, tree: i }))
|
|
18505
18505
|
throw vn.fromCode(new hu(t, o));
|
|
18506
18506
|
const a = Eh(["subnet", s.subnet_id, "node"], i);
|
|
18507
|
-
if (a.status !==
|
|
18508
|
-
throw gt.fromCode(new
|
|
18507
|
+
if (a.status !== Ns.Found)
|
|
18508
|
+
throw gt.fromCode(new Ms("Node not found", a.status));
|
|
18509
18509
|
if (a.value instanceof Uint8Array)
|
|
18510
|
-
throw fn.fromCode(new
|
|
18510
|
+
throw fn.fromCode(new wc("Invalid node tree"));
|
|
18511
18511
|
const u = fl(a.value), f = /* @__PURE__ */ new Map();
|
|
18512
18512
|
return u.forEach((l) => {
|
|
18513
|
-
const d = Ke.from(l[1]).toText(), y =
|
|
18513
|
+
const d = Ke.from(l[1]).toText(), y = Sc(["public_key"], l[2]);
|
|
18514
18514
|
if (y.status !== In.Found)
|
|
18515
|
-
throw gt.fromCode(new
|
|
18515
|
+
throw gt.fromCode(new Ms("Public key not found", y.status));
|
|
18516
18516
|
const g = y.value;
|
|
18517
18517
|
if (g.byteLength !== 44)
|
|
18518
18518
|
throw gt.fromCode(new pu(44, g.byteLength));
|
|
@@ -18559,7 +18559,7 @@ function t8(e, t = {}) {
|
|
|
18559
18559
|
const n = Fw("edwards", e, t, t.FpFnLE), { Fp: r, Fn: i } = n;
|
|
18560
18560
|
let s = n.CURVE;
|
|
18561
18561
|
const { h: o } = s;
|
|
18562
|
-
|
|
18562
|
+
Ec(t, {}, { uvRatio: "function" });
|
|
18563
18563
|
const c = pf << BigInt(i.BYTES * 8) - Bt, a = (E) => r.create(E), u = t.uvRatio || ((E, _) => {
|
|
18564
18564
|
try {
|
|
18565
18565
|
return { isValid: !0, value: r.sqrt(r.div(E, _)) };
|
|
@@ -18577,7 +18577,7 @@ function t8(e, t = {}) {
|
|
|
18577
18577
|
if (!(E instanceof g))
|
|
18578
18578
|
throw new Error("ExtendedPoint expected");
|
|
18579
18579
|
}
|
|
18580
|
-
const d =
|
|
18580
|
+
const d = jo((E, _) => {
|
|
18581
18581
|
const { X: S, Y: w, Z: T } = E, O = E.is0();
|
|
18582
18582
|
_ == null && (_ = O ? Q3 : r.inv(T));
|
|
18583
18583
|
const A = a(S * _), R = a(w * _), M = r.mul(T, _);
|
|
@@ -18586,7 +18586,7 @@ function t8(e, t = {}) {
|
|
|
18586
18586
|
if (M !== Bt)
|
|
18587
18587
|
throw new Error("invZ was invalid");
|
|
18588
18588
|
return { x: A, y: R };
|
|
18589
|
-
}), y =
|
|
18589
|
+
}), y = jo((E) => {
|
|
18590
18590
|
const { a: _, d: S } = s;
|
|
18591
18591
|
if (E.is0())
|
|
18592
18592
|
throw new Error("bad point: ZERO");
|
|
@@ -18614,10 +18614,10 @@ function t8(e, t = {}) {
|
|
|
18614
18614
|
// Uses algo from RFC8032 5.1.3.
|
|
18615
18615
|
static fromBytes(_, S = !1) {
|
|
18616
18616
|
const w = r.BYTES, { a: T, d: O } = s;
|
|
18617
|
-
_ = h0(
|
|
18617
|
+
_ = h0(Bs(_, w, "point")), Vo(S, "zip215");
|
|
18618
18618
|
const A = h0(_), R = _[w - 1];
|
|
18619
18619
|
A[w - 1] = R & -129;
|
|
18620
|
-
const M =
|
|
18620
|
+
const M = $o(A), v = S ? c : r.ORDER;
|
|
18621
18621
|
d0("point.y", M, Dr, v);
|
|
18622
18622
|
const U = a(M * M), L = a(U - Bt), K = a(O * U - T);
|
|
18623
18623
|
let { isValid: H, value: $ } = u(L, K);
|
|
@@ -18754,7 +18754,7 @@ function t8(e, t = {}) {
|
|
|
18754
18754
|
function n8(e, t, n = {}) {
|
|
18755
18755
|
if (typeof t != "function")
|
|
18756
18756
|
throw new Error('"hash" function param is required');
|
|
18757
|
-
|
|
18757
|
+
Ec(n, {}, {
|
|
18758
18758
|
adjustScalarBytes: "function",
|
|
18759
18759
|
randomBytes: "function",
|
|
18760
18760
|
domain: "function",
|
|
@@ -18762,12 +18762,12 @@ function n8(e, t, n = {}) {
|
|
|
18762
18762
|
mapToCurve: "function"
|
|
18763
18763
|
});
|
|
18764
18764
|
const { prehash: r } = n, { BASE: i, Fp: s, Fn: o } = e, c = n.randomBytes || lg, a = n.adjustScalarBytes || ((v) => v), u = n.domain || ((v, U, L) => {
|
|
18765
|
-
if (
|
|
18765
|
+
if (Vo(L, "phflag"), U.length || L)
|
|
18766
18766
|
throw new Error("Contexts/pre-hash are not supported");
|
|
18767
18767
|
return v;
|
|
18768
18768
|
});
|
|
18769
18769
|
function f(v) {
|
|
18770
|
-
return o.create(
|
|
18770
|
+
return o.create($o(v));
|
|
18771
18771
|
}
|
|
18772
18772
|
function l(v) {
|
|
18773
18773
|
const U = w.secretKey;
|
|
@@ -18792,13 +18792,13 @@ function n8(e, t, n = {}) {
|
|
|
18792
18792
|
if (!o.isValid(x))
|
|
18793
18793
|
throw new Error("sign failed: invalid s");
|
|
18794
18794
|
const B = $e(D, o.toBytes(x));
|
|
18795
|
-
return
|
|
18795
|
+
return Bs(B, w.signature, "result");
|
|
18796
18796
|
}
|
|
18797
18797
|
const E = { zip215: !0 };
|
|
18798
18798
|
function _(v, U, L, K = E) {
|
|
18799
18799
|
const { context: H, zip215: $ } = K, P = w.signature;
|
|
18800
|
-
v = cn("signature", v, P), U = cn("message", U), L = cn("publicKey", L, w.publicKey), $ !== void 0 &&
|
|
18801
|
-
const D = P / 2, F = v.subarray(0, D), x =
|
|
18800
|
+
v = cn("signature", v, P), U = cn("message", U), L = cn("publicKey", L, w.publicKey), $ !== void 0 && Vo($, "zip215"), r && (U = r(U));
|
|
18801
|
+
const D = P / 2, F = v.subarray(0, D), x = $o(v.subarray(D, P));
|
|
18802
18802
|
let B, q, N;
|
|
18803
18803
|
try {
|
|
18804
18804
|
B = e.fromBytes(L, $), q = e.fromBytes(F, $), N = i.multiplyUnsafe(x);
|
|
@@ -18817,14 +18817,14 @@ function n8(e, t, n = {}) {
|
|
|
18817
18817
|
seed: S
|
|
18818
18818
|
};
|
|
18819
18819
|
function T(v = c(w.seed)) {
|
|
18820
|
-
return
|
|
18820
|
+
return Bs(v, w.seed, "seed");
|
|
18821
18821
|
}
|
|
18822
18822
|
function O(v) {
|
|
18823
18823
|
const U = M.randomSecretKey(v);
|
|
18824
18824
|
return { secretKey: U, publicKey: y(U) };
|
|
18825
18825
|
}
|
|
18826
18826
|
function A(v) {
|
|
18827
|
-
return
|
|
18827
|
+
return cc(v) && v.length === o.BYTES;
|
|
18828
18828
|
}
|
|
18829
18829
|
function R(v, U) {
|
|
18830
18830
|
try {
|
|
@@ -18856,7 +18856,7 @@ function n8(e, t, n = {}) {
|
|
|
18856
18856
|
},
|
|
18857
18857
|
toMontgomerySecret(v) {
|
|
18858
18858
|
const U = w.secretKey;
|
|
18859
|
-
|
|
18859
|
+
Bs(v, U);
|
|
18860
18860
|
const L = t(v.subarray(0, U));
|
|
18861
18861
|
return a(L).subarray(0, U);
|
|
18862
18862
|
},
|
|
@@ -18944,7 +18944,7 @@ const h8 = gi(jw.p, { isLE: !0 }), d8 = {
|
|
|
18944
18944
|
// Constant-time, u/√v
|
|
18945
18945
|
uvRatio: l8
|
|
18946
18946
|
}, p8 = s8(d8);
|
|
18947
|
-
var R0, U0, Rt,
|
|
18947
|
+
var R0, U0, Rt, Ps;
|
|
18948
18948
|
class y8 {
|
|
18949
18949
|
/**
|
|
18950
18950
|
* Create a new ExpirableMap.
|
|
@@ -18955,10 +18955,10 @@ class y8 {
|
|
|
18955
18955
|
constructor(t = {}) {
|
|
18956
18956
|
// Internals
|
|
18957
18957
|
sn(this, Rt);
|
|
18958
|
-
sn(this,
|
|
18958
|
+
sn(this, Ps);
|
|
18959
18959
|
this[R0] = this.entries.bind(this), this[U0] = "ExpirableMap";
|
|
18960
18960
|
const { source: n = [], expirationTime: r = 600 * 1e3 } = t, i = Date.now();
|
|
18961
|
-
Yt(this, Rt, new Map([...n].map(([s, o]) => [s, { value: o, timestamp: i }]))), Yt(this,
|
|
18961
|
+
Yt(this, Rt, new Map([...n].map(([s, o]) => [s, { value: o, timestamp: i }]))), Yt(this, Ps, r);
|
|
18962
18962
|
}
|
|
18963
18963
|
/**
|
|
18964
18964
|
* Prune removes all expired entries.
|
|
@@ -18966,7 +18966,7 @@ class y8 {
|
|
|
18966
18966
|
prune() {
|
|
18967
18967
|
const t = Date.now();
|
|
18968
18968
|
for (const [n, r] of Fe(this, Rt).entries())
|
|
18969
|
-
t - r.timestamp > Fe(this,
|
|
18969
|
+
t - r.timestamp > Fe(this, Ps) && Fe(this, Rt).delete(n);
|
|
18970
18970
|
return this;
|
|
18971
18971
|
}
|
|
18972
18972
|
// Implementing the Map interface
|
|
@@ -18992,7 +18992,7 @@ class y8 {
|
|
|
18992
18992
|
get(t) {
|
|
18993
18993
|
const n = Fe(this, Rt).get(t);
|
|
18994
18994
|
if (n !== void 0) {
|
|
18995
|
-
if (Date.now() - n.timestamp > Fe(this,
|
|
18995
|
+
if (Date.now() - n.timestamp > Fe(this, Ps)) {
|
|
18996
18996
|
Fe(this, Rt).delete(t);
|
|
18997
18997
|
return;
|
|
18998
18998
|
}
|
|
@@ -19067,7 +19067,7 @@ class y8 {
|
|
|
19067
19067
|
return Fe(this, Rt).size;
|
|
19068
19068
|
}
|
|
19069
19069
|
}
|
|
19070
|
-
Rt = new WeakMap(),
|
|
19070
|
+
Rt = new WeakMap(), Ps = new WeakMap(), R0 = Symbol.iterator, U0 = Symbol.toStringTag;
|
|
19071
19071
|
const C0 = (e) => {
|
|
19072
19072
|
if (e <= 127)
|
|
19073
19073
|
return 1;
|
|
@@ -19215,15 +19215,15 @@ const w8 = (e, t) => {
|
|
|
19215
19215
|
throw et.fromCode(new Jl(s, o.length));
|
|
19216
19216
|
return o;
|
|
19217
19217
|
};
|
|
19218
|
-
var
|
|
19218
|
+
var zo, Yo;
|
|
19219
19219
|
const Ui = class Ui {
|
|
19220
19220
|
// `fromRaw` and `fromDer` should be used for instantiation, not this constructor.
|
|
19221
19221
|
constructor(t) {
|
|
19222
|
-
sn(this, Xo);
|
|
19223
19222
|
sn(this, zo);
|
|
19223
|
+
sn(this, Yo);
|
|
19224
19224
|
if (t.byteLength !== Ui.RAW_KEY_LENGTH)
|
|
19225
19225
|
throw et.fromCode(new Rr("An Ed25519 public key must be exactly 32 bytes long"));
|
|
19226
|
-
Yt(this,
|
|
19226
|
+
Yt(this, zo, t), Yt(this, Yo, Ui.derEncode(t));
|
|
19227
19227
|
}
|
|
19228
19228
|
static from(t) {
|
|
19229
19229
|
return this.fromDer(t.toDer());
|
|
@@ -19244,10 +19244,10 @@ const Ui = class Ui {
|
|
|
19244
19244
|
return n;
|
|
19245
19245
|
}
|
|
19246
19246
|
get rawKey() {
|
|
19247
|
-
return Fe(this,
|
|
19247
|
+
return Fe(this, zo);
|
|
19248
19248
|
}
|
|
19249
19249
|
get derKey() {
|
|
19250
|
-
return Fe(this,
|
|
19250
|
+
return Fe(this, Yo);
|
|
19251
19251
|
}
|
|
19252
19252
|
toDer() {
|
|
19253
19253
|
return this.derKey;
|
|
@@ -19256,7 +19256,7 @@ const Ui = class Ui {
|
|
|
19256
19256
|
return this.rawKey;
|
|
19257
19257
|
}
|
|
19258
19258
|
};
|
|
19259
|
-
|
|
19259
|
+
zo = new WeakMap(), Yo = new WeakMap(), Ui.RAW_KEY_LENGTH = 32;
|
|
19260
19260
|
let hl = Ui;
|
|
19261
19261
|
class b8 {
|
|
19262
19262
|
constructor() {
|
|
@@ -19287,42 +19287,42 @@ class E8 extends b8 {
|
|
|
19287
19287
|
}
|
|
19288
19288
|
}
|
|
19289
19289
|
const M0 = 0.5, q0 = 1.5, L0 = 500, V0 = 6e4, $0 = 9e5, D0 = 10;
|
|
19290
|
-
var qn,
|
|
19290
|
+
var qn, Zo, Jo, Qo, ec, tc, nc, rc, Rs;
|
|
19291
19291
|
const ja = class ja {
|
|
19292
19292
|
constructor(t = ja.default) {
|
|
19293
19293
|
sn(this, qn);
|
|
19294
|
-
sn(this, Yo);
|
|
19295
19294
|
sn(this, Zo);
|
|
19296
19295
|
sn(this, Jo);
|
|
19297
19296
|
sn(this, Qo);
|
|
19298
19297
|
sn(this, ec);
|
|
19299
19298
|
sn(this, tc);
|
|
19300
19299
|
sn(this, nc);
|
|
19301
|
-
sn(this,
|
|
19300
|
+
sn(this, rc);
|
|
19301
|
+
sn(this, Rs, 0);
|
|
19302
19302
|
const { initialInterval: n = L0, randomizationFactor: r = M0, multiplier: i = q0, maxInterval: s = V0, maxElapsedTime: o = $0, maxIterations: c = D0, date: a = Date } = t;
|
|
19303
|
-
Yt(this, qn, n), Yt(this,
|
|
19303
|
+
Yt(this, qn, n), Yt(this, Zo, r), Yt(this, Jo, i), Yt(this, Qo, s), Yt(this, rc, a), Yt(this, ec, a.now()), Yt(this, tc, o), Yt(this, nc, c);
|
|
19304
19304
|
}
|
|
19305
19305
|
get ellapsedTimeInMsec() {
|
|
19306
|
-
return Fe(this,
|
|
19306
|
+
return Fe(this, rc).now() - Fe(this, ec);
|
|
19307
19307
|
}
|
|
19308
19308
|
get currentInterval() {
|
|
19309
19309
|
return Fe(this, qn);
|
|
19310
19310
|
}
|
|
19311
19311
|
get count() {
|
|
19312
|
-
return Fe(this,
|
|
19312
|
+
return Fe(this, Rs);
|
|
19313
19313
|
}
|
|
19314
19314
|
get randomValueFromInterval() {
|
|
19315
|
-
const t = Fe(this,
|
|
19315
|
+
const t = Fe(this, Zo) * Fe(this, qn), n = Fe(this, qn) - t, r = Fe(this, qn) + t;
|
|
19316
19316
|
return Math.random() * (r - n) + n;
|
|
19317
19317
|
}
|
|
19318
19318
|
incrementCurrentInterval() {
|
|
19319
|
-
return Yt(this, qn, Math.min(Fe(this, qn) * Fe(this,
|
|
19319
|
+
return Yt(this, qn, Math.min(Fe(this, qn) * Fe(this, Jo), Fe(this, Qo))), Vh(this, Rs)._++, Fe(this, qn);
|
|
19320
19320
|
}
|
|
19321
19321
|
next() {
|
|
19322
|
-
return this.ellapsedTimeInMsec >= Fe(this,
|
|
19322
|
+
return this.ellapsedTimeInMsec >= Fe(this, tc) || Fe(this, Rs) >= Fe(this, nc) ? null : (this.incrementCurrentInterval(), this.randomValueFromInterval);
|
|
19323
19323
|
}
|
|
19324
19324
|
};
|
|
19325
|
-
qn = new WeakMap(),
|
|
19325
|
+
qn = new WeakMap(), Zo = new WeakMap(), Jo = new WeakMap(), Qo = new WeakMap(), ec = new WeakMap(), tc = new WeakMap(), nc = new WeakMap(), rc = new WeakMap(), Rs = new WeakMap(), ja.default = {
|
|
19326
19326
|
initialInterval: L0,
|
|
19327
19327
|
randomizationFactor: M0,
|
|
19328
19328
|
multiplier: q0,
|
|
@@ -19344,16 +19344,16 @@ function P8() {
|
|
|
19344
19344
|
if (window.fetch)
|
|
19345
19345
|
e = window.fetch.bind(window);
|
|
19346
19346
|
else
|
|
19347
|
-
throw un.fromCode(new
|
|
19347
|
+
throw un.fromCode(new vo("Fetch implementation was not available. You appear to be in a browser context, but window.fetch was not present."));
|
|
19348
19348
|
else if (typeof globalThis < "u")
|
|
19349
19349
|
if (globalThis.fetch)
|
|
19350
19350
|
e = globalThis.fetch.bind(globalThis);
|
|
19351
19351
|
else
|
|
19352
|
-
throw un.fromCode(new
|
|
19352
|
+
throw un.fromCode(new vo("Fetch implementation was not available. You appear to be in a Node.js context, but global.fetch was not available."));
|
|
19353
19353
|
else typeof self < "u" && self.fetch && (e = self.fetch.bind(self));
|
|
19354
19354
|
if (e)
|
|
19355
19355
|
return e;
|
|
19356
|
-
throw un.fromCode(new
|
|
19356
|
+
throw un.fromCode(new vo("Fetch implementation was not available. Please provide fetch to the HttpAgent constructor, or ensure it is available in the window or global context."));
|
|
19357
19357
|
}
|
|
19358
19358
|
function R8(e) {
|
|
19359
19359
|
let t;
|
|
@@ -19403,7 +19403,7 @@ class vr {
|
|
|
19403
19403
|
for (const u of c) {
|
|
19404
19404
|
const { timestamp: f, identity: l } = u, d = Ke.fromUint8Array(l).toText();
|
|
19405
19405
|
let y;
|
|
19406
|
-
if (o ===
|
|
19406
|
+
if (o === Fs.Replied) {
|
|
19407
19407
|
const { reply: S } = i;
|
|
19408
19408
|
y = Ra({
|
|
19409
19409
|
status: o,
|
|
@@ -19411,7 +19411,7 @@ class vr {
|
|
|
19411
19411
|
timestamp: BigInt(f),
|
|
19412
19412
|
request_id: a
|
|
19413
19413
|
});
|
|
19414
|
-
} else if (o ===
|
|
19414
|
+
} else if (o === Fs.Rejected) {
|
|
19415
19415
|
const { reject_code: S, reject_message: w, error_code: T } = i;
|
|
19416
19416
|
y = Ra({
|
|
19417
19417
|
status: o,
|
|
@@ -19432,7 +19432,7 @@ class vr {
|
|
|
19432
19432
|
throw vn.fromCode(new fh(d));
|
|
19433
19433
|
}
|
|
19434
19434
|
return i;
|
|
19435
|
-
}, this.config = t, this.#s = t.fetch || P8() || fetch.bind(globalThis), this.#m = t.fetchOptions, this.#b = t.callOptions, this.#e = t.shouldFetchRootKey ?? !1, this.#w = t.shouldSyncTime ?? !1, t.rootKey ? this.rootKey = t.rootKey : this.#e ? this.rootKey = null : this.rootKey =
|
|
19435
|
+
}, this.config = t, this.#s = t.fetch || P8() || fetch.bind(globalThis), this.#m = t.fetchOptions, this.#b = t.callOptions, this.#e = t.shouldFetchRootKey ?? !1, this.#w = t.shouldSyncTime ?? !1, t.rootKey ? this.rootKey = t.rootKey : this.#e ? this.rootKey = null : this.rootKey = ac(T8);
|
|
19436
19436
|
const n = R8(t.host);
|
|
19437
19437
|
this.host = new URL(n), t.verifyQuerySignatures !== void 0 && (this.#d = t.verifyQuerySignatures), this.#c = t.retryTimes ?? 3;
|
|
19438
19438
|
const r = () => new dl({
|
|
@@ -19443,9 +19443,9 @@ class vr {
|
|
|
19443
19443
|
this.#r = `${i}${s ? ":" + s : ""}`;
|
|
19444
19444
|
}
|
|
19445
19445
|
if (this.#n = Promise.resolve(t.identity || new u0()), t.ingressExpiryInMinutes && t.ingressExpiryInMinutes > 5)
|
|
19446
|
-
throw et.fromCode(new
|
|
19446
|
+
throw et.fromCode(new ws("The maximum ingress expiry time is 5 minutes.", t.ingressExpiryInMinutes));
|
|
19447
19447
|
if (t.ingressExpiryInMinutes && t.ingressExpiryInMinutes <= 0)
|
|
19448
|
-
throw et.fromCode(new
|
|
19448
|
+
throw et.fromCode(new ws("Ingress expiry time must be greater than 0.", t.ingressExpiryInMinutes));
|
|
19449
19449
|
this.#o = t.ingressExpiryInMinutes || 5, this.addTransform("update", l0(al)), t.useQueryNonces && this.addTransform("query", l0(al)), t.logToConsole && this.log.subscribe((i) => {
|
|
19450
19450
|
i.level === "error" ? console.error(i.message) : i.level === "warn" ? console.warn(i.message) : console.log(i.message);
|
|
19451
19451
|
});
|
|
@@ -19563,7 +19563,7 @@ class vr {
|
|
|
19563
19563
|
// disable v3 api
|
|
19564
19564
|
callSync: !1
|
|
19565
19565
|
}, r);
|
|
19566
|
-
if (_.hasCode(
|
|
19566
|
+
if (_.hasCode(ws) && !this.#g)
|
|
19567
19567
|
return await this.syncTime(o), this.call(o, n, r);
|
|
19568
19568
|
_.code.requestContext = {
|
|
19569
19569
|
requestId: E,
|
|
@@ -19583,7 +19583,7 @@ class vr {
|
|
|
19583
19583
|
backoff: o,
|
|
19584
19584
|
delay: a
|
|
19585
19585
|
}), a === null)
|
|
19586
|
-
throw fn.fromCode(new
|
|
19586
|
+
throw fn.fromCode(new Mo(`Backoff strategy exhausted after ${c} attempts.`, s));
|
|
19587
19587
|
a > 0 && await new Promise((y) => setTimeout(y, a));
|
|
19588
19588
|
let u;
|
|
19589
19589
|
try {
|
|
@@ -19643,7 +19643,7 @@ class vr {
|
|
|
19643
19643
|
async #p(t) {
|
|
19644
19644
|
const { requestFn: n, backoff: r, tries: i } = t, s = i === 0 ? 0 : r.next();
|
|
19645
19645
|
if (s === null)
|
|
19646
|
-
throw gt.fromCode(new
|
|
19646
|
+
throw gt.fromCode(new Mo(`Retry strategy exhausted after ${i} attempts.`));
|
|
19647
19647
|
s > 0 && await new Promise((f) => setTimeout(f, s));
|
|
19648
19648
|
let o, c = new Uint8Array();
|
|
19649
19649
|
try {
|
|
@@ -19669,7 +19669,7 @@ class vr {
|
|
|
19669
19669
|
if (o.status === k8 && o.url.includes("api/v3"))
|
|
19670
19670
|
throw gt.fromCode(new Oa());
|
|
19671
19671
|
if (u.startsWith("Invalid request expiry: "))
|
|
19672
|
-
throw et.fromCode(new
|
|
19672
|
+
throw et.fromCode(new ws(u, this.#o));
|
|
19673
19673
|
if (i < this.#c)
|
|
19674
19674
|
return await this.#p({ requestFn: n, backoff: r, tries: i + 1 });
|
|
19675
19675
|
throw gt.fromCode(new Ia(o.status, o.statusText, a, u));
|
|
@@ -19682,7 +19682,7 @@ class vr {
|
|
|
19682
19682
|
if (!c)
|
|
19683
19683
|
throw un.fromCode(new Pi());
|
|
19684
19684
|
const a = Ke.from(t), u = c.getPrincipal(), f = gf(this.#o, this.#i), l = {
|
|
19685
|
-
request_type:
|
|
19685
|
+
request_type: Lo.Query,
|
|
19686
19686
|
canister_id: a,
|
|
19687
19687
|
method_name: n.methodName,
|
|
19688
19688
|
arg: n.arg,
|
|
@@ -19767,7 +19767,7 @@ class vr {
|
|
|
19767
19767
|
},
|
|
19768
19768
|
endpoint: Hi.ReadState,
|
|
19769
19769
|
body: {
|
|
19770
|
-
request_type:
|
|
19770
|
+
request_type: Lo.ReadState,
|
|
19771
19771
|
paths: t.paths,
|
|
19772
19772
|
sender: i,
|
|
19773
19773
|
ingress_expiry: gf(this.#o, this.#i)
|
|
@@ -19825,10 +19825,10 @@ class vr {
|
|
|
19825
19825
|
if (r && "tree" in r)
|
|
19826
19826
|
n = r.tree;
|
|
19827
19827
|
else
|
|
19828
|
-
throw gt.fromCode(new
|
|
19829
|
-
const i =
|
|
19828
|
+
throw gt.fromCode(new wc("Could not decode time from response"));
|
|
19829
|
+
const i = Sc(["time"], n);
|
|
19830
19830
|
if (i.status !== In.Found)
|
|
19831
|
-
throw gt.fromCode(new
|
|
19831
|
+
throw gt.fromCode(new Ms("Time was not found in the response or was not in its expected format.", i.status));
|
|
19832
19832
|
if (!(i.value instanceof Uint8Array) && !ArrayBuffer.isView(i))
|
|
19833
19833
|
throw gt.fromCode(new du("Time was not in its expected format."));
|
|
19834
19834
|
const s = bh(i.value);
|
|
@@ -19905,7 +19905,7 @@ class vr {
|
|
|
19905
19905
|
if (this.rootKey === null && this.host.toString() !== "https://icp-api.io" && this.#e)
|
|
19906
19906
|
await this.fetchRootKey();
|
|
19907
19907
|
else
|
|
19908
|
-
throw un.fromCode(new
|
|
19908
|
+
throw un.fromCode(new Xs(this.#e));
|
|
19909
19909
|
}
|
|
19910
19910
|
async #x(t) {
|
|
19911
19911
|
this.#w && !this.hasSyncedTime() && await this.syncTime(t);
|
|
@@ -19955,7 +19955,7 @@ class vr {
|
|
|
19955
19955
|
}
|
|
19956
19956
|
function gf(e, t) {
|
|
19957
19957
|
const n = e * pl;
|
|
19958
|
-
return
|
|
19958
|
+
return Os.fromDeltaInMilliseconds(n, t);
|
|
19959
19959
|
}
|
|
19960
19960
|
const U8 = 300 * 1e3;
|
|
19961
19961
|
function C8() {
|
|
@@ -19975,7 +19975,7 @@ function M8(e) {
|
|
|
19975
19975
|
const t = Date.now() + e;
|
|
19976
19976
|
return async (n, r, i) => {
|
|
19977
19977
|
if (Date.now() > t)
|
|
19978
|
-
throw gt.fromCode(new
|
|
19978
|
+
throw gt.fromCode(new Mo(`Request timed out after ${e} msec`, r, i));
|
|
19979
19979
|
};
|
|
19980
19980
|
}
|
|
19981
19981
|
function q8(e, t) {
|
|
@@ -20003,7 +20003,7 @@ function $8(e, t) {
|
|
|
20003
20003
|
return Kw(e, t) && typeof e[t] == "function";
|
|
20004
20004
|
}
|
|
20005
20005
|
function j0(e) {
|
|
20006
|
-
return mf(e, "body") && mf(e.body, "content") && e.body.content.request_type ===
|
|
20006
|
+
return mf(e, "body") && mf(e.body, "content") && e.body.content.request_type === Lo.ReadState && mf(e.body.content, "ingress_expiry") && typeof e.body.content.ingress_expiry == "object" && e.body.content.ingress_expiry !== null && $8(e.body.content.ingress_expiry, "toHash");
|
|
20007
20007
|
}
|
|
20008
20008
|
async function Gw(e, t, n, r = {}) {
|
|
20009
20009
|
const i = [pt("request_status"), n];
|
|
@@ -20013,7 +20013,7 @@ async function Gw(e, t, n, r = {}) {
|
|
|
20013
20013
|
agent: e,
|
|
20014
20014
|
pollingOptions: r
|
|
20015
20015
|
}), s = await e.readState(t, { paths: [i] }, void 0, o)) : s = await e.readState(t, { paths: [i] }), e.rootKey == null)
|
|
20016
|
-
throw un.fromCode(new
|
|
20016
|
+
throw un.fromCode(new Xs());
|
|
20017
20017
|
const a = await Di.create({
|
|
20018
20018
|
certificate: s.certificate,
|
|
20019
20019
|
rootKey: e.rootKey,
|
|
@@ -20041,12 +20041,12 @@ async function Gw(e, t, n, r = {}) {
|
|
|
20041
20041
|
}
|
|
20042
20042
|
case Er.Rejected: {
|
|
20043
20043
|
const l = new Uint8Array(Sn(a.lookup_path([...i, "reject_code"])))[0], d = new TextDecoder().decode(Sn(a.lookup_path([...i, "reject_message"]))), y = Sn(a.lookup_path([...i, "error_code"])), g = y ? new TextDecoder().decode(y) : void 0;
|
|
20044
|
-
throw
|
|
20044
|
+
throw xs.fromCode(new gu(n, l, d, g));
|
|
20045
20045
|
}
|
|
20046
20046
|
case Er.Done:
|
|
20047
20047
|
throw fn.fromCode(new ih(n));
|
|
20048
20048
|
}
|
|
20049
|
-
throw
|
|
20049
|
+
throw vs;
|
|
20050
20050
|
}
|
|
20051
20051
|
async function D8(e) {
|
|
20052
20052
|
const { paths: t, agent: n, pollingOptions: r } = e;
|
|
@@ -20163,15 +20163,15 @@ function j8(e, t, n, r) {
|
|
|
20163
20163
|
requestDetails: l.requestDetails
|
|
20164
20164
|
};
|
|
20165
20165
|
switch (l.status) {
|
|
20166
|
-
case
|
|
20166
|
+
case Fs.Rejected: {
|
|
20167
20167
|
const y = new nh(l.requestId, l.reject_code, l.reject_message, l.error_code, l.signatures);
|
|
20168
20168
|
throw y.callContext = {
|
|
20169
20169
|
canisterId: u,
|
|
20170
20170
|
methodName: t,
|
|
20171
20171
|
httpDetails: d
|
|
20172
|
-
},
|
|
20172
|
+
}, xs.fromCode(y);
|
|
20173
20173
|
}
|
|
20174
|
-
case
|
|
20174
|
+
case Fs.Replied:
|
|
20175
20175
|
return n.annotations.includes(yl) ? {
|
|
20176
20176
|
httpDetails: d,
|
|
20177
20177
|
result: us(n.retTypes, l.reply.arg)
|
|
@@ -20198,7 +20198,7 @@ function j8(e, t, n, r) {
|
|
|
20198
20198
|
let S, w;
|
|
20199
20199
|
if (fx(E.body)) {
|
|
20200
20200
|
if (a.rootKey == null)
|
|
20201
|
-
throw un.fromCode(new
|
|
20201
|
+
throw un.fromCode(new Xs());
|
|
20202
20202
|
const R = E.body.certificate;
|
|
20203
20203
|
w = await Di.create({
|
|
20204
20204
|
certificate: R,
|
|
@@ -20218,7 +20218,7 @@ function j8(e, t, n, r) {
|
|
|
20218
20218
|
canisterId: d,
|
|
20219
20219
|
methodName: t,
|
|
20220
20220
|
httpDetails: E
|
|
20221
|
-
},
|
|
20221
|
+
}, xs.fromCode($);
|
|
20222
20222
|
}
|
|
20223
20223
|
}
|
|
20224
20224
|
} else if (ux(E.body)) {
|
|
@@ -20227,7 +20227,7 @@ function j8(e, t, n, r) {
|
|
|
20227
20227
|
canisterId: d,
|
|
20228
20228
|
methodName: t,
|
|
20229
20229
|
httpDetails: E
|
|
20230
|
-
},
|
|
20230
|
+
}, xs.fromCode(U);
|
|
20231
20231
|
}
|
|
20232
20232
|
if (E.status === 202) {
|
|
20233
20233
|
const R = {
|
|
@@ -20331,7 +20331,7 @@ function Yn() {
|
|
|
20331
20331
|
wif: 239
|
|
20332
20332
|
}), lr;
|
|
20333
20333
|
}
|
|
20334
|
-
var bf = {},
|
|
20334
|
+
var bf = {}, ao = {}, Ef = {}, hr = {}, G0;
|
|
20335
20335
|
function zw() {
|
|
20336
20336
|
if (G0) return hr;
|
|
20337
20337
|
G0 = 1, Object.defineProperty(hr, "__esModule", { value: !0 }), hr.encode = hr.decode = hr.check = void 0;
|
|
@@ -20952,7 +20952,7 @@ var ep;
|
|
|
20952
20952
|
function zt() {
|
|
20953
20953
|
return ep || (ep = 1, (function(e) {
|
|
20954
20954
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.oneOf = e.Null = e.BufferN = e.Function = e.UInt32 = e.UInt8 = e.tuple = e.maybe = e.Hex = e.Buffer = e.String = e.Boolean = e.Array = e.Number = e.Hash256bit = e.Hash160bit = e.Buffer256bit = e.isTaptree = e.isTapleaf = e.TAPLEAF_VERSION_MASK = e.Satoshi = e.isPoint = e.stacksEqual = e.typeforce = void 0;
|
|
20955
|
-
const t =
|
|
20955
|
+
const t = ic();
|
|
20956
20956
|
e.typeforce = X8();
|
|
20957
20957
|
const n = t.Buffer.alloc(32, 0), r = t.Buffer.from(
|
|
20958
20958
|
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
|
@@ -21176,8 +21176,8 @@ function mi() {
|
|
|
21176
21176
|
}
|
|
21177
21177
|
var ip;
|
|
21178
21178
|
function Y8() {
|
|
21179
|
-
if (ip) return
|
|
21180
|
-
ip = 1, Object.defineProperty(
|
|
21179
|
+
if (ip) return ao;
|
|
21180
|
+
ip = 1, Object.defineProperty(ao, "__esModule", { value: !0 }), ao.p2data = void 0;
|
|
21181
21181
|
const e = Yn(), t = rn(), n = zt(), r = mi(), i = t.OPS;
|
|
21182
21182
|
function s(o, c) {
|
|
21183
21183
|
if (!o.data && !o.output) throw new TypeError("Not enough data");
|
|
@@ -21208,12 +21208,12 @@ function Y8() {
|
|
|
21208
21208
|
}
|
|
21209
21209
|
return Object.assign(u, o);
|
|
21210
21210
|
}
|
|
21211
|
-
return
|
|
21211
|
+
return ao.p2data = s, ao;
|
|
21212
21212
|
}
|
|
21213
|
-
var
|
|
21213
|
+
var uo = {}, sp;
|
|
21214
21214
|
function Z8() {
|
|
21215
|
-
if (sp) return
|
|
21216
|
-
sp = 1, Object.defineProperty(
|
|
21215
|
+
if (sp) return uo;
|
|
21216
|
+
sp = 1, Object.defineProperty(uo, "__esModule", { value: !0 }), uo.p2ms = void 0;
|
|
21217
21217
|
const e = Yn(), t = rn(), n = zt(), r = mi(), i = t.OPS, s = i.OP_RESERVED;
|
|
21218
21218
|
function o(c, a) {
|
|
21219
21219
|
if (!c.input && !c.output && !(c.pubkeys && c.m !== void 0) && !c.signatures)
|
|
@@ -21314,12 +21314,12 @@ function Z8() {
|
|
|
21314
21314
|
}
|
|
21315
21315
|
return Object.assign(l, c);
|
|
21316
21316
|
}
|
|
21317
|
-
return
|
|
21317
|
+
return uo.p2ms = o, uo;
|
|
21318
21318
|
}
|
|
21319
|
-
var
|
|
21319
|
+
var fo = {}, op;
|
|
21320
21320
|
function J8() {
|
|
21321
|
-
if (op) return
|
|
21322
|
-
op = 1, Object.defineProperty(
|
|
21321
|
+
if (op) return fo;
|
|
21322
|
+
op = 1, Object.defineProperty(fo, "__esModule", { value: !0 }), fo.p2pk = void 0;
|
|
21323
21323
|
const e = Yn(), t = rn(), n = zt(), r = mi(), i = t.OPS;
|
|
21324
21324
|
function s(o, c) {
|
|
21325
21325
|
if (!o.input && !o.output && !o.pubkey && !o.input && !o.signature)
|
|
@@ -21369,9 +21369,9 @@ function J8() {
|
|
|
21369
21369
|
}
|
|
21370
21370
|
return Object.assign(f, o);
|
|
21371
21371
|
}
|
|
21372
|
-
return
|
|
21372
|
+
return fo.p2pk = s, fo;
|
|
21373
21373
|
}
|
|
21374
|
-
var
|
|
21374
|
+
var lo = {}, vf = {}, vi = {}, Jt = {}, cp;
|
|
21375
21375
|
function Zw() {
|
|
21376
21376
|
if (cp) return Jt;
|
|
21377
21377
|
cp = 1, Object.defineProperty(Jt, "__esModule", { value: !0 }), Jt.ripemd160 = Jt.RIPEMD160 = Jt.md5 = Jt.MD5 = Jt.sha1 = Jt.SHA1 = void 0;
|
|
@@ -22313,8 +22313,8 @@ function xh() {
|
|
|
22313
22313
|
}
|
|
22314
22314
|
var gp;
|
|
22315
22315
|
function iA() {
|
|
22316
|
-
if (gp) return
|
|
22317
|
-
gp = 1, Object.defineProperty(
|
|
22316
|
+
if (gp) return lo;
|
|
22317
|
+
gp = 1, Object.defineProperty(lo, "__esModule", { value: !0 }), lo.p2pkh = void 0;
|
|
22318
22318
|
const e = Cr(), t = Yn(), n = rn(), r = zt(), i = mi(), s = xh(), o = n.OPS;
|
|
22319
22319
|
function c(a, u) {
|
|
22320
22320
|
if (!a.address && !a.hash && !a.output && !a.pubkey && !a.input)
|
|
@@ -22409,12 +22409,12 @@ function iA() {
|
|
|
22409
22409
|
}
|
|
22410
22410
|
return Object.assign(y, a);
|
|
22411
22411
|
}
|
|
22412
|
-
return
|
|
22412
|
+
return lo.p2pkh = c, lo;
|
|
22413
22413
|
}
|
|
22414
|
-
var
|
|
22414
|
+
var ho = {}, mp;
|
|
22415
22415
|
function sA() {
|
|
22416
|
-
if (mp) return
|
|
22417
|
-
mp = 1, Object.defineProperty(
|
|
22416
|
+
if (mp) return ho;
|
|
22417
|
+
mp = 1, Object.defineProperty(ho, "__esModule", { value: !0 }), ho.p2sh = void 0;
|
|
22418
22418
|
const e = Cr(), t = Yn(), n = rn(), r = zt(), i = mi(), s = xh(), o = n.OPS;
|
|
22419
22419
|
function c(a, u) {
|
|
22420
22420
|
if (!a.address && !a.hash && !a.output && !a.redeem && !a.input)
|
|
@@ -22554,13 +22554,13 @@ function sA() {
|
|
|
22554
22554
|
}
|
|
22555
22555
|
return Object.assign(l, a);
|
|
22556
22556
|
}
|
|
22557
|
-
return
|
|
22557
|
+
return ho.p2sh = c, ho;
|
|
22558
22558
|
}
|
|
22559
|
-
var
|
|
22559
|
+
var po = {}, wp;
|
|
22560
22560
|
function oA() {
|
|
22561
|
-
if (wp) return
|
|
22562
|
-
wp = 1, Object.defineProperty(
|
|
22563
|
-
const e = Cr(), t = Yn(), n = rn(), r = zt(), i = mi(), s =
|
|
22561
|
+
if (wp) return po;
|
|
22562
|
+
wp = 1, Object.defineProperty(po, "__esModule", { value: !0 }), po.p2wpkh = void 0;
|
|
22563
|
+
const e = Cr(), t = Yn(), n = rn(), r = zt(), i = mi(), s = lc(), o = n.OPS, c = Buffer.alloc(0);
|
|
22564
22564
|
function a(u, f) {
|
|
22565
22565
|
if (!u.address && !u.hash && !u.output && !u.pubkey && !u.witness)
|
|
22566
22566
|
throw new TypeError("Not enough data");
|
|
@@ -22658,13 +22658,13 @@ function oA() {
|
|
|
22658
22658
|
}
|
|
22659
22659
|
return Object.assign(y, u);
|
|
22660
22660
|
}
|
|
22661
|
-
return
|
|
22661
|
+
return po.p2wpkh = a, po;
|
|
22662
22662
|
}
|
|
22663
|
-
var
|
|
22663
|
+
var yo = {}, bp;
|
|
22664
22664
|
function cA() {
|
|
22665
|
-
if (bp) return
|
|
22666
|
-
bp = 1, Object.defineProperty(
|
|
22667
|
-
const e = Cr(), t = Yn(), n = rn(), r = zt(), i = mi(), s =
|
|
22665
|
+
if (bp) return yo;
|
|
22666
|
+
bp = 1, Object.defineProperty(yo, "__esModule", { value: !0 }), yo.p2wsh = void 0;
|
|
22667
|
+
const e = Cr(), t = Yn(), n = rn(), r = zt(), i = mi(), s = lc(), o = n.OPS, c = Buffer.alloc(0);
|
|
22668
22668
|
function a(f) {
|
|
22669
22669
|
return !!(Buffer.isBuffer(f) && f.length === 65 && f[0] === 4 && (0, r.isPoint)(f));
|
|
22670
22670
|
}
|
|
@@ -22801,9 +22801,9 @@ function cA() {
|
|
|
22801
22801
|
}
|
|
22802
22802
|
return Object.assign(m, f);
|
|
22803
22803
|
}
|
|
22804
|
-
return
|
|
22804
|
+
return yo.p2wsh = u, yo;
|
|
22805
22805
|
}
|
|
22806
|
-
var
|
|
22806
|
+
var go = {}, Oi = {}, Ep;
|
|
22807
22807
|
function Ah() {
|
|
22808
22808
|
if (Ep) return Oi;
|
|
22809
22809
|
Ep = 1, Object.defineProperty(Oi, "__esModule", { value: !0 }), Oi.getEccLib = Oi.initEccLib = void 0;
|
|
@@ -22876,12 +22876,12 @@ function Ah() {
|
|
|
22876
22876
|
];
|
|
22877
22877
|
return Oi;
|
|
22878
22878
|
}
|
|
22879
|
-
var kf = {}, Pt = {},
|
|
22879
|
+
var kf = {}, Pt = {}, Lc = { exports: {} };
|
|
22880
22880
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
22881
22881
|
var _p;
|
|
22882
22882
|
function aA() {
|
|
22883
22883
|
return _p || (_p = 1, (function(e, t) {
|
|
22884
|
-
var n =
|
|
22884
|
+
var n = ic(), r = n.Buffer;
|
|
22885
22885
|
function i(o, c) {
|
|
22886
22886
|
for (var a in o)
|
|
22887
22887
|
c[a] = o[a];
|
|
@@ -22908,7 +22908,7 @@ function aA() {
|
|
|
22908
22908
|
throw new TypeError("Argument must be a number");
|
|
22909
22909
|
return n.SlowBuffer(o);
|
|
22910
22910
|
};
|
|
22911
|
-
})(
|
|
22911
|
+
})(Lc, Lc.exports)), Lc.exports;
|
|
22912
22912
|
}
|
|
22913
22913
|
var Pf, Sp;
|
|
22914
22914
|
function uA() {
|
|
@@ -23064,7 +23064,7 @@ var xp;
|
|
|
23064
23064
|
function vh() {
|
|
23065
23065
|
return xp || (xp = 1, (function(e) {
|
|
23066
23066
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.tweakKey = e.tapTweakHash = e.tapleafHash = e.findScriptPath = e.toHashTree = e.rootHashFromPath = e.MAX_TAPTREE_DEPTH = e.LEAF_VERSION_TAPSCRIPT = void 0;
|
|
23067
|
-
const t =
|
|
23067
|
+
const t = ic(), n = Ah(), r = Cr(), i = Tu(), s = zt();
|
|
23068
23068
|
e.LEAF_VERSION_TAPSCRIPT = 192, e.MAX_TAPTREE_DEPTH = 128;
|
|
23069
23069
|
const o = (m) => "left" in m && "right" in m;
|
|
23070
23070
|
function c(m, E) {
|
|
@@ -23142,9 +23142,9 @@ function vh() {
|
|
|
23142
23142
|
}
|
|
23143
23143
|
var Ap;
|
|
23144
23144
|
function fA() {
|
|
23145
|
-
if (Ap) return
|
|
23146
|
-
Ap = 1, Object.defineProperty(
|
|
23147
|
-
const e =
|
|
23145
|
+
if (Ap) return go;
|
|
23146
|
+
Ap = 1, Object.defineProperty(go, "__esModule", { value: !0 }), go.p2tr = void 0;
|
|
23147
|
+
const e = ic(), t = Yn(), n = rn(), r = zt(), i = Ah(), s = vh(), o = mi(), c = lc(), a = Ih(), u = n.OPS, f = 1, l = 80;
|
|
23148
23148
|
function d(y, g) {
|
|
23149
23149
|
if (!y.address && !y.output && !y.pubkey && !y.internalPubkey && !(y.witness && y.witness.length > 1))
|
|
23150
23150
|
throw new TypeError("Not enough data");
|
|
@@ -23343,10 +23343,10 @@ function fA() {
|
|
|
23343
23343
|
}
|
|
23344
23344
|
return Object.assign(w, y);
|
|
23345
23345
|
}
|
|
23346
|
-
return
|
|
23346
|
+
return go.p2tr = d, go;
|
|
23347
23347
|
}
|
|
23348
23348
|
var vp;
|
|
23349
|
-
function
|
|
23349
|
+
function Tc() {
|
|
23350
23350
|
return vp || (vp = 1, (function(e) {
|
|
23351
23351
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.p2tr = e.p2wsh = e.p2wpkh = e.p2sh = e.p2pkh = e.p2pk = e.p2ms = e.embed = void 0;
|
|
23352
23352
|
const t = Y8();
|
|
@@ -23411,7 +23411,7 @@ var Ip;
|
|
|
23411
23411
|
function Ih() {
|
|
23412
23412
|
if (Ip) return Zt;
|
|
23413
23413
|
Ip = 1, Object.defineProperty(Zt, "__esModule", { value: !0 }), Zt.toOutputScript = Zt.fromOutputScript = Zt.toBech32 = Zt.toBase58Check = Zt.fromBech32 = Zt.fromBase58Check = void 0;
|
|
23414
|
-
const e = Yn(), t =
|
|
23414
|
+
const e = Yn(), t = Tc(), n = rn(), r = zt(), i = lc(), s = xh(), o = 40, c = 2, a = 16, u = 2, f = 80, l = "WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";
|
|
23415
23415
|
function d(w, T) {
|
|
23416
23416
|
const O = w.slice(2);
|
|
23417
23417
|
if (O.length < c || O.length > o)
|
|
@@ -23530,10 +23530,10 @@ function Ih() {
|
|
|
23530
23530
|
}
|
|
23531
23531
|
return Zt.toOutputScript = S, Zt;
|
|
23532
23532
|
}
|
|
23533
|
-
var
|
|
23533
|
+
var mo = {}, wo = {}, Op;
|
|
23534
23534
|
function lA() {
|
|
23535
|
-
if (Op) return
|
|
23536
|
-
Op = 1, Object.defineProperty(
|
|
23535
|
+
if (Op) return wo;
|
|
23536
|
+
Op = 1, Object.defineProperty(wo, "__esModule", { value: !0 }), wo.fastMerkleRoot = void 0;
|
|
23537
23537
|
function e(t, n) {
|
|
23538
23538
|
if (!Array.isArray(t)) throw TypeError("Expected values Array");
|
|
23539
23539
|
if (typeof n != "function")
|
|
@@ -23550,12 +23550,12 @@ function lA() {
|
|
|
23550
23550
|
}
|
|
23551
23551
|
return i[0];
|
|
23552
23552
|
}
|
|
23553
|
-
return
|
|
23553
|
+
return wo.fastMerkleRoot = e, wo;
|
|
23554
23554
|
}
|
|
23555
|
-
var
|
|
23556
|
-
function
|
|
23557
|
-
if (Bp) return
|
|
23558
|
-
Bp = 1, Object.defineProperty(
|
|
23555
|
+
var bo = {}, Bp;
|
|
23556
|
+
function xc() {
|
|
23557
|
+
if (Bp) return bo;
|
|
23558
|
+
Bp = 1, Object.defineProperty(bo, "__esModule", { value: !0 }), bo.Transaction = void 0;
|
|
23559
23559
|
const e = Tu(), t = Cr(), n = rn(), r = rn(), i = zt(), { typeforce: s } = i;
|
|
23560
23560
|
function o(E) {
|
|
23561
23561
|
const _ = E.length;
|
|
@@ -23840,13 +23840,13 @@ function Tc() {
|
|
|
23840
23840
|
}), T.writeUInt32(this.locktime), S !== void 0 ? _.slice(S, T.offset) : _;
|
|
23841
23841
|
}
|
|
23842
23842
|
}
|
|
23843
|
-
return
|
|
23843
|
+
return bo.Transaction = m, m.DEFAULT_SEQUENCE = 4294967295, m.SIGHASH_DEFAULT = 0, m.SIGHASH_ALL = 1, m.SIGHASH_NONE = 2, m.SIGHASH_SINGLE = 3, m.SIGHASH_ANYONECANPAY = 128, m.SIGHASH_OUTPUT_MASK = 3, m.SIGHASH_INPUT_MASK = 128, m.ADVANCED_TRANSACTION_MARKER = 0, m.ADVANCED_TRANSACTION_FLAG = 1, bo;
|
|
23844
23844
|
}
|
|
23845
23845
|
var Np;
|
|
23846
23846
|
function hA() {
|
|
23847
|
-
if (Np) return
|
|
23848
|
-
Np = 1, Object.defineProperty(
|
|
23849
|
-
const e = Tu(), t = Cr(), n = lA(), r =
|
|
23847
|
+
if (Np) return mo;
|
|
23848
|
+
Np = 1, Object.defineProperty(mo, "__esModule", { value: !0 }), mo.Block = void 0;
|
|
23849
|
+
const e = Tu(), t = Cr(), n = lA(), r = xc(), i = zt(), { typeforce: s } = i, o = new TypeError(
|
|
23850
23850
|
"Cannot compute merkle root for zero transactions"
|
|
23851
23851
|
), c = new TypeError(
|
|
23852
23852
|
"Cannot compute witness commit for non-segwit block"
|
|
@@ -23962,7 +23962,7 @@ function hA() {
|
|
|
23962
23962
|
return this.witnessCommit.compare(d) === 0;
|
|
23963
23963
|
}
|
|
23964
23964
|
}
|
|
23965
|
-
|
|
23965
|
+
mo.Block = a;
|
|
23966
23966
|
function u(l) {
|
|
23967
23967
|
return l instanceof Array && l[0] && l[0].ins && l[0].ins instanceof Array && l[0].ins[0] && l[0].ins[0].witness && l[0].ins[0].witness instanceof Array && l[0].ins[0].witness.length > 0;
|
|
23968
23968
|
}
|
|
@@ -23973,9 +23973,9 @@ function hA() {
|
|
|
23973
23973
|
)
|
|
23974
23974
|
);
|
|
23975
23975
|
}
|
|
23976
|
-
return
|
|
23976
|
+
return mo;
|
|
23977
23977
|
}
|
|
23978
|
-
var
|
|
23978
|
+
var Eo = {}, Vc = {}, $c = {}, Rf = {}, fs = {}, ls = {}, Uf = {}, kp;
|
|
23979
23979
|
function qt() {
|
|
23980
23980
|
return kp || (kp = 1, (function(e) {
|
|
23981
23981
|
Object.defineProperty(e, "__esModule", { value: !0 }), (function(t) {
|
|
@@ -24066,10 +24066,10 @@ function dA() {
|
|
|
24066
24066
|
}
|
|
24067
24067
|
return jr.canAddToArray = s, jr;
|
|
24068
24068
|
}
|
|
24069
|
-
var
|
|
24069
|
+
var Dc = {}, Rp;
|
|
24070
24070
|
function pA() {
|
|
24071
|
-
if (Rp) return
|
|
24072
|
-
Rp = 1, Object.defineProperty(
|
|
24071
|
+
if (Rp) return Dc;
|
|
24072
|
+
Rp = 1, Object.defineProperty(Dc, "__esModule", { value: !0 });
|
|
24073
24073
|
const e = qt();
|
|
24074
24074
|
function t(n) {
|
|
24075
24075
|
return {
|
|
@@ -24077,7 +24077,7 @@ function pA() {
|
|
|
24077
24077
|
value: n.toBuffer()
|
|
24078
24078
|
};
|
|
24079
24079
|
}
|
|
24080
|
-
return
|
|
24080
|
+
return Dc.encode = t, Dc;
|
|
24081
24081
|
}
|
|
24082
24082
|
var Kr = {}, Up;
|
|
24083
24083
|
function yA() {
|
|
@@ -24587,10 +24587,10 @@ function vA() {
|
|
|
24587
24587
|
}
|
|
24588
24588
|
return ni.canAdd = s, ni;
|
|
24589
24589
|
}
|
|
24590
|
-
var
|
|
24590
|
+
var jc = {}, Xp;
|
|
24591
24591
|
function Qw() {
|
|
24592
|
-
if (Xp) return
|
|
24593
|
-
Xp = 1, Object.defineProperty(
|
|
24592
|
+
if (Xp) return jc;
|
|
24593
|
+
Xp = 1, Object.defineProperty(jc, "__esModule", { value: !0 });
|
|
24594
24594
|
const e = (r) => [...Array(r).keys()], t = (r) => r.length === 33 && [2, 3].includes(r[0]) || r.length === 65 && r[0] === 4;
|
|
24595
24595
|
function n(r, i = t) {
|
|
24596
24596
|
function s(f) {
|
|
@@ -24647,12 +24647,12 @@ function Qw() {
|
|
|
24647
24647
|
canAddToArray: u
|
|
24648
24648
|
};
|
|
24649
24649
|
}
|
|
24650
|
-
return
|
|
24650
|
+
return jc.makeConverter = n, jc;
|
|
24651
24651
|
}
|
|
24652
|
-
var
|
|
24652
|
+
var Kc = {}, zp;
|
|
24653
24653
|
function IA() {
|
|
24654
|
-
if (zp) return
|
|
24655
|
-
zp = 1, Object.defineProperty(
|
|
24654
|
+
if (zp) return Kc;
|
|
24655
|
+
zp = 1, Object.defineProperty(Kc, "__esModule", { value: !0 });
|
|
24656
24656
|
function e(t) {
|
|
24657
24657
|
return n;
|
|
24658
24658
|
function n(r) {
|
|
@@ -24664,12 +24664,12 @@ function IA() {
|
|
|
24664
24664
|
return i;
|
|
24665
24665
|
}
|
|
24666
24666
|
}
|
|
24667
|
-
return
|
|
24667
|
+
return Kc.makeChecker = e, Kc;
|
|
24668
24668
|
}
|
|
24669
|
-
var
|
|
24669
|
+
var Gc = {}, Yp;
|
|
24670
24670
|
function OA() {
|
|
24671
|
-
if (Yp) return
|
|
24672
|
-
Yp = 1, Object.defineProperty(
|
|
24671
|
+
if (Yp) return Gc;
|
|
24672
|
+
Yp = 1, Object.defineProperty(Gc, "__esModule", { value: !0 });
|
|
24673
24673
|
function e(t) {
|
|
24674
24674
|
function n(c) {
|
|
24675
24675
|
if (c.key[0] !== t)
|
|
@@ -24699,12 +24699,12 @@ function OA() {
|
|
|
24699
24699
|
canAdd: o
|
|
24700
24700
|
};
|
|
24701
24701
|
}
|
|
24702
|
-
return
|
|
24702
|
+
return Gc.makeConverter = e, Gc;
|
|
24703
24703
|
}
|
|
24704
|
-
var
|
|
24704
|
+
var Wc = {}, Zp;
|
|
24705
24705
|
function BA() {
|
|
24706
|
-
if (Zp) return
|
|
24707
|
-
Zp = 1, Object.defineProperty(
|
|
24706
|
+
if (Zp) return Wc;
|
|
24707
|
+
Zp = 1, Object.defineProperty(Wc, "__esModule", { value: !0 });
|
|
24708
24708
|
const e = is(), t = Qw(), n = (i) => i.length === 32;
|
|
24709
24709
|
function r(i) {
|
|
24710
24710
|
const s = t.makeConverter(i, n);
|
|
@@ -24737,12 +24737,12 @@ function BA() {
|
|
|
24737
24737
|
canAddToArray: s.canAddToArray
|
|
24738
24738
|
};
|
|
24739
24739
|
}
|
|
24740
|
-
return
|
|
24740
|
+
return Wc.makeConverter = r, Wc;
|
|
24741
24741
|
}
|
|
24742
|
-
var
|
|
24742
|
+
var Xc = {}, Jp;
|
|
24743
24743
|
function NA() {
|
|
24744
|
-
if (Jp) return
|
|
24745
|
-
Jp = 1, Object.defineProperty(
|
|
24744
|
+
if (Jp) return Xc;
|
|
24745
|
+
Jp = 1, Object.defineProperty(Xc, "__esModule", { value: !0 });
|
|
24746
24746
|
function e(t) {
|
|
24747
24747
|
function n(c) {
|
|
24748
24748
|
if (c.key[0] !== t || c.key.length !== 1)
|
|
@@ -24773,12 +24773,12 @@ function NA() {
|
|
|
24773
24773
|
canAdd: o
|
|
24774
24774
|
};
|
|
24775
24775
|
}
|
|
24776
|
-
return
|
|
24776
|
+
return Xc.makeConverter = e, Xc;
|
|
24777
24777
|
}
|
|
24778
|
-
var
|
|
24778
|
+
var zc = {}, Qp;
|
|
24779
24779
|
function kA() {
|
|
24780
|
-
if (Qp) return
|
|
24781
|
-
Qp = 1, Object.defineProperty(
|
|
24780
|
+
if (Qp) return zc;
|
|
24781
|
+
Qp = 1, Object.defineProperty(zc, "__esModule", { value: !0 });
|
|
24782
24782
|
function e(t) {
|
|
24783
24783
|
function n(c) {
|
|
24784
24784
|
if (c.key[0] !== t)
|
|
@@ -24808,7 +24808,7 @@ function kA() {
|
|
|
24808
24808
|
canAdd: o
|
|
24809
24809
|
};
|
|
24810
24810
|
}
|
|
24811
|
-
return
|
|
24811
|
+
return zc.makeConverter = e, zc;
|
|
24812
24812
|
}
|
|
24813
24813
|
var ey;
|
|
24814
24814
|
function Bh() {
|
|
@@ -25167,10 +25167,10 @@ function PA() {
|
|
|
25167
25167
|
}
|
|
25168
25168
|
return fs.psbtFromKeyVals = o, fs;
|
|
25169
25169
|
}
|
|
25170
|
-
var
|
|
25170
|
+
var _o = {}, ny;
|
|
25171
25171
|
function RA() {
|
|
25172
|
-
if (ny) return
|
|
25173
|
-
ny = 1, Object.defineProperty(
|
|
25172
|
+
if (ny) return _o;
|
|
25173
|
+
ny = 1, Object.defineProperty(_o, "__esModule", { value: !0 });
|
|
25174
25174
|
const e = Bh(), t = Oh();
|
|
25175
25175
|
function n({ globalMap: o, inputs: c, outputs: a }) {
|
|
25176
25176
|
const { globalKeyVals: u, inputKeyVals: f, outputKeyVals: l } = s({
|
|
@@ -25182,7 +25182,7 @@ function RA() {
|
|
|
25182
25182
|
[E, d].concat(g, m)
|
|
25183
25183
|
);
|
|
25184
25184
|
}
|
|
25185
|
-
|
|
25185
|
+
_o.psbtToBuffer = n;
|
|
25186
25186
|
const r = (o, c) => o.key.compare(c.key);
|
|
25187
25187
|
function i(o, c) {
|
|
25188
25188
|
const a = /* @__PURE__ */ new Set(), u = Object.entries(o).reduce((l, [d, y]) => {
|
|
@@ -25207,7 +25207,7 @@ function RA() {
|
|
|
25207
25207
|
outputKeyVals: a.map((u) => i(u, e.outputs))
|
|
25208
25208
|
};
|
|
25209
25209
|
}
|
|
25210
|
-
return
|
|
25210
|
+
return _o.psbtToKeyVals = s, _o;
|
|
25211
25211
|
}
|
|
25212
25212
|
var ry;
|
|
25213
25213
|
function e1() {
|
|
@@ -25220,8 +25220,8 @@ function e1() {
|
|
|
25220
25220
|
}
|
|
25221
25221
|
var iy;
|
|
25222
25222
|
function UA() {
|
|
25223
|
-
if (iy) return
|
|
25224
|
-
iy = 1, Object.defineProperty(
|
|
25223
|
+
if (iy) return $c;
|
|
25224
|
+
iy = 1, Object.defineProperty($c, "__esModule", { value: !0 });
|
|
25225
25225
|
const e = e1();
|
|
25226
25226
|
function t(s) {
|
|
25227
25227
|
const o = s[0], c = e.psbtToKeyVals(o), a = s.slice(1);
|
|
@@ -25267,7 +25267,7 @@ function UA() {
|
|
|
25267
25267
|
outputKeyVals: c.outputKeyVals
|
|
25268
25268
|
});
|
|
25269
25269
|
}
|
|
25270
|
-
|
|
25270
|
+
$c.combine = t;
|
|
25271
25271
|
function n(s, o, c) {
|
|
25272
25272
|
return (a) => {
|
|
25273
25273
|
if (s.has(a)) return;
|
|
@@ -25287,7 +25287,7 @@ function UA() {
|
|
|
25287
25287
|
o.add(a);
|
|
25288
25288
|
}), o;
|
|
25289
25289
|
}
|
|
25290
|
-
return
|
|
25290
|
+
return $c;
|
|
25291
25291
|
}
|
|
25292
25292
|
var Cf = {}, sy;
|
|
25293
25293
|
function t1() {
|
|
@@ -25391,8 +25391,8 @@ function t1() {
|
|
|
25391
25391
|
}
|
|
25392
25392
|
var oy;
|
|
25393
25393
|
function CA() {
|
|
25394
|
-
if (oy) return
|
|
25395
|
-
oy = 1, Object.defineProperty(
|
|
25394
|
+
if (oy) return Vc;
|
|
25395
|
+
oy = 1, Object.defineProperty(Vc, "__esModule", { value: !0 });
|
|
25396
25396
|
const e = UA(), t = e1(), n = qt(), r = t1();
|
|
25397
25397
|
class i {
|
|
25398
25398
|
constructor(o) {
|
|
@@ -25498,13 +25498,13 @@ function CA() {
|
|
|
25498
25498
|
return this.globalMap.unsignedTx.toBuffer();
|
|
25499
25499
|
}
|
|
25500
25500
|
}
|
|
25501
|
-
return
|
|
25501
|
+
return Vc.Psbt = i, Vc;
|
|
25502
25502
|
}
|
|
25503
25503
|
var Qe = {}, ze = {}, cy;
|
|
25504
25504
|
function gl() {
|
|
25505
25505
|
if (cy) return ze;
|
|
25506
25506
|
cy = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.signatureBlocksAction = ze.checkInputForSig = ze.pubkeyInScript = ze.pubkeyPositionInScript = ze.witnessStackToScriptWitness = ze.isP2TR = ze.isP2SHScript = ze.isP2WSHScript = ze.isP2WPKH = ze.isP2PKH = ze.isP2PK = ze.isP2MS = void 0;
|
|
25507
|
-
const e = is(), t = rn(), n =
|
|
25507
|
+
const e = is(), t = rn(), n = xc(), r = Cr(), i = Tc();
|
|
25508
25508
|
function s(y) {
|
|
25509
25509
|
return (g) => {
|
|
25510
25510
|
try {
|
|
@@ -25581,7 +25581,7 @@ var ay;
|
|
|
25581
25581
|
function HA() {
|
|
25582
25582
|
if (ay) return Qe;
|
|
25583
25583
|
ay = 1, Object.defineProperty(Qe, "__esModule", { value: !0 }), Qe.checkTaprootInputForSigs = Qe.tapTreeFromList = Qe.tapTreeToList = Qe.tweakInternalPubKey = Qe.checkTaprootOutputFields = Qe.checkTaprootInputFields = Qe.isTaprootOutput = Qe.isTaprootInput = Qe.serializeTaprootSignature = Qe.tapScriptFinalizer = Qe.toXOnly = void 0;
|
|
25584
|
-
const e = zt(), t =
|
|
25584
|
+
const e = zt(), t = xc(), n = gl(), r = vh(), i = Tc(), s = gl(), o = (x) => x.length === 32 ? x : x.slice(1, 33);
|
|
25585
25585
|
Qe.toXOnly = o;
|
|
25586
25586
|
function c(x, B, q) {
|
|
25587
25587
|
const N = P(
|
|
@@ -25803,9 +25803,9 @@ function HA() {
|
|
|
25803
25803
|
}
|
|
25804
25804
|
var uy;
|
|
25805
25805
|
function FA() {
|
|
25806
|
-
if (uy) return
|
|
25807
|
-
uy = 1, Object.defineProperty(
|
|
25808
|
-
const e = CA(), t = is(), n = t1(), r = Ih(), i = Tu(), s = Yn(), o =
|
|
25806
|
+
if (uy) return Eo;
|
|
25807
|
+
uy = 1, Object.defineProperty(Eo, "__esModule", { value: !0 }), Eo.Psbt = void 0;
|
|
25808
|
+
const e = CA(), t = is(), n = t1(), r = Ih(), i = Tu(), s = Yn(), o = Tc(), c = vh(), a = rn(), u = xc(), f = HA(), l = gl(), d = {
|
|
25809
25809
|
/**
|
|
25810
25810
|
* A bitcoinjs Network object. This is only used if you pass an `address`
|
|
25811
25811
|
* parameter to addOutput. Otherwise it is not needed and can be left default.
|
|
@@ -26449,7 +26449,7 @@ function FA() {
|
|
|
26449
26449
|
return this.data.clearFinalizedInput(h), this;
|
|
26450
26450
|
}
|
|
26451
26451
|
}
|
|
26452
|
-
|
|
26452
|
+
Eo.Psbt = y;
|
|
26453
26453
|
const g = (p) => new m(p);
|
|
26454
26454
|
class m {
|
|
26455
26455
|
constructor(h = Buffer.from([2, 0, 0, 0, 0, 0, 0, 0, 0, 0])) {
|
|
@@ -27002,7 +27002,7 @@ PROCEED WITH CAUTION!
|
|
|
27002
27002
|
function k(p) {
|
|
27003
27003
|
return [...Array(p).keys()];
|
|
27004
27004
|
}
|
|
27005
|
-
return
|
|
27005
|
+
return Eo;
|
|
27006
27006
|
}
|
|
27007
27007
|
var fy;
|
|
27008
27008
|
function MA() {
|
|
@@ -27014,7 +27014,7 @@ function MA() {
|
|
|
27014
27014
|
e.crypto = n;
|
|
27015
27015
|
const r = Yn();
|
|
27016
27016
|
e.networks = r;
|
|
27017
|
-
const i =
|
|
27017
|
+
const i = Tc();
|
|
27018
27018
|
e.payments = i;
|
|
27019
27019
|
const s = rn();
|
|
27020
27020
|
e.script = s;
|
|
@@ -27039,7 +27039,7 @@ function MA() {
|
|
|
27039
27039
|
return a.OPS;
|
|
27040
27040
|
}
|
|
27041
27041
|
});
|
|
27042
|
-
var u =
|
|
27042
|
+
var u = xc();
|
|
27043
27043
|
Object.defineProperty(e, "Transaction", {
|
|
27044
27044
|
enumerable: !0,
|
|
27045
27045
|
get: function() {
|
|
@@ -27711,9 +27711,9 @@ function Nh(e) {
|
|
|
27711
27711
|
return Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("");
|
|
27712
27712
|
}
|
|
27713
27713
|
function kh(e) {
|
|
27714
|
-
return e ===
|
|
27714
|
+
return e === Po.Mainnet ? Un : Vy;
|
|
27715
27715
|
}
|
|
27716
|
-
function Ph(e, t =
|
|
27716
|
+
function Ph(e, t = Po.Testnet) {
|
|
27717
27717
|
const n = kh(t);
|
|
27718
27718
|
return Bg(e, n);
|
|
27719
27719
|
}
|
|
@@ -27752,7 +27752,7 @@ function jA(e, t, n) {
|
|
|
27752
27752
|
}
|
|
27753
27753
|
async function s1(e, t) {
|
|
27754
27754
|
try {
|
|
27755
|
-
const n = t ===
|
|
27755
|
+
const n = t === Po.Mainnet ? "https://mpc.omnity.network/utxo-status" : "https://mpc.omnity.network/testnet4/utxo-status", r = await dt.post(n, e).then((c) => c.data);
|
|
27756
27756
|
if (!r)
|
|
27757
27757
|
return null;
|
|
27758
27758
|
const i = JSON.stringify(r), o = new TextEncoder().encode(i);
|
|
@@ -27770,7 +27770,7 @@ const EI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
27770
27770
|
getUtxoProof: s1,
|
|
27771
27771
|
hexToBytes: i1,
|
|
27772
27772
|
toBitcoinNetwork: kh
|
|
27773
|
-
}, Symbol.toStringTag, { value: "Module" })), KA = "kqs64-paaaa-aaaar-qamza-cai", GA = "hvyp5-5yaaa-aaaao-qjxha-cai",
|
|
27773
|
+
}, Symbol.toStringTag, { value: "Module" })), KA = "kqs64-paaaa-aaaar-qamza-cai", GA = "hvyp5-5yaaa-aaaao-qjxha-cai", ps = BigInt(546), on = "0:0", WA = "https://runescan-hasura-mainnet.omnity.network/v1/graphql", XA = "https://runescan-hasura-testnet.omnity.network/v1/graphql", wy = {
|
|
27774
27774
|
P2PKH: 148,
|
|
27775
27775
|
P2SH_P2WPKH: 91,
|
|
27776
27776
|
P2WPKH: 68,
|
|
@@ -27937,7 +27937,7 @@ class Ri {
|
|
|
27937
27937
|
(w, T) => w + BigInt(T.satoshis),
|
|
27938
27938
|
BigInt(0)
|
|
27939
27939
|
);
|
|
27940
|
-
S - d > 0 && S - d >
|
|
27940
|
+
S - d > 0 && S - d > ps || (this.outputAddressTypes.pop(), a = !1), l = _;
|
|
27941
27941
|
}
|
|
27942
27942
|
} while (f > u && d > 0);
|
|
27943
27943
|
this.inputAddressTypes = [...g], a && this.outputAddressTypes.pop();
|
|
@@ -27948,7 +27948,7 @@ class Ri {
|
|
|
27948
27948
|
const E = m - d;
|
|
27949
27949
|
if (E < 0)
|
|
27950
27950
|
throw new Error("Insufficient UTXO(s)");
|
|
27951
|
-
E >
|
|
27951
|
+
E > ps ? this.addOutput(r, E) : E > BigInt(0) && (y = E), this.txFee = y + f;
|
|
27952
27952
|
}
|
|
27953
27953
|
/**
|
|
27954
27954
|
* Resolve and fetch all UTXOs required by the current intention set, grouped by address.
|
|
@@ -28114,7 +28114,7 @@ class Ri {
|
|
|
28114
28114
|
) - l;
|
|
28115
28115
|
m > BigInt(0) && (i[a] ??= {}, i[a][f] = (i[a][f] ?? BigInt(0)) + m), y.forEach((E) => {
|
|
28116
28116
|
this.addInput(E), n.includes(a) && E.runes.forEach((_) => {
|
|
28117
|
-
i[a] ??= {}, i[a][_.id] = (i[a][_.id] ?? BigInt(0)) + BigInt(_.amount);
|
|
28117
|
+
(r[a]?.[_.id] ?? BigInt(0)) > BigInt(0) || (i[a] ??= {}, i[a][_.id] = (i[a][_.id] ?? BigInt(0)) + BigInt(_.amount));
|
|
28118
28118
|
});
|
|
28119
28119
|
});
|
|
28120
28120
|
} else {
|
|
@@ -28199,8 +28199,8 @@ class Ri {
|
|
|
28199
28199
|
});
|
|
28200
28200
|
const a = new ds.Runestone(s, ds.none(), ds.none(), ds.none());
|
|
28201
28201
|
this.addScriptOutput(new Uint8Array(a.encipher())), o.forEach((u) => {
|
|
28202
|
-
const f = t[u]?.[on] ?? BigInt(0), l = u === this.config.address, d = f > BigInt(0) && (!l || n), y = d ? f :
|
|
28203
|
-
this.addOutput(u, y), d ? delete t[u][on] : this.additionalDustNeeded +=
|
|
28202
|
+
const f = t[u]?.[on] ?? BigInt(0), l = u === this.config.address, d = f > BigInt(0) && (!l || n), y = d && f > ps ? f : ps;
|
|
28203
|
+
this.addOutput(u, y), d ? delete t[u][on] : this.additionalDustNeeded += ps;
|
|
28204
28204
|
});
|
|
28205
28205
|
}
|
|
28206
28206
|
for (const [s, o] of Object.entries(
|
|
@@ -28400,21 +28400,21 @@ class Ri {
|
|
|
28400
28400
|
});
|
|
28401
28401
|
}
|
|
28402
28402
|
}
|
|
28403
|
-
class
|
|
28403
|
+
class ks extends Error {
|
|
28404
28404
|
response;
|
|
28405
28405
|
request;
|
|
28406
28406
|
constructor(t, n) {
|
|
28407
|
-
const r = `${
|
|
28407
|
+
const r = `${ks.extractMessage(t)}: ${JSON.stringify({
|
|
28408
28408
|
response: t,
|
|
28409
28409
|
request: n
|
|
28410
28410
|
})}`;
|
|
28411
|
-
super(r), Object.setPrototypeOf(this,
|
|
28411
|
+
super(r), Object.setPrototypeOf(this, ks.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, ks);
|
|
28412
28412
|
}
|
|
28413
28413
|
static extractMessage(t) {
|
|
28414
28414
|
return t.errors?.[0]?.message ?? `GraphQL Error (Code: ${String(t.status)})`;
|
|
28415
28415
|
}
|
|
28416
28416
|
}
|
|
28417
|
-
const Ey = (e) => e.toUpperCase(), Ff = (e) => typeof e == "function" ? e() : e, o1 = (e, t) => e.map((n, r) => [n, t[r]]),
|
|
28417
|
+
const Ey = (e) => e.toUpperCase(), Ff = (e) => typeof e == "function" ? e() : e, o1 = (e, t) => e.map((n, r) => [n, t[r]]), ys = (e) => {
|
|
28418
28418
|
let t = {};
|
|
28419
28419
|
return e instanceof Headers ? t = ZA(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
|
|
28420
28420
|
n && r !== void 0 && (t[n] = r);
|
|
@@ -28778,10 +28778,10 @@ function xy(e) {
|
|
|
28778
28778
|
const t = e?.kind;
|
|
28779
28779
|
return typeof t == "string" && av.has(t);
|
|
28780
28780
|
}
|
|
28781
|
-
var
|
|
28781
|
+
var _s;
|
|
28782
28782
|
(function(e) {
|
|
28783
28783
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
28784
|
-
})(
|
|
28784
|
+
})(_s || (_s = {}));
|
|
28785
28785
|
var wl;
|
|
28786
28786
|
(function(e) {
|
|
28787
28787
|
e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
|
|
@@ -28793,7 +28793,7 @@ var Se;
|
|
|
28793
28793
|
function bl(e) {
|
|
28794
28794
|
return e === 9 || e === 32;
|
|
28795
28795
|
}
|
|
28796
|
-
function
|
|
28796
|
+
function Wo(e) {
|
|
28797
28797
|
return e >= 48 && e <= 57;
|
|
28798
28798
|
}
|
|
28799
28799
|
function f1(e) {
|
|
@@ -28804,7 +28804,7 @@ function l1(e) {
|
|
|
28804
28804
|
return f1(e) || e === 95;
|
|
28805
28805
|
}
|
|
28806
28806
|
function uv(e) {
|
|
28807
|
-
return f1(e) ||
|
|
28807
|
+
return f1(e) || Wo(e) || e === 95;
|
|
28808
28808
|
}
|
|
28809
28809
|
function fv(e) {
|
|
28810
28810
|
var t;
|
|
@@ -28887,7 +28887,7 @@ class dv {
|
|
|
28887
28887
|
function pv(e) {
|
|
28888
28888
|
return e === ee.BANG || e === ee.DOLLAR || e === ee.AMP || e === ee.PAREN_L || e === ee.PAREN_R || e === ee.SPREAD || e === ee.COLON || e === ee.EQUALS || e === ee.AT || e === ee.BRACKET_L || e === ee.BRACKET_R || e === ee.BRACE_L || e === ee.PIPE || e === ee.BRACE_R;
|
|
28889
28889
|
}
|
|
28890
|
-
function
|
|
28890
|
+
function Zs(e) {
|
|
28891
28891
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
28892
28892
|
}
|
|
28893
28893
|
function xu(e, t) {
|
|
@@ -28997,14 +28997,14 @@ function yv(e, t) {
|
|
|
28997
28997
|
case 34:
|
|
28998
28998
|
return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Sv(e, i) : wv(e, i);
|
|
28999
28999
|
}
|
|
29000
|
-
if (
|
|
29000
|
+
if (Wo(s) || s === 45)
|
|
29001
29001
|
return mv(e, i, s);
|
|
29002
29002
|
if (l1(s))
|
|
29003
29003
|
return Tv(e, i);
|
|
29004
29004
|
throw kt(
|
|
29005
29005
|
e.source,
|
|
29006
29006
|
i,
|
|
29007
|
-
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` :
|
|
29007
|
+
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Zs(s) || xu(n, i) ? `Unexpected character: ${Zi(e, i)}.` : `Invalid character: ${Zi(e, i)}.`
|
|
29008
29008
|
);
|
|
29009
29009
|
}
|
|
29010
29010
|
return Et(e, ee.EOF, r, r);
|
|
@@ -29016,7 +29016,7 @@ function gv(e, t) {
|
|
|
29016
29016
|
const s = n.charCodeAt(i);
|
|
29017
29017
|
if (s === 10 || s === 13)
|
|
29018
29018
|
break;
|
|
29019
|
-
if (
|
|
29019
|
+
if (Zs(s))
|
|
29020
29020
|
++i;
|
|
29021
29021
|
else if (xu(n, i))
|
|
29022
29022
|
i += 2;
|
|
@@ -29035,7 +29035,7 @@ function mv(e, t, n) {
|
|
|
29035
29035
|
const r = e.source.body;
|
|
29036
29036
|
let i = t, s = n, o = !1;
|
|
29037
29037
|
if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
|
|
29038
|
-
if (s = r.charCodeAt(++i),
|
|
29038
|
+
if (s = r.charCodeAt(++i), Wo(s))
|
|
29039
29039
|
throw kt(
|
|
29040
29040
|
e.source,
|
|
29041
29041
|
i,
|
|
@@ -29064,7 +29064,7 @@ function mv(e, t, n) {
|
|
|
29064
29064
|
);
|
|
29065
29065
|
}
|
|
29066
29066
|
function Mf(e, t, n) {
|
|
29067
|
-
if (!
|
|
29067
|
+
if (!Wo(n))
|
|
29068
29068
|
throw kt(
|
|
29069
29069
|
e.source,
|
|
29070
29070
|
t,
|
|
@@ -29075,7 +29075,7 @@ function Mf(e, t, n) {
|
|
|
29075
29075
|
);
|
|
29076
29076
|
const r = e.source.body;
|
|
29077
29077
|
let i = t + 1;
|
|
29078
|
-
for (;
|
|
29078
|
+
for (; Wo(r.charCodeAt(i)); )
|
|
29079
29079
|
++i;
|
|
29080
29080
|
return i;
|
|
29081
29081
|
}
|
|
@@ -29094,7 +29094,7 @@ function wv(e, t) {
|
|
|
29094
29094
|
}
|
|
29095
29095
|
if (c === 10 || c === 13)
|
|
29096
29096
|
break;
|
|
29097
|
-
if (
|
|
29097
|
+
if (Zs(c))
|
|
29098
29098
|
++i;
|
|
29099
29099
|
else if (xu(n, i))
|
|
29100
29100
|
i += 2;
|
|
@@ -29116,14 +29116,14 @@ function bv(e, t) {
|
|
|
29116
29116
|
for (; i < 12; ) {
|
|
29117
29117
|
const s = n.charCodeAt(t + i++);
|
|
29118
29118
|
if (s === 125) {
|
|
29119
|
-
if (i < 5 || !
|
|
29119
|
+
if (i < 5 || !Zs(r))
|
|
29120
29120
|
break;
|
|
29121
29121
|
return {
|
|
29122
29122
|
value: String.fromCodePoint(r),
|
|
29123
29123
|
size: i
|
|
29124
29124
|
};
|
|
29125
29125
|
}
|
|
29126
|
-
if (r = r << 4 |
|
|
29126
|
+
if (r = r << 4 | To(s), r < 0)
|
|
29127
29127
|
break;
|
|
29128
29128
|
}
|
|
29129
29129
|
throw kt(
|
|
@@ -29137,7 +29137,7 @@ function bv(e, t) {
|
|
|
29137
29137
|
}
|
|
29138
29138
|
function Ev(e, t) {
|
|
29139
29139
|
const n = e.source.body, r = Ay(n, t + 2);
|
|
29140
|
-
if (
|
|
29140
|
+
if (Zs(r))
|
|
29141
29141
|
return {
|
|
29142
29142
|
value: String.fromCodePoint(r),
|
|
29143
29143
|
size: 6
|
|
@@ -29157,9 +29157,9 @@ function Ev(e, t) {
|
|
|
29157
29157
|
);
|
|
29158
29158
|
}
|
|
29159
29159
|
function Ay(e, t) {
|
|
29160
|
-
return
|
|
29160
|
+
return To(e.charCodeAt(t)) << 12 | To(e.charCodeAt(t + 1)) << 8 | To(e.charCodeAt(t + 2)) << 4 | To(e.charCodeAt(t + 3));
|
|
29161
29161
|
}
|
|
29162
|
-
function
|
|
29162
|
+
function To(e) {
|
|
29163
29163
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
29164
29164
|
}
|
|
29165
29165
|
function _v(e, t) {
|
|
@@ -29243,7 +29243,7 @@ function Sv(e, t) {
|
|
|
29243
29243
|
c += n.slice(o, s), a.push(c), u === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, c = "", o = s, i = s;
|
|
29244
29244
|
continue;
|
|
29245
29245
|
}
|
|
29246
|
-
if (
|
|
29246
|
+
if (Zs(u))
|
|
29247
29247
|
++s;
|
|
29248
29248
|
else if (xu(n, s))
|
|
29249
29249
|
s += 2;
|
|
@@ -29504,7 +29504,7 @@ class Uv {
|
|
|
29504
29504
|
if (this.peek(ee.BRACE_L))
|
|
29505
29505
|
return this.node(t, {
|
|
29506
29506
|
kind: Se.OPERATION_DEFINITION,
|
|
29507
|
-
operation:
|
|
29507
|
+
operation: _s.QUERY,
|
|
29508
29508
|
name: void 0,
|
|
29509
29509
|
variableDefinitions: [],
|
|
29510
29510
|
directives: [],
|
|
@@ -29528,11 +29528,11 @@ class Uv {
|
|
|
29528
29528
|
const t = this.expectToken(ee.NAME);
|
|
29529
29529
|
switch (t.value) {
|
|
29530
29530
|
case "query":
|
|
29531
|
-
return
|
|
29531
|
+
return _s.QUERY;
|
|
29532
29532
|
case "mutation":
|
|
29533
|
-
return
|
|
29533
|
+
return _s.MUTATION;
|
|
29534
29534
|
case "subscription":
|
|
29535
|
-
return
|
|
29535
|
+
return _s.SUBSCRIPTION;
|
|
29536
29536
|
}
|
|
29537
29537
|
throw this.unexpected(t);
|
|
29538
29538
|
}
|
|
@@ -31087,7 +31087,7 @@ ${String(e)}`);
|
|
|
31087
31087
|
}
|
|
31088
31088
|
}, r = await Yv(t.method)(t);
|
|
31089
31089
|
if (!r.ok)
|
|
31090
|
-
return new
|
|
31090
|
+
return new ks({ status: r.status, headers: r.headers }, {
|
|
31091
31091
|
query: e.request._tag === "Single" ? e.request.document.expression : e.request.query,
|
|
31092
31092
|
variables: e.request.variables
|
|
31093
31093
|
});
|
|
@@ -31103,7 +31103,7 @@ ${String(e)}`);
|
|
|
31103
31103
|
...i.executionResult,
|
|
31104
31104
|
...s
|
|
31105
31105
|
};
|
|
31106
|
-
return new
|
|
31106
|
+
return new ks(o, {
|
|
31107
31107
|
query: e.request._tag === "Single" ? e.request.document.expression : e.request.query,
|
|
31108
31108
|
variables: e.request.variables
|
|
31109
31109
|
});
|
|
@@ -31199,8 +31199,8 @@ class Qv {
|
|
|
31199
31199
|
variables: s.variables
|
|
31200
31200
|
},
|
|
31201
31201
|
headers: {
|
|
31202
|
-
...
|
|
31203
|
-
...
|
|
31202
|
+
...ys(Ff(o)),
|
|
31203
|
+
...ys(s.requestHeaders)
|
|
31204
31204
|
},
|
|
31205
31205
|
fetch: c,
|
|
31206
31206
|
method: a,
|
|
@@ -31226,8 +31226,8 @@ class Qv {
|
|
|
31226
31226
|
variables: s.variables
|
|
31227
31227
|
},
|
|
31228
31228
|
headers: {
|
|
31229
|
-
...
|
|
31230
|
-
...
|
|
31229
|
+
...ys(Ff(o)),
|
|
31230
|
+
...ys(s.requestHeaders)
|
|
31231
31231
|
},
|
|
31232
31232
|
fetch: c,
|
|
31233
31233
|
method: a,
|
|
@@ -31255,8 +31255,8 @@ class Qv {
|
|
|
31255
31255
|
variables: f
|
|
31256
31256
|
},
|
|
31257
31257
|
headers: {
|
|
31258
|
-
...
|
|
31259
|
-
...
|
|
31258
|
+
...ys(Ff(i)),
|
|
31259
|
+
...ys(r.requestHeaders)
|
|
31260
31260
|
},
|
|
31261
31261
|
fetch: this.requestConfig.fetch ?? globalThis.fetch,
|
|
31262
31262
|
method: this.requestConfig.method || "POST",
|
|
@@ -31301,7 +31301,7 @@ const e6 = (e, t, n) => e.document ? e : {
|
|
|
31301
31301
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
31302
31302
|
* MIT Licence
|
|
31303
31303
|
*/
|
|
31304
|
-
var
|
|
31304
|
+
var Ss = 9e15, wi = 1e9, Sl = "0123456789abcdef", La = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Va = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Tl = {
|
|
31305
31305
|
// These values must be integers within the stated ranges (inclusive).
|
|
31306
31306
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
31307
31307
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -31350,11 +31350,11 @@ var _s = 9e15, wi = 1e9, Sl = "0123456789abcdef", La = "2.3025850929940456840179
|
|
|
31350
31350
|
// 0 to EXP_LIMIT
|
|
31351
31351
|
// The minimum exponent value, beneath which underflow to zero occurs.
|
|
31352
31352
|
// JavaScript numbers: -324 (5e-324)
|
|
31353
|
-
minE: -
|
|
31353
|
+
minE: -Ss,
|
|
31354
31354
|
// -1 to -EXP_LIMIT
|
|
31355
31355
|
// The maximum exponent value, above which overflow to Infinity occurs.
|
|
31356
31356
|
// JavaScript numbers: 308 (1.7976931348623157e+308)
|
|
31357
|
-
maxE:
|
|
31357
|
+
maxE: Ss,
|
|
31358
31358
|
// 1 to EXP_LIMIT
|
|
31359
31359
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
31360
31360
|
crypto: !1
|
|
@@ -31437,7 +31437,7 @@ se.hyperbolicCosine = se.cosh = function() {
|
|
|
31437
31437
|
var e, t, n, r, i, s = this, o = s.constructor, c = new o(1);
|
|
31438
31438
|
if (!s.isFinite()) return new o(s.s ? 1 / 0 : NaN);
|
|
31439
31439
|
if (s.isZero()) return c;
|
|
31440
|
-
n = o.precision, r = o.rounding, o.precision = n + Math.max(s.e, s.sd()) + 4, o.rounding = 1, i = s.d.length, i < 32 ? (e = Math.ceil(i / 3), t = (1 / Ou(4, e)).toString()) : (e = 16, t = "2.3283064365386962890625e-10"), s =
|
|
31440
|
+
n = o.precision, r = o.rounding, o.precision = n + Math.max(s.e, s.sd()) + 4, o.rounding = 1, i = s.d.length, i < 32 ? (e = Math.ceil(i / 3), t = (1 / Ou(4, e)).toString()) : (e = 16, t = "2.3283064365386962890625e-10"), s = Ls(o, 1, s.times(t), new o(1), !0);
|
|
31441
31441
|
for (var a, u = e, f = new o(8); u--; )
|
|
31442
31442
|
a = s.times(s), s = c.minus(a.times(f.minus(a.times(f))));
|
|
31443
31443
|
return be(s, o.precision = n, o.rounding = r, !0);
|
|
@@ -31446,9 +31446,9 @@ se.hyperbolicSine = se.sinh = function() {
|
|
|
31446
31446
|
var e, t, n, r, i = this, s = i.constructor;
|
|
31447
31447
|
if (!i.isFinite() || i.isZero()) return new s(i);
|
|
31448
31448
|
if (t = s.precision, n = s.rounding, s.precision = t + Math.max(i.e, i.sd()) + 4, s.rounding = 1, r = i.d.length, r < 3)
|
|
31449
|
-
i =
|
|
31449
|
+
i = Ls(s, 2, i, i, !0);
|
|
31450
31450
|
else {
|
|
31451
|
-
e = 1.4 * Math.sqrt(r), e = e > 16 ? 16 : e | 0, i = i.times(1 / Ou(5, e)), i =
|
|
31451
|
+
e = 1.4 * Math.sqrt(r), e = e > 16 ? 16 : e | 0, i = i.times(1 / Ou(5, e)), i = Ls(s, 2, i, i, !0);
|
|
31452
31452
|
for (var o, c = new s(5), a = new s(16), u = new s(20); e--; )
|
|
31453
31453
|
o = i.times(i), i = i.times(c.plus(o.times(a.times(o).plus(u))));
|
|
31454
31454
|
}
|
|
@@ -31536,13 +31536,13 @@ se.logarithm = se.log = function(e) {
|
|
|
31536
31536
|
for (i = n[0]; i % 10 === 0; ) i /= 10;
|
|
31537
31537
|
s = i !== 1;
|
|
31538
31538
|
}
|
|
31539
|
-
if (ve = !1, c = l + y, o = ai(u, c), r = t ? $a(f, c + 10) : ai(e, c), a = Ze(o, r, c, 1),
|
|
31539
|
+
if (ve = !1, c = l + y, o = ai(u, c), r = t ? $a(f, c + 10) : ai(e, c), a = Ze(o, r, c, 1), Xo(a.d, i = l, d))
|
|
31540
31540
|
do
|
|
31541
31541
|
if (c += 10, o = ai(u, c), r = t ? $a(f, c + 10) : ai(e, c), a = Ze(o, r, c, 1), !s) {
|
|
31542
31542
|
+Ft(a.d).slice(i + 1, i + 15) + 1 == 1e14 && (a = be(a, l + 1, 0));
|
|
31543
31543
|
break;
|
|
31544
31544
|
}
|
|
31545
|
-
while (
|
|
31545
|
+
while (Xo(a.d, i += 10, d));
|
|
31546
31546
|
return ve = !0, be(a, l, d);
|
|
31547
31547
|
};
|
|
31548
31548
|
se.minus = se.sub = function(e) {
|
|
@@ -31720,7 +31720,7 @@ se.toPower = se.pow = function(e) {
|
|
|
31720
31720
|
if ((e.d[t] & 1) == 0 && (o = 1), c.e == 0 && c.d[0] == 1 && c.d.length == 1)
|
|
31721
31721
|
return c.s = o, c;
|
|
31722
31722
|
}
|
|
31723
|
-
return n = At(+c, u), t = n == 0 || !isFinite(n) ? Xt(u * (Math.log("0." + Ft(c.d)) / Math.LN10 + c.e + 1)) : new a(n + "").e, t > a.maxE + 1 || t < a.minE - 1 ? new a(t > 0 ? o / 0 : 0) : (ve = !1, a.rounding = c.s = 1, n = Math.min(12, (t + "").length), i = Al(e.times(ai(c, r + n)), r), i.d && (i = be(i, r + 5, 1),
|
|
31723
|
+
return n = At(+c, u), t = n == 0 || !isFinite(n) ? Xt(u * (Math.log("0." + Ft(c.d)) / Math.LN10 + c.e + 1)) : new a(n + "").e, t > a.maxE + 1 || t < a.minE - 1 ? new a(t > 0 ? o / 0 : 0) : (ve = !1, a.rounding = c.s = 1, n = Math.min(12, (t + "").length), i = Al(e.times(ai(c, r + n)), r), i.d && (i = be(i, r + 5, 1), Xo(i.d, r, s) && (t = r + 10, i = be(Al(e.times(ai(c, t + n)), t), t + 5, 1), +Ft(i.d).slice(r + 1, r + 15) + 1 == 1e14 && (i = be(i, r + 1, 0)))), i.s = o, ve = !0, a.rounding = s, be(i, r, s));
|
|
31724
31724
|
};
|
|
31725
31725
|
se.toPrecision = function(e, t) {
|
|
31726
31726
|
var n, r = this, i = r.constructor;
|
|
@@ -31756,7 +31756,7 @@ function gn(e, t, n) {
|
|
|
31756
31756
|
if (e !== ~~e || e < t || e > n)
|
|
31757
31757
|
throw Error(pi + e);
|
|
31758
31758
|
}
|
|
31759
|
-
function
|
|
31759
|
+
function Xo(e, t, n, r) {
|
|
31760
31760
|
var i, s, o, c;
|
|
31761
31761
|
for (s = e[0]; s >= 10; s /= 10) --t;
|
|
31762
31762
|
return --t < 0 ? (t += _e, i = 0) : (i = Math.ceil((t + 1) / _e), t %= _e), s = At(10, _e - t), c = e[i] % s | 0, r == null ? t < 3 ? (t == 0 ? c = c / 100 | 0 : t == 1 && (c = c / 10 | 0), o = n < 4 && c == 99999 || n > 3 && c == 49999 || c == 5e4 || c == 0) : o = (n < 4 && c + 1 == s || n > 3 && c + 1 == s / 2) && (e[i + 1] / s / 100 | 0) == At(10, t - 2) - 1 || (c == s / 2 || c == 0) && (e[i + 1] / s / 100 | 0) == 0 : t < 4 ? (t == 0 ? c = c / 1e3 | 0 : t == 1 ? c = c / 100 | 0 : t == 2 && (c = c / 10 | 0), o = (r || n < 4) && c == 9999 || !r && n > 3 && c == 4999) : o = ((r || n < 4) && c + 1 == s || !r && n > 3 && c + 1 == s / 2) && (e[i + 1] / s / 1e3 | 0) == At(10, t - 3) - 1, o;
|
|
@@ -31772,7 +31772,7 @@ function ua(e, t, n) {
|
|
|
31772
31772
|
function c6(e, t) {
|
|
31773
31773
|
var n, r, i;
|
|
31774
31774
|
if (t.isZero()) return t;
|
|
31775
|
-
r = t.d.length, r < 32 ? (n = Math.ceil(r / 3), i = (1 / Ou(4, n)).toString()) : (n = 16, i = "2.3283064365386962890625e-10"), e.precision += n, t =
|
|
31775
|
+
r = t.d.length, r < 32 ? (n = Math.ceil(r / 3), i = (1 / Ou(4, n)).toString()) : (n = 16, i = "2.3283064365386962890625e-10"), e.precision += n, t = Ls(e, 1, t.times(i), new e(1));
|
|
31776
31776
|
for (var s = n; s--; ) {
|
|
31777
31777
|
var o = t.times(t);
|
|
31778
31778
|
t = o.times(o).minus(o).times(8).plus(1);
|
|
@@ -31940,7 +31940,7 @@ function Al(e, t) {
|
|
|
31940
31940
|
if (s = be(s.times(e), a, 1), n = n.times(++f), c = o.plus(Ze(s, n, a, 1)), Ft(c.d).slice(0, a) === Ft(o.d).slice(0, a)) {
|
|
31941
31941
|
for (i = l; i--; ) o = be(o.times(o), a, 1);
|
|
31942
31942
|
if (t == null)
|
|
31943
|
-
if (u < 3 &&
|
|
31943
|
+
if (u < 3 && Xo(o.d, a - r, y, u))
|
|
31944
31944
|
d.precision = a += 10, n = s = c = new d(1), f = 0, u++;
|
|
31945
31945
|
else
|
|
31946
31946
|
return be(o, d.precision = g, y, ve = !0);
|
|
@@ -31963,7 +31963,7 @@ function ai(e, t) {
|
|
|
31963
31963
|
for (l = m, a = o = m = Ze(m.minus(1), m.plus(1), f, 1), d = be(m.times(m), f, 1), i = 3; ; ) {
|
|
31964
31964
|
if (o = be(o.times(d), f, 1), u = a.plus(Ze(o, new _(i), f, 1)), Ft(u.d).slice(0, f) === Ft(a.d).slice(0, f))
|
|
31965
31965
|
if (a = a.times(2), s !== 0 && (a = a.plus($a(_, f + 2, w).times(s + ""))), a = Ze(a, new _(y), f, 1), t == null)
|
|
31966
|
-
if (
|
|
31966
|
+
if (Xo(a.d, f - g, S, c))
|
|
31967
31967
|
_.precision = f += g, u = o = m = Ze(l.minus(1), l.plus(1), f, 1), d = be(m.times(m), f, 1), i = c = 1;
|
|
31968
31968
|
else
|
|
31969
31969
|
return be(a, _.precision = w, S, ve = !0);
|
|
@@ -32011,13 +32011,13 @@ function a6(e, t) {
|
|
|
32011
32011
|
function u6(e, t) {
|
|
32012
32012
|
var n, r = t.d.length;
|
|
32013
32013
|
if (r < 3)
|
|
32014
|
-
return t.isZero() ? t :
|
|
32015
|
-
n = 1.4 * Math.sqrt(r), n = n > 16 ? 16 : n | 0, t = t.times(1 / Ou(5, n)), t =
|
|
32014
|
+
return t.isZero() ? t : Ls(e, 2, t, t);
|
|
32015
|
+
n = 1.4 * Math.sqrt(r), n = n > 16 ? 16 : n | 0, t = t.times(1 / Ou(5, n)), t = Ls(e, 2, t, t);
|
|
32016
32016
|
for (var i, s = new e(5), o = new e(16), c = new e(20); n--; )
|
|
32017
32017
|
i = t.times(t), t = t.times(s.plus(i.times(o.times(i).minus(c))));
|
|
32018
32018
|
return t;
|
|
32019
32019
|
}
|
|
32020
|
-
function
|
|
32020
|
+
function Ls(e, t, n, r, i) {
|
|
32021
32021
|
var s, o, c, a, u = e.precision, f = Math.ceil(u / _e);
|
|
32022
32022
|
for (ve = !1, a = n.times(n), c = new e(r); ; ) {
|
|
32023
32023
|
if (o = Ze(c.times(a), new e(t++ * t++), u, 1), c = i ? r.plus(o) : r.minus(o), r = Ze(o.times(a), new e(t++ * t++), u, 1), o = c.plus(r), o.d[f] !== void 0) {
|
|
@@ -32130,16 +32130,16 @@ function S6(e) {
|
|
|
32130
32130
|
0,
|
|
32131
32131
|
8,
|
|
32132
32132
|
"toExpNeg",
|
|
32133
|
-
-
|
|
32133
|
+
-Ss,
|
|
32134
32134
|
0,
|
|
32135
32135
|
"toExpPos",
|
|
32136
32136
|
0,
|
|
32137
|
-
|
|
32137
|
+
Ss,
|
|
32138
32138
|
"maxE",
|
|
32139
32139
|
0,
|
|
32140
|
-
|
|
32140
|
+
Ss,
|
|
32141
32141
|
"minE",
|
|
32142
|
-
-
|
|
32142
|
+
-Ss,
|
|
32143
32143
|
0,
|
|
32144
32144
|
"modulo",
|
|
32145
32145
|
0,
|
|
@@ -32694,7 +32694,7 @@ class Y6 {
|
|
|
32694
32694
|
*/
|
|
32695
32695
|
constructor(t) {
|
|
32696
32696
|
this.config = t;
|
|
32697
|
-
const n = t.network ===
|
|
32697
|
+
const n = t.network === Po.Testnet, r = n ? "https://xbt-testnet.gomaestro-api.org/v0" : "https://xbt-mainnet.gomaestro-api.org/v0";
|
|
32698
32698
|
this.maestro = new ax({
|
|
32699
32699
|
baseUrl: r,
|
|
32700
32700
|
apiKey: t.maestroApiKey
|
|
@@ -32862,7 +32862,7 @@ class Y6 {
|
|
|
32862
32862
|
* @returns Array of matching rune information
|
|
32863
32863
|
*/
|
|
32864
32864
|
async searchRunes(t) {
|
|
32865
|
-
const n = this.config.network ===
|
|
32865
|
+
const n = this.config.network === Po.Testnet ? XA : WA, r = t6`
|
|
32866
32866
|
query GetRunes($keyword: String!, $regex: String!) {
|
|
32867
32867
|
runes(
|
|
32868
32868
|
where: {
|
|
@@ -33299,7 +33299,7 @@ function NI(e = {}) {
|
|
|
33299
33299
|
};
|
|
33300
33300
|
}
|
|
33301
33301
|
export {
|
|
33302
|
-
|
|
33302
|
+
Po as Network,
|
|
33303
33303
|
Y6 as ReeClient,
|
|
33304
33304
|
_I as ReeProvider,
|
|
33305
33305
|
Ri as Transaction,
|