@omnity/ree-client-ts-sdk 0.5.5 → 0.5.7
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/index.cjs.js +26 -26
- package/dist/index.es.js +431 -428
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -78,11 +78,11 @@ function v1() {
|
|
|
78
78
|
}
|
|
79
79
|
return Xs;
|
|
80
80
|
}
|
|
81
|
-
var
|
|
81
|
+
var Sc = {};
|
|
82
82
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
83
83
|
var Vh;
|
|
84
84
|
function I1() {
|
|
85
|
-
return Vh || (Vh = 1,
|
|
85
|
+
return Vh || (Vh = 1, Sc.read = function(e, t, n, r, i) {
|
|
86
86
|
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];
|
|
87
87
|
for (l += d, s = y & (1 << -f) - 1, y >>= -f, f += c; f > 0; s = s * 256 + e[t + l], l += d, f -= 8)
|
|
88
88
|
;
|
|
@@ -96,14 +96,14 @@ function I1() {
|
|
|
96
96
|
o = o + Math.pow(2, r), s = s - u;
|
|
97
97
|
}
|
|
98
98
|
return (y ? -1 : 1) * o * Math.pow(2, s - r);
|
|
99
|
-
},
|
|
99
|
+
}, Sc.write = function(e, t, n, r, i, s) {
|
|
100
100
|
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;
|
|
101
101
|
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)
|
|
102
102
|
;
|
|
103
103
|
for (o = o << i | c, u += i; u > 0; e[n + y] = o & 255, y += g, o /= 256, u -= 8)
|
|
104
104
|
;
|
|
105
105
|
e[n + y - g] |= m * 128;
|
|
106
|
-
}),
|
|
106
|
+
}), Sc;
|
|
107
107
|
}
|
|
108
108
|
/*!
|
|
109
109
|
* The buffer module from node.js, for the browser.
|
|
@@ -112,7 +112,7 @@ function I1() {
|
|
|
112
112
|
* @license MIT
|
|
113
113
|
*/
|
|
114
114
|
var Lh;
|
|
115
|
-
function
|
|
115
|
+
function tc() {
|
|
116
116
|
return Lh || (Lh = 1, (function(e) {
|
|
117
117
|
const t = v1(), n = I1(), r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
118
118
|
e.Buffer = c, e.SlowBuffer = S, e.INSPECT_MAX_BYTES = 50;
|
|
@@ -1052,7 +1052,7 @@ function ec() {
|
|
|
1052
1052
|
}
|
|
1053
1053
|
})(vu)), vu;
|
|
1054
1054
|
}
|
|
1055
|
-
var O1 =
|
|
1055
|
+
var O1 = tc(), Iu = { exports: {} }, $h;
|
|
1056
1056
|
function B1() {
|
|
1057
1057
|
if ($h) return Iu.exports;
|
|
1058
1058
|
$h = 1;
|
|
@@ -2086,7 +2086,7 @@ function Fs() {
|
|
|
2086
2086
|
})(Pu)), Pu;
|
|
2087
2087
|
}
|
|
2088
2088
|
var Sn = {}, Je = {}, Yh;
|
|
2089
|
-
function
|
|
2089
|
+
function nc() {
|
|
2090
2090
|
if (Yh) return Je;
|
|
2091
2091
|
Yh = 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 = V, 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;
|
|
2092
2092
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -2356,7 +2356,7 @@ function C1() {
|
|
|
2356
2356
|
if (Zh) return Sn;
|
|
2357
2357
|
Zh = 1, Object.defineProperty(Sn, "__esModule", { value: !0 }), Sn.wNAF = void 0, Sn.negateCt = i, Sn.normalizeZ = s, Sn.mulEndoUnsafe = E, Sn.pippenger = _, Sn.precomputeMSMUnsafe = S, Sn.validateBasic = w, Sn._createCurveFields = O;
|
|
2358
2358
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2359
|
-
const e = /* @__PURE__ */ Fs(), t = /* @__PURE__ */
|
|
2359
|
+
const e = /* @__PURE__ */ Fs(), t = /* @__PURE__ */ nc(), n = BigInt(0), r = BigInt(1);
|
|
2360
2360
|
function i(A, R) {
|
|
2361
2361
|
const M = R.negate();
|
|
2362
2362
|
return A ? M : R;
|
|
@@ -2596,7 +2596,7 @@ function Cy() {
|
|
|
2596
2596
|
return Jh || (Jh = 1, (function(e) {
|
|
2597
2597
|
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 = V, e.weierstrass = $;
|
|
2598
2598
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2599
|
-
const t = /* @__PURE__ */ U1(), n = /* @__PURE__ */ ai(), r = /* @__PURE__ */ Fs(), i = /* @__PURE__ */ C1(), s = /* @__PURE__ */
|
|
2599
|
+
const t = /* @__PURE__ */ U1(), n = /* @__PURE__ */ ai(), r = /* @__PURE__ */ Fs(), i = /* @__PURE__ */ C1(), s = /* @__PURE__ */ nc(), o = (P, D) => (P + (P >= 0 ? D : -D) / y) / D;
|
|
2600
2600
|
function c(P, D, F) {
|
|
2601
2601
|
const [[x, B], [q, N]] = D, L = o(N * P, F), G = o(-B * P, F);
|
|
2602
2602
|
let X = P - L * x - G * q, Y = -L * B - G * N;
|
|
@@ -3477,7 +3477,7 @@ var Ru = {}, ed;
|
|
|
3477
3477
|
function F1() {
|
|
3478
3478
|
return ed || (ed = 1, (function(e) {
|
|
3479
3479
|
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;
|
|
3480
|
-
const t = /* @__PURE__ */ Fs(), n = /* @__PURE__ */
|
|
3480
|
+
const t = /* @__PURE__ */ Fs(), n = /* @__PURE__ */ nc(), r = t.bytesToNumberBE;
|
|
3481
3481
|
function i(y, g) {
|
|
3482
3482
|
if (o(y), o(g), y < 0 || y >= 1 << 8 * g)
|
|
3483
3483
|
throw new Error("invalid I2OSP input: " + y);
|
|
@@ -3607,7 +3607,7 @@ function M1() {
|
|
|
3607
3607
|
return td || (td = 1, (function(e) {
|
|
3608
3608
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.encodeToCurve = e.hashToCurve = e.secp256k1_hasher = e.schnorr = e.secp256k1 = void 0;
|
|
3609
3609
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3610
|
-
const t = /* @__PURE__ */ Uy(), n = /* @__PURE__ */ ai(), r = /* @__PURE__ */ H1(), i = /* @__PURE__ */ F1(), s = /* @__PURE__ */
|
|
3610
|
+
const t = /* @__PURE__ */ Uy(), n = /* @__PURE__ */ ai(), r = /* @__PURE__ */ H1(), i = /* @__PURE__ */ F1(), s = /* @__PURE__ */ nc(), o = /* @__PURE__ */ Cy(), c = /* @__PURE__ */ Fs(), a = {
|
|
3611
3611
|
p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
|
|
3612
3612
|
n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
|
|
3613
3613
|
h: BigInt(1),
|
|
@@ -3775,7 +3775,7 @@ var rd;
|
|
|
3775
3775
|
function V1() {
|
|
3776
3776
|
if (rd) return st;
|
|
3777
3777
|
rd = 1;
|
|
3778
|
-
var e = /* @__PURE__ */ M1(), t = /* @__PURE__ */
|
|
3778
|
+
var e = /* @__PURE__ */ M1(), t = /* @__PURE__ */ nc(), n = /* @__PURE__ */ q1();
|
|
3779
3779
|
function r(p) {
|
|
3780
3780
|
var h = /* @__PURE__ */ Object.create(null);
|
|
3781
3781
|
return p && Object.keys(p).forEach(function(b) {
|
|
@@ -4416,7 +4416,7 @@ function J1(e, t, n, r) {
|
|
|
4416
4416
|
throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 65535. Received ${n}`);
|
|
4417
4417
|
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;
|
|
4418
4418
|
}
|
|
4419
|
-
function
|
|
4419
|
+
function rc(e, t, n, r) {
|
|
4420
4420
|
if (t + 4 > e.length)
|
|
4421
4421
|
throw new Error("Offset is outside the bounds of Uint8Array");
|
|
4422
4422
|
if (r = r.toUpperCase(), n > 4294967295)
|
|
@@ -4499,7 +4499,7 @@ function Ky(e) {
|
|
|
4499
4499
|
}
|
|
4500
4500
|
function nb(e, t, n) {
|
|
4501
4501
|
const r = Ky(t);
|
|
4502
|
-
return r === 1 ? bn(e, n, t) : r === 2 ? (bn(e, n, Ge.OP_PUSHDATA1), bn(e, n + 1, t)) : r === 3 ? (bn(e, n, Ge.OP_PUSHDATA2), J1(e, n + 1, t, "LE")) : (bn(e, n, Ge.OP_PUSHDATA4),
|
|
4502
|
+
return r === 1 ? bn(e, n, t) : r === 2 ? (bn(e, n, Ge.OP_PUSHDATA1), bn(e, n + 1, t)) : r === 3 ? (bn(e, n, Ge.OP_PUSHDATA2), J1(e, n + 1, t, "LE")) : (bn(e, n, Ge.OP_PUSHDATA4), rc(e, n + 1, t, "LE")), r;
|
|
4503
4503
|
}
|
|
4504
4504
|
function rb(e, t) {
|
|
4505
4505
|
const n = vr(e, t);
|
|
@@ -4554,12 +4554,12 @@ var lb;
|
|
|
4554
4554
|
function hb(e, t) {
|
|
4555
4555
|
return lb?.get(e)?.get(t);
|
|
4556
4556
|
}
|
|
4557
|
-
function
|
|
4557
|
+
function Ao(e) {
|
|
4558
4558
|
const t = typeof e;
|
|
4559
4559
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
4560
4560
|
}
|
|
4561
4561
|
function Gt(e, t, n, r, i) {
|
|
4562
|
-
const s = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, c = i?.received ??
|
|
4562
|
+
const s = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, c = i?.received ?? Ao(s), a = {
|
|
4563
4563
|
kind: e.kind,
|
|
4564
4564
|
type: e.type,
|
|
4565
4565
|
input: s,
|
|
@@ -4645,12 +4645,12 @@ function $a(e, t) {
|
|
|
4645
4645
|
type: "max_value",
|
|
4646
4646
|
reference: $a,
|
|
4647
4647
|
async: !1,
|
|
4648
|
-
expects: `<=${e instanceof Date ? e.toJSON() :
|
|
4648
|
+
expects: `<=${e instanceof Date ? e.toJSON() : Ao(e)}`,
|
|
4649
4649
|
requirement: e,
|
|
4650
4650
|
message: t,
|
|
4651
4651
|
_run(n, r) {
|
|
4652
4652
|
return n.typed && n.value > this.requirement && Gt(this, "value", n, r, {
|
|
4653
|
-
received: n.value instanceof Date ? n.value.toJSON() :
|
|
4653
|
+
received: n.value instanceof Date ? n.value.toJSON() : Ao(n.value)
|
|
4654
4654
|
}), n;
|
|
4655
4655
|
}
|
|
4656
4656
|
};
|
|
@@ -4661,12 +4661,12 @@ function Da(e, t) {
|
|
|
4661
4661
|
type: "min_value",
|
|
4662
4662
|
reference: Da,
|
|
4663
4663
|
async: !1,
|
|
4664
|
-
expects: `>=${e instanceof Date ? e.toJSON() :
|
|
4664
|
+
expects: `>=${e instanceof Date ? e.toJSON() : Ao(e)}`,
|
|
4665
4665
|
requirement: e,
|
|
4666
4666
|
message: t,
|
|
4667
4667
|
_run(n, r) {
|
|
4668
4668
|
return n.typed && n.value < this.requirement && Gt(this, "value", n, r, {
|
|
4669
|
-
received: n.value instanceof Date ? n.value.toJSON() :
|
|
4669
|
+
received: n.value instanceof Date ? n.value.toJSON() : Ao(n.value)
|
|
4670
4670
|
}), n;
|
|
4671
4671
|
}
|
|
4672
4672
|
};
|
|
@@ -5040,7 +5040,7 @@ function qs(...e) {
|
|
|
5040
5040
|
const sd = new Uint8Array(32), od = kr(
|
|
5041
5041
|
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"
|
|
5042
5042
|
), At = (e) => qs(Ka(Uint8Array), Wy(e));
|
|
5043
|
-
function
|
|
5043
|
+
function vo(e, t) {
|
|
5044
5044
|
return e.length !== t.length ? !1 : e.every((n, r) => de(n, t[r]) === 0);
|
|
5045
5045
|
}
|
|
5046
5046
|
function Dn(e) {
|
|
@@ -5052,9 +5052,9 @@ function Dn(e) {
|
|
|
5052
5052
|
const r = e.slice(33);
|
|
5053
5053
|
return de(sd, r) === 0 || de(r, od) >= 0 ? !1 : t === 4 && e.length === 65;
|
|
5054
5054
|
}
|
|
5055
|
-
const
|
|
5055
|
+
const Xc = 254;
|
|
5056
5056
|
function vl(e) {
|
|
5057
|
-
return !e || !("output" in e) || !(e.output instanceof Uint8Array) ? !1 : e.version !== void 0 ? (e.version &
|
|
5057
|
+
return !e || !("output" in e) || !(e.output instanceof Uint8Array) ? !1 : e.version !== void 0 ? (e.version & Xc) === e.version : !0;
|
|
5058
5058
|
}
|
|
5059
5059
|
function Jy(e) {
|
|
5060
5060
|
return Array.isArray(e) ? e.length !== 2 ? !1 : e.every((t) => Jy(t)) : vl(e);
|
|
@@ -5207,7 +5207,7 @@ function Ol(e) {
|
|
|
5207
5207
|
function Ir(e) {
|
|
5208
5208
|
return !(e instanceof Uint8Array) || !Ol(e[e.length - 1]) ? !1 : j1(e.slice(0, -1));
|
|
5209
5209
|
}
|
|
5210
|
-
const
|
|
5210
|
+
const _o = Eb;
|
|
5211
5211
|
function Te(e, t, n) {
|
|
5212
5212
|
Object.defineProperty(e, t, {
|
|
5213
5213
|
configurable: !0,
|
|
@@ -5230,7 +5230,7 @@ function In(e) {
|
|
|
5230
5230
|
let t;
|
|
5231
5231
|
return () => (t !== void 0 || (t = e()), t);
|
|
5232
5232
|
}
|
|
5233
|
-
const hs = Ge,
|
|
5233
|
+
const hs = Ge, Tc = hs.OP_RESERVED;
|
|
5234
5234
|
function Ga(e, t) {
|
|
5235
5235
|
if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures)
|
|
5236
5236
|
throw new TypeError("Not enough data");
|
|
@@ -5258,15 +5258,15 @@ function Ga(e, t) {
|
|
|
5258
5258
|
const i = { network: e.network || Pn };
|
|
5259
5259
|
let s = [], o = !1;
|
|
5260
5260
|
function c(a) {
|
|
5261
|
-
o || (o = !0, s = lt(a), i.m = s[0] -
|
|
5261
|
+
o || (o = !0, s = lt(a), i.m = s[0] - Tc, i.n = s[s.length - 2] - Tc, i.pubkeys = s.slice(1, -2));
|
|
5262
5262
|
}
|
|
5263
5263
|
if (Te(i, "output", () => {
|
|
5264
5264
|
if (e.m && i.n && e.pubkeys)
|
|
5265
5265
|
return tn(
|
|
5266
5266
|
[].concat(
|
|
5267
|
-
|
|
5267
|
+
Tc + e.m,
|
|
5268
5268
|
e.pubkeys,
|
|
5269
|
-
|
|
5269
|
+
Tc + i.n,
|
|
5270
5270
|
hs.OP_CHECKMULTISIG
|
|
5271
5271
|
)
|
|
5272
5272
|
);
|
|
@@ -5303,7 +5303,7 @@ function Ga(e, t) {
|
|
|
5303
5303
|
throw new TypeError("Output is invalid");
|
|
5304
5304
|
if (e.m !== void 0 && e.m !== i.m) throw new TypeError("m mismatch");
|
|
5305
5305
|
if (e.n !== void 0 && e.n !== i.n) throw new TypeError("n mismatch");
|
|
5306
|
-
if (e.pubkeys && !
|
|
5306
|
+
if (e.pubkeys && !vo(e.pubkeys, i.pubkeys))
|
|
5307
5307
|
throw new TypeError("Pubkeys mismatch");
|
|
5308
5308
|
}
|
|
5309
5309
|
if (e.pubkeys) {
|
|
@@ -5321,7 +5321,7 @@ function Ga(e, t) {
|
|
|
5321
5321
|
if (e.input[0] !== hs.OP_0) throw new TypeError("Input is invalid");
|
|
5322
5322
|
if (i.signatures.length === 0 || !i.signatures.every(n))
|
|
5323
5323
|
throw new TypeError("Input has invalid signature(s)");
|
|
5324
|
-
if (e.signatures && !
|
|
5324
|
+
if (e.signatures && !vo(e.signatures, i.signatures))
|
|
5325
5325
|
throw new TypeError("Signature mismatch");
|
|
5326
5326
|
if (e.m !== void 0 && e.m !== e.signatures.length)
|
|
5327
5327
|
throw new TypeError("Signature count mismatch");
|
|
@@ -5384,7 +5384,7 @@ function ig(e, t) {
|
|
|
5384
5384
|
}
|
|
5385
5385
|
const ns = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
5386
5386
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
5387
|
-
function
|
|
5387
|
+
function ic(e) {
|
|
5388
5388
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
5389
5389
|
}
|
|
5390
5390
|
function vb(e) {
|
|
@@ -5392,7 +5392,7 @@ function vb(e) {
|
|
|
5392
5392
|
throw new Error("positive integer expected, got " + e);
|
|
5393
5393
|
}
|
|
5394
5394
|
function On(e, ...t) {
|
|
5395
|
-
if (!
|
|
5395
|
+
if (!ic(e))
|
|
5396
5396
|
throw new Error("Uint8Array expected");
|
|
5397
5397
|
if (t.length > 0 && !t.includes(e.length))
|
|
5398
5398
|
throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
|
|
@@ -5419,7 +5419,7 @@ function Hu(e) {
|
|
|
5419
5419
|
function zn(e, t) {
|
|
5420
5420
|
return e << 32 - t | e >>> t;
|
|
5421
5421
|
}
|
|
5422
|
-
function
|
|
5422
|
+
function xc(e, t) {
|
|
5423
5423
|
return e << t | e >>> 32 - t >>> 0;
|
|
5424
5424
|
}
|
|
5425
5425
|
const sg = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", Ob = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -5440,7 +5440,7 @@ function pd(e) {
|
|
|
5440
5440
|
if (e >= sr.a && e <= sr.f)
|
|
5441
5441
|
return e - (sr.a - 10);
|
|
5442
5442
|
}
|
|
5443
|
-
function
|
|
5443
|
+
function sc(e) {
|
|
5444
5444
|
if (typeof e != "string")
|
|
5445
5445
|
throw new Error("hex string expected, got " + typeof e);
|
|
5446
5446
|
if (sg)
|
|
@@ -5636,7 +5636,7 @@ const Rr = /* @__PURE__ */ Uint32Array.from([
|
|
|
5636
5636
|
function yd(e, t, n, r) {
|
|
5637
5637
|
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);
|
|
5638
5638
|
}
|
|
5639
|
-
const
|
|
5639
|
+
const Ac = /* @__PURE__ */ new Uint32Array(16);
|
|
5640
5640
|
class qb extends Bl {
|
|
5641
5641
|
constructor() {
|
|
5642
5642
|
super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
|
|
@@ -5650,31 +5650,31 @@ class qb extends Bl {
|
|
|
5650
5650
|
}
|
|
5651
5651
|
process(t, n) {
|
|
5652
5652
|
for (let y = 0; y < 16; y++, n += 4)
|
|
5653
|
-
|
|
5653
|
+
Ac[y] = t.getUint32(n, !0);
|
|
5654
5654
|
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;
|
|
5655
5655
|
for (let y = 0; y < 5; y++) {
|
|
5656
5656
|
const g = 4 - y, m = Fb[y], E = Mb[y], _ = fg[y], S = lg[y], w = Cb[y], T = Hb[y];
|
|
5657
5657
|
for (let O = 0; O < 16; O++) {
|
|
5658
|
-
const A =
|
|
5659
|
-
r = l, l = u, u =
|
|
5658
|
+
const A = xc(r + yd(y, s, c, u) + Ac[_[O]] + m, w[O]) + l | 0;
|
|
5659
|
+
r = l, l = u, u = xc(c, 10) | 0, c = s, s = A;
|
|
5660
5660
|
}
|
|
5661
5661
|
for (let O = 0; O < 16; O++) {
|
|
5662
|
-
const A =
|
|
5663
|
-
i = d, d = f, f =
|
|
5662
|
+
const A = xc(i + yd(g, o, a, f) + Ac[S[O]] + E, T[O]) + d | 0;
|
|
5663
|
+
i = d, d = f, f = xc(a, 10) | 0, a = o, o = A;
|
|
5664
5664
|
}
|
|
5665
5665
|
}
|
|
5666
5666
|
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);
|
|
5667
5667
|
}
|
|
5668
5668
|
roundClean() {
|
|
5669
|
-
Li(
|
|
5669
|
+
Li(Ac);
|
|
5670
5670
|
}
|
|
5671
5671
|
destroy() {
|
|
5672
5672
|
this.destroyed = !0, Li(this.buffer), this.set(0, 0, 0, 0, 0);
|
|
5673
5673
|
}
|
|
5674
5674
|
}
|
|
5675
|
-
const Vb = /* @__PURE__ */ Wa(() => new qb()), Lb = Vb,
|
|
5675
|
+
const Vb = /* @__PURE__ */ Wa(() => new qb()), Lb = Vb, vc = /* @__PURE__ */ BigInt(2 ** 32 - 1), gd = /* @__PURE__ */ BigInt(32);
|
|
5676
5676
|
function $b(e, t = !1) {
|
|
5677
|
-
return t ? { h: Number(e &
|
|
5677
|
+
return t ? { h: Number(e & vc), l: Number(e >> gd & vc) } : { h: Number(e >> gd & vc) | 0, l: Number(e & vc) | 0 };
|
|
5678
5678
|
}
|
|
5679
5679
|
function Db(e, t = !1) {
|
|
5680
5680
|
const n = e.length;
|
|
@@ -5685,7 +5685,7 @@ function Db(e, t = !1) {
|
|
|
5685
5685
|
}
|
|
5686
5686
|
return [r, i];
|
|
5687
5687
|
}
|
|
5688
|
-
const md = (e, t, n) => e >>> n, wd = (e, t, n) => e << 32 - n | t >>> n, rs = (e, t, n) => e >>> n | t << 32 - n, is = (e, t, n) => e << 32 - n | t >>> n,
|
|
5688
|
+
const md = (e, t, n) => e >>> n, wd = (e, t, n) => e << 32 - n | t >>> n, rs = (e, t, n) => e >>> n | t << 32 - n, is = (e, t, n) => e << 32 - n | t >>> n, Ic = (e, t, n) => e << 64 - n | t >>> n - 32, Oc = (e, t, n) => e >>> n - 32 | t << 64 - n;
|
|
5689
5689
|
function or(e, t, n, r) {
|
|
5690
5690
|
const i = (t >>> 0) + (r >>> 0);
|
|
5691
5691
|
return { h: e + n + (i / 2 ** 32 | 0) | 0, l: i | 0 };
|
|
@@ -5893,12 +5893,12 @@ class e2 extends Bl {
|
|
|
5893
5893
|
for (let w = 0; w < 16; w++, n += 4)
|
|
5894
5894
|
Hr[w] = t.getUint32(n), Fr[w] = t.getUint32(n += 4);
|
|
5895
5895
|
for (let w = 16; w < 80; w++) {
|
|
5896
|
-
const T = Hr[w - 15] | 0, O = Fr[w - 15] | 0, A = rs(T, O, 1) ^ rs(T, O, 8) ^ md(T, O, 7), R = is(T, O, 1) ^ is(T, O, 8) ^ wd(T, O, 7), M = Hr[w - 2] | 0, v = Fr[w - 2] | 0, U = rs(M, v, 19) ^
|
|
5896
|
+
const T = Hr[w - 15] | 0, O = Fr[w - 15] | 0, A = rs(T, O, 1) ^ rs(T, O, 8) ^ md(T, O, 7), R = is(T, O, 1) ^ is(T, O, 8) ^ wd(T, O, 7), M = Hr[w - 2] | 0, v = Fr[w - 2] | 0, U = rs(M, v, 19) ^ Ic(M, v, 61) ^ md(M, v, 6), V = is(M, v, 19) ^ Oc(M, v, 61) ^ wd(M, v, 6), K = Gb(R, V, Fr[w - 7], Fr[w - 16]), H = Wb(K, A, U, Hr[w - 7], Hr[w - 16]);
|
|
5897
5897
|
Hr[w] = H | 0, Fr[w] = K | 0;
|
|
5898
5898
|
}
|
|
5899
5899
|
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;
|
|
5900
5900
|
for (let w = 0; w < 80; w++) {
|
|
5901
|
-
const T = rs(l, d, 14) ^ rs(l, d, 18) ^
|
|
5901
|
+
const T = rs(l, d, 14) ^ rs(l, d, 18) ^ Ic(l, d, 41), O = is(l, d, 14) ^ is(l, d, 18) ^ Oc(l, d, 41), A = l & y ^ ~l & m, R = d & g ^ ~d & E, M = Xb(S, O, R, Qb[w], Fr[w]), v = zb(M, _, T, A, Jb[w], Hr[w]), U = M | 0, V = rs(r, i, 28) ^ Ic(r, i, 34) ^ Ic(r, i, 39), K = is(r, i, 28) ^ Oc(r, i, 34) ^ Oc(r, i, 39), H = r & s ^ r & c ^ s & c, $ = i & o ^ i & a ^ o & a;
|
|
5902
5902
|
_ = m | 0, S = E | 0, m = y | 0, E = g | 0, y = l | 0, g = d | 0, { h: l, l: d } = or(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;
|
|
5903
5903
|
const P = jb(U, K, $);
|
|
5904
5904
|
r = Kb(P, v, V, H), i = P | 0;
|
|
@@ -6633,8 +6633,8 @@ function o2(e) {
|
|
|
6633
6633
|
function c2(e) {
|
|
6634
6634
|
return Qt(Qt(e));
|
|
6635
6635
|
}
|
|
6636
|
-
const
|
|
6637
|
-
function
|
|
6636
|
+
const Io = o2(c2), Mr = Ge;
|
|
6637
|
+
function oc(e, t) {
|
|
6638
6638
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.input)
|
|
6639
6639
|
throw new TypeError("Not enough data");
|
|
6640
6640
|
t = Object.assign({ validate: !0 }, t || {}), ct(
|
|
@@ -6652,13 +6652,13 @@ function sc(e, t) {
|
|
|
6652
6652
|
e
|
|
6653
6653
|
);
|
|
6654
6654
|
const n = In(() => {
|
|
6655
|
-
const o =
|
|
6655
|
+
const o = Io.decode(e.address), c = vr(o, 0), a = o.slice(1);
|
|
6656
6656
|
return { version: c, hash: a };
|
|
6657
6657
|
}), r = In(() => lt(e.input)), i = e.network || Pn, s = { name: "p2pkh", network: i };
|
|
6658
6658
|
if (Te(s, "address", () => {
|
|
6659
6659
|
if (!s.hash) return;
|
|
6660
6660
|
const o = new Uint8Array(21);
|
|
6661
|
-
return bn(o, 0, i.pubKeyHash), o.set(s.hash, 1),
|
|
6661
|
+
return bn(o, 0, i.pubKeyHash), o.set(s.hash, 1), Io.encode(o);
|
|
6662
6662
|
}), Te(s, "hash", () => {
|
|
6663
6663
|
if (e.output) return e.output.slice(3, 23);
|
|
6664
6664
|
if (e.address) return n().hash;
|
|
@@ -6729,7 +6729,7 @@ function sc(e, t) {
|
|
|
6729
6729
|
return Object.assign(s, e);
|
|
6730
6730
|
}
|
|
6731
6731
|
const Zs = Ge;
|
|
6732
|
-
function
|
|
6732
|
+
function cc(e, t) {
|
|
6733
6733
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.input)
|
|
6734
6734
|
throw new TypeError("Not enough data");
|
|
6735
6735
|
t = Object.assign({ validate: !0 }, t || {}), ct(
|
|
@@ -6756,7 +6756,7 @@ function oc(e, t) {
|
|
|
6756
6756
|
let n = e.network;
|
|
6757
6757
|
n || (n = e.redeem && e.redeem.network || Pn);
|
|
6758
6758
|
const r = { network: n }, i = In(() => {
|
|
6759
|
-
const c =
|
|
6759
|
+
const c = Io.decode(e.address), a = vr(c, 0), u = c.slice(1);
|
|
6760
6760
|
return { version: a, hash: u };
|
|
6761
6761
|
}), s = In(() => lt(e.input)), o = In(() => {
|
|
6762
6762
|
const c = s(), a = c[c.length - 1];
|
|
@@ -6770,7 +6770,7 @@ function oc(e, t) {
|
|
|
6770
6770
|
if (Te(r, "address", () => {
|
|
6771
6771
|
if (!r.hash) return;
|
|
6772
6772
|
const c = new Uint8Array(21);
|
|
6773
|
-
return bn(c, 0, r.network.scriptHash), c.set(r.hash, 1),
|
|
6773
|
+
return bn(c, 0, r.network.scriptHash), c.set(r.hash, 1), Io.encode(c);
|
|
6774
6774
|
}), Te(r, "hash", () => {
|
|
6775
6775
|
if (e.output) return e.output.slice(2, 22);
|
|
6776
6776
|
if (e.address) return i().hash;
|
|
@@ -6862,13 +6862,13 @@ function oc(e, t) {
|
|
|
6862
6862
|
}
|
|
6863
6863
|
a(e.redeem);
|
|
6864
6864
|
}
|
|
6865
|
-
if (e.witness && e.redeem && e.redeem.witness && !
|
|
6865
|
+
if (e.witness && e.redeem && e.redeem.witness && !vo(e.redeem.witness, e.witness))
|
|
6866
6866
|
throw new TypeError("Witness and redeem.witness mismatch");
|
|
6867
6867
|
}
|
|
6868
6868
|
return Object.assign(r, e);
|
|
6869
6869
|
}
|
|
6870
6870
|
var wi = {}, bd;
|
|
6871
|
-
function
|
|
6871
|
+
function ac() {
|
|
6872
6872
|
if (bd) return wi;
|
|
6873
6873
|
bd = 1, Object.defineProperty(wi, "__esModule", { value: !0 }), wi.bech32m = wi.bech32 = void 0;
|
|
6874
6874
|
const e = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", t = {};
|
|
@@ -7002,7 +7002,7 @@ function cc() {
|
|
|
7002
7002
|
}
|
|
7003
7003
|
return wi.bech32 = a("bech32"), wi.bech32m = a("bech32m"), wi;
|
|
7004
7004
|
}
|
|
7005
|
-
var Kt =
|
|
7005
|
+
var Kt = ac();
|
|
7006
7006
|
const Ed = Ge, a2 = new Uint8Array(0);
|
|
7007
7007
|
function za(e, t) {
|
|
7008
7008
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.witness)
|
|
@@ -7102,10 +7102,10 @@ function za(e, t) {
|
|
|
7102
7102
|
return Object.assign(i, e);
|
|
7103
7103
|
}
|
|
7104
7104
|
const _d = Ge, Mu = new Uint8Array(0);
|
|
7105
|
-
function
|
|
7105
|
+
function Bc(e) {
|
|
7106
7106
|
return !!(e instanceof Uint8Array && e.length === 65 && e[0] === 4 && Dn(e));
|
|
7107
7107
|
}
|
|
7108
|
-
function
|
|
7108
|
+
function uc(e, t) {
|
|
7109
7109
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.witness)
|
|
7110
7110
|
throw new TypeError("Not enough data");
|
|
7111
7111
|
t = Object.assign({ validate: !0 }, t || {}), ct(
|
|
@@ -7215,10 +7215,10 @@ function ac(e, t) {
|
|
|
7215
7215
|
}
|
|
7216
7216
|
if (e.redeem.input && !Il(r()))
|
|
7217
7217
|
throw new TypeError("Non push-only scriptSig");
|
|
7218
|
-
if (e.witness && e.redeem.witness && !
|
|
7218
|
+
if (e.witness && e.redeem.witness && !vo(e.witness, e.redeem.witness))
|
|
7219
7219
|
throw new TypeError("Witness and redeem.witness mismatch");
|
|
7220
|
-
if (e.redeem.input && r().some(
|
|
7221
|
-
|
|
7220
|
+
if (e.redeem.input && r().some(Bc) || e.redeem.output && (lt(e.redeem.output) || []).some(
|
|
7221
|
+
Bc
|
|
7222
7222
|
))
|
|
7223
7223
|
throw new TypeError(
|
|
7224
7224
|
"redeem.input or redeem.output contains uncompressed pubkey"
|
|
@@ -7228,22 +7228,22 @@ function ac(e, t) {
|
|
|
7228
7228
|
const c = e.witness[e.witness.length - 1];
|
|
7229
7229
|
if (e.redeem && e.redeem.output && de(e.redeem.output, c) !== 0)
|
|
7230
7230
|
throw new TypeError("Witness and redeem.output mismatch");
|
|
7231
|
-
if (e.witness.some(
|
|
7231
|
+
if (e.witness.some(Bc) || (lt(c) || []).some(Bc))
|
|
7232
7232
|
throw new TypeError("Witness contains uncompressed pubkey");
|
|
7233
7233
|
}
|
|
7234
7234
|
}
|
|
7235
7235
|
return Object.assign(s, e);
|
|
7236
7236
|
}
|
|
7237
|
-
const
|
|
7237
|
+
const So = {};
|
|
7238
7238
|
function u2(e) {
|
|
7239
|
-
e ? e !==
|
|
7239
|
+
e ? e !== So.eccLib && (f2(e), So.eccLib = e) : So.eccLib = e;
|
|
7240
7240
|
}
|
|
7241
7241
|
function qf() {
|
|
7242
|
-
if (!
|
|
7242
|
+
if (!So.eccLib)
|
|
7243
7243
|
throw new Error(
|
|
7244
7244
|
"No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance"
|
|
7245
7245
|
);
|
|
7246
|
-
return
|
|
7246
|
+
return So.eccLib;
|
|
7247
7247
|
}
|
|
7248
7248
|
const cr = (e) => kr(e);
|
|
7249
7249
|
function f2(e) {
|
|
@@ -7449,7 +7449,7 @@ class $t {
|
|
|
7449
7449
|
this.offset = Dy(this.buffer, this.offset, BigInt(t), "LE");
|
|
7450
7450
|
}
|
|
7451
7451
|
writeUInt32(t) {
|
|
7452
|
-
this.offset =
|
|
7452
|
+
this.offset = rc(this.buffer, this.offset, t, "LE");
|
|
7453
7453
|
}
|
|
7454
7454
|
writeUInt64(t) {
|
|
7455
7455
|
this.offset = Q1(this.buffer, this.offset, BigInt(t), "LE");
|
|
@@ -7568,7 +7568,7 @@ function A2(e, t) {
|
|
|
7568
7568
|
at(t ? [e, t] : [e])
|
|
7569
7569
|
);
|
|
7570
7570
|
}
|
|
7571
|
-
function
|
|
7571
|
+
function Nc(e, t) {
|
|
7572
7572
|
if (!(e instanceof Uint8Array) || e.length !== 32 || t && t.length !== 32) return null;
|
|
7573
7573
|
const n = A2(e, t), r = qf().xOnlyPointAddTweak(e, n);
|
|
7574
7574
|
return !r || r.xOnlyPubkey === null ? null : {
|
|
@@ -7584,7 +7584,7 @@ function v2(e) {
|
|
|
7584
7584
|
return fi(e.length, n), at([n, e]);
|
|
7585
7585
|
}
|
|
7586
7586
|
const Td = Ge, xd = 1, I2 = 80;
|
|
7587
|
-
function
|
|
7587
|
+
function fc(e, t) {
|
|
7588
7588
|
if (!e.address && !e.output && !e.pubkey && !e.internalPubkey && !(e.witness && e.witness.length > 1))
|
|
7589
7589
|
throw new TypeError("Not enough data");
|
|
7590
7590
|
t = Object.assign({ validate: !0 }, t || {}), ct(
|
|
@@ -7635,7 +7635,7 @@ function uc(e, t) {
|
|
|
7635
7635
|
if (c) return c.hash;
|
|
7636
7636
|
const a = r();
|
|
7637
7637
|
if (a && a.length > 1) {
|
|
7638
|
-
const u = a[a.length - 1], f = u[0] &
|
|
7638
|
+
const u = a[a.length - 1], f = u[0] & Xc, l = a[a.length - 2], d = Er({ output: l, version: f });
|
|
7639
7639
|
return Vf(u, d);
|
|
7640
7640
|
}
|
|
7641
7641
|
return null;
|
|
@@ -7648,14 +7648,14 @@ function uc(e, t) {
|
|
|
7648
7648
|
return {
|
|
7649
7649
|
output: c[c.length - 2],
|
|
7650
7650
|
witness: c.slice(0, -2),
|
|
7651
|
-
redeemVersion: c[c.length - 1][0] &
|
|
7651
|
+
redeemVersion: c[c.length - 1][0] & Xc
|
|
7652
7652
|
};
|
|
7653
7653
|
}), Te(o, "pubkey", () => {
|
|
7654
7654
|
if (e.pubkey) return e.pubkey;
|
|
7655
7655
|
if (e.output) return e.output.slice(2);
|
|
7656
7656
|
if (e.address) return n().data;
|
|
7657
7657
|
if (o.internalPubkey) {
|
|
7658
|
-
const c =
|
|
7658
|
+
const c = Nc(o.internalPubkey, o.hash);
|
|
7659
7659
|
if (c) return c.x;
|
|
7660
7660
|
}
|
|
7661
7661
|
}), Te(o, "internalPubkey", () => {
|
|
@@ -7677,7 +7677,7 @@ function uc(e, t) {
|
|
|
7677
7677
|
version: o.redeemVersion
|
|
7678
7678
|
}), u = pa(c, a);
|
|
7679
7679
|
if (!u) return;
|
|
7680
|
-
const f =
|
|
7680
|
+
const f = Nc(e.internalPubkey, c.hash);
|
|
7681
7681
|
if (!f) return;
|
|
7682
7682
|
const l = at(
|
|
7683
7683
|
[
|
|
@@ -7712,7 +7712,7 @@ function uc(e, t) {
|
|
|
7712
7712
|
c = e.output.slice(2);
|
|
7713
7713
|
}
|
|
7714
7714
|
if (e.internalPubkey) {
|
|
7715
|
-
const f =
|
|
7715
|
+
const f = Nc(e.internalPubkey, o.hash);
|
|
7716
7716
|
if (c.length > 0 && de(c, f.x) !== 0)
|
|
7717
7717
|
throw new TypeError("Pubkey mismatch");
|
|
7718
7718
|
c = f.x;
|
|
@@ -7740,7 +7740,7 @@ function uc(e, t) {
|
|
|
7740
7740
|
if (o.redeem.output && de(e.redeem.output, o.redeem.output) !== 0)
|
|
7741
7741
|
throw new TypeError("Redeem.output and witness mismatch");
|
|
7742
7742
|
}
|
|
7743
|
-
if (e.redeem.witness && o.redeem.witness && !
|
|
7743
|
+
if (e.redeem.witness && o.redeem.witness && !vo(e.redeem.witness, o.redeem.witness))
|
|
7744
7744
|
throw new TypeError("Redeem.witness and witness mismatch");
|
|
7745
7745
|
}
|
|
7746
7746
|
if (u && u.length)
|
|
@@ -7767,7 +7767,7 @@ function uc(e, t) {
|
|
|
7767
7767
|
throw new TypeError("Internal pubkey mismatch");
|
|
7768
7768
|
if (!qf().isXOnlyPoint(d))
|
|
7769
7769
|
throw new TypeError("Invalid internalPubkey for p2tr witness");
|
|
7770
|
-
const y = f[0] &
|
|
7770
|
+
const y = f[0] & Xc, g = u[u.length - 2], m = Er({ output: g, version: y }), E = Vf(f, m), _ = Nc(d, E);
|
|
7771
7771
|
if (!_)
|
|
7772
7772
|
throw new TypeError("Invalid outputKey for p2tr witness");
|
|
7773
7773
|
if (c.length && de(c, _.x) !== 0)
|
|
@@ -7791,7 +7791,7 @@ function O2(e, t) {
|
|
|
7791
7791
|
return console.warn(Tg), B2(n, r, t.bech32);
|
|
7792
7792
|
}
|
|
7793
7793
|
function xg(e) {
|
|
7794
|
-
const t =
|
|
7794
|
+
const t = Io.decode(e);
|
|
7795
7795
|
if (t.length < 21) throw new TypeError(e + " is too short");
|
|
7796
7796
|
if (t.length > 21) throw new TypeError(e + " is too long");
|
|
7797
7797
|
const n = vr(t, 0), r = t.slice(1);
|
|
@@ -7820,11 +7820,11 @@ function B2(e, t, n) {
|
|
|
7820
7820
|
function N2(e, t) {
|
|
7821
7821
|
t = t || Pn;
|
|
7822
7822
|
try {
|
|
7823
|
-
return
|
|
7823
|
+
return oc({ output: e, network: t }).address;
|
|
7824
7824
|
} catch {
|
|
7825
7825
|
}
|
|
7826
7826
|
try {
|
|
7827
|
-
return
|
|
7827
|
+
return cc({ output: e, network: t }).address;
|
|
7828
7828
|
} catch {
|
|
7829
7829
|
}
|
|
7830
7830
|
try {
|
|
@@ -7832,11 +7832,11 @@ function N2(e, t) {
|
|
|
7832
7832
|
} catch {
|
|
7833
7833
|
}
|
|
7834
7834
|
try {
|
|
7835
|
-
return
|
|
7835
|
+
return uc({ output: e, network: t }).address;
|
|
7836
7836
|
} catch {
|
|
7837
7837
|
}
|
|
7838
7838
|
try {
|
|
7839
|
-
return
|
|
7839
|
+
return fc({ output: e, network: t }).address;
|
|
7840
7840
|
} catch {
|
|
7841
7841
|
}
|
|
7842
7842
|
try {
|
|
@@ -7854,9 +7854,9 @@ function Ag(e, t) {
|
|
|
7854
7854
|
}
|
|
7855
7855
|
if (n) {
|
|
7856
7856
|
if (n.version === t.pubKeyHash)
|
|
7857
|
-
return sc({ hash: n.hash }).output;
|
|
7858
|
-
if (n.version === t.scriptHash)
|
|
7859
7857
|
return oc({ hash: n.hash }).output;
|
|
7858
|
+
if (n.version === t.scriptHash)
|
|
7859
|
+
return cc({ hash: n.hash }).output;
|
|
7860
7860
|
} else {
|
|
7861
7861
|
try {
|
|
7862
7862
|
r = kl(e);
|
|
@@ -7869,10 +7869,10 @@ function Ag(e, t) {
|
|
|
7869
7869
|
if (r.data.length === 20)
|
|
7870
7870
|
return za({ hash: r.data }).output;
|
|
7871
7871
|
if (r.data.length === 32)
|
|
7872
|
-
return
|
|
7872
|
+
return uc({ hash: r.data }).output;
|
|
7873
7873
|
} else if (r.version === 1) {
|
|
7874
7874
|
if (r.data.length === 32)
|
|
7875
|
-
return
|
|
7875
|
+
return fc({ pubkey: r.data }).output;
|
|
7876
7876
|
} else if (r.version >= _g && r.version <= Eg && r.data.length >= bg && r.data.length <= wg)
|
|
7877
7877
|
return console.warn(Tg), tn([
|
|
7878
7878
|
r.version + Sg,
|
|
@@ -8209,7 +8209,7 @@ function F2(e) {
|
|
|
8209
8209
|
return r.slice(1).forEach((o) => {
|
|
8210
8210
|
const c = o.slice(-1) === "'";
|
|
8211
8211
|
let a = 2147483647 & parseInt(c ? o.slice(0, -1) : o, 10);
|
|
8212
|
-
c && (a += 2147483648),
|
|
8212
|
+
c && (a += 2147483648), rc(i, s, a, "LE"), s += 4;
|
|
8213
8213
|
}), {
|
|
8214
8214
|
key: n,
|
|
8215
8215
|
value: i
|
|
@@ -8407,7 +8407,7 @@ function _E(e) {
|
|
|
8407
8407
|
}
|
|
8408
8408
|
function SE(e) {
|
|
8409
8409
|
const t = Uint8Array.from([me.SIGHASH_TYPE]), n = new Uint8Array(4);
|
|
8410
|
-
return
|
|
8410
|
+
return rc(n, 0, e, "LE"), {
|
|
8411
8411
|
key: t,
|
|
8412
8412
|
value: n
|
|
8413
8413
|
};
|
|
@@ -8693,7 +8693,7 @@ function Pl(e, t = a_) {
|
|
|
8693
8693
|
return f.slice(1).forEach((y) => {
|
|
8694
8694
|
const g = y.slice(-1) === "'";
|
|
8695
8695
|
let m = 2147483647 & parseInt(g ? y.slice(0, -1) : y, 10);
|
|
8696
|
-
g && (m += 2147483648),
|
|
8696
|
+
g && (m += 2147483648), rc(l, d, m, "LE"), d += 4;
|
|
8697
8697
|
}), {
|
|
8698
8698
|
key: u,
|
|
8699
8699
|
value: l
|
|
@@ -9220,7 +9220,7 @@ function Rt(e, t) {
|
|
|
9220
9220
|
if (n === void 0) throw new Error(`No input #${t}`);
|
|
9221
9221
|
return n;
|
|
9222
9222
|
}
|
|
9223
|
-
function
|
|
9223
|
+
function Oo(e, t) {
|
|
9224
9224
|
const n = e[t];
|
|
9225
9225
|
if (n === void 0) throw new Error(`No output #${t}`);
|
|
9226
9226
|
return n;
|
|
@@ -9286,7 +9286,7 @@ function w_(e, t) {
|
|
|
9286
9286
|
Rg(t, r);
|
|
9287
9287
|
}
|
|
9288
9288
|
function b_(e, t) {
|
|
9289
|
-
const n = e.length - 1, r =
|
|
9289
|
+
const n = e.length - 1, r = Oo(e, n);
|
|
9290
9290
|
Ug(t, r);
|
|
9291
9291
|
}
|
|
9292
9292
|
let Nd = class {
|
|
@@ -9326,7 +9326,7 @@ let Nd = class {
|
|
|
9326
9326
|
return Rg(n, r), this;
|
|
9327
9327
|
}
|
|
9328
9328
|
updateOutput(t, n) {
|
|
9329
|
-
const r =
|
|
9329
|
+
const r = Oo(this.outputs, t);
|
|
9330
9330
|
return Ug(n, r), this;
|
|
9331
9331
|
}
|
|
9332
9332
|
addUnknownKeyValToGlobal(t) {
|
|
@@ -9341,7 +9341,7 @@ let Nd = class {
|
|
|
9341
9341
|
return $u(n, r.unknownKeyVals, Du(me)), r.unknownKeyVals || (r.unknownKeyVals = []), r.unknownKeyVals.push(n), this;
|
|
9342
9342
|
}
|
|
9343
9343
|
addUnknownKeyValToOutput(t, n) {
|
|
9344
|
-
const r =
|
|
9344
|
+
const r = Oo(this.outputs, t);
|
|
9345
9345
|
return $u(n, r.unknownKeyVals, Du(pt)), r.unknownKeyVals || (r.unknownKeyVals = []), r.unknownKeyVals.push(n), this;
|
|
9346
9346
|
}
|
|
9347
9347
|
addInput(t) {
|
|
@@ -9396,7 +9396,7 @@ function Yi(e) {
|
|
|
9396
9396
|
}
|
|
9397
9397
|
};
|
|
9398
9398
|
}
|
|
9399
|
-
const E_ = Yi(Ga), __ = Yi(ig), S_ = Yi(
|
|
9399
|
+
const E_ = Yi(Ga), __ = Yi(ig), S_ = Yi(oc), Ya = Yi(za), kd = Yi(uc), Cg = Yi(cc), Hg = Yi(fc);
|
|
9400
9400
|
function ga(e) {
|
|
9401
9401
|
let t = new Uint8Array(0);
|
|
9402
9402
|
function n(o) {
|
|
@@ -9424,7 +9424,7 @@ function Za(e, t) {
|
|
|
9424
9424
|
}
|
|
9425
9425
|
function T_(e, t) {
|
|
9426
9426
|
return x_(e).some(
|
|
9427
|
-
(r) => Mg(r,
|
|
9427
|
+
(r) => Mg(r, _o.decode, t)
|
|
9428
9428
|
);
|
|
9429
9429
|
}
|
|
9430
9430
|
function Mg(e, t, n) {
|
|
@@ -9452,7 +9452,7 @@ function A_(e) {
|
|
|
9452
9452
|
const t = e.finalScriptSig ? lt(e.finalScriptSig) || [] : [], n = e.finalScriptWitness ? lt(e.finalScriptWitness) || [] : [];
|
|
9453
9453
|
return t.concat(n).filter((r) => r instanceof Uint8Array && Ir(r)).map((r) => ({ signature: r }));
|
|
9454
9454
|
}
|
|
9455
|
-
const
|
|
9455
|
+
const zc = (e) => e.length === 32 ? e : e.slice(1, 33);
|
|
9456
9456
|
function Pd(e, t, n) {
|
|
9457
9457
|
const r = q_(
|
|
9458
9458
|
t,
|
|
@@ -9466,7 +9466,7 @@ function Pd(e, t, n) {
|
|
|
9466
9466
|
throw new Error(`Can not finalize taproot input #${e}: ${i}`);
|
|
9467
9467
|
}
|
|
9468
9468
|
}
|
|
9469
|
-
function
|
|
9469
|
+
function kc(e, t) {
|
|
9470
9470
|
const n = t ? Uint8Array.from([t]) : Uint8Array.from([]);
|
|
9471
9471
|
return at([e, n]);
|
|
9472
9472
|
}
|
|
@@ -9492,7 +9492,7 @@ function v_(e, t) {
|
|
|
9492
9492
|
}
|
|
9493
9493
|
}
|
|
9494
9494
|
function I_(e, t) {
|
|
9495
|
-
const n = t && O_(t.leaves), { output: r } =
|
|
9495
|
+
const n = t && O_(t.leaves), { output: r } = fc({
|
|
9496
9496
|
internalPubkey: e,
|
|
9497
9497
|
scriptTree: n
|
|
9498
9498
|
});
|
|
@@ -9722,20 +9722,20 @@ class ma {
|
|
|
9722
9722
|
return t.opts = JSON.parse(JSON.stringify(this.opts)), t;
|
|
9723
9723
|
}
|
|
9724
9724
|
setMaximumFeeRate(t) {
|
|
9725
|
-
|
|
9725
|
+
Pc(t), this.opts.maximumFeeRate = t;
|
|
9726
9726
|
}
|
|
9727
9727
|
setVersion(t) {
|
|
9728
|
-
|
|
9728
|
+
Pc(t), Js(this.data.inputs, "setVersion");
|
|
9729
9729
|
const n = this.__CACHE;
|
|
9730
9730
|
return n.__TX.version = t, n.__EXTRACTED_TX = void 0, this;
|
|
9731
9731
|
}
|
|
9732
9732
|
setLocktime(t) {
|
|
9733
|
-
|
|
9733
|
+
Pc(t), Js(this.data.inputs, "setLocktime");
|
|
9734
9734
|
const n = this.__CACHE;
|
|
9735
9735
|
return n.__TX.locktime = t, n.__EXTRACTED_TX = void 0, this;
|
|
9736
9736
|
}
|
|
9737
9737
|
setInputSequence(t, n) {
|
|
9738
|
-
|
|
9738
|
+
Pc(n), Js(this.data.inputs, "setInputSequence");
|
|
9739
9739
|
const r = this.__CACHE;
|
|
9740
9740
|
if (r.__TX.ins.length <= t)
|
|
9741
9741
|
throw new Error("Input index too high");
|
|
@@ -9842,7 +9842,7 @@ class ma {
|
|
|
9842
9842
|
`Cannot finalize input #${t}. Missing withness utxo.`
|
|
9843
9843
|
);
|
|
9844
9844
|
if (n.tapKeySig) {
|
|
9845
|
-
const s =
|
|
9845
|
+
const s = fc({
|
|
9846
9846
|
output: n.witnessUtxo.script,
|
|
9847
9847
|
signature: n.tapKeySig
|
|
9848
9848
|
}), o = ga(s.witness);
|
|
@@ -9876,11 +9876,11 @@ class ma {
|
|
|
9876
9876
|
return !!r.bip32Derivation && r.bip32Derivation.some(i);
|
|
9877
9877
|
}
|
|
9878
9878
|
outputHasPubkey(t, n) {
|
|
9879
|
-
const r =
|
|
9879
|
+
const r = Oo(this.data.outputs, t);
|
|
9880
9880
|
return nS(n, r, t, this.__CACHE);
|
|
9881
9881
|
}
|
|
9882
9882
|
outputHasHDKey(t, n) {
|
|
9883
|
-
const r =
|
|
9883
|
+
const r = Oo(this.data.outputs, t), i = Hd(n);
|
|
9884
9884
|
return !!r.bip32Derivation && r.bip32Derivation.some(i);
|
|
9885
9885
|
}
|
|
9886
9886
|
validateSignaturesOfAllInputs(t) {
|
|
@@ -9907,7 +9907,7 @@ class ma {
|
|
|
9907
9907
|
const c = [];
|
|
9908
9908
|
let a, u, f;
|
|
9909
9909
|
for (const l of o) {
|
|
9910
|
-
const d =
|
|
9910
|
+
const d = _o.decode(l.signature), { hash: y, script: g } = f !== d.hashType ? jg(
|
|
9911
9911
|
t,
|
|
9912
9912
|
Object.assign({}, i, { sighashType: d.hashType }),
|
|
9913
9913
|
this.__CACHE,
|
|
@@ -9923,7 +9923,7 @@ class ma {
|
|
|
9923
9923
|
throw new Error("No signatures to validate");
|
|
9924
9924
|
if (typeof n != "function")
|
|
9925
9925
|
throw new Error("Need validator function to validate signatures");
|
|
9926
|
-
r = r &&
|
|
9926
|
+
r = r && zc(r);
|
|
9927
9927
|
const c = r ? Kf(
|
|
9928
9928
|
t,
|
|
9929
9929
|
i,
|
|
@@ -10090,7 +10090,7 @@ class ma {
|
|
|
10090
10090
|
), o = [
|
|
10091
10091
|
{
|
|
10092
10092
|
pubkey: n.publicKey,
|
|
10093
|
-
signature:
|
|
10093
|
+
signature: _o.encode(n.sign(i), s)
|
|
10094
10094
|
}
|
|
10095
10095
|
];
|
|
10096
10096
|
return this.data.updateInput(t, { partialSig: o }), this;
|
|
@@ -10103,13 +10103,13 @@ class ma {
|
|
|
10103
10103
|
i,
|
|
10104
10104
|
s
|
|
10105
10105
|
), c = o.filter((u) => !u.leafHash).map(
|
|
10106
|
-
(u) =>
|
|
10106
|
+
(u) => kc(
|
|
10107
10107
|
r.signSchnorr(u.hash),
|
|
10108
10108
|
n.sighashType
|
|
10109
10109
|
)
|
|
10110
10110
|
)[0], a = o.filter((u) => !!u.leafHash).map((u) => ({
|
|
10111
|
-
pubkey:
|
|
10112
|
-
signature:
|
|
10111
|
+
pubkey: zc(r.publicKey),
|
|
10112
|
+
signature: kc(
|
|
10113
10113
|
r.signSchnorr(u.hash),
|
|
10114
10114
|
n.sighashType
|
|
10115
10115
|
),
|
|
@@ -10159,7 +10159,7 @@ class ma {
|
|
|
10159
10159
|
const c = [
|
|
10160
10160
|
{
|
|
10161
10161
|
pubkey: n.publicKey,
|
|
10162
|
-
signature:
|
|
10162
|
+
signature: _o.encode(o, s)
|
|
10163
10163
|
}
|
|
10164
10164
|
];
|
|
10165
10165
|
this.data.updateInput(t, { partialSig: c });
|
|
@@ -10176,7 +10176,7 @@ class ma {
|
|
|
10176
10176
|
if (a) {
|
|
10177
10177
|
const f = Promise.resolve(
|
|
10178
10178
|
r.signSchnorr(a.hash)
|
|
10179
|
-
).then((l) => ({ tapKeySig:
|
|
10179
|
+
).then((l) => ({ tapKeySig: kc(l, n.sighashType) }));
|
|
10180
10180
|
c.push(f);
|
|
10181
10181
|
}
|
|
10182
10182
|
const u = o.filter((f) => !!f.leafHash);
|
|
@@ -10184,8 +10184,8 @@ class ma {
|
|
|
10184
10184
|
const f = u.map((l) => Promise.resolve(r.signSchnorr(l.hash)).then(
|
|
10185
10185
|
(d) => ({ tapScriptSig: [
|
|
10186
10186
|
{
|
|
10187
|
-
pubkey:
|
|
10188
|
-
signature:
|
|
10187
|
+
pubkey: zc(r.publicKey),
|
|
10188
|
+
signature: kc(
|
|
10189
10189
|
d,
|
|
10190
10190
|
n.sighashType
|
|
10191
10191
|
),
|
|
@@ -10323,7 +10323,7 @@ function Vg(e) {
|
|
|
10323
10323
|
function Hd(e) {
|
|
10324
10324
|
return (t) => !(de(e.fingerprint, t.masterFingerprint) || de(e.derivePath(t.path).publicKey, t.pubkey));
|
|
10325
10325
|
}
|
|
10326
|
-
function
|
|
10326
|
+
function Pc(e) {
|
|
10327
10327
|
if (typeof e != "number" || e !== Math.floor(e) || e > 4294967295 || e < 0)
|
|
10328
10328
|
throw new Error("Invalid 32 bit integer");
|
|
10329
10329
|
}
|
|
@@ -10344,7 +10344,7 @@ function K_(e) {
|
|
|
10344
10344
|
if (!e.sighashType || !e.partialSig) return;
|
|
10345
10345
|
const { partialSig: t, sighashType: n } = e;
|
|
10346
10346
|
t.forEach((r) => {
|
|
10347
|
-
const { hashType: i } =
|
|
10347
|
+
const { hashType: i } = _o.decode(r.signature);
|
|
10348
10348
|
if (n !== i)
|
|
10349
10349
|
throw new Error("Signature sighash does not match input sighash type");
|
|
10350
10350
|
});
|
|
@@ -10382,8 +10382,8 @@ function Dg(e, t) {
|
|
|
10382
10382
|
);
|
|
10383
10383
|
};
|
|
10384
10384
|
}
|
|
10385
|
-
const Fd = Dg(
|
|
10386
|
-
|
|
10385
|
+
const Fd = Dg(cc, "Redeem script"), Md = Dg(
|
|
10386
|
+
uc,
|
|
10387
10387
|
"Witness script"
|
|
10388
10388
|
);
|
|
10389
10389
|
function qd(e, t, n, r) {
|
|
@@ -10410,7 +10410,7 @@ function X_(e, t, n, r, i, s) {
|
|
|
10410
10410
|
}
|
|
10411
10411
|
function z_(e, t, n, r, i, s) {
|
|
10412
10412
|
let o, c;
|
|
10413
|
-
const a = Z_(e, t, n), u = s ?
|
|
10413
|
+
const a = Z_(e, t, n), u = s ? uc({ redeem: a }) : null, f = i ? cc({ redeem: u || a }) : null;
|
|
10414
10414
|
return r ? (u ? c = ga(u.witness) : c = ga(a.witness), f && (o = f.input)) : f ? o = f.input : o = a.input, {
|
|
10415
10415
|
finalScriptSig: o,
|
|
10416
10416
|
finalScriptWitness: c
|
|
@@ -10464,7 +10464,7 @@ function jg(e, t, n, r, i) {
|
|
|
10464
10464
|
o
|
|
10465
10465
|
);
|
|
10466
10466
|
else if (Ya(u)) {
|
|
10467
|
-
const l =
|
|
10467
|
+
const l = oc({
|
|
10468
10468
|
hash: u.slice(2)
|
|
10469
10469
|
}).output;
|
|
10470
10470
|
c = s.hashForWitnessV0(
|
|
@@ -10524,7 +10524,7 @@ function Kf(e, t, n, r, i, s, o) {
|
|
|
10524
10524
|
), f = u.map((g) => g.script), l = u.map((g) => g.value), d = [];
|
|
10525
10525
|
if (t.tapInternalKey && !s) {
|
|
10526
10526
|
const g = Kg(e, t, i) || Uint8Array.from([]);
|
|
10527
|
-
if (de(
|
|
10527
|
+
if (de(zc(r), g) === 0) {
|
|
10528
10528
|
const m = c.hashForWitnessV1(
|
|
10529
10529
|
e,
|
|
10530
10530
|
f,
|
|
@@ -10583,7 +10583,7 @@ function Z_(e, t, n) {
|
|
|
10583
10583
|
});
|
|
10584
10584
|
break;
|
|
10585
10585
|
case "pubkeyhash":
|
|
10586
|
-
r =
|
|
10586
|
+
r = oc({
|
|
10587
10587
|
output: e,
|
|
10588
10588
|
pubkey: n[0].pubkey,
|
|
10589
10589
|
signature: n[0].signature
|
|
@@ -10811,7 +10811,7 @@ function Qs(e) {
|
|
|
10811
10811
|
return [...Array(e).keys()];
|
|
10812
10812
|
}
|
|
10813
10813
|
u2($1);
|
|
10814
|
-
const
|
|
10814
|
+
const Bo = {
|
|
10815
10815
|
Mainnet: "mainnet",
|
|
10816
10816
|
Testnet: "testnet"
|
|
10817
10817
|
}, ba = "abcdefghijklmnopqrstuvwxyz234567", Ns = /* @__PURE__ */ Object.create(null);
|
|
@@ -11108,7 +11108,7 @@ function fS(e) {
|
|
|
11108
11108
|
}
|
|
11109
11109
|
return (t ^ -1) >>> 0;
|
|
11110
11110
|
}
|
|
11111
|
-
const
|
|
11111
|
+
const Rc = "__principal__", lS = 2, Dd = 4, hS = "aaaaa-aa";
|
|
11112
11112
|
let Ke = class ds {
|
|
11113
11113
|
static anonymous() {
|
|
11114
11114
|
return new this(new Uint8Array([Dd]));
|
|
@@ -11134,13 +11134,13 @@ let Ke = class ds {
|
|
|
11134
11134
|
throw new Error(`Impossible to convert ${JSON.stringify(t)} to Principal.`);
|
|
11135
11135
|
}
|
|
11136
11136
|
static fromHex(t) {
|
|
11137
|
-
return new this(
|
|
11137
|
+
return new this(sc(t));
|
|
11138
11138
|
}
|
|
11139
11139
|
static fromText(t) {
|
|
11140
11140
|
let n = t;
|
|
11141
|
-
if (t.includes(
|
|
11141
|
+
if (t.includes(Rc)) {
|
|
11142
11142
|
const o = JSON.parse(t);
|
|
11143
|
-
|
|
11143
|
+
Rc in o && (n = o[Rc]);
|
|
11144
11144
|
}
|
|
11145
11145
|
const r = n.toLowerCase().replace(/-/g, "");
|
|
11146
11146
|
let i = aS(r);
|
|
@@ -11184,7 +11184,7 @@ let Ke = class ds {
|
|
|
11184
11184
|
* @returns {JsonnablePrincipal} a JSON object with a single key, {@link JSON_KEY_PRINCIPAL}, whose value is the principal as a string
|
|
11185
11185
|
*/
|
|
11186
11186
|
toJSON() {
|
|
11187
|
-
return { [
|
|
11187
|
+
return { [Rc]: this.toText() };
|
|
11188
11188
|
}
|
|
11189
11189
|
/**
|
|
11190
11190
|
* Utility method taking a Principal to compare against. Used for determining canister ranges in certificate verification
|
|
@@ -11452,8 +11452,8 @@ var Ve;
|
|
|
11452
11452
|
(function(e) {
|
|
11453
11453
|
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";
|
|
11454
11454
|
})(Ve || (Ve = {}));
|
|
11455
|
-
const
|
|
11456
|
-
function
|
|
11455
|
+
const Yc = "DIDL", jd = 400;
|
|
11456
|
+
function No(e, t, n) {
|
|
11457
11457
|
return e.map((r, i) => n(r, t[i]));
|
|
11458
11458
|
}
|
|
11459
11459
|
class wS {
|
|
@@ -11717,7 +11717,7 @@ class im extends Rn {
|
|
|
11717
11717
|
return "bool";
|
|
11718
11718
|
}
|
|
11719
11719
|
}
|
|
11720
|
-
class
|
|
11720
|
+
class ko extends Rn {
|
|
11721
11721
|
get typeName() {
|
|
11722
11722
|
return Be.NullClass;
|
|
11723
11723
|
}
|
|
@@ -12142,7 +12142,7 @@ class Or extends di {
|
|
|
12142
12142
|
t.add(this, Le(n, r));
|
|
12143
12143
|
}
|
|
12144
12144
|
decodeValue(t, n) {
|
|
12145
|
-
if (n instanceof
|
|
12145
|
+
if (n instanceof ko)
|
|
12146
12146
|
return [];
|
|
12147
12147
|
if (n instanceof li)
|
|
12148
12148
|
return [];
|
|
@@ -12171,7 +12171,7 @@ class Or extends di {
|
|
|
12171
12171
|
else {
|
|
12172
12172
|
if (
|
|
12173
12173
|
// this check corresponds to `not (null <: <t>)` in the spec
|
|
12174
|
-
this._type instanceof
|
|
12174
|
+
this._type instanceof ko || this._type instanceof Or || this._type instanceof li
|
|
12175
12175
|
)
|
|
12176
12176
|
return r.decodeValue(t, r), [];
|
|
12177
12177
|
{
|
|
@@ -12233,7 +12233,7 @@ field ${n} -> ${i.message}`);
|
|
|
12233
12233
|
throw new Error(`Invalid ${this.display()} argument: ${wt(t)}`);
|
|
12234
12234
|
}
|
|
12235
12235
|
encodeValue(t) {
|
|
12236
|
-
const n = this._fields.map(([i]) => t[i]), r =
|
|
12236
|
+
const n = this._fields.map(([i]) => t[i]), r = No(this._fields, n, ([, i], s) => i.encodeValue(s));
|
|
12237
12237
|
return Le(...r);
|
|
12238
12238
|
}
|
|
12239
12239
|
_buildTypeTableImpl(t) {
|
|
@@ -12285,7 +12285,7 @@ field ${n} -> ${i.message}`);
|
|
|
12285
12285
|
}
|
|
12286
12286
|
valueToString(t) {
|
|
12287
12287
|
const n = this._fields.map(([i]) => t[i]);
|
|
12288
|
-
return `record {${
|
|
12288
|
+
return `record {${No(this._fields, n, ([i, s], o) => i + "=" + s.valueToString(o)).join("; ")}}`;
|
|
12289
12289
|
}
|
|
12290
12290
|
}
|
|
12291
12291
|
class tu extends Ki {
|
|
@@ -12316,7 +12316,7 @@ index ${r} -> ${i.message}`);
|
|
|
12316
12316
|
throw new Error(`Invalid ${this.display()} argument: ${wt(t)}`);
|
|
12317
12317
|
}
|
|
12318
12318
|
encodeValue(t) {
|
|
12319
|
-
const n =
|
|
12319
|
+
const n = No(this._components, t, (r, i) => r.encodeValue(i));
|
|
12320
12320
|
return Le(...n);
|
|
12321
12321
|
}
|
|
12322
12322
|
decodeValue(t, n) {
|
|
@@ -12334,7 +12334,7 @@ index ${r} -> ${i.message}`);
|
|
|
12334
12334
|
return `record {${this._components.map((n) => n.display()).join("; ")}}`;
|
|
12335
12335
|
}
|
|
12336
12336
|
valueToString(t) {
|
|
12337
|
-
return `record {${
|
|
12337
|
+
return `record {${No(this._components, t, (r, i) => r.valueToString(i)).join("; ")}}`;
|
|
12338
12338
|
}
|
|
12339
12339
|
}
|
|
12340
12340
|
class Ps extends di {
|
|
@@ -12511,7 +12511,7 @@ class om extends Rn {
|
|
|
12511
12511
|
return `${this.name} "${t.toText()}"`;
|
|
12512
12512
|
}
|
|
12513
12513
|
}
|
|
12514
|
-
class
|
|
12514
|
+
class Po extends di {
|
|
12515
12515
|
get typeName() {
|
|
12516
12516
|
return Be.FuncClass;
|
|
12517
12517
|
}
|
|
@@ -12631,7 +12631,7 @@ function Xf(e, t) {
|
|
|
12631
12631
|
throw Error("Wrong number of message arguments");
|
|
12632
12632
|
const n = new wS();
|
|
12633
12633
|
e.forEach((a) => a.buildTypeTable(n));
|
|
12634
|
-
const r = new TextEncoder().encode(
|
|
12634
|
+
const r = new TextEncoder().encode(Yc), i = n.encode(), s = ft(t.length), o = Le(...e.map((a) => a.encodeType(n))), c = Le(...No(e, t, (a, u) => {
|
|
12635
12635
|
try {
|
|
12636
12636
|
a.covariant(u);
|
|
12637
12637
|
} catch (f) {
|
|
@@ -12645,10 +12645,10 @@ function Xf(e, t) {
|
|
|
12645
12645
|
}
|
|
12646
12646
|
function cm(e, t) {
|
|
12647
12647
|
const n = new Ls(t);
|
|
12648
|
-
if (t.byteLength <
|
|
12648
|
+
if (t.byteLength < Yc.length)
|
|
12649
12649
|
throw new Error("Message length smaller than magic number");
|
|
12650
|
-
const r = $i(n,
|
|
12651
|
-
if (i !==
|
|
12650
|
+
const r = $i(n, Yc.length), i = new TextDecoder().decode(r);
|
|
12651
|
+
if (i !== Yc)
|
|
12652
12652
|
throw new Error("Wrong magic number: " + JSON.stringify(i));
|
|
12653
12653
|
function s(d) {
|
|
12654
12654
|
const y = [], g = Number(Bt(d));
|
|
@@ -12815,7 +12815,7 @@ function cm(e, t) {
|
|
|
12815
12815
|
const y = {}, g = d[1];
|
|
12816
12816
|
for (const [m, E] of g) {
|
|
12817
12817
|
let _ = u(E);
|
|
12818
|
-
if (_ instanceof Nn && (_ = _.getType()), !(_ instanceof
|
|
12818
|
+
if (_ instanceof Nn && (_ = _.getType()), !(_ instanceof Po))
|
|
12819
12819
|
throw new Error("Illegal service definition: services can only contain functions");
|
|
12820
12820
|
y[m] = _;
|
|
12821
12821
|
}
|
|
@@ -12848,7 +12848,7 @@ function cm(e, t) {
|
|
|
12848
12848
|
zf();
|
|
12849
12849
|
}
|
|
12850
12850
|
}
|
|
12851
|
-
const am = new Fl(), um = new li(), ES = new rm(), fm = new im(), lm = new
|
|
12851
|
+
const am = new Fl(), um = new li(), ES = new rm(), fm = new im(), lm = new ko(), hm = new sm(), dm = new Ml(), pm = new ql(), ym = new Vl(32), gm = new Vl(64), mm = new ji(8), wm = new ji(16), bm = new ji(32), Em = new ji(64), _m = new ci(8), Sm = new ci(16), Tm = new ci(32), xm = new ci(64), Am = new om();
|
|
12852
12852
|
function vm(...e) {
|
|
12853
12853
|
return new tu(e);
|
|
12854
12854
|
}
|
|
@@ -12868,7 +12868,7 @@ function km() {
|
|
|
12868
12868
|
return new Nn();
|
|
12869
12869
|
}
|
|
12870
12870
|
function Pm(e, t, n = []) {
|
|
12871
|
-
return new
|
|
12871
|
+
return new Po(e, t, n);
|
|
12872
12872
|
}
|
|
12873
12873
|
function Rm(e) {
|
|
12874
12874
|
return new Ea(e);
|
|
@@ -12913,9 +12913,9 @@ class nu {
|
|
|
12913
12913
|
i.set(n, r);
|
|
12914
12914
|
}
|
|
12915
12915
|
}
|
|
12916
|
-
let
|
|
12916
|
+
let Zc = new nu();
|
|
12917
12917
|
function zf() {
|
|
12918
|
-
|
|
12918
|
+
Zc = new nu();
|
|
12919
12919
|
}
|
|
12920
12920
|
function _S(e, t) {
|
|
12921
12921
|
const n = new Set(e.annotations), r = new Set(t.annotations);
|
|
@@ -12927,11 +12927,11 @@ function _S(e, t) {
|
|
|
12927
12927
|
return !0;
|
|
12928
12928
|
}
|
|
12929
12929
|
function Wu(e) {
|
|
12930
|
-
return e instanceof Or || e instanceof
|
|
12930
|
+
return e instanceof Or || e instanceof ko || e instanceof li;
|
|
12931
12931
|
}
|
|
12932
12932
|
function $l(e, t) {
|
|
12933
|
-
const n =
|
|
12934
|
-
return r ?
|
|
12933
|
+
const n = Zc.copy(), r = dr(n, e, t);
|
|
12934
|
+
return r ? Zc.add(e, t) : Zc.addNegative(e, t), r;
|
|
12935
12935
|
}
|
|
12936
12936
|
function dr(e, t, n) {
|
|
12937
12937
|
if (t.name === n.name)
|
|
@@ -12957,7 +12957,7 @@ function dr(e, t, n) {
|
|
|
12957
12957
|
}
|
|
12958
12958
|
return !0;
|
|
12959
12959
|
}
|
|
12960
|
-
if (t instanceof
|
|
12960
|
+
if (t instanceof Po && n instanceof Po) {
|
|
12961
12961
|
if (!_S(t, n))
|
|
12962
12962
|
return !1;
|
|
12963
12963
|
for (let i = 0; i < t.argTypes.length; i++) {
|
|
@@ -13011,7 +13011,7 @@ const SS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13011
13011
|
Float64: gm,
|
|
13012
13012
|
FloatClass: Vl,
|
|
13013
13013
|
Func: Pm,
|
|
13014
|
-
FuncClass:
|
|
13014
|
+
FuncClass: Po,
|
|
13015
13015
|
Int: dm,
|
|
13016
13016
|
Int16: wm,
|
|
13017
13017
|
Int32: bm,
|
|
@@ -13025,7 +13025,7 @@ const SS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
13025
13025
|
Nat8: _m,
|
|
13026
13026
|
NatClass: ql,
|
|
13027
13027
|
Null: lm,
|
|
13028
|
-
NullClass:
|
|
13028
|
+
NullClass: ko,
|
|
13029
13029
|
Opt: Om,
|
|
13030
13030
|
OptClass: Or,
|
|
13031
13031
|
PrimitiveType: Rn,
|
|
@@ -13064,34 +13064,34 @@ function Um(e, t) {
|
|
|
13064
13064
|
const { toString: TS } = Object.prototype, { getPrototypeOf: Dl } = Object, { iterator: ru, toStringTag: Cm } = Symbol, iu = /* @__PURE__ */ ((e) => (t) => {
|
|
13065
13065
|
const n = TS.call(t);
|
|
13066
13066
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
13067
|
-
})(/* @__PURE__ */ Object.create(null)), Gn = (e) => (e = e.toLowerCase(), (t) => iu(t) === e), su = (e) => (t) => typeof t === e, { isArray: $s } = Array,
|
|
13068
|
-
function
|
|
13069
|
-
return e !== null && !
|
|
13067
|
+
})(/* @__PURE__ */ Object.create(null)), Gn = (e) => (e = e.toLowerCase(), (t) => iu(t) === e), su = (e) => (t) => typeof t === e, { isArray: $s } = Array, Ro = su("undefined");
|
|
13068
|
+
function lc(e) {
|
|
13069
|
+
return e !== null && !Ro(e) && e.constructor !== null && !Ro(e.constructor) && pn(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13070
13070
|
}
|
|
13071
13071
|
const Hm = Gn("ArrayBuffer");
|
|
13072
13072
|
function xS(e) {
|
|
13073
13073
|
let t;
|
|
13074
13074
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Hm(e.buffer), t;
|
|
13075
13075
|
}
|
|
13076
|
-
const AS = su("string"), pn = su("function"), Fm = su("number"),
|
|
13076
|
+
const AS = su("string"), pn = su("function"), Fm = su("number"), hc = (e) => e !== null && typeof e == "object", vS = (e) => e === !0 || e === !1, Jc = (e) => {
|
|
13077
13077
|
if (iu(e) !== "object")
|
|
13078
13078
|
return !1;
|
|
13079
13079
|
const t = Dl(e);
|
|
13080
13080
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Cm in e) && !(ru in e);
|
|
13081
13081
|
}, IS = (e) => {
|
|
13082
|
-
if (!
|
|
13082
|
+
if (!hc(e) || lc(e))
|
|
13083
13083
|
return !1;
|
|
13084
13084
|
try {
|
|
13085
13085
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
13086
13086
|
} catch {
|
|
13087
13087
|
return !1;
|
|
13088
13088
|
}
|
|
13089
|
-
}, OS = Gn("Date"), BS = Gn("File"), NS = Gn("Blob"), kS = Gn("FileList"), PS = (e) =>
|
|
13089
|
+
}, OS = Gn("Date"), BS = Gn("File"), NS = Gn("Blob"), kS = Gn("FileList"), PS = (e) => hc(e) && pn(e.pipe), RS = (e) => {
|
|
13090
13090
|
let t;
|
|
13091
13091
|
return e && (typeof FormData == "function" && e instanceof FormData || pn(e.append) && ((t = iu(e)) === "formdata" || // detect form-data instance
|
|
13092
13092
|
t === "object" && pn(e.toString) && e.toString() === "[object FormData]"));
|
|
13093
13093
|
}, US = Gn("URLSearchParams"), [CS, HS, FS, MS] = ["ReadableStream", "Request", "Response", "Headers"].map(Gn), qS = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
13094
|
-
function
|
|
13094
|
+
function dc(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
13095
13095
|
if (e === null || typeof e > "u")
|
|
13096
13096
|
return;
|
|
13097
13097
|
let r, i;
|
|
@@ -13099,7 +13099,7 @@ function hc(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
13099
13099
|
for (r = 0, i = e.length; r < i; r++)
|
|
13100
13100
|
t.call(null, e[r], r, e);
|
|
13101
13101
|
else {
|
|
13102
|
-
if (
|
|
13102
|
+
if (lc(e))
|
|
13103
13103
|
return;
|
|
13104
13104
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = s.length;
|
|
13105
13105
|
let c;
|
|
@@ -13108,7 +13108,7 @@ function hc(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
13108
13108
|
}
|
|
13109
13109
|
}
|
|
13110
13110
|
function Mm(e, t) {
|
|
13111
|
-
if (
|
|
13111
|
+
if (lc(e))
|
|
13112
13112
|
return null;
|
|
13113
13113
|
t = t.toLowerCase();
|
|
13114
13114
|
const n = Object.keys(e);
|
|
@@ -13118,17 +13118,17 @@ function Mm(e, t) {
|
|
|
13118
13118
|
return i;
|
|
13119
13119
|
return null;
|
|
13120
13120
|
}
|
|
13121
|
-
const Ri = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : globalThis, qm = (e) => !
|
|
13121
|
+
const Ri = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : globalThis, qm = (e) => !Ro(e) && e !== Ri;
|
|
13122
13122
|
function Yf() {
|
|
13123
13123
|
const { caseless: e } = qm(this) && this || {}, t = {}, n = (r, i) => {
|
|
13124
13124
|
const s = e && Mm(t, i) || i;
|
|
13125
|
-
|
|
13125
|
+
Jc(t[s]) && Jc(r) ? t[s] = Yf(t[s], r) : Jc(r) ? t[s] = Yf({}, r) : $s(r) ? t[s] = r.slice() : t[s] = r;
|
|
13126
13126
|
};
|
|
13127
13127
|
for (let r = 0, i = arguments.length; r < i; r++)
|
|
13128
|
-
arguments[r] &&
|
|
13128
|
+
arguments[r] && dc(arguments[r], n);
|
|
13129
13129
|
return t;
|
|
13130
13130
|
}
|
|
13131
|
-
const VS = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
13131
|
+
const VS = (e, t, n, { allOwnKeys: r } = {}) => (dc(t, (i, s) => {
|
|
13132
13132
|
n && pn(i) ? e[s] = Um(i, n) : e[s] = i;
|
|
13133
13133
|
}, { allOwnKeys: r }), e), LS = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), $S = (e, t, n, r) => {
|
|
13134
13134
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -13177,7 +13177,7 @@ const VS = (e, t, n, { allOwnKeys: r } = {}) => (hc(t, (i, s) => {
|
|
|
13177
13177
|
}
|
|
13178
13178
|
), Kd = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ZS = Gn("RegExp"), Vm = (e, t) => {
|
|
13179
13179
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
13180
|
-
|
|
13180
|
+
dc(n, (i, s) => {
|
|
13181
13181
|
let o;
|
|
13182
13182
|
(o = t(i, s, e)) !== !1 && (r[s] = o || i);
|
|
13183
13183
|
}), Object.defineProperties(e, r);
|
|
@@ -13210,24 +13210,24 @@ function nT(e) {
|
|
|
13210
13210
|
}
|
|
13211
13211
|
const rT = (e) => {
|
|
13212
13212
|
const t = new Array(10), n = (r, i) => {
|
|
13213
|
-
if (
|
|
13213
|
+
if (hc(r)) {
|
|
13214
13214
|
if (t.indexOf(r) >= 0)
|
|
13215
13215
|
return;
|
|
13216
|
-
if (
|
|
13216
|
+
if (lc(r))
|
|
13217
13217
|
return r;
|
|
13218
13218
|
if (!("toJSON" in r)) {
|
|
13219
13219
|
t[i] = r;
|
|
13220
13220
|
const s = $s(r) ? [] : {};
|
|
13221
|
-
return
|
|
13221
|
+
return dc(r, (o, c) => {
|
|
13222
13222
|
const a = n(o, i + 1);
|
|
13223
|
-
!
|
|
13223
|
+
!Ro(a) && (s[c] = a);
|
|
13224
13224
|
}), t[i] = void 0, s;
|
|
13225
13225
|
}
|
|
13226
13226
|
}
|
|
13227
13227
|
return r;
|
|
13228
13228
|
};
|
|
13229
13229
|
return n(e, 0);
|
|
13230
|
-
}, iT = Gn("AsyncFunction"), sT = (e) => e && (
|
|
13230
|
+
}, iT = Gn("AsyncFunction"), sT = (e) => e && (hc(e) || pn(e)) && pn(e.then) && pn(e.catch), Lm = ((e, t) => e ? setImmediate : t ? ((n, r) => (Ri.addEventListener("message", ({ source: i, data: s }) => {
|
|
13231
13231
|
i === Ri && s === n && r.length && r.shift()();
|
|
13232
13232
|
}, !1), (i) => {
|
|
13233
13233
|
r.push(i), Ri.postMessage(n, "*");
|
|
@@ -13237,20 +13237,20 @@ const rT = (e) => {
|
|
|
13237
13237
|
), oT = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ri) : typeof process < "u" && process.nextTick || Lm, cT = (e) => e != null && pn(e[ru]), z = {
|
|
13238
13238
|
isArray: $s,
|
|
13239
13239
|
isArrayBuffer: Hm,
|
|
13240
|
-
isBuffer:
|
|
13240
|
+
isBuffer: lc,
|
|
13241
13241
|
isFormData: RS,
|
|
13242
13242
|
isArrayBufferView: xS,
|
|
13243
13243
|
isString: AS,
|
|
13244
13244
|
isNumber: Fm,
|
|
13245
13245
|
isBoolean: vS,
|
|
13246
|
-
isObject:
|
|
13247
|
-
isPlainObject:
|
|
13246
|
+
isObject: hc,
|
|
13247
|
+
isPlainObject: Jc,
|
|
13248
13248
|
isEmptyObject: IS,
|
|
13249
13249
|
isReadableStream: CS,
|
|
13250
13250
|
isRequest: HS,
|
|
13251
13251
|
isResponse: FS,
|
|
13252
13252
|
isHeaders: MS,
|
|
13253
|
-
isUndefined:
|
|
13253
|
+
isUndefined: Ro,
|
|
13254
13254
|
isDate: OS,
|
|
13255
13255
|
isFile: BS,
|
|
13256
13256
|
isBlob: NS,
|
|
@@ -13260,7 +13260,7 @@ const rT = (e) => {
|
|
|
13260
13260
|
isURLSearchParams: US,
|
|
13261
13261
|
isTypedArray: GS,
|
|
13262
13262
|
isFileList: kS,
|
|
13263
|
-
forEach:
|
|
13263
|
+
forEach: dc,
|
|
13264
13264
|
merge: Yf,
|
|
13265
13265
|
extend: VS,
|
|
13266
13266
|
trim: qS,
|
|
@@ -13595,7 +13595,7 @@ function TT(e, t, n) {
|
|
|
13595
13595
|
}
|
|
13596
13596
|
return (n || JSON.stringify)(e);
|
|
13597
13597
|
}
|
|
13598
|
-
const
|
|
13598
|
+
const pc = {
|
|
13599
13599
|
transitional: Wm,
|
|
13600
13600
|
adapter: ["xhr", "http", "fetch"],
|
|
13601
13601
|
transformRequest: [function(t, n) {
|
|
@@ -13624,7 +13624,7 @@ const dc = {
|
|
|
13624
13624
|
return s || i ? (n.setContentType("application/json", !1), TT(t)) : t;
|
|
13625
13625
|
}],
|
|
13626
13626
|
transformResponse: [function(t) {
|
|
13627
|
-
const n = this.transitional ||
|
|
13627
|
+
const n = this.transitional || pc.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json";
|
|
13628
13628
|
if (z.isResponse(t) || z.isReadableStream(t))
|
|
13629
13629
|
return t;
|
|
13630
13630
|
if (t && z.isString(t) && (r && !this.responseType || i)) {
|
|
@@ -13662,7 +13662,7 @@ const dc = {
|
|
|
13662
13662
|
}
|
|
13663
13663
|
};
|
|
13664
13664
|
z.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
13665
|
-
|
|
13665
|
+
pc.headers[e] = {};
|
|
13666
13666
|
});
|
|
13667
13667
|
const xT = z.toObjectSet([
|
|
13668
13668
|
"age",
|
|
@@ -13693,8 +13693,8 @@ const xT = z.toObjectSet([
|
|
|
13693
13693
|
function eo(e) {
|
|
13694
13694
|
return e && String(e).trim().toLowerCase();
|
|
13695
13695
|
}
|
|
13696
|
-
function
|
|
13697
|
-
return e === !1 || e == null ? e : z.isArray(e) ? e.map(
|
|
13696
|
+
function Qc(e) {
|
|
13697
|
+
return e === !1 || e == null ? e : z.isArray(e) ? e.map(Qc) : String(e);
|
|
13698
13698
|
}
|
|
13699
13699
|
function vT(e) {
|
|
13700
13700
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -13739,7 +13739,7 @@ let yn = class {
|
|
|
13739
13739
|
if (!f)
|
|
13740
13740
|
throw new Error("header name must be a non-empty string");
|
|
13741
13741
|
const l = z.findKey(i, f);
|
|
13742
|
-
(!l || i[l] === void 0 || u === !0 || u === void 0 && i[l] !== !1) && (i[l || a] =
|
|
13742
|
+
(!l || i[l] === void 0 || u === !0 || u === void 0 && i[l] !== !1) && (i[l || a] = Qc(c));
|
|
13743
13743
|
}
|
|
13744
13744
|
const o = (c, a) => z.forEach(c, (u, f) => s(u, f, a));
|
|
13745
13745
|
if (z.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -13807,11 +13807,11 @@ let yn = class {
|
|
|
13807
13807
|
return z.forEach(this, (i, s) => {
|
|
13808
13808
|
const o = z.findKey(r, s);
|
|
13809
13809
|
if (o) {
|
|
13810
|
-
n[o] =
|
|
13810
|
+
n[o] = Qc(i), delete n[s];
|
|
13811
13811
|
return;
|
|
13812
13812
|
}
|
|
13813
13813
|
const c = t ? OT(s) : String(s).trim();
|
|
13814
|
-
c !== s && delete n[s], n[c] =
|
|
13814
|
+
c !== s && delete n[s], n[c] = Qc(i), r[c] = !0;
|
|
13815
13815
|
}), this;
|
|
13816
13816
|
}
|
|
13817
13817
|
concat(...t) {
|
|
@@ -13866,7 +13866,7 @@ z.reduceDescriptors(yn.prototype, ({ value: e }, t) => {
|
|
|
13866
13866
|
});
|
|
13867
13867
|
z.freezeMethods(yn);
|
|
13868
13868
|
function zu(e, t) {
|
|
13869
|
-
const n = this ||
|
|
13869
|
+
const n = this || pc, r = t || n, i = yn.from(r.headers);
|
|
13870
13870
|
let s = r.data;
|
|
13871
13871
|
return z.forEach(e, function(c) {
|
|
13872
13872
|
s = c.call(n, s, i.normalize(), t ? t.status : void 0);
|
|
@@ -14393,7 +14393,7 @@ function n0(e) {
|
|
|
14393
14393
|
return Yu(e), e.headers = yn.from(e.headers), e.data = zu.call(
|
|
14394
14394
|
e,
|
|
14395
14395
|
e.transformRequest
|
|
14396
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), tw.getAdapter(e.adapter ||
|
|
14396
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), tw.getAdapter(e.adapter || pc.adapter)(e).then(function(r) {
|
|
14397
14397
|
return Yu(e), r.data = zu.call(
|
|
14398
14398
|
e,
|
|
14399
14399
|
e.transformResponse,
|
|
@@ -14452,10 +14452,10 @@ function zT(e, t, n) {
|
|
|
14452
14452
|
throw new ke("Unknown option " + s, ke.ERR_BAD_OPTION);
|
|
14453
14453
|
}
|
|
14454
14454
|
}
|
|
14455
|
-
const
|
|
14455
|
+
const ea = {
|
|
14456
14456
|
assertOptions: zT,
|
|
14457
14457
|
validators: au
|
|
14458
|
-
}, Yn =
|
|
14458
|
+
}, Yn = ea.validators;
|
|
14459
14459
|
let Mi = class {
|
|
14460
14460
|
constructor(t) {
|
|
14461
14461
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -14491,16 +14491,16 @@ let Mi = class {
|
|
|
14491
14491
|
_request(t, n) {
|
|
14492
14492
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Gi(this.defaults, n);
|
|
14493
14493
|
const { transitional: r, paramsSerializer: i, headers: s } = n;
|
|
14494
|
-
r !== void 0 &&
|
|
14494
|
+
r !== void 0 && ea.assertOptions(r, {
|
|
14495
14495
|
silentJSONParsing: Yn.transitional(Yn.boolean),
|
|
14496
14496
|
forcedJSONParsing: Yn.transitional(Yn.boolean),
|
|
14497
14497
|
clarifyTimeoutError: Yn.transitional(Yn.boolean)
|
|
14498
14498
|
}, !1), i != null && (z.isFunction(i) ? n.paramsSerializer = {
|
|
14499
14499
|
serialize: i
|
|
14500
|
-
} :
|
|
14500
|
+
} : ea.assertOptions(i, {
|
|
14501
14501
|
encode: Yn.function,
|
|
14502
14502
|
serialize: Yn.function
|
|
14503
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
14503
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ea.assertOptions(n, {
|
|
14504
14504
|
baseUrl: Yn.spelling("baseURL"),
|
|
14505
14505
|
withXsrfToken: Yn.spelling("withXSRFToken")
|
|
14506
14506
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -14735,7 +14735,7 @@ function iw(e) {
|
|
|
14735
14735
|
return iw(Gi(e, i));
|
|
14736
14736
|
}, n;
|
|
14737
14737
|
}
|
|
14738
|
-
const ht = iw(
|
|
14738
|
+
const ht = iw(pc);
|
|
14739
14739
|
ht.Axios = Mi;
|
|
14740
14740
|
ht.CanceledError = Ds;
|
|
14741
14741
|
ht.CancelToken = YT;
|
|
@@ -14764,14 +14764,14 @@ const {
|
|
|
14764
14764
|
VERSION: Z6,
|
|
14765
14765
|
all: J6,
|
|
14766
14766
|
Cancel: Q6,
|
|
14767
|
-
isAxiosError:
|
|
14768
|
-
spread:
|
|
14769
|
-
toFormData:
|
|
14770
|
-
AxiosHeaders:
|
|
14771
|
-
HttpStatusCode:
|
|
14772
|
-
formToJSON:
|
|
14773
|
-
getAdapter:
|
|
14774
|
-
mergeConfig:
|
|
14767
|
+
isAxiosError: eI,
|
|
14768
|
+
spread: tI,
|
|
14769
|
+
toFormData: nI,
|
|
14770
|
+
AxiosHeaders: rI,
|
|
14771
|
+
HttpStatusCode: iI,
|
|
14772
|
+
formToJSON: sI,
|
|
14773
|
+
getAdapter: oI,
|
|
14774
|
+
mergeConfig: cI
|
|
14775
14775
|
} = ht;
|
|
14776
14776
|
class QT {
|
|
14777
14777
|
axios;
|
|
@@ -14921,12 +14921,12 @@ class _s extends Ue {
|
|
|
14921
14921
|
}
|
|
14922
14922
|
toErrorMessage() {
|
|
14923
14923
|
let t = this.reason;
|
|
14924
|
-
return this.error && (t += `: ${
|
|
14924
|
+
return this.error && (t += `: ${gc(this.error)}`), `Certificate verification error: "${t}"`;
|
|
14925
14925
|
}
|
|
14926
14926
|
}
|
|
14927
|
-
class
|
|
14927
|
+
class Uo extends Ue {
|
|
14928
14928
|
constructor(t, n, r, i, s) {
|
|
14929
|
-
super(), this.maxAgeInMinutes = t, this.certificateTime = n, this.currentTime = r, this.timeDiffMsecs = i, this.ageType = s, this.name = "CertificateTimeErrorCode", Object.setPrototypeOf(this,
|
|
14929
|
+
super(), this.maxAgeInMinutes = t, this.certificateTime = n, this.currentTime = r, this.timeDiffMsecs = i, this.ageType = s, this.name = "CertificateTimeErrorCode", Object.setPrototypeOf(this, Uo.prototype);
|
|
14930
14930
|
}
|
|
14931
14931
|
toErrorMessage() {
|
|
14932
14932
|
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`;
|
|
@@ -15017,7 +15017,7 @@ class Yl extends Ue {
|
|
|
15017
15017
|
super(), this.error = t, this.input = n, this.name = "CborDecodeErrorCode", Object.setPrototypeOf(this, Yl.prototype);
|
|
15018
15018
|
}
|
|
15019
15019
|
toErrorMessage() {
|
|
15020
|
-
return `Failed to decode CBOR: ${
|
|
15020
|
+
return `Failed to decode CBOR: ${gc(this.error)}, input: ${rt(this.input)}`;
|
|
15021
15021
|
}
|
|
15022
15022
|
}
|
|
15023
15023
|
class Zl extends Ue {
|
|
@@ -15025,12 +15025,12 @@ class Zl extends Ue {
|
|
|
15025
15025
|
super(), this.error = t, this.value = n, this.name = "CborEncodeErrorCode", Object.setPrototypeOf(this, Zl.prototype);
|
|
15026
15026
|
}
|
|
15027
15027
|
toErrorMessage() {
|
|
15028
|
-
return `Failed to encode CBOR: ${
|
|
15028
|
+
return `Failed to encode CBOR: ${gc(this.error)}, input: ${this.value}`;
|
|
15029
15029
|
}
|
|
15030
15030
|
}
|
|
15031
|
-
class
|
|
15031
|
+
class Co extends Ue {
|
|
15032
15032
|
constructor(t, n, r) {
|
|
15033
|
-
super(), this.message = t, this.requestId = n, this.status = r, this.name = "TimeoutWaitingForResponseErrorCode", Object.setPrototypeOf(this,
|
|
15033
|
+
super(), this.message = t, this.requestId = n, this.status = r, this.name = "TimeoutWaitingForResponseErrorCode", Object.setPrototypeOf(this, Co.prototype);
|
|
15034
15034
|
}
|
|
15035
15035
|
toErrorMessage() {
|
|
15036
15036
|
let t = `${this.message}
|
|
@@ -15116,9 +15116,9 @@ class nh extends Ue {
|
|
|
15116
15116
|
return `Attempt to hash a value of unsupported type: ${this.value}`;
|
|
15117
15117
|
}
|
|
15118
15118
|
}
|
|
15119
|
-
class
|
|
15119
|
+
class To extends Ue {
|
|
15120
15120
|
constructor(t) {
|
|
15121
|
-
super(), this.error = t, this.name = "HttpDefaultFetchErrorCode", Object.setPrototypeOf(this,
|
|
15121
|
+
super(), this.error = t, this.name = "HttpDefaultFetchErrorCode", Object.setPrototypeOf(this, To.prototype);
|
|
15122
15122
|
}
|
|
15123
15123
|
toErrorMessage() {
|
|
15124
15124
|
return this.error;
|
|
@@ -15185,12 +15185,12 @@ class Vn extends Ue {
|
|
|
15185
15185
|
super(), this.error = t, this.name = "UnexpectedErrorCode", Object.setPrototypeOf(this, Vn.prototype);
|
|
15186
15186
|
}
|
|
15187
15187
|
toErrorMessage() {
|
|
15188
|
-
return `Unexpected error: ${
|
|
15188
|
+
return `Unexpected error: ${gc(this.error)}`;
|
|
15189
15189
|
}
|
|
15190
15190
|
}
|
|
15191
|
-
class
|
|
15191
|
+
class yc extends Ue {
|
|
15192
15192
|
constructor(t) {
|
|
15193
|
-
super(), this.error = t, this.name = "HashTreeDecodeErrorCode", Object.setPrototypeOf(this,
|
|
15193
|
+
super(), this.error = t, this.name = "HashTreeDecodeErrorCode", Object.setPrototypeOf(this, yc.prototype);
|
|
15194
15194
|
}
|
|
15195
15195
|
toErrorMessage() {
|
|
15196
15196
|
return `Failed to decode certificate: ${this.error}`;
|
|
@@ -15222,7 +15222,7 @@ class va extends Ue {
|
|
|
15222
15222
|
super(), this.error = t, this.name = "HttpFetchErrorCode", Object.setPrototypeOf(this, va.prototype);
|
|
15223
15223
|
}
|
|
15224
15224
|
toErrorMessage() {
|
|
15225
|
-
return `Failed to fetch HTTP request: ${
|
|
15225
|
+
return `Failed to fetch HTTP request: ${gc(this.error)}`;
|
|
15226
15226
|
}
|
|
15227
15227
|
}
|
|
15228
15228
|
class Ia extends Ue {
|
|
@@ -15249,7 +15249,7 @@ class Oa extends Ue {
|
|
|
15249
15249
|
return `Failed to deserialize expiry: ${this.error}`;
|
|
15250
15250
|
}
|
|
15251
15251
|
}
|
|
15252
|
-
function
|
|
15252
|
+
function gc(e) {
|
|
15253
15253
|
if (e instanceof Error)
|
|
15254
15254
|
return e.stack ?? e.message;
|
|
15255
15255
|
try {
|
|
@@ -15347,14 +15347,14 @@ function fx(e) {
|
|
|
15347
15347
|
function lx(e) {
|
|
15348
15348
|
return e & 31;
|
|
15349
15349
|
}
|
|
15350
|
-
let
|
|
15350
|
+
let Ho = new Uint8Array(), to, $n = 0;
|
|
15351
15351
|
function hx(e, t) {
|
|
15352
|
-
|
|
15352
|
+
Ho = e, $n = 0;
|
|
15353
15353
|
const n = qi();
|
|
15354
15354
|
return t?.(n) ?? n;
|
|
15355
15355
|
}
|
|
15356
15356
|
function qi(e) {
|
|
15357
|
-
const [t, n] =
|
|
15357
|
+
const [t, n] = ta();
|
|
15358
15358
|
switch (t) {
|
|
15359
15359
|
case Tt.UnsignedInteger:
|
|
15360
15360
|
return Ks(n);
|
|
@@ -15375,8 +15375,8 @@ function qi(e) {
|
|
|
15375
15375
|
}
|
|
15376
15376
|
throw new Ji(`Unsupported major type: ${t}`);
|
|
15377
15377
|
}
|
|
15378
|
-
function
|
|
15379
|
-
const e =
|
|
15378
|
+
function ta() {
|
|
15379
|
+
const e = Ho.at($n);
|
|
15380
15380
|
if (ax(e))
|
|
15381
15381
|
throw new Ji("Provided CBOR data is empty");
|
|
15382
15382
|
const t = fx(e), n = lx(e);
|
|
@@ -15416,15 +15416,15 @@ function px(e) {
|
|
|
15416
15416
|
function yx(e, t) {
|
|
15417
15417
|
const n = Ks(e), r = {};
|
|
15418
15418
|
if (n === 1 / 0) {
|
|
15419
|
-
let [i, s] =
|
|
15419
|
+
let [i, s] = ta();
|
|
15420
15420
|
for (; i !== Tt.Simple && s !== Ln.Break; ) {
|
|
15421
15421
|
const o = rl(s), c = qi();
|
|
15422
|
-
r[o] = c, [i, s] =
|
|
15422
|
+
r[o] = c, [i, s] = ta();
|
|
15423
15423
|
}
|
|
15424
15424
|
return r;
|
|
15425
15425
|
}
|
|
15426
15426
|
for (let i = 0; i < n; i++) {
|
|
15427
|
-
const [s, o] =
|
|
15427
|
+
const [s, o] = ta();
|
|
15428
15428
|
if (s !== Tt.TextString)
|
|
15429
15429
|
throw new Ji("Map keys must be text strings");
|
|
15430
15430
|
const c = rl(o), a = qi();
|
|
@@ -15435,7 +15435,7 @@ function yx(e, t) {
|
|
|
15435
15435
|
function Ks(e) {
|
|
15436
15436
|
if (e <= qn.Value)
|
|
15437
15437
|
return e;
|
|
15438
|
-
switch (to = new DataView(
|
|
15438
|
+
switch (to = new DataView(Ho.buffer, Ho.byteOffset + $n), e) {
|
|
15439
15439
|
case qn.OneByte:
|
|
15440
15440
|
return $n++, to.getUint8(0);
|
|
15441
15441
|
case qn.TwoBytes:
|
|
@@ -15459,7 +15459,7 @@ function uw(e) {
|
|
|
15459
15459
|
if (t > Number.MAX_SAFE_INTEGER)
|
|
15460
15460
|
throw new Ji("Byte length is too large");
|
|
15461
15461
|
const n = Number(t);
|
|
15462
|
-
return $n += n,
|
|
15462
|
+
return $n += n, Ho.slice($n - n, $n);
|
|
15463
15463
|
}
|
|
15464
15464
|
function rl(e) {
|
|
15465
15465
|
const t = uw(e);
|
|
@@ -15623,7 +15623,7 @@ function er(e) {
|
|
|
15623
15623
|
throw et.fromCode(new Yl(t, e));
|
|
15624
15624
|
}
|
|
15625
15625
|
}
|
|
15626
|
-
const
|
|
15626
|
+
const Uc = () => {
|
|
15627
15627
|
if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
|
|
15628
15628
|
const e = new Uint32Array(1);
|
|
15629
15629
|
return window.crypto.getRandomValues(e), e[0];
|
|
@@ -15642,15 +15642,15 @@ var il;
|
|
|
15642
15642
|
(function(e) {
|
|
15643
15643
|
e.Call = "call";
|
|
15644
15644
|
})(il || (il = {}));
|
|
15645
|
-
var
|
|
15645
|
+
var Fo;
|
|
15646
15646
|
(function(e) {
|
|
15647
15647
|
e.Query = "query", e.ReadState = "read_state";
|
|
15648
|
-
})(
|
|
15648
|
+
})(Fo || (Fo = {}));
|
|
15649
15649
|
function sl() {
|
|
15650
|
-
const e = new ArrayBuffer(16), t = new DataView(e), n =
|
|
15650
|
+
const e = new ArrayBuffer(16), t = new DataView(e), n = Uc(), r = Uc(), i = Uc(), s = Uc();
|
|
15651
15651
|
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 });
|
|
15652
15652
|
}
|
|
15653
|
-
const
|
|
15653
|
+
const Cc = "__expiry__", lh = BigInt(1e3), kx = BigInt(1e6), dw = BigInt(60), Px = BigInt(90) * lh;
|
|
15654
15654
|
function pw(e) {
|
|
15655
15655
|
return e / lh;
|
|
15656
15656
|
}
|
|
@@ -15688,7 +15688,7 @@ class xs {
|
|
|
15688
15688
|
* @returns {JsonnableExpiry} a JSON object with a single key, {@link JSON_KEY_EXPIRY}, whose value is the expiry as a string
|
|
15689
15689
|
*/
|
|
15690
15690
|
toJSON() {
|
|
15691
|
-
return { [
|
|
15691
|
+
return { [Cc]: this.toString() };
|
|
15692
15692
|
}
|
|
15693
15693
|
/**
|
|
15694
15694
|
* Deserializes a {@link JsonnableExpiry} object from a JSON string.
|
|
@@ -15697,14 +15697,14 @@ class xs {
|
|
|
15697
15697
|
*/
|
|
15698
15698
|
static fromJSON(t) {
|
|
15699
15699
|
const n = JSON.parse(t);
|
|
15700
|
-
if (n[
|
|
15700
|
+
if (n[Cc])
|
|
15701
15701
|
try {
|
|
15702
|
-
const r = BigInt(n[
|
|
15702
|
+
const r = BigInt(n[Cc]);
|
|
15703
15703
|
return new xs(r);
|
|
15704
15704
|
} catch (r) {
|
|
15705
15705
|
throw new et(new Oa(`Not a valid BigInt: ${r}`));
|
|
15706
15706
|
}
|
|
15707
|
-
throw new et(new Oa(`The input does not contain the key ${
|
|
15707
|
+
throw new et(new Oa(`The input does not contain the key ${Cc}`));
|
|
15708
15708
|
}
|
|
15709
15709
|
static isExpiry(t) {
|
|
15710
15710
|
return t instanceof xs || typeof t == "object" && t !== null && "_isExpiry" in t && t._isExpiry === !0 && "__expiry__" in t && typeof t.__expiry__ == "bigint";
|
|
@@ -15724,7 +15724,7 @@ function ef(e) {
|
|
|
15724
15724
|
}
|
|
15725
15725
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
15726
15726
|
const hh = /* @__PURE__ */ BigInt(0), ka = /* @__PURE__ */ BigInt(1);
|
|
15727
|
-
function
|
|
15727
|
+
function Mo(e, t = "") {
|
|
15728
15728
|
if (typeof e != "boolean") {
|
|
15729
15729
|
const n = t && `"${t}"`;
|
|
15730
15730
|
throw new Error(n + "expected boolean, got type=" + typeof e);
|
|
@@ -15732,7 +15732,7 @@ function Fo(e, t = "") {
|
|
|
15732
15732
|
return e;
|
|
15733
15733
|
}
|
|
15734
15734
|
function As(e, t, n = "") {
|
|
15735
|
-
const r =
|
|
15735
|
+
const r = ic(e), i = e?.length, s = t !== void 0;
|
|
15736
15736
|
if (!r || s && i !== t) {
|
|
15737
15737
|
const o = n && `"${n}" `, c = s ? ` of length ${t}` : "", a = r ? `length=${i}` : `type=${typeof e}`;
|
|
15738
15738
|
throw new Error(o + "expected Uint8Array" + c + ", got " + a);
|
|
@@ -15747,11 +15747,11 @@ function yw(e) {
|
|
|
15747
15747
|
function rr(e) {
|
|
15748
15748
|
return yw(rt(e));
|
|
15749
15749
|
}
|
|
15750
|
-
function
|
|
15750
|
+
function qo(e) {
|
|
15751
15751
|
return On(e), yw(rt(Uint8Array.from(e).reverse()));
|
|
15752
15752
|
}
|
|
15753
15753
|
function Ut(e, t) {
|
|
15754
|
-
return
|
|
15754
|
+
return sc(e.toString(16).padStart(t * 2, "0"));
|
|
15755
15755
|
}
|
|
15756
15756
|
function gw(e, t) {
|
|
15757
15757
|
return Ut(e, t).reverse();
|
|
@@ -15760,11 +15760,11 @@ function cn(e, t, n) {
|
|
|
15760
15760
|
let r;
|
|
15761
15761
|
if (typeof t == "string")
|
|
15762
15762
|
try {
|
|
15763
|
-
r =
|
|
15763
|
+
r = sc(t);
|
|
15764
15764
|
} catch (s) {
|
|
15765
15765
|
throw new Error(e + " must be hex string or Uint8Array, cause: " + s);
|
|
15766
15766
|
}
|
|
15767
|
-
else if (
|
|
15767
|
+
else if (ic(t))
|
|
15768
15768
|
r = Uint8Array.from(t);
|
|
15769
15769
|
else
|
|
15770
15770
|
throw new Error(e + " must be hex string or Uint8Array");
|
|
@@ -15784,7 +15784,7 @@ function u0(e, t, n, r) {
|
|
|
15784
15784
|
if (!mw(t, n, r))
|
|
15785
15785
|
throw new Error("expected valid " + e + ": " + n + " <= n < " + r + ", got " + t);
|
|
15786
15786
|
}
|
|
15787
|
-
function
|
|
15787
|
+
function Vo(e) {
|
|
15788
15788
|
let t;
|
|
15789
15789
|
for (t = 0; e > hh; e >>= ka, t += 1)
|
|
15790
15790
|
;
|
|
@@ -15797,7 +15797,7 @@ const Qi = (e) => (ka << BigInt(e)) - ka;
|
|
|
15797
15797
|
function Cx(e) {
|
|
15798
15798
|
return typeof e == "function" && Number.isSafeInteger(e.outputLen);
|
|
15799
15799
|
}
|
|
15800
|
-
function
|
|
15800
|
+
function mc(e, t, n = {}) {
|
|
15801
15801
|
if (!e || typeof e != "object")
|
|
15802
15802
|
throw new Error("expected valid options object");
|
|
15803
15803
|
function r(i, s, o) {
|
|
@@ -15813,7 +15813,7 @@ function gc(e, t, n = {}) {
|
|
|
15813
15813
|
const ww = () => {
|
|
15814
15814
|
throw new Error("not implemented");
|
|
15815
15815
|
};
|
|
15816
|
-
function
|
|
15816
|
+
function Lo(e) {
|
|
15817
15817
|
const t = /* @__PURE__ */ new WeakMap();
|
|
15818
15818
|
return (n, ...r) => {
|
|
15819
15819
|
const i = t.get(n);
|
|
@@ -15934,7 +15934,7 @@ function vw(e) {
|
|
|
15934
15934
|
BYTES: "number",
|
|
15935
15935
|
BITS: "number"
|
|
15936
15936
|
}, n = $x.reduce((r, i) => (r[i] = "function", r), t);
|
|
15937
|
-
return
|
|
15937
|
+
return mc(e, n), e;
|
|
15938
15938
|
}
|
|
15939
15939
|
function yu(e, t, n) {
|
|
15940
15940
|
if (n < hn)
|
|
@@ -16022,7 +16022,7 @@ function pi(e, t, n = !1, r = {}) {
|
|
|
16022
16022
|
}
|
|
16023
16023
|
if (d.length !== u)
|
|
16024
16024
|
throw new Error("Field.fromBytes: expected " + u + " bytes, got " + d.length);
|
|
16025
|
-
let g = n ?
|
|
16025
|
+
let g = n ? qo(d) : rr(d);
|
|
16026
16026
|
if (o && (g = mt(g, e)), !y && !l.isValid(g))
|
|
16027
16027
|
throw new Error("invalid field element: outside of range 0..ORDER");
|
|
16028
16028
|
return g;
|
|
@@ -16049,7 +16049,7 @@ function jx(e, t, n = !1) {
|
|
|
16049
16049
|
const r = e.length, i = Iw(t), s = Ow(t);
|
|
16050
16050
|
if (r < 16 || r < s || r > 1024)
|
|
16051
16051
|
throw new Error("expected " + s + "-1024 bytes of input, got " + r);
|
|
16052
|
-
const o = n ?
|
|
16052
|
+
const o = n ? qo(e) : rr(e), c = mt(o, t - Ft) + Ft;
|
|
16053
16053
|
return n ? gw(c, i) : Ut(c, i);
|
|
16054
16054
|
}
|
|
16055
16055
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -16203,7 +16203,7 @@ function Pw(e, t, n, r) {
|
|
|
16203
16203
|
const i = n.length, s = r.length;
|
|
16204
16204
|
if (i !== s)
|
|
16205
16205
|
throw new Error("arrays of points and scalars must have equal length");
|
|
16206
|
-
const o = e.ZERO, c =
|
|
16206
|
+
const o = e.ZERO, c = Vo(BigInt(i));
|
|
16207
16207
|
let a = 1;
|
|
16208
16208
|
c > 12 ? a = c - 3 : c > 4 ? a = c - 2 : c > 0 && (a = 2);
|
|
16209
16209
|
const u = Qi(a), f = new Array(Number(u) + 1).fill(o), l = Math.floor((t.BITS - 1) / a) * a;
|
|
@@ -16247,7 +16247,7 @@ function Rw(e, t, n = {}, r) {
|
|
|
16247
16247
|
}
|
|
16248
16248
|
const Xx = rr;
|
|
16249
16249
|
function ni(e, t) {
|
|
16250
|
-
if (
|
|
16250
|
+
if ($o(e), $o(t), e < 0 || e >= 1 << 8 * t)
|
|
16251
16251
|
throw new Error("invalid I2OSP input: " + e);
|
|
16252
16252
|
const n = Array.from({ length: t }).fill(0);
|
|
16253
16253
|
for (let r = t - 1; r >= 0; r--)
|
|
@@ -16260,17 +16260,17 @@ function zx(e, t) {
|
|
|
16260
16260
|
n[r] = e[r] ^ t[r];
|
|
16261
16261
|
return n;
|
|
16262
16262
|
}
|
|
16263
|
-
function
|
|
16263
|
+
function $o(e) {
|
|
16264
16264
|
if (!Number.isSafeInteger(e))
|
|
16265
16265
|
throw new Error("number expected");
|
|
16266
16266
|
}
|
|
16267
16267
|
function Uw(e) {
|
|
16268
|
-
if (!
|
|
16268
|
+
if (!ic(e) && typeof e != "string")
|
|
16269
16269
|
throw new Error("DST must be Uint8Array or string");
|
|
16270
16270
|
return typeof e == "string" ? dt(e) : e;
|
|
16271
16271
|
}
|
|
16272
16272
|
function Yx(e, t, n, r) {
|
|
16273
|
-
On(e),
|
|
16273
|
+
On(e), $o(n), t = Uw(t), t.length > 255 && (t = r($e(dt("H2C-OVERSIZE-DST-"), t)));
|
|
16274
16274
|
const { outputLen: i, blockLen: s } = r, o = Math.ceil(n / i);
|
|
16275
16275
|
if (n > 65535 || o > 255)
|
|
16276
16276
|
throw new Error("expand_message_xmd: invalid lenInBytes");
|
|
@@ -16283,7 +16283,7 @@ function Yx(e, t, n, r) {
|
|
|
16283
16283
|
return $e(...f).slice(0, n);
|
|
16284
16284
|
}
|
|
16285
16285
|
function Zx(e, t, n, r, i) {
|
|
16286
|
-
if (On(e),
|
|
16286
|
+
if (On(e), $o(n), t = Uw(t), t.length > 255) {
|
|
16287
16287
|
const s = Math.ceil(2 * r / 8);
|
|
16288
16288
|
t = i.create({ dkLen: s }).update(dt("H2C-OVERSIZE-DST-")).update(t).digest();
|
|
16289
16289
|
}
|
|
@@ -16292,7 +16292,7 @@ function Zx(e, t, n, r, i) {
|
|
|
16292
16292
|
return i.create({ dkLen: n }).update(e).update(ni(n, 2)).update(t).update(ni(t.length, 1)).digest();
|
|
16293
16293
|
}
|
|
16294
16294
|
function of(e, t, n) {
|
|
16295
|
-
|
|
16295
|
+
mc(n, {
|
|
16296
16296
|
p: "bigint",
|
|
16297
16297
|
m: "number",
|
|
16298
16298
|
k: "number",
|
|
@@ -16301,7 +16301,7 @@ function of(e, t, n) {
|
|
|
16301
16301
|
const { p: r, k: i, m: s, hash: o, expand: c, DST: a } = n;
|
|
16302
16302
|
if (!Cx(n.hash))
|
|
16303
16303
|
throw new Error("expected valid hash");
|
|
16304
|
-
On(e),
|
|
16304
|
+
On(e), $o(t);
|
|
16305
16305
|
const u = r.toString(2).length, f = Math.ceil((u + i) / 8), l = t * s * f;
|
|
16306
16306
|
let d;
|
|
16307
16307
|
if (c === "xmd")
|
|
@@ -16375,7 +16375,7 @@ function Qx(e, t, n) {
|
|
|
16375
16375
|
let u = e - c * r - a * s, f = -c * i - a * o;
|
|
16376
16376
|
const l = u < Fi, d = f < Fi;
|
|
16377
16377
|
l && (u = -u), d && (f = -f);
|
|
16378
|
-
const y = Qi(Math.ceil(
|
|
16378
|
+
const y = Qi(Math.ceil(Vo(n) / 2)) + Jt;
|
|
16379
16379
|
if (u < Fi || u >= y || f < Fi || f >= y)
|
|
16380
16380
|
throw new Error("splitScalar (endomorphism): failed, k=" + e);
|
|
16381
16381
|
return { k1neg: l, k1: u, k2neg: d, k2: f };
|
|
@@ -16402,7 +16402,7 @@ function e3(e, t = {}) {
|
|
|
16402
16402
|
const n = Rw("weierstrass", e, t), { Fp: r, Fn: i } = n;
|
|
16403
16403
|
let s = n.CURVE;
|
|
16404
16404
|
const { h: o, n: c } = s;
|
|
16405
|
-
|
|
16405
|
+
mc(t, {}, {
|
|
16406
16406
|
allowInfinityPoint: "boolean",
|
|
16407
16407
|
clearCofactor: "function",
|
|
16408
16408
|
isTorsionFree: "function",
|
|
@@ -16421,7 +16421,7 @@ function e3(e, t = {}) {
|
|
|
16421
16421
|
}
|
|
16422
16422
|
function l(K, H, $) {
|
|
16423
16423
|
const { x: P, y: D } = H.toAffine(), F = r.toBytes(P);
|
|
16424
|
-
if (
|
|
16424
|
+
if (Mo($, "isCompressed"), $) {
|
|
16425
16425
|
f();
|
|
16426
16426
|
const x = !r.isOdd(D);
|
|
16427
16427
|
return $e(t3(x), F);
|
|
@@ -16482,7 +16482,7 @@ function e3(e, t = {}) {
|
|
|
16482
16482
|
throw new Error("no endo");
|
|
16483
16483
|
return Qx(K, a.basises, i.ORDER);
|
|
16484
16484
|
}
|
|
16485
|
-
const A =
|
|
16485
|
+
const A = Lo((K, H) => {
|
|
16486
16486
|
const { X: $, Y: P, Z: D } = K;
|
|
16487
16487
|
if (r.eql(D, r.ONE))
|
|
16488
16488
|
return { x: $, y: P };
|
|
@@ -16494,7 +16494,7 @@ function e3(e, t = {}) {
|
|
|
16494
16494
|
if (!r.eql(q, r.ONE))
|
|
16495
16495
|
throw new Error("invZ was invalid");
|
|
16496
16496
|
return { x, y: B };
|
|
16497
|
-
}), R =
|
|
16497
|
+
}), R = Lo((K) => {
|
|
16498
16498
|
if (K.is0()) {
|
|
16499
16499
|
if (t.allowInfinityPoint && !r.is0(K.Y))
|
|
16500
16500
|
return;
|
|
@@ -16673,7 +16673,7 @@ function e3(e, t = {}) {
|
|
|
16673
16673
|
return this.multiplyUnsafe(o).is0();
|
|
16674
16674
|
}
|
|
16675
16675
|
toBytes(H = !0) {
|
|
16676
|
-
return
|
|
16676
|
+
return Mo(H, "isCompressed"), this.assertValidity(), y(v, this, H);
|
|
16677
16677
|
}
|
|
16678
16678
|
toHex(H = !0) {
|
|
16679
16679
|
return rt(this.toBytes(H));
|
|
@@ -16835,11 +16835,11 @@ function o3(e, t) {
|
|
|
16835
16835
|
});
|
|
16836
16836
|
}
|
|
16837
16837
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
16838
|
-
const c3 = BigInt(0),
|
|
16838
|
+
const c3 = BigInt(0), Hc = BigInt(1), m0 = BigInt(2), gs = BigInt(3);
|
|
16839
16839
|
function a3(e) {
|
|
16840
16840
|
const t = [];
|
|
16841
|
-
for (; e >
|
|
16842
|
-
(e &
|
|
16841
|
+
for (; e > Hc; e >>= Hc)
|
|
16842
|
+
(e & Hc) === c3 ? t.unshift(0) : (e & gs) === gs ? (t.unshift(-1), e += Hc) : t.unshift(1);
|
|
16843
16843
|
return t;
|
|
16844
16844
|
}
|
|
16845
16845
|
function cf(e) {
|
|
@@ -16866,7 +16866,7 @@ function u3(e, t, n, r) {
|
|
|
16866
16866
|
const $ = i.sqr(U), P = i.mul($, U), D = i.mul($, T), F = i.add(i.sub(P, i.mul(D, m0)), i.mul(i.sqr(v), A));
|
|
16867
16867
|
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 };
|
|
16868
16868
|
}
|
|
16869
|
-
const g = a3(c), m =
|
|
16869
|
+
const g = a3(c), m = Lo((w) => {
|
|
16870
16870
|
const T = w, { x: O, y: A } = T.toAffine(), R = O, M = A, v = i.neg(A);
|
|
16871
16871
|
let U = R, V = M, K = i.ONE;
|
|
16872
16872
|
const H = [];
|
|
@@ -17142,7 +17142,7 @@ class h3 {
|
|
|
17142
17142
|
constructor(t, n = {}) {
|
|
17143
17143
|
this.MASK = Sr;
|
|
17144
17144
|
const r = t.ORDER, i = r * r;
|
|
17145
|
-
this.Fp = t, this.ORDER = i, this.BITS =
|
|
17145
|
+
this.Fp = t, this.ORDER = i, this.BITS = Vo(i), this.BYTES = Math.ceil(Vo(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, en), this.NONRESIDUE = _0(t, n.FP2_NONRESIDUE), this.FROBENIUS_COEFFICIENTS = ph(t, this.Fp_NONRESIDUE, t.ORDER, 2)[0], this.mulByB = n.Fp2mulByB, Object.seal(this);
|
|
17146
17146
|
}
|
|
17147
17147
|
fromBigTuple(t) {
|
|
17148
17148
|
return _0(this.Fp, t);
|
|
@@ -17674,12 +17674,12 @@ function y3(e) {
|
|
|
17674
17674
|
return { Fp: t, Fp2: n, Fp6: r, Fp12: i };
|
|
17675
17675
|
}
|
|
17676
17676
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
17677
|
-
const jt = BigInt(0), Ca = BigInt(1), kn = BigInt(2), gu = BigInt(3),
|
|
17677
|
+
const jt = BigInt(0), Ca = BigInt(1), kn = BigInt(2), gu = BigInt(3), Do = BigInt(4), ri = BigInt("0xd201000000010000"), g3 = Vo(ri), Wi = {
|
|
17678
17678
|
p: BigInt("0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab"),
|
|
17679
17679
|
n: BigInt("0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"),
|
|
17680
17680
|
h: BigInt("0x396c8c005555e1568c00aaab0000aaab"),
|
|
17681
17681
|
a: jt,
|
|
17682
|
-
b:
|
|
17682
|
+
b: Do,
|
|
17683
17683
|
Gx: BigInt("0x17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb"),
|
|
17684
17684
|
Gy: BigInt("0x08b3f481e3aaa0f1a09e30ed741d8ae4fcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1")
|
|
17685
17685
|
}, m3 = pi(Wi.n, {
|
|
@@ -17692,7 +17692,7 @@ const jt = BigInt(0), Ca = BigInt(1), kn = BigInt(2), gu = BigInt(3), $o = BigIn
|
|
|
17692
17692
|
// Fp(u) / (u² - β) where β = -1
|
|
17693
17693
|
FP2_NONRESIDUE: [Ca, Ca],
|
|
17694
17694
|
Fp2mulByB: ({ c0: e, c1: t }) => {
|
|
17695
|
-
const n = Ee.mul(e,
|
|
17695
|
+
const n = Ee.mul(e, Do), r = Ee.mul(t, Do);
|
|
17696
17696
|
return { c0: Ee.sub(n, r), c1: Ee.add(n, r) };
|
|
17697
17697
|
},
|
|
17698
17698
|
Fp12finalExponentiate: (e) => {
|
|
@@ -17712,7 +17712,7 @@ const jt = BigInt(0), Ca = BigInt(1), kn = BigInt(2), gu = BigInt(3), $o = BigIn
|
|
|
17712
17712
|
n: Wi.n,
|
|
17713
17713
|
h: BigInt("0x5d543a95414e7f1091d50792876a202cd91de4547085abaa68a205b2e5a7ddfa628f1cb4d9e82ef21537e293a6691ae1616ec6e786f0c70cf1c38e31c7238e5"),
|
|
17714
17714
|
a: Re.ZERO,
|
|
17715
|
-
b: Re.fromBigTuple([
|
|
17715
|
+
b: Re.fromBigTuple([Do, Do]),
|
|
17716
17716
|
Gx: Re.fromBigTuple([
|
|
17717
17717
|
BigInt("0x024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8"),
|
|
17718
17718
|
BigInt("0x13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e")
|
|
@@ -17721,13 +17721,13 @@ const jt = BigInt(0), Ca = BigInt(1), kn = BigInt(2), gu = BigInt(3), $o = BigIn
|
|
|
17721
17721
|
BigInt("0x0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801"),
|
|
17722
17722
|
BigInt("0x0606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79be")
|
|
17723
17723
|
])
|
|
17724
|
-
}, mu =
|
|
17724
|
+
}, mu = wc(Ee.toBytes(jt), { infinity: !0, compressed: !0 });
|
|
17725
17725
|
function wu(e) {
|
|
17726
17726
|
e = e.slice();
|
|
17727
17727
|
const t = e[0] & 224, n = !!(t >> 7 & 1), r = !!(t >> 6 & 1), i = !!(t >> 5 & 1);
|
|
17728
17728
|
return e[0] &= 31, { compressed: n, infinity: r, sort: i, value: e };
|
|
17729
17729
|
}
|
|
17730
|
-
function
|
|
17730
|
+
function wc(e, t) {
|
|
17731
17731
|
if (e[0] & 224)
|
|
17732
17732
|
throw new Error("setMask: non-empty mask");
|
|
17733
17733
|
return t.compressed && (e[0] |= 128), t.infinity && (e[0] |= 64), t.sort && (e[0] |= 32), e;
|
|
@@ -17738,7 +17738,7 @@ function E3(e, t, n) {
|
|
|
17738
17738
|
if (s)
|
|
17739
17739
|
return mu.slice();
|
|
17740
17740
|
const a = !!(c * kn / i);
|
|
17741
|
-
return
|
|
17741
|
+
return wc(Ut(o, r), { compressed: !0, sort: a });
|
|
17742
17742
|
} else
|
|
17743
17743
|
return s ? $e(Uint8Array.of(64), new Uint8Array(2 * r - 1)) : $e(Ut(o, r), Ut(c, r));
|
|
17744
17744
|
}
|
|
@@ -17748,7 +17748,7 @@ function uf(e) {
|
|
|
17748
17748
|
if (e.is0())
|
|
17749
17749
|
return mu.slice();
|
|
17750
17750
|
const s = !!(i * kn / n);
|
|
17751
|
-
return
|
|
17751
|
+
return wc(Ut(r, t), { compressed: !0, sort: s });
|
|
17752
17752
|
}
|
|
17753
17753
|
function _3(e) {
|
|
17754
17754
|
const { compressed: t, infinity: n, sort: r, value: i } = wu(e), { BYTES: s, ORDER: o } = Ee;
|
|
@@ -17794,7 +17794,7 @@ function S3(e, t, n) {
|
|
|
17794
17794
|
if (s)
|
|
17795
17795
|
return $e(mu, Ut(jt, r));
|
|
17796
17796
|
const a = !!(c.c1 === jt ? c.c0 * kn / i : c.c1 * kn / i);
|
|
17797
|
-
return $e(
|
|
17797
|
+
return $e(wc(Ut(o.c1, r), { compressed: !0, sort: a }), Ut(o.c0, r));
|
|
17798
17798
|
} else {
|
|
17799
17799
|
if (s)
|
|
17800
17800
|
return $e(Uint8Array.of(64), new Uint8Array(4 * r - 1));
|
|
@@ -17808,7 +17808,7 @@ function ff(e) {
|
|
|
17808
17808
|
if (e.is0())
|
|
17809
17809
|
return $e(mu, Ut(jt, t));
|
|
17810
17810
|
const { x: n, y: r } = e.toAffine(), { re: i, im: s } = Re.reim(n), { re: o, im: c } = Re.reim(r), u = !!((c > jt ? c * kn : o * kn) / Ee.ORDER & Ca), f = i;
|
|
17811
|
-
return $e(
|
|
17811
|
+
return $e(wc(Ut(s, t), { sort: u, compressed: !0 }), Ut(f, t));
|
|
17812
17812
|
}
|
|
17813
17813
|
function T3(e) {
|
|
17814
17814
|
const { BYTES: t, ORDER: n } = Ee, { compressed: r, infinity: i, sort: s, value: o } = wu(e);
|
|
@@ -18157,7 +18157,7 @@ class Vi {
|
|
|
18157
18157
|
* @returns The result of the lookup.
|
|
18158
18158
|
*/
|
|
18159
18159
|
lookup_path(t) {
|
|
18160
|
-
return
|
|
18160
|
+
return bc(t, this.cert.tree);
|
|
18161
18161
|
}
|
|
18162
18162
|
/**
|
|
18163
18163
|
* Lookup a subtree in the certificate tree, using {@link lookup_subtree}.
|
|
@@ -18168,7 +18168,7 @@ class Vi {
|
|
|
18168
18168
|
return mh(t, this.cert.tree);
|
|
18169
18169
|
}
|
|
18170
18170
|
async verify() {
|
|
18171
|
-
const t = await
|
|
18171
|
+
const t = await na(this.cert.tree), n = await this._checkDelegationAndGetKey(this.cert.delegation), r = this.cert.signature, i = V3(n), s = $e(wo("ic-state-root"), t), o = _n(this.lookup_path(["time"]));
|
|
18172
18172
|
if (!o)
|
|
18173
18173
|
throw yt.fromCode(new _s("Certificate does not contain a time"));
|
|
18174
18174
|
if (!this.#t) {
|
|
@@ -18176,9 +18176,9 @@ class Vi {
|
|
|
18176
18176
|
if ((g || m) && this.#e && !this.#e.hasSyncedTime())
|
|
18177
18177
|
return await this.#e.syncTime(this._canisterId), await this.verify();
|
|
18178
18178
|
if (g)
|
|
18179
|
-
throw An.fromCode(new
|
|
18179
|
+
throw An.fromCode(new Uo(this._maxAgeInMinutes, y, u, c, "past"));
|
|
18180
18180
|
if (m)
|
|
18181
|
-
throw this.#e?.hasSyncedTime() ? fn.fromCode(new Vn("System time has been synced with the IC network, but certificate is still too far in the future.")) : An.fromCode(new
|
|
18181
|
+
throw this.#e?.hasSyncedTime() ? fn.fromCode(new Vn("System time has been synced with the IC network, but certificate is still too far in the future.")) : An.fromCode(new Uo(5, y, u, c, "future"));
|
|
18182
18182
|
}
|
|
18183
18183
|
try {
|
|
18184
18184
|
if (!await this._blsVerify(i, r, s))
|
|
@@ -18215,7 +18215,7 @@ class Vi {
|
|
|
18215
18215
|
return o;
|
|
18216
18216
|
}
|
|
18217
18217
|
}
|
|
18218
|
-
const ro =
|
|
18218
|
+
const ro = sc("308182301d060d2b0601040182dc7c0503010201060c2b0601040182dc7c05030201036100"), q3 = 96;
|
|
18219
18219
|
function V3(e) {
|
|
18220
18220
|
const t = ro.byteLength + q3;
|
|
18221
18221
|
if (e.byteLength !== t)
|
|
@@ -18229,7 +18229,7 @@ function _n(e) {
|
|
|
18229
18229
|
if (e.status === vn.Found && e.value instanceof Uint8Array)
|
|
18230
18230
|
return e.value;
|
|
18231
18231
|
}
|
|
18232
|
-
async function
|
|
18232
|
+
async function na(e) {
|
|
18233
18233
|
switch (e[0]) {
|
|
18234
18234
|
case Ct.Empty:
|
|
18235
18235
|
return En(wo("ic-hashtree-empty"));
|
|
@@ -18238,9 +18238,9 @@ async function ta(e) {
|
|
|
18238
18238
|
case Ct.Leaf:
|
|
18239
18239
|
return En($e(wo("ic-hashtree-leaf"), e[1]));
|
|
18240
18240
|
case Ct.Labeled:
|
|
18241
|
-
return En($e(wo("ic-hashtree-labeled"), e[1], await
|
|
18241
|
+
return En($e(wo("ic-hashtree-labeled"), e[1], await na(e[2])));
|
|
18242
18242
|
case Ct.Fork:
|
|
18243
|
-
return En($e(wo("ic-hashtree-fork"), await
|
|
18243
|
+
return En($e(wo("ic-hashtree-fork"), await na(e[1]), await na(e[2])));
|
|
18244
18244
|
default:
|
|
18245
18245
|
throw Ss;
|
|
18246
18246
|
}
|
|
@@ -18264,7 +18264,7 @@ var ot;
|
|
|
18264
18264
|
(function(e) {
|
|
18265
18265
|
e.Absent = "Absent", e.Unknown = "Unknown", e.Found = "Found", e.Less = "Less", e.Greater = "Greater";
|
|
18266
18266
|
})(ot || (ot = {}));
|
|
18267
|
-
function
|
|
18267
|
+
function bc(e, t) {
|
|
18268
18268
|
if (e.length === 0)
|
|
18269
18269
|
switch (t[0]) {
|
|
18270
18270
|
case Ct.Empty:
|
|
@@ -18273,7 +18273,7 @@ function wc(e, t) {
|
|
|
18273
18273
|
};
|
|
18274
18274
|
case Ct.Leaf: {
|
|
18275
18275
|
if (!t[1])
|
|
18276
|
-
throw fn.fromCode(new
|
|
18276
|
+
throw fn.fromCode(new yc("Invalid tree structure for leaf"));
|
|
18277
18277
|
if (t[1] instanceof Uint8Array)
|
|
18278
18278
|
return {
|
|
18279
18279
|
status: vn.Found,
|
|
@@ -18293,10 +18293,10 @@ function wc(e, t) {
|
|
|
18293
18293
|
default:
|
|
18294
18294
|
throw Ss;
|
|
18295
18295
|
}
|
|
18296
|
-
const n = Mw(e), r =
|
|
18296
|
+
const n = Mw(e), r = xo(n, t);
|
|
18297
18297
|
switch (r.status) {
|
|
18298
18298
|
case ot.Found:
|
|
18299
|
-
return
|
|
18299
|
+
return bc(e.slice(1), r.value);
|
|
18300
18300
|
case ot.Absent:
|
|
18301
18301
|
case ot.Greater:
|
|
18302
18302
|
case ot.Less:
|
|
@@ -18317,7 +18317,7 @@ function mh(e, t) {
|
|
|
18317
18317
|
status: vs.Found,
|
|
18318
18318
|
value: t
|
|
18319
18319
|
};
|
|
18320
|
-
const n = Mw(e), r =
|
|
18320
|
+
const n = Mw(e), r = xo(n, t);
|
|
18321
18321
|
switch (r.status) {
|
|
18322
18322
|
case ot.Found:
|
|
18323
18323
|
return mh(e.slice(1), r.value);
|
|
@@ -18345,7 +18345,7 @@ function cl(e) {
|
|
|
18345
18345
|
return [e];
|
|
18346
18346
|
}
|
|
18347
18347
|
}
|
|
18348
|
-
function
|
|
18348
|
+
function xo(e, t) {
|
|
18349
18349
|
switch (t[0]) {
|
|
18350
18350
|
// if we have a labelled node, compare the node's label to the one we are
|
|
18351
18351
|
// looking for
|
|
@@ -18360,12 +18360,12 @@ function To(e, t) {
|
|
|
18360
18360
|
};
|
|
18361
18361
|
// if we have a fork node, we need to search both sides, starting with the left
|
|
18362
18362
|
case Ct.Fork: {
|
|
18363
|
-
const n =
|
|
18363
|
+
const n = xo(e, t[1]);
|
|
18364
18364
|
switch (n.status) {
|
|
18365
18365
|
// if the label we're searching for is greater than the left node lookup,
|
|
18366
18366
|
// we need to search the right node
|
|
18367
18367
|
case ot.Greater: {
|
|
18368
|
-
const r =
|
|
18368
|
+
const r = xo(e, t[2]);
|
|
18369
18369
|
return r.status === ot.Less ? {
|
|
18370
18370
|
status: ot.Absent
|
|
18371
18371
|
} : r;
|
|
@@ -18373,7 +18373,7 @@ function To(e, t) {
|
|
|
18373
18373
|
// if the left node returns an uncertain result, we need to search the
|
|
18374
18374
|
// right node
|
|
18375
18375
|
case ot.Unknown: {
|
|
18376
|
-
const r =
|
|
18376
|
+
const r = xo(e, t[2]);
|
|
18377
18377
|
return r.status === ot.Less ? {
|
|
18378
18378
|
status: ot.Unknown
|
|
18379
18379
|
} : r;
|
|
@@ -18401,7 +18401,7 @@ function To(e, t) {
|
|
|
18401
18401
|
}
|
|
18402
18402
|
}
|
|
18403
18403
|
function qw(e) {
|
|
18404
|
-
const { canisterId: t, subnetId: n, tree: r } = e, i =
|
|
18404
|
+
const { canisterId: t, subnetId: n, tree: r } = e, i = bc(["subnet", n.toUint8Array(), "canister_ranges"], r);
|
|
18405
18405
|
if (i.status !== vn.Found)
|
|
18406
18406
|
throw yt.fromCode(new Us(`Could not find canister ranges for subnet ${n.toText()}`, i.status));
|
|
18407
18407
|
if (!(i.value instanceof Uint8Array))
|
|
@@ -18486,7 +18486,7 @@ const v0 = async (e) => {
|
|
|
18486
18486
|
}
|
|
18487
18487
|
}
|
|
18488
18488
|
} catch (l) {
|
|
18489
|
-
if (l instanceof wr && (l.hasCode(_s) || l.hasCode(
|
|
18489
|
+
if (l instanceof wr && (l.hasCode(_s) || l.hasCode(Uo)))
|
|
18490
18490
|
throw l;
|
|
18491
18491
|
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();
|
|
18492
18492
|
}
|
|
@@ -18510,10 +18510,10 @@ const v0 = async (e) => {
|
|
|
18510
18510
|
if (a.status !== vs.Found)
|
|
18511
18511
|
throw yt.fromCode(new Us("Node not found", a.status));
|
|
18512
18512
|
if (a.value instanceof Uint8Array)
|
|
18513
|
-
throw fn.fromCode(new
|
|
18513
|
+
throw fn.fromCode(new yc("Invalid node tree"));
|
|
18514
18514
|
const u = cl(a.value), f = /* @__PURE__ */ new Map();
|
|
18515
18515
|
return u.forEach((l) => {
|
|
18516
|
-
const d = Ke.from(l[1]).toText(), y =
|
|
18516
|
+
const d = Ke.from(l[1]).toText(), y = bc(["public_key"], l[2]);
|
|
18517
18517
|
if (y.status !== vn.Found)
|
|
18518
18518
|
throw yt.fromCode(new Us("Public key not found", y.status));
|
|
18519
18519
|
const g = y.value;
|
|
@@ -18562,7 +18562,7 @@ function G3(e, t = {}) {
|
|
|
18562
18562
|
const n = Rw("edwards", e, t, t.FpFnLE), { Fp: r, Fn: i } = n;
|
|
18563
18563
|
let s = n.CURVE;
|
|
18564
18564
|
const { h: o } = s;
|
|
18565
|
-
|
|
18565
|
+
mc(t, {}, { uvRatio: "function" });
|
|
18566
18566
|
const c = lf << BigInt(i.BYTES * 8) - Ot, a = (E) => r.create(E), u = t.uvRatio || ((E, _) => {
|
|
18567
18567
|
try {
|
|
18568
18568
|
return { isValid: !0, value: r.sqrt(r.div(E, _)) };
|
|
@@ -18580,7 +18580,7 @@ function G3(e, t = {}) {
|
|
|
18580
18580
|
if (!(E instanceof g))
|
|
18581
18581
|
throw new Error("ExtendedPoint expected");
|
|
18582
18582
|
}
|
|
18583
|
-
const d =
|
|
18583
|
+
const d = Lo((E, _) => {
|
|
18584
18584
|
const { X: S, Y: w, Z: T } = E, O = E.is0();
|
|
18585
18585
|
_ == null && (_ = O ? j3 : r.inv(T));
|
|
18586
18586
|
const A = a(S * _), R = a(w * _), M = r.mul(T, _);
|
|
@@ -18589,7 +18589,7 @@ function G3(e, t = {}) {
|
|
|
18589
18589
|
if (M !== Ot)
|
|
18590
18590
|
throw new Error("invZ was invalid");
|
|
18591
18591
|
return { x: A, y: R };
|
|
18592
|
-
}), y =
|
|
18592
|
+
}), y = Lo((E) => {
|
|
18593
18593
|
const { a: _, d: S } = s;
|
|
18594
18594
|
if (E.is0())
|
|
18595
18595
|
throw new Error("bad point: ZERO");
|
|
@@ -18617,10 +18617,10 @@ function G3(e, t = {}) {
|
|
|
18617
18617
|
// Uses algo from RFC8032 5.1.3.
|
|
18618
18618
|
static fromBytes(_, S = !1) {
|
|
18619
18619
|
const w = r.BYTES, { a: T, d: O } = s;
|
|
18620
|
-
_ = a0(As(_, w, "point")),
|
|
18620
|
+
_ = a0(As(_, w, "point")), Mo(S, "zip215");
|
|
18621
18621
|
const A = a0(_), R = _[w - 1];
|
|
18622
18622
|
A[w - 1] = R & -129;
|
|
18623
|
-
const M =
|
|
18623
|
+
const M = qo(A), v = S ? c : r.ORDER;
|
|
18624
18624
|
u0("point.y", M, qr, v);
|
|
18625
18625
|
const U = a(M * M), V = a(U - Ot), K = a(O * U - T);
|
|
18626
18626
|
let { isValid: H, value: $ } = u(V, K);
|
|
@@ -18757,7 +18757,7 @@ function G3(e, t = {}) {
|
|
|
18757
18757
|
function W3(e, t, n = {}) {
|
|
18758
18758
|
if (typeof t != "function")
|
|
18759
18759
|
throw new Error('"hash" function param is required');
|
|
18760
|
-
|
|
18760
|
+
mc(n, {}, {
|
|
18761
18761
|
adjustScalarBytes: "function",
|
|
18762
18762
|
randomBytes: "function",
|
|
18763
18763
|
domain: "function",
|
|
@@ -18765,12 +18765,12 @@ function W3(e, t, n = {}) {
|
|
|
18765
18765
|
mapToCurve: "function"
|
|
18766
18766
|
});
|
|
18767
18767
|
const { prehash: r } = n, { BASE: i, Fp: s, Fn: o } = e, c = n.randomBytes || cg, a = n.adjustScalarBytes || ((v) => v), u = n.domain || ((v, U, V) => {
|
|
18768
|
-
if (
|
|
18768
|
+
if (Mo(V, "phflag"), U.length || V)
|
|
18769
18769
|
throw new Error("Contexts/pre-hash are not supported");
|
|
18770
18770
|
return v;
|
|
18771
18771
|
});
|
|
18772
18772
|
function f(v) {
|
|
18773
|
-
return o.create(
|
|
18773
|
+
return o.create(qo(v));
|
|
18774
18774
|
}
|
|
18775
18775
|
function l(v) {
|
|
18776
18776
|
const U = w.secretKey;
|
|
@@ -18800,8 +18800,8 @@ function W3(e, t, n = {}) {
|
|
|
18800
18800
|
const E = { zip215: !0 };
|
|
18801
18801
|
function _(v, U, V, K = E) {
|
|
18802
18802
|
const { context: H, zip215: $ } = K, P = w.signature;
|
|
18803
|
-
v = cn("signature", v, P), U = cn("message", U), V = cn("publicKey", V, w.publicKey), $ !== void 0 &&
|
|
18804
|
-
const D = P / 2, F = v.subarray(0, D), x =
|
|
18803
|
+
v = cn("signature", v, P), U = cn("message", U), V = cn("publicKey", V, w.publicKey), $ !== void 0 && Mo($, "zip215"), r && (U = r(U));
|
|
18804
|
+
const D = P / 2, F = v.subarray(0, D), x = qo(v.subarray(D, P));
|
|
18805
18805
|
let B, q, N;
|
|
18806
18806
|
try {
|
|
18807
18807
|
B = e.fromBytes(V, $), q = e.fromBytes(F, $), N = i.multiplyUnsafe(x);
|
|
@@ -18827,7 +18827,7 @@ function W3(e, t, n = {}) {
|
|
|
18827
18827
|
return { secretKey: U, publicKey: y(U) };
|
|
18828
18828
|
}
|
|
18829
18829
|
function A(v) {
|
|
18830
|
-
return
|
|
18830
|
+
return ic(v) && v.length === o.BYTES;
|
|
18831
18831
|
}
|
|
18832
18832
|
function R(v, U) {
|
|
18833
18833
|
try {
|
|
@@ -19218,15 +19218,15 @@ const u8 = (e, t) => {
|
|
|
19218
19218
|
throw et.fromCode(new zl(s, o.length));
|
|
19219
19219
|
return o;
|
|
19220
19220
|
};
|
|
19221
|
-
var
|
|
19221
|
+
var Go, Wo;
|
|
19222
19222
|
const Pi = class Pi {
|
|
19223
19223
|
// `fromRaw` and `fromDer` should be used for instantiation, not this constructor.
|
|
19224
19224
|
constructor(t) {
|
|
19225
|
-
rn(this, Ko);
|
|
19226
19225
|
rn(this, Go);
|
|
19226
|
+
rn(this, Wo);
|
|
19227
19227
|
if (t.byteLength !== Pi.RAW_KEY_LENGTH)
|
|
19228
19228
|
throw et.fromCode(new Nr("An Ed25519 public key must be exactly 32 bytes long"));
|
|
19229
|
-
zt(this,
|
|
19229
|
+
zt(this, Go, t), zt(this, Wo, Pi.derEncode(t));
|
|
19230
19230
|
}
|
|
19231
19231
|
static from(t) {
|
|
19232
19232
|
return this.fromDer(t.toDer());
|
|
@@ -19247,10 +19247,10 @@ const Pi = class Pi {
|
|
|
19247
19247
|
return n;
|
|
19248
19248
|
}
|
|
19249
19249
|
get rawKey() {
|
|
19250
|
-
return Fe(this,
|
|
19250
|
+
return Fe(this, Go);
|
|
19251
19251
|
}
|
|
19252
19252
|
get derKey() {
|
|
19253
|
-
return Fe(this,
|
|
19253
|
+
return Fe(this, Wo);
|
|
19254
19254
|
}
|
|
19255
19255
|
toDer() {
|
|
19256
19256
|
return this.derKey;
|
|
@@ -19259,7 +19259,7 @@ const Pi = class Pi {
|
|
|
19259
19259
|
return this.rawKey;
|
|
19260
19260
|
}
|
|
19261
19261
|
};
|
|
19262
|
-
|
|
19262
|
+
Go = new WeakMap(), Wo = new WeakMap(), Pi.RAW_KEY_LENGTH = 32;
|
|
19263
19263
|
let ul = Pi;
|
|
19264
19264
|
class f8 {
|
|
19265
19265
|
constructor() {
|
|
@@ -19290,23 +19290,23 @@ class l8 extends f8 {
|
|
|
19290
19290
|
}
|
|
19291
19291
|
}
|
|
19292
19292
|
const U0 = 0.5, C0 = 1.5, H0 = 500, F0 = 6e4, M0 = 9e5, q0 = 10;
|
|
19293
|
-
var Fn,
|
|
19293
|
+
var Fn, Xo, zo, Yo, Zo, Jo, Qo, ec, Bs;
|
|
19294
19294
|
const La = class La {
|
|
19295
19295
|
constructor(t = La.default) {
|
|
19296
19296
|
rn(this, Fn);
|
|
19297
|
-
rn(this, Wo);
|
|
19298
19297
|
rn(this, Xo);
|
|
19299
19298
|
rn(this, zo);
|
|
19300
19299
|
rn(this, Yo);
|
|
19301
19300
|
rn(this, Zo);
|
|
19302
19301
|
rn(this, Jo);
|
|
19303
19302
|
rn(this, Qo);
|
|
19303
|
+
rn(this, ec);
|
|
19304
19304
|
rn(this, Bs, 0);
|
|
19305
19305
|
const { initialInterval: n = H0, randomizationFactor: r = U0, multiplier: i = C0, maxInterval: s = F0, maxElapsedTime: o = M0, maxIterations: c = q0, date: a = Date } = t;
|
|
19306
|
-
zt(this, Fn, n), zt(this,
|
|
19306
|
+
zt(this, Fn, n), zt(this, Xo, r), zt(this, zo, i), zt(this, Yo, s), zt(this, ec, a), zt(this, Zo, a.now()), zt(this, Jo, o), zt(this, Qo, c);
|
|
19307
19307
|
}
|
|
19308
19308
|
get ellapsedTimeInMsec() {
|
|
19309
|
-
return Fe(this,
|
|
19309
|
+
return Fe(this, ec).now() - Fe(this, Zo);
|
|
19310
19310
|
}
|
|
19311
19311
|
get currentInterval() {
|
|
19312
19312
|
return Fe(this, Fn);
|
|
@@ -19315,17 +19315,17 @@ const La = class La {
|
|
|
19315
19315
|
return Fe(this, Bs);
|
|
19316
19316
|
}
|
|
19317
19317
|
get randomValueFromInterval() {
|
|
19318
|
-
const t = Fe(this,
|
|
19318
|
+
const t = Fe(this, Xo) * Fe(this, Fn), n = Fe(this, Fn) - t, r = Fe(this, Fn) + t;
|
|
19319
19319
|
return Math.random() * (r - n) + n;
|
|
19320
19320
|
}
|
|
19321
19321
|
incrementCurrentInterval() {
|
|
19322
|
-
return zt(this, Fn, Math.min(Fe(this, Fn) * Fe(this,
|
|
19322
|
+
return zt(this, Fn, Math.min(Fe(this, Fn) * Fe(this, zo), Fe(this, Yo))), Mh(this, Bs)._++, Fe(this, Fn);
|
|
19323
19323
|
}
|
|
19324
19324
|
next() {
|
|
19325
|
-
return this.ellapsedTimeInMsec >= Fe(this,
|
|
19325
|
+
return this.ellapsedTimeInMsec >= Fe(this, Jo) || Fe(this, Bs) >= Fe(this, Qo) ? null : (this.incrementCurrentInterval(), this.randomValueFromInterval);
|
|
19326
19326
|
}
|
|
19327
19327
|
};
|
|
19328
|
-
Fn = new WeakMap(),
|
|
19328
|
+
Fn = new WeakMap(), Xo = new WeakMap(), zo = new WeakMap(), Yo = new WeakMap(), Zo = new WeakMap(), Jo = new WeakMap(), Qo = new WeakMap(), ec = new WeakMap(), Bs = new WeakMap(), La.default = {
|
|
19329
19329
|
initialInterval: H0,
|
|
19330
19330
|
randomizationFactor: U0,
|
|
19331
19331
|
multiplier: C0,
|
|
@@ -19347,16 +19347,16 @@ function T8() {
|
|
|
19347
19347
|
if (window.fetch)
|
|
19348
19348
|
e = window.fetch.bind(window);
|
|
19349
19349
|
else
|
|
19350
|
-
throw un.fromCode(new
|
|
19350
|
+
throw un.fromCode(new To("Fetch implementation was not available. You appear to be in a browser context, but window.fetch was not present."));
|
|
19351
19351
|
else if (typeof globalThis < "u")
|
|
19352
19352
|
if (globalThis.fetch)
|
|
19353
19353
|
e = globalThis.fetch.bind(globalThis);
|
|
19354
19354
|
else
|
|
19355
|
-
throw un.fromCode(new
|
|
19355
|
+
throw un.fromCode(new To("Fetch implementation was not available. You appear to be in a Node.js context, but global.fetch was not available."));
|
|
19356
19356
|
else typeof self < "u" && self.fetch && (e = self.fetch.bind(self));
|
|
19357
19357
|
if (e)
|
|
19358
19358
|
return e;
|
|
19359
|
-
throw un.fromCode(new
|
|
19359
|
+
throw un.fromCode(new To("Fetch implementation was not available. Please provide fetch to the HttpAgent constructor, or ensure it is available in the window or global context."));
|
|
19360
19360
|
}
|
|
19361
19361
|
function x8(e) {
|
|
19362
19362
|
let t;
|
|
@@ -19435,7 +19435,7 @@ class Tr {
|
|
|
19435
19435
|
throw An.fromCode(new ch(d));
|
|
19436
19436
|
}
|
|
19437
19437
|
return i;
|
|
19438
|
-
}, this.config = t, this.#s = t.fetch || T8() || 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 =
|
|
19438
|
+
}, this.config = t, this.#s = t.fetch || T8() || 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 = sc(p8);
|
|
19439
19439
|
const n = x8(t.host);
|
|
19440
19440
|
this.host = new URL(n), t.verifyQuerySignatures !== void 0 && (this.#d = t.verifyQuerySignatures), this.#c = t.retryTimes ?? 3;
|
|
19441
19441
|
const r = () => new fl({
|
|
@@ -19586,7 +19586,7 @@ class Tr {
|
|
|
19586
19586
|
backoff: o,
|
|
19587
19587
|
delay: a
|
|
19588
19588
|
}), a === null)
|
|
19589
|
-
throw fn.fromCode(new
|
|
19589
|
+
throw fn.fromCode(new Co(`Backoff strategy exhausted after ${c} attempts.`, s));
|
|
19590
19590
|
a > 0 && await new Promise((y) => setTimeout(y, a));
|
|
19591
19591
|
let u;
|
|
19592
19592
|
try {
|
|
@@ -19646,7 +19646,7 @@ class Tr {
|
|
|
19646
19646
|
async #p(t) {
|
|
19647
19647
|
const { requestFn: n, backoff: r, tries: i } = t, s = i === 0 ? 0 : r.next();
|
|
19648
19648
|
if (s === null)
|
|
19649
|
-
throw yt.fromCode(new
|
|
19649
|
+
throw yt.fromCode(new Co(`Retry strategy exhausted after ${i} attempts.`));
|
|
19650
19650
|
s > 0 && await new Promise((f) => setTimeout(f, s));
|
|
19651
19651
|
let o, c = new Uint8Array();
|
|
19652
19652
|
try {
|
|
@@ -19685,7 +19685,7 @@ class Tr {
|
|
|
19685
19685
|
if (!c)
|
|
19686
19686
|
throw un.fromCode(new Ni());
|
|
19687
19687
|
const a = Ke.from(t), u = c.getPrincipal(), f = df(this.#o, this.#i), l = {
|
|
19688
|
-
request_type:
|
|
19688
|
+
request_type: Fo.Query,
|
|
19689
19689
|
canister_id: a,
|
|
19690
19690
|
method_name: n.methodName,
|
|
19691
19691
|
arg: n.arg,
|
|
@@ -19770,7 +19770,7 @@ class Tr {
|
|
|
19770
19770
|
},
|
|
19771
19771
|
endpoint: Ui.ReadState,
|
|
19772
19772
|
body: {
|
|
19773
|
-
request_type:
|
|
19773
|
+
request_type: Fo.ReadState,
|
|
19774
19774
|
paths: t.paths,
|
|
19775
19775
|
sender: i,
|
|
19776
19776
|
ingress_expiry: df(this.#o, this.#i)
|
|
@@ -19828,8 +19828,8 @@ class Tr {
|
|
|
19828
19828
|
if (r && "tree" in r)
|
|
19829
19829
|
n = r.tree;
|
|
19830
19830
|
else
|
|
19831
|
-
throw yt.fromCode(new
|
|
19832
|
-
const i =
|
|
19831
|
+
throw yt.fromCode(new yc("Could not decode time from response"));
|
|
19832
|
+
const i = bc(["time"], n);
|
|
19833
19833
|
if (i.status !== vn.Found)
|
|
19834
19834
|
throw yt.fromCode(new Us("Time was not found in the response or was not in its expected format.", i.status));
|
|
19835
19835
|
if (!(i.value instanceof Uint8Array) && !ArrayBuffer.isView(i))
|
|
@@ -19978,7 +19978,7 @@ function B8(e) {
|
|
|
19978
19978
|
const t = Date.now() + e;
|
|
19979
19979
|
return async (n, r, i) => {
|
|
19980
19980
|
if (Date.now() > t)
|
|
19981
|
-
throw yt.fromCode(new
|
|
19981
|
+
throw yt.fromCode(new Co(`Request timed out after ${e} msec`, r, i));
|
|
19982
19982
|
};
|
|
19983
19983
|
}
|
|
19984
19984
|
function N8(e, t) {
|
|
@@ -20006,7 +20006,7 @@ function R8(e, t) {
|
|
|
20006
20006
|
return Lw(e, t) && typeof e[t] == "function";
|
|
20007
20007
|
}
|
|
20008
20008
|
function V0(e) {
|
|
20009
|
-
return pf(e, "body") && pf(e.body, "content") && e.body.content.request_type ===
|
|
20009
|
+
return pf(e, "body") && pf(e.body, "content") && e.body.content.request_type === Fo.ReadState && pf(e.body.content, "ingress_expiry") && typeof e.body.content.ingress_expiry == "object" && e.body.content.ingress_expiry !== null && R8(e.body.content.ingress_expiry, "toHash");
|
|
20010
20010
|
}
|
|
20011
20011
|
async function $w(e, t, n, r = {}) {
|
|
20012
20012
|
const i = [dt("request_status"), n];
|
|
@@ -20955,7 +20955,7 @@ var Y0;
|
|
|
20955
20955
|
function Xt() {
|
|
20956
20956
|
return Y0 || (Y0 = 1, (function(e) {
|
|
20957
20957
|
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;
|
|
20958
|
-
const t =
|
|
20958
|
+
const t = tc();
|
|
20959
20959
|
e.typeforce = q8();
|
|
20960
20960
|
const n = t.Buffer.alloc(32, 0), r = t.Buffer.from(
|
|
20961
20961
|
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
|
@@ -22563,7 +22563,7 @@ var uo = {}, pp;
|
|
|
22563
22563
|
function Z8() {
|
|
22564
22564
|
if (pp) return uo;
|
|
22565
22565
|
pp = 1, Object.defineProperty(uo, "__esModule", { value: !0 }), uo.p2wpkh = void 0;
|
|
22566
|
-
const e = Pr(), t = Wn(), n = nn(), r = Xt(), i = yi(), s =
|
|
22566
|
+
const e = Pr(), t = Wn(), n = nn(), r = Xt(), i = yi(), s = ac(), o = n.OPS, c = Buffer.alloc(0);
|
|
22567
22567
|
function a(u, f) {
|
|
22568
22568
|
if (!u.address && !u.hash && !u.output && !u.pubkey && !u.witness)
|
|
22569
22569
|
throw new TypeError("Not enough data");
|
|
@@ -22667,7 +22667,7 @@ var fo = {}, yp;
|
|
|
22667
22667
|
function J8() {
|
|
22668
22668
|
if (yp) return fo;
|
|
22669
22669
|
yp = 1, Object.defineProperty(fo, "__esModule", { value: !0 }), fo.p2wsh = void 0;
|
|
22670
|
-
const e = Pr(), t = Wn(), n = nn(), r = Xt(), i = yi(), s =
|
|
22670
|
+
const e = Pr(), t = Wn(), n = nn(), r = Xt(), i = yi(), s = ac(), o = n.OPS, c = Buffer.alloc(0);
|
|
22671
22671
|
function a(f) {
|
|
22672
22672
|
return !!(Buffer.isBuffer(f) && f.length === 65 && f[0] === 4 && (0, r.isPoint)(f));
|
|
22673
22673
|
}
|
|
@@ -22879,12 +22879,12 @@ function Sh() {
|
|
|
22879
22879
|
];
|
|
22880
22880
|
return vi;
|
|
22881
22881
|
}
|
|
22882
|
-
var Of = {}, kt = {},
|
|
22882
|
+
var Of = {}, kt = {}, Fc = { exports: {} };
|
|
22883
22883
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
22884
22884
|
var mp;
|
|
22885
22885
|
function Q8() {
|
|
22886
22886
|
return mp || (mp = 1, (function(e, t) {
|
|
22887
|
-
var n =
|
|
22887
|
+
var n = tc(), r = n.Buffer;
|
|
22888
22888
|
function i(o, c) {
|
|
22889
22889
|
for (var a in o)
|
|
22890
22890
|
c[a] = o[a];
|
|
@@ -22911,7 +22911,7 @@ function Q8() {
|
|
|
22911
22911
|
throw new TypeError("Argument must be a number");
|
|
22912
22912
|
return n.SlowBuffer(o);
|
|
22913
22913
|
};
|
|
22914
|
-
})(
|
|
22914
|
+
})(Fc, Fc.exports)), Fc.exports;
|
|
22915
22915
|
}
|
|
22916
22916
|
var Bf, wp;
|
|
22917
22917
|
function eA() {
|
|
@@ -23067,7 +23067,7 @@ var Ep;
|
|
|
23067
23067
|
function Th() {
|
|
23068
23068
|
return Ep || (Ep = 1, (function(e) {
|
|
23069
23069
|
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;
|
|
23070
|
-
const t =
|
|
23070
|
+
const t = tc(), n = Sh(), r = Pr(), i = Eu(), s = Xt();
|
|
23071
23071
|
e.LEAF_VERSION_TAPSCRIPT = 192, e.MAX_TAPTREE_DEPTH = 128;
|
|
23072
23072
|
const o = (m) => "left" in m && "right" in m;
|
|
23073
23073
|
function c(m, E) {
|
|
@@ -23147,7 +23147,7 @@ var _p;
|
|
|
23147
23147
|
function tA() {
|
|
23148
23148
|
if (_p) return lo;
|
|
23149
23149
|
_p = 1, Object.defineProperty(lo, "__esModule", { value: !0 }), lo.p2tr = void 0;
|
|
23150
|
-
const e =
|
|
23150
|
+
const e = tc(), t = Wn(), n = nn(), r = Xt(), i = Sh(), s = Th(), o = yi(), c = ac(), a = xh(), u = n.OPS, f = 1, l = 80;
|
|
23151
23151
|
function d(y, g) {
|
|
23152
23152
|
if (!y.address && !y.output && !y.pubkey && !y.internalPubkey && !(y.witness && y.witness.length > 1))
|
|
23153
23153
|
throw new TypeError("Not enough data");
|
|
@@ -23349,7 +23349,7 @@ function tA() {
|
|
|
23349
23349
|
return lo.p2tr = d, lo;
|
|
23350
23350
|
}
|
|
23351
23351
|
var Sp;
|
|
23352
|
-
function
|
|
23352
|
+
function Ec() {
|
|
23353
23353
|
return Sp || (Sp = 1, (function(e) {
|
|
23354
23354
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.p2tr = e.p2wsh = e.p2wpkh = e.p2sh = e.p2pkh = e.p2pk = e.p2ms = e.embed = void 0;
|
|
23355
23355
|
const t = L8();
|
|
@@ -23414,7 +23414,7 @@ var Tp;
|
|
|
23414
23414
|
function xh() {
|
|
23415
23415
|
if (Tp) return Yt;
|
|
23416
23416
|
Tp = 1, Object.defineProperty(Yt, "__esModule", { value: !0 }), Yt.toOutputScript = Yt.fromOutputScript = Yt.toBech32 = Yt.toBase58Check = Yt.fromBech32 = Yt.fromBase58Check = void 0;
|
|
23417
|
-
const e = Wn(), t =
|
|
23417
|
+
const e = Wn(), t = Ec(), n = nn(), r = Xt(), i = ac(), s = _h(), 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.";
|
|
23418
23418
|
function d(w, T) {
|
|
23419
23419
|
const O = w.slice(2);
|
|
23420
23420
|
if (O.length < c || O.length > o)
|
|
@@ -23556,7 +23556,7 @@ function nA() {
|
|
|
23556
23556
|
return po.fastMerkleRoot = e, po;
|
|
23557
23557
|
}
|
|
23558
23558
|
var yo = {}, Ap;
|
|
23559
|
-
function
|
|
23559
|
+
function _c() {
|
|
23560
23560
|
if (Ap) return yo;
|
|
23561
23561
|
Ap = 1, Object.defineProperty(yo, "__esModule", { value: !0 }), yo.Transaction = void 0;
|
|
23562
23562
|
const e = Eu(), t = Pr(), n = nn(), r = nn(), i = Xt(), { typeforce: s } = i;
|
|
@@ -23849,7 +23849,7 @@ var vp;
|
|
|
23849
23849
|
function rA() {
|
|
23850
23850
|
if (vp) return ho;
|
|
23851
23851
|
vp = 1, Object.defineProperty(ho, "__esModule", { value: !0 }), ho.Block = void 0;
|
|
23852
|
-
const e = Eu(), t = Pr(), n = nA(), r =
|
|
23852
|
+
const e = Eu(), t = Pr(), n = nA(), r = _c(), i = Xt(), { typeforce: s } = i, o = new TypeError(
|
|
23853
23853
|
"Cannot compute merkle root for zero transactions"
|
|
23854
23854
|
), c = new TypeError(
|
|
23855
23855
|
"Cannot compute witness commit for non-segwit block"
|
|
@@ -23978,7 +23978,7 @@ function rA() {
|
|
|
23978
23978
|
}
|
|
23979
23979
|
return ho;
|
|
23980
23980
|
}
|
|
23981
|
-
var go = {},
|
|
23981
|
+
var go = {}, Mc = {}, qc = {}, Nf = {}, cs = {}, as = {}, kf = {}, Ip;
|
|
23982
23982
|
function Mt() {
|
|
23983
23983
|
return Ip || (Ip = 1, (function(e) {
|
|
23984
23984
|
Object.defineProperty(e, "__esModule", { value: !0 }), (function(t) {
|
|
@@ -24069,10 +24069,10 @@ function iA() {
|
|
|
24069
24069
|
}
|
|
24070
24070
|
return Vr.canAddToArray = s, Vr;
|
|
24071
24071
|
}
|
|
24072
|
-
var
|
|
24072
|
+
var Vc = {}, Bp;
|
|
24073
24073
|
function sA() {
|
|
24074
|
-
if (Bp) return
|
|
24075
|
-
Bp = 1, Object.defineProperty(
|
|
24074
|
+
if (Bp) return Vc;
|
|
24075
|
+
Bp = 1, Object.defineProperty(Vc, "__esModule", { value: !0 });
|
|
24076
24076
|
const e = Mt();
|
|
24077
24077
|
function t(n) {
|
|
24078
24078
|
return {
|
|
@@ -24080,7 +24080,7 @@ function sA() {
|
|
|
24080
24080
|
value: n.toBuffer()
|
|
24081
24081
|
};
|
|
24082
24082
|
}
|
|
24083
|
-
return
|
|
24083
|
+
return Vc.encode = t, Vc;
|
|
24084
24084
|
}
|
|
24085
24085
|
var Lr = {}, Np;
|
|
24086
24086
|
function oA() {
|
|
@@ -24590,10 +24590,10 @@ function mA() {
|
|
|
24590
24590
|
}
|
|
24591
24591
|
return Jr.canAdd = s, Jr;
|
|
24592
24592
|
}
|
|
24593
|
-
var
|
|
24593
|
+
var Lc = {}, jp;
|
|
24594
24594
|
function zw() {
|
|
24595
|
-
if (jp) return
|
|
24596
|
-
jp = 1, Object.defineProperty(
|
|
24595
|
+
if (jp) return Lc;
|
|
24596
|
+
jp = 1, Object.defineProperty(Lc, "__esModule", { value: !0 });
|
|
24597
24597
|
const e = (r) => [...Array(r).keys()], t = (r) => r.length === 33 && [2, 3].includes(r[0]) || r.length === 65 && r[0] === 4;
|
|
24598
24598
|
function n(r, i = t) {
|
|
24599
24599
|
function s(f) {
|
|
@@ -24650,12 +24650,12 @@ function zw() {
|
|
|
24650
24650
|
canAddToArray: u
|
|
24651
24651
|
};
|
|
24652
24652
|
}
|
|
24653
|
-
return
|
|
24653
|
+
return Lc.makeConverter = n, Lc;
|
|
24654
24654
|
}
|
|
24655
|
-
var
|
|
24655
|
+
var $c = {}, Kp;
|
|
24656
24656
|
function wA() {
|
|
24657
|
-
if (Kp) return
|
|
24658
|
-
Kp = 1, Object.defineProperty(
|
|
24657
|
+
if (Kp) return $c;
|
|
24658
|
+
Kp = 1, Object.defineProperty($c, "__esModule", { value: !0 });
|
|
24659
24659
|
function e(t) {
|
|
24660
24660
|
return n;
|
|
24661
24661
|
function n(r) {
|
|
@@ -24667,12 +24667,12 @@ function wA() {
|
|
|
24667
24667
|
return i;
|
|
24668
24668
|
}
|
|
24669
24669
|
}
|
|
24670
|
-
return
|
|
24670
|
+
return $c.makeChecker = e, $c;
|
|
24671
24671
|
}
|
|
24672
|
-
var
|
|
24672
|
+
var Dc = {}, Gp;
|
|
24673
24673
|
function bA() {
|
|
24674
|
-
if (Gp) return
|
|
24675
|
-
Gp = 1, Object.defineProperty(
|
|
24674
|
+
if (Gp) return Dc;
|
|
24675
|
+
Gp = 1, Object.defineProperty(Dc, "__esModule", { value: !0 });
|
|
24676
24676
|
function e(t) {
|
|
24677
24677
|
function n(c) {
|
|
24678
24678
|
if (c.key[0] !== t)
|
|
@@ -24702,12 +24702,12 @@ function bA() {
|
|
|
24702
24702
|
canAdd: o
|
|
24703
24703
|
};
|
|
24704
24704
|
}
|
|
24705
|
-
return
|
|
24705
|
+
return Dc.makeConverter = e, Dc;
|
|
24706
24706
|
}
|
|
24707
|
-
var
|
|
24707
|
+
var jc = {}, Wp;
|
|
24708
24708
|
function EA() {
|
|
24709
|
-
if (Wp) return
|
|
24710
|
-
Wp = 1, Object.defineProperty(
|
|
24709
|
+
if (Wp) return jc;
|
|
24710
|
+
Wp = 1, Object.defineProperty(jc, "__esModule", { value: !0 });
|
|
24711
24711
|
const e = ts(), t = zw(), n = (i) => i.length === 32;
|
|
24712
24712
|
function r(i) {
|
|
24713
24713
|
const s = t.makeConverter(i, n);
|
|
@@ -24740,12 +24740,12 @@ function EA() {
|
|
|
24740
24740
|
canAddToArray: s.canAddToArray
|
|
24741
24741
|
};
|
|
24742
24742
|
}
|
|
24743
|
-
return
|
|
24743
|
+
return jc.makeConverter = r, jc;
|
|
24744
24744
|
}
|
|
24745
|
-
var
|
|
24745
|
+
var Kc = {}, Xp;
|
|
24746
24746
|
function _A() {
|
|
24747
|
-
if (Xp) return
|
|
24748
|
-
Xp = 1, Object.defineProperty(
|
|
24747
|
+
if (Xp) return Kc;
|
|
24748
|
+
Xp = 1, Object.defineProperty(Kc, "__esModule", { value: !0 });
|
|
24749
24749
|
function e(t) {
|
|
24750
24750
|
function n(c) {
|
|
24751
24751
|
if (c.key[0] !== t || c.key.length !== 1)
|
|
@@ -24776,12 +24776,12 @@ function _A() {
|
|
|
24776
24776
|
canAdd: o
|
|
24777
24777
|
};
|
|
24778
24778
|
}
|
|
24779
|
-
return
|
|
24779
|
+
return Kc.makeConverter = e, Kc;
|
|
24780
24780
|
}
|
|
24781
|
-
var
|
|
24781
|
+
var Gc = {}, zp;
|
|
24782
24782
|
function SA() {
|
|
24783
|
-
if (zp) return
|
|
24784
|
-
zp = 1, Object.defineProperty(
|
|
24783
|
+
if (zp) return Gc;
|
|
24784
|
+
zp = 1, Object.defineProperty(Gc, "__esModule", { value: !0 });
|
|
24785
24785
|
function e(t) {
|
|
24786
24786
|
function n(c) {
|
|
24787
24787
|
if (c.key[0] !== t)
|
|
@@ -24811,7 +24811,7 @@ function SA() {
|
|
|
24811
24811
|
canAdd: o
|
|
24812
24812
|
};
|
|
24813
24813
|
}
|
|
24814
|
-
return
|
|
24814
|
+
return Gc.makeConverter = e, Gc;
|
|
24815
24815
|
}
|
|
24816
24816
|
var Yp;
|
|
24817
24817
|
function vh() {
|
|
@@ -25223,8 +25223,8 @@ function Yw() {
|
|
|
25223
25223
|
}
|
|
25224
25224
|
var ey;
|
|
25225
25225
|
function AA() {
|
|
25226
|
-
if (ey) return
|
|
25227
|
-
ey = 1, Object.defineProperty(
|
|
25226
|
+
if (ey) return qc;
|
|
25227
|
+
ey = 1, Object.defineProperty(qc, "__esModule", { value: !0 });
|
|
25228
25228
|
const e = Yw();
|
|
25229
25229
|
function t(s) {
|
|
25230
25230
|
const o = s[0], c = e.psbtToKeyVals(o), a = s.slice(1);
|
|
@@ -25270,7 +25270,7 @@ function AA() {
|
|
|
25270
25270
|
outputKeyVals: c.outputKeyVals
|
|
25271
25271
|
});
|
|
25272
25272
|
}
|
|
25273
|
-
|
|
25273
|
+
qc.combine = t;
|
|
25274
25274
|
function n(s, o, c) {
|
|
25275
25275
|
return (a) => {
|
|
25276
25276
|
if (s.has(a)) return;
|
|
@@ -25290,7 +25290,7 @@ function AA() {
|
|
|
25290
25290
|
o.add(a);
|
|
25291
25291
|
}), o;
|
|
25292
25292
|
}
|
|
25293
|
-
return
|
|
25293
|
+
return qc;
|
|
25294
25294
|
}
|
|
25295
25295
|
var Pf = {}, ty;
|
|
25296
25296
|
function Zw() {
|
|
@@ -25394,8 +25394,8 @@ function Zw() {
|
|
|
25394
25394
|
}
|
|
25395
25395
|
var ny;
|
|
25396
25396
|
function vA() {
|
|
25397
|
-
if (ny) return
|
|
25398
|
-
ny = 1, Object.defineProperty(
|
|
25397
|
+
if (ny) return Mc;
|
|
25398
|
+
ny = 1, Object.defineProperty(Mc, "__esModule", { value: !0 });
|
|
25399
25399
|
const e = AA(), t = Yw(), n = Mt(), r = Zw();
|
|
25400
25400
|
class i {
|
|
25401
25401
|
constructor(o) {
|
|
@@ -25501,13 +25501,13 @@ function vA() {
|
|
|
25501
25501
|
return this.globalMap.unsignedTx.toBuffer();
|
|
25502
25502
|
}
|
|
25503
25503
|
}
|
|
25504
|
-
return
|
|
25504
|
+
return Mc.Psbt = i, Mc;
|
|
25505
25505
|
}
|
|
25506
25506
|
var Qe = {}, ze = {}, ry;
|
|
25507
25507
|
function dl() {
|
|
25508
25508
|
if (ry) return ze;
|
|
25509
25509
|
ry = 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;
|
|
25510
|
-
const e = ts(), t = nn(), n =
|
|
25510
|
+
const e = ts(), t = nn(), n = _c(), r = Pr(), i = Ec();
|
|
25511
25511
|
function s(y) {
|
|
25512
25512
|
return (g) => {
|
|
25513
25513
|
try {
|
|
@@ -25584,7 +25584,7 @@ var iy;
|
|
|
25584
25584
|
function IA() {
|
|
25585
25585
|
if (iy) return Qe;
|
|
25586
25586
|
iy = 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;
|
|
25587
|
-
const e = Xt(), t =
|
|
25587
|
+
const e = Xt(), t = _c(), n = dl(), r = Th(), i = Ec(), s = dl(), o = (x) => x.length === 32 ? x : x.slice(1, 33);
|
|
25588
25588
|
Qe.toXOnly = o;
|
|
25589
25589
|
function c(x, B, q) {
|
|
25590
25590
|
const N = P(
|
|
@@ -25808,7 +25808,7 @@ var sy;
|
|
|
25808
25808
|
function OA() {
|
|
25809
25809
|
if (sy) return go;
|
|
25810
25810
|
sy = 1, Object.defineProperty(go, "__esModule", { value: !0 }), go.Psbt = void 0;
|
|
25811
|
-
const e = vA(), t = ts(), n = Zw(), r = xh(), i = Eu(), s = Wn(), o =
|
|
25811
|
+
const e = vA(), t = ts(), n = Zw(), r = xh(), i = Eu(), s = Wn(), o = Ec(), c = Th(), a = nn(), u = _c(), f = IA(), l = dl(), d = {
|
|
25812
25812
|
/**
|
|
25813
25813
|
* A bitcoinjs Network object. This is only used if you pass an `address`
|
|
25814
25814
|
* parameter to addOutput. Otherwise it is not needed and can be left default.
|
|
@@ -27017,7 +27017,7 @@ function BA() {
|
|
|
27017
27017
|
e.crypto = n;
|
|
27018
27018
|
const r = Wn();
|
|
27019
27019
|
e.networks = r;
|
|
27020
|
-
const i =
|
|
27020
|
+
const i = Ec();
|
|
27021
27021
|
e.payments = i;
|
|
27022
27022
|
const s = nn();
|
|
27023
27023
|
e.script = s;
|
|
@@ -27042,7 +27042,7 @@ function BA() {
|
|
|
27042
27042
|
return a.OPS;
|
|
27043
27043
|
}
|
|
27044
27044
|
});
|
|
27045
|
-
var u =
|
|
27045
|
+
var u = _c();
|
|
27046
27046
|
Object.defineProperty(e, "Transaction", {
|
|
27047
27047
|
enumerable: !0,
|
|
27048
27048
|
get: function() {
|
|
@@ -27702,7 +27702,7 @@ function UA() {
|
|
|
27702
27702
|
})(bi)), bi;
|
|
27703
27703
|
}
|
|
27704
27704
|
var fs = UA();
|
|
27705
|
-
function
|
|
27705
|
+
function bo(e) {
|
|
27706
27706
|
if (e.length % 2 !== 0)
|
|
27707
27707
|
throw new Error("Hex string must have even length");
|
|
27708
27708
|
const t = new Uint8Array(e.length / 2);
|
|
@@ -27714,9 +27714,9 @@ function Ih(e) {
|
|
|
27714
27714
|
return Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("");
|
|
27715
27715
|
}
|
|
27716
27716
|
function Oh(e) {
|
|
27717
|
-
return e ===
|
|
27717
|
+
return e === Bo.Mainnet ? Pn : Fy;
|
|
27718
27718
|
}
|
|
27719
|
-
function Bh(e, t =
|
|
27719
|
+
function Bh(e, t = Bo.Testnet) {
|
|
27720
27720
|
const n = Oh(t);
|
|
27721
27721
|
return Ag(e, n);
|
|
27722
27722
|
}
|
|
@@ -27755,7 +27755,7 @@ function CA(e, t, n) {
|
|
|
27755
27755
|
}
|
|
27756
27756
|
async function e1(e, t) {
|
|
27757
27757
|
try {
|
|
27758
|
-
const n = t ===
|
|
27758
|
+
const n = t === Bo.Mainnet ? "https://mpc.omnity.network/utxo-status" : "https://mpc.omnity.network/testnet4/utxo-status", r = await ht.post(n, e).then((c) => c.data);
|
|
27759
27759
|
if (!r)
|
|
27760
27760
|
return null;
|
|
27761
27761
|
const i = JSON.stringify(r), o = new TextEncoder().encode(i);
|
|
@@ -27764,14 +27764,14 @@ async function e1(e, t) {
|
|
|
27764
27764
|
return null;
|
|
27765
27765
|
}
|
|
27766
27766
|
}
|
|
27767
|
-
const
|
|
27767
|
+
const aI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
27768
27768
|
__proto__: null,
|
|
27769
27769
|
bytesToHex: Ih,
|
|
27770
27770
|
formatPoolUtxo: CA,
|
|
27771
27771
|
getAddressType: si,
|
|
27772
27772
|
getScriptByAddress: Bh,
|
|
27773
27773
|
getUtxoProof: e1,
|
|
27774
|
-
hexToBytes:
|
|
27774
|
+
hexToBytes: bo,
|
|
27775
27775
|
toBitcoinNetwork: Oh
|
|
27776
27776
|
}, Symbol.toStringTag, { value: "Module" })), HA = "kqs64-paaaa-aaaar-qamza-cai", FA = "hvyp5-5yaaa-aaaao-qjxha-cai", Qr = BigInt(546), sn = "0:0", MA = "https://runescan-hasura-mainnet.omnity.network/v1/graphql", qA = "https://runescan-hasura-testnet.omnity.network/v1/graphql", py = {
|
|
27777
27777
|
P2PKH: 148,
|
|
@@ -27824,20 +27824,23 @@ class ki {
|
|
|
27824
27824
|
const { address: n } = t;
|
|
27825
27825
|
if (si(n) === on.P2TR) {
|
|
27826
27826
|
let i = t.pubkey;
|
|
27827
|
-
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
else
|
|
27831
|
-
throw new Error("No pubkey found in P2TR UTXO");
|
|
27832
|
-
const s = i.length === 66 ? i.slice(2) : i;
|
|
27833
|
-
this.psbt.data.addInput({
|
|
27827
|
+
i || t.address === this.config.address && this.config.publicKey && (i = this.config.publicKey);
|
|
27828
|
+
const s = i ? i.length === 66 ? i.slice(2) : i : void 0;
|
|
27829
|
+
s ? this.psbt.data.addInput({
|
|
27834
27830
|
hash: t.txid,
|
|
27835
27831
|
index: t.vout,
|
|
27836
27832
|
witnessUtxo: {
|
|
27837
27833
|
value: BigInt(t.satoshis),
|
|
27838
|
-
script:
|
|
27834
|
+
script: bo(t.scriptPk)
|
|
27839
27835
|
},
|
|
27840
|
-
|
|
27836
|
+
xpubkey: bo(s)
|
|
27837
|
+
}) : this.psbt.data.addInput({
|
|
27838
|
+
hash: t.txid,
|
|
27839
|
+
index: t.vout,
|
|
27840
|
+
witnessUtxo: {
|
|
27841
|
+
value: BigInt(t.satoshis),
|
|
27842
|
+
script: bo(t.scriptPk)
|
|
27843
|
+
}
|
|
27841
27844
|
});
|
|
27842
27845
|
} else
|
|
27843
27846
|
this.psbt.data.addInput({
|
|
@@ -27845,7 +27848,7 @@ class ki {
|
|
|
27845
27848
|
index: t.vout,
|
|
27846
27849
|
witnessUtxo: {
|
|
27847
27850
|
value: BigInt(t.satoshis),
|
|
27848
|
-
script:
|
|
27851
|
+
script: bo(t.scriptPk)
|
|
27849
27852
|
}
|
|
27850
27853
|
});
|
|
27851
27854
|
this.inputAddressTypes.push(si(n)), this.inputUtxos.push(t), (n === this.config.address || n === this.config.paymentAddress) && t.runes.length !== 0 && (this.userInputUtxoDusts += BigInt(t.satoshis));
|
|
@@ -28817,7 +28820,7 @@ var Se;
|
|
|
28817
28820
|
function gl(e) {
|
|
28818
28821
|
return e === 9 || e === 32;
|
|
28819
28822
|
}
|
|
28820
|
-
function
|
|
28823
|
+
function jo(e) {
|
|
28821
28824
|
return e >= 48 && e <= 57;
|
|
28822
28825
|
}
|
|
28823
28826
|
function s1(e) {
|
|
@@ -28828,7 +28831,7 @@ function o1(e) {
|
|
|
28828
28831
|
return s1(e) || e === 95;
|
|
28829
28832
|
}
|
|
28830
28833
|
function ev(e) {
|
|
28831
|
-
return s1(e) ||
|
|
28834
|
+
return s1(e) || jo(e) || e === 95;
|
|
28832
28835
|
}
|
|
28833
28836
|
function tv(e) {
|
|
28834
28837
|
var t;
|
|
@@ -29021,7 +29024,7 @@ function ov(e, t) {
|
|
|
29021
29024
|
case 34:
|
|
29022
29025
|
return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? dv(e, i) : uv(e, i);
|
|
29023
29026
|
}
|
|
29024
|
-
if (
|
|
29027
|
+
if (jo(s) || s === 45)
|
|
29025
29028
|
return av(e, i, s);
|
|
29026
29029
|
if (o1(s))
|
|
29027
29030
|
return pv(e, i);
|
|
@@ -29059,7 +29062,7 @@ function av(e, t, n) {
|
|
|
29059
29062
|
const r = e.source.body;
|
|
29060
29063
|
let i = t, s = n, o = !1;
|
|
29061
29064
|
if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
|
|
29062
|
-
if (s = r.charCodeAt(++i),
|
|
29065
|
+
if (s = r.charCodeAt(++i), jo(s))
|
|
29063
29066
|
throw Nt(
|
|
29064
29067
|
e.source,
|
|
29065
29068
|
i,
|
|
@@ -29088,7 +29091,7 @@ function av(e, t, n) {
|
|
|
29088
29091
|
);
|
|
29089
29092
|
}
|
|
29090
29093
|
function Cf(e, t, n) {
|
|
29091
|
-
if (!
|
|
29094
|
+
if (!jo(n))
|
|
29092
29095
|
throw Nt(
|
|
29093
29096
|
e.source,
|
|
29094
29097
|
t,
|
|
@@ -29099,7 +29102,7 @@ function Cf(e, t, n) {
|
|
|
29099
29102
|
);
|
|
29100
29103
|
const r = e.source.body;
|
|
29101
29104
|
let i = t + 1;
|
|
29102
|
-
for (;
|
|
29105
|
+
for (; jo(r.charCodeAt(i)); )
|
|
29103
29106
|
++i;
|
|
29104
29107
|
return i;
|
|
29105
29108
|
}
|
|
@@ -29147,7 +29150,7 @@ function fv(e, t) {
|
|
|
29147
29150
|
size: i
|
|
29148
29151
|
};
|
|
29149
29152
|
}
|
|
29150
|
-
if (r = r << 4 |
|
|
29153
|
+
if (r = r << 4 | Eo(s), r < 0)
|
|
29151
29154
|
break;
|
|
29152
29155
|
}
|
|
29153
29156
|
throw Nt(
|
|
@@ -29181,9 +29184,9 @@ function lv(e, t) {
|
|
|
29181
29184
|
);
|
|
29182
29185
|
}
|
|
29183
29186
|
function _y(e, t) {
|
|
29184
|
-
return
|
|
29187
|
+
return Eo(e.charCodeAt(t)) << 12 | Eo(e.charCodeAt(t + 1)) << 8 | Eo(e.charCodeAt(t + 2)) << 4 | Eo(e.charCodeAt(t + 3));
|
|
29185
29188
|
}
|
|
29186
|
-
function
|
|
29189
|
+
function Eo(e) {
|
|
29187
29190
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
29188
29191
|
}
|
|
29189
29192
|
function hv(e, t) {
|
|
@@ -30123,7 +30126,7 @@ class Av {
|
|
|
30123
30126
|
throw Nt(
|
|
30124
30127
|
this._lexer.source,
|
|
30125
30128
|
this._lexer.token.start,
|
|
30126
|
-
`${
|
|
30129
|
+
`${Wc(
|
|
30127
30130
|
this._lexer.token
|
|
30128
30131
|
)} is reserved and cannot be used for an enum value.`
|
|
30129
30132
|
);
|
|
@@ -30416,7 +30419,7 @@ class Av {
|
|
|
30416
30419
|
throw Nt(
|
|
30417
30420
|
this._lexer.source,
|
|
30418
30421
|
n.start,
|
|
30419
|
-
`Expected ${l1(t)}, found ${
|
|
30422
|
+
`Expected ${l1(t)}, found ${Wc(n)}.`
|
|
30420
30423
|
);
|
|
30421
30424
|
}
|
|
30422
30425
|
/**
|
|
@@ -30438,7 +30441,7 @@ class Av {
|
|
|
30438
30441
|
throw Nt(
|
|
30439
30442
|
this._lexer.source,
|
|
30440
30443
|
n.start,
|
|
30441
|
-
`Expected "${t}", found ${
|
|
30444
|
+
`Expected "${t}", found ${Wc(n)}.`
|
|
30442
30445
|
);
|
|
30443
30446
|
}
|
|
30444
30447
|
/**
|
|
@@ -30457,7 +30460,7 @@ class Av {
|
|
|
30457
30460
|
return Nt(
|
|
30458
30461
|
this._lexer.source,
|
|
30459
30462
|
n.start,
|
|
30460
|
-
`Unexpected ${
|
|
30463
|
+
`Unexpected ${Wc(n)}.`
|
|
30461
30464
|
);
|
|
30462
30465
|
}
|
|
30463
30466
|
/**
|
|
@@ -30524,7 +30527,7 @@ class Av {
|
|
|
30524
30527
|
);
|
|
30525
30528
|
}
|
|
30526
30529
|
}
|
|
30527
|
-
function
|
|
30530
|
+
function Wc(e) {
|
|
30528
30531
|
const t = e.value;
|
|
30529
30532
|
return l1(e.kind) + (t != null ? ` "${t}"` : "");
|
|
30530
30533
|
}
|
|
@@ -31560,13 +31563,13 @@ se.logarithm = se.log = function(e) {
|
|
|
31560
31563
|
for (i = n[0]; i % 10 === 0; ) i /= 10;
|
|
31561
31564
|
s = i !== 1;
|
|
31562
31565
|
}
|
|
31563
|
-
if (ve = !1, c = l + y, o = oi(u, c), r = t ? qa(f, c + 10) : oi(e, c), a = Ze(o, r, c, 1),
|
|
31566
|
+
if (ve = !1, c = l + y, o = oi(u, c), r = t ? qa(f, c + 10) : oi(e, c), a = Ze(o, r, c, 1), Ko(a.d, i = l, d))
|
|
31564
31567
|
do
|
|
31565
31568
|
if (c += 10, o = oi(u, c), r = t ? qa(f, c + 10) : oi(e, c), a = Ze(o, r, c, 1), !s) {
|
|
31566
31569
|
+Ht(a.d).slice(i + 1, i + 15) + 1 == 1e14 && (a = be(a, l + 1, 0));
|
|
31567
31570
|
break;
|
|
31568
31571
|
}
|
|
31569
|
-
while (
|
|
31572
|
+
while (Ko(a.d, i += 10, d));
|
|
31570
31573
|
return ve = !0, be(a, l, d);
|
|
31571
31574
|
};
|
|
31572
31575
|
se.minus = se.sub = function(e) {
|
|
@@ -31744,7 +31747,7 @@ se.toPower = se.pow = function(e) {
|
|
|
31744
31747
|
if ((e.d[t] & 1) == 0 && (o = 1), c.e == 0 && c.d[0] == 1 && c.d.length == 1)
|
|
31745
31748
|
return c.s = o, c;
|
|
31746
31749
|
}
|
|
31747
|
-
return n = xt(+c, u), t = n == 0 || !isFinite(n) ? Wt(u * (Math.log("0." + Ht(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 = Sl(e.times(oi(c, r + n)), r), i.d && (i = be(i, r + 5, 1),
|
|
31750
|
+
return n = xt(+c, u), t = n == 0 || !isFinite(n) ? Wt(u * (Math.log("0." + Ht(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 = Sl(e.times(oi(c, r + n)), r), i.d && (i = be(i, r + 5, 1), Ko(i.d, r, s) && (t = r + 10, i = be(Sl(e.times(oi(c, t + n)), t), t + 5, 1), +Ht(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));
|
|
31748
31751
|
};
|
|
31749
31752
|
se.toPrecision = function(e, t) {
|
|
31750
31753
|
var n, r = this, i = r.constructor;
|
|
@@ -31780,7 +31783,7 @@ function gn(e, t, n) {
|
|
|
31780
31783
|
if (e !== ~~e || e < t || e > n)
|
|
31781
31784
|
throw Error(hi + e);
|
|
31782
31785
|
}
|
|
31783
|
-
function
|
|
31786
|
+
function Ko(e, t, n, r) {
|
|
31784
31787
|
var i, s, o, c;
|
|
31785
31788
|
for (s = e[0]; s >= 10; s /= 10) --t;
|
|
31786
31789
|
return --t < 0 ? (t += _e, i = 0) : (i = Math.ceil((t + 1) / _e), t %= _e), s = xt(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) == xt(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) == xt(10, t - 3) - 1, o;
|
|
@@ -31964,7 +31967,7 @@ function Sl(e, t) {
|
|
|
31964
31967
|
if (s = be(s.times(e), a, 1), n = n.times(++f), c = o.plus(Ze(s, n, a, 1)), Ht(c.d).slice(0, a) === Ht(o.d).slice(0, a)) {
|
|
31965
31968
|
for (i = l; i--; ) o = be(o.times(o), a, 1);
|
|
31966
31969
|
if (t == null)
|
|
31967
|
-
if (u < 3 &&
|
|
31970
|
+
if (u < 3 && Ko(o.d, a - r, y, u))
|
|
31968
31971
|
d.precision = a += 10, n = s = c = new d(1), f = 0, u++;
|
|
31969
31972
|
else
|
|
31970
31973
|
return be(o, d.precision = g, y, ve = !0);
|
|
@@ -31987,7 +31990,7 @@ function oi(e, t) {
|
|
|
31987
31990
|
for (l = m, a = o = m = Ze(m.minus(1), m.plus(1), f, 1), d = be(m.times(m), f, 1), i = 3; ; ) {
|
|
31988
31991
|
if (o = be(o.times(d), f, 1), u = a.plus(Ze(o, new _(i), f, 1)), Ht(u.d).slice(0, f) === Ht(a.d).slice(0, f))
|
|
31989
31992
|
if (a = a.times(2), s !== 0 && (a = a.plus(qa(_, f + 2, w).times(s + ""))), a = Ze(a, new _(y), f, 1), t == null)
|
|
31990
|
-
if (
|
|
31993
|
+
if (Ko(a.d, f - g, S, c))
|
|
31991
31994
|
_.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;
|
|
31992
31995
|
else
|
|
31993
31996
|
return be(a, _.precision = w, S, ve = !0);
|
|
@@ -32707,7 +32710,7 @@ const V6 = ({ IDL: e }) => {
|
|
|
32707
32710
|
version: e.Func([], [e.Text], ["query"])
|
|
32708
32711
|
});
|
|
32709
32712
|
};
|
|
32710
|
-
class
|
|
32713
|
+
class uI {
|
|
32711
32714
|
/** Maestro API client for Bitcoin data */
|
|
32712
32715
|
maestro;
|
|
32713
32716
|
/** Configuration object */
|
|
@@ -32722,7 +32725,7 @@ class u4 {
|
|
|
32722
32725
|
*/
|
|
32723
32726
|
constructor(t) {
|
|
32724
32727
|
this.config = t;
|
|
32725
|
-
const n = t.network ===
|
|
32728
|
+
const n = t.network === Bo.Testnet, r = n ? "https://xbt-testnet.gomaestro-api.org/v0" : "https://xbt-mainnet.gomaestro-api.org/v0";
|
|
32726
32729
|
this.maestro = new QT({
|
|
32727
32730
|
baseUrl: r,
|
|
32728
32731
|
apiKey: t.maestroApiKey
|
|
@@ -32892,7 +32895,7 @@ class u4 {
|
|
|
32892
32895
|
* @returns Array of matching rune information
|
|
32893
32896
|
*/
|
|
32894
32897
|
async searchRunes(t) {
|
|
32895
|
-
const n = this.config.network ===
|
|
32898
|
+
const n = this.config.network === Bo.Testnet ? qA : MA, r = Gv`
|
|
32896
32899
|
query GetRunes($keyword: String!, $regex: String!) {
|
|
32897
32900
|
runes(
|
|
32898
32901
|
where: {
|
|
@@ -33030,8 +33033,8 @@ class u4 {
|
|
|
33030
33033
|
}
|
|
33031
33034
|
}
|
|
33032
33035
|
export {
|
|
33033
|
-
|
|
33034
|
-
|
|
33036
|
+
Bo as Network,
|
|
33037
|
+
uI as ReeClient,
|
|
33035
33038
|
ki as Transaction,
|
|
33036
|
-
|
|
33039
|
+
aI as utils
|
|
33037
33040
|
};
|