@omnisat/lasereyes 0.0.112 → 0.0.114
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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +636 -618
- package/dist/index.umd.cjs +29 -29
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -17,9 +17,9 @@ function kB(e, t) {
|
|
|
17
17
|
}
|
|
18
18
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
19
19
|
}
|
|
20
|
-
let
|
|
20
|
+
let a1 = Symbol("clean"), Qo = [], ls = 0;
|
|
21
21
|
const Yh = 4;
|
|
22
|
-
let
|
|
22
|
+
let s1 = (e) => {
|
|
23
23
|
let t = [], r = {
|
|
24
24
|
get() {
|
|
25
25
|
return r.lc || r.listen(() => {
|
|
@@ -67,7 +67,7 @@ let sb = (e) => {
|
|
|
67
67
|
},
|
|
68
68
|
value: e
|
|
69
69
|
};
|
|
70
|
-
return process.env.NODE_ENV !== "production" && (r[
|
|
70
|
+
return process.env.NODE_ENV !== "production" && (r[a1] = () => {
|
|
71
71
|
t = [], r.lc = 0, r.off();
|
|
72
72
|
}), r;
|
|
73
73
|
};
|
|
@@ -96,8 +96,8 @@ let AB = (e, t, r, n) => (e.events = e.events || {}, e.events[r + Jh] || (e.even
|
|
|
96
96
|
}
|
|
97
97
|
}, _B);
|
|
98
98
|
}, process.env.NODE_ENV !== "production") {
|
|
99
|
-
let i = e[
|
|
100
|
-
e[
|
|
99
|
+
let i = e[a1];
|
|
100
|
+
e[a1] = () => {
|
|
101
101
|
for (let a of e.events[Ju]) a();
|
|
102
102
|
e.events[Ju] = [], e.active = !1, i();
|
|
103
103
|
};
|
|
@@ -117,7 +117,7 @@ function zE(e, t, r) {
|
|
|
117
117
|
return r(e.value), n;
|
|
118
118
|
}
|
|
119
119
|
let q6 = (e = {}) => {
|
|
120
|
-
let t =
|
|
120
|
+
let t = s1(e);
|
|
121
121
|
return t.setKey = function(r, n) {
|
|
122
122
|
let o = t.value;
|
|
123
123
|
typeof n > "u" && r in t.value ? (t.value = { ...t.value }, delete t.value[r], t.notify(o, r)) : t.value[r] !== n && (t.value = {
|
|
@@ -126,7 +126,7 @@ let q6 = (e = {}) => {
|
|
|
126
126
|
}, t.notify(o, r));
|
|
127
127
|
}, t;
|
|
128
128
|
};
|
|
129
|
-
const Vc = "oyl", uc = "unisat", Pa = "xverse", dl = "phantom", Gc = "leather", ac = "magic-eden", hl = "okx", pl = "wizz", Dc = "orange", $B = "op_net", nd = "p2tr", TB = "p2pkh", IB = "p2sh-p2wpkh",
|
|
129
|
+
const Vc = "oyl", uc = "unisat", Pa = "xverse", dl = "phantom", Gc = "leather", ac = "magic-eden", hl = "okx", pl = "wizz", Dc = "orange", $B = "op_net", nd = "p2tr", TB = "p2pkh", IB = "p2sh-p2wpkh", c1 = "p2wpkh", qbe = "p2psh", PB = "p2wsh", M6 = "p2sh", Mbe = {
|
|
130
130
|
oyl: {
|
|
131
131
|
name: Vc,
|
|
132
132
|
icon: "data:image/svg+xml,%3Csvg%20width%3D%2296%22%20height%3D%2216%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M17.27.318c2.947%200%205.72.26%208.32.78%202.6.507%204.714%201.307%206.34%202.4%201.64%201.094%202.46%202.467%202.46%204.12%200%201.654-.82%203.047-2.46%204.18-1.64%201.12-3.766%201.954-6.38%202.5-2.6.547-5.36.82-8.28.82-2.946%200-5.72-.253-8.32-.76-2.6-.52-4.72-1.326-6.36-2.42C.964%2010.845.15%209.472.15%207.818c0-1.653.82-3.04%202.46-4.16%201.64-1.133%203.76-1.973%206.36-2.52%202.614-.546%205.38-.82%208.3-.82Zm.04%2011.96c1.4%200%202.8-.146%204.2-.44%201.414-.293%202.6-.78%203.56-1.46.96-.68%201.44-1.566%201.44-2.66%200-1.093-.48-1.98-1.44-2.66-.96-.68-2.146-1.166-3.56-1.46-1.4-.293-2.8-.44-4.2-.44h-.08c-1.4%200-2.806.147-4.22.44-1.4.294-2.58.78-3.54%201.46-.96.68-1.44%201.567-1.44%202.66%200%201.094.48%201.98%201.44%202.66.96.68%202.14%201.167%203.54%201.46%201.414.294%202.82.44%204.22.44h.08ZM61.293.758c.08-.026.14-.04.18-.04h8.24c.12%200%20.214.04.28.12.08.08.12.174.12.28%200%20.147-.066.26-.2.34l-14%207.7c-.133.067-.2.18-.2.34v4.82c0%20.107-.04.2-.12.28a.384.384%200%200%201-.28.12h-6.94c-.106%200-.2-.04-.28-.12a.384.384%200%200%201-.12-.28v-4.82c0-.16-.066-.273-.2-.34l-13.98-7.7a.376.376%200%200%201-.2-.34c0-.106.034-.2.1-.28.067-.08.16-.12.28-.12h8.24c.054%200%20.12.014.2.04l9.24%205.1c.08.027.147.04.2.04.04%200%20.1-.013.18-.04l9.26-5.1Zm11.232.36c0-.106.033-.2.1-.28.08-.08.173-.12.28-.12h6.84c.106%200%20.193.04.26.12.08.08.12.174.12.28v10.32c0%20.107.04.2.12.28.08.08.173.12.28.12h14.46c.106%200%20.193.04.26.12.08.08.12.174.12.28v2.08c0%20.107-.04.2-.12.28a.322.322%200%200%201-.26.12h-22.08c-.107%200-.2-.04-.28-.12a.424.424%200%200%201-.1-.28v-13.2Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E",
|
|
@@ -809,11 +809,11 @@ function zg(e, t) {
|
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function u1(e, ...t) {
|
|
813
813
|
const r = {
|
|
814
814
|
kind: "schema",
|
|
815
815
|
type: "nullable",
|
|
816
|
-
reference:
|
|
816
|
+
reference: u1,
|
|
817
817
|
expects: `(${e.expects} | null)`,
|
|
818
818
|
async: !1,
|
|
819
819
|
wrapped: e,
|
|
@@ -3049,7 +3049,7 @@ const id = {};
|
|
|
3049
3049
|
function bk(e) {
|
|
3050
3050
|
e ? e !== id.eccLib && (RU(e), id.eccLib = e) : id.eccLib = e;
|
|
3051
3051
|
}
|
|
3052
|
-
function
|
|
3052
|
+
function l1() {
|
|
3053
3053
|
if (!id.eccLib)
|
|
3054
3054
|
throw new Error(
|
|
3055
3055
|
"No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance"
|
|
@@ -3362,7 +3362,7 @@ let qn = class kk {
|
|
|
3362
3362
|
}
|
|
3363
3363
|
};
|
|
3364
3364
|
const xk = 192, JU = 128, QU = (e) => "left" in e && "right" in e;
|
|
3365
|
-
function
|
|
3365
|
+
function f1(e, t) {
|
|
3366
3366
|
if (e.length < 33)
|
|
3367
3367
|
throw new TypeError(
|
|
3368
3368
|
`The control-block length is too small. Got ${e.length}, expected min 33.`
|
|
@@ -3371,17 +3371,17 @@ function fb(e, t) {
|
|
|
3371
3371
|
let n = t;
|
|
3372
3372
|
for (let o = 0; o < r; o++) {
|
|
3373
3373
|
const i = e.slice(33 + 32 * o, 65 + 32 * o);
|
|
3374
|
-
ge(n, i) < 0 ? n =
|
|
3374
|
+
ge(n, i) < 0 ? n = h1(n, i) : n = h1(i, n);
|
|
3375
3375
|
}
|
|
3376
3376
|
return n;
|
|
3377
3377
|
}
|
|
3378
|
-
function
|
|
3378
|
+
function d1(e) {
|
|
3379
3379
|
if (vv(e)) return { hash: za(e) };
|
|
3380
|
-
const t = [
|
|
3380
|
+
const t = [d1(e[0]), d1(e[1])];
|
|
3381
3381
|
t.sort((o, i) => ge(o.hash, i.hash));
|
|
3382
3382
|
const [r, n] = t;
|
|
3383
3383
|
return {
|
|
3384
|
-
hash:
|
|
3384
|
+
hash: h1(r.hash, n.hash),
|
|
3385
3385
|
left: r,
|
|
3386
3386
|
right: n
|
|
3387
3387
|
};
|
|
@@ -3410,13 +3410,13 @@ function eC(e, t) {
|
|
|
3410
3410
|
}
|
|
3411
3411
|
function np(e, t) {
|
|
3412
3412
|
if (!(e instanceof Uint8Array) || e.length !== 32 || t && t.length !== 32) return null;
|
|
3413
|
-
const r = eC(e, t), n =
|
|
3413
|
+
const r = eC(e, t), n = l1().xOnlyPointAddTweak(e, r);
|
|
3414
3414
|
return !n || n.xOnlyPubkey === null ? null : {
|
|
3415
3415
|
parity: n.parity,
|
|
3416
3416
|
x: Uint8Array.from(n.xOnlyPubkey)
|
|
3417
3417
|
};
|
|
3418
3418
|
}
|
|
3419
|
-
function
|
|
3419
|
+
function h1(e, t) {
|
|
3420
3420
|
return Hg("TapBranch", pr([e, t]));
|
|
3421
3421
|
}
|
|
3422
3422
|
function tC(e) {
|
|
@@ -3463,7 +3463,7 @@ function hh(e, t) {
|
|
|
3463
3463
|
if (!(!e.witness || !e.witness.length))
|
|
3464
3464
|
return e.witness.length >= 2 && e.witness[e.witness.length - 1][0] === rC ? e.witness.slice(0, -1) : e.witness.slice();
|
|
3465
3465
|
}), o = Ko(() => {
|
|
3466
|
-
if (e.scriptTree) return
|
|
3466
|
+
if (e.scriptTree) return d1(e.scriptTree);
|
|
3467
3467
|
if (e.hash) return { hash: e.hash };
|
|
3468
3468
|
}), i = e.network || Xo, a = { name: "p2tr", network: i };
|
|
3469
3469
|
if (Re(a, "address", () => {
|
|
@@ -3476,7 +3476,7 @@ function hh(e, t) {
|
|
|
3476
3476
|
const c = n();
|
|
3477
3477
|
if (c && c.length > 1) {
|
|
3478
3478
|
const l = c[c.length - 1], u = l[0] & Hp, f = c[c.length - 2], h = za({ output: f, version: u });
|
|
3479
|
-
return
|
|
3479
|
+
return f1(l, h);
|
|
3480
3480
|
}
|
|
3481
3481
|
return null;
|
|
3482
3482
|
}), Re(a, "output", () => {
|
|
@@ -3557,7 +3557,7 @@ function hh(e, t) {
|
|
|
3557
3557
|
throw new TypeError("Pubkey mismatch");
|
|
3558
3558
|
s = u.x;
|
|
3559
3559
|
}
|
|
3560
|
-
if (s && s.length && !
|
|
3560
|
+
if (s && s.length && !l1().isXOnlyPoint(s))
|
|
3561
3561
|
throw new TypeError("Invalid pubkey for p2tr");
|
|
3562
3562
|
const c = o();
|
|
3563
3563
|
if (e.hash && c && ge(e.hash, c.hash) !== 0)
|
|
@@ -3605,9 +3605,9 @@ function hh(e, t) {
|
|
|
3605
3605
|
const h = u.slice(1, 33);
|
|
3606
3606
|
if (e.internalPubkey && ge(e.internalPubkey, h) !== 0)
|
|
3607
3607
|
throw new TypeError("Internal pubkey mismatch");
|
|
3608
|
-
if (!
|
|
3608
|
+
if (!l1().isXOnlyPoint(h))
|
|
3609
3609
|
throw new TypeError("Invalid internalPubkey for p2tr witness");
|
|
3610
|
-
const g = u[0] & Hp, y = l[l.length - 2], m = za({ output: y, version: g }), w =
|
|
3610
|
+
const g = u[0] & Hp, y = l[l.length - 2], m = za({ output: y, version: g }), w = f1(u, m), v = np(h, w);
|
|
3611
3611
|
if (!v)
|
|
3612
3612
|
throw new TypeError("Invalid outputKey for p2tr witness");
|
|
3613
3613
|
if (s.length && ge(s, v.x) !== 0)
|
|
@@ -3794,8 +3794,8 @@ const ti = class Wt {
|
|
|
3794
3794
|
Fi([
|
|
3795
3795
|
DE,
|
|
3796
3796
|
Sa,
|
|
3797
|
-
|
|
3798
|
-
|
|
3797
|
+
u1(o0(Sa)),
|
|
3798
|
+
u1(o0(Ht))
|
|
3799
3799
|
]),
|
|
3800
3800
|
[t, r, n, o]
|
|
3801
3801
|
), n == null && (n = Wt.DEFAULT_SEQUENCE), this.ins.push({
|
|
@@ -4950,7 +4950,7 @@ function zk(e, { globalMapKeyVals: t, inputKeyVals: r, outputKeyVals: n }) {
|
|
|
4950
4950
|
return { globalMap: o, inputs: c, outputs: l };
|
|
4951
4951
|
}
|
|
4952
4952
|
function DN({ globalMap: e, inputs: t, outputs: r }) {
|
|
4953
|
-
const { globalKeyVals: n, inputKeyVals: o, outputKeyVals: i } =
|
|
4953
|
+
const { globalKeyVals: n, inputKeyVals: o, outputKeyVals: i } = p1({
|
|
4954
4954
|
globalMap: e,
|
|
4955
4955
|
inputs: t,
|
|
4956
4956
|
outputs: r
|
|
@@ -4976,7 +4976,7 @@ function Hy(e, t) {
|
|
|
4976
4976
|
}, []), o = e.unknownKeyVals ? e.unknownKeyVals.filter((i) => !r.has(Ge(i.key))) : [];
|
|
4977
4977
|
return n.concat(o).sort(KN);
|
|
4978
4978
|
}
|
|
4979
|
-
function
|
|
4979
|
+
function p1({ globalMap: e, inputs: t, outputs: r }) {
|
|
4980
4980
|
return {
|
|
4981
4981
|
globalKeyVals: Hy(e, Cv),
|
|
4982
4982
|
inputKeyVals: t.map((n) => Hy(n, Hr)),
|
|
@@ -4984,7 +4984,7 @@ function pb({ globalMap: e, inputs: t, outputs: r }) {
|
|
|
4984
4984
|
};
|
|
4985
4985
|
}
|
|
4986
4986
|
function qN(e) {
|
|
4987
|
-
const t = e[0], r =
|
|
4987
|
+
const t = e[0], r = p1(t), n = e.slice(1);
|
|
4988
4988
|
if (n.length === 0) throw new Error("Combine: Nothing to combine");
|
|
4989
4989
|
const o = a4(t);
|
|
4990
4990
|
if (o === void 0)
|
|
@@ -4996,7 +4996,7 @@ function qN(e) {
|
|
|
4996
4996
|
throw new Error(
|
|
4997
4997
|
"Combine: One of the Psbts does not have the same transaction."
|
|
4998
4998
|
);
|
|
4999
|
-
const u =
|
|
4999
|
+
const u = p1(c);
|
|
5000
5000
|
el(u.globalKeyVals).forEach(
|
|
5001
5001
|
Dy(
|
|
5002
5002
|
i,
|
|
@@ -5362,10 +5362,10 @@ function aj(e) {
|
|
|
5362
5362
|
function sj(e) {
|
|
5363
5363
|
let t;
|
|
5364
5364
|
for (const r of e)
|
|
5365
|
-
if (t =
|
|
5365
|
+
if (t = g1(r, t), !t) throw new Error("No room left to insert tapleaf in tree");
|
|
5366
5366
|
return t;
|
|
5367
5367
|
}
|
|
5368
|
-
function
|
|
5368
|
+
function g1(e, t, r = 0) {
|
|
5369
5369
|
if (r > JU) throw new Error("Max taptree depth exceeded.");
|
|
5370
5370
|
if (e.depth === r)
|
|
5371
5371
|
return t ? void 0 : {
|
|
@@ -5373,9 +5373,9 @@ function gb(e, t, r = 0) {
|
|
|
5373
5373
|
version: e.leafVersion
|
|
5374
5374
|
};
|
|
5375
5375
|
if (vv(t)) return;
|
|
5376
|
-
const n =
|
|
5376
|
+
const n = g1(e, t && t[0], r + 1);
|
|
5377
5377
|
if (n) return [n, t && t[1]];
|
|
5378
|
-
const o =
|
|
5378
|
+
const o = g1(e, t && t[1], r + 1);
|
|
5379
5379
|
if (o) return [t && t[0], o];
|
|
5380
5380
|
}
|
|
5381
5381
|
function cj(e, t, r) {
|
|
@@ -5415,7 +5415,7 @@ function Fy(e, t) {
|
|
|
5415
5415
|
const r = za({
|
|
5416
5416
|
output: e.script,
|
|
5417
5417
|
version: e.leafVersion
|
|
5418
|
-
}), n =
|
|
5418
|
+
}), n = f1(e.controlBlock, r);
|
|
5419
5419
|
return ge(n, t) === 0;
|
|
5420
5420
|
}
|
|
5421
5421
|
function fj(e, t) {
|
|
@@ -5471,7 +5471,7 @@ const gj = {
|
|
|
5471
5471
|
maximumFeeRate: 5e3
|
|
5472
5472
|
// satoshi per byte
|
|
5473
5473
|
};
|
|
5474
|
-
let Wr = class
|
|
5474
|
+
let Wr = class m1 {
|
|
5475
5475
|
constructor(t = {}, r = new c4(new Mk())) {
|
|
5476
5476
|
$e(this, "data"), $e(this, "__CACHE"), $e(this, "opts"), this.data = r, this.opts = Object.assign({}, gj, t), this.__CACHE = {
|
|
5477
5477
|
__NON_WITNESS_UTXO_TX_CACHE: [],
|
|
@@ -5503,7 +5503,7 @@ let Wr = class mb {
|
|
|
5503
5503
|
return this.fromBuffer(n, r);
|
|
5504
5504
|
}
|
|
5505
5505
|
static fromBuffer(t, r = {}) {
|
|
5506
|
-
const n = c4.fromBuffer(t, mj), o = new
|
|
5506
|
+
const n = c4.fromBuffer(t, mj), o = new m1(r, n);
|
|
5507
5507
|
return Ej(o.__CACHE.__TX, o.__CACHE), o;
|
|
5508
5508
|
}
|
|
5509
5509
|
get inputCount() {
|
|
@@ -5546,7 +5546,7 @@ let Wr = class mb {
|
|
|
5546
5546
|
return this.data.combine(...t.map((r) => r.data)), this;
|
|
5547
5547
|
}
|
|
5548
5548
|
clone() {
|
|
5549
|
-
const t =
|
|
5549
|
+
const t = m1.fromBuffer(this.data.toBuffer());
|
|
5550
5550
|
return t.opts = JSON.parse(JSON.stringify(this.opts)), t;
|
|
5551
5551
|
}
|
|
5552
5552
|
setMaximumFeeRate(t) {
|
|
@@ -5583,7 +5583,7 @@ let Wr = class mb {
|
|
|
5583
5583
|
const n = r.__TX.ins[r.__TX.ins.length - 1];
|
|
5584
5584
|
Gk(r, n);
|
|
5585
5585
|
const o = this.data.inputs.length - 1, i = this.data.inputs[o];
|
|
5586
|
-
return i.nonWitnessUtxo &&
|
|
5586
|
+
return i.nonWitnessUtxo && b1(this.__CACHE, i, o), r.__FEE = void 0, r.__FEE_RATE = void 0, r.__EXTRACTED_TX = void 0, this;
|
|
5587
5587
|
}
|
|
5588
5588
|
addOutputs(t) {
|
|
5589
5589
|
return t.forEach((r) => this.addOutput(r)), this;
|
|
@@ -5752,7 +5752,7 @@ let Wr = class mb {
|
|
|
5752
5752
|
if (typeof r != "function")
|
|
5753
5753
|
throw new Error("Need validator function to validate signatures");
|
|
5754
5754
|
n = n && ad(n);
|
|
5755
|
-
const s = n ?
|
|
5755
|
+
const s = n ? y1(
|
|
5756
5756
|
t,
|
|
5757
5757
|
o,
|
|
5758
5758
|
this.data.inputs,
|
|
@@ -6032,7 +6032,7 @@ let Wr = class mb {
|
|
|
6032
6032
|
throw new Error(
|
|
6033
6033
|
`Need Schnorr Signer to sign taproot input #${t}.`
|
|
6034
6034
|
);
|
|
6035
|
-
const a =
|
|
6035
|
+
const a = y1(
|
|
6036
6036
|
t,
|
|
6037
6037
|
r,
|
|
6038
6038
|
this.data.inputs,
|
|
@@ -6064,7 +6064,7 @@ let Wr = class mb {
|
|
|
6064
6064
|
this.data.inputs[t],
|
|
6065
6065
|
r,
|
|
6066
6066
|
"updateInput"
|
|
6067
|
-
), this.data.updateInput(t, r), r.nonWitnessUtxo &&
|
|
6067
|
+
), this.data.updateInput(t, r), r.nonWitnessUtxo && b1(
|
|
6068
6068
|
this.__CACHE,
|
|
6069
6069
|
this.data.inputs[t],
|
|
6070
6070
|
t
|
|
@@ -6333,7 +6333,7 @@ function Aj(e, t, r, n) {
|
|
|
6333
6333
|
o.push(...i);
|
|
6334
6334
|
}
|
|
6335
6335
|
return o.map(
|
|
6336
|
-
(i) =>
|
|
6336
|
+
(i) => y1(e, t, r, i, n)
|
|
6337
6337
|
).flat();
|
|
6338
6338
|
}
|
|
6339
6339
|
function Xk(e, t, r) {
|
|
@@ -6343,7 +6343,7 @@ function Xk(e, t, r) {
|
|
|
6343
6343
|
function w4(e) {
|
|
6344
6344
|
return e.length === 64 ? e : e.subarray(0, 64);
|
|
6345
6345
|
}
|
|
6346
|
-
function
|
|
6346
|
+
function y1(e, t, r, n, o, i, a) {
|
|
6347
6347
|
const s = o.__TX, c = t.sighashType || _r.SIGHASH_DEFAULT;
|
|
6348
6348
|
Yk(c, a);
|
|
6349
6349
|
const l = r.map(
|
|
@@ -6503,7 +6503,7 @@ function Tj(e) {
|
|
|
6503
6503
|
}
|
|
6504
6504
|
return t;
|
|
6505
6505
|
}
|
|
6506
|
-
function
|
|
6506
|
+
function b1(e, t, r) {
|
|
6507
6507
|
e.__NON_WITNESS_UTXO_BUF_CACHE[r] = t.nonWitnessUtxo;
|
|
6508
6508
|
const n = _r.fromBuffer(t.nonWitnessUtxo);
|
|
6509
6509
|
e.__NON_WITNESS_UTXO_TX_CACHE[r] = n;
|
|
@@ -6544,7 +6544,7 @@ function Qk(e, t, r, n) {
|
|
|
6544
6544
|
}
|
|
6545
6545
|
function qg(e, t, r) {
|
|
6546
6546
|
const n = e.__NON_WITNESS_UTXO_TX_CACHE;
|
|
6547
|
-
return n[r] ||
|
|
6547
|
+
return n[r] || b1(e, t, r), n[r];
|
|
6548
6548
|
}
|
|
6549
6549
|
function ex(e, t, r) {
|
|
6550
6550
|
const { script: n } = jv(e, t, r);
|
|
@@ -6870,7 +6870,7 @@ function mh(e, t, r = {}) {
|
|
|
6870
6870
|
const qj = () => {
|
|
6871
6871
|
throw new Error("not implemented");
|
|
6872
6872
|
};
|
|
6873
|
-
function
|
|
6873
|
+
function w1(e) {
|
|
6874
6874
|
const t = /* @__PURE__ */ new WeakMap();
|
|
6875
6875
|
return (r, ...n) => {
|
|
6876
6876
|
const o = t.get(r);
|
|
@@ -6900,7 +6900,7 @@ const Mj = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6900
6900
|
hexToNumber: Lv,
|
|
6901
6901
|
inRange: Vg,
|
|
6902
6902
|
isBytes: yu,
|
|
6903
|
-
memoized:
|
|
6903
|
+
memoized: w1,
|
|
6904
6904
|
notImplemented: qj,
|
|
6905
6905
|
numberToBytesBE: Nl,
|
|
6906
6906
|
numberToBytesLE: Dv,
|
|
@@ -6910,7 +6910,7 @@ const Mj = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6910
6910
|
validateObject: mh
|
|
6911
6911
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6912
6912
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
6913
|
-
const nn = BigInt(0), $r = BigInt(1), Kc = BigInt(2), Fj = BigInt(3),
|
|
6913
|
+
const nn = BigInt(0), $r = BigInt(1), Kc = BigInt(2), Fj = BigInt(3), v1 = BigInt(4), x4 = BigInt(5), A4 = BigInt(8);
|
|
6914
6914
|
BigInt(9);
|
|
6915
6915
|
BigInt(16);
|
|
6916
6916
|
function Sn(e, t) {
|
|
@@ -6933,7 +6933,7 @@ function Uo(e, t, r) {
|
|
|
6933
6933
|
n *= n, n %= r;
|
|
6934
6934
|
return n;
|
|
6935
6935
|
}
|
|
6936
|
-
function
|
|
6936
|
+
function E1(e, t) {
|
|
6937
6937
|
if (e === nn || t <= nn)
|
|
6938
6938
|
throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);
|
|
6939
6939
|
let r = Sn(e, t), n = t, o = nn, i = $r;
|
|
@@ -6953,7 +6953,7 @@ function Gj(e) {
|
|
|
6953
6953
|
for (o = Kc; o < e && Vj(o, t, e) !== e - $r; o++)
|
|
6954
6954
|
;
|
|
6955
6955
|
if (n === 1) {
|
|
6956
|
-
const a = (e + $r) /
|
|
6956
|
+
const a = (e + $r) / v1;
|
|
6957
6957
|
return function(s, c) {
|
|
6958
6958
|
const l = s.pow(c, a);
|
|
6959
6959
|
if (!s.eql(s.sqr(l), c))
|
|
@@ -6979,8 +6979,8 @@ function Gj(e) {
|
|
|
6979
6979
|
};
|
|
6980
6980
|
}
|
|
6981
6981
|
function Zj(e) {
|
|
6982
|
-
if (e %
|
|
6983
|
-
const t = (e + $r) /
|
|
6982
|
+
if (e % v1 === Fj) {
|
|
6983
|
+
const t = (e + $r) / v1;
|
|
6984
6984
|
return function(r, n) {
|
|
6985
6985
|
const o = r.pow(n, t);
|
|
6986
6986
|
if (!r.eql(r.sqr(o), n))
|
|
@@ -7075,13 +7075,13 @@ function qv(e, t, r = !1, n = {}) {
|
|
|
7075
7075
|
sub: (c, l) => Sn(c - l, e),
|
|
7076
7076
|
mul: (c, l) => Sn(c * l, e),
|
|
7077
7077
|
pow: (c, l) => Yj(s, c, l),
|
|
7078
|
-
div: (c, l) => Sn(c *
|
|
7078
|
+
div: (c, l) => Sn(c * E1(l, e), e),
|
|
7079
7079
|
// Same as above, but doesn't normalize
|
|
7080
7080
|
sqrN: (c) => c * c,
|
|
7081
7081
|
addN: (c, l) => c + l,
|
|
7082
7082
|
subN: (c, l) => c - l,
|
|
7083
7083
|
mulN: (c, l) => c * l,
|
|
7084
|
-
inv: (c) =>
|
|
7084
|
+
inv: (c) => E1(c, e),
|
|
7085
7085
|
sqrt: n.sqrt || ((c) => a(s, c)),
|
|
7086
7086
|
invertBatch: (c) => Jj(s, c),
|
|
7087
7087
|
// TODO: do we really need constant cmov?
|
|
@@ -7392,7 +7392,7 @@ function az(e) {
|
|
|
7392
7392
|
if (!(m instanceof h))
|
|
7393
7393
|
throw new Error("ProjectivePoint expected");
|
|
7394
7394
|
}
|
|
7395
|
-
const u =
|
|
7395
|
+
const u = w1((m, w) => {
|
|
7396
7396
|
const { px: v, py: x, pz: E } = m;
|
|
7397
7397
|
if (r.eql(E, r.ONE))
|
|
7398
7398
|
return { x: v, y: x };
|
|
@@ -7404,7 +7404,7 @@ function az(e) {
|
|
|
7404
7404
|
if (!r.eql(j, r.ONE))
|
|
7405
7405
|
throw new Error("invZ was invalid");
|
|
7406
7406
|
return { x: O, y: T };
|
|
7407
|
-
}), f =
|
|
7407
|
+
}), f = w1((m) => {
|
|
7408
7408
|
if (m.is0()) {
|
|
7409
7409
|
if (t.allowInfinityPoint && !r.is0(m.py))
|
|
7410
7410
|
return;
|
|
@@ -7639,7 +7639,7 @@ function cz(e) {
|
|
|
7639
7639
|
return Sn(H, n);
|
|
7640
7640
|
}
|
|
7641
7641
|
function s(H) {
|
|
7642
|
-
return
|
|
7642
|
+
return E1(H, n);
|
|
7643
7643
|
}
|
|
7644
7644
|
const { ProjectivePoint: c, normPrivateKeyToScalar: l, weierstrassEquation: u, isWithinCurveOrder: f } = az({
|
|
7645
7645
|
...t,
|
|
@@ -7876,19 +7876,19 @@ function lz(e, t) {
|
|
|
7876
7876
|
return Object.freeze({ ...r(t), create: r });
|
|
7877
7877
|
}
|
|
7878
7878
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
7879
|
-
const lx = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), T4 = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), fz = BigInt(1),
|
|
7879
|
+
const lx = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), T4 = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), fz = BigInt(1), k1 = BigInt(2), I4 = (e, t) => (e + t / k1) / t;
|
|
7880
7880
|
function dz(e) {
|
|
7881
|
-
const t = lx, r = BigInt(3), n = BigInt(6), o = BigInt(11), i = BigInt(22), a = BigInt(23), s = BigInt(44), c = BigInt(88), l = e * e * e % t, u = l * l * e % t, f = Uo(u, r, t) * u % t, h = Uo(f, r, t) * u % t, g = Uo(h,
|
|
7882
|
-
if (!
|
|
7881
|
+
const t = lx, r = BigInt(3), n = BigInt(6), o = BigInt(11), i = BigInt(22), a = BigInt(23), s = BigInt(44), c = BigInt(88), l = e * e * e % t, u = l * l * e % t, f = Uo(u, r, t) * u % t, h = Uo(f, r, t) * u % t, g = Uo(h, k1, t) * l % t, y = Uo(g, o, t) * g % t, m = Uo(y, i, t) * y % t, w = Uo(m, s, t) * m % t, v = Uo(w, c, t) * w % t, x = Uo(v, s, t) * m % t, E = Uo(x, r, t) * u % t, S = Uo(E, a, t) * y % t, O = Uo(S, n, t) * l % t, T = Uo(O, k1, t);
|
|
7882
|
+
if (!x1.eql(x1.sqr(T), e))
|
|
7883
7883
|
throw new Error("Cannot find square root");
|
|
7884
7884
|
return T;
|
|
7885
7885
|
}
|
|
7886
|
-
const
|
|
7886
|
+
const x1 = qv(lx, void 0, void 0, { sqrt: dz }), bu = lz({
|
|
7887
7887
|
a: BigInt(0),
|
|
7888
7888
|
// equation params: a, b
|
|
7889
7889
|
b: BigInt(7),
|
|
7890
7890
|
// Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975
|
|
7891
|
-
Fp:
|
|
7891
|
+
Fp: x1,
|
|
7892
7892
|
// Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n
|
|
7893
7893
|
n: T4,
|
|
7894
7894
|
// Curve order, total count of valid points in the field
|
|
@@ -8125,7 +8125,7 @@ let _z = class extends Ez {
|
|
|
8125
8125
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
8126
8126
|
}
|
|
8127
8127
|
};
|
|
8128
|
-
const
|
|
8128
|
+
const A1 = /* @__PURE__ */ wz(() => new _z());
|
|
8129
8129
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8130
8130
|
// @__NO_SIDE_EFFECTS__
|
|
8131
8131
|
function yh(...e) {
|
|
@@ -8247,7 +8247,7 @@ function O4(e, t, r) {
|
|
|
8247
8247
|
}
|
|
8248
8248
|
const hx = /* @__NO_SIDE_EFFECTS__ */ (e, t) => t ? /* @__PURE__ */ hx(t, e % t) : e, h0 = /* @__NO_SIDE_EFFECTS__ */ (e, t) => e + (t - /* @__PURE__ */ hx(e, t));
|
|
8249
8249
|
// @__NO_SIDE_EFFECTS__
|
|
8250
|
-
function
|
|
8250
|
+
function _1(e, t, r, n) {
|
|
8251
8251
|
if (!Array.isArray(e))
|
|
8252
8252
|
throw new Error("convertRadix2: data should be array");
|
|
8253
8253
|
if (t <= 0 || t > 32)
|
|
@@ -8298,12 +8298,12 @@ function Mv(e, t = !1) {
|
|
|
8298
8298
|
encode: (r) => {
|
|
8299
8299
|
if (!(r instanceof Uint8Array))
|
|
8300
8300
|
throw new Error("radix2.encode input should be Uint8Array");
|
|
8301
|
-
return /* @__PURE__ */
|
|
8301
|
+
return /* @__PURE__ */ _1(Array.from(r), 8, e, !t);
|
|
8302
8302
|
},
|
|
8303
8303
|
decode: (r) => {
|
|
8304
8304
|
if (!Array.isArray(r) || r.length && typeof r[0] != "number")
|
|
8305
8305
|
throw new Error("radix2.decode input should be array of strings");
|
|
8306
|
-
return Uint8Array.from(/* @__PURE__ */
|
|
8306
|
+
return Uint8Array.from(/* @__PURE__ */ _1(r, e, 8, t));
|
|
8307
8307
|
}
|
|
8308
8308
|
};
|
|
8309
8309
|
}
|
|
@@ -8340,7 +8340,7 @@ function $z(e, t) {
|
|
|
8340
8340
|
}
|
|
8341
8341
|
};
|
|
8342
8342
|
}
|
|
8343
|
-
const U4 = /* @__PURE__ */ yh(/* @__PURE__ */ Mv(6), /* @__PURE__ */ Gg("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ dx(6), /* @__PURE__ */ Zg("")), C4 = /* @__PURE__ */ yh(/* @__PURE__ */ Mv(6), /* @__PURE__ */ Gg("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ dx(6), /* @__PURE__ */ Zg("")), Tz = (e) => /* @__PURE__ */ yh(/* @__PURE__ */ Sz(58), /* @__PURE__ */ Gg(e), /* @__PURE__ */ Zg("")), Iz = /* @__PURE__ */ Tz("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), N4 = (e) => /* @__PURE__ */ yh(/* @__PURE__ */ $z(4, (t) => e(e(t))), Iz),
|
|
8343
|
+
const U4 = /* @__PURE__ */ yh(/* @__PURE__ */ Mv(6), /* @__PURE__ */ Gg("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ dx(6), /* @__PURE__ */ Zg("")), C4 = /* @__PURE__ */ yh(/* @__PURE__ */ Mv(6), /* @__PURE__ */ Gg("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ dx(6), /* @__PURE__ */ Zg("")), Tz = (e) => /* @__PURE__ */ yh(/* @__PURE__ */ Sz(58), /* @__PURE__ */ Gg(e), /* @__PURE__ */ Zg("")), Iz = /* @__PURE__ */ Tz("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), N4 = (e) => /* @__PURE__ */ yh(/* @__PURE__ */ $z(4, (t) => e(e(t))), Iz), S1 = /* @__PURE__ */ yh(/* @__PURE__ */ Gg("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), /* @__PURE__ */ Zg("")), j4 = [996825010, 642813549, 513874426, 1027748829, 705979059];
|
|
8344
8344
|
// @__NO_SIDE_EFFECTS__
|
|
8345
8345
|
function Hf(e) {
|
|
8346
8346
|
const t = e >> 25;
|
|
@@ -8366,7 +8366,7 @@ function z4(e, t, r = 1) {
|
|
|
8366
8366
|
o = /* @__PURE__ */ Hf(o) ^ i;
|
|
8367
8367
|
for (let i = 0; i < 6; i++)
|
|
8368
8368
|
o = /* @__PURE__ */ Hf(o);
|
|
8369
|
-
return o ^= r,
|
|
8369
|
+
return o ^= r, S1.encode(/* @__PURE__ */ _1([o % 2 ** 30], 30, 5, !1));
|
|
8370
8370
|
}
|
|
8371
8371
|
// @__NO_SIDE_EFFECTS__
|
|
8372
8372
|
function px(e) {
|
|
@@ -8380,7 +8380,7 @@ function px(e) {
|
|
|
8380
8380
|
if (h !== !1 && g > h)
|
|
8381
8381
|
throw new TypeError(`Length ${g} exceeds limit ${h}`);
|
|
8382
8382
|
const y = u.toLowerCase(), m = /* @__PURE__ */ z4(y, f, t);
|
|
8383
|
-
return `${y}1${
|
|
8383
|
+
return `${y}1${S1.encode(f)}${m}`;
|
|
8384
8384
|
}
|
|
8385
8385
|
function s(u, f = 90) {
|
|
8386
8386
|
if (typeof u != "string")
|
|
@@ -8397,7 +8397,7 @@ function px(e) {
|
|
|
8397
8397
|
const y = u.slice(0, g), m = u.slice(g + 1);
|
|
8398
8398
|
if (m.length < 6)
|
|
8399
8399
|
throw new Error("Data must be at least 6 characters long");
|
|
8400
|
-
const w =
|
|
8400
|
+
const w = S1.decode(m).slice(0, -6), v = /* @__PURE__ */ z4(y, w, t);
|
|
8401
8401
|
if (!m.endsWith(v))
|
|
8402
8402
|
throw new Error(`Invalid checksum in ${u}: expected "${v}"`);
|
|
8403
8403
|
return { prefix: y, words: w };
|
|
@@ -8411,8 +8411,8 @@ function px(e) {
|
|
|
8411
8411
|
}
|
|
8412
8412
|
const ap = /* @__PURE__ */ px("bech32"), sp = /* @__PURE__ */ px("bech32m"), Gi = {
|
|
8413
8413
|
b58chk: {
|
|
8414
|
-
encode: (e) => N4(
|
|
8415
|
-
decode: (e) => N4(
|
|
8414
|
+
encode: (e) => N4(A1).encode(e),
|
|
8415
|
+
decode: (e) => N4(A1).decode(e)
|
|
8416
8416
|
},
|
|
8417
8417
|
base64: {
|
|
8418
8418
|
encode: (e) => U4.encode(e),
|
|
@@ -8704,7 +8704,7 @@ let Vt = (Ye = class extends Uint8Array {
|
|
|
8704
8704
|
return Lz(this);
|
|
8705
8705
|
}
|
|
8706
8706
|
to_hash() {
|
|
8707
|
-
const e =
|
|
8707
|
+
const e = A1(this);
|
|
8708
8708
|
return new Ye(e);
|
|
8709
8709
|
}
|
|
8710
8710
|
to_json(e) {
|
|
@@ -9057,9 +9057,9 @@ function kR(e) {
|
|
|
9057
9057
|
return Vt.bytes(e, 32);
|
|
9058
9058
|
throw new TypeError(`Unknown type: ${typeof e}`);
|
|
9059
9059
|
}
|
|
9060
|
-
const cp = /* @__PURE__ */ BigInt(2 ** 32 - 1), $
|
|
9060
|
+
const cp = /* @__PURE__ */ BigInt(2 ** 32 - 1), $1 = /* @__PURE__ */ BigInt(32);
|
|
9061
9061
|
function vx(e, t = !1) {
|
|
9062
|
-
return t ? { h: Number(e & cp), l: Number(e >> $
|
|
9062
|
+
return t ? { h: Number(e & cp), l: Number(e >> $1 & cp) } : { h: Number(e >> $1 & cp) | 0, l: Number(e & cp) | 0 };
|
|
9063
9063
|
}
|
|
9064
9064
|
function xR(e, t = !1) {
|
|
9065
9065
|
let r = new Uint32Array(e.length), n = new Uint32Array(e.length);
|
|
@@ -9069,7 +9069,7 @@ function xR(e, t = !1) {
|
|
|
9069
9069
|
}
|
|
9070
9070
|
return [r, n];
|
|
9071
9071
|
}
|
|
9072
|
-
const AR = (e, t) => BigInt(e >>> 0) << $
|
|
9072
|
+
const AR = (e, t) => BigInt(e >>> 0) << $1 | BigInt(t >>> 0), _R = (e, t, r) => e >>> r, SR = (e, t, r) => e << 32 - r | t >>> r, $R = (e, t, r) => e >>> r | t << 32 - r, TR = (e, t, r) => e << 32 - r | t >>> r, IR = (e, t, r) => e << 64 - r | t >>> r - 32, PR = (e, t, r) => e >>> r - 32 | t << 64 - r, OR = (e, t) => t, BR = (e, t) => e, UR = (e, t, r) => e << r | t >>> 32 - r, CR = (e, t, r) => t << r | e >>> 32 - r, NR = (e, t, r) => t << r - 32 | e >>> 64 - r, jR = (e, t, r) => e << r - 32 | t >>> 64 - r;
|
|
9073
9073
|
function zR(e, t, r, n) {
|
|
9074
9074
|
const o = (t >>> 0) + (n >>> 0);
|
|
9075
9075
|
return { h: e + r + (o / 2 ** 32 | 0) | 0, l: o | 0 };
|
|
@@ -9225,7 +9225,7 @@ function Ex(e, t = !1) {
|
|
|
9225
9225
|
return t ? r.x : r.buff;
|
|
9226
9226
|
}
|
|
9227
9227
|
bu.ProjectivePoint;
|
|
9228
|
-
function
|
|
9228
|
+
function T1(e) {
|
|
9229
9229
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
9230
9230
|
throw new Error(`Wrong positive integer: ${e}`);
|
|
9231
9231
|
}
|
|
@@ -9242,7 +9242,7 @@ function kx(e, ...t) {
|
|
|
9242
9242
|
function XR(e) {
|
|
9243
9243
|
if (typeof e != "function" || typeof e.create != "function")
|
|
9244
9244
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
9245
|
-
|
|
9245
|
+
T1(e.outputLen), T1(e.blockLen);
|
|
9246
9246
|
}
|
|
9247
9247
|
function YR(e, t = !0) {
|
|
9248
9248
|
if (e.destroyed)
|
|
@@ -9257,7 +9257,7 @@ function JR(e, t) {
|
|
|
9257
9257
|
throw new Error(`digestInto() expects output buffer of length at least ${r}`);
|
|
9258
9258
|
}
|
|
9259
9259
|
const QR = {
|
|
9260
|
-
number:
|
|
9260
|
+
number: T1,
|
|
9261
9261
|
bool: WR,
|
|
9262
9262
|
bytes: kx,
|
|
9263
9263
|
hash: XR,
|
|
@@ -9266,7 +9266,7 @@ const QR = {
|
|
|
9266
9266
|
};
|
|
9267
9267
|
var Qy = QR;
|
|
9268
9268
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
9269
|
-
const
|
|
9269
|
+
const eb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Ui = (e, t) => e << 32 - t | e >>> t, eL = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
9270
9270
|
if (!eL)
|
|
9271
9271
|
throw new Error("Non little-endian hardware is not supported");
|
|
9272
9272
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -9298,7 +9298,7 @@ function nL(e, t, r, n) {
|
|
|
9298
9298
|
}
|
|
9299
9299
|
let oL = class extends rL {
|
|
9300
9300
|
constructor(t, r, n, o) {
|
|
9301
|
-
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view =
|
|
9301
|
+
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = eb(this.buffer);
|
|
9302
9302
|
}
|
|
9303
9303
|
update(t) {
|
|
9304
9304
|
Qy.exists(this);
|
|
@@ -9308,7 +9308,7 @@ let oL = class extends rL {
|
|
|
9308
9308
|
for (let a = 0; a < i; ) {
|
|
9309
9309
|
const s = Math.min(o - this.pos, i - a);
|
|
9310
9310
|
if (s === o) {
|
|
9311
|
-
const c =
|
|
9311
|
+
const c = eb(t);
|
|
9312
9312
|
for (; o <= i - a; a += o)
|
|
9313
9313
|
this.process(c, a);
|
|
9314
9314
|
continue;
|
|
@@ -9325,7 +9325,7 @@ let oL = class extends rL {
|
|
|
9325
9325
|
for (let f = a; f < o; f++)
|
|
9326
9326
|
r[f] = 0;
|
|
9327
9327
|
nL(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
9328
|
-
const s =
|
|
9328
|
+
const s = eb(t), c = this.outputLen;
|
|
9329
9329
|
if (c % 4)
|
|
9330
9330
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
9331
9331
|
const l = c / 4, u = this.get();
|
|
@@ -9458,7 +9458,7 @@ let _x = class extends oL {
|
|
|
9458
9458
|
super(), this.A = -1056596264, this.B = 914150663, this.C = 812702999, this.D = -150054599, this.E = -4191439, this.F = 1750603025, this.G = 1694076839, this.H = -1090891868, this.outputLen = 28;
|
|
9459
9459
|
}
|
|
9460
9460
|
};
|
|
9461
|
-
const
|
|
9461
|
+
const I1 = Ax(() => new _x());
|
|
9462
9462
|
Ax(() => new cL());
|
|
9463
9463
|
function uL(e, t) {
|
|
9464
9464
|
if (e.length > t)
|
|
@@ -9532,7 +9532,7 @@ function bL(e, t) {
|
|
|
9532
9532
|
return new Uint8Array(i);
|
|
9533
9533
|
}
|
|
9534
9534
|
function Tx(e) {
|
|
9535
|
-
return
|
|
9535
|
+
return I1(I1(e));
|
|
9536
9536
|
}
|
|
9537
9537
|
function wL(e) {
|
|
9538
9538
|
const t = Tx(e);
|
|
@@ -9787,7 +9787,7 @@ const HL = new TextEncoder(), DL = new TextDecoder();
|
|
|
9787
9787
|
function Zv(e) {
|
|
9788
9788
|
return HL.encode(e);
|
|
9789
9789
|
}
|
|
9790
|
-
function
|
|
9790
|
+
function tb(e) {
|
|
9791
9791
|
return DL.decode(e);
|
|
9792
9792
|
}
|
|
9793
9793
|
function KL(e, t) {
|
|
@@ -9893,18 +9893,18 @@ let X = ($t = class extends Uint8Array {
|
|
|
9893
9893
|
return CL(t);
|
|
9894
9894
|
}
|
|
9895
9895
|
toHash() {
|
|
9896
|
-
const e =
|
|
9896
|
+
const e = I1(this);
|
|
9897
9897
|
return new $t(e);
|
|
9898
9898
|
}
|
|
9899
9899
|
toJson() {
|
|
9900
|
-
const e =
|
|
9900
|
+
const e = tb(this);
|
|
9901
9901
|
return JSON.parse(e);
|
|
9902
9902
|
}
|
|
9903
9903
|
toBech32(e, t = 0) {
|
|
9904
9904
|
return jx.encode(this, e, t);
|
|
9905
9905
|
}
|
|
9906
9906
|
toStr() {
|
|
9907
|
-
return
|
|
9907
|
+
return tb(this);
|
|
9908
9908
|
}
|
|
9909
9909
|
toHex() {
|
|
9910
9910
|
return ML(this);
|
|
@@ -9968,7 +9968,7 @@ let X = ($t = class extends Uint8Array {
|
|
|
9968
9968
|
return $t.of(255, ...$t.num(e, 8, t));
|
|
9969
9969
|
throw new Error(`Value is too large: ${e}`);
|
|
9970
9970
|
}
|
|
9971
|
-
}, $t.num = GL, $t.big = WL, $t.bin = ZL, $t.raw = XL, $t.str = YL, $t.hex = JL, $t.bytes = QL, $t.json = eH, $t.base64 = tH, $t.b64url = rH, $t.bech32 = nH, $t.b58chk = oH, $t.encode = Zv, $t.decode =
|
|
9971
|
+
}, $t.num = GL, $t.big = WL, $t.bin = ZL, $t.raw = XL, $t.str = YL, $t.hex = JL, $t.bytes = QL, $t.json = eH, $t.base64 = tH, $t.b64url = rH, $t.bech32 = nH, $t.b58chk = oH, $t.encode = Zv, $t.decode = tb, $t);
|
|
9972
9972
|
function GL(e, t, r) {
|
|
9973
9973
|
return new X(e, t, r);
|
|
9974
9974
|
}
|
|
@@ -10318,7 +10318,7 @@ const mH = {
|
|
|
10318
10318
|
decode: Wv,
|
|
10319
10319
|
fmt: mH
|
|
10320
10320
|
};
|
|
10321
|
-
function
|
|
10321
|
+
function P1(e) {
|
|
10322
10322
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
10323
10323
|
throw new Error(`Wrong positive integer: ${e}`);
|
|
10324
10324
|
}
|
|
@@ -10335,7 +10335,7 @@ function Gx(e, ...t) {
|
|
|
10335
10335
|
function bH(e) {
|
|
10336
10336
|
if (typeof e != "function" || typeof e.create != "function")
|
|
10337
10337
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
10338
|
-
|
|
10338
|
+
P1(e.outputLen), P1(e.blockLen);
|
|
10339
10339
|
}
|
|
10340
10340
|
function wH(e, t = !0) {
|
|
10341
10341
|
if (e.destroyed)
|
|
@@ -10350,7 +10350,7 @@ function vH(e, t) {
|
|
|
10350
10350
|
throw new Error(`digestInto() expects output buffer of length at least ${r}`);
|
|
10351
10351
|
}
|
|
10352
10352
|
const EH = {
|
|
10353
|
-
number:
|
|
10353
|
+
number: P1,
|
|
10354
10354
|
bool: yH,
|
|
10355
10355
|
bytes: Gx,
|
|
10356
10356
|
hash: bH,
|
|
@@ -10358,9 +10358,9 @@ const EH = {
|
|
|
10358
10358
|
output: vH
|
|
10359
10359
|
};
|
|
10360
10360
|
var Zc = EH;
|
|
10361
|
-
const
|
|
10361
|
+
const rb = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
10362
10362
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
10363
|
-
const
|
|
10363
|
+
const nb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Ci = (e, t) => e << 32 - t | e >>> t, kH = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
10364
10364
|
if (!kH)
|
|
10365
10365
|
throw new Error("Non little-endian hardware is not supported");
|
|
10366
10366
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -10397,8 +10397,8 @@ function Wx(e) {
|
|
|
10397
10397
|
return t.outputLen = r.outputLen, t.blockLen = r.blockLen, t.create = () => e(), t;
|
|
10398
10398
|
}
|
|
10399
10399
|
function Xx(e = 32) {
|
|
10400
|
-
if (
|
|
10401
|
-
return
|
|
10400
|
+
if (rb && typeof rb.getRandomValues == "function")
|
|
10401
|
+
return rb.getRandomValues(new Uint8Array(e));
|
|
10402
10402
|
throw new Error("crypto.getRandomValues must be defined");
|
|
10403
10403
|
}
|
|
10404
10404
|
function _H(e, t, r, n) {
|
|
@@ -10409,7 +10409,7 @@ function _H(e, t, r, n) {
|
|
|
10409
10409
|
}
|
|
10410
10410
|
let SH = class extends Zx {
|
|
10411
10411
|
constructor(t, r, n, o) {
|
|
10412
|
-
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view =
|
|
10412
|
+
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = nb(this.buffer);
|
|
10413
10413
|
}
|
|
10414
10414
|
update(t) {
|
|
10415
10415
|
Zc.exists(this);
|
|
@@ -10419,7 +10419,7 @@ let SH = class extends Zx {
|
|
|
10419
10419
|
for (let a = 0; a < i; ) {
|
|
10420
10420
|
const s = Math.min(o - this.pos, i - a);
|
|
10421
10421
|
if (s === o) {
|
|
10422
|
-
const c =
|
|
10422
|
+
const c = nb(t);
|
|
10423
10423
|
for (; o <= i - a; a += o)
|
|
10424
10424
|
this.process(c, a);
|
|
10425
10425
|
continue;
|
|
@@ -10436,7 +10436,7 @@ let SH = class extends Zx {
|
|
|
10436
10436
|
for (let f = a; f < o; f++)
|
|
10437
10437
|
r[f] = 0;
|
|
10438
10438
|
_H(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
10439
|
-
const s =
|
|
10439
|
+
const s = nb(t), c = this.outputLen;
|
|
10440
10440
|
if (c % 4)
|
|
10441
10441
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
10442
10442
|
const l = c / 4, u = this.get();
|
|
@@ -10658,7 +10658,7 @@ function jH(e) {
|
|
|
10658
10658
|
;
|
|
10659
10659
|
return t;
|
|
10660
10660
|
}
|
|
10661
|
-
const zH = (e, t) => e >> BigInt(t) & 1n, RH = (e, t, r) => e | (r ? Yv : OH) << BigInt(t), e2 = (e) => (BH << BigInt(e - 1)) - Yv,
|
|
10661
|
+
const zH = (e, t) => e >> BigInt(t) & 1n, RH = (e, t, r) => e | (r ? Yv : OH) << BigInt(t), e2 = (e) => (BH << BigInt(e - 1)) - Yv, ob = (e) => new Uint8Array(e), K4 = (e) => Uint8Array.from(e);
|
|
10662
10662
|
function e7(e, t, r) {
|
|
10663
10663
|
if (typeof e != "number" || e < 2)
|
|
10664
10664
|
throw new Error("hashLen must be a number");
|
|
@@ -10666,10 +10666,10 @@ function e7(e, t, r) {
|
|
|
10666
10666
|
throw new Error("qByteLen must be a number");
|
|
10667
10667
|
if (typeof r != "function")
|
|
10668
10668
|
throw new Error("hmacFn must be a function");
|
|
10669
|
-
let n =
|
|
10669
|
+
let n = ob(e), o = ob(e), i = 0;
|
|
10670
10670
|
const a = () => {
|
|
10671
10671
|
n.fill(1), o.fill(0), i = 0;
|
|
10672
|
-
}, s = (...u) => r(o, n, ...u), c = (u =
|
|
10672
|
+
}, s = (...u) => r(o, n, ...u), c = (u = ob()) => {
|
|
10673
10673
|
o = s(K4([0]), u), n = s(), u.length !== 0 && (o = s(K4([1]), u), n = s());
|
|
10674
10674
|
}, l = () => {
|
|
10675
10675
|
if (i++ >= 1e3)
|
|
@@ -10739,7 +10739,7 @@ var HH = /* @__PURE__ */ Object.freeze({
|
|
|
10739
10739
|
validateObject: pf
|
|
10740
10740
|
});
|
|
10741
10741
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
10742
|
-
const on = BigInt(0), Tr = BigInt(1), qc = BigInt(2), DH = BigInt(3),
|
|
10742
|
+
const on = BigInt(0), Tr = BigInt(1), qc = BigInt(2), DH = BigInt(3), O1 = BigInt(4), q4 = BigInt(5), M4 = BigInt(8);
|
|
10743
10743
|
BigInt(9);
|
|
10744
10744
|
BigInt(16);
|
|
10745
10745
|
function Fr(e, t) {
|
|
@@ -10762,7 +10762,7 @@ function Co(e, t, r) {
|
|
|
10762
10762
|
n *= n, n %= r;
|
|
10763
10763
|
return n;
|
|
10764
10764
|
}
|
|
10765
|
-
function
|
|
10765
|
+
function B1(e, t) {
|
|
10766
10766
|
if (e === on || t <= on)
|
|
10767
10767
|
throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);
|
|
10768
10768
|
let r = Fr(e, t), n = t, o = on, i = Tr;
|
|
@@ -10782,7 +10782,7 @@ function qH(e) {
|
|
|
10782
10782
|
for (o = qc; o < e && KH(o, t, e) !== e - Tr; o++)
|
|
10783
10783
|
;
|
|
10784
10784
|
if (n === 1) {
|
|
10785
|
-
const a = (e + Tr) /
|
|
10785
|
+
const a = (e + Tr) / O1;
|
|
10786
10786
|
return function(s, c) {
|
|
10787
10787
|
const l = s.pow(c, a);
|
|
10788
10788
|
if (!s.eql(s.sqr(l), c))
|
|
@@ -10808,8 +10808,8 @@ function qH(e) {
|
|
|
10808
10808
|
};
|
|
10809
10809
|
}
|
|
10810
10810
|
function MH(e) {
|
|
10811
|
-
if (e %
|
|
10812
|
-
const t = (e + Tr) /
|
|
10811
|
+
if (e % O1 === DH) {
|
|
10812
|
+
const t = (e + Tr) / O1;
|
|
10813
10813
|
return function(r, n) {
|
|
10814
10814
|
const o = r.pow(n, t);
|
|
10815
10815
|
if (!r.eql(r.sqr(o), n))
|
|
@@ -10904,13 +10904,13 @@ function r7(e, t, r = !1, n = {}) {
|
|
|
10904
10904
|
sub: (c, l) => Fr(c - l, e),
|
|
10905
10905
|
mul: (c, l) => Fr(c * l, e),
|
|
10906
10906
|
pow: (c, l) => VH(s, c, l),
|
|
10907
|
-
div: (c, l) => Fr(c *
|
|
10907
|
+
div: (c, l) => Fr(c * B1(l, e), e),
|
|
10908
10908
|
// Same as above, but doesn't normalize
|
|
10909
10909
|
sqrN: (c) => c * c,
|
|
10910
10910
|
addN: (c, l) => c + l,
|
|
10911
10911
|
subN: (c, l) => c - l,
|
|
10912
10912
|
mulN: (c, l) => c * l,
|
|
10913
|
-
inv: (c) =>
|
|
10913
|
+
inv: (c) => B1(c, e),
|
|
10914
10914
|
sqrt: n.sqrt || ((c) => a(s, c)),
|
|
10915
10915
|
invertBatch: (c) => GH(s, c),
|
|
10916
10916
|
// TODO: do we really need constant cmov?
|
|
@@ -10934,7 +10934,7 @@ function ZH(e, t, r = !1) {
|
|
|
10934
10934
|
return Fr(i, t - Tr) + Tr;
|
|
10935
10935
|
}
|
|
10936
10936
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
10937
|
-
const WH = BigInt(0),
|
|
10937
|
+
const WH = BigInt(0), ib = BigInt(1);
|
|
10938
10938
|
function XH(e, t) {
|
|
10939
10939
|
const r = (o, i) => {
|
|
10940
10940
|
const a = i.negate();
|
|
@@ -10949,7 +10949,7 @@ function XH(e, t) {
|
|
|
10949
10949
|
unsafeLadder(o, i) {
|
|
10950
10950
|
let a = e.ZERO, s = o;
|
|
10951
10951
|
for (; i > WH; )
|
|
10952
|
-
i &
|
|
10952
|
+
i & ib && (a = a.add(s)), s = s.double(), i >>= ib;
|
|
10953
10953
|
return a;
|
|
10954
10954
|
},
|
|
10955
10955
|
/**
|
|
@@ -10987,7 +10987,7 @@ function XH(e, t) {
|
|
|
10987
10987
|
for (let y = 0; y < s; y++) {
|
|
10988
10988
|
const m = y * c;
|
|
10989
10989
|
let w = Number(a & f);
|
|
10990
|
-
a >>= g, w > c && (w -= h, a +=
|
|
10990
|
+
a >>= g, w > c && (w -= h, a += ib);
|
|
10991
10991
|
const v = m, x = m + Math.abs(w) - 1, E = y % 2 !== 0, S = w < 0;
|
|
10992
10992
|
w === 0 ? u = u.add(r(E, i[v])) : l = l.add(r(S, i[x]));
|
|
10993
10993
|
}
|
|
@@ -11356,7 +11356,7 @@ function rD(e) {
|
|
|
11356
11356
|
return Fr(P, n);
|
|
11357
11357
|
}
|
|
11358
11358
|
function c(P) {
|
|
11359
|
-
return
|
|
11359
|
+
return B1(P, n);
|
|
11360
11360
|
}
|
|
11361
11361
|
const { ProjectivePoint: l, normPrivateKeyToScalar: u, weierstrassEquation: f, isWithinCurveOrder: h } = eD({
|
|
11362
11362
|
...t,
|
|
@@ -11832,17 +11832,17 @@ function E0(e, ...t) {
|
|
|
11832
11832
|
}
|
|
11833
11833
|
return y0(co(r, ...t));
|
|
11834
11834
|
}
|
|
11835
|
-
const n2 = (e) => e.toRawBytes(!0).slice(1),
|
|
11836
|
-
function
|
|
11835
|
+
const n2 = (e) => e.toRawBytes(!0).slice(1), U1 = (e) => pc(e, 32), ab = (e) => Fr(e, Jg), vd = (e) => Fr(e, w0), o2 = aa.ProjectivePoint, gD = (e, t, r) => o2.BASE.multiplyAndAddUnsafe(e, t, r);
|
|
11836
|
+
function C1(e) {
|
|
11837
11837
|
let t = aa.utils.normPrivateKeyToScalar(e), r = o2.fromPrivateKey(t);
|
|
11838
11838
|
return { scalar: r.hasEvenY() ? t : vd(-t), bytes: n2(r) };
|
|
11839
11839
|
}
|
|
11840
11840
|
function u7(e) {
|
|
11841
11841
|
if (!c7(e))
|
|
11842
11842
|
throw new Error("bad x: need 0 < x < p");
|
|
11843
|
-
const t =
|
|
11843
|
+
const t = ab(e * e), r = ab(t * e + BigInt(7));
|
|
11844
11844
|
let n = s7(r);
|
|
11845
|
-
n % v0 !== Qg && (n =
|
|
11845
|
+
n % v0 !== Qg && (n = ab(-n));
|
|
11846
11846
|
const o = new o2(e, n, a7);
|
|
11847
11847
|
return o.assertValidity(), o;
|
|
11848
11848
|
}
|
|
@@ -11850,14 +11850,14 @@ function l7(...e) {
|
|
|
11850
11850
|
return vd(Bn(E0("BIP0340/challenge", ...e)));
|
|
11851
11851
|
}
|
|
11852
11852
|
function mD(e) {
|
|
11853
|
-
return
|
|
11853
|
+
return C1(e).bytes;
|
|
11854
11854
|
}
|
|
11855
11855
|
function yD(e, t, r = Xx(32)) {
|
|
11856
|
-
const n = fn("message", e), { bytes: o, scalar: i } =
|
|
11856
|
+
const n = fn("message", e), { bytes: o, scalar: i } = C1(t), a = fn("auxRand", r, 32), s = U1(i ^ Bn(E0("BIP0340/aux", a))), c = E0("BIP0340/nonce", s, o, n), l = vd(Bn(c));
|
|
11857
11857
|
if (l === Qg)
|
|
11858
11858
|
throw new Error("sign failed: k is zero");
|
|
11859
|
-
const { bytes: u, scalar: f } =
|
|
11860
|
-
if (g.set(u, 0), g.set(
|
|
11859
|
+
const { bytes: u, scalar: f } = C1(l), h = l7(u, o, n), g = new Uint8Array(64);
|
|
11860
|
+
if (g.set(u, 0), g.set(U1(vd(f + h * i)), 32), !f7(g, n, o))
|
|
11861
11861
|
throw new Error("sign: Invalid signature produced");
|
|
11862
11862
|
return g;
|
|
11863
11863
|
}
|
|
@@ -11870,7 +11870,7 @@ function f7(e, t, r) {
|
|
|
11870
11870
|
const c = Bn(n.subarray(32, 64));
|
|
11871
11871
|
if (!pD(c))
|
|
11872
11872
|
return !1;
|
|
11873
|
-
const l = l7(
|
|
11873
|
+
const l = l7(U1(s), n2(a), o), u = gD(a, c, vd(-l));
|
|
11874
11874
|
return !(!u || !u.hasEvenY() || u.toAffine().x !== s);
|
|
11875
11875
|
} catch {
|
|
11876
11876
|
return !1;
|
|
@@ -11936,7 +11936,7 @@ fD(aa.ProjectivePoint, (e) => {
|
|
|
11936
11936
|
expand: "xmd",
|
|
11937
11937
|
hash: y0
|
|
11938
11938
|
});
|
|
11939
|
-
function
|
|
11939
|
+
function N1(e) {
|
|
11940
11940
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
11941
11941
|
throw new Error(`Wrong positive integer: ${e}`);
|
|
11942
11942
|
}
|
|
@@ -11953,7 +11953,7 @@ function d7(e, ...t) {
|
|
|
11953
11953
|
function kD(e) {
|
|
11954
11954
|
if (typeof e != "function" || typeof e.create != "function")
|
|
11955
11955
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
11956
|
-
|
|
11956
|
+
N1(e.outputLen), N1(e.blockLen);
|
|
11957
11957
|
}
|
|
11958
11958
|
function xD(e, t = !0) {
|
|
11959
11959
|
if (e.destroyed)
|
|
@@ -11968,16 +11968,16 @@ function AD(e, t) {
|
|
|
11968
11968
|
throw new Error(`digestInto() expects output buffer of length at least ${r}`);
|
|
11969
11969
|
}
|
|
11970
11970
|
const _D = {
|
|
11971
|
-
number:
|
|
11971
|
+
number: N1,
|
|
11972
11972
|
bool: ED,
|
|
11973
11973
|
bytes: d7,
|
|
11974
11974
|
hash: kD,
|
|
11975
11975
|
exists: xD,
|
|
11976
11976
|
output: AD
|
|
11977
11977
|
};
|
|
11978
|
-
var
|
|
11978
|
+
var sb = _D;
|
|
11979
11979
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
11980
|
-
const
|
|
11980
|
+
const cb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Ni = (e, t) => e << 32 - t | e >>> t, SD = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
11981
11981
|
if (!SD)
|
|
11982
11982
|
throw new Error("Non little-endian hardware is not supported");
|
|
11983
11983
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -12009,17 +12009,17 @@ function ID(e, t, r, n) {
|
|
|
12009
12009
|
}
|
|
12010
12010
|
let PD = class extends TD {
|
|
12011
12011
|
constructor(t, r, n, o) {
|
|
12012
|
-
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view =
|
|
12012
|
+
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = cb(this.buffer);
|
|
12013
12013
|
}
|
|
12014
12014
|
update(t) {
|
|
12015
|
-
|
|
12015
|
+
sb.exists(this);
|
|
12016
12016
|
const { view: r, buffer: n, blockLen: o } = this;
|
|
12017
12017
|
t = h7(t);
|
|
12018
12018
|
const i = t.length;
|
|
12019
12019
|
for (let a = 0; a < i; ) {
|
|
12020
12020
|
const s = Math.min(o - this.pos, i - a);
|
|
12021
12021
|
if (s === o) {
|
|
12022
|
-
const c =
|
|
12022
|
+
const c = cb(t);
|
|
12023
12023
|
for (; o <= i - a; a += o)
|
|
12024
12024
|
this.process(c, a);
|
|
12025
12025
|
continue;
|
|
@@ -12029,14 +12029,14 @@ let PD = class extends TD {
|
|
|
12029
12029
|
return this.length += t.length, this.roundClean(), this;
|
|
12030
12030
|
}
|
|
12031
12031
|
digestInto(t) {
|
|
12032
|
-
|
|
12032
|
+
sb.exists(this), sb.output(t, this), this.finished = !0;
|
|
12033
12033
|
const { buffer: r, view: n, blockLen: o, isLE: i } = this;
|
|
12034
12034
|
let { pos: a } = this;
|
|
12035
12035
|
r[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > o - a && (this.process(n, 0), a = 0);
|
|
12036
12036
|
for (let f = a; f < o; f++)
|
|
12037
12037
|
r[f] = 0;
|
|
12038
12038
|
ID(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
12039
|
-
const s =
|
|
12039
|
+
const s = cb(t), c = this.outputLen;
|
|
12040
12040
|
if (c % 4)
|
|
12041
12041
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
12042
12042
|
const l = c / 4, u = this.get();
|
|
@@ -12169,7 +12169,7 @@ let g7 = class extends PD {
|
|
|
12169
12169
|
super(), this.A = -1056596264, this.B = 914150663, this.C = 812702999, this.D = -150054599, this.E = -4191439, this.F = 1750603025, this.G = 1694076839, this.H = -1090891868, this.outputLen = 28;
|
|
12170
12170
|
}
|
|
12171
12171
|
};
|
|
12172
|
-
const
|
|
12172
|
+
const j1 = p7(() => new g7());
|
|
12173
12173
|
p7(() => new CD());
|
|
12174
12174
|
function ND(e, t) {
|
|
12175
12175
|
if (e.length > t)
|
|
@@ -12243,7 +12243,7 @@ function MD(e, t) {
|
|
|
12243
12243
|
return new Uint8Array(i);
|
|
12244
12244
|
}
|
|
12245
12245
|
function b7(e) {
|
|
12246
|
-
return
|
|
12246
|
+
return j1(j1(e));
|
|
12247
12247
|
}
|
|
12248
12248
|
function FD(e) {
|
|
12249
12249
|
const t = b7(e);
|
|
@@ -12498,7 +12498,7 @@ const dK = new TextEncoder(), hK = new TextDecoder();
|
|
|
12498
12498
|
function i2(e) {
|
|
12499
12499
|
return dK.encode(e);
|
|
12500
12500
|
}
|
|
12501
|
-
function
|
|
12501
|
+
function z1(e) {
|
|
12502
12502
|
return hK.decode(e);
|
|
12503
12503
|
}
|
|
12504
12504
|
function pK(e, t) {
|
|
@@ -12603,18 +12603,18 @@ const An = class Qt extends Uint8Array {
|
|
|
12603
12603
|
return aK(r);
|
|
12604
12604
|
}
|
|
12605
12605
|
toHash() {
|
|
12606
|
-
const t =
|
|
12606
|
+
const t = j1(this);
|
|
12607
12607
|
return new Qt(t);
|
|
12608
12608
|
}
|
|
12609
12609
|
toJson() {
|
|
12610
|
-
const t =
|
|
12610
|
+
const t = z1(this);
|
|
12611
12611
|
return JSON.parse(t);
|
|
12612
12612
|
}
|
|
12613
12613
|
toBech32(t, r = 0) {
|
|
12614
12614
|
return S7.encode(this, t, r);
|
|
12615
12615
|
}
|
|
12616
12616
|
toStr() {
|
|
12617
|
-
return
|
|
12617
|
+
return z1(this);
|
|
12618
12618
|
}
|
|
12619
12619
|
toHex() {
|
|
12620
12620
|
return mK(this);
|
|
@@ -12679,7 +12679,7 @@ const An = class Qt extends Uint8Array {
|
|
|
12679
12679
|
throw new Error(`Value is too large: ${t}`);
|
|
12680
12680
|
}
|
|
12681
12681
|
};
|
|
12682
|
-
An.num = wK, An.big = EK, An.bin = vK, An.raw = kK, An.str = xK, An.hex = AK, An.bytes = _K, An.json = SK, An.base64 = $K, An.b64url = TK, An.bech32 = IK, An.b58chk = PK, An.encode = i2, An.decode =
|
|
12682
|
+
An.num = wK, An.big = EK, An.bin = vK, An.raw = kK, An.str = xK, An.hex = AK, An.bytes = _K, An.json = SK, An.base64 = $K, An.b64url = TK, An.bech32 = IK, An.b58chk = PK, An.encode = i2, An.decode = z1;
|
|
12683
12683
|
let Qe = An;
|
|
12684
12684
|
function wK(e, t, r) {
|
|
12685
12685
|
return new Qe(e, t, r);
|
|
@@ -12747,7 +12747,7 @@ let OK = class {
|
|
|
12747
12747
|
}
|
|
12748
12748
|
}
|
|
12749
12749
|
};
|
|
12750
|
-
const x0 = aa.CURVE, a2 = x0.n, BK = x0.p, UK = { x: x0.Gx, y: x0.Gy }, CK = BigInt(0), NK = BigInt(1), jK = BigInt(2), zK = BigInt(3), RK = BigInt(4),
|
|
12750
|
+
const x0 = aa.CURVE, a2 = x0.n, BK = x0.p, UK = { x: x0.Gx, y: x0.Gy }, CK = BigInt(0), NK = BigInt(1), jK = BigInt(2), zK = BigInt(3), RK = BigInt(4), R1 = { N: a2, P: BK, G: UK, _0n: CK, _1n: NK, _2n: jK, _3n: zK, _4n: RK }, Kf = r7(a2, 32, !0), C7 = (e) => Fr(e, a2);
|
|
12751
12751
|
function s2(e, t = !1) {
|
|
12752
12752
|
if (t)
|
|
12753
12753
|
throw new Error(e);
|
|
@@ -12766,7 +12766,7 @@ var HK = /* @__PURE__ */ Object.freeze({
|
|
|
12766
12766
|
mod_bytes: LK,
|
|
12767
12767
|
random: N7
|
|
12768
12768
|
});
|
|
12769
|
-
const { N: DK, P:
|
|
12769
|
+
const { N: DK, P: v1e, _0n: KK } = R1;
|
|
12770
12770
|
function qK(e, t, r) {
|
|
12771
12771
|
const n = Qe.bytes(e);
|
|
12772
12772
|
return n.length !== t ? s2(`Invalid byte size: ${n.hex} !== ${t}`, r) : !0;
|
|
@@ -12908,7 +12908,7 @@ const Kp = class Br {
|
|
|
12908
12908
|
return Br.import(this.p.negate());
|
|
12909
12909
|
}
|
|
12910
12910
|
};
|
|
12911
|
-
Kp.P =
|
|
12911
|
+
Kp.P = R1.P, Kp.G = R1.G, Kp.base = aa.ProjectivePoint.BASE;
|
|
12912
12912
|
let Ru = Kp;
|
|
12913
12913
|
function FK(e) {
|
|
12914
12914
|
if (e instanceof Pn)
|
|
@@ -12936,7 +12936,7 @@ function VK(e) {
|
|
|
12936
12936
|
return Qe.bytes(e, 32);
|
|
12937
12937
|
throw new TypeError(`Unknown type: ${typeof e}`);
|
|
12938
12938
|
}
|
|
12939
|
-
function
|
|
12939
|
+
function L1(e) {
|
|
12940
12940
|
if (!Number.isSafeInteger(e) || e < 0)
|
|
12941
12941
|
throw new Error(`Wrong positive integer: ${e}`);
|
|
12942
12942
|
}
|
|
@@ -12953,7 +12953,7 @@ function z7(e, ...t) {
|
|
|
12953
12953
|
function ZK(e) {
|
|
12954
12954
|
if (typeof e != "function" || typeof e.create != "function")
|
|
12955
12955
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
12956
|
-
|
|
12956
|
+
L1(e.outputLen), L1(e.blockLen);
|
|
12957
12957
|
}
|
|
12958
12958
|
function WK(e, t = !0) {
|
|
12959
12959
|
if (e.destroyed)
|
|
@@ -12968,7 +12968,7 @@ function XK(e, t) {
|
|
|
12968
12968
|
throw new Error(`digestInto() expects output buffer of length at least ${r}`);
|
|
12969
12969
|
}
|
|
12970
12970
|
const YK = {
|
|
12971
|
-
number:
|
|
12971
|
+
number: L1,
|
|
12972
12972
|
bool: GK,
|
|
12973
12973
|
bytes: z7,
|
|
12974
12974
|
hash: ZK,
|
|
@@ -12977,7 +12977,7 @@ const YK = {
|
|
|
12977
12977
|
};
|
|
12978
12978
|
var Xc = YK;
|
|
12979
12979
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
12980
|
-
const JK = (e) => e instanceof Uint8Array,
|
|
12980
|
+
const JK = (e) => e instanceof Uint8Array, ub = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), ji = (e, t) => e << 32 - t | e >>> t, QK = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
12981
12981
|
if (!QK)
|
|
12982
12982
|
throw new Error("Non little-endian hardware is not supported");
|
|
12983
12983
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -13009,7 +13009,7 @@ function tq(e, t, r, n) {
|
|
|
13009
13009
|
}
|
|
13010
13010
|
let u2 = class extends R7 {
|
|
13011
13011
|
constructor(t, r, n, o) {
|
|
13012
|
-
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view =
|
|
13012
|
+
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = ub(this.buffer);
|
|
13013
13013
|
}
|
|
13014
13014
|
update(t) {
|
|
13015
13015
|
Xc.exists(this);
|
|
@@ -13019,7 +13019,7 @@ let u2 = class extends R7 {
|
|
|
13019
13019
|
for (let a = 0; a < i; ) {
|
|
13020
13020
|
const s = Math.min(o - this.pos, i - a);
|
|
13021
13021
|
if (s === o) {
|
|
13022
|
-
const c =
|
|
13022
|
+
const c = ub(t);
|
|
13023
13023
|
for (; o <= i - a; a += o)
|
|
13024
13024
|
this.process(c, a);
|
|
13025
13025
|
continue;
|
|
@@ -13036,7 +13036,7 @@ let u2 = class extends R7 {
|
|
|
13036
13036
|
for (let f = a; f < o; f++)
|
|
13037
13037
|
r[f] = 0;
|
|
13038
13038
|
tq(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
13039
|
-
const s =
|
|
13039
|
+
const s = ub(t), c = this.outputLen;
|
|
13040
13040
|
if (c % 4)
|
|
13041
13041
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
13042
13042
|
const l = c / 4, u = this.get();
|
|
@@ -13171,9 +13171,9 @@ let L7 = class extends u2 {
|
|
|
13171
13171
|
};
|
|
13172
13172
|
const A0 = Lu(() => new L7());
|
|
13173
13173
|
Lu(() => new iq());
|
|
13174
|
-
const up = BigInt(2 ** 32 - 1),
|
|
13174
|
+
const up = BigInt(2 ** 32 - 1), H1 = BigInt(32);
|
|
13175
13175
|
function H7(e, t = !1) {
|
|
13176
|
-
return t ? { h: Number(e & up), l: Number(e >>
|
|
13176
|
+
return t ? { h: Number(e & up), l: Number(e >> H1 & up) } : { h: Number(e >> H1 & up) | 0, l: Number(e & up) | 0 };
|
|
13177
13177
|
}
|
|
13178
13178
|
function aq(e, t = !1) {
|
|
13179
13179
|
let r = new Uint32Array(e.length), n = new Uint32Array(e.length);
|
|
@@ -13183,7 +13183,7 @@ function aq(e, t = !1) {
|
|
|
13183
13183
|
}
|
|
13184
13184
|
return [r, n];
|
|
13185
13185
|
}
|
|
13186
|
-
const sq = (e, t) => BigInt(e >>> 0) <<
|
|
13186
|
+
const sq = (e, t) => BigInt(e >>> 0) << H1 | BigInt(t >>> 0), cq = (e, t, r) => e >>> r, uq = (e, t, r) => e << 32 - r | t >>> r, lq = (e, t, r) => e >>> r | t << 32 - r, fq = (e, t, r) => e << 32 - r | t >>> r, dq = (e, t, r) => e << 64 - r | t >>> r - 32, hq = (e, t, r) => e >>> r - 32 | t << 64 - r, pq = (e, t) => t, gq = (e, t) => e, mq = (e, t, r) => e << r | t >>> 32 - r, yq = (e, t, r) => t << r | e >>> 32 - r, bq = (e, t, r) => t << r - 32 | e >>> 64 - r, wq = (e, t, r) => e << r - 32 | t >>> 64 - r;
|
|
13187
13187
|
function vq(e, t, r, n) {
|
|
13188
13188
|
const o = (t >>> 0) + (n >>> 0);
|
|
13189
13189
|
return { h: e + r + (o / 2 ** 32 | 0) | 0, l: o | 0 };
|
|
@@ -13509,7 +13509,7 @@ var Wq = /* @__PURE__ */ Object.freeze({
|
|
|
13509
13509
|
xonly_pub: Zq
|
|
13510
13510
|
});
|
|
13511
13511
|
Qe.random(32);
|
|
13512
|
-
const G7 = { secp: aa, schnorr: bD },
|
|
13512
|
+
const G7 = { secp: aa, schnorr: bD }, D1 = { ...Wq, ...HK };
|
|
13513
13513
|
function tm(e) {
|
|
13514
13514
|
const t = X.bytes(e);
|
|
13515
13515
|
return ia(t, 33), d2(t);
|
|
@@ -14283,7 +14283,7 @@ function _F(e, t = {}) {
|
|
|
14283
14283
|
return wA(e, { ...t, isPrivate: !1 });
|
|
14284
14284
|
}
|
|
14285
14285
|
function wA(e, t = {}) {
|
|
14286
|
-
const { isPrivate: r = !1, tree: n = [], version: o = xF } = t, i = r ?
|
|
14286
|
+
const { isPrivate: r = !1, tree: n = [], version: o = xF } = t, i = r ? D1.getPublicKey(e, !0) : wu(e);
|
|
14287
14287
|
let { target: a } = t;
|
|
14288
14288
|
a !== void 0 && (a = X.bytes(a).hex);
|
|
14289
14289
|
let s, c = [];
|
|
@@ -14292,7 +14292,7 @@ function wA(e, t = {}) {
|
|
|
14292
14292
|
c = y, s = xl(e, h, r);
|
|
14293
14293
|
} else
|
|
14294
14294
|
a !== void 0 ? s = xl(e, a, r) : s = xl(e, void 0, r);
|
|
14295
|
-
const l = r ?
|
|
14295
|
+
const l = r ? D1.getPublicKey(s)[0] : s[0], u = [X.num(o + EA(l)), i];
|
|
14296
14296
|
c.length > 0 && c.forEach((h) => u.push(X.hex(h)));
|
|
14297
14297
|
const f = X.join(u);
|
|
14298
14298
|
if (a !== void 0 && !A2(s, a, f, t))
|
|
@@ -14300,7 +14300,7 @@ function wA(e, t = {}) {
|
|
|
14300
14300
|
return [wu(s).hex, f.hex];
|
|
14301
14301
|
}
|
|
14302
14302
|
function A2(e, t, r, n = {}) {
|
|
14303
|
-
const { isPrivate: o = !1, throws: i = !1 } = n, { parity: a, paths: s, intkey: c } = vA(r), l = o ?
|
|
14303
|
+
const { isPrivate: o = !1, throws: i = !1 } = n, { parity: a, paths: s, intkey: c } = vA(r), l = o ? D1.getPublicKey(e, !0) : wu(e), u = X.join([a, l]);
|
|
14304
14304
|
if (u.length !== 33)
|
|
14305
14305
|
return mn("Invalid tapkey: " + u.hex, i);
|
|
14306
14306
|
let f = X.bytes(t).hex;
|
|
@@ -14418,14 +14418,14 @@ var Ct;
|
|
|
14418
14418
|
}
|
|
14419
14419
|
e.joinValues = n, e.jsonStringifyReplacer = (o, i) => typeof i == "bigint" ? i.toString() : i;
|
|
14420
14420
|
})(Ct || (Ct = {}));
|
|
14421
|
-
var
|
|
14421
|
+
var K1;
|
|
14422
14422
|
(function(e) {
|
|
14423
14423
|
e.mergeShapes = (t, r) => ({
|
|
14424
14424
|
...t,
|
|
14425
14425
|
...r
|
|
14426
14426
|
// second overwrites first
|
|
14427
14427
|
});
|
|
14428
|
-
})(
|
|
14428
|
+
})(K1 || (K1 = {}));
|
|
14429
14429
|
const be = Ct.arrayToEnum([
|
|
14430
14430
|
"string",
|
|
14431
14431
|
"nan",
|
|
@@ -14676,7 +14676,7 @@ let no = class xA {
|
|
|
14676
14676
|
};
|
|
14677
14677
|
const ut = Object.freeze({
|
|
14678
14678
|
status: "aborted"
|
|
14679
|
-
}), AA = (e) => ({ status: "dirty", value: e }), zn = (e) => ({ status: "valid", value: e }),
|
|
14679
|
+
}), AA = (e) => ({ status: "dirty", value: e }), zn = (e) => ({ status: "valid", value: e }), q1 = (e) => e.status === "aborted", M1 = (e) => e.status === "dirty", I0 = (e) => e.status === "valid", P0 = (e) => typeof Promise < "u" && e instanceof Promise;
|
|
14680
14680
|
var Ce;
|
|
14681
14681
|
(function(e) {
|
|
14682
14682
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
@@ -15184,7 +15184,7 @@ function FF(e, t) {
|
|
|
15184
15184
|
const r = (e.toString().split(".")[1] || "").length, n = (t.toString().split(".")[1] || "").length, o = r > n ? r : n, i = parseInt(e.toFixed(o).replace(".", "")), a = parseInt(t.toFixed(o).replace(".", ""));
|
|
15185
15185
|
return i % a / Math.pow(10, o);
|
|
15186
15186
|
}
|
|
15187
|
-
let kd = class
|
|
15187
|
+
let kd = class F1 extends It {
|
|
15188
15188
|
constructor() {
|
|
15189
15189
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
15190
15190
|
}
|
|
@@ -15242,7 +15242,7 @@ let kd = class Fb extends It {
|
|
|
15242
15242
|
return this.setLimit("max", t, !1, Ce.toString(r));
|
|
15243
15243
|
}
|
|
15244
15244
|
setLimit(t, r, n, o) {
|
|
15245
|
-
return new
|
|
15245
|
+
return new F1({
|
|
15246
15246
|
...this._def,
|
|
15247
15247
|
checks: [
|
|
15248
15248
|
...this._def.checks,
|
|
@@ -15256,7 +15256,7 @@ let kd = class Fb extends It {
|
|
|
15256
15256
|
});
|
|
15257
15257
|
}
|
|
15258
15258
|
_addCheck(t) {
|
|
15259
|
-
return new
|
|
15259
|
+
return new F1({
|
|
15260
15260
|
...this._def,
|
|
15261
15261
|
checks: [...this._def.checks, t]
|
|
15262
15262
|
});
|
|
@@ -15356,7 +15356,7 @@ kd.create = (e) => new kd({
|
|
|
15356
15356
|
coerce: (e == null ? void 0 : e.coerce) || !1,
|
|
15357
15357
|
...mt(e)
|
|
15358
15358
|
});
|
|
15359
|
-
let xd = class
|
|
15359
|
+
let xd = class V1 extends It {
|
|
15360
15360
|
constructor() {
|
|
15361
15361
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
15362
15362
|
}
|
|
@@ -15404,7 +15404,7 @@ let xd = class Vb extends It {
|
|
|
15404
15404
|
return this.setLimit("max", t, !1, Ce.toString(r));
|
|
15405
15405
|
}
|
|
15406
15406
|
setLimit(t, r, n, o) {
|
|
15407
|
-
return new
|
|
15407
|
+
return new V1({
|
|
15408
15408
|
...this._def,
|
|
15409
15409
|
checks: [
|
|
15410
15410
|
...this._def.checks,
|
|
@@ -15418,7 +15418,7 @@ let xd = class Vb extends It {
|
|
|
15418
15418
|
});
|
|
15419
15419
|
}
|
|
15420
15420
|
_addCheck(t) {
|
|
15421
|
-
return new
|
|
15421
|
+
return new V1({
|
|
15422
15422
|
...this._def,
|
|
15423
15423
|
checks: [...this._def.checks, t]
|
|
15424
15424
|
});
|
|
@@ -16198,14 +16198,14 @@ let SA = class $A extends It {
|
|
|
16198
16198
|
});
|
|
16199
16199
|
}
|
|
16200
16200
|
};
|
|
16201
|
-
function
|
|
16201
|
+
function G1(e, t) {
|
|
16202
16202
|
const r = lc(e), n = lc(t);
|
|
16203
16203
|
if (e === t)
|
|
16204
16204
|
return { valid: !0, data: e };
|
|
16205
16205
|
if (r === be.object && n === be.object) {
|
|
16206
16206
|
const o = Ct.objectKeys(t), i = Ct.objectKeys(e).filter((s) => o.indexOf(s) !== -1), a = { ...e, ...t };
|
|
16207
16207
|
for (const s of i) {
|
|
16208
|
-
const c =
|
|
16208
|
+
const c = G1(e[s], t[s]);
|
|
16209
16209
|
if (!c.valid)
|
|
16210
16210
|
return { valid: !1 };
|
|
16211
16211
|
a[s] = c.data;
|
|
@@ -16216,7 +16216,7 @@ function Gb(e, t) {
|
|
|
16216
16216
|
return { valid: !1 };
|
|
16217
16217
|
const o = [];
|
|
16218
16218
|
for (let i = 0; i < e.length; i++) {
|
|
16219
|
-
const a = e[i], s = t[i], c =
|
|
16219
|
+
const a = e[i], s = t[i], c = G1(a, s);
|
|
16220
16220
|
if (!c.valid)
|
|
16221
16221
|
return { valid: !1 };
|
|
16222
16222
|
o.push(c.data);
|
|
@@ -16227,10 +16227,10 @@ function Gb(e, t) {
|
|
|
16227
16227
|
let Id = class extends It {
|
|
16228
16228
|
_parse(t) {
|
|
16229
16229
|
const { status: r, ctx: n } = this._processInputParams(t), o = (i, a) => {
|
|
16230
|
-
if (
|
|
16230
|
+
if (q1(i) || q1(a))
|
|
16231
16231
|
return ut;
|
|
16232
|
-
const s =
|
|
16233
|
-
return s.valid ? ((
|
|
16232
|
+
const s = G1(i.value, a.value);
|
|
16233
|
+
return s.valid ? ((M1(i) || M1(a)) && r.dirty(), { status: r.value, value: s.data }) : (Ee(n, {
|
|
16234
16234
|
code: fe.invalid_intersection_types
|
|
16235
16235
|
}), ut);
|
|
16236
16236
|
};
|
|
@@ -16312,7 +16312,7 @@ vc.create = (e, t) => {
|
|
|
16312
16312
|
...mt(t)
|
|
16313
16313
|
});
|
|
16314
16314
|
};
|
|
16315
|
-
let IA = class
|
|
16315
|
+
let IA = class Z1 extends It {
|
|
16316
16316
|
get keySchema() {
|
|
16317
16317
|
return this._def.keyType;
|
|
16318
16318
|
}
|
|
@@ -16339,12 +16339,12 @@ let IA = class Zb extends It {
|
|
|
16339
16339
|
return this._def.valueType;
|
|
16340
16340
|
}
|
|
16341
16341
|
static create(t, r, n) {
|
|
16342
|
-
return r instanceof It ? new
|
|
16342
|
+
return r instanceof It ? new Z1({
|
|
16343
16343
|
keyType: t,
|
|
16344
16344
|
valueType: r,
|
|
16345
16345
|
typeName: Fe.ZodRecord,
|
|
16346
16346
|
...mt(n)
|
|
16347
|
-
}) : new
|
|
16347
|
+
}) : new Z1({
|
|
16348
16348
|
keyType: Dl.create(),
|
|
16349
16349
|
valueType: t,
|
|
16350
16350
|
typeName: Fe.ZodRecord,
|
|
@@ -16594,7 +16594,7 @@ function PA(e, t) {
|
|
|
16594
16594
|
...mt(t)
|
|
16595
16595
|
});
|
|
16596
16596
|
}
|
|
16597
|
-
let Eh = class
|
|
16597
|
+
let Eh = class W1 extends It {
|
|
16598
16598
|
_parse(t) {
|
|
16599
16599
|
if (typeof t.data != "string") {
|
|
16600
16600
|
const r = this._getOrReturnCtx(t), n = this._def.values;
|
|
@@ -16636,10 +16636,10 @@ let Eh = class Wb extends It {
|
|
|
16636
16636
|
return t;
|
|
16637
16637
|
}
|
|
16638
16638
|
extract(t) {
|
|
16639
|
-
return
|
|
16639
|
+
return W1.create(t);
|
|
16640
16640
|
}
|
|
16641
16641
|
exclude(t) {
|
|
16642
|
-
return
|
|
16642
|
+
return W1.create(this.options.filter((r) => !t.includes(r)));
|
|
16643
16643
|
}
|
|
16644
16644
|
};
|
|
16645
16645
|
Eh.create = PA;
|
|
@@ -16971,15 +16971,15 @@ var Un = /* @__PURE__ */ Object.freeze({
|
|
|
16971
16971
|
INVALID: ut,
|
|
16972
16972
|
DIRTY: AA,
|
|
16973
16973
|
OK: zn,
|
|
16974
|
-
isAborted:
|
|
16975
|
-
isDirty:
|
|
16974
|
+
isAborted: q1,
|
|
16975
|
+
isDirty: M1,
|
|
16976
16976
|
isValid: I0,
|
|
16977
16977
|
isAsync: P0,
|
|
16978
16978
|
get util() {
|
|
16979
16979
|
return Ct;
|
|
16980
16980
|
},
|
|
16981
16981
|
get objectUtil() {
|
|
16982
|
-
return
|
|
16982
|
+
return K1;
|
|
16983
16983
|
},
|
|
16984
16984
|
ZodParsedType: be,
|
|
16985
16985
|
getParsedType: lc,
|
|
@@ -18170,7 +18170,7 @@ om.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
|
|
|
18170
18170
|
var hi = {}, Da = {};
|
|
18171
18171
|
Object.defineProperty(Da, "__esModule", { value: !0 });
|
|
18172
18172
|
Da.HashMD = Da.Maj = Da.Chi = void 0;
|
|
18173
|
-
const
|
|
18173
|
+
const lb = ko, qf = Pc;
|
|
18174
18174
|
function RV(e, t, r, n) {
|
|
18175
18175
|
if (typeof e.setBigUint64 == "function")
|
|
18176
18176
|
return e.setBigUint64(t, r, n);
|
|
@@ -18186,7 +18186,7 @@ let DV = class extends qf.Hash {
|
|
|
18186
18186
|
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = (0, qf.createView)(this.buffer);
|
|
18187
18187
|
}
|
|
18188
18188
|
update(t) {
|
|
18189
|
-
(0,
|
|
18189
|
+
(0, lb.exists)(this);
|
|
18190
18190
|
const { view: r, buffer: n, blockLen: o } = this;
|
|
18191
18191
|
t = (0, qf.toBytes)(t);
|
|
18192
18192
|
const i = t.length;
|
|
@@ -18203,7 +18203,7 @@ let DV = class extends qf.Hash {
|
|
|
18203
18203
|
return this.length += t.length, this.roundClean(), this;
|
|
18204
18204
|
}
|
|
18205
18205
|
digestInto(t) {
|
|
18206
|
-
(0,
|
|
18206
|
+
(0, lb.exists)(this), (0, lb.output)(t, this), this.finished = !0;
|
|
18207
18207
|
const { buffer: r, view: n, blockLen: o, isLE: i } = this;
|
|
18208
18208
|
let { pos: a } = this;
|
|
18209
18209
|
r[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > o - a && (this.process(n, 0), a = 0);
|
|
@@ -18234,7 +18234,7 @@ let DV = class extends qf.Hash {
|
|
|
18234
18234
|
Da.HashMD = DV;
|
|
18235
18235
|
Object.defineProperty(hi, "__esModule", { value: !0 });
|
|
18236
18236
|
hi.sha224 = hi.sha256 = hi.SHA256 = void 0;
|
|
18237
|
-
const
|
|
18237
|
+
const fb = Da, Ro = Pc, KV = /* @__PURE__ */ new Uint32Array([
|
|
18238
18238
|
1116352408,
|
|
18239
18239
|
1899447441,
|
|
18240
18240
|
3049323471,
|
|
@@ -18309,7 +18309,7 @@ const f1 = Da, Ro = Pc, KV = /* @__PURE__ */ new Uint32Array([
|
|
|
18309
18309
|
528734635,
|
|
18310
18310
|
1541459225
|
|
18311
18311
|
]), Is = /* @__PURE__ */ new Uint32Array(64);
|
|
18312
|
-
let I2 = class extends
|
|
18312
|
+
let I2 = class extends fb.HashMD {
|
|
18313
18313
|
constructor() {
|
|
18314
18314
|
super(64, 32, 8, !1), this.A = Ts[0] | 0, this.B = Ts[1] | 0, this.C = Ts[2] | 0, this.D = Ts[3] | 0, this.E = Ts[4] | 0, this.F = Ts[5] | 0, this.G = Ts[6] | 0, this.H = Ts[7] | 0;
|
|
18315
18315
|
}
|
|
@@ -18330,7 +18330,7 @@ let I2 = class extends f1.HashMD {
|
|
|
18330
18330
|
}
|
|
18331
18331
|
let { A: n, B: o, C: i, D: a, E: s, F: c, G: l, H: u } = this;
|
|
18332
18332
|
for (let f = 0; f < 64; f++) {
|
|
18333
|
-
const h = (0, Ro.rotr)(s, 6) ^ (0, Ro.rotr)(s, 11) ^ (0, Ro.rotr)(s, 25), g = u + h + (0,
|
|
18333
|
+
const h = (0, Ro.rotr)(s, 6) ^ (0, Ro.rotr)(s, 11) ^ (0, Ro.rotr)(s, 25), g = u + h + (0, fb.Chi)(s, c, l) + KV[f] + Is[f] | 0, y = ((0, Ro.rotr)(n, 2) ^ (0, Ro.rotr)(n, 13) ^ (0, Ro.rotr)(n, 22)) + (0, fb.Maj)(n, o, i) | 0;
|
|
18334
18334
|
u = l, l = c, c = s, s = a + g | 0, a = i, i = o, o = n, n = g + y | 0;
|
|
18335
18335
|
}
|
|
18336
18336
|
n = n + this.A | 0, o = o + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, s = s + this.E | 0, c = c + this.F | 0, l = l + this.G | 0, u = u + this.H | 0, this.set(n, o, i, a, s, c, l, u);
|
|
@@ -18369,7 +18369,7 @@ var Ot = /* @__PURE__ */ VV(MV);
|
|
|
18369
18369
|
const Oc = "Expected Private", Bc = "Expected Point", kh = "Expected Tweak", GV = "Expected Hash", z0 = "Expected Signature", P2 = "Expected Extra Data (32 bytes)", xh = "Expected Scalar", ZV = "Bad Recovery Id";
|
|
18370
18370
|
Ot.utils.hmacSha256Sync = (e, ...t) => FV.hmac(VA.sha256, e, Ot.utils.concatBytes(...t));
|
|
18371
18371
|
Ot.utils.sha256Sync = (...e) => VA.sha256(Ot.utils.concatBytes(...e));
|
|
18372
|
-
const O2 = Ot.utils._normalizePrivateKey, WV = 32, XV = 32,
|
|
18372
|
+
const O2 = Ot.utils._normalizePrivateKey, WV = 32, XV = 32, X1 = new Uint8Array([
|
|
18373
18373
|
255,
|
|
18374
18374
|
255,
|
|
18375
18375
|
255,
|
|
@@ -18449,10 +18449,10 @@ function t8(e) {
|
|
|
18449
18449
|
return Cd(e, JV) === 0;
|
|
18450
18450
|
}
|
|
18451
18451
|
function Ah(e) {
|
|
18452
|
-
return !(!(e instanceof Uint8Array) || e.length !== XV || Cd(e,
|
|
18452
|
+
return !(!(e instanceof Uint8Array) || e.length !== XV || Cd(e, X1) >= 0);
|
|
18453
18453
|
}
|
|
18454
18454
|
function B2(e) {
|
|
18455
|
-
return e instanceof Uint8Array && e.length === 64 && Cd(e.subarray(0, 32),
|
|
18455
|
+
return e instanceof Uint8Array && e.length === 64 && Cd(e.subarray(0, 32), X1) < 0 && Cd(e.subarray(32, 64), X1) < 0;
|
|
18456
18456
|
}
|
|
18457
18457
|
function tG(e) {
|
|
18458
18458
|
return eG(e) && e.length === 64 && Cd(e.subarray(0, 32), QV) < 0;
|
|
@@ -18704,9 +18704,9 @@ var JA = {}, yf = {};
|
|
|
18704
18704
|
yf.byteLength = VG;
|
|
18705
18705
|
yf.toByteArray = ZG;
|
|
18706
18706
|
yf.fromByteArray = YG;
|
|
18707
|
-
var Zi = [], Ho = [], MG = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
18708
|
-
for (var tl = 0, FG =
|
|
18709
|
-
Zi[tl] =
|
|
18707
|
+
var Zi = [], Ho = [], MG = typeof Uint8Array < "u" ? Uint8Array : Array, db = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
18708
|
+
for (var tl = 0, FG = db.length; tl < FG; ++tl)
|
|
18709
|
+
Zi[tl] = db[tl], Ho[db.charCodeAt(tl)] = tl;
|
|
18710
18710
|
Ho[45] = 62;
|
|
18711
18711
|
Ho[95] = 63;
|
|
18712
18712
|
function QA(e) {
|
|
@@ -19717,7 +19717,7 @@ z2.write = function(e, t, r, n, o, i) {
|
|
|
19717
19717
|
throw new Error("BigInt not supported");
|
|
19718
19718
|
}
|
|
19719
19719
|
})(JA);
|
|
19720
|
-
const owe = "Mainnet",
|
|
19720
|
+
const owe = "Mainnet", Y1 = "BITCOIN_MAINNET", e_ = "BITCOIN_TESTNET", t_ = "BITCOIN_TESTNET4", r_ = "BITCOIN_SIGNET", n_ = "FRACTAL_BITCOIN_MAINNET", o_ = "FRACTAL_BITCOIN_TESTNET", iwe = "livenet", awe = "testnet", J1 = "Mainnet", i_ = "Testnet", JG = "Signet", QG = "livenet", eZ = "testnet", R0 = "livenet", Q1 = "testnet", a_ = "testnet4", s_ = "signet", r8 = "Mainnet", tZ = "Testnet", ew = "mainnet", c_ = "testnet", Bt = "mainnet", Xn = "signet", ur = "testnet", Fn = "testnet4", bf = "fractal mainnet", Vn = "fractal testnet", swe = "regtest", sd = (e) => e === Bt ? J1 : e === ur ? i_ : e === Xn ? JG : J1, cwe = (e) => e === Bt ? ew : e === ur ? c_ : ew, u_ = (e) => e === Bt ? Y1 : e === ur ? e_ : e === Fn ? t_ : e === Xn ? r_ : e === bf ? n_ : e === Vn ? o_ : Y1, uwe = (e) => e === Bt ? R0 : e === ur ? Q1 : e === Fn ? a_ : e === Xn ? s_ : e === Vn ? Q1 : R0, dp = (e) => e === Bt ? r8 : e === ur ? tZ : r8, n8 = (e) => e === Y1 ? Bt : e === e_ ? ur : e === t_ ? Fn : e === r_ ? Xn : e === n_ ? bf : e === o_ ? Vn : Bt, lwe = (e) => e === J1 ? Bt : e === i_ ? ur : Bt, fwe = (e) => e === ew ? Bt : e === c_ ? ur : Bt, rZ = (e) => e === QG ? Bt : e === eZ ? ur : Bt, o8 = (e) => e === R0 ? Bt : e === Q1 ? ur : e === a_ ? Fn : e === s_ ? Xn : e === Vn ? ur : Bt;
|
|
19721
19721
|
function l_(e, t) {
|
|
19722
19722
|
return function() {
|
|
19723
19723
|
return e.apply(t, arguments);
|
|
@@ -19854,10 +19854,10 @@ const vZ = (e, t, r, { allOwnKeys: n } = {}) => (_h(t, (o, i) => {
|
|
|
19854
19854
|
};
|
|
19855
19855
|
return wf(e) ? n(e) : n(String(e).split(t)), r;
|
|
19856
19856
|
}, CZ = () => {
|
|
19857
|
-
}, NZ = (e, t) => e != null && Number.isFinite(e = +e) ? e : t,
|
|
19857
|
+
}, NZ = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, hb = "abcdefghijklmnopqrstuvwxyz", a8 = "0123456789", m_ = {
|
|
19858
19858
|
DIGIT: a8,
|
|
19859
|
-
ALPHA:
|
|
19860
|
-
ALPHA_DIGIT:
|
|
19859
|
+
ALPHA: hb,
|
|
19860
|
+
ALPHA_DIGIT: hb + hb.toUpperCase() + a8
|
|
19861
19861
|
}, jZ = (e = 16, t = m_.ALPHA_DIGIT) => {
|
|
19862
19862
|
let r = "";
|
|
19863
19863
|
const { length: n } = t;
|
|
@@ -20355,7 +20355,7 @@ function aW(e) {
|
|
|
20355
20355
|
return t;
|
|
20356
20356
|
}
|
|
20357
20357
|
const sW = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
20358
|
-
function
|
|
20358
|
+
function pb(e, t, r, n, o) {
|
|
20359
20359
|
if (te.isFunction(n))
|
|
20360
20360
|
return n.call(this, t, r);
|
|
20361
20361
|
if (o && (t = r), !!te.isString(t)) {
|
|
@@ -20424,7 +20424,7 @@ let Jn = class {
|
|
|
20424
20424
|
has(t, r) {
|
|
20425
20425
|
if (t = Mf(t), t) {
|
|
20426
20426
|
const n = te.findKey(this, t);
|
|
20427
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
20427
|
+
return !!(n && this[n] !== void 0 && (!r || pb(this, this[n], n, r)));
|
|
20428
20428
|
}
|
|
20429
20429
|
return !1;
|
|
20430
20430
|
}
|
|
@@ -20434,7 +20434,7 @@ let Jn = class {
|
|
|
20434
20434
|
function i(a) {
|
|
20435
20435
|
if (a = Mf(a), a) {
|
|
20436
20436
|
const s = te.findKey(n, a);
|
|
20437
|
-
s && (!r ||
|
|
20437
|
+
s && (!r || pb(n, n[s], s, r)) && (delete n[s], o = !0);
|
|
20438
20438
|
}
|
|
20439
20439
|
}
|
|
20440
20440
|
return te.isArray(t) ? t.forEach(i) : i(t), o;
|
|
@@ -20444,7 +20444,7 @@ let Jn = class {
|
|
|
20444
20444
|
let n = r.length, o = !1;
|
|
20445
20445
|
for (; n--; ) {
|
|
20446
20446
|
const i = r[n];
|
|
20447
|
-
(!t ||
|
|
20447
|
+
(!t || pb(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
20448
20448
|
}
|
|
20449
20449
|
return o;
|
|
20450
20450
|
}
|
|
@@ -20508,7 +20508,7 @@ te.reduceDescriptors(Jn.prototype, ({ value: e }, t) => {
|
|
|
20508
20508
|
};
|
|
20509
20509
|
});
|
|
20510
20510
|
te.freezeMethods(Jn);
|
|
20511
|
-
function
|
|
20511
|
+
function gb(e, t) {
|
|
20512
20512
|
const r = this || Sh, n = t || r, o = Jn.from(n.headers);
|
|
20513
20513
|
let i = n.data;
|
|
20514
20514
|
return te.forEach(e, function(a) {
|
|
@@ -21052,22 +21052,22 @@ const m8 = (e) => `- ${e}`, TW = (e) => te.isFunction(e) || e === null || e ===
|
|
|
21052
21052
|
},
|
|
21053
21053
|
adapters: iw
|
|
21054
21054
|
};
|
|
21055
|
-
function
|
|
21055
|
+
function mb(e) {
|
|
21056
21056
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
21057
21057
|
throw new vf(null, e);
|
|
21058
21058
|
}
|
|
21059
21059
|
function y8(e) {
|
|
21060
|
-
return
|
|
21060
|
+
return mb(e), e.headers = Jn.from(e.headers), e.data = gb.call(
|
|
21061
21061
|
e,
|
|
21062
21062
|
e.transformRequest
|
|
21063
21063
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), O_.getAdapter(e.adapter || Sh.adapter)(e).then(function(t) {
|
|
21064
|
-
return
|
|
21064
|
+
return mb(e), t.data = gb.call(
|
|
21065
21065
|
e,
|
|
21066
21066
|
e.transformResponse,
|
|
21067
21067
|
t
|
|
21068
21068
|
), t.headers = Jn.from(t.headers), t;
|
|
21069
21069
|
}, function(t) {
|
|
21070
|
-
return __(t) || (
|
|
21070
|
+
return __(t) || (mb(e), t && t.response && (t.response.data = gb.call(
|
|
21071
21071
|
e,
|
|
21072
21072
|
e.transformResponse,
|
|
21073
21073
|
t.response
|
|
@@ -21519,7 +21519,7 @@ const DW = (e, t) => {
|
|
|
21519
21519
|
} catch {
|
|
21520
21520
|
try {
|
|
21521
21521
|
const r = Pv(e);
|
|
21522
|
-
if (r.version === 0 && r.data.length === 20) return
|
|
21522
|
+
if (r.version === 0 && r.data.length === 20) return c1;
|
|
21523
21523
|
if (r.version === 0 && r.data.length === 32) return PB;
|
|
21524
21524
|
if (r.version === 1 && r.data.length === 32) return nd;
|
|
21525
21525
|
} catch {
|
|
@@ -42829,7 +42829,7 @@ function Ef(...e) {
|
|
|
42829
42829
|
}
|
|
42830
42830
|
};
|
|
42831
42831
|
}
|
|
42832
|
-
const fw = Ef(ym(), hm(), gm(0), pm(4294967295)), PX = Ef(ym(), hm(), gm(0), pm(2147483647)), OX = Ef(ym(), hm(), gm(0), pm(255)),
|
|
42832
|
+
const fw = Ef(ym(), hm(), gm(0), pm(4294967295)), PX = Ef(ym(), hm(), gm(0), pm(2147483647)), OX = Ef(ym(), hm(), gm(0), pm(255)), yb = Ef(mm(Uint8Array), G2(32)), BX = Ef(mm(Uint8Array), G2(33)), UX = lw({
|
|
42833
42833
|
wif: OX,
|
|
42834
42834
|
bip32: lw({
|
|
42835
42835
|
public: fw,
|
|
@@ -43056,7 +43056,7 @@ function zX(e) {
|
|
|
43056
43056
|
return c(h, g, y);
|
|
43057
43057
|
}
|
|
43058
43058
|
function c(h, g, y, m, w, v) {
|
|
43059
|
-
if (va(
|
|
43059
|
+
if (va(yb, h), va(yb, g), y = y || t, !e.isPrivate(h))
|
|
43060
43060
|
throw new TypeError("Private key not in range [1, n)");
|
|
43061
43061
|
return new i(h, void 0, g, y, m, w, v);
|
|
43062
43062
|
}
|
|
@@ -43064,7 +43064,7 @@ function zX(e) {
|
|
|
43064
43064
|
return u(h, g, y);
|
|
43065
43065
|
}
|
|
43066
43066
|
function u(h, g, y, m, w, v) {
|
|
43067
|
-
if (va(BX, h), va(
|
|
43067
|
+
if (va(BX, h), va(yb, g), y = y || t, !e.isPoint(h))
|
|
43068
43068
|
throw new TypeError("Point is not on the curve");
|
|
43069
43069
|
return new i(void 0, h, g, y, m, w, v);
|
|
43070
43070
|
}
|
|
@@ -43089,60 +43089,68 @@ bk(j2);
|
|
|
43089
43089
|
const HX = async ({
|
|
43090
43090
|
contentBase64: e,
|
|
43091
43091
|
mimeType: t,
|
|
43092
|
-
|
|
43093
|
-
|
|
43094
|
-
|
|
43095
|
-
|
|
43092
|
+
quantity: r = 1,
|
|
43093
|
+
inscriptions: n,
|
|
43094
|
+
ordinalAddress: o,
|
|
43095
|
+
paymentAddress: i,
|
|
43096
|
+
paymentPublicKey: a,
|
|
43097
|
+
signPsbt: s
|
|
43096
43098
|
}) => {
|
|
43097
43099
|
try {
|
|
43098
|
-
|
|
43099
|
-
contentBase64
|
|
43100
|
-
|
|
43101
|
-
|
|
43102
|
-
|
|
43103
|
-
privKey: s
|
|
43100
|
+
if (!e && !n)
|
|
43101
|
+
throw new Error("contentBase64 or inscriptions is required");
|
|
43102
|
+
const c = await qX(), l = Buffer.from(c).toString("hex"), u = n || Array(r).fill({
|
|
43103
|
+
content: e,
|
|
43104
|
+
mimeType: t
|
|
43104
43105
|
});
|
|
43105
|
-
|
|
43106
|
+
console.log("INSCRIPTIONS", u);
|
|
43107
|
+
const f = await DX({
|
|
43108
|
+
inscriptions: u,
|
|
43109
|
+
paymentAddress: i,
|
|
43110
|
+
paymentPublicKey: a,
|
|
43111
|
+
privKey: l
|
|
43112
|
+
});
|
|
43113
|
+
if (!f || !(f != null && f.psbtHex))
|
|
43106
43114
|
throw new Error("couldn't get commit tx");
|
|
43107
|
-
const
|
|
43115
|
+
const h = String(f == null ? void 0 : f.psbtHex), g = String(f == null ? void 0 : f.psbtBase64), y = await s(
|
|
43108
43116
|
"",
|
|
43109
|
-
|
|
43110
|
-
|
|
43117
|
+
h,
|
|
43118
|
+
g,
|
|
43111
43119
|
!0,
|
|
43112
43120
|
!1
|
|
43113
43121
|
);
|
|
43114
|
-
if (!
|
|
43115
|
-
const
|
|
43116
|
-
if (!
|
|
43122
|
+
if (!y) throw new Error("sign psbt failed");
|
|
43123
|
+
const m = Wr.fromHex((y == null ? void 0 : y.signedPsbtHex) || "").extractTransaction(), w = await F2(m.toHex(), Bt);
|
|
43124
|
+
if (!w) throw new Error("commit tx failed");
|
|
43117
43125
|
return await KX({
|
|
43118
|
-
|
|
43119
|
-
|
|
43120
|
-
|
|
43121
|
-
|
|
43122
|
-
commitTxId: g
|
|
43126
|
+
inscriptions: u,
|
|
43127
|
+
ordinalAddress: o,
|
|
43128
|
+
privKey: l,
|
|
43129
|
+
commitTxId: w
|
|
43123
43130
|
});
|
|
43124
|
-
} catch (
|
|
43125
|
-
throw
|
|
43131
|
+
} catch (c) {
|
|
43132
|
+
throw c;
|
|
43126
43133
|
}
|
|
43127
43134
|
}, DX = async ({
|
|
43128
|
-
|
|
43129
|
-
|
|
43130
|
-
|
|
43131
|
-
|
|
43132
|
-
privKey: o
|
|
43135
|
+
inscriptions: e,
|
|
43136
|
+
paymentAddress: t,
|
|
43137
|
+
paymentPublicKey: r,
|
|
43138
|
+
privKey: n
|
|
43133
43139
|
}) => {
|
|
43134
43140
|
try {
|
|
43135
|
-
const i =
|
|
43141
|
+
const o = e.length, i = e.reduce(
|
|
43142
|
+
(S, O) => S + Buffer.from(O.content).length,
|
|
43143
|
+
0
|
|
43144
|
+
);
|
|
43136
43145
|
if (i > 39e4)
|
|
43137
43146
|
throw new Error("Content size is too large, must be less than 390kb");
|
|
43138
|
-
const { fastestFee: a } = await ZX(Bt), s = Ex(String(
|
|
43147
|
+
const { fastestFee: a } = await ZX(Bt), s = Ex(String(n), !0), c = new Wr({
|
|
43139
43148
|
network: Xo
|
|
43140
43149
|
}), { inscriberAddress: l } = MX(
|
|
43141
43150
|
s,
|
|
43142
|
-
e
|
|
43143
|
-
|
|
43144
|
-
|
|
43145
|
-
r,
|
|
43151
|
+
e
|
|
43152
|
+
), u = 5 * 34 * o, f = Math.floor(u * a * o), h = Math.floor(i * a / 3) + 1e3 + 546 * o, g = Math.floor(f + h), y = (await M2(
|
|
43153
|
+
t,
|
|
43146
43154
|
Bt
|
|
43147
43155
|
)).filter((S) => S.value > 3e3).sort((S, O) => O.value - S.value), m = HW(y);
|
|
43148
43156
|
if (m === 0)
|
|
@@ -43150,18 +43158,18 @@ const HX = async ({
|
|
|
43150
43158
|
if (m < g)
|
|
43151
43159
|
throw new Error("insufficient funds");
|
|
43152
43160
|
let w = 0;
|
|
43153
|
-
const v = await Ov(
|
|
43161
|
+
const v = await Ov(t);
|
|
43154
43162
|
let x = 0;
|
|
43155
43163
|
for await (const S of y) {
|
|
43156
|
-
const O = DW(
|
|
43164
|
+
const O = DW(t, Bt);
|
|
43157
43165
|
if (console.log({ paymentAddressType: O }), c.addInput({
|
|
43158
43166
|
hash: S.txid,
|
|
43159
43167
|
index: S.vout,
|
|
43160
43168
|
witnessUtxo: { value: BigInt(S.value), script: v }
|
|
43161
43169
|
}), O === nd && c.updateInput(x, {
|
|
43162
|
-
tapInternalKey: ad(Buffer.from(
|
|
43170
|
+
tapInternalKey: ad(Buffer.from(r, "hex"))
|
|
43163
43171
|
}), O === M6) {
|
|
43164
|
-
let T = j_(
|
|
43172
|
+
let T = j_(r, Bt);
|
|
43165
43173
|
c.updateInput(x, { redeemScript: T });
|
|
43166
43174
|
}
|
|
43167
43175
|
if (x++, w += S.value, w > g)
|
|
@@ -43173,85 +43181,82 @@ const HX = async ({
|
|
|
43173
43181
|
address: l
|
|
43174
43182
|
}), E > 546 && c.addOutput({
|
|
43175
43183
|
value: BigInt(E),
|
|
43176
|
-
address:
|
|
43184
|
+
address: t
|
|
43177
43185
|
}), {
|
|
43178
43186
|
psbtHex: c.toHex(),
|
|
43179
43187
|
psbtBase64: c.toBase64()
|
|
43180
43188
|
};
|
|
43181
|
-
} catch (
|
|
43182
|
-
throw
|
|
43189
|
+
} catch (o) {
|
|
43190
|
+
throw o;
|
|
43183
43191
|
}
|
|
43184
43192
|
}, KX = async ({
|
|
43185
|
-
|
|
43186
|
-
|
|
43187
|
-
|
|
43188
|
-
|
|
43189
|
-
|
|
43190
|
-
isDry: i
|
|
43193
|
+
inscriptions: e,
|
|
43194
|
+
ordinalAddress: t,
|
|
43195
|
+
commitTxId: r,
|
|
43196
|
+
privKey: n,
|
|
43197
|
+
isDry: o
|
|
43191
43198
|
}) => {
|
|
43192
43199
|
try {
|
|
43193
|
-
const
|
|
43194
|
-
if (!await GX(String(
|
|
43200
|
+
const i = ZR(n), a = Ex(n, !0), s = k9(a, e), c = S0.encodeScript(s), [l, u] = S0.getPubKey(a, { target: c });
|
|
43201
|
+
if (!await GX(String(r)))
|
|
43195
43202
|
throw new Error("ERROR WAITING FOR COMMIT TX");
|
|
43196
|
-
const
|
|
43197
|
-
if (
|
|
43203
|
+
const f = await WX(r, 0);
|
|
43204
|
+
if (f === 0 || !f)
|
|
43198
43205
|
throw new Error("ERROR GETTING FIRST INPUT VALUE");
|
|
43199
|
-
const
|
|
43206
|
+
const h = fi.create({
|
|
43200
43207
|
vin: [
|
|
43201
43208
|
{
|
|
43202
|
-
txid:
|
|
43209
|
+
txid: r,
|
|
43203
43210
|
vout: 0,
|
|
43204
43211
|
prevout: {
|
|
43205
|
-
value:
|
|
43206
|
-
scriptPubKey: ["OP_1",
|
|
43212
|
+
value: f,
|
|
43213
|
+
scriptPubKey: ["OP_1", l]
|
|
43207
43214
|
}
|
|
43208
43215
|
}
|
|
43209
43216
|
],
|
|
43210
43217
|
vout: [
|
|
43211
|
-
{
|
|
43218
|
+
...Array(e.length).fill({
|
|
43212
43219
|
value: 546,
|
|
43213
|
-
scriptPubKey: gA.toScriptPubKey(
|
|
43214
|
-
}
|
|
43220
|
+
scriptPubKey: gA.toScriptPubKey(t)
|
|
43221
|
+
})
|
|
43215
43222
|
]
|
|
43216
|
-
}),
|
|
43217
|
-
return
|
|
43218
|
-
} catch (
|
|
43219
|
-
throw
|
|
43223
|
+
}), g = TF.taproot.sign(i, h, 0, { extension: c });
|
|
43224
|
+
return h.vin[0].witness = [g, s, u], o ? fi.util.getTxid(h) : await F2(fi.encode(h).hex, Bt);
|
|
43225
|
+
} catch (i) {
|
|
43226
|
+
throw i;
|
|
43220
43227
|
}
|
|
43221
43228
|
};
|
|
43222
43229
|
async function qX() {
|
|
43223
43230
|
const e = crypto.getRandomValues(new Uint8Array(32)), t = fX(Buffer.from(e)), r = await lX(t), n = LX.fromSeed(r);
|
|
43224
43231
|
return n == null ? void 0 : n.derivePath("m/44'/0'/0'/0/0").privateKey;
|
|
43225
43232
|
}
|
|
43226
|
-
const k9 = (e, t
|
|
43227
|
-
const
|
|
43228
|
-
|
|
43229
|
-
|
|
43230
|
-
|
|
43231
|
-
|
|
43232
|
-
|
|
43233
|
-
|
|
43234
|
-
|
|
43235
|
-
|
|
43236
|
-
|
|
43237
|
-
|
|
43238
|
-
|
|
43239
|
-
|
|
43240
|
-
|
|
43241
|
-
"OP_IF",
|
|
43242
|
-
|
|
43243
|
-
|
|
43244
|
-
|
|
43245
|
-
"
|
|
43246
|
-
|
|
43247
|
-
|
|
43248
|
-
];
|
|
43249
|
-
}, MX = (e, t, r) => {
|
|
43250
|
-
const n = k9(e, t, r), o = S0.encodeScript(n), [i] = S0.getPubKey(e, { target: o });
|
|
43233
|
+
const k9 = (e, t) => {
|
|
43234
|
+
const r = new TextEncoder(), n = r.encode("ord"), o = 546, i = (s, c) => {
|
|
43235
|
+
let l;
|
|
43236
|
+
if (c === RX) {
|
|
43237
|
+
const f = Buffer.from(s, "base64").toString("utf-8");
|
|
43238
|
+
l = Buffer.from(f, "utf-8");
|
|
43239
|
+
} else
|
|
43240
|
+
l = Buffer.from(s, "base64");
|
|
43241
|
+
const u = [];
|
|
43242
|
+
for (let f = 0; f < l.length; f += 520)
|
|
43243
|
+
u.push(l.slice(f, f + 520));
|
|
43244
|
+
return u;
|
|
43245
|
+
}, a = [e, "OP_CHECKSIG"];
|
|
43246
|
+
return t.forEach((s, c) => {
|
|
43247
|
+
const { content: l, mimeType: u } = s, f = i(l, u);
|
|
43248
|
+
if (a.push("OP_0", "OP_IF", n, "01", r.encode(u), "OP_0"), c > 0) {
|
|
43249
|
+
const h = o * (c + 1), g = Buffer.from([h]);
|
|
43250
|
+
a.push(Buffer.from([2])), a.push(g);
|
|
43251
|
+
}
|
|
43252
|
+
a.push(...f.map((h) => h), "OP_ENDIF");
|
|
43253
|
+
}), a;
|
|
43254
|
+
}, MX = (e, t) => {
|
|
43255
|
+
const r = k9(e, t), n = S0.encodeScript(r), [o] = S0.getPubKey(e, { target: n });
|
|
43251
43256
|
return {
|
|
43252
|
-
inscriberAddress: gA.p2tr.fromPubKey(
|
|
43253
|
-
tpubkey:
|
|
43254
|
-
tapleaf:
|
|
43257
|
+
inscriberAddress: gA.p2tr.fromPubKey(o),
|
|
43258
|
+
tpubkey: o,
|
|
43259
|
+
tapleaf: n
|
|
43255
43260
|
};
|
|
43256
43261
|
};
|
|
43257
43262
|
async function FX(e, t = Bt) {
|
|
@@ -43501,8 +43506,8 @@ function Ewe() {
|
|
|
43501
43506
|
[Dc]: !1
|
|
43502
43507
|
}
|
|
43503
43508
|
}),
|
|
43504
|
-
$network:
|
|
43505
|
-
$library:
|
|
43509
|
+
$network: s1(Bt),
|
|
43510
|
+
$library: s1(void 0)
|
|
43506
43511
|
};
|
|
43507
43512
|
}
|
|
43508
43513
|
function kwe({ network: e }) {
|
|
@@ -43942,13 +43947,13 @@ var Em = {}, km = {}, Vl = {};
|
|
|
43942
43947
|
Object.defineProperty(Vl, "__esModule", { value: !0 });
|
|
43943
43948
|
Vl.joseToDer = Vl.derToJose = void 0;
|
|
43944
43949
|
const P9 = yf, O9 = Tn;
|
|
43945
|
-
function
|
|
43950
|
+
function bb(e) {
|
|
43946
43951
|
return (e / 8 | 0) + (e % 8 === 0 ? 0 : 1);
|
|
43947
43952
|
}
|
|
43948
43953
|
const aY = {
|
|
43949
|
-
ES256:
|
|
43950
|
-
ES384:
|
|
43951
|
-
ES512:
|
|
43954
|
+
ES256: bb(256),
|
|
43955
|
+
ES384: bb(384),
|
|
43956
|
+
ES512: bb(521)
|
|
43952
43957
|
};
|
|
43953
43958
|
function B9(e) {
|
|
43954
43959
|
const t = aY[e];
|
|
@@ -44312,7 +44317,7 @@ var U8 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
|
44312
44317
|
const e = Array(256).fill(-1);
|
|
44313
44318
|
for (let t = 0; t < U8.length; ++t) e[U8.charCodeAt(t)] = t;
|
|
44314
44319
|
})();
|
|
44315
|
-
var C8,
|
|
44320
|
+
var C8, wb, yp, Y2 = (C8 = function(e, t) {
|
|
44316
44321
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.bech32m = t.bech32 = void 0;
|
|
44317
44322
|
const r = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", n = {};
|
|
44318
44323
|
for (let f = 0; f < 32; f++) {
|
|
@@ -44406,7 +44411,7 @@ var C8, w1, yp, Y2 = (C8 = function(e, t) {
|
|
|
44406
44411
|
}, toWords: s, fromWordsUnsafe: c, fromWords: l };
|
|
44407
44412
|
}
|
|
44408
44413
|
t.bech32 = u("bech32"), t.bech32m = u("bech32m");
|
|
44409
|
-
}, C8(
|
|
44414
|
+
}, C8(wb = { exports: {} }, wb.exports), wb.exports);
|
|
44410
44415
|
(yp = Y2) && yp.__esModule && Object.prototype.hasOwnProperty.call(yp, "default") && yp.default;
|
|
44411
44416
|
Y2.bech32m;
|
|
44412
44417
|
Y2.bech32;
|
|
@@ -44884,7 +44889,7 @@ function kf(e, t = {}, r = {}) {
|
|
|
44884
44889
|
}), i;
|
|
44885
44890
|
}
|
|
44886
44891
|
const lJ = "XVERSE_CONNECTED_WALLET_STATE";
|
|
44887
|
-
|
|
44892
|
+
class fJ extends ns {
|
|
44888
44893
|
constructor() {
|
|
44889
44894
|
super(...arguments), $e(this, "observer"), $e(this, "$valueStore", kf(
|
|
44890
44895
|
lJ,
|
|
@@ -45059,7 +45064,8 @@ let fJ = class extends ns {
|
|
|
45059
45064
|
txId: y
|
|
45060
45065
|
};
|
|
45061
45066
|
}
|
|
45062
|
-
}
|
|
45067
|
+
}
|
|
45068
|
+
class dJ extends ns {
|
|
45063
45069
|
constructor() {
|
|
45064
45070
|
super(...arguments), $e(this, "observer");
|
|
45065
45071
|
}
|
|
@@ -45168,9 +45174,9 @@ let fJ = class extends ns {
|
|
|
45168
45174
|
txId: l
|
|
45169
45175
|
};
|
|
45170
45176
|
}
|
|
45171
|
-
}
|
|
45177
|
+
}
|
|
45172
45178
|
const hJ = "OYL_CONNECTED_WALLET_STATE";
|
|
45173
|
-
|
|
45179
|
+
class pJ extends ns {
|
|
45174
45180
|
constructor() {
|
|
45175
45181
|
super(...arguments), $e(this, "observer"), $e(this, "$valueStore", kf(
|
|
45176
45182
|
hJ,
|
|
@@ -45289,9 +45295,9 @@ let pJ = class extends ns {
|
|
|
45289
45295
|
async switchNetwork() {
|
|
45290
45296
|
throw dw;
|
|
45291
45297
|
}
|
|
45292
|
-
}
|
|
45298
|
+
}
|
|
45293
45299
|
const gJ = "LEATHER_CONNECTED_WALLET_STATE";
|
|
45294
|
-
|
|
45300
|
+
class mJ extends ns {
|
|
45295
45301
|
constructor() {
|
|
45296
45302
|
super(...arguments), $e(this, "observer"), $e(this, "$valueStore", kf(
|
|
45297
45303
|
gJ,
|
|
@@ -45355,7 +45361,7 @@ let mJ = class extends ns {
|
|
|
45355
45361
|
), a = o.find(
|
|
45356
45362
|
(c) => c.type === nd
|
|
45357
45363
|
), s = o.find(
|
|
45358
|
-
(c) => c.type ===
|
|
45364
|
+
(c) => c.type === c1
|
|
45359
45365
|
);
|
|
45360
45366
|
if (!(a != null && a.publicKey) || !(s != null && s.publicKey))
|
|
45361
45367
|
throw new Error("No accounts found");
|
|
@@ -45386,7 +45392,7 @@ let mJ = class extends ns {
|
|
|
45386
45392
|
}
|
|
45387
45393
|
async signMessage(t, r) {
|
|
45388
45394
|
var n;
|
|
45389
|
-
const o = r === this.$store.get().address ? nd :
|
|
45395
|
+
const o = r === this.$store.get().address ? nd : c1;
|
|
45390
45396
|
if (r !== this.$store.get().address && r !== this.$store.get().paymentAddress)
|
|
45391
45397
|
throw new Error("Invalid address to sign message");
|
|
45392
45398
|
const i = await this.library.request("signMessage", {
|
|
@@ -45448,7 +45454,7 @@ let mJ = class extends ns {
|
|
|
45448
45454
|
), r = t.addresses.map((n) => n.address);
|
|
45449
45455
|
return this.$store.setKey("accounts", r), r;
|
|
45450
45456
|
}
|
|
45451
|
-
}
|
|
45457
|
+
}
|
|
45452
45458
|
var Q2 = {}, M9 = {}, Ti = {}, F9 = {};
|
|
45453
45459
|
Object.defineProperty(F9, "__esModule", { value: !0 });
|
|
45454
45460
|
(function(e) {
|
|
@@ -45828,7 +45834,7 @@ const RJ = /* @__PURE__ */ BU(Q2), {
|
|
|
45828
45834
|
sendBtcTransaction: HJ,
|
|
45829
45835
|
signTransaction: DJ
|
|
45830
45836
|
} = RJ, KJ = "ORANGE_CONNECTED_WALLET_STATE";
|
|
45831
|
-
|
|
45837
|
+
let qJ = class extends ns {
|
|
45832
45838
|
constructor() {
|
|
45833
45839
|
super(...arguments), $e(this, "observer"), $e(this, "$valueStore", kf(
|
|
45834
45840
|
KJ,
|
|
@@ -46027,9 +46033,9 @@ class qJ extends ns {
|
|
|
46027
46033
|
txId: y
|
|
46028
46034
|
};
|
|
46029
46035
|
}
|
|
46030
|
-
}
|
|
46036
|
+
};
|
|
46031
46037
|
const MJ = "OKX_CONNECTED_WALLET_STATE";
|
|
46032
|
-
|
|
46038
|
+
let FJ = class extends ns {
|
|
46033
46039
|
constructor() {
|
|
46034
46040
|
super(...arguments), $e(this, "observer"), $e(this, "$valueStore", kf(
|
|
46035
46041
|
MJ,
|
|
@@ -46143,9 +46149,9 @@ class FJ extends ns {
|
|
|
46143
46149
|
txId: void 0
|
|
46144
46150
|
};
|
|
46145
46151
|
}
|
|
46146
|
-
}
|
|
46152
|
+
};
|
|
46147
46153
|
const VJ = "MAGIC_EDEN_CONNECTED_WALLET_STATE";
|
|
46148
|
-
|
|
46154
|
+
let GJ = class extends ns {
|
|
46149
46155
|
constructor() {
|
|
46150
46156
|
super(...arguments), $e(this, "observer"), $e(this, "$valueStore", kf(
|
|
46151
46157
|
VJ,
|
|
@@ -46356,8 +46362,7 @@ class GJ extends ns {
|
|
|
46356
46362
|
txId: y
|
|
46357
46363
|
};
|
|
46358
46364
|
}
|
|
46359
|
-
}
|
|
46360
|
-
class ZJ extends ns {
|
|
46365
|
+
}, ZJ = class extends ns {
|
|
46361
46366
|
constructor() {
|
|
46362
46367
|
super(...arguments), $e(this, "observer");
|
|
46363
46368
|
}
|
|
@@ -46474,7 +46479,7 @@ class ZJ extends ns {
|
|
|
46474
46479
|
const n = u_(t);
|
|
46475
46480
|
await ((r = this.library) == null ? void 0 : r.switchChain(n)), this.$network.set(t), await this.getBalance();
|
|
46476
46481
|
}
|
|
46477
|
-
}
|
|
46482
|
+
};
|
|
46478
46483
|
class Twe {
|
|
46479
46484
|
constructor(t, r) {
|
|
46480
46485
|
$e(this, "$store"), $e(this, "$network"), $e(this, "$providerMap"), this.config = r, this.$store = t.$store, this.$network = t.$network, this.$providerMap = {
|
|
@@ -46793,7 +46798,7 @@ let aS = (e = {}) => {
|
|
|
46793
46798
|
}, t.notify(o, r));
|
|
46794
46799
|
}, t;
|
|
46795
46800
|
};
|
|
46796
|
-
const Jc = "oyl", fc = "unisat", Ba = "xverse", Qc = "phantom", eu = "leather", Ua = "magic-eden", tu = "okx", ru = "wizz", dc = "orange", sS = "op_net", cd = "p2tr", rQ = "p2pkh", nQ = "p2sh-p2wpkh", yw = "p2wpkh", oQ = "p2wsh", cS = "p2sh",
|
|
46801
|
+
const Jc = "oyl", fc = "unisat", Ba = "xverse", Qc = "phantom", eu = "leather", Ua = "magic-eden", tu = "okx", ru = "wizz", dc = "orange", sS = "op_net", cd = "p2tr", rQ = "p2pkh", nQ = "p2sh-p2wpkh", yw = "p2wpkh", oQ = "p2wsh", cS = "p2sh", vb = "defaultWallet", Yo = {
|
|
46797
46802
|
/**
|
|
46798
46803
|
* The message prefix used for signing Bitcoin messages.
|
|
46799
46804
|
*/
|
|
@@ -47732,7 +47737,7 @@ const TQ = Af(
|
|
|
47732
47737
|
e3(),
|
|
47733
47738
|
Cm(0),
|
|
47734
47739
|
Um(4294967295)
|
|
47735
|
-
),
|
|
47740
|
+
), Eb = Af(
|
|
47736
47741
|
ES(),
|
|
47737
47742
|
Cm(0n),
|
|
47738
47743
|
Um(0x7fffffffffffffffn)
|
|
@@ -48075,7 +48080,7 @@ function LQ(e, t) {
|
|
|
48075
48080
|
}
|
|
48076
48081
|
const nl = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
48077
48082
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
48078
|
-
const
|
|
48083
|
+
const kb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), zi = (e, t) => e << 32 - t | e >>> t, Ep = (e, t) => e << t | e >>> 32 - t >>> 0;
|
|
48079
48084
|
new Uint8Array(new Uint32Array([287454020]).buffer)[0];
|
|
48080
48085
|
function HQ(e) {
|
|
48081
48086
|
if (typeof e != "string")
|
|
@@ -48124,7 +48129,7 @@ function qQ(e, t, r, n) {
|
|
|
48124
48129
|
const MQ = (e, t, r) => e & t ^ ~e & r, FQ = (e, t, r) => e & t ^ e & r ^ t & r;
|
|
48125
48130
|
let c3 = class extends PS {
|
|
48126
48131
|
constructor(e, t, r, n) {
|
|
48127
|
-
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view =
|
|
48132
|
+
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = kb(this.buffer);
|
|
48128
48133
|
}
|
|
48129
48134
|
update(e) {
|
|
48130
48135
|
Y0(this);
|
|
@@ -48134,7 +48139,7 @@ let c3 = class extends PS {
|
|
|
48134
48139
|
for (let i = 0; i < o; ) {
|
|
48135
48140
|
const a = Math.min(n - this.pos, o - i);
|
|
48136
48141
|
if (a === n) {
|
|
48137
|
-
const s =
|
|
48142
|
+
const s = kb(e);
|
|
48138
48143
|
for (; n <= o - i; i += n)
|
|
48139
48144
|
this.process(s, i);
|
|
48140
48145
|
continue;
|
|
@@ -48151,7 +48156,7 @@ let c3 = class extends PS {
|
|
|
48151
48156
|
for (let u = i; u < n; u++)
|
|
48152
48157
|
t[u] = 0;
|
|
48153
48158
|
qQ(r, n - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
48154
|
-
const a =
|
|
48159
|
+
const a = kb(e), s = this.outputLen;
|
|
48155
48160
|
if (s % 4)
|
|
48156
48161
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
48157
48162
|
const c = s / 4, l = this.get();
|
|
@@ -49030,11 +49035,11 @@ function ree(e) {
|
|
|
49030
49035
|
};
|
|
49031
49036
|
}
|
|
49032
49037
|
var nee = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
49033
|
-
const
|
|
49038
|
+
const xb = ree(nee);
|
|
49034
49039
|
function oee(e) {
|
|
49035
49040
|
function t(i) {
|
|
49036
49041
|
var a = Uint8Array.from(i), s = e(a), c = a.length + 4, l = new Uint8Array(c);
|
|
49037
|
-
return l.set(a, 0), l.set(s.subarray(0, 4), a.length),
|
|
49042
|
+
return l.set(a, 0), l.set(s.subarray(0, 4), a.length), xb.encode(l);
|
|
49038
49043
|
}
|
|
49039
49044
|
function r(i) {
|
|
49040
49045
|
var a = i.slice(0, -4), s = i.slice(-4), c = e(a);
|
|
@@ -49042,12 +49047,12 @@ function oee(e) {
|
|
|
49042
49047
|
return a;
|
|
49043
49048
|
}
|
|
49044
49049
|
function n(i) {
|
|
49045
|
-
var a =
|
|
49050
|
+
var a = xb.decodeUnsafe(i);
|
|
49046
49051
|
if (a != null)
|
|
49047
49052
|
return r(a);
|
|
49048
49053
|
}
|
|
49049
49054
|
function o(i) {
|
|
49050
|
-
var a =
|
|
49055
|
+
var a = xb.decode(i), s = r(a);
|
|
49051
49056
|
if (s == null)
|
|
49052
49057
|
throw new Error("Invalid checksum");
|
|
49053
49058
|
return s;
|
|
@@ -49550,7 +49555,7 @@ function Bh(e, t) {
|
|
|
49550
49555
|
}
|
|
49551
49556
|
return Object.assign(o, e);
|
|
49552
49557
|
}
|
|
49553
|
-
const Y8 = qt,
|
|
49558
|
+
const Y8 = qt, Ab = new Uint8Array(0);
|
|
49554
49559
|
function xp(e) {
|
|
49555
49560
|
return !!(e instanceof Uint8Array && e.length === 65 && e[0] === 4 && pi(e));
|
|
49556
49561
|
}
|
|
@@ -49600,16 +49605,16 @@ function Uh(e, t) {
|
|
|
49600
49605
|
if (e.witness)
|
|
49601
49606
|
return {
|
|
49602
49607
|
output: e.witness[e.witness.length - 1],
|
|
49603
|
-
input:
|
|
49608
|
+
input: Ab,
|
|
49604
49609
|
witness: e.witness.slice(0, -1)
|
|
49605
49610
|
};
|
|
49606
49611
|
}), He(i, "input", () => {
|
|
49607
49612
|
if (i.witness)
|
|
49608
|
-
return
|
|
49613
|
+
return Ab;
|
|
49609
49614
|
}), He(i, "witness", () => {
|
|
49610
49615
|
if (e.redeem && e.redeem.input && e.redeem.input.length > 0 && e.redeem.output && e.redeem.output.length > 0) {
|
|
49611
49616
|
const a = NQ(n());
|
|
49612
|
-
return i.redeem = Object.assign({ witness: a }, e.redeem), i.redeem.input =
|
|
49617
|
+
return i.redeem = Object.assign({ witness: a }, e.redeem), i.redeem.input = Ab, [].concat(a, e.redeem.output);
|
|
49613
49618
|
}
|
|
49614
49619
|
if (e.redeem && e.redeem.output && e.redeem.witness)
|
|
49615
49620
|
return [].concat(e.redeem.witness, e.redeem.output);
|
|
@@ -50369,7 +50374,7 @@ function Uee(e) {
|
|
|
50369
50374
|
const t = e.length;
|
|
50370
50375
|
return Go(t) + e.reduce((r, n) => r + Mi(n), 0);
|
|
50371
50376
|
}
|
|
50372
|
-
const oc = new Uint8Array(0), n5 = [],
|
|
50377
|
+
const oc = new Uint8Array(0), n5 = [], _b = os(
|
|
50373
50378
|
"0000000000000000000000000000000000000000000000000000000000000000"
|
|
50374
50379
|
), o5 = os(
|
|
50375
50380
|
"0000000000000000000000000000000000000000000000000000000000000001"
|
|
@@ -50446,7 +50451,7 @@ const ri = class Xt {
|
|
|
50446
50451
|
}) - 1;
|
|
50447
50452
|
}
|
|
50448
50453
|
addOutput(t, r) {
|
|
50449
|
-
return cr(Vi([Dt,
|
|
50454
|
+
return cr(Vi([Dt, Eb]), [
|
|
50450
50455
|
t,
|
|
50451
50456
|
r
|
|
50452
50457
|
]), this.outs.push({
|
|
@@ -50522,7 +50527,7 @@ const ri = class Xt {
|
|
|
50522
50527
|
Vi([
|
|
50523
50528
|
Ta,
|
|
50524
50529
|
Qn(Dt),
|
|
50525
|
-
Qn(
|
|
50530
|
+
Qn(Eb),
|
|
50526
50531
|
Ta
|
|
50527
50532
|
]),
|
|
50528
50533
|
[t, r, n, o]
|
|
@@ -50575,12 +50580,12 @@ const ri = class Xt {
|
|
|
50575
50580
|
Vi([
|
|
50576
50581
|
Ta,
|
|
50577
50582
|
Dt,
|
|
50578
|
-
|
|
50583
|
+
Eb,
|
|
50579
50584
|
Ta
|
|
50580
50585
|
]),
|
|
50581
50586
|
[t, r, n, o]
|
|
50582
50587
|
);
|
|
50583
|
-
let i = Uint8Array.from([]), a, s =
|
|
50588
|
+
let i = Uint8Array.from([]), a, s = _b, c = _b, l = _b;
|
|
50584
50589
|
if (o & Xt.SIGHASH_ANYONECANPAY || (i = new Uint8Array(36 * this.ins.length), a = new gn(i, 0), this.ins.forEach((f) => {
|
|
50585
50590
|
a.writeSlice(f.hash), a.writeUInt32(f.index);
|
|
50586
50591
|
}), c = Rc(i)), !(o & Xt.SIGHASH_ANYONECANPAY) && (o & 31) !== Xt.SIGHASH_SINGLE && (o & 31) !== Xt.SIGHASH_NONE && (i = new Uint8Array(4 * this.ins.length), a = new gn(i, 0), this.ins.forEach((f) => {
|
|
@@ -51599,7 +51604,7 @@ function gre({ globalMap: e, inputs: t, outputs: r }) {
|
|
|
51599
51604
|
);
|
|
51600
51605
|
}
|
|
51601
51606
|
const mre = (e, t) => me(e.key, t.key);
|
|
51602
|
-
function
|
|
51607
|
+
function Sb(e, t) {
|
|
51603
51608
|
const r = /* @__PURE__ */ new Set(), n = Object.entries(e).reduce((i, [a, s]) => {
|
|
51604
51609
|
if (a === "unknownKeyVals") return i;
|
|
51605
51610
|
const c = t[a];
|
|
@@ -51617,9 +51622,9 @@ function S1(e, t) {
|
|
|
51617
51622
|
}
|
|
51618
51623
|
function xw({ globalMap: e, inputs: t, outputs: r }) {
|
|
51619
51624
|
return {
|
|
51620
|
-
globalKeyVals:
|
|
51621
|
-
inputKeyVals: t.map((n) =>
|
|
51622
|
-
outputKeyVals: r.map((n) =>
|
|
51625
|
+
globalKeyVals: Sb(e, y3),
|
|
51626
|
+
inputKeyVals: t.map((n) => Sb(n, Dr)),
|
|
51627
|
+
outputKeyVals: r.map((n) => Sb(n, Ia))
|
|
51623
51628
|
};
|
|
51624
51629
|
}
|
|
51625
51630
|
function yre(e) {
|
|
@@ -51637,14 +51642,14 @@ function yre(e) {
|
|
|
51637
51642
|
);
|
|
51638
51643
|
const u = xw(c);
|
|
51639
51644
|
ol(u.globalKeyVals).forEach(
|
|
51640
|
-
$
|
|
51645
|
+
$b(
|
|
51641
51646
|
i,
|
|
51642
51647
|
r.globalKeyVals,
|
|
51643
51648
|
u.globalKeyVals
|
|
51644
51649
|
)
|
|
51645
51650
|
), u.inputKeyVals.map(ol).forEach(
|
|
51646
51651
|
(f, h) => f.forEach(
|
|
51647
|
-
$
|
|
51652
|
+
$b(
|
|
51648
51653
|
a[h],
|
|
51649
51654
|
r.inputKeyVals[h],
|
|
51650
51655
|
u.inputKeyVals[h]
|
|
@@ -51652,7 +51657,7 @@ function yre(e) {
|
|
|
51652
51657
|
)
|
|
51653
51658
|
), u.outputKeyVals.map(ol).forEach(
|
|
51654
51659
|
(f, h) => f.forEach(
|
|
51655
|
-
$
|
|
51660
|
+
$b(
|
|
51656
51661
|
s[h],
|
|
51657
51662
|
r.outputKeyVals[h],
|
|
51658
51663
|
u.outputKeyVals[h]
|
|
@@ -51666,7 +51671,7 @@ function yre(e) {
|
|
|
51666
51671
|
outputKeyVals: r.outputKeyVals
|
|
51667
51672
|
});
|
|
51668
51673
|
}
|
|
51669
|
-
function $
|
|
51674
|
+
function $b(e, t, r) {
|
|
51670
51675
|
return (n) => {
|
|
51671
51676
|
if (e.has(n)) return;
|
|
51672
51677
|
const o = r.filter((i) => Ze(i.key) === n)[0];
|
|
@@ -51695,7 +51700,7 @@ function qd(e, t) {
|
|
|
51695
51700
|
if (r === void 0) throw new Error(`No output #${t}`);
|
|
51696
51701
|
return r;
|
|
51697
51702
|
}
|
|
51698
|
-
function
|
|
51703
|
+
function Tb(e, t, r) {
|
|
51699
51704
|
if (e.key[0] < r)
|
|
51700
51705
|
throw new Error(
|
|
51701
51706
|
"Use the method for your specific key instead of addUnknownKeyVal*"
|
|
@@ -51703,7 +51708,7 @@ function T1(e, t, r) {
|
|
|
51703
51708
|
if (t && t.filter((n) => me(n.key, e.key) === 0).length !== 0)
|
|
51704
51709
|
throw new Error(`Duplicate Key: ${Ze(e.key)}`);
|
|
51705
51710
|
}
|
|
51706
|
-
function
|
|
51711
|
+
function Ib(e) {
|
|
51707
51712
|
let t = 0;
|
|
51708
51713
|
return Object.keys(e).forEach((r) => {
|
|
51709
51714
|
Number(isNaN(Number(r))) && t++;
|
|
@@ -51800,19 +51805,19 @@ let c5 = class {
|
|
|
51800
51805
|
return r$(t, r), this;
|
|
51801
51806
|
}
|
|
51802
51807
|
addUnknownKeyValToGlobal(e) {
|
|
51803
|
-
return
|
|
51808
|
+
return Tb(
|
|
51804
51809
|
e,
|
|
51805
51810
|
this.globalMap.unknownKeyVals,
|
|
51806
|
-
|
|
51811
|
+
Ib(ea)
|
|
51807
51812
|
), this.globalMap.unknownKeyVals || (this.globalMap.unknownKeyVals = []), this.globalMap.unknownKeyVals.push(e), this;
|
|
51808
51813
|
}
|
|
51809
51814
|
addUnknownKeyValToInput(e, t) {
|
|
51810
51815
|
const r = ln(this.inputs, e);
|
|
51811
|
-
return
|
|
51816
|
+
return Tb(t, r.unknownKeyVals, Ib(Se)), r.unknownKeyVals || (r.unknownKeyVals = []), r.unknownKeyVals.push(t), this;
|
|
51812
51817
|
}
|
|
51813
51818
|
addUnknownKeyValToOutput(e, t) {
|
|
51814
51819
|
const r = qd(this.outputs, e);
|
|
51815
|
-
return
|
|
51820
|
+
return Tb(t, r.unknownKeyVals, Ib(Ar)), r.unknownKeyVals || (r.unknownKeyVals = []), r.unknownKeyVals.push(t), this;
|
|
51816
51821
|
}
|
|
51817
51822
|
addInput(e) {
|
|
51818
51823
|
this.globalMap.unsignedTx.addInput(e), this.inputs.push({
|
|
@@ -51943,7 +51948,7 @@ function _p(e, t) {
|
|
|
51943
51948
|
function ai(e) {
|
|
51944
51949
|
return e && !!(e.tapInternalKey || e.tapMerkleRoot || e.tapLeafScript && e.tapLeafScript.length || e.tapBip32Derivation && e.tapBip32Derivation.length || e.witnessUtxo && o$(e.witnessUtxo.script));
|
|
51945
51950
|
}
|
|
51946
|
-
function
|
|
51951
|
+
function Pb(e, t) {
|
|
51947
51952
|
return e && !!(e.tapInternalKey || e.tapTree || e.tapBip32Derivation && e.tapBip32Derivation.length || t);
|
|
51948
51953
|
}
|
|
51949
51954
|
function f5(e, t, r) {
|
|
@@ -52025,7 +52030,7 @@ function jre(e, t, r) {
|
|
|
52025
52030
|
);
|
|
52026
52031
|
}
|
|
52027
52032
|
function zre(e, t, r) {
|
|
52028
|
-
const n =
|
|
52033
|
+
const n = Pb(e) && $l(t), o = $l(e) && Pb(t), i = e === t && Pb(t) && $l(t);
|
|
52029
52034
|
if (n || o || i)
|
|
52030
52035
|
throw new Error(
|
|
52031
52036
|
`Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
|
|
@@ -52034,22 +52039,22 @@ function zre(e, t, r) {
|
|
|
52034
52039
|
function Rre(e, t, r) {
|
|
52035
52040
|
if (t.tapMerkleRoot) {
|
|
52036
52041
|
const n = (t.tapLeafScript || []).every(
|
|
52037
|
-
(i) =>
|
|
52042
|
+
(i) => Ob(i, t.tapMerkleRoot)
|
|
52038
52043
|
), o = (e.tapLeafScript || []).every(
|
|
52039
|
-
(i) =>
|
|
52044
|
+
(i) => Ob(i, t.tapMerkleRoot)
|
|
52040
52045
|
);
|
|
52041
52046
|
if (!n || !o)
|
|
52042
52047
|
throw new Error(
|
|
52043
52048
|
`Invalid arguments for Psbt.${r}. Tapleaf not part of taptree.`
|
|
52044
52049
|
);
|
|
52045
52050
|
} else if (e.tapMerkleRoot && !(t.tapLeafScript || []).every(
|
|
52046
|
-
(n) =>
|
|
52051
|
+
(n) => Ob(n, e.tapMerkleRoot)
|
|
52047
52052
|
))
|
|
52048
52053
|
throw new Error(
|
|
52049
52054
|
`Invalid arguments for Psbt.${r}. Tapleaf not part of taptree.`
|
|
52050
52055
|
);
|
|
52051
52056
|
}
|
|
52052
|
-
function
|
|
52057
|
+
function Ob(e, t) {
|
|
52053
52058
|
if (!t) return !0;
|
|
52054
52059
|
const r = Ra({
|
|
52055
52060
|
output: e.script,
|
|
@@ -52687,13 +52692,13 @@ class vr {
|
|
|
52687
52692
|
return a;
|
|
52688
52693
|
}
|
|
52689
52694
|
toBuffer() {
|
|
52690
|
-
return
|
|
52695
|
+
return Bb(this.__CACHE), this.data.toBuffer();
|
|
52691
52696
|
}
|
|
52692
52697
|
toHex() {
|
|
52693
|
-
return
|
|
52698
|
+
return Bb(this.__CACHE), this.data.toHex();
|
|
52694
52699
|
}
|
|
52695
52700
|
toBase64() {
|
|
52696
|
-
return
|
|
52701
|
+
return Bb(this.__CACHE), this.data.toBase64();
|
|
52697
52702
|
}
|
|
52698
52703
|
updateGlobal(t) {
|
|
52699
52704
|
return this.data.updateGlobal(t), this;
|
|
@@ -52768,7 +52773,7 @@ function Fre(e, t, r) {
|
|
|
52768
52773
|
return !1;
|
|
52769
52774
|
}
|
|
52770
52775
|
}
|
|
52771
|
-
function
|
|
52776
|
+
function Bb(e) {
|
|
52772
52777
|
if (e.__UNSAFE_SIGN_NONSEGWIT !== !1)
|
|
52773
52778
|
throw new Error("Not BIP174 compliant, can not export");
|
|
52774
52779
|
}
|
|
@@ -53427,9 +53432,9 @@ function hne(e) {
|
|
|
53427
53432
|
throw new Error(`utf8ToBytes expected string, got ${typeof e}`);
|
|
53428
53433
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
53429
53434
|
}
|
|
53430
|
-
const
|
|
53435
|
+
const Ub = (e) => typeof e == "bigint" && E3 <= e;
|
|
53431
53436
|
function Fm(e, t, r) {
|
|
53432
|
-
return
|
|
53437
|
+
return Ub(e) && Ub(t) && Ub(r) && t <= e && e < r;
|
|
53433
53438
|
}
|
|
53434
53439
|
function hu(e, t, r, n) {
|
|
53435
53440
|
if (!Fm(t, r, n))
|
|
@@ -53447,7 +53452,7 @@ function pne(e, t) {
|
|
|
53447
53452
|
function gne(e, t, r) {
|
|
53448
53453
|
return e | (r ? Mm : E3) << BigInt(t);
|
|
53449
53454
|
}
|
|
53450
|
-
const _3 = (e) => (une << BigInt(e - 1)) - Mm,
|
|
53455
|
+
const _3 = (e) => (une << BigInt(e - 1)) - Mm, Cb = (e) => new Uint8Array(e), k5 = (e) => Uint8Array.from(e);
|
|
53451
53456
|
function k$(e, t, r) {
|
|
53452
53457
|
if (typeof e != "number" || e < 2)
|
|
53453
53458
|
throw new Error("hashLen must be a number");
|
|
@@ -53455,10 +53460,10 @@ function k$(e, t, r) {
|
|
|
53455
53460
|
throw new Error("qByteLen must be a number");
|
|
53456
53461
|
if (typeof r != "function")
|
|
53457
53462
|
throw new Error("hmacFn must be a function");
|
|
53458
|
-
let n =
|
|
53463
|
+
let n = Cb(e), o = Cb(e), i = 0;
|
|
53459
53464
|
const a = () => {
|
|
53460
53465
|
n.fill(1), o.fill(0), i = 0;
|
|
53461
|
-
}, s = (...u) => r(o, n, ...u), c = (u =
|
|
53466
|
+
}, s = (...u) => r(o, n, ...u), c = (u = Cb()) => {
|
|
53462
53467
|
o = s(k5([0]), u), n = s(), u.length !== 0 && (o = s(k5([1]), u), n = s());
|
|
53463
53468
|
}, l = () => {
|
|
53464
53469
|
if (i++ >= 1e3)
|
|
@@ -53753,7 +53758,7 @@ function $ne(e, t, r = !1) {
|
|
|
53753
53758
|
return r ? A3(s, o) : Yl(s, o);
|
|
53754
53759
|
}
|
|
53755
53760
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
53756
|
-
const Tne = BigInt(0),
|
|
53761
|
+
const Tne = BigInt(0), Nb = BigInt(1), jb = /* @__PURE__ */ new WeakMap(), _5 = /* @__PURE__ */ new WeakMap();
|
|
53757
53762
|
function Ine(e, t) {
|
|
53758
53763
|
const r = (i, a) => {
|
|
53759
53764
|
const s = a.negate();
|
|
@@ -53772,7 +53777,7 @@ function Ine(e, t) {
|
|
|
53772
53777
|
unsafeLadder(i, a) {
|
|
53773
53778
|
let s = e.ZERO, c = i;
|
|
53774
53779
|
for (; a > Tne; )
|
|
53775
|
-
a &
|
|
53780
|
+
a & Nb && (s = s.add(c)), c = c.double(), a >>= Nb;
|
|
53776
53781
|
return s;
|
|
53777
53782
|
},
|
|
53778
53783
|
/**
|
|
@@ -53810,7 +53815,7 @@ function Ine(e, t) {
|
|
|
53810
53815
|
for (let m = 0; m < c; m++) {
|
|
53811
53816
|
const w = m * l;
|
|
53812
53817
|
let v = Number(s & h);
|
|
53813
|
-
s >>= y, v > l && (v -= g, s +=
|
|
53818
|
+
s >>= y, v > l && (v -= g, s += Nb);
|
|
53814
53819
|
const x = w, E = w + Math.abs(v) - 1, S = m % 2 !== 0, O = v < 0;
|
|
53815
53820
|
v === 0 ? f = f.add(r(S, a[x])) : u = u.add(r(O, a[E]));
|
|
53816
53821
|
}
|
|
@@ -53818,14 +53823,14 @@ function Ine(e, t) {
|
|
|
53818
53823
|
},
|
|
53819
53824
|
wNAFCached(i, a, s) {
|
|
53820
53825
|
const c = _5.get(i) || 1;
|
|
53821
|
-
let l =
|
|
53822
|
-
return l || (l = this.precomputeWindow(i, c), c !== 1 &&
|
|
53826
|
+
let l = jb.get(i);
|
|
53827
|
+
return l || (l = this.precomputeWindow(i, c), c !== 1 && jb.set(i, s(l))), this.wNAF(c, l, a);
|
|
53823
53828
|
},
|
|
53824
53829
|
// We calculate precomputes for elliptic curve point multiplication
|
|
53825
53830
|
// using windowed method. This specifies window size and
|
|
53826
53831
|
// stores precomputed values. Usually only base point would be precomputed.
|
|
53827
53832
|
setWindowSize(i, a) {
|
|
53828
|
-
n(a), _5.set(i, a),
|
|
53833
|
+
n(a), _5.set(i, a), jb.delete(i);
|
|
53829
53834
|
}
|
|
53830
53835
|
};
|
|
53831
53836
|
}
|
|
@@ -54577,7 +54582,7 @@ function Kne(e, t) {
|
|
|
54577
54582
|
throw new Error(`digestInto() expects output buffer of length at least ${r}`);
|
|
54578
54583
|
}
|
|
54579
54584
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
54580
|
-
const qne = (e) => e instanceof Uint8Array,
|
|
54585
|
+
const qne = (e) => e instanceof Uint8Array, zb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Ri = (e, t) => e << 32 - t | e >>> t, Mne = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
54581
54586
|
if (!Mne)
|
|
54582
54587
|
throw new Error("Non little-endian hardware is not supported");
|
|
54583
54588
|
function Fne(e) {
|
|
@@ -54608,7 +54613,7 @@ function Zne(e, t, r, n) {
|
|
|
54608
54613
|
}
|
|
54609
54614
|
let Wne = class extends Vne {
|
|
54610
54615
|
constructor(e, t, r, n) {
|
|
54611
|
-
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view =
|
|
54616
|
+
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = zb(this.buffer);
|
|
54612
54617
|
}
|
|
54613
54618
|
update(e) {
|
|
54614
54619
|
P5(this);
|
|
@@ -54618,7 +54623,7 @@ let Wne = class extends Vne {
|
|
|
54618
54623
|
for (let i = 0; i < o; ) {
|
|
54619
54624
|
const a = Math.min(n - this.pos, o - i);
|
|
54620
54625
|
if (a === n) {
|
|
54621
|
-
const s =
|
|
54626
|
+
const s = zb(e);
|
|
54622
54627
|
for (; n <= o - i; i += n)
|
|
54623
54628
|
this.process(s, i);
|
|
54624
54629
|
continue;
|
|
@@ -54635,7 +54640,7 @@ let Wne = class extends Vne {
|
|
|
54635
54640
|
for (let u = i; u < n; u++)
|
|
54636
54641
|
t[u] = 0;
|
|
54637
54642
|
Zne(r, n - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
54638
|
-
const a =
|
|
54643
|
+
const a = zb(e), s = this.outputLen;
|
|
54639
54644
|
if (s % 4)
|
|
54640
54645
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
54641
54646
|
const c = s / 4, l = this.get();
|
|
@@ -55183,7 +55188,7 @@ const yoe = new TextEncoder(), boe = new TextDecoder();
|
|
|
55183
55188
|
function T3(e) {
|
|
55184
55189
|
return yoe.encode(e);
|
|
55185
55190
|
}
|
|
55186
|
-
function
|
|
55191
|
+
function Rb(e) {
|
|
55187
55192
|
return boe.decode(e);
|
|
55188
55193
|
}
|
|
55189
55194
|
function woe(e, t) {
|
|
@@ -55348,7 +55353,7 @@ let Gt = (Je = class extends Uint8Array {
|
|
|
55348
55353
|
}
|
|
55349
55354
|
to_json(e) {
|
|
55350
55355
|
e === void 0 && (e = $oe);
|
|
55351
|
-
const t =
|
|
55356
|
+
const t = Rb(this);
|
|
55352
55357
|
return JSON.parse(t, e);
|
|
55353
55358
|
}
|
|
55354
55359
|
to_bech32(e, t) {
|
|
@@ -55360,7 +55365,7 @@ let Gt = (Je = class extends Uint8Array {
|
|
|
55360
55365
|
return r(e, o, t);
|
|
55361
55366
|
}
|
|
55362
55367
|
to_str() {
|
|
55363
|
-
return
|
|
55368
|
+
return Rb(this);
|
|
55364
55369
|
}
|
|
55365
55370
|
to_hex() {
|
|
55366
55371
|
return Eoe(this);
|
|
@@ -55431,7 +55436,7 @@ let Gt = (Je = class extends Uint8Array {
|
|
|
55431
55436
|
return Je.of(255, ...Je.num(e, 8, t));
|
|
55432
55437
|
throw new Error(`Value is too large: ${e}`);
|
|
55433
55438
|
}
|
|
55434
|
-
}, Je.num = Ioe, Je.big = Ooe, Je.bin = Poe, Je.raw = Boe, Je.str = Uoe, Je.hex = Coe, Je.bytes = R5, Je.json = Noe, Je.base64 = joe, Je.b64url = zoe, Je.bech32 = Roe, Je.bech32m = Loe, Je.b58chk = Hoe, Je.encode = T3, Je.decode =
|
|
55439
|
+
}, Je.num = Ioe, Je.big = Ooe, Je.bin = Poe, Je.raw = Boe, Je.str = Uoe, Je.hex = Coe, Je.bytes = R5, Je.json = Noe, Je.base64 = joe, Je.b64url = zoe, Je.bech32 = Roe, Je.bech32m = Loe, Je.b58chk = Hoe, Je.encode = T3, Je.decode = Rb, Je.parse = Doe, Je.is_bytes = Aoe, Je.is_hex = C$, Je);
|
|
55435
55440
|
function Ioe(e, t, r) {
|
|
55436
55441
|
return new Gt(e, t, r);
|
|
55437
55442
|
}
|
|
@@ -55903,9 +55908,9 @@ const $ie = {
|
|
|
55903
55908
|
exists: _ie,
|
|
55904
55909
|
output: Sie
|
|
55905
55910
|
};
|
|
55906
|
-
var
|
|
55911
|
+
var Lb = $ie;
|
|
55907
55912
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
55908
|
-
const
|
|
55913
|
+
const Hb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Li = (e, t) => e << 32 - t | e >>> t, Tie = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
55909
55914
|
if (!Tie)
|
|
55910
55915
|
throw new Error("Non little-endian hardware is not supported");
|
|
55911
55916
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -55937,17 +55942,17 @@ function Oie(e, t, r, n) {
|
|
|
55937
55942
|
}
|
|
55938
55943
|
let Bie = class extends Pie {
|
|
55939
55944
|
constructor(e, t, r, n) {
|
|
55940
|
-
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view =
|
|
55945
|
+
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = Hb(this.buffer);
|
|
55941
55946
|
}
|
|
55942
55947
|
update(e) {
|
|
55943
|
-
|
|
55948
|
+
Lb.exists(this);
|
|
55944
55949
|
const { view: t, buffer: r, blockLen: n } = this;
|
|
55945
55950
|
e = H$(e);
|
|
55946
55951
|
const o = e.length;
|
|
55947
55952
|
for (let i = 0; i < o; ) {
|
|
55948
55953
|
const a = Math.min(n - this.pos, o - i);
|
|
55949
55954
|
if (a === n) {
|
|
55950
|
-
const s =
|
|
55955
|
+
const s = Hb(e);
|
|
55951
55956
|
for (; n <= o - i; i += n)
|
|
55952
55957
|
this.process(s, i);
|
|
55953
55958
|
continue;
|
|
@@ -55957,14 +55962,14 @@ let Bie = class extends Pie {
|
|
|
55957
55962
|
return this.length += e.length, this.roundClean(), this;
|
|
55958
55963
|
}
|
|
55959
55964
|
digestInto(e) {
|
|
55960
|
-
|
|
55965
|
+
Lb.exists(this), Lb.output(e, this), this.finished = !0;
|
|
55961
55966
|
const { buffer: t, view: r, blockLen: n, isLE: o } = this;
|
|
55962
55967
|
let { pos: i } = this;
|
|
55963
55968
|
t[i++] = 128, this.buffer.subarray(i).fill(0), this.padOffset > n - i && (this.process(r, 0), i = 0);
|
|
55964
55969
|
for (let u = i; u < n; u++)
|
|
55965
55970
|
t[u] = 0;
|
|
55966
55971
|
Oie(r, n - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
55967
|
-
const a =
|
|
55972
|
+
const a = Hb(e), s = this.outputLen;
|
|
55968
55973
|
if (s % 4)
|
|
55969
55974
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
55970
55975
|
const c = s / 4, l = this.get();
|
|
@@ -56426,7 +56431,7 @@ const pae = new TextEncoder(), gae = new TextDecoder();
|
|
|
56426
56431
|
function O3(e) {
|
|
56427
56432
|
return pae.encode(e);
|
|
56428
56433
|
}
|
|
56429
|
-
function
|
|
56434
|
+
function Db(e) {
|
|
56430
56435
|
return gae.decode(e);
|
|
56431
56436
|
}
|
|
56432
56437
|
function mae(e, t) {
|
|
@@ -56536,14 +56541,14 @@ let Y = (Tt = class extends Uint8Array {
|
|
|
56536
56541
|
return new Tt(e);
|
|
56537
56542
|
}
|
|
56538
56543
|
toJson() {
|
|
56539
|
-
const e =
|
|
56544
|
+
const e = Db(this);
|
|
56540
56545
|
return JSON.parse(e);
|
|
56541
56546
|
}
|
|
56542
56547
|
toBech32(e, t = 0) {
|
|
56543
56548
|
return Q$.encode(this, e, t);
|
|
56544
56549
|
}
|
|
56545
56550
|
toStr() {
|
|
56546
|
-
return
|
|
56551
|
+
return Db(this);
|
|
56547
56552
|
}
|
|
56548
56553
|
toHex() {
|
|
56549
56554
|
return bae(this);
|
|
@@ -56607,7 +56612,7 @@ let Y = (Tt = class extends Uint8Array {
|
|
|
56607
56612
|
return Tt.of(255, ...Tt.num(e, 8, t));
|
|
56608
56613
|
throw new Error(`Value is too large: ${e}`);
|
|
56609
56614
|
}
|
|
56610
|
-
}, Tt.num = Eae, Tt.big = xae, Tt.bin = kae, Tt.raw = Aae, Tt.str = _ae, Tt.hex = Sae, Tt.bytes = $ae, Tt.json = Tae, Tt.base64 = Iae, Tt.b64url = Pae, Tt.bech32 = Oae, Tt.b58chk = Bae, Tt.encode = O3, Tt.decode =
|
|
56615
|
+
}, Tt.num = Eae, Tt.big = xae, Tt.bin = kae, Tt.raw = Aae, Tt.str = _ae, Tt.hex = Sae, Tt.bytes = $ae, Tt.json = Tae, Tt.base64 = Iae, Tt.b64url = Pae, Tt.bech32 = Oae, Tt.b58chk = Bae, Tt.encode = O3, Tt.decode = Db, Tt);
|
|
56611
56616
|
function Eae(e, t, r) {
|
|
56612
56617
|
return new Y(e, t, r);
|
|
56613
56618
|
}
|
|
@@ -56997,9 +57002,9 @@ const Wae = {
|
|
|
56997
57002
|
output: Zae
|
|
56998
57003
|
};
|
|
56999
57004
|
var nu = Wae;
|
|
57000
|
-
const
|
|
57005
|
+
const Kb = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
57001
57006
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
57002
|
-
const
|
|
57007
|
+
const qb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Hi = (e, t) => e << 32 - t | e >>> t, Xae = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
57003
57008
|
if (!Xae)
|
|
57004
57009
|
throw new Error("Non little-endian hardware is not supported");
|
|
57005
57010
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -57036,8 +57041,8 @@ function dT(e) {
|
|
|
57036
57041
|
return t.outputLen = r.outputLen, t.blockLen = r.blockLen, t.create = () => e(), t;
|
|
57037
57042
|
}
|
|
57038
57043
|
function hT(e = 32) {
|
|
57039
|
-
if (
|
|
57040
|
-
return
|
|
57044
|
+
if (Kb && typeof Kb.getRandomValues == "function")
|
|
57045
|
+
return Kb.getRandomValues(new Uint8Array(e));
|
|
57041
57046
|
throw new Error("crypto.getRandomValues must be defined");
|
|
57042
57047
|
}
|
|
57043
57048
|
function Qae(e, t, r, n) {
|
|
@@ -57048,7 +57053,7 @@ function Qae(e, t, r, n) {
|
|
|
57048
57053
|
}
|
|
57049
57054
|
let ese = class extends fT {
|
|
57050
57055
|
constructor(e, t, r, n) {
|
|
57051
|
-
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view =
|
|
57056
|
+
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = qb(this.buffer);
|
|
57052
57057
|
}
|
|
57053
57058
|
update(e) {
|
|
57054
57059
|
nu.exists(this);
|
|
@@ -57058,7 +57063,7 @@ let ese = class extends fT {
|
|
|
57058
57063
|
for (let i = 0; i < o; ) {
|
|
57059
57064
|
const a = Math.min(n - this.pos, o - i);
|
|
57060
57065
|
if (a === n) {
|
|
57061
|
-
const s =
|
|
57066
|
+
const s = qb(e);
|
|
57062
57067
|
for (; n <= o - i; i += n)
|
|
57063
57068
|
this.process(s, i);
|
|
57064
57069
|
continue;
|
|
@@ -57075,7 +57080,7 @@ let ese = class extends fT {
|
|
|
57075
57080
|
for (let u = i; u < n; u++)
|
|
57076
57081
|
t[u] = 0;
|
|
57077
57082
|
Qae(r, n - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
57078
|
-
const a =
|
|
57083
|
+
const a = qb(e), s = this.outputLen;
|
|
57079
57084
|
if (s % 4)
|
|
57080
57085
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
57081
57086
|
const c = s / 4, l = this.get();
|
|
@@ -57297,7 +57302,7 @@ function lse(e) {
|
|
|
57297
57302
|
;
|
|
57298
57303
|
return t;
|
|
57299
57304
|
}
|
|
57300
|
-
const fse = (e, t) => e >> BigInt(t) & 1n, dse = (e, t, r) => e | (r ? C3 : ise) << BigInt(t), z3 = (e) => (ase << BigInt(e - 1)) - C3,
|
|
57305
|
+
const fse = (e, t) => e >> BigInt(t) & 1n, dse = (e, t, r) => e | (r ? C3 : ise) << BigInt(t), z3 = (e) => (ase << BigInt(e - 1)) - C3, Mb = (e) => new Uint8Array(e), K5 = (e) => Uint8Array.from(e);
|
|
57301
57306
|
function yT(e, t, r) {
|
|
57302
57307
|
if (typeof e != "number" || e < 2)
|
|
57303
57308
|
throw new Error("hashLen must be a number");
|
|
@@ -57305,10 +57310,10 @@ function yT(e, t, r) {
|
|
|
57305
57310
|
throw new Error("qByteLen must be a number");
|
|
57306
57311
|
if (typeof r != "function")
|
|
57307
57312
|
throw new Error("hmacFn must be a function");
|
|
57308
|
-
let n =
|
|
57313
|
+
let n = Mb(e), o = Mb(e), i = 0;
|
|
57309
57314
|
const a = () => {
|
|
57310
57315
|
n.fill(1), o.fill(0), i = 0;
|
|
57311
|
-
}, s = (...u) => r(o, n, ...u), c = (u =
|
|
57316
|
+
}, s = (...u) => r(o, n, ...u), c = (u = Mb()) => {
|
|
57312
57317
|
o = s(K5([0]), u), n = s(), u.length !== 0 && (o = s(K5([1]), u), n = s());
|
|
57313
57318
|
}, l = () => {
|
|
57314
57319
|
if (i++ >= 1e3)
|
|
@@ -57573,7 +57578,7 @@ function kse(e, t, r = !1) {
|
|
|
57573
57578
|
return Gr(i, t - Pr) + Pr;
|
|
57574
57579
|
}
|
|
57575
57580
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
57576
|
-
const xse = BigInt(0),
|
|
57581
|
+
const xse = BigInt(0), Fb = BigInt(1);
|
|
57577
57582
|
function Ase(e, t) {
|
|
57578
57583
|
const r = (o, i) => {
|
|
57579
57584
|
const a = i.negate();
|
|
@@ -57588,7 +57593,7 @@ function Ase(e, t) {
|
|
|
57588
57593
|
unsafeLadder(o, i) {
|
|
57589
57594
|
let a = e.ZERO, s = o;
|
|
57590
57595
|
for (; i > xse; )
|
|
57591
|
-
i &
|
|
57596
|
+
i & Fb && (a = a.add(s)), s = s.double(), i >>= Fb;
|
|
57592
57597
|
return a;
|
|
57593
57598
|
},
|
|
57594
57599
|
/**
|
|
@@ -57626,7 +57631,7 @@ function Ase(e, t) {
|
|
|
57626
57631
|
for (let y = 0; y < s; y++) {
|
|
57627
57632
|
const m = y * c;
|
|
57628
57633
|
let w = Number(a & f);
|
|
57629
|
-
a >>= g, w > c && (w -= h, a +=
|
|
57634
|
+
a >>= g, w > c && (w -= h, a += Fb);
|
|
57630
57635
|
const v = m, x = m + Math.abs(w) - 1, E = y % 2 !== 0, S = w < 0;
|
|
57631
57636
|
w === 0 ? u = u.add(r(E, i[v])) : l = l.add(r(S, i[x]));
|
|
57632
57637
|
}
|
|
@@ -58471,7 +58476,7 @@ function fg(e, ...t) {
|
|
|
58471
58476
|
}
|
|
58472
58477
|
return sg(uo(r, ...t));
|
|
58473
58478
|
}
|
|
58474
|
-
const H3 = (e) => e.toRawBytes(!0).slice(1), Dw = (e) => gc(e, 32),
|
|
58479
|
+
const H3 = (e) => e.toRawBytes(!0).slice(1), Dw = (e) => gc(e, 32), Vb = (e) => Gr(e, Ym), Vd = (e) => Gr(e, ug), D3 = fa.ProjectivePoint, qse = (e, t, r) => D3.BASE.multiplyAndAddUnsafe(e, t, r);
|
|
58475
58480
|
function Kw(e) {
|
|
58476
58481
|
let t = fa.utils.normPrivateKeyToScalar(e), r = D3.fromPrivateKey(t);
|
|
58477
58482
|
return { scalar: r.hasEvenY() ? t : Vd(-t), bytes: H3(r) };
|
|
@@ -58479,9 +58484,9 @@ function Kw(e) {
|
|
|
58479
58484
|
function ST(e) {
|
|
58480
58485
|
if (!_T(e))
|
|
58481
58486
|
throw new Error("bad x: need 0 < x < p");
|
|
58482
|
-
const t =
|
|
58487
|
+
const t = Vb(e * e), r = Vb(t * e + BigInt(7));
|
|
58483
58488
|
let n = AT(r);
|
|
58484
|
-
n % lg !== Jm && (n =
|
|
58489
|
+
n % lg !== Jm && (n = Vb(-n));
|
|
58485
58490
|
const o = new D3(e, n, xT);
|
|
58486
58491
|
return o.assertValidity(), o;
|
|
58487
58492
|
}
|
|
@@ -58614,9 +58619,9 @@ const Qse = {
|
|
|
58614
58619
|
exists: Yse,
|
|
58615
58620
|
output: Jse
|
|
58616
58621
|
};
|
|
58617
|
-
var
|
|
58622
|
+
var Gb = Qse;
|
|
58618
58623
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
58619
|
-
const
|
|
58624
|
+
const Zb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Di = (e, t) => e << 32 - t | e >>> t, ece = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
58620
58625
|
if (!ece)
|
|
58621
58626
|
throw new Error("Non little-endian hardware is not supported");
|
|
58622
58627
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -58648,17 +58653,17 @@ function nce(e, t, r, n) {
|
|
|
58648
58653
|
}
|
|
58649
58654
|
let oce = class extends rce {
|
|
58650
58655
|
constructor(e, t, r, n) {
|
|
58651
|
-
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view =
|
|
58656
|
+
super(), this.blockLen = e, this.outputLen = t, this.padOffset = r, this.isLE = n, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = Zb(this.buffer);
|
|
58652
58657
|
}
|
|
58653
58658
|
update(e) {
|
|
58654
|
-
|
|
58659
|
+
Gb.exists(this);
|
|
58655
58660
|
const { view: t, buffer: r, blockLen: n } = this;
|
|
58656
58661
|
e = PT(e);
|
|
58657
58662
|
const o = e.length;
|
|
58658
58663
|
for (let i = 0; i < o; ) {
|
|
58659
58664
|
const a = Math.min(n - this.pos, o - i);
|
|
58660
58665
|
if (a === n) {
|
|
58661
|
-
const s =
|
|
58666
|
+
const s = Zb(e);
|
|
58662
58667
|
for (; n <= o - i; i += n)
|
|
58663
58668
|
this.process(s, i);
|
|
58664
58669
|
continue;
|
|
@@ -58668,14 +58673,14 @@ let oce = class extends rce {
|
|
|
58668
58673
|
return this.length += e.length, this.roundClean(), this;
|
|
58669
58674
|
}
|
|
58670
58675
|
digestInto(e) {
|
|
58671
|
-
|
|
58676
|
+
Gb.exists(this), Gb.output(e, this), this.finished = !0;
|
|
58672
58677
|
const { buffer: t, view: r, blockLen: n, isLE: o } = this;
|
|
58673
58678
|
let { pos: i } = this;
|
|
58674
58679
|
t[i++] = 128, this.buffer.subarray(i).fill(0), this.padOffset > n - i && (this.process(r, 0), i = 0);
|
|
58675
58680
|
for (let u = i; u < n; u++)
|
|
58676
58681
|
t[u] = 0;
|
|
58677
58682
|
nce(r, n - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
58678
|
-
const a =
|
|
58683
|
+
const a = Zb(e), s = this.outputLen;
|
|
58679
58684
|
if (s % 4)
|
|
58680
58685
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
58681
58686
|
const c = s / 4, l = this.get();
|
|
@@ -59616,7 +59621,7 @@ const _ue = {
|
|
|
59616
59621
|
};
|
|
59617
59622
|
var iu = _ue;
|
|
59618
59623
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
59619
|
-
const Sue = (e) => e instanceof Uint8Array,
|
|
59624
|
+
const Sue = (e) => e instanceof Uint8Array, Wb = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Ki = (e, t) => e << 32 - t | e >>> t, $ue = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
59620
59625
|
if (!$ue)
|
|
59621
59626
|
throw new Error("Non little-endian hardware is not supported");
|
|
59622
59627
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -59648,7 +59653,7 @@ function Iue(e, t, r, n) {
|
|
|
59648
59653
|
}
|
|
59649
59654
|
class V3 extends tI {
|
|
59650
59655
|
constructor(t, r, n, o) {
|
|
59651
|
-
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view =
|
|
59656
|
+
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = Wb(this.buffer);
|
|
59652
59657
|
}
|
|
59653
59658
|
update(t) {
|
|
59654
59659
|
iu.exists(this);
|
|
@@ -59658,7 +59663,7 @@ class V3 extends tI {
|
|
|
59658
59663
|
for (let a = 0; a < i; ) {
|
|
59659
59664
|
const s = Math.min(o - this.pos, i - a);
|
|
59660
59665
|
if (s === o) {
|
|
59661
|
-
const c =
|
|
59666
|
+
const c = Wb(t);
|
|
59662
59667
|
for (; o <= i - a; a += o)
|
|
59663
59668
|
this.process(c, a);
|
|
59664
59669
|
continue;
|
|
@@ -59675,7 +59680,7 @@ class V3 extends tI {
|
|
|
59675
59680
|
for (let f = a; f < o; f++)
|
|
59676
59681
|
r[f] = 0;
|
|
59677
59682
|
Iue(n, o - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
59678
|
-
const s =
|
|
59683
|
+
const s = Wb(t), c = this.outputLen;
|
|
59679
59684
|
if (c % 4)
|
|
59680
59685
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
59681
59686
|
const l = c / 4, u = this.get();
|
|
@@ -64811,7 +64816,7 @@ oy.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
|
|
|
64811
64816
|
var bi = {}, Ma = {};
|
|
64812
64817
|
Object.defineProperty(Ma, "__esModule", { value: !0 });
|
|
64813
64818
|
Ma.HashMD = Ma.Maj = Ma.Chi = void 0;
|
|
64814
|
-
const
|
|
64819
|
+
const Xb = Ao, Yf = Uc;
|
|
64815
64820
|
function dhe(e, t, r, n) {
|
|
64816
64821
|
if (typeof e.setBigUint64 == "function")
|
|
64817
64822
|
return e.setBigUint64(t, r, n);
|
|
@@ -64827,7 +64832,7 @@ class ghe extends Yf.Hash {
|
|
|
64827
64832
|
super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = o, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = (0, Yf.createView)(this.buffer);
|
|
64828
64833
|
}
|
|
64829
64834
|
update(t) {
|
|
64830
|
-
(0,
|
|
64835
|
+
(0, Xb.exists)(this);
|
|
64831
64836
|
const { view: r, buffer: n, blockLen: o } = this;
|
|
64832
64837
|
t = (0, Yf.toBytes)(t);
|
|
64833
64838
|
const i = t.length;
|
|
@@ -64844,7 +64849,7 @@ class ghe extends Yf.Hash {
|
|
|
64844
64849
|
return this.length += t.length, this.roundClean(), this;
|
|
64845
64850
|
}
|
|
64846
64851
|
digestInto(t) {
|
|
64847
|
-
(0,
|
|
64852
|
+
(0, Xb.exists)(this), (0, Xb.output)(t, this), this.finished = !0;
|
|
64848
64853
|
const { buffer: r, view: n, blockLen: o, isLE: i } = this;
|
|
64849
64854
|
let { pos: a } = this;
|
|
64850
64855
|
r[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > o - a && (this.process(n, 0), a = 0);
|
|
@@ -64875,7 +64880,7 @@ class ghe extends Yf.Hash {
|
|
|
64875
64880
|
Ma.HashMD = ghe;
|
|
64876
64881
|
Object.defineProperty(bi, "__esModule", { value: !0 });
|
|
64877
64882
|
bi.sha224 = bi.sha256 = bi.SHA256 = void 0;
|
|
64878
|
-
const
|
|
64883
|
+
const Yb = Ma, Lo = Uc, mhe = /* @__PURE__ */ new Uint32Array([
|
|
64879
64884
|
1116352408,
|
|
64880
64885
|
1899447441,
|
|
64881
64886
|
3049323471,
|
|
@@ -64950,7 +64955,7 @@ const Y1 = Ma, Lo = Uc, mhe = /* @__PURE__ */ new Uint32Array([
|
|
|
64950
64955
|
528734635,
|
|
64951
64956
|
1541459225
|
|
64952
64957
|
]), Js = /* @__PURE__ */ new Uint32Array(64);
|
|
64953
|
-
class fE extends
|
|
64958
|
+
class fE extends Yb.HashMD {
|
|
64954
64959
|
constructor() {
|
|
64955
64960
|
super(64, 32, 8, !1), this.A = Ys[0] | 0, this.B = Ys[1] | 0, this.C = Ys[2] | 0, this.D = Ys[3] | 0, this.E = Ys[4] | 0, this.F = Ys[5] | 0, this.G = Ys[6] | 0, this.H = Ys[7] | 0;
|
|
64956
64961
|
}
|
|
@@ -64971,7 +64976,7 @@ class fE extends Y1.HashMD {
|
|
|
64971
64976
|
}
|
|
64972
64977
|
let { A: n, B: o, C: i, D: a, E: s, F: c, G: l, H: u } = this;
|
|
64973
64978
|
for (let f = 0; f < 64; f++) {
|
|
64974
|
-
const h = (0, Lo.rotr)(s, 6) ^ (0, Lo.rotr)(s, 11) ^ (0, Lo.rotr)(s, 25), g = u + h + (0,
|
|
64979
|
+
const h = (0, Lo.rotr)(s, 6) ^ (0, Lo.rotr)(s, 11) ^ (0, Lo.rotr)(s, 25), g = u + h + (0, Yb.Chi)(s, c, l) + mhe[f] + Js[f] | 0, y = ((0, Lo.rotr)(n, 2) ^ (0, Lo.rotr)(n, 13) ^ (0, Lo.rotr)(n, 22)) + (0, Yb.Maj)(n, o, i) | 0;
|
|
64975
64980
|
u = l, l = c, c = s, s = a + g | 0, a = i, i = o, o = n, n = g + y | 0;
|
|
64976
64981
|
}
|
|
64977
64982
|
n = n + this.A | 0, o = o + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, s = s + this.E | 0, c = c + this.F | 0, l = l + this.G | 0, u = u + this.H | 0, this.set(n, o, i, a, s, c, l, u);
|
|
@@ -65345,9 +65350,9 @@ var cP = {}, Of = {};
|
|
|
65345
65350
|
Of.byteLength = vpe;
|
|
65346
65351
|
Of.toByteArray = kpe;
|
|
65347
65352
|
Of.fromByteArray = _pe;
|
|
65348
|
-
var Yi = [], Do = [], bpe = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
65349
|
-
for (var il = 0, wpe =
|
|
65350
|
-
Yi[il] =
|
|
65353
|
+
var Yi = [], Do = [], bpe = typeof Uint8Array < "u" ? Uint8Array : Array, Jb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
65354
|
+
for (var il = 0, wpe = Jb.length; il < wpe; ++il)
|
|
65355
|
+
Yi[il] = Jb[il], Do[Jb.charCodeAt(il)] = il;
|
|
65351
65356
|
Do[45] = 62;
|
|
65352
65357
|
Do[95] = 63;
|
|
65353
65358
|
function uP(e) {
|
|
@@ -66495,10 +66500,10 @@ const Jpe = (e, t, r, { allOwnKeys: n } = {}) => (Vh(t, (o, i) => {
|
|
|
66495
66500
|
};
|
|
66496
66501
|
return Uf(e) ? n(e) : n(String(e).split(t)), r;
|
|
66497
66502
|
}, d0e = () => {
|
|
66498
|
-
}, h0e = (e, t) => e != null && Number.isFinite(e = +e) ? e : t,
|
|
66503
|
+
}, h0e = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Qb = "abcdefghijklmnopqrstuvwxyz", s6 = "0123456789", xP = {
|
|
66499
66504
|
DIGIT: s6,
|
|
66500
|
-
ALPHA:
|
|
66501
|
-
ALPHA_DIGIT:
|
|
66505
|
+
ALPHA: Qb,
|
|
66506
|
+
ALPHA_DIGIT: Qb + Qb.toUpperCase() + s6
|
|
66502
66507
|
}, p0e = (e = 16, t = xP.ALPHA_DIGIT) => {
|
|
66503
66508
|
let r = "";
|
|
66504
66509
|
const { length: n } = t;
|
|
@@ -66996,7 +67001,7 @@ function R0e(e) {
|
|
|
66996
67001
|
return t;
|
|
66997
67002
|
}
|
|
66998
67003
|
const L0e = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
66999
|
-
function
|
|
67004
|
+
function e1(e, t, r, n, o) {
|
|
67000
67005
|
if (re.isFunction(n))
|
|
67001
67006
|
return n.call(this, t, r);
|
|
67002
67007
|
if (o && (t = r), !!re.isString(t)) {
|
|
@@ -67065,7 +67070,7 @@ class ro {
|
|
|
67065
67070
|
has(t, r) {
|
|
67066
67071
|
if (t = Jf(t), t) {
|
|
67067
67072
|
const n = re.findKey(this, t);
|
|
67068
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
67073
|
+
return !!(n && this[n] !== void 0 && (!r || e1(this, this[n], n, r)));
|
|
67069
67074
|
}
|
|
67070
67075
|
return !1;
|
|
67071
67076
|
}
|
|
@@ -67075,7 +67080,7 @@ class ro {
|
|
|
67075
67080
|
function i(a) {
|
|
67076
67081
|
if (a = Jf(a), a) {
|
|
67077
67082
|
const s = re.findKey(n, a);
|
|
67078
|
-
s && (!r ||
|
|
67083
|
+
s && (!r || e1(n, n[s], s, r)) && (delete n[s], o = !0);
|
|
67079
67084
|
}
|
|
67080
67085
|
}
|
|
67081
67086
|
return re.isArray(t) ? t.forEach(i) : i(t), o;
|
|
@@ -67085,7 +67090,7 @@ class ro {
|
|
|
67085
67090
|
let n = r.length, o = !1;
|
|
67086
67091
|
for (; n--; ) {
|
|
67087
67092
|
const i = r[n];
|
|
67088
|
-
(!t ||
|
|
67093
|
+
(!t || e1(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
67089
67094
|
}
|
|
67090
67095
|
return o;
|
|
67091
67096
|
}
|
|
@@ -67149,7 +67154,7 @@ re.reduceDescriptors(ro.prototype, ({ value: e }, t) => {
|
|
|
67149
67154
|
};
|
|
67150
67155
|
});
|
|
67151
67156
|
re.freezeMethods(ro);
|
|
67152
|
-
function
|
|
67157
|
+
function t1(e, t) {
|
|
67153
67158
|
const r = this || Gh, n = t || r, o = ro.from(n.headers);
|
|
67154
67159
|
let i = n.data;
|
|
67155
67160
|
return re.forEach(e, function(a) {
|
|
@@ -67693,22 +67698,22 @@ const y6 = (e) => `- ${e}`, age = (e) => re.isFunction(e) || e === null || e ===
|
|
|
67693
67698
|
},
|
|
67694
67699
|
adapters: av
|
|
67695
67700
|
};
|
|
67696
|
-
function
|
|
67701
|
+
function r1(e) {
|
|
67697
67702
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
67698
67703
|
throw new Cf(null, e);
|
|
67699
67704
|
}
|
|
67700
67705
|
function b6(e) {
|
|
67701
|
-
return
|
|
67706
|
+
return r1(e), e.headers = ro.from(e.headers), e.data = t1.call(
|
|
67702
67707
|
e,
|
|
67703
67708
|
e.transformRequest
|
|
67704
67709
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), RP.getAdapter(e.adapter || Gh.adapter)(e).then(function(t) {
|
|
67705
|
-
return
|
|
67710
|
+
return r1(e), t.data = t1.call(
|
|
67706
67711
|
e,
|
|
67707
67712
|
e.transformResponse,
|
|
67708
67713
|
t
|
|
67709
67714
|
), t.headers = ro.from(t.headers), t;
|
|
67710
67715
|
}, function(t) {
|
|
67711
|
-
return BP(t) || (
|
|
67716
|
+
return BP(t) || (r1(e), t && t.response && (t.response.data = t1.call(
|
|
67712
67717
|
e,
|
|
67713
67718
|
e.transformResponse,
|
|
67714
67719
|
t.response
|
|
@@ -89470,7 +89475,7 @@ function Nf(...e) {
|
|
|
89470
89475
|
}
|
|
89471
89476
|
};
|
|
89472
89477
|
}
|
|
89473
|
-
const dv = Nf(yy(), hy(), gy(0), py(4294967295)), sme = Nf(yy(), hy(), gy(0), py(2147483647)), cme = Nf(yy(), hy(), gy(0), py(255)),
|
|
89478
|
+
const dv = Nf(yy(), hy(), gy(0), py(4294967295)), sme = Nf(yy(), hy(), gy(0), py(2147483647)), cme = Nf(yy(), hy(), gy(0), py(255)), n1 = Nf(my(Uint8Array), PE(32)), ume = Nf(my(Uint8Array), PE(33)), lme = fv({
|
|
89474
89479
|
wif: cme,
|
|
89475
89480
|
bip32: fv({
|
|
89476
89481
|
public: dv,
|
|
@@ -89697,7 +89702,7 @@ function pme(e) {
|
|
|
89697
89702
|
return c(h, g, y);
|
|
89698
89703
|
}
|
|
89699
89704
|
function c(h, g, y, m, w, v) {
|
|
89700
|
-
if (_a(
|
|
89705
|
+
if (_a(n1, h), _a(n1, g), y = y || t, !e.isPrivate(h))
|
|
89701
89706
|
throw new TypeError("Private key not in range [1, n)");
|
|
89702
89707
|
return new i(h, void 0, g, y, m, w, v);
|
|
89703
89708
|
}
|
|
@@ -89705,7 +89710,7 @@ function pme(e) {
|
|
|
89705
89710
|
return u(h, g, y);
|
|
89706
89711
|
}
|
|
89707
89712
|
function u(h, g, y, m, w, v) {
|
|
89708
|
-
if (_a(ume, h), _a(
|
|
89713
|
+
if (_a(ume, h), _a(n1, g), y = y || t, !e.isPoint(h))
|
|
89709
89714
|
throw new TypeError("Point is not on the curve");
|
|
89710
89715
|
return new i(void 0, h, g, y, m, w, v);
|
|
89711
89716
|
}
|
|
@@ -89730,60 +89735,68 @@ jS(bE);
|
|
|
89730
89735
|
const yme = async ({
|
|
89731
89736
|
contentBase64: e,
|
|
89732
89737
|
mimeType: t,
|
|
89733
|
-
|
|
89734
|
-
|
|
89735
|
-
|
|
89736
|
-
|
|
89738
|
+
quantity: r = 1,
|
|
89739
|
+
inscriptions: n,
|
|
89740
|
+
ordinalAddress: o,
|
|
89741
|
+
paymentAddress: i,
|
|
89742
|
+
paymentPublicKey: a,
|
|
89743
|
+
signPsbt: s
|
|
89737
89744
|
}) => {
|
|
89738
89745
|
try {
|
|
89739
|
-
|
|
89740
|
-
contentBase64
|
|
89741
|
-
|
|
89742
|
-
|
|
89743
|
-
|
|
89744
|
-
|
|
89746
|
+
if (!e && !n)
|
|
89747
|
+
throw new Error("contentBase64 or inscriptions is required");
|
|
89748
|
+
const c = await vme(), l = Buffer.from(c).toString("hex"), u = n || Array(r).fill({
|
|
89749
|
+
content: e,
|
|
89750
|
+
mimeType: t
|
|
89751
|
+
});
|
|
89752
|
+
console.log("INSCRIPTIONS", u);
|
|
89753
|
+
const f = await bme({
|
|
89754
|
+
inscriptions: u,
|
|
89755
|
+
paymentAddress: i,
|
|
89756
|
+
paymentPublicKey: a,
|
|
89757
|
+
privKey: l
|
|
89745
89758
|
});
|
|
89746
|
-
if (!
|
|
89759
|
+
if (!f || !(f != null && f.psbtHex))
|
|
89747
89760
|
throw new Error("couldn't get commit tx");
|
|
89748
|
-
const
|
|
89761
|
+
const h = String(f == null ? void 0 : f.psbtHex), g = String(f == null ? void 0 : f.psbtBase64), y = await s(
|
|
89749
89762
|
"",
|
|
89750
|
-
|
|
89751
|
-
|
|
89763
|
+
h,
|
|
89764
|
+
g,
|
|
89752
89765
|
!0,
|
|
89753
89766
|
!1
|
|
89754
89767
|
);
|
|
89755
|
-
if (!
|
|
89756
|
-
const
|
|
89757
|
-
if (!
|
|
89768
|
+
if (!y) throw new Error("sign psbt failed");
|
|
89769
|
+
const m = vr.fromHex((y == null ? void 0 : y.signedPsbtHex) || "").extractTransaction(), w = await TE(m.toHex(), Rt);
|
|
89770
|
+
if (!w) throw new Error("commit tx failed");
|
|
89758
89771
|
return await wme({
|
|
89759
|
-
|
|
89760
|
-
|
|
89761
|
-
|
|
89762
|
-
|
|
89763
|
-
commitTxId: g
|
|
89772
|
+
inscriptions: u,
|
|
89773
|
+
ordinalAddress: o,
|
|
89774
|
+
privKey: l,
|
|
89775
|
+
commitTxId: w
|
|
89764
89776
|
});
|
|
89765
|
-
} catch (
|
|
89766
|
-
throw
|
|
89777
|
+
} catch (c) {
|
|
89778
|
+
throw c;
|
|
89767
89779
|
}
|
|
89768
89780
|
}, bme = async ({
|
|
89769
|
-
|
|
89770
|
-
|
|
89771
|
-
|
|
89772
|
-
|
|
89773
|
-
privKey: o
|
|
89781
|
+
inscriptions: e,
|
|
89782
|
+
paymentAddress: t,
|
|
89783
|
+
paymentPublicKey: r,
|
|
89784
|
+
privKey: n
|
|
89774
89785
|
}) => {
|
|
89775
89786
|
try {
|
|
89776
|
-
const i =
|
|
89787
|
+
const o = e.length, i = e.reduce(
|
|
89788
|
+
(S, O) => S + Buffer.from(O.content).length,
|
|
89789
|
+
0
|
|
89790
|
+
);
|
|
89777
89791
|
if (i > 39e4)
|
|
89778
89792
|
throw new Error("Content size is too large, must be less than 390kb");
|
|
89779
|
-
const { fastestFee: a } = await _me(Rt), s = R$(String(
|
|
89793
|
+
const { fastestFee: a } = await _me(Rt), s = R$(String(n), !0), c = new vr({
|
|
89780
89794
|
network: Yo
|
|
89781
89795
|
}), { inscriberAddress: l } = Eme(
|
|
89782
89796
|
s,
|
|
89783
|
-
e
|
|
89784
|
-
|
|
89785
|
-
|
|
89786
|
-
r,
|
|
89797
|
+
e
|
|
89798
|
+
), u = 5 * 34 * o, f = Math.floor(u * a * o), h = Math.floor(i * a / 3) + 1e3 + 546 * o, g = Math.floor(f + h), y = (await $E(
|
|
89799
|
+
t,
|
|
89787
89800
|
Rt
|
|
89788
89801
|
)).filter((S) => S.value > 3e3).sort((S, O) => O.value - S.value), m = yge(y);
|
|
89789
89802
|
if (m === 0)
|
|
@@ -89791,18 +89804,18 @@ const yme = async ({
|
|
|
89791
89804
|
if (m < g)
|
|
89792
89805
|
throw new Error("insufficient funds");
|
|
89793
89806
|
let w = 0;
|
|
89794
|
-
const v = await p3(
|
|
89807
|
+
const v = await p3(t);
|
|
89795
89808
|
let x = 0;
|
|
89796
89809
|
for await (const S of y) {
|
|
89797
|
-
const O = bge(
|
|
89810
|
+
const O = bge(t, Rt);
|
|
89798
89811
|
if (console.log({ paymentAddressType: O }), c.addInput({
|
|
89799
89812
|
hash: S.txid,
|
|
89800
89813
|
index: S.vout,
|
|
89801
89814
|
witnessUtxo: { value: BigInt(S.value), script: v }
|
|
89802
89815
|
}), O === cd && c.updateInput(x, {
|
|
89803
|
-
tapInternalKey: fd(Buffer.from(
|
|
89816
|
+
tapInternalKey: fd(Buffer.from(r, "hex"))
|
|
89804
89817
|
}), O === cS) {
|
|
89805
|
-
let T = KP(
|
|
89818
|
+
let T = KP(r, Rt);
|
|
89806
89819
|
c.updateInput(x, { redeemScript: T });
|
|
89807
89820
|
}
|
|
89808
89821
|
if (x++, w += S.value, w > g)
|
|
@@ -89814,85 +89827,82 @@ const yme = async ({
|
|
|
89814
89827
|
address: l
|
|
89815
89828
|
}), E > 546 && c.addOutput({
|
|
89816
89829
|
value: BigInt(E),
|
|
89817
|
-
address:
|
|
89830
|
+
address: t
|
|
89818
89831
|
}), {
|
|
89819
89832
|
psbtHex: c.toHex(),
|
|
89820
89833
|
psbtBase64: c.toBase64()
|
|
89821
89834
|
};
|
|
89822
|
-
} catch (
|
|
89823
|
-
throw
|
|
89835
|
+
} catch (o) {
|
|
89836
|
+
throw o;
|
|
89824
89837
|
}
|
|
89825
89838
|
}, wme = async ({
|
|
89826
|
-
|
|
89827
|
-
|
|
89828
|
-
|
|
89829
|
-
|
|
89830
|
-
|
|
89831
|
-
isDry: i
|
|
89839
|
+
inscriptions: e,
|
|
89840
|
+
ordinalAddress: t,
|
|
89841
|
+
commitTxId: r,
|
|
89842
|
+
privKey: n,
|
|
89843
|
+
isDry: o
|
|
89832
89844
|
}) => {
|
|
89833
89845
|
try {
|
|
89834
|
-
const
|
|
89835
|
-
if (!await Ame(String(
|
|
89846
|
+
const i = kie(n), a = R$(n, !0), s = TO(a, e), c = mg.encodeScript(s), [l, u] = mg.getPubKey(a, { target: c });
|
|
89847
|
+
if (!await Ame(String(r)))
|
|
89836
89848
|
throw new Error("ERROR WAITING FOR COMMIT TX");
|
|
89837
|
-
const
|
|
89838
|
-
if (
|
|
89849
|
+
const f = await Sme(r, 0);
|
|
89850
|
+
if (f === 0 || !f)
|
|
89839
89851
|
throw new Error("ERROR GETTING FIRST INPUT VALUE");
|
|
89840
|
-
const
|
|
89852
|
+
const h = gi.create({
|
|
89841
89853
|
vin: [
|
|
89842
89854
|
{
|
|
89843
|
-
txid:
|
|
89855
|
+
txid: r,
|
|
89844
89856
|
vout: 0,
|
|
89845
89857
|
prevout: {
|
|
89846
|
-
value:
|
|
89847
|
-
scriptPubKey: ["OP_1",
|
|
89858
|
+
value: f,
|
|
89859
|
+
scriptPubKey: ["OP_1", l]
|
|
89848
89860
|
}
|
|
89849
89861
|
}
|
|
89850
89862
|
],
|
|
89851
89863
|
vout: [
|
|
89852
|
-
{
|
|
89864
|
+
...Array(e.length).fill({
|
|
89853
89865
|
value: 546,
|
|
89854
|
-
scriptPubKey: BI.toScriptPubKey(
|
|
89855
|
-
}
|
|
89866
|
+
scriptPubKey: BI.toScriptPubKey(t)
|
|
89867
|
+
})
|
|
89856
89868
|
]
|
|
89857
|
-
}),
|
|
89858
|
-
return
|
|
89859
|
-
} catch (
|
|
89860
|
-
throw
|
|
89869
|
+
}), g = rde.taproot.sign(i, h, 0, { extension: c });
|
|
89870
|
+
return h.vin[0].witness = [g, s, u], o ? gi.util.getTxid(h) : await TE(gi.encode(h).hex, Rt);
|
|
89871
|
+
} catch (i) {
|
|
89872
|
+
throw i;
|
|
89861
89873
|
}
|
|
89862
89874
|
};
|
|
89863
89875
|
async function vme() {
|
|
89864
89876
|
const e = crypto.getRandomValues(new Uint8Array(32)), t = Kge(Buffer.from(e)), r = await Dge(t), n = mme.fromSeed(r);
|
|
89865
89877
|
return n == null ? void 0 : n.derivePath("m/44'/0'/0'/0/0").privateKey;
|
|
89866
89878
|
}
|
|
89867
|
-
const TO = (e, t
|
|
89868
|
-
const
|
|
89869
|
-
|
|
89870
|
-
|
|
89871
|
-
|
|
89872
|
-
|
|
89873
|
-
|
|
89874
|
-
|
|
89875
|
-
|
|
89876
|
-
|
|
89877
|
-
|
|
89878
|
-
|
|
89879
|
-
|
|
89880
|
-
|
|
89881
|
-
|
|
89882
|
-
"OP_IF",
|
|
89883
|
-
|
|
89884
|
-
|
|
89885
|
-
|
|
89886
|
-
"
|
|
89887
|
-
|
|
89888
|
-
|
|
89889
|
-
];
|
|
89890
|
-
}, Eme = (e, t, r) => {
|
|
89891
|
-
const n = TO(e, t, r), o = mg.encodeScript(n), [i] = mg.getPubKey(e, { target: o });
|
|
89879
|
+
const TO = (e, t) => {
|
|
89880
|
+
const r = new TextEncoder(), n = r.encode("ord"), o = 546, i = (s, c) => {
|
|
89881
|
+
let l;
|
|
89882
|
+
if (c === gme) {
|
|
89883
|
+
const f = Buffer.from(s, "base64").toString("utf-8");
|
|
89884
|
+
l = Buffer.from(f, "utf-8");
|
|
89885
|
+
} else
|
|
89886
|
+
l = Buffer.from(s, "base64");
|
|
89887
|
+
const u = [];
|
|
89888
|
+
for (let f = 0; f < l.length; f += 520)
|
|
89889
|
+
u.push(l.slice(f, f + 520));
|
|
89890
|
+
return u;
|
|
89891
|
+
}, a = [e, "OP_CHECKSIG"];
|
|
89892
|
+
return t.forEach((s, c) => {
|
|
89893
|
+
const { content: l, mimeType: u } = s, f = i(l, u);
|
|
89894
|
+
if (a.push("OP_0", "OP_IF", n, "01", r.encode(u), "OP_0"), c > 0) {
|
|
89895
|
+
const h = o * (c + 1), g = Buffer.from([h]);
|
|
89896
|
+
a.push(Buffer.from([2])), a.push(g);
|
|
89897
|
+
}
|
|
89898
|
+
a.push(...f.map((h) => h), "OP_ENDIF");
|
|
89899
|
+
}), a;
|
|
89900
|
+
}, Eme = (e, t) => {
|
|
89901
|
+
const r = TO(e, t), n = mg.encodeScript(r), [o] = mg.getPubKey(e, { target: n });
|
|
89892
89902
|
return {
|
|
89893
|
-
inscriberAddress: BI.p2tr.fromPubKey(
|
|
89894
|
-
tpubkey:
|
|
89895
|
-
tapleaf:
|
|
89903
|
+
inscriberAddress: BI.p2tr.fromPubKey(o),
|
|
89904
|
+
tpubkey: o,
|
|
89905
|
+
tapleaf: n
|
|
89896
89906
|
};
|
|
89897
89907
|
};
|
|
89898
89908
|
async function kme(e, t = Rt) {
|
|
@@ -90583,13 +90593,13 @@ var Ey = {}, ky = {}, cf = {};
|
|
|
90583
90593
|
Object.defineProperty(cf, "__esModule", { value: !0 });
|
|
90584
90594
|
cf.joseToDer = cf.derToJose = void 0;
|
|
90585
90595
|
const jO = Of, zO = In;
|
|
90586
|
-
function
|
|
90596
|
+
function o1(e) {
|
|
90587
90597
|
return (e / 8 | 0) + (e % 8 === 0 ? 0 : 1);
|
|
90588
90598
|
}
|
|
90589
90599
|
const Lme = {
|
|
90590
|
-
ES256:
|
|
90591
|
-
ES384:
|
|
90592
|
-
ES512:
|
|
90600
|
+
ES256: o1(256),
|
|
90601
|
+
ES384: o1(384),
|
|
90602
|
+
ES512: o1(521)
|
|
90593
90603
|
};
|
|
90594
90604
|
function RO(e) {
|
|
90595
90605
|
const t = Lme[e];
|
|
@@ -90953,7 +90963,7 @@ var C6 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
|
90953
90963
|
const e = Array(256).fill(-1);
|
|
90954
90964
|
for (let t = 0; t < C6.length; ++t) e[C6.charCodeAt(t)] = t;
|
|
90955
90965
|
})();
|
|
90956
|
-
var N6,
|
|
90966
|
+
var N6, i1, Rp, CE = (N6 = function(e, t) {
|
|
90957
90967
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.bech32m = t.bech32 = void 0;
|
|
90958
90968
|
const r = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", n = {};
|
|
90959
90969
|
for (let f = 0; f < 32; f++) {
|
|
@@ -91047,7 +91057,7 @@ var N6, ib, Rp, CE = (N6 = function(e, t) {
|
|
|
91047
91057
|
}, toWords: s, fromWordsUnsafe: c, fromWords: l };
|
|
91048
91058
|
}
|
|
91049
91059
|
t.bech32 = u("bech32"), t.bech32m = u("bech32m");
|
|
91050
|
-
}, N6(
|
|
91060
|
+
}, N6(i1 = { exports: {} }, i1.exports), i1.exports);
|
|
91051
91061
|
(Rp = CE) && Rp.__esModule && Object.prototype.hasOwnProperty.call(Rp, "default") && Rp.default;
|
|
91052
91062
|
CE.bech32m;
|
|
91053
91063
|
CE.bech32;
|
|
@@ -92286,10 +92296,10 @@ const Xye = 4e5, Yye = 6e4, Jye = (e) => {
|
|
|
92286
92296
|
Xh.validateInscriptionPayload = Jye;
|
|
92287
92297
|
Object.defineProperty(Ty, "__esModule", { value: !0 });
|
|
92288
92298
|
Ty.createInscription = void 0;
|
|
92289
|
-
const Qye = _o,
|
|
92299
|
+
const Qye = _o, ebe = Pi, tbe = Xh, rbe = async (e) => {
|
|
92290
92300
|
var t, r;
|
|
92291
|
-
const { getProvider: n } = e, o = await (0,
|
|
92292
|
-
(0,
|
|
92301
|
+
const { getProvider: n } = e, o = await (0, ebe.getProviderOrThrow)(n);
|
|
92302
|
+
(0, tbe.validateInscriptionPayload)(e.payload);
|
|
92293
92303
|
try {
|
|
92294
92304
|
const i = (0, Qye.createUnsecuredToken)(e.payload), a = await o.createInscription(i);
|
|
92295
92305
|
(t = e.onFinish) == null || t.call(e, a);
|
|
@@ -92297,22 +92307,22 @@ const Qye = _o, e1e = Pi, t1e = Xh, r1e = async (e) => {
|
|
|
92297
92307
|
console.error("[Connect] Error during create inscription", i), (r = e.onCancel) == null || r.call(e);
|
|
92298
92308
|
}
|
|
92299
92309
|
};
|
|
92300
|
-
Ty.createInscription =
|
|
92310
|
+
Ty.createInscription = rbe;
|
|
92301
92311
|
var Iy = {};
|
|
92302
92312
|
Object.defineProperty(Iy, "__esModule", { value: !0 });
|
|
92303
92313
|
Iy.createRepeatInscriptions = void 0;
|
|
92304
|
-
const
|
|
92314
|
+
const nbe = Pi, obe = _o, ibe = Xh, abe = async (e) => {
|
|
92305
92315
|
var t, r;
|
|
92306
|
-
const { getProvider: n } = e, o = await (0,
|
|
92307
|
-
(0,
|
|
92316
|
+
const { getProvider: n } = e, o = await (0, nbe.getProviderOrThrow)(n);
|
|
92317
|
+
(0, ibe.validateInscriptionPayload)(e.payload);
|
|
92308
92318
|
try {
|
|
92309
|
-
const i = (0,
|
|
92319
|
+
const i = (0, obe.createUnsecuredToken)(e.payload), a = await o.createRepeatInscriptions(i);
|
|
92310
92320
|
(t = e.onFinish) == null || t.call(e, a);
|
|
92311
92321
|
} catch (i) {
|
|
92312
92322
|
console.error("[Connect] Error during create repeat inscriptions", i), (r = e.onCancel) == null || r.call(e);
|
|
92313
92323
|
}
|
|
92314
92324
|
};
|
|
92315
|
-
Iy.createRepeatInscriptions =
|
|
92325
|
+
Iy.createRepeatInscriptions = abe;
|
|
92316
92326
|
var aB = {};
|
|
92317
92327
|
Object.defineProperty(aB, "__esModule", { value: !0 });
|
|
92318
92328
|
(function(e) {
|
|
@@ -92363,15 +92373,15 @@ Object.defineProperty(cB, "__esModule", { value: !0 });
|
|
|
92363
92373
|
var uB = {}, Py = {};
|
|
92364
92374
|
Object.defineProperty(Py, "__esModule", { value: !0 });
|
|
92365
92375
|
Py.sendBtcTransaction = void 0;
|
|
92366
|
-
const
|
|
92376
|
+
const sbe = _o, cbe = Pi, ube = (e) => e.map((t) => {
|
|
92367
92377
|
const { address: r, amountSats: n } = t;
|
|
92368
92378
|
return {
|
|
92369
92379
|
address: r,
|
|
92370
92380
|
amountSats: n.toString()
|
|
92371
92381
|
};
|
|
92372
|
-
}),
|
|
92382
|
+
}), lbe = async (e) => {
|
|
92373
92383
|
var t, r;
|
|
92374
|
-
const n = await (0,
|
|
92384
|
+
const n = await (0, cbe.getProviderOrThrow)(e.getProvider), { recipients: o, senderAddress: i, network: a, message: s } = e.payload;
|
|
92375
92385
|
if (!o || o.length === 0)
|
|
92376
92386
|
throw new Error("At least one recipient is required");
|
|
92377
92387
|
if (o.some((c) => typeof c.address != "string" || typeof c.amountSats != "bigint"))
|
|
@@ -92379,54 +92389,54 @@ const s1e = _o, c1e = Pi, u1e = (e) => e.map((t) => {
|
|
|
92379
92389
|
if (!i)
|
|
92380
92390
|
throw new Error("The sender address is required");
|
|
92381
92391
|
try {
|
|
92382
|
-
const c =
|
|
92392
|
+
const c = ube(o), l = {
|
|
92383
92393
|
network: a,
|
|
92384
92394
|
senderAddress: i,
|
|
92385
92395
|
message: s,
|
|
92386
92396
|
recipients: c
|
|
92387
|
-
}, u = (0,
|
|
92397
|
+
}, u = (0, sbe.createUnsecuredToken)(l), f = await n.sendBtcTransaction(u);
|
|
92388
92398
|
(t = e.onFinish) == null || t.call(e, f);
|
|
92389
92399
|
} catch (c) {
|
|
92390
92400
|
console.error("[Connect] Error during send BTC transaction request", c), (r = e.onCancel) == null || r.call(e);
|
|
92391
92401
|
}
|
|
92392
92402
|
};
|
|
92393
|
-
Py.sendBtcTransaction =
|
|
92403
|
+
Py.sendBtcTransaction = lbe;
|
|
92394
92404
|
var Oy = {};
|
|
92395
92405
|
Object.defineProperty(Oy, "__esModule", { value: !0 });
|
|
92396
92406
|
Oy.signTransaction = void 0;
|
|
92397
|
-
const
|
|
92407
|
+
const fbe = _o, dbe = Pi, hbe = async (e) => {
|
|
92398
92408
|
var t, r;
|
|
92399
|
-
const n = await (0,
|
|
92409
|
+
const n = await (0, dbe.getProviderOrThrow)(e.getProvider), { psbtBase64: o, inputsToSign: i } = e.payload;
|
|
92400
92410
|
if (!o)
|
|
92401
92411
|
throw new Error("A value for psbtBase64 representing the tx hash is required");
|
|
92402
92412
|
if (!i)
|
|
92403
92413
|
throw new Error("An array specifying the inputs to be signed by the wallet is required");
|
|
92404
92414
|
try {
|
|
92405
|
-
const a = (0,
|
|
92415
|
+
const a = (0, fbe.createUnsecuredToken)(e.payload), s = await n.signTransaction(a);
|
|
92406
92416
|
(t = e.onFinish) == null || t.call(e, s);
|
|
92407
92417
|
} catch (a) {
|
|
92408
92418
|
console.error("[Connect] Error during sign transaction request", a), (r = e.onCancel) == null || r.call(e);
|
|
92409
92419
|
}
|
|
92410
92420
|
};
|
|
92411
|
-
Oy.signTransaction =
|
|
92421
|
+
Oy.signTransaction = hbe;
|
|
92412
92422
|
var By = {};
|
|
92413
92423
|
Object.defineProperty(By, "__esModule", { value: !0 });
|
|
92414
92424
|
By.signMultipleTransactions = void 0;
|
|
92415
|
-
const
|
|
92425
|
+
const pbe = _o, gbe = Pi, mbe = async (e) => {
|
|
92416
92426
|
var t, r;
|
|
92417
|
-
const n = await (0,
|
|
92427
|
+
const n = await (0, gbe.getProviderOrThrow)(e.getProvider), { psbts: o } = e.payload;
|
|
92418
92428
|
if (!o || !o.length)
|
|
92419
92429
|
throw new Error("psbts array is required");
|
|
92420
92430
|
if (o.length > 100)
|
|
92421
92431
|
throw new Error("psbts array must contain less than 100 psbts");
|
|
92422
92432
|
try {
|
|
92423
|
-
const i = (0,
|
|
92433
|
+
const i = (0, pbe.createUnsecuredToken)(e.payload), a = await n.signMultipleTransactions(i);
|
|
92424
92434
|
(t = e.onFinish) == null || t.call(e, a);
|
|
92425
92435
|
} catch (i) {
|
|
92426
92436
|
console.error("[Connect] Error during sign Multiple transactions request", i), (r = e.onCancel) == null || r.call(e);
|
|
92427
92437
|
}
|
|
92428
92438
|
};
|
|
92429
|
-
By.signMultipleTransactions =
|
|
92439
|
+
By.signMultipleTransactions = mbe;
|
|
92430
92440
|
var lB = {};
|
|
92431
92441
|
Object.defineProperty(lB, "__esModule", { value: !0 });
|
|
92432
92442
|
(function(e) {
|
|
@@ -92465,15 +92475,15 @@ var fB = {};
|
|
|
92465
92475
|
};
|
|
92466
92476
|
Object.defineProperty(e, "__esModule", { value: !0 }), r(XO, e), r(QO, e), r(nB, e), r(iB, e), r(sB, e), r(Pi, e), r(uB, e), r(fB, e);
|
|
92467
92477
|
})(jE);
|
|
92468
|
-
const
|
|
92469
|
-
signMessage:
|
|
92470
|
-
sendBtcTransaction:
|
|
92471
|
-
signTransaction:
|
|
92472
|
-
} =
|
|
92473
|
-
class
|
|
92478
|
+
const ybe = /* @__PURE__ */ aee(jE), {
|
|
92479
|
+
signMessage: bbe,
|
|
92480
|
+
sendBtcTransaction: wbe,
|
|
92481
|
+
signTransaction: vbe
|
|
92482
|
+
} = ybe, Ebe = "ORANGE_CONNECTED_WALLET_STATE";
|
|
92483
|
+
class kbe extends cs {
|
|
92474
92484
|
constructor() {
|
|
92475
92485
|
super(...arguments), Te(this, "observer"), Te(this, "$valueStore", jf(
|
|
92476
|
-
|
|
92486
|
+
Ebe,
|
|
92477
92487
|
{
|
|
92478
92488
|
address: "",
|
|
92479
92489
|
paymentAddress: "",
|
|
@@ -92593,7 +92603,7 @@ class k1e extends cs {
|
|
|
92593
92603
|
throw new Error("User canceled the request");
|
|
92594
92604
|
}
|
|
92595
92605
|
};
|
|
92596
|
-
return await
|
|
92606
|
+
return await wbe(o), n;
|
|
92597
92607
|
}
|
|
92598
92608
|
async signMessage(t, r) {
|
|
92599
92609
|
let n = "";
|
|
@@ -92612,7 +92622,7 @@ class k1e extends cs {
|
|
|
92612
92622
|
throw new Error("User canceled the request");
|
|
92613
92623
|
}
|
|
92614
92624
|
};
|
|
92615
|
-
return await
|
|
92625
|
+
return await bbe(i), n;
|
|
92616
92626
|
}
|
|
92617
92627
|
async signPsbt(t, r, n, o, i) {
|
|
92618
92628
|
const a = vr.fromBase64(String(n), {
|
|
@@ -92661,7 +92671,7 @@ class k1e extends cs {
|
|
|
92661
92671
|
throw console.error("Error signing psbt:", E), new Error("Error signing psbt");
|
|
92662
92672
|
}
|
|
92663
92673
|
};
|
|
92664
|
-
if (await
|
|
92674
|
+
if (await vbe(x), !v)
|
|
92665
92675
|
throw new Error("Error signing psbt");
|
|
92666
92676
|
return o && (v.finalizeAllInputs(), m = v.toHex(), w = v.toBase64()), {
|
|
92667
92677
|
signedPsbtHex: m,
|
|
@@ -92670,11 +92680,11 @@ class k1e extends cs {
|
|
|
92670
92680
|
};
|
|
92671
92681
|
}
|
|
92672
92682
|
}
|
|
92673
|
-
const
|
|
92674
|
-
class
|
|
92683
|
+
const xbe = "OKX_CONNECTED_WALLET_STATE";
|
|
92684
|
+
class Abe extends cs {
|
|
92675
92685
|
constructor() {
|
|
92676
92686
|
super(...arguments), Te(this, "observer"), Te(this, "$valueStore", jf(
|
|
92677
|
-
|
|
92687
|
+
xbe,
|
|
92678
92688
|
{
|
|
92679
92689
|
address: "",
|
|
92680
92690
|
paymentAddress: "",
|
|
@@ -92786,11 +92796,11 @@ class A1e extends cs {
|
|
|
92786
92796
|
};
|
|
92787
92797
|
}
|
|
92788
92798
|
}
|
|
92789
|
-
const
|
|
92790
|
-
class
|
|
92799
|
+
const _be = "MAGIC_EDEN_CONNECTED_WALLET_STATE";
|
|
92800
|
+
class Sbe extends cs {
|
|
92791
92801
|
constructor() {
|
|
92792
92802
|
super(...arguments), Te(this, "observer"), Te(this, "$valueStore", jf(
|
|
92793
|
-
|
|
92803
|
+
_be,
|
|
92794
92804
|
{
|
|
92795
92805
|
address: "",
|
|
92796
92806
|
paymentAddress: "",
|
|
@@ -92999,7 +93009,7 @@ class S1e extends cs {
|
|
|
92999
93009
|
};
|
|
93000
93010
|
}
|
|
93001
93011
|
}
|
|
93002
|
-
class $
|
|
93012
|
+
class $be extends cs {
|
|
93003
93013
|
constructor() {
|
|
93004
93014
|
super(...arguments), Te(this, "observer");
|
|
93005
93015
|
}
|
|
@@ -93117,16 +93127,16 @@ class $1e extends cs {
|
|
|
93117
93127
|
await ((r = this.library) == null ? void 0 : r.switchChain(n)), this.$network.set(t), await this.getBalance();
|
|
93118
93128
|
}
|
|
93119
93129
|
}
|
|
93120
|
-
class
|
|
93130
|
+
class Tbe {
|
|
93121
93131
|
constructor(t, r) {
|
|
93122
93132
|
Te(this, "$store"), Te(this, "$network"), Te(this, "$providerMap"), this.config = r, this.$store = t.$store, this.$network = t.$network, this.$providerMap = {
|
|
93123
93133
|
[eu]: new Wye(t, this, r),
|
|
93124
|
-
[Ua]: new
|
|
93125
|
-
[tu]: new
|
|
93134
|
+
[Ua]: new Sbe(t, this, r),
|
|
93135
|
+
[tu]: new Abe(t, this, r),
|
|
93126
93136
|
// [OP_NET]: new OpNetProvider(stores, this, config),
|
|
93127
|
-
[dc]: new
|
|
93137
|
+
[dc]: new kbe(t, this, r),
|
|
93128
93138
|
[Jc]: new Gye(t, this, r),
|
|
93129
|
-
[Qc]: new $
|
|
93139
|
+
[Qc]: new $be(t, this, r),
|
|
93130
93140
|
[fc]: new Tme(t, this, r),
|
|
93131
93141
|
[Ba]: new Mye(t, this, r),
|
|
93132
93142
|
[ru]: new Fye(t, this, r)
|
|
@@ -93152,7 +93162,7 @@ class T1e {
|
|
|
93152
93162
|
handleIsInitializingChanged(t) {
|
|
93153
93163
|
if (typeof window < "u" && typeof localStorage < "u" && !t) {
|
|
93154
93164
|
const r = localStorage == null ? void 0 : localStorage.getItem(
|
|
93155
|
-
|
|
93165
|
+
vb
|
|
93156
93166
|
);
|
|
93157
93167
|
r && (this.$store.setKey("provider", r), this.connect(r));
|
|
93158
93168
|
}
|
|
@@ -93160,7 +93170,7 @@ class T1e {
|
|
|
93160
93170
|
async connect(t) {
|
|
93161
93171
|
this.$store.setKey("isConnecting", !0);
|
|
93162
93172
|
try {
|
|
93163
|
-
if (localStorage == null || localStorage.setItem(
|
|
93173
|
+
if (localStorage == null || localStorage.setItem(vb, t), !this.$providerMap[t])
|
|
93164
93174
|
throw new Error("Unsupported wallet provider");
|
|
93165
93175
|
const r = this.$providerMap[t];
|
|
93166
93176
|
await (r == null ? void 0 : r.connect(t)), this.$store.setKey("connected", !0);
|
|
@@ -93183,7 +93193,7 @@ class T1e {
|
|
|
93183
93193
|
}
|
|
93184
93194
|
}
|
|
93185
93195
|
disconnect() {
|
|
93186
|
-
this.$store.setKey("connected", !1), this.$store.setKey("provider", void 0), this.$store.setKey("address", ""), this.$store.setKey("paymentAddress", ""), this.$store.setKey("publicKey", ""), this.$store.setKey("paymentPublicKey", ""), this.$store.setKey("balance", void 0), this.$store.setKey("accounts", []), localStorage == null || localStorage.removeItem(
|
|
93196
|
+
this.$store.setKey("connected", !1), this.$store.setKey("provider", void 0), this.$store.setKey("address", ""), this.$store.setKey("paymentAddress", ""), this.$store.setKey("publicKey", ""), this.$store.setKey("paymentPublicKey", ""), this.$store.setKey("balance", void 0), this.$store.setKey("accounts", []), localStorage == null || localStorage.removeItem(vb);
|
|
93187
93197
|
}
|
|
93188
93198
|
switchNetwork(t) {
|
|
93189
93199
|
var r;
|
|
@@ -93309,7 +93319,7 @@ class T1e {
|
|
|
93309
93319
|
}
|
|
93310
93320
|
}
|
|
93311
93321
|
}
|
|
93312
|
-
const
|
|
93322
|
+
const Ibe = {
|
|
93313
93323
|
hasUnisat: !1,
|
|
93314
93324
|
hasXverse: !1,
|
|
93315
93325
|
hasOyl: !1,
|
|
@@ -93354,7 +93364,7 @@ const I1e = {
|
|
|
93354
93364
|
inscribe: async (e, t) => "",
|
|
93355
93365
|
isCreatingCommit: !1,
|
|
93356
93366
|
isInscribing: !1
|
|
93357
|
-
}, dB = gB(
|
|
93367
|
+
}, dB = gB(Ibe), Pwe = () => mB(dB);
|
|
93358
93368
|
var mv = { exports: {} }, Qf = {};
|
|
93359
93369
|
/**
|
|
93360
93370
|
* @license React
|
|
@@ -93366,7 +93376,7 @@ var mv = { exports: {} }, Qf = {};
|
|
|
93366
93376
|
* LICENSE file in the root directory of this source tree.
|
|
93367
93377
|
*/
|
|
93368
93378
|
var R6;
|
|
93369
|
-
function
|
|
93379
|
+
function Pbe() {
|
|
93370
93380
|
if (R6) return Qf;
|
|
93371
93381
|
R6 = 1;
|
|
93372
93382
|
var e = K6, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
@@ -93390,7 +93400,7 @@ var Lp = {};
|
|
|
93390
93400
|
* LICENSE file in the root directory of this source tree.
|
|
93391
93401
|
*/
|
|
93392
93402
|
var L6;
|
|
93393
|
-
function
|
|
93403
|
+
function Obe() {
|
|
93394
93404
|
return L6 || (L6 = 1, process.env.NODE_ENV !== "production" && function() {
|
|
93395
93405
|
var e = K6, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), y = Symbol.iterator, m = "@@iterator";
|
|
93396
93406
|
function w(z) {
|
|
@@ -93983,9 +93993,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
93983
93993
|
Lp.Fragment = n, Lp.jsx = pe, Lp.jsxs = ye;
|
|
93984
93994
|
}()), Lp;
|
|
93985
93995
|
}
|
|
93986
|
-
process.env.NODE_ENV === "production" ? mv.exports =
|
|
93996
|
+
process.env.NODE_ENV === "production" ? mv.exports = Pbe() : mv.exports = Obe();
|
|
93987
93997
|
var G = mv.exports;
|
|
93988
|
-
function
|
|
93998
|
+
function Bbe(e, t, r) {
|
|
93989
93999
|
let n = /* @__PURE__ */ new Set([...t, void 0]);
|
|
93990
94000
|
return e.listen((o, i, a) => {
|
|
93991
94001
|
n.has(a) && r(o, i, a);
|
|
@@ -93993,7 +94003,7 @@ function B1e(e, t, r) {
|
|
|
93993
94003
|
}
|
|
93994
94004
|
function H6(e, t = {}) {
|
|
93995
94005
|
let r = bB(
|
|
93996
|
-
(o) => t.keys ?
|
|
94006
|
+
(o) => t.keys ? Bbe(e, t.keys, o) : e.listen(o),
|
|
93997
94007
|
[t.keys, e]
|
|
93998
94008
|
), n = e.get.bind(e);
|
|
93999
94009
|
return wB(r, n, n);
|
|
@@ -94002,7 +94012,7 @@ function Owe({
|
|
|
94002
94012
|
config: e,
|
|
94003
94013
|
children: t
|
|
94004
94014
|
}) {
|
|
94005
|
-
const r = yB(() => new
|
|
94015
|
+
const r = yB(() => new Tbe(
|
|
94006
94016
|
Bme(),
|
|
94007
94017
|
Ume(e ?? { network: Rt })
|
|
94008
94018
|
), [e]), {
|
|
@@ -94067,7 +94077,7 @@ function Owe({
|
|
|
94067
94077
|
}
|
|
94068
94078
|
);
|
|
94069
94079
|
}
|
|
94070
|
-
const
|
|
94080
|
+
const Ube = ({
|
|
94071
94081
|
size: e = 42,
|
|
94072
94082
|
variant: t = "first",
|
|
94073
94083
|
className: r,
|
|
@@ -94181,7 +94191,7 @@ const U1e = ({
|
|
|
94181
94191
|
)
|
|
94182
94192
|
]
|
|
94183
94193
|
}
|
|
94184
|
-
),
|
|
94194
|
+
), Cbe = ({
|
|
94185
94195
|
size: e = 42,
|
|
94186
94196
|
variant: t = "first",
|
|
94187
94197
|
className: r,
|
|
@@ -94250,7 +94260,7 @@ const U1e = ({
|
|
|
94250
94260
|
/* @__PURE__ */ G.jsx("defs", { children: /* @__PURE__ */ G.jsx("clipPath", { id: "a", children: /* @__PURE__ */ G.jsx("path", { fill: "#fff", d: "M0 0h42v42H0z" }) }) })
|
|
94251
94261
|
]
|
|
94252
94262
|
}
|
|
94253
|
-
),
|
|
94263
|
+
), Nbe = ({
|
|
94254
94264
|
size: e = 42,
|
|
94255
94265
|
variant: t = "first",
|
|
94256
94266
|
className: r,
|
|
@@ -94292,7 +94302,7 @@ const U1e = ({
|
|
|
94292
94302
|
/* @__PURE__ */ G.jsx("defs", { children: /* @__PURE__ */ G.jsx("clipPath", { id: "clip0_3_53", children: /* @__PURE__ */ G.jsx("rect", { width: "42", height: "42", fill: "white" }) }) })
|
|
94293
94303
|
]
|
|
94294
94304
|
}
|
|
94295
|
-
),
|
|
94305
|
+
), jbe = ({
|
|
94296
94306
|
size: e = 42,
|
|
94297
94307
|
variant: t = "first",
|
|
94298
94308
|
className: r,
|
|
@@ -94394,7 +94404,7 @@ const U1e = ({
|
|
|
94394
94404
|
] })
|
|
94395
94405
|
]
|
|
94396
94406
|
}
|
|
94397
|
-
),
|
|
94407
|
+
), zbe = ({
|
|
94398
94408
|
size: e = 42,
|
|
94399
94409
|
variant: t = "first",
|
|
94400
94410
|
className: r,
|
|
@@ -94455,7 +94465,7 @@ const U1e = ({
|
|
|
94455
94465
|
] })
|
|
94456
94466
|
]
|
|
94457
94467
|
}
|
|
94458
|
-
),
|
|
94468
|
+
), Rbe = ({
|
|
94459
94469
|
size: e = 42,
|
|
94460
94470
|
variant: t = "first",
|
|
94461
94471
|
className: r,
|
|
@@ -94487,7 +94497,7 @@ const U1e = ({
|
|
|
94487
94497
|
] })
|
|
94488
94498
|
]
|
|
94489
94499
|
}
|
|
94490
|
-
),
|
|
94500
|
+
), Lbe = ({
|
|
94491
94501
|
size: e = 42,
|
|
94492
94502
|
variant: t = "first",
|
|
94493
94503
|
className: r,
|
|
@@ -94550,7 +94560,7 @@ const U1e = ({
|
|
|
94550
94560
|
] })
|
|
94551
94561
|
]
|
|
94552
94562
|
}
|
|
94553
|
-
),
|
|
94563
|
+
), Hbe = ({
|
|
94554
94564
|
size: e = 42,
|
|
94555
94565
|
variant: t = "first",
|
|
94556
94566
|
className: r,
|
|
@@ -94764,7 +94774,7 @@ const U1e = ({
|
|
|
94764
94774
|
] }) })
|
|
94765
94775
|
]
|
|
94766
94776
|
}
|
|
94767
|
-
),
|
|
94777
|
+
), Dbe = ({
|
|
94768
94778
|
size: e = 42,
|
|
94769
94779
|
variant: t = "first",
|
|
94770
94780
|
className: r,
|
|
@@ -94807,7 +94817,7 @@ const U1e = ({
|
|
|
94807
94817
|
className: t,
|
|
94808
94818
|
variant: r,
|
|
94809
94819
|
walletName: n
|
|
94810
|
-
}) => n === Ba ? /* @__PURE__ */ G.jsx(
|
|
94820
|
+
}) => n === Ba ? /* @__PURE__ */ G.jsx(Nbe, { size: e, className: t, variant: r }) : n === ru ? /* @__PURE__ */ G.jsx(zbe, { size: e, className: t, variant: r }) : n === eu ? /* @__PURE__ */ G.jsx(D6, { size: e, className: t, variant: r }) : n === Ua ? /* @__PURE__ */ G.jsx(Lbe, { size: e, className: t, variant: r }) : n === tu ? /* @__PURE__ */ G.jsx(Rbe, { size: e, className: t, variant: r }) : n === Qc ? /* @__PURE__ */ G.jsx(Cbe, { size: e, className: t, variant: r }) : n === fc ? /* @__PURE__ */ G.jsx(jbe, { size: e, className: t, variant: r }) : n === Jc ? /* @__PURE__ */ G.jsx(Ube, { size: e, className: t, variant: r }) : n === dc ? /* @__PURE__ */ G.jsx(Hbe, { size: e, className: t, variant: r }) : n === sS ? /* @__PURE__ */ G.jsx(Dbe, { size: e, className: t, variant: r }) : /* @__PURE__ */ G.jsx(D6, { size: e, className: t, variant: r });
|
|
94811
94821
|
export {
|
|
94812
94822
|
bf as FRACTAL_MAINNET,
|
|
94813
94823
|
Vn as FRACTAL_TESTNET,
|
|
@@ -94817,8 +94827,10 @@ export {
|
|
|
94817
94827
|
Cy as LOCAL_STORAGE_DEFAULT_WALLET,
|
|
94818
94828
|
Twe as LaserEyesClient,
|
|
94819
94829
|
Owe as LaserEyesProvider,
|
|
94830
|
+
D6 as LeatherLogo,
|
|
94820
94831
|
ac as MAGIC_EDEN,
|
|
94821
94832
|
Bt as MAINNET,
|
|
94833
|
+
Lbe as MagicEdenLogo,
|
|
94822
94834
|
hl as OKX,
|
|
94823
94835
|
QG as OKX_MAINNET,
|
|
94824
94836
|
eZ as OKX_TESTNET,
|
|
@@ -94829,14 +94841,17 @@ export {
|
|
|
94829
94841
|
r8 as ORANGE_MAINNET,
|
|
94830
94842
|
tZ as ORANGE_TESTNET,
|
|
94831
94843
|
Vc as OYL,
|
|
94844
|
+
Rbe as OkxLogo,
|
|
94845
|
+
Ube as OylLogo,
|
|
94832
94846
|
TB as P2PKH,
|
|
94833
|
-
|
|
94847
|
+
qbe as P2PSH,
|
|
94834
94848
|
M6 as P2SH,
|
|
94835
94849
|
IB as P2SH_P2WPKH,
|
|
94836
94850
|
nd as P2TR,
|
|
94837
|
-
|
|
94851
|
+
c1 as P2WPKH,
|
|
94838
94852
|
PB as P2WSH,
|
|
94839
94853
|
dl as PHANTOM,
|
|
94854
|
+
Cbe as PhantomLogo,
|
|
94840
94855
|
swe as REGTEST,
|
|
94841
94856
|
Xn as SIGNET,
|
|
94842
94857
|
ur as TESTNET,
|
|
@@ -94844,25 +94859,28 @@ export {
|
|
|
94844
94859
|
uc as UNISAT,
|
|
94845
94860
|
n_ as UNISAT_FRACTAL_MAINNET,
|
|
94846
94861
|
o_ as UNISAT_FRACTAL_TESTNET,
|
|
94847
|
-
|
|
94862
|
+
Y1 as UNISAT_MAINNET,
|
|
94848
94863
|
r_ as UNISAT_SIGNET,
|
|
94849
94864
|
e_ as UNISAT_TESTNET,
|
|
94850
94865
|
t_ as UNISAT_TESTNET4,
|
|
94851
94866
|
dw as UNSUPPORTED_PROVIDER_METHOD_ERROR,
|
|
94852
|
-
|
|
94867
|
+
jbe as UnisatLogo,
|
|
94868
|
+
Mbe as WALLETS,
|
|
94853
94869
|
XX as WALLET_NOT_INSTALLED_ERROR,
|
|
94854
94870
|
pl as WIZZ,
|
|
94855
94871
|
R0 as WIZZ_MAINNET,
|
|
94856
94872
|
s_ as WIZZ_SIGNET,
|
|
94857
|
-
|
|
94873
|
+
Q1 as WIZZ_TESTNET,
|
|
94858
94874
|
a_ as WIZZ_TESTNET4,
|
|
94859
94875
|
Bwe as WalletIcon,
|
|
94860
94876
|
ns as WalletProvider,
|
|
94877
|
+
zbe as WizzLogo,
|
|
94861
94878
|
Pa as XVERSE,
|
|
94862
|
-
|
|
94879
|
+
J1 as XVERSE_MAINNET,
|
|
94863
94880
|
owe as XVERSE_NETWORK,
|
|
94864
94881
|
JG as XVERSE_SIGNET,
|
|
94865
94882
|
i_ as XVERSE_TESTNET,
|
|
94883
|
+
Nbe as XverseLogo,
|
|
94866
94884
|
kwe as createConfig,
|
|
94867
94885
|
Ewe as createStores,
|
|
94868
94886
|
cwe as getLeatherNetwork,
|