@omnisat/lasereyes 0.0.104 → 0.0.106
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.js +233 -231
- package/dist/index.umd.cjs +8 -8
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -21432,8 +21432,8 @@ const bn = (e) => e === ur || e === Fn || e === Xn ? OB : Xo, K2 = (e) => e.find
|
|
|
21432
21432
|
} catch (r) {
|
|
21433
21433
|
throw console.error("Error fetching BTC balance:", r), new Error("Failed to fetch BTC balance");
|
|
21434
21434
|
}
|
|
21435
|
-
}
|
|
21436
|
-
function
|
|
21435
|
+
};
|
|
21436
|
+
function LW(e, t, r) {
|
|
21437
21437
|
const n = e * 57 + t * 41, o = r * 34;
|
|
21438
21438
|
return 10 + n + o;
|
|
21439
21439
|
}
|
|
@@ -21457,7 +21457,7 @@ async function N_(e, t, r, n, o, i, a = 7) {
|
|
|
21457
21457
|
throw new Error("No UTXOs found");
|
|
21458
21458
|
const l = c.sort(
|
|
21459
21459
|
(m, w) => w.value - m.value
|
|
21460
|
-
), u = new Wr({ network: bn(i) }), f =
|
|
21460
|
+
), u = new Wr({ network: bn(i) }), f = LW(1, 0, 2), h = Math.floor(f * a) + n;
|
|
21461
21461
|
let g = 0, y = 0;
|
|
21462
21462
|
for await (let m of l) {
|
|
21463
21463
|
const { txid: w, vout: v, value: x } = m, E = Ov(
|
|
@@ -21502,13 +21502,13 @@ function j_(e, t) {
|
|
|
21502
21502
|
});
|
|
21503
21503
|
return (r = o == null ? void 0 : o.redeem) == null ? void 0 : r.output;
|
|
21504
21504
|
}
|
|
21505
|
-
function
|
|
21505
|
+
function HW(e) {
|
|
21506
21506
|
return e == null ? void 0 : e.reduce((t, r) => t + r.value, 0);
|
|
21507
21507
|
}
|
|
21508
21508
|
async function F2(e, t) {
|
|
21509
21509
|
return await tr.post(`${$h(t)}/api/tx`, e).then((r) => r.data);
|
|
21510
21510
|
}
|
|
21511
|
-
const
|
|
21511
|
+
const DW = (e, t) => {
|
|
21512
21512
|
try {
|
|
21513
21513
|
const r = bn(t), n = Pk(e);
|
|
21514
21514
|
if (n.version === r.pubKeyHash) return TB;
|
|
@@ -21588,7 +21588,7 @@ const r9 = (e, t, r, n, o) => (e >>> 0) + (t >>> 0) + (r >>> 0) + (n >>> 0) + (o
|
|
|
21588
21588
|
rt.add5L = r9;
|
|
21589
21589
|
const n9 = (e, t, r, n, o, i) => t + r + n + o + i + (e / 2 ** 32 | 0) | 0;
|
|
21590
21590
|
rt.add5H = n9;
|
|
21591
|
-
const
|
|
21591
|
+
const KW = {
|
|
21592
21592
|
fromBig: V2,
|
|
21593
21593
|
split: z_,
|
|
21594
21594
|
toBig: R_,
|
|
@@ -21612,10 +21612,10 @@ const MW = {
|
|
|
21612
21612
|
add5H: n9,
|
|
21613
21613
|
add5L: r9
|
|
21614
21614
|
};
|
|
21615
|
-
rt.default =
|
|
21615
|
+
rt.default = KW;
|
|
21616
21616
|
Object.defineProperty(Qr, "__esModule", { value: !0 });
|
|
21617
21617
|
Qr.sha384 = Qr.sha512_256 = Qr.sha512_224 = Qr.sha512 = Qr.SHA384 = Qr.SHA512_256 = Qr.SHA512_224 = Qr.SHA512 = void 0;
|
|
21618
|
-
const
|
|
21618
|
+
const qW = Da, vt = rt, fm = Pc, [MW, FW] = vt.default.split([
|
|
21619
21619
|
"0x428a2f98d728ae22",
|
|
21620
21620
|
"0x7137449123ef65cd",
|
|
21621
21621
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -21697,7 +21697,7 @@ const FW = Da, vt = rt, fm = Pc, [VW, GW] = vt.default.split([
|
|
|
21697
21697
|
"0x5fcb6fab3ad6faec",
|
|
21698
21698
|
"0x6c44198c4a475817"
|
|
21699
21699
|
].map((e) => BigInt(e))), Os = /* @__PURE__ */ new Uint32Array(80), Bs = /* @__PURE__ */ new Uint32Array(80);
|
|
21700
|
-
let Th = class extends
|
|
21700
|
+
let Th = class extends qW.HashMD {
|
|
21701
21701
|
constructor() {
|
|
21702
21702
|
super(128, 64, 16, !1), this.Ah = 1779033703, this.Al = -205731576, this.Bh = -1150833019, this.Bl = -2067093701, this.Ch = 1013904242, this.Cl = -23791573, this.Dh = -1521486534, this.Dl = 1595750129, this.Eh = 1359893119, this.El = -1377402159, this.Fh = -1694144372, this.Fl = 725511199, this.Gh = 528734635, this.Gl = -79577749, this.Hh = 1541459225, this.Hl = 327033209;
|
|
21703
21703
|
}
|
|
@@ -21719,7 +21719,7 @@ let Th = class extends FW.HashMD {
|
|
|
21719
21719
|
}
|
|
21720
21720
|
let { Ah: n, Al: o, Bh: i, Bl: a, Ch: s, Cl: c, Dh: l, Dl: u, Eh: f, El: h, Fh: g, Fl: y, Gh: m, Gl: w, Hh: v, Hl: x } = this;
|
|
21721
21721
|
for (let E = 0; E < 80; E++) {
|
|
21722
|
-
const S = vt.default.rotrSH(f, h, 14) ^ vt.default.rotrSH(f, h, 18) ^ vt.default.rotrBH(f, h, 41), O = vt.default.rotrSL(f, h, 14) ^ vt.default.rotrSL(f, h, 18) ^ vt.default.rotrBL(f, h, 41), T = f & g ^ ~f & m, j = h & y ^ ~h & w, R = vt.default.add5L(x, O, j,
|
|
21722
|
+
const S = vt.default.rotrSH(f, h, 14) ^ vt.default.rotrSH(f, h, 18) ^ vt.default.rotrBH(f, h, 41), O = vt.default.rotrSL(f, h, 14) ^ vt.default.rotrSL(f, h, 18) ^ vt.default.rotrBL(f, h, 41), T = f & g ^ ~f & m, j = h & y ^ ~h & w, R = vt.default.add5L(x, O, j, FW[E], Bs[E]), V = vt.default.add5H(R, v, S, T, MW[E], Os[E]), ee = R | 0, Z = vt.default.rotrSH(n, o, 28) ^ vt.default.rotrBH(n, o, 34) ^ vt.default.rotrBH(n, o, 39), U = vt.default.rotrSL(n, o, 28) ^ vt.default.rotrBL(n, o, 34) ^ vt.default.rotrBL(n, o, 39), M = n & i ^ n & s ^ i & s, H = o & a ^ o & c ^ a & c;
|
|
21723
21723
|
v = m | 0, x = w | 0, m = g | 0, w = y | 0, g = f | 0, y = h | 0, { h: f, l: h } = vt.default.add(l | 0, u | 0, V | 0, ee | 0), l = s | 0, u = c | 0, s = i | 0, c = a | 0, i = n | 0, a = o | 0;
|
|
21724
21724
|
const P = vt.default.add3L(ee, U, H);
|
|
21725
21725
|
n = vt.default.add3H(P, V, Z, M), o = P | 0;
|
|
@@ -21758,21 +21758,21 @@ Qr.sha512_256 = (0, fm.wrapConstructor)(() => new i9());
|
|
|
21758
21758
|
Qr.sha384 = (0, fm.wrapConstructor)(() => new a9());
|
|
21759
21759
|
var dm = {};
|
|
21760
21760
|
Object.defineProperty(dm, "__esModule", { value: !0 });
|
|
21761
|
-
dm.pbkdf2 =
|
|
21762
|
-
dm.pbkdf2Async =
|
|
21763
|
-
const pp = ko,
|
|
21761
|
+
dm.pbkdf2 = GW;
|
|
21762
|
+
dm.pbkdf2Async = ZW;
|
|
21763
|
+
const pp = ko, VW = nm, _l = Pc;
|
|
21764
21764
|
function s9(e, t, r, n) {
|
|
21765
21765
|
(0, pp.hash)(e);
|
|
21766
21766
|
const o = (0, _l.checkOpts)({ dkLen: 32, asyncTick: 10 }, n), { c: i, dkLen: a, asyncTick: s } = o;
|
|
21767
21767
|
if ((0, pp.number)(i), (0, pp.number)(a), (0, pp.number)(s), i < 1)
|
|
21768
21768
|
throw new Error("PBKDF2: iterations (c) should be >= 1");
|
|
21769
|
-
const c = (0, _l.toBytes)(t), l = (0, _l.toBytes)(r), u = new Uint8Array(a), f =
|
|
21769
|
+
const c = (0, _l.toBytes)(t), l = (0, _l.toBytes)(r), u = new Uint8Array(a), f = VW.hmac.create(e, c), h = f._cloneInto().update(l);
|
|
21770
21770
|
return { c: i, dkLen: a, asyncTick: s, DK: u, PRF: f, PRFSalt: h };
|
|
21771
21771
|
}
|
|
21772
21772
|
function c9(e, t, r, n, o) {
|
|
21773
21773
|
return e.destroy(), t.destroy(), n && n.destroy(), o.fill(0), r;
|
|
21774
21774
|
}
|
|
21775
|
-
function
|
|
21775
|
+
function GW(e, t, r, n) {
|
|
21776
21776
|
const { c: o, dkLen: i, DK: a, PRF: s, PRFSalt: c } = s9(e, t, r, n);
|
|
21777
21777
|
let l;
|
|
21778
21778
|
const u = new Uint8Array(4), f = (0, _l.createView)(u), h = new Uint8Array(s.outputLen);
|
|
@@ -21787,7 +21787,7 @@ function WW(e, t, r, n) {
|
|
|
21787
21787
|
}
|
|
21788
21788
|
return c9(s, c, a, l, h);
|
|
21789
21789
|
}
|
|
21790
|
-
async function
|
|
21790
|
+
async function ZW(e, t, r, n) {
|
|
21791
21791
|
const { c: o, dkLen: i, asyncTick: a, DK: s, PRF: c, PRFSalt: l } = s9(e, t, r, n);
|
|
21792
21792
|
let u;
|
|
21793
21793
|
const f = new Uint8Array(4), h = (0, _l.createView)(f), g = new Uint8Array(c.outputLen);
|
|
@@ -21802,7 +21802,7 @@ async function XW(e, t, r, n) {
|
|
|
21802
21802
|
return c9(c, l, s, u, g);
|
|
21803
21803
|
}
|
|
21804
21804
|
var Hn = {};
|
|
21805
|
-
const
|
|
21805
|
+
const WW = [
|
|
21806
21806
|
"abdikace",
|
|
21807
21807
|
"abeceda",
|
|
21808
21808
|
"adresa",
|
|
@@ -23851,7 +23851,7 @@ const YW = [
|
|
|
23851
23851
|
"zvrat",
|
|
23852
23852
|
"zvukovod",
|
|
23853
23853
|
"zvyk"
|
|
23854
|
-
],
|
|
23854
|
+
], XW = [
|
|
23855
23855
|
"的",
|
|
23856
23856
|
"一",
|
|
23857
23857
|
"是",
|
|
@@ -25900,7 +25900,7 @@ const YW = [
|
|
|
25900
25900
|
"怨",
|
|
25901
25901
|
"矮",
|
|
25902
25902
|
"歇"
|
|
25903
|
-
],
|
|
25903
|
+
], YW = [
|
|
25904
25904
|
"的",
|
|
25905
25905
|
"一",
|
|
25906
25906
|
"是",
|
|
@@ -27949,7 +27949,7 @@ const YW = [
|
|
|
27949
27949
|
"怨",
|
|
27950
27950
|
"矮",
|
|
27951
27951
|
"歇"
|
|
27952
|
-
],
|
|
27952
|
+
], JW = [
|
|
27953
27953
|
"가격",
|
|
27954
27954
|
"가끔",
|
|
27955
27955
|
"가난",
|
|
@@ -29998,7 +29998,7 @@ const YW = [
|
|
|
29998
29998
|
"희생",
|
|
29999
29999
|
"흰색",
|
|
30000
30000
|
"힘껏"
|
|
30001
|
-
],
|
|
30001
|
+
], QW = [
|
|
30002
30002
|
"abaisser",
|
|
30003
30003
|
"abandon",
|
|
30004
30004
|
"abdiquer",
|
|
@@ -32047,7 +32047,7 @@ const YW = [
|
|
|
32047
32047
|
"zénith",
|
|
32048
32048
|
"zeste",
|
|
32049
32049
|
"zoologie"
|
|
32050
|
-
],
|
|
32050
|
+
], eX = [
|
|
32051
32051
|
"abaco",
|
|
32052
32052
|
"abbaglio",
|
|
32053
32053
|
"abbinato",
|
|
@@ -34096,7 +34096,7 @@ const YW = [
|
|
|
34096
34096
|
"zufolo",
|
|
34097
34097
|
"zulu",
|
|
34098
34098
|
"zuppa"
|
|
34099
|
-
],
|
|
34099
|
+
], tX = [
|
|
34100
34100
|
"ábaco",
|
|
34101
34101
|
"abdomen",
|
|
34102
34102
|
"abeja",
|
|
@@ -36145,7 +36145,7 @@ const YW = [
|
|
|
36145
36145
|
"zorro",
|
|
36146
36146
|
"zumo",
|
|
36147
36147
|
"zurdo"
|
|
36148
|
-
],
|
|
36148
|
+
], rX = [
|
|
36149
36149
|
"あいこくしん",
|
|
36150
36150
|
"あいさつ",
|
|
36151
36151
|
"あいだ",
|
|
@@ -38194,7 +38194,7 @@ const YW = [
|
|
|
38194
38194
|
"わすれもの",
|
|
38195
38195
|
"わらう",
|
|
38196
38196
|
"われる"
|
|
38197
|
-
],
|
|
38197
|
+
], nX = [
|
|
38198
38198
|
"abacate",
|
|
38199
38199
|
"abaixo",
|
|
38200
38200
|
"abalar",
|
|
@@ -40243,7 +40243,7 @@ const YW = [
|
|
|
40243
40243
|
"zombar",
|
|
40244
40244
|
"zoologia",
|
|
40245
40245
|
"zumbido"
|
|
40246
|
-
],
|
|
40246
|
+
], oX = [
|
|
40247
40247
|
"abandon",
|
|
40248
40248
|
"ability",
|
|
40249
40249
|
"able",
|
|
@@ -42299,49 +42299,49 @@ Hn.wordlists = vo;
|
|
|
42299
42299
|
let dr;
|
|
42300
42300
|
var ca = Hn._default = dr;
|
|
42301
42301
|
try {
|
|
42302
|
-
ca = Hn._default = dr =
|
|
42302
|
+
ca = Hn._default = dr = WW, vo.czech = dr;
|
|
42303
42303
|
} catch {
|
|
42304
42304
|
}
|
|
42305
42305
|
try {
|
|
42306
|
-
ca = Hn._default = dr =
|
|
42306
|
+
ca = Hn._default = dr = XW, vo.chinese_simplified = dr;
|
|
42307
42307
|
} catch {
|
|
42308
42308
|
}
|
|
42309
42309
|
try {
|
|
42310
|
-
ca = Hn._default = dr =
|
|
42310
|
+
ca = Hn._default = dr = YW, vo.chinese_traditional = dr;
|
|
42311
42311
|
} catch {
|
|
42312
42312
|
}
|
|
42313
42313
|
try {
|
|
42314
|
-
ca = Hn._default = dr =
|
|
42314
|
+
ca = Hn._default = dr = JW, vo.korean = dr;
|
|
42315
42315
|
} catch {
|
|
42316
42316
|
}
|
|
42317
42317
|
try {
|
|
42318
|
-
ca = Hn._default = dr =
|
|
42318
|
+
ca = Hn._default = dr = QW, vo.french = dr;
|
|
42319
42319
|
} catch {
|
|
42320
42320
|
}
|
|
42321
42321
|
try {
|
|
42322
|
-
ca = Hn._default = dr =
|
|
42322
|
+
ca = Hn._default = dr = eX, vo.italian = dr;
|
|
42323
42323
|
} catch {
|
|
42324
42324
|
}
|
|
42325
42325
|
try {
|
|
42326
|
-
ca = Hn._default = dr =
|
|
42326
|
+
ca = Hn._default = dr = tX, vo.spanish = dr;
|
|
42327
42327
|
} catch {
|
|
42328
42328
|
}
|
|
42329
42329
|
try {
|
|
42330
|
-
ca = Hn._default = dr =
|
|
42330
|
+
ca = Hn._default = dr = rX, vo.japanese = dr, vo.JA = dr;
|
|
42331
42331
|
} catch {
|
|
42332
42332
|
}
|
|
42333
42333
|
try {
|
|
42334
|
-
ca = Hn._default = dr =
|
|
42334
|
+
ca = Hn._default = dr = nX, vo.portuguese = dr;
|
|
42335
42335
|
} catch {
|
|
42336
42336
|
}
|
|
42337
42337
|
try {
|
|
42338
|
-
ca = Hn._default = dr =
|
|
42338
|
+
ca = Hn._default = dr = oX, vo.english = dr, vo.EN = dr;
|
|
42339
42339
|
} catch {
|
|
42340
42340
|
}
|
|
42341
42341
|
Object.defineProperty(sa, "__esModule", { value: !0 });
|
|
42342
|
-
const
|
|
42342
|
+
const iX = hi, u9 = Qr, l9 = dm, aX = Pc, D0 = Hn;
|
|
42343
42343
|
let jd = D0._default;
|
|
42344
|
-
const w8 = "Invalid mnemonic", fu = "Invalid entropy",
|
|
42344
|
+
const w8 = "Invalid mnemonic", fu = "Invalid entropy", sX = "Invalid mnemonic checksum", f9 = `A wordlist is required but a default could not be found.
|
|
42345
42345
|
Please pass a 2048 word array explicitly.`;
|
|
42346
42346
|
function zd(e) {
|
|
42347
42347
|
return (e || "").normalize("NFKD");
|
|
@@ -42358,28 +42358,28 @@ function p9(e) {
|
|
|
42358
42358
|
return e.map((t) => d9(t.toString(2), "0", 8)).join("");
|
|
42359
42359
|
}
|
|
42360
42360
|
function g9(e) {
|
|
42361
|
-
const t = e.length * 8 / 32, r =
|
|
42361
|
+
const t = e.length * 8 / 32, r = iX.sha256(Uint8Array.from(e));
|
|
42362
42362
|
return p9(Array.from(r)).slice(0, t);
|
|
42363
42363
|
}
|
|
42364
42364
|
function m9(e) {
|
|
42365
42365
|
return "mnemonic" + (e || "");
|
|
42366
42366
|
}
|
|
42367
|
-
function
|
|
42367
|
+
function cX(e, t) {
|
|
42368
42368
|
const r = Uint8Array.from(Buffer.from(zd(e), "utf8")), n = Uint8Array.from(Buffer.from(m9(zd(t)), "utf8")), o = l9.pbkdf2(u9.sha512, r, n, {
|
|
42369
42369
|
c: 2048,
|
|
42370
42370
|
dkLen: 64
|
|
42371
42371
|
});
|
|
42372
42372
|
return Buffer.from(o);
|
|
42373
42373
|
}
|
|
42374
|
-
sa.mnemonicToSeedSync =
|
|
42375
|
-
function
|
|
42374
|
+
sa.mnemonicToSeedSync = cX;
|
|
42375
|
+
function uX(e, t) {
|
|
42376
42376
|
const r = Uint8Array.from(Buffer.from(zd(e), "utf8")), n = Uint8Array.from(Buffer.from(m9(zd(t)), "utf8"));
|
|
42377
42377
|
return l9.pbkdf2Async(u9.sha512, r, n, {
|
|
42378
42378
|
c: 2048,
|
|
42379
42379
|
dkLen: 64
|
|
42380
42380
|
}).then((o) => Buffer.from(o));
|
|
42381
42381
|
}
|
|
42382
|
-
var
|
|
42382
|
+
var lX = sa.mnemonicToSeed = uX;
|
|
42383
42383
|
function y9(e, t) {
|
|
42384
42384
|
if (t = t || jd, !t)
|
|
42385
42385
|
throw new Error(f9);
|
|
@@ -42400,7 +42400,7 @@ function y9(e, t) {
|
|
|
42400
42400
|
throw new Error(fu);
|
|
42401
42401
|
const c = Buffer.from(s);
|
|
42402
42402
|
if (g9(c) !== a)
|
|
42403
|
-
throw new Error(
|
|
42403
|
+
throw new Error(sX);
|
|
42404
42404
|
return c.toString("hex");
|
|
42405
42405
|
}
|
|
42406
42406
|
sa.mnemonicToEntropy = y9;
|
|
@@ -42419,14 +42419,14 @@ function b9(e, t) {
|
|
|
42419
42419
|
});
|
|
42420
42420
|
return t[0] === "あいこくしん" ? o.join(" ") : o.join(" ");
|
|
42421
42421
|
}
|
|
42422
|
-
var
|
|
42423
|
-
function
|
|
42422
|
+
var fX = sa.entropyToMnemonic = b9;
|
|
42423
|
+
function dX(e, t, r) {
|
|
42424
42424
|
if (e = e || 128, e % 32 !== 0)
|
|
42425
42425
|
throw new TypeError(fu);
|
|
42426
|
-
return t = t || ((n) => Buffer.from(
|
|
42426
|
+
return t = t || ((n) => Buffer.from(aX.randomBytes(n))), b9(t(e / 8), r);
|
|
42427
42427
|
}
|
|
42428
|
-
sa.generateMnemonic =
|
|
42429
|
-
function
|
|
42428
|
+
sa.generateMnemonic = dX;
|
|
42429
|
+
function hX(e, t) {
|
|
42430
42430
|
try {
|
|
42431
42431
|
y9(e, t);
|
|
42432
42432
|
} catch {
|
|
@@ -42434,31 +42434,31 @@ function gX(e, t) {
|
|
|
42434
42434
|
}
|
|
42435
42435
|
return !0;
|
|
42436
42436
|
}
|
|
42437
|
-
sa.validateMnemonic =
|
|
42438
|
-
function
|
|
42437
|
+
sa.validateMnemonic = hX;
|
|
42438
|
+
function pX(e) {
|
|
42439
42439
|
const t = D0.wordlists[e];
|
|
42440
42440
|
if (t)
|
|
42441
42441
|
jd = t;
|
|
42442
42442
|
else
|
|
42443
42443
|
throw new Error('Could not find wordlist for language "' + e + '"');
|
|
42444
42444
|
}
|
|
42445
|
-
sa.setDefaultWordlist =
|
|
42446
|
-
function
|
|
42445
|
+
sa.setDefaultWordlist = pX;
|
|
42446
|
+
function gX() {
|
|
42447
42447
|
if (!jd)
|
|
42448
42448
|
throw new Error("No Default Wordlist set");
|
|
42449
42449
|
return Object.keys(D0.wordlists).filter((e) => e === "JA" || e === "EN" ? !1 : D0.wordlists[e].every((t, r) => t === jd[r]))[0];
|
|
42450
42450
|
}
|
|
42451
|
-
sa.getDefaultWordlist =
|
|
42452
|
-
var
|
|
42453
|
-
sa.wordlists =
|
|
42454
|
-
function
|
|
42451
|
+
sa.getDefaultWordlist = gX;
|
|
42452
|
+
var mX = Hn;
|
|
42453
|
+
sa.wordlists = mX.wordlists;
|
|
42454
|
+
function yX(e) {
|
|
42455
42455
|
return gk(tn(e));
|
|
42456
42456
|
}
|
|
42457
42457
|
function v8(e, t) {
|
|
42458
42458
|
return zv(GR, e, t);
|
|
42459
42459
|
}
|
|
42460
42460
|
const pt = (e) => KU(e);
|
|
42461
|
-
function
|
|
42461
|
+
function bX(e) {
|
|
42462
42462
|
if (jr(e.isPoint(pt("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"))), jr(!e.isPoint(pt("030000000000000000000000000000000000000000000000000000000000000005"))), jr(e.isPrivate(pt("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"))), jr(e.isPrivate(pt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140"))), jr(!e.isPrivate(pt("0000000000000000000000000000000000000000000000000000000000000000"))), jr(!e.isPrivate(pt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"))), jr(!e.isPrivate(pt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364142"))), jr(ya(e.pointFromScalar(pt("b1121e4088a66a28f5b6b0f5844943ecd9f610196d7bb83b25214b60452c09af")), pt("02b07ba9dca9523b7ef4bd97703d43d20399eb698e194704791a25ce77a400df99")) === 0), e.xOnlyPointAddTweak) {
|
|
42463
42463
|
jr(e.xOnlyPointAddTweak(pt("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), pt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140")) === null);
|
|
42464
42464
|
let t = e.xOnlyPointAddTweak(pt("1617d38ed8d8657da4d4761e8057bc396ea9e4b9d29776d4be096016dbd2509b"), pt("a8397a935f0dfceba6ba9618f6451ef4d80637abf4e6af2669fbc9de6a8fd2ac"));
|
|
@@ -42480,7 +42480,7 @@ function w9(...e) {
|
|
|
42480
42480
|
return { encode: n, decode: o };
|
|
42481
42481
|
}
|
|
42482
42482
|
// @__NO_SIDE_EFFECTS__
|
|
42483
|
-
function
|
|
42483
|
+
function wX(e) {
|
|
42484
42484
|
return {
|
|
42485
42485
|
encode: (t) => {
|
|
42486
42486
|
if (!Array.isArray(t) || t.length && typeof t[0] != "number")
|
|
@@ -42506,7 +42506,7 @@ function EX(e) {
|
|
|
42506
42506
|
};
|
|
42507
42507
|
}
|
|
42508
42508
|
// @__NO_SIDE_EFFECTS__
|
|
42509
|
-
function
|
|
42509
|
+
function vX(e = "") {
|
|
42510
42510
|
if (typeof e != "string")
|
|
42511
42511
|
throw new Error("join separator should be string");
|
|
42512
42512
|
return {
|
|
@@ -42562,7 +42562,7 @@ function E8(e, t, r) {
|
|
|
42562
42562
|
return o.reverse();
|
|
42563
42563
|
}
|
|
42564
42564
|
// @__NO_SIDE_EFFECTS__
|
|
42565
|
-
function
|
|
42565
|
+
function EX(e) {
|
|
42566
42566
|
return {
|
|
42567
42567
|
encode: (t) => {
|
|
42568
42568
|
if (!uw(t))
|
|
@@ -42577,7 +42577,7 @@ function xX(e) {
|
|
|
42577
42577
|
};
|
|
42578
42578
|
}
|
|
42579
42579
|
// @__NO_SIDE_EFFECTS__
|
|
42580
|
-
function
|
|
42580
|
+
function kX(e, t) {
|
|
42581
42581
|
if (typeof t != "function")
|
|
42582
42582
|
throw new Error("checksum fn should be function");
|
|
42583
42583
|
return {
|
|
@@ -42598,8 +42598,8 @@ function AX(e, t) {
|
|
|
42598
42598
|
}
|
|
42599
42599
|
};
|
|
42600
42600
|
}
|
|
42601
|
-
const
|
|
42602
|
-
function
|
|
42601
|
+
const xX = (e) => /* @__PURE__ */ w9(/* @__PURE__ */ EX(58), /* @__PURE__ */ wX(e), /* @__PURE__ */ vX("")), AX = /* @__PURE__ */ xX("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), _X = (e) => /* @__PURE__ */ w9(/* @__PURE__ */ kX(4, (t) => e(e(t))), AX), SX = _X;
|
|
42602
|
+
function $X(e) {
|
|
42603
42603
|
return {
|
|
42604
42604
|
lang: (e == null ? void 0 : e.lang) ?? void 0,
|
|
42605
42605
|
message: e == null ? void 0 : e.message,
|
|
@@ -42607,7 +42607,7 @@ function IX(e) {
|
|
|
42607
42607
|
abortPipeEarly: (e == null ? void 0 : e.abortPipeEarly) ?? void 0
|
|
42608
42608
|
};
|
|
42609
42609
|
}
|
|
42610
|
-
function
|
|
42610
|
+
function TX(e, t) {
|
|
42611
42611
|
var r;
|
|
42612
42612
|
return (r = void 0) == null ? void 0 : r.get(t);
|
|
42613
42613
|
}
|
|
@@ -42632,10 +42632,10 @@ function rs(e, t, r, n, o) {
|
|
|
42632
42632
|
abortEarly: n.abortEarly,
|
|
42633
42633
|
abortPipeEarly: n.abortPipeEarly
|
|
42634
42634
|
}, l = e.kind === "schema", u = (o == null ? void 0 : o.message) ?? // @ts-expect-error
|
|
42635
|
-
e.message ??
|
|
42635
|
+
e.message ?? TX(e.reference, c.lang) ?? (l ? (c.lang, void 0) : null) ?? n.message ?? (c.lang, void 0);
|
|
42636
42636
|
u && (c.message = typeof u == "function" ? u(c) : u), l && (r.typed = !1), r.issues ? r.issues.push(c) : r.issues = [c];
|
|
42637
42637
|
}
|
|
42638
|
-
var
|
|
42638
|
+
var IX = class extends Error {
|
|
42639
42639
|
/**
|
|
42640
42640
|
* Creates a Valibot error with useful information.
|
|
42641
42641
|
*
|
|
@@ -42806,10 +42806,10 @@ function E9(e) {
|
|
|
42806
42806
|
function va(e, t, r) {
|
|
42807
42807
|
const n = e._run(
|
|
42808
42808
|
{ typed: !1, value: t },
|
|
42809
|
-
|
|
42809
|
+
$X(r)
|
|
42810
42810
|
);
|
|
42811
42811
|
if (n.issues)
|
|
42812
|
-
throw new
|
|
42812
|
+
throw new IX(n.issues);
|
|
42813
42813
|
return n.value;
|
|
42814
42814
|
}
|
|
42815
42815
|
function Ef(...e) {
|
|
@@ -42829,28 +42829,28 @@ function Ef(...e) {
|
|
|
42829
42829
|
}
|
|
42830
42830
|
};
|
|
42831
42831
|
}
|
|
42832
|
-
const fw = Ef(ym(), hm(), gm(0), pm(4294967295)),
|
|
42833
|
-
wif:
|
|
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)), y1 = Ef(mm(Uint8Array), G2(32)), BX = Ef(mm(Uint8Array), G2(33)), UX = lw({
|
|
42833
|
+
wif: OX,
|
|
42834
42834
|
bip32: lw({
|
|
42835
42835
|
public: fw,
|
|
42836
42836
|
private: fw
|
|
42837
42837
|
})
|
|
42838
|
-
}),
|
|
42839
|
-
function
|
|
42838
|
+
}), CX = Ef(E9(), v9(/^(m\/)?(\d+'?\/)*\d+'?$/));
|
|
42839
|
+
function NX(e, t, r) {
|
|
42840
42840
|
if (t.length !== 32)
|
|
42841
42841
|
throw new TypeError("Invalid privateKey length");
|
|
42842
42842
|
var n = new Uint8Array(34), o = new DataView(n.buffer);
|
|
42843
42843
|
return o.setUint8(0, e), n.set(t, 1), n[33] = 1, n;
|
|
42844
42844
|
}
|
|
42845
|
-
function
|
|
42846
|
-
return Ol.encode(
|
|
42845
|
+
function jX(e) {
|
|
42846
|
+
return Ol.encode(NX(e.version, e.privateKey));
|
|
42847
42847
|
}
|
|
42848
|
-
const k8 =
|
|
42848
|
+
const k8 = SX(tn), x8 = {
|
|
42849
42849
|
encode: (e) => k8.encode(e),
|
|
42850
42850
|
decode: (e) => k8.decode(e)
|
|
42851
42851
|
};
|
|
42852
|
-
function
|
|
42853
|
-
|
|
42852
|
+
function zX(e) {
|
|
42853
|
+
bX(e);
|
|
42854
42854
|
const t = {
|
|
42855
42855
|
messagePrefix: `Bitcoin Signed Message:
|
|
42856
42856
|
`,
|
|
@@ -42908,7 +42908,7 @@ function LX(e) {
|
|
|
42908
42908
|
}
|
|
42909
42909
|
class i extends o {
|
|
42910
42910
|
constructor(g, y, m, w, v = 0, x = 0, E = 0) {
|
|
42911
|
-
super(g, y), $e(this, "chainCode"), $e(this, "network"), $e(this, "__DEPTH"), $e(this, "__INDEX"), $e(this, "__PARENT_FINGERPRINT"), this.chainCode = m, this.network = w, this.__DEPTH = v, this.__INDEX = x, this.__PARENT_FINGERPRINT = E, va(
|
|
42911
|
+
super(g, y), $e(this, "chainCode"), $e(this, "network"), $e(this, "__DEPTH"), $e(this, "__INDEX"), $e(this, "__PARENT_FINGERPRINT"), this.chainCode = m, this.network = w, this.__DEPTH = v, this.__INDEX = x, this.__PARENT_FINGERPRINT = E, va(UX, w);
|
|
42912
42912
|
}
|
|
42913
42913
|
get depth() {
|
|
42914
42914
|
return this.__DEPTH;
|
|
@@ -42920,7 +42920,7 @@ function LX(e) {
|
|
|
42920
42920
|
return this.__PARENT_FINGERPRINT;
|
|
42921
42921
|
}
|
|
42922
42922
|
get identifier() {
|
|
42923
|
-
return
|
|
42923
|
+
return yX(this.publicKey);
|
|
42924
42924
|
}
|
|
42925
42925
|
get fingerprint() {
|
|
42926
42926
|
return this.identifier.slice(0, 4);
|
|
@@ -42943,7 +42943,7 @@ function LX(e) {
|
|
|
42943
42943
|
toWIF() {
|
|
42944
42944
|
if (!this.privateKey)
|
|
42945
42945
|
throw new TypeError("Missing private key");
|
|
42946
|
-
return
|
|
42946
|
+
return jX({
|
|
42947
42947
|
version: this.network.wif,
|
|
42948
42948
|
privateKey: this.privateKey,
|
|
42949
42949
|
compressed: !0
|
|
@@ -42977,12 +42977,12 @@ function LX(e) {
|
|
|
42977
42977
|
return E;
|
|
42978
42978
|
}
|
|
42979
42979
|
deriveHardened(g) {
|
|
42980
|
-
if (typeof va(
|
|
42980
|
+
if (typeof va(PX, g) == "number")
|
|
42981
42981
|
return this.derive(g + r);
|
|
42982
42982
|
throw new TypeError("Expected UInt31, got " + g);
|
|
42983
42983
|
}
|
|
42984
42984
|
derivePath(g) {
|
|
42985
|
-
va(
|
|
42985
|
+
va(CX, g);
|
|
42986
42986
|
let y = g.split("/");
|
|
42987
42987
|
if (y[0] === "m") {
|
|
42988
42988
|
if (this.parentFingerprint)
|
|
@@ -43064,7 +43064,7 @@ function LX(e) {
|
|
|
43064
43064
|
return u(h, g, y);
|
|
43065
43065
|
}
|
|
43066
43066
|
function u(h, g, y, m, w, v) {
|
|
43067
|
-
if (va(
|
|
43067
|
+
if (va(BX, h), va(y1, 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
|
}
|
|
@@ -43084,9 +43084,9 @@ function LX(e) {
|
|
|
43084
43084
|
fromPrivateKey: s
|
|
43085
43085
|
};
|
|
43086
43086
|
}
|
|
43087
|
-
const
|
|
43087
|
+
const RX = "text/plain", LX = zX(j2);
|
|
43088
43088
|
bk(j2);
|
|
43089
|
-
const
|
|
43089
|
+
const HX = async ({
|
|
43090
43090
|
contentBase64: e,
|
|
43091
43091
|
mimeType: t,
|
|
43092
43092
|
ordinalAddress: r,
|
|
@@ -43095,7 +43095,7 @@ const KX = async ({
|
|
|
43095
43095
|
signPsbt: i
|
|
43096
43096
|
}) => {
|
|
43097
43097
|
try {
|
|
43098
|
-
const a = await
|
|
43098
|
+
const a = await qX(), s = Buffer.from(a).toString("hex"), c = await DX({
|
|
43099
43099
|
contentBase64: e,
|
|
43100
43100
|
mimeType: t,
|
|
43101
43101
|
paymentAddress: n,
|
|
@@ -43114,7 +43114,7 @@ const KX = async ({
|
|
|
43114
43114
|
if (!f) throw new Error("sign psbt failed");
|
|
43115
43115
|
const h = Wr.fromHex((f == null ? void 0 : f.signedPsbtHex) || "").extractTransaction(), g = await F2(h.toHex(), Bt);
|
|
43116
43116
|
if (!g) throw new Error("commit tx failed");
|
|
43117
|
-
return await
|
|
43117
|
+
return await KX({
|
|
43118
43118
|
contentBase64: e,
|
|
43119
43119
|
mimeType: t,
|
|
43120
43120
|
ordinalAddress: r,
|
|
@@ -43124,7 +43124,7 @@ const KX = async ({
|
|
|
43124
43124
|
} catch (a) {
|
|
43125
43125
|
throw a;
|
|
43126
43126
|
}
|
|
43127
|
-
},
|
|
43127
|
+
}, DX = async ({
|
|
43128
43128
|
contentBase64: e,
|
|
43129
43129
|
mimeType: t,
|
|
43130
43130
|
paymentAddress: r,
|
|
@@ -43135,16 +43135,16 @@ const KX = async ({
|
|
|
43135
43135
|
const i = Buffer.from(e).length;
|
|
43136
43136
|
if (i > 39e4)
|
|
43137
43137
|
throw new Error("Content size is too large, must be less than 390kb");
|
|
43138
|
-
const { fastestFee: a } = await
|
|
43138
|
+
const { fastestFee: a } = await ZX(Bt), s = Ex(String(o), !0), c = new Wr({
|
|
43139
43139
|
network: Xo
|
|
43140
|
-
}), { inscriberAddress: l } =
|
|
43140
|
+
}), { inscriberAddress: l } = MX(
|
|
43141
43141
|
s,
|
|
43142
43142
|
e,
|
|
43143
43143
|
t
|
|
43144
43144
|
), u = 5 * 34, f = Math.floor(u * a), h = Math.floor(i * a / 3) + 1e3 + 546, g = Math.floor(f + h), y = (await M2(
|
|
43145
43145
|
r,
|
|
43146
43146
|
Bt
|
|
43147
|
-
)).filter((S) => S.value > 3e3).sort((S, O) => O.value - S.value), m =
|
|
43147
|
+
)).filter((S) => S.value > 3e3).sort((S, O) => O.value - S.value), m = HW(y);
|
|
43148
43148
|
if (m === 0)
|
|
43149
43149
|
throw new Error("insufficient funds");
|
|
43150
43150
|
if (m < g)
|
|
@@ -43153,7 +43153,7 @@ const KX = async ({
|
|
|
43153
43153
|
const v = await Ov(r);
|
|
43154
43154
|
let x = 0;
|
|
43155
43155
|
for await (const S of y) {
|
|
43156
|
-
const O =
|
|
43156
|
+
const O = DW(r, Bt);
|
|
43157
43157
|
if (console.log({ paymentAddressType: O }), c.addInput({
|
|
43158
43158
|
hash: S.txid,
|
|
43159
43159
|
index: S.vout,
|
|
@@ -43181,7 +43181,7 @@ const KX = async ({
|
|
|
43181
43181
|
} catch (i) {
|
|
43182
43182
|
throw i;
|
|
43183
43183
|
}
|
|
43184
|
-
},
|
|
43184
|
+
}, KX = async ({
|
|
43185
43185
|
contentBase64: e,
|
|
43186
43186
|
mimeType: t,
|
|
43187
43187
|
ordinalAddress: r,
|
|
@@ -43191,9 +43191,9 @@ const KX = async ({
|
|
|
43191
43191
|
}) => {
|
|
43192
43192
|
try {
|
|
43193
43193
|
const a = ZR(o), s = Ex(o, !0), c = k9(s, e, t), l = S0.encodeScript(c), [u, f] = S0.getPubKey(s, { target: l });
|
|
43194
|
-
if (!await
|
|
43194
|
+
if (!await GX(String(n)))
|
|
43195
43195
|
throw new Error("ERROR WAITING FOR COMMIT TX");
|
|
43196
|
-
const h = await
|
|
43196
|
+
const h = await WX(n, 0);
|
|
43197
43197
|
if (h === 0 || !h)
|
|
43198
43198
|
throw new Error("ERROR GETTING FIRST INPUT VALUE");
|
|
43199
43199
|
const g = fi.create({
|
|
@@ -43219,14 +43219,14 @@ const KX = async ({
|
|
|
43219
43219
|
throw a;
|
|
43220
43220
|
}
|
|
43221
43221
|
};
|
|
43222
|
-
async function
|
|
43223
|
-
const e = crypto.getRandomValues(new Uint8Array(32)), t =
|
|
43222
|
+
async function qX() {
|
|
43223
|
+
const e = crypto.getRandomValues(new Uint8Array(32)), t = fX(Buffer.from(e)), r = await lX(t), n = LX.fromSeed(r);
|
|
43224
43224
|
return n == null ? void 0 : n.derivePath("m/44'/0'/0'/0/0").privateKey;
|
|
43225
43225
|
}
|
|
43226
43226
|
const k9 = (e, t, r) => {
|
|
43227
43227
|
const n = new TextEncoder(), o = n.encode("ord");
|
|
43228
43228
|
let i;
|
|
43229
|
-
if (r ===
|
|
43229
|
+
if (r === RX) {
|
|
43230
43230
|
const s = Buffer.from(t, "base64").toString("utf-8");
|
|
43231
43231
|
i = Buffer.from(s, "utf-8");
|
|
43232
43232
|
} else
|
|
@@ -43246,7 +43246,7 @@ const k9 = (e, t, r) => {
|
|
|
43246
43246
|
...a.map((s) => s),
|
|
43247
43247
|
"OP_ENDIF"
|
|
43248
43248
|
];
|
|
43249
|
-
},
|
|
43249
|
+
}, MX = (e, t, r) => {
|
|
43250
43250
|
const n = k9(e, t, r), o = S0.encodeScript(n), [i] = S0.getPubKey(e, { target: o });
|
|
43251
43251
|
return {
|
|
43252
43252
|
inscriberAddress: gA.p2tr.fromPubKey(i),
|
|
@@ -43254,25 +43254,25 @@ const k9 = (e, t, r) => {
|
|
|
43254
43254
|
tapleaf: o
|
|
43255
43255
|
};
|
|
43256
43256
|
};
|
|
43257
|
-
async function
|
|
43257
|
+
async function FX(e, t = Bt) {
|
|
43258
43258
|
try {
|
|
43259
43259
|
return await tr.get(`${$h(t)}/api/tx/${e}`).then((r) => r.data);
|
|
43260
43260
|
} catch (r) {
|
|
43261
43261
|
throw r;
|
|
43262
43262
|
}
|
|
43263
43263
|
}
|
|
43264
|
-
async function
|
|
43264
|
+
async function VX(e, t = Bt) {
|
|
43265
43265
|
try {
|
|
43266
43266
|
return await tr.get(`${$h(t)}/api/tx/${e}/raw`).then((r) => r.data);
|
|
43267
43267
|
} catch (r) {
|
|
43268
43268
|
throw r;
|
|
43269
43269
|
}
|
|
43270
43270
|
}
|
|
43271
|
-
async function
|
|
43271
|
+
async function GX(e) {
|
|
43272
43272
|
const t = Date.now();
|
|
43273
43273
|
for (; ; )
|
|
43274
43274
|
try {
|
|
43275
|
-
if (await
|
|
43275
|
+
if (await VX(e))
|
|
43276
43276
|
return console.log("Transaction found in mempool:", e), !0;
|
|
43277
43277
|
if (Date.now() - t > 6e4)
|
|
43278
43278
|
return !1;
|
|
@@ -43283,16 +43283,16 @@ async function WX(e) {
|
|
|
43283
43283
|
await new Promise((r) => setTimeout(r, 5e3));
|
|
43284
43284
|
}
|
|
43285
43285
|
}
|
|
43286
|
-
const
|
|
43286
|
+
const ZX = async (e) => await tr.get(`${$h(e)}/api/v1/fees/recommended`, {
|
|
43287
43287
|
headers: {
|
|
43288
43288
|
"Content-Type": "application/json"
|
|
43289
43289
|
}
|
|
43290
43290
|
}).then((t) => t.data);
|
|
43291
|
-
async function
|
|
43291
|
+
async function WX(e, t) {
|
|
43292
43292
|
const r = Date.now();
|
|
43293
43293
|
for (; ; )
|
|
43294
43294
|
try {
|
|
43295
|
-
const n = await
|
|
43295
|
+
const n = await FX(e);
|
|
43296
43296
|
if (n && n.vout && n.vout.length > 0)
|
|
43297
43297
|
return Math.floor(n.vout[t].value);
|
|
43298
43298
|
if (Date.now() - r > 6e4)
|
|
@@ -43306,7 +43306,7 @@ async function YX(e, t) {
|
|
|
43306
43306
|
}
|
|
43307
43307
|
const dw = new Error(
|
|
43308
43308
|
"The connected wallet doesn't support this method..."
|
|
43309
|
-
),
|
|
43309
|
+
), XX = new Error("Wallet is not installed");
|
|
43310
43310
|
let ns = class {
|
|
43311
43311
|
constructor(t, r, n) {
|
|
43312
43312
|
$e(this, "$store"), $e(this, "$network"), this.parent = r, this.config = n, this.$store = t.$store, this.$network = t.$network, this.initialize();
|
|
@@ -43338,7 +43338,7 @@ let ns = class {
|
|
|
43338
43338
|
return r.startsWith("02") || (console.log("extracting tx..."), r = Wr.fromHex(r).extractTransaction().toHex()), await F2(r, this.$network.get());
|
|
43339
43339
|
}
|
|
43340
43340
|
async inscribe(t, r) {
|
|
43341
|
-
return await
|
|
43341
|
+
return await HX({
|
|
43342
43342
|
contentBase64: t,
|
|
43343
43343
|
mimeType: r,
|
|
43344
43344
|
ordinalAddress: this.$store.get().address,
|
|
@@ -43348,7 +43348,7 @@ let ns = class {
|
|
|
43348
43348
|
});
|
|
43349
43349
|
}
|
|
43350
43350
|
};
|
|
43351
|
-
class
|
|
43351
|
+
class YX extends ns {
|
|
43352
43352
|
constructor() {
|
|
43353
43353
|
super(...arguments), $e(this, "observer");
|
|
43354
43354
|
}
|
|
@@ -43468,6 +43468,7 @@ class QX extends ns {
|
|
|
43468
43468
|
await ((r = this.library) == null ? void 0 : r.switchChain(n)), this.$network.set(t), await this.getBalance();
|
|
43469
43469
|
}
|
|
43470
43470
|
}
|
|
43471
|
+
const JX = (e) => /^(?:[A-Za-z0-9+\/]{4})*?(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e), QX = (e) => /^[a-fA-F0-9]+$/.test(e);
|
|
43471
43472
|
function eY() {
|
|
43472
43473
|
typeof window < "u" && typeof localStorage < "u" && setTimeout(() => {
|
|
43473
43474
|
const e = document.createTextNode(" ");
|
|
@@ -45046,7 +45047,7 @@ let fJ = class extends ns {
|
|
|
45046
45047
|
onFinish: (E) => {
|
|
45047
45048
|
E.txId ? y = E.txId : E.psbtBase64 && (v = Wr.fromBase64(String(E.psbtBase64), {
|
|
45048
45049
|
network: bn(this.network)
|
|
45049
|
-
}), m = v.toHex(), w = v.toBase64());
|
|
45050
|
+
}), o && v.finalizeAllInputs(), m = v.toHex(), w = v.toBase64());
|
|
45050
45051
|
},
|
|
45051
45052
|
onCancel: () => {
|
|
45052
45053
|
throw console.error("Request canceled"), new Error("User canceled the request");
|
|
@@ -45108,7 +45109,7 @@ let fJ = class extends ns {
|
|
|
45108
45109
|
(t = this.observer) == null || t.disconnect(), this.removeLibraryListeners();
|
|
45109
45110
|
}
|
|
45110
45111
|
async connect() {
|
|
45111
|
-
if (!this.library) throw
|
|
45112
|
+
if (!this.library) throw XX;
|
|
45112
45113
|
const t = await this.library.requestAccounts();
|
|
45113
45114
|
if (!t) throw new Error("No accounts found");
|
|
45114
45115
|
const r = await this.library.getPublicKey();
|
|
@@ -46484,7 +46485,7 @@ class Twe {
|
|
|
46484
46485
|
[Dc]: new qJ(t, this, r),
|
|
46485
46486
|
[Vc]: new pJ(t, this, r),
|
|
46486
46487
|
[dl]: new ZJ(t, this, r),
|
|
46487
|
-
[uc]: new
|
|
46488
|
+
[uc]: new YX(t, this, r),
|
|
46488
46489
|
[Pa]: new fJ(t, this, r),
|
|
46489
46490
|
[pl]: new dJ(t, this, r)
|
|
46490
46491
|
}, this.$network.subscribe(this.watchNetworkChange.bind(this)), zE(
|
|
@@ -46594,9 +46595,9 @@ class Twe {
|
|
|
46594
46595
|
var o;
|
|
46595
46596
|
let i, a;
|
|
46596
46597
|
if (!t) throw new Error("No PSBT provided");
|
|
46597
|
-
if (
|
|
46598
|
+
if (QX(t))
|
|
46598
46599
|
a = Wr.fromHex(t).toBase64(), i = t;
|
|
46599
|
-
else if (
|
|
46600
|
+
else if (JX(t))
|
|
46600
46601
|
a = t, i = Wr.fromBase64(t).toHex();
|
|
46601
46602
|
else
|
|
46602
46603
|
throw new Error("Invalid PSBT format");
|
|
@@ -68072,8 +68073,8 @@ const wn = (e) => e === Zr || e === go || e === bo ? iQ : Yo, _E = (e) => e.find
|
|
|
68072
68073
|
} catch (r) {
|
|
68073
68074
|
throw console.error("Error fetching BTC balance:", r), new Error("Failed to fetch BTC balance");
|
|
68074
68075
|
}
|
|
68075
|
-
}
|
|
68076
|
-
function
|
|
68076
|
+
};
|
|
68077
|
+
function mge(e, t, r) {
|
|
68077
68078
|
const n = e * 57 + t * 41, o = r * 34;
|
|
68078
68079
|
return 10 + n + o;
|
|
68079
68080
|
}
|
|
@@ -68097,7 +68098,7 @@ async function DP(e, t, r, n, o, i, a = 7) {
|
|
|
68097
68098
|
throw new Error("No UTXOs found");
|
|
68098
68099
|
const l = c.sort(
|
|
68099
68100
|
(m, w) => w.value - m.value
|
|
68100
|
-
), u = new vr({ network: wn(i) }), f =
|
|
68101
|
+
), u = new vr({ network: wn(i) }), f = mge(1, 0, 2), h = Math.floor(f * a) + n;
|
|
68101
68102
|
let g = 0, y = 0;
|
|
68102
68103
|
for await (let m of l) {
|
|
68103
68104
|
const { txid: w, vout: v, value: x } = m, E = p3(
|
|
@@ -68142,13 +68143,13 @@ function KP(e, t) {
|
|
|
68142
68143
|
});
|
|
68143
68144
|
return (r = o == null ? void 0 : o.redeem) == null ? void 0 : r.output;
|
|
68144
68145
|
}
|
|
68145
|
-
function
|
|
68146
|
+
function yge(e) {
|
|
68146
68147
|
return e == null ? void 0 : e.reduce((t, r) => t + r.value, 0);
|
|
68147
68148
|
}
|
|
68148
68149
|
async function TE(e, t) {
|
|
68149
68150
|
return await rr.post(`${Zh(t)}/api/tx`, e).then((r) => r.data);
|
|
68150
68151
|
}
|
|
68151
|
-
const
|
|
68152
|
+
const bge = (e, t) => {
|
|
68152
68153
|
try {
|
|
68153
68154
|
const r = wn(t), n = GS(e);
|
|
68154
68155
|
if (n.version === r.pubKeyHash) return rQ;
|
|
@@ -68228,7 +68229,7 @@ const cO = (e, t, r, n, o) => (e >>> 0) + (t >>> 0) + (r >>> 0) + (n >>> 0) + (o
|
|
|
68228
68229
|
nt.add5L = cO;
|
|
68229
68230
|
const uO = (e, t, r, n, o, i) => t + r + n + o + i + (e / 2 ** 32 | 0) | 0;
|
|
68230
68231
|
nt.add5H = uO;
|
|
68231
|
-
const
|
|
68232
|
+
const wge = {
|
|
68232
68233
|
fromBig: IE,
|
|
68233
68234
|
split: qP,
|
|
68234
68235
|
toBig: MP,
|
|
@@ -68252,10 +68253,10 @@ const Ege = {
|
|
|
68252
68253
|
add5H: uO,
|
|
68253
68254
|
add5L: cO
|
|
68254
68255
|
};
|
|
68255
|
-
nt.default =
|
|
68256
|
+
nt.default = wge;
|
|
68256
68257
|
Object.defineProperty(en, "__esModule", { value: !0 });
|
|
68257
68258
|
en.sha384 = en.sha512_256 = en.sha512_224 = en.sha512 = en.SHA384 = en.SHA512_256 = en.SHA512_224 = en.SHA512 = void 0;
|
|
68258
|
-
const
|
|
68259
|
+
const vge = Ma, xt = nt, fy = Uc, [Ege, kge] = xt.default.split([
|
|
68259
68260
|
"0x428a2f98d728ae22",
|
|
68260
68261
|
"0x7137449123ef65cd",
|
|
68261
68262
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -68337,7 +68338,7 @@ const kge = Ma, xt = nt, fy = Uc, [xge, Age] = xt.default.split([
|
|
|
68337
68338
|
"0x5fcb6fab3ad6faec",
|
|
68338
68339
|
"0x6c44198c4a475817"
|
|
68339
68340
|
].map((e) => BigInt(e))), ec = /* @__PURE__ */ new Uint32Array(80), tc = /* @__PURE__ */ new Uint32Array(80);
|
|
68340
|
-
class Wh extends
|
|
68341
|
+
class Wh extends vge.HashMD {
|
|
68341
68342
|
constructor() {
|
|
68342
68343
|
super(128, 64, 16, !1), this.Ah = 1779033703, this.Al = -205731576, this.Bh = -1150833019, this.Bl = -2067093701, this.Ch = 1013904242, this.Cl = -23791573, this.Dh = -1521486534, this.Dl = 1595750129, this.Eh = 1359893119, this.El = -1377402159, this.Fh = -1694144372, this.Fl = 725511199, this.Gh = 528734635, this.Gl = -79577749, this.Hh = 1541459225, this.Hl = 327033209;
|
|
68343
68344
|
}
|
|
@@ -68359,7 +68360,7 @@ class Wh extends kge.HashMD {
|
|
|
68359
68360
|
}
|
|
68360
68361
|
let { Ah: n, Al: o, Bh: i, Bl: a, Ch: s, Cl: c, Dh: l, Dl: u, Eh: f, El: h, Fh: g, Fl: y, Gh: m, Gl: w, Hh: v, Hl: x } = this;
|
|
68361
68362
|
for (let E = 0; E < 80; E++) {
|
|
68362
|
-
const S = xt.default.rotrSH(f, h, 14) ^ xt.default.rotrSH(f, h, 18) ^ xt.default.rotrBH(f, h, 41), O = xt.default.rotrSL(f, h, 14) ^ xt.default.rotrSL(f, h, 18) ^ xt.default.rotrBL(f, h, 41), T = f & g ^ ~f & m, j = h & y ^ ~h & w, R = xt.default.add5L(x, O, j,
|
|
68363
|
+
const S = xt.default.rotrSH(f, h, 14) ^ xt.default.rotrSH(f, h, 18) ^ xt.default.rotrBH(f, h, 41), O = xt.default.rotrSL(f, h, 14) ^ xt.default.rotrSL(f, h, 18) ^ xt.default.rotrBL(f, h, 41), T = f & g ^ ~f & m, j = h & y ^ ~h & w, R = xt.default.add5L(x, O, j, kge[E], tc[E]), V = xt.default.add5H(R, v, S, T, Ege[E], ec[E]), ee = R | 0, Z = xt.default.rotrSH(n, o, 28) ^ xt.default.rotrBH(n, o, 34) ^ xt.default.rotrBH(n, o, 39), U = xt.default.rotrSL(n, o, 28) ^ xt.default.rotrBL(n, o, 34) ^ xt.default.rotrBL(n, o, 39), M = n & i ^ n & s ^ i & s, H = o & a ^ o & c ^ a & c;
|
|
68363
68364
|
v = m | 0, x = w | 0, m = g | 0, w = y | 0, g = f | 0, y = h | 0, { h: f, l: h } = xt.default.add(l | 0, u | 0, V | 0, ee | 0), l = s | 0, u = c | 0, s = i | 0, c = a | 0, i = n | 0, a = o | 0;
|
|
68364
68365
|
const P = xt.default.add3L(ee, U, H);
|
|
68365
68366
|
n = xt.default.add3H(P, V, Z, M), o = P | 0;
|
|
@@ -68398,21 +68399,21 @@ en.sha512_256 = (0, fy.wrapConstructor)(() => new fO());
|
|
|
68398
68399
|
en.sha384 = (0, fy.wrapConstructor)(() => new dO());
|
|
68399
68400
|
var dy = {};
|
|
68400
68401
|
Object.defineProperty(dy, "__esModule", { value: !0 });
|
|
68401
|
-
dy.pbkdf2 =
|
|
68402
|
-
dy.pbkdf2Async =
|
|
68403
|
-
const Np = Ao,
|
|
68402
|
+
dy.pbkdf2 = Age;
|
|
68403
|
+
dy.pbkdf2Async = _ge;
|
|
68404
|
+
const Np = Ao, xge = ny, Pl = Uc;
|
|
68404
68405
|
function hO(e, t, r, n) {
|
|
68405
68406
|
(0, Np.hash)(e);
|
|
68406
68407
|
const o = (0, Pl.checkOpts)({ dkLen: 32, asyncTick: 10 }, n), { c: i, dkLen: a, asyncTick: s } = o;
|
|
68407
68408
|
if ((0, Np.number)(i), (0, Np.number)(a), (0, Np.number)(s), i < 1)
|
|
68408
68409
|
throw new Error("PBKDF2: iterations (c) should be >= 1");
|
|
68409
|
-
const c = (0, Pl.toBytes)(t), l = (0, Pl.toBytes)(r), u = new Uint8Array(a), f =
|
|
68410
|
+
const c = (0, Pl.toBytes)(t), l = (0, Pl.toBytes)(r), u = new Uint8Array(a), f = xge.hmac.create(e, c), h = f._cloneInto().update(l);
|
|
68410
68411
|
return { c: i, dkLen: a, asyncTick: s, DK: u, PRF: f, PRFSalt: h };
|
|
68411
68412
|
}
|
|
68412
68413
|
function pO(e, t, r, n, o) {
|
|
68413
68414
|
return e.destroy(), t.destroy(), n && n.destroy(), o.fill(0), r;
|
|
68414
68415
|
}
|
|
68415
|
-
function
|
|
68416
|
+
function Age(e, t, r, n) {
|
|
68416
68417
|
const { c: o, dkLen: i, DK: a, PRF: s, PRFSalt: c } = hO(e, t, r, n);
|
|
68417
68418
|
let l;
|
|
68418
68419
|
const u = new Uint8Array(4), f = (0, Pl.createView)(u), h = new Uint8Array(s.outputLen);
|
|
@@ -68427,7 +68428,7 @@ function Sge(e, t, r, n) {
|
|
|
68427
68428
|
}
|
|
68428
68429
|
return pO(s, c, a, l, h);
|
|
68429
68430
|
}
|
|
68430
|
-
async function
|
|
68431
|
+
async function _ge(e, t, r, n) {
|
|
68431
68432
|
const { c: o, dkLen: i, asyncTick: a, DK: s, PRF: c, PRFSalt: l } = hO(e, t, r, n);
|
|
68432
68433
|
let u;
|
|
68433
68434
|
const f = new Uint8Array(4), h = (0, Pl.createView)(f), g = new Uint8Array(c.outputLen);
|
|
@@ -68442,7 +68443,7 @@ async function $ge(e, t, r, n) {
|
|
|
68442
68443
|
return pO(c, l, s, u, g);
|
|
68443
68444
|
}
|
|
68444
68445
|
var Dn = {};
|
|
68445
|
-
const
|
|
68446
|
+
const Sge = [
|
|
68446
68447
|
"abdikace",
|
|
68447
68448
|
"abeceda",
|
|
68448
68449
|
"adresa",
|
|
@@ -70491,7 +70492,7 @@ const Tge = [
|
|
|
70491
70492
|
"zvrat",
|
|
70492
70493
|
"zvukovod",
|
|
70493
70494
|
"zvyk"
|
|
70494
|
-
],
|
|
70495
|
+
], $ge = [
|
|
70495
70496
|
"的",
|
|
70496
70497
|
"一",
|
|
70497
70498
|
"是",
|
|
@@ -72540,7 +72541,7 @@ const Tge = [
|
|
|
72540
72541
|
"怨",
|
|
72541
72542
|
"矮",
|
|
72542
72543
|
"歇"
|
|
72543
|
-
],
|
|
72544
|
+
], Tge = [
|
|
72544
72545
|
"的",
|
|
72545
72546
|
"一",
|
|
72546
72547
|
"是",
|
|
@@ -74589,7 +74590,7 @@ const Tge = [
|
|
|
74589
74590
|
"怨",
|
|
74590
74591
|
"矮",
|
|
74591
74592
|
"歇"
|
|
74592
|
-
],
|
|
74593
|
+
], Ige = [
|
|
74593
74594
|
"가격",
|
|
74594
74595
|
"가끔",
|
|
74595
74596
|
"가난",
|
|
@@ -76638,7 +76639,7 @@ const Tge = [
|
|
|
76638
76639
|
"희생",
|
|
76639
76640
|
"흰색",
|
|
76640
76641
|
"힘껏"
|
|
76641
|
-
],
|
|
76642
|
+
], Pge = [
|
|
76642
76643
|
"abaisser",
|
|
76643
76644
|
"abandon",
|
|
76644
76645
|
"abdiquer",
|
|
@@ -78687,7 +78688,7 @@ const Tge = [
|
|
|
78687
78688
|
"zénith",
|
|
78688
78689
|
"zeste",
|
|
78689
78690
|
"zoologie"
|
|
78690
|
-
],
|
|
78691
|
+
], Oge = [
|
|
78691
78692
|
"abaco",
|
|
78692
78693
|
"abbaglio",
|
|
78693
78694
|
"abbinato",
|
|
@@ -80736,7 +80737,7 @@ const Tge = [
|
|
|
80736
80737
|
"zufolo",
|
|
80737
80738
|
"zulu",
|
|
80738
80739
|
"zuppa"
|
|
80739
|
-
],
|
|
80740
|
+
], Bge = [
|
|
80740
80741
|
"ábaco",
|
|
80741
80742
|
"abdomen",
|
|
80742
80743
|
"abeja",
|
|
@@ -82785,7 +82786,7 @@ const Tge = [
|
|
|
82785
82786
|
"zorro",
|
|
82786
82787
|
"zumo",
|
|
82787
82788
|
"zurdo"
|
|
82788
|
-
],
|
|
82789
|
+
], Uge = [
|
|
82789
82790
|
"あいこくしん",
|
|
82790
82791
|
"あいさつ",
|
|
82791
82792
|
"あいだ",
|
|
@@ -84834,7 +84835,7 @@ const Tge = [
|
|
|
84834
84835
|
"わすれもの",
|
|
84835
84836
|
"わらう",
|
|
84836
84837
|
"われる"
|
|
84837
|
-
],
|
|
84838
|
+
], Cge = [
|
|
84838
84839
|
"abacate",
|
|
84839
84840
|
"abaixo",
|
|
84840
84841
|
"abalar",
|
|
@@ -86883,7 +86884,7 @@ const Tge = [
|
|
|
86883
86884
|
"zombar",
|
|
86884
86885
|
"zoologia",
|
|
86885
86886
|
"zumbido"
|
|
86886
|
-
],
|
|
86887
|
+
], Nge = [
|
|
86887
86888
|
"abandon",
|
|
86888
86889
|
"ability",
|
|
86889
86890
|
"able",
|
|
@@ -88939,49 +88940,49 @@ Dn.wordlists = Eo;
|
|
|
88939
88940
|
let hr;
|
|
88940
88941
|
var ha = Dn._default = hr;
|
|
88941
88942
|
try {
|
|
88942
|
-
ha = Dn._default = hr =
|
|
88943
|
+
ha = Dn._default = hr = Sge, Eo.czech = hr;
|
|
88943
88944
|
} catch {
|
|
88944
88945
|
}
|
|
88945
88946
|
try {
|
|
88946
|
-
ha = Dn._default = hr =
|
|
88947
|
+
ha = Dn._default = hr = $ge, Eo.chinese_simplified = hr;
|
|
88947
88948
|
} catch {
|
|
88948
88949
|
}
|
|
88949
88950
|
try {
|
|
88950
|
-
ha = Dn._default = hr =
|
|
88951
|
+
ha = Dn._default = hr = Tge, Eo.chinese_traditional = hr;
|
|
88951
88952
|
} catch {
|
|
88952
88953
|
}
|
|
88953
88954
|
try {
|
|
88954
|
-
ha = Dn._default = hr =
|
|
88955
|
+
ha = Dn._default = hr = Ige, Eo.korean = hr;
|
|
88955
88956
|
} catch {
|
|
88956
88957
|
}
|
|
88957
88958
|
try {
|
|
88958
|
-
ha = Dn._default = hr =
|
|
88959
|
+
ha = Dn._default = hr = Pge, Eo.french = hr;
|
|
88959
88960
|
} catch {
|
|
88960
88961
|
}
|
|
88961
88962
|
try {
|
|
88962
|
-
ha = Dn._default = hr =
|
|
88963
|
+
ha = Dn._default = hr = Oge, Eo.italian = hr;
|
|
88963
88964
|
} catch {
|
|
88964
88965
|
}
|
|
88965
88966
|
try {
|
|
88966
|
-
ha = Dn._default = hr =
|
|
88967
|
+
ha = Dn._default = hr = Bge, Eo.spanish = hr;
|
|
88967
88968
|
} catch {
|
|
88968
88969
|
}
|
|
88969
88970
|
try {
|
|
88970
|
-
ha = Dn._default = hr =
|
|
88971
|
+
ha = Dn._default = hr = Uge, Eo.japanese = hr, Eo.JA = hr;
|
|
88971
88972
|
} catch {
|
|
88972
88973
|
}
|
|
88973
88974
|
try {
|
|
88974
|
-
ha = Dn._default = hr =
|
|
88975
|
+
ha = Dn._default = hr = Cge, Eo.portuguese = hr;
|
|
88975
88976
|
} catch {
|
|
88976
88977
|
}
|
|
88977
88978
|
try {
|
|
88978
|
-
ha = Dn._default = hr =
|
|
88979
|
+
ha = Dn._default = hr = Nge, Eo.english = hr, Eo.EN = hr;
|
|
88979
88980
|
} catch {
|
|
88980
88981
|
}
|
|
88981
88982
|
Object.defineProperty(da, "__esModule", { value: !0 });
|
|
88982
|
-
const
|
|
88983
|
+
const jge = bi, gO = en, mO = dy, zge = Uc, Pg = Dn;
|
|
88983
88984
|
let ah = Pg._default;
|
|
88984
|
-
const v6 = "Invalid mnemonic", mu = "Invalid entropy",
|
|
88985
|
+
const v6 = "Invalid mnemonic", mu = "Invalid entropy", Rge = "Invalid mnemonic checksum", yO = `A wordlist is required but a default could not be found.
|
|
88985
88986
|
Please pass a 2048 word array explicitly.`;
|
|
88986
88987
|
function sh(e) {
|
|
88987
88988
|
return (e || "").normalize("NFKD");
|
|
@@ -88998,28 +88999,28 @@ function vO(e) {
|
|
|
88998
88999
|
return e.map((t) => bO(t.toString(2), "0", 8)).join("");
|
|
88999
89000
|
}
|
|
89000
89001
|
function EO(e) {
|
|
89001
|
-
const t = e.length * 8 / 32, r =
|
|
89002
|
+
const t = e.length * 8 / 32, r = jge.sha256(Uint8Array.from(e));
|
|
89002
89003
|
return vO(Array.from(r)).slice(0, t);
|
|
89003
89004
|
}
|
|
89004
89005
|
function kO(e) {
|
|
89005
89006
|
return "mnemonic" + (e || "");
|
|
89006
89007
|
}
|
|
89007
|
-
function
|
|
89008
|
+
function Lge(e, t) {
|
|
89008
89009
|
const r = Uint8Array.from(Buffer.from(sh(e), "utf8")), n = Uint8Array.from(Buffer.from(kO(sh(t)), "utf8")), o = mO.pbkdf2(gO.sha512, r, n, {
|
|
89009
89010
|
c: 2048,
|
|
89010
89011
|
dkLen: 64
|
|
89011
89012
|
});
|
|
89012
89013
|
return Buffer.from(o);
|
|
89013
89014
|
}
|
|
89014
|
-
da.mnemonicToSeedSync =
|
|
89015
|
-
function
|
|
89015
|
+
da.mnemonicToSeedSync = Lge;
|
|
89016
|
+
function Hge(e, t) {
|
|
89016
89017
|
const r = Uint8Array.from(Buffer.from(sh(e), "utf8")), n = Uint8Array.from(Buffer.from(kO(sh(t)), "utf8"));
|
|
89017
89018
|
return mO.pbkdf2Async(gO.sha512, r, n, {
|
|
89018
89019
|
c: 2048,
|
|
89019
89020
|
dkLen: 64
|
|
89020
89021
|
}).then((o) => Buffer.from(o));
|
|
89021
89022
|
}
|
|
89022
|
-
var
|
|
89023
|
+
var Dge = da.mnemonicToSeed = Hge;
|
|
89023
89024
|
function xO(e, t) {
|
|
89024
89025
|
if (t = t || ah, !t)
|
|
89025
89026
|
throw new Error(yO);
|
|
@@ -89040,7 +89041,7 @@ function xO(e, t) {
|
|
|
89040
89041
|
throw new Error(mu);
|
|
89041
89042
|
const c = Buffer.from(s);
|
|
89042
89043
|
if (EO(c) !== a)
|
|
89043
|
-
throw new Error(
|
|
89044
|
+
throw new Error(Rge);
|
|
89044
89045
|
return c.toString("hex");
|
|
89045
89046
|
}
|
|
89046
89047
|
da.mnemonicToEntropy = xO;
|
|
@@ -89059,14 +89060,14 @@ function AO(e, t) {
|
|
|
89059
89060
|
});
|
|
89060
89061
|
return t[0] === "あいこくしん" ? o.join(" ") : o.join(" ");
|
|
89061
89062
|
}
|
|
89062
|
-
var
|
|
89063
|
-
function
|
|
89063
|
+
var Kge = da.entropyToMnemonic = AO;
|
|
89064
|
+
function qge(e, t, r) {
|
|
89064
89065
|
if (e = e || 128, e % 32 !== 0)
|
|
89065
89066
|
throw new TypeError(mu);
|
|
89066
|
-
return t = t || ((n) => Buffer.from(
|
|
89067
|
+
return t = t || ((n) => Buffer.from(zge.randomBytes(n))), AO(t(e / 8), r);
|
|
89067
89068
|
}
|
|
89068
|
-
da.generateMnemonic =
|
|
89069
|
-
function
|
|
89069
|
+
da.generateMnemonic = qge;
|
|
89070
|
+
function Mge(e, t) {
|
|
89070
89071
|
try {
|
|
89071
89072
|
xO(e, t);
|
|
89072
89073
|
} catch {
|
|
@@ -89074,31 +89075,31 @@ function Vge(e, t) {
|
|
|
89074
89075
|
}
|
|
89075
89076
|
return !0;
|
|
89076
89077
|
}
|
|
89077
|
-
da.validateMnemonic =
|
|
89078
|
-
function
|
|
89078
|
+
da.validateMnemonic = Mge;
|
|
89079
|
+
function Fge(e) {
|
|
89079
89080
|
const t = Pg.wordlists[e];
|
|
89080
89081
|
if (t)
|
|
89081
89082
|
ah = t;
|
|
89082
89083
|
else
|
|
89083
89084
|
throw new Error('Could not find wordlist for language "' + e + '"');
|
|
89084
89085
|
}
|
|
89085
|
-
da.setDefaultWordlist =
|
|
89086
|
-
function
|
|
89086
|
+
da.setDefaultWordlist = Fge;
|
|
89087
|
+
function Vge() {
|
|
89087
89088
|
if (!ah)
|
|
89088
89089
|
throw new Error("No Default Wordlist set");
|
|
89089
89090
|
return Object.keys(Pg.wordlists).filter((e) => e === "JA" || e === "EN" ? !1 : Pg.wordlists[e].every((t, r) => t === ah[r]))[0];
|
|
89090
89091
|
}
|
|
89091
|
-
da.getDefaultWordlist =
|
|
89092
|
-
var
|
|
89093
|
-
da.wordlists =
|
|
89094
|
-
function
|
|
89092
|
+
da.getDefaultWordlist = Vge;
|
|
89093
|
+
var Gge = Dn;
|
|
89094
|
+
da.wordlists = Gge.wordlists;
|
|
89095
|
+
function Zge(e) {
|
|
89095
89096
|
return US(rn(e));
|
|
89096
89097
|
}
|
|
89097
89098
|
function E6(e, t) {
|
|
89098
89099
|
return v3(Eie, e, t);
|
|
89099
89100
|
}
|
|
89100
89101
|
const gt = (e) => mee(e);
|
|
89101
|
-
function
|
|
89102
|
+
function Wge(e) {
|
|
89102
89103
|
if (zr(e.isPoint(gt("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"))), zr(!e.isPoint(gt("030000000000000000000000000000000000000000000000000000000000000005"))), zr(e.isPrivate(gt("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"))), zr(e.isPrivate(gt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140"))), zr(!e.isPrivate(gt("0000000000000000000000000000000000000000000000000000000000000000"))), zr(!e.isPrivate(gt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"))), zr(!e.isPrivate(gt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364142"))), zr(ka(e.pointFromScalar(gt("b1121e4088a66a28f5b6b0f5844943ecd9f610196d7bb83b25214b60452c09af")), gt("02b07ba9dca9523b7ef4bd97703d43d20399eb698e194704791a25ce77a400df99")) === 0), e.xOnlyPointAddTweak) {
|
|
89103
89104
|
zr(e.xOnlyPointAddTweak(gt("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), gt("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140")) === null);
|
|
89104
89105
|
let t = e.xOnlyPointAddTweak(gt("1617d38ed8d8657da4d4761e8057bc396ea9e4b9d29776d4be096016dbd2509b"), gt("a8397a935f0dfceba6ba9618f6451ef4d80637abf4e6af2669fbc9de6a8fd2ac"));
|
|
@@ -89120,7 +89121,7 @@ function _O(...e) {
|
|
|
89120
89121
|
return { encode: n, decode: o };
|
|
89121
89122
|
}
|
|
89122
89123
|
// @__NO_SIDE_EFFECTS__
|
|
89123
|
-
function
|
|
89124
|
+
function Xge(e) {
|
|
89124
89125
|
return {
|
|
89125
89126
|
encode: (t) => {
|
|
89126
89127
|
if (!Array.isArray(t) || t.length && typeof t[0] != "number")
|
|
@@ -89146,7 +89147,7 @@ function Jge(e) {
|
|
|
89146
89147
|
};
|
|
89147
89148
|
}
|
|
89148
89149
|
// @__NO_SIDE_EFFECTS__
|
|
89149
|
-
function
|
|
89150
|
+
function Yge(e = "") {
|
|
89150
89151
|
if (typeof e != "string")
|
|
89151
89152
|
throw new Error("join separator should be string");
|
|
89152
89153
|
return {
|
|
@@ -89202,7 +89203,7 @@ function k6(e, t, r) {
|
|
|
89202
89203
|
return o.reverse();
|
|
89203
89204
|
}
|
|
89204
89205
|
// @__NO_SIDE_EFFECTS__
|
|
89205
|
-
function
|
|
89206
|
+
function Jge(e) {
|
|
89206
89207
|
return {
|
|
89207
89208
|
encode: (t) => {
|
|
89208
89209
|
if (!lv(t))
|
|
@@ -89217,7 +89218,7 @@ function eme(e) {
|
|
|
89217
89218
|
};
|
|
89218
89219
|
}
|
|
89219
89220
|
// @__NO_SIDE_EFFECTS__
|
|
89220
|
-
function
|
|
89221
|
+
function Qge(e, t) {
|
|
89221
89222
|
if (typeof t != "function")
|
|
89222
89223
|
throw new Error("checksum fn should be function");
|
|
89223
89224
|
return {
|
|
@@ -89238,8 +89239,8 @@ function tme(e, t) {
|
|
|
89238
89239
|
}
|
|
89239
89240
|
};
|
|
89240
89241
|
}
|
|
89241
|
-
const
|
|
89242
|
-
function
|
|
89242
|
+
const eme = (e) => /* @__PURE__ */ _O(/* @__PURE__ */ Jge(58), /* @__PURE__ */ Xge(e), /* @__PURE__ */ Yge("")), tme = /* @__PURE__ */ eme("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), rme = (e) => /* @__PURE__ */ _O(/* @__PURE__ */ Qge(4, (t) => e(e(t))), tme), nme = rme;
|
|
89243
|
+
function ome(e) {
|
|
89243
89244
|
return {
|
|
89244
89245
|
lang: (e == null ? void 0 : e.lang) ?? void 0,
|
|
89245
89246
|
message: e == null ? void 0 : e.message,
|
|
@@ -89247,7 +89248,7 @@ function ame(e) {
|
|
|
89247
89248
|
abortPipeEarly: (e == null ? void 0 : e.abortPipeEarly) ?? void 0
|
|
89248
89249
|
};
|
|
89249
89250
|
}
|
|
89250
|
-
function
|
|
89251
|
+
function ime(e, t) {
|
|
89251
89252
|
var r;
|
|
89252
89253
|
return (r = void 0) == null ? void 0 : r.get(t);
|
|
89253
89254
|
}
|
|
@@ -89272,10 +89273,10 @@ function ss(e, t, r, n, o) {
|
|
|
89272
89273
|
abortEarly: n.abortEarly,
|
|
89273
89274
|
abortPipeEarly: n.abortPipeEarly
|
|
89274
89275
|
}, l = e.kind === "schema", u = (o == null ? void 0 : o.message) ?? // @ts-expect-error
|
|
89275
|
-
e.message ??
|
|
89276
|
+
e.message ?? ime(e.reference, c.lang) ?? (l ? (c.lang, void 0) : null) ?? n.message ?? (c.lang, void 0);
|
|
89276
89277
|
u && (c.message = typeof u == "function" ? u(c) : u), l && (r.typed = !1), r.issues ? r.issues.push(c) : r.issues = [c];
|
|
89277
89278
|
}
|
|
89278
|
-
var
|
|
89279
|
+
var ame = class extends Error {
|
|
89279
89280
|
/**
|
|
89280
89281
|
* Creates a Valibot error with useful information.
|
|
89281
89282
|
*
|
|
@@ -89446,10 +89447,10 @@ function $O(e) {
|
|
|
89446
89447
|
function _a(e, t, r) {
|
|
89447
89448
|
const n = e._run(
|
|
89448
89449
|
{ typed: !1, value: t },
|
|
89449
|
-
|
|
89450
|
+
ome(r)
|
|
89450
89451
|
);
|
|
89451
89452
|
if (n.issues)
|
|
89452
|
-
throw new
|
|
89453
|
+
throw new ame(n.issues);
|
|
89453
89454
|
return n.value;
|
|
89454
89455
|
}
|
|
89455
89456
|
function Nf(...e) {
|
|
@@ -89469,28 +89470,28 @@ function Nf(...e) {
|
|
|
89469
89470
|
}
|
|
89470
89471
|
};
|
|
89471
89472
|
}
|
|
89472
|
-
const dv = Nf(yy(), hy(), gy(0), py(4294967295)),
|
|
89473
|
-
wif:
|
|
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)), nb = Nf(my(Uint8Array), PE(32)), ume = Nf(my(Uint8Array), PE(33)), lme = fv({
|
|
89474
|
+
wif: cme,
|
|
89474
89475
|
bip32: fv({
|
|
89475
89476
|
public: dv,
|
|
89476
89477
|
private: dv
|
|
89477
89478
|
})
|
|
89478
|
-
}),
|
|
89479
|
-
function
|
|
89479
|
+
}), fme = Nf($O(), SO(/^(m\/)?(\d+'?\/)*\d+'?$/));
|
|
89480
|
+
function dme(e, t, r) {
|
|
89480
89481
|
if (t.length !== 32)
|
|
89481
89482
|
throw new TypeError("Invalid privateKey length");
|
|
89482
89483
|
var n = new Uint8Array(34), o = new DataView(n.buffer);
|
|
89483
89484
|
return o.setUint8(0, e), n.set(t, 1), n[33] = 1, n;
|
|
89484
89485
|
}
|
|
89485
|
-
function
|
|
89486
|
-
return Gl.encode(
|
|
89486
|
+
function hme(e) {
|
|
89487
|
+
return Gl.encode(dme(e.version, e.privateKey));
|
|
89487
89488
|
}
|
|
89488
|
-
const x6 =
|
|
89489
|
+
const x6 = nme(rn), A6 = {
|
|
89489
89490
|
encode: (e) => x6.encode(e),
|
|
89490
89491
|
decode: (e) => x6.decode(e)
|
|
89491
89492
|
};
|
|
89492
|
-
function
|
|
89493
|
-
|
|
89493
|
+
function pme(e) {
|
|
89494
|
+
Wge(e);
|
|
89494
89495
|
const t = {
|
|
89495
89496
|
messagePrefix: `Bitcoin Signed Message:
|
|
89496
89497
|
`,
|
|
@@ -89548,7 +89549,7 @@ function mme(e) {
|
|
|
89548
89549
|
}
|
|
89549
89550
|
class i extends o {
|
|
89550
89551
|
constructor(g, y, m, w, v = 0, x = 0, E = 0) {
|
|
89551
|
-
super(g, y), Te(this, "chainCode"), Te(this, "network"), Te(this, "__DEPTH"), Te(this, "__INDEX"), Te(this, "__PARENT_FINGERPRINT"), this.chainCode = m, this.network = w, this.__DEPTH = v, this.__INDEX = x, this.__PARENT_FINGERPRINT = E, _a(
|
|
89552
|
+
super(g, y), Te(this, "chainCode"), Te(this, "network"), Te(this, "__DEPTH"), Te(this, "__INDEX"), Te(this, "__PARENT_FINGERPRINT"), this.chainCode = m, this.network = w, this.__DEPTH = v, this.__INDEX = x, this.__PARENT_FINGERPRINT = E, _a(lme, w);
|
|
89552
89553
|
}
|
|
89553
89554
|
get depth() {
|
|
89554
89555
|
return this.__DEPTH;
|
|
@@ -89560,7 +89561,7 @@ function mme(e) {
|
|
|
89560
89561
|
return this.__PARENT_FINGERPRINT;
|
|
89561
89562
|
}
|
|
89562
89563
|
get identifier() {
|
|
89563
|
-
return
|
|
89564
|
+
return Zge(this.publicKey);
|
|
89564
89565
|
}
|
|
89565
89566
|
get fingerprint() {
|
|
89566
89567
|
return this.identifier.slice(0, 4);
|
|
@@ -89583,7 +89584,7 @@ function mme(e) {
|
|
|
89583
89584
|
toWIF() {
|
|
89584
89585
|
if (!this.privateKey)
|
|
89585
89586
|
throw new TypeError("Missing private key");
|
|
89586
|
-
return
|
|
89587
|
+
return hme({
|
|
89587
89588
|
version: this.network.wif,
|
|
89588
89589
|
privateKey: this.privateKey,
|
|
89589
89590
|
compressed: !0
|
|
@@ -89617,12 +89618,12 @@ function mme(e) {
|
|
|
89617
89618
|
return E;
|
|
89618
89619
|
}
|
|
89619
89620
|
deriveHardened(g) {
|
|
89620
|
-
if (typeof _a(
|
|
89621
|
+
if (typeof _a(sme, g) == "number")
|
|
89621
89622
|
return this.derive(g + r);
|
|
89622
89623
|
throw new TypeError("Expected UInt31, got " + g);
|
|
89623
89624
|
}
|
|
89624
89625
|
derivePath(g) {
|
|
89625
|
-
_a(
|
|
89626
|
+
_a(fme, g);
|
|
89626
89627
|
let y = g.split("/");
|
|
89627
89628
|
if (y[0] === "m") {
|
|
89628
89629
|
if (this.parentFingerprint)
|
|
@@ -89704,7 +89705,7 @@ function mme(e) {
|
|
|
89704
89705
|
return u(h, g, y);
|
|
89705
89706
|
}
|
|
89706
89707
|
function u(h, g, y, m, w, v) {
|
|
89707
|
-
if (_a(
|
|
89708
|
+
if (_a(ume, h), _a(nb, g), y = y || t, !e.isPoint(h))
|
|
89708
89709
|
throw new TypeError("Point is not on the curve");
|
|
89709
89710
|
return new i(void 0, h, g, y, m, w, v);
|
|
89710
89711
|
}
|
|
@@ -89724,9 +89725,9 @@ function mme(e) {
|
|
|
89724
89725
|
fromPrivateKey: s
|
|
89725
89726
|
};
|
|
89726
89727
|
}
|
|
89727
|
-
const
|
|
89728
|
+
const gme = "text/plain", mme = pme(bE);
|
|
89728
89729
|
jS(bE);
|
|
89729
|
-
const
|
|
89730
|
+
const yme = async ({
|
|
89730
89731
|
contentBase64: e,
|
|
89731
89732
|
mimeType: t,
|
|
89732
89733
|
ordinalAddress: r,
|
|
@@ -89735,7 +89736,7 @@ const wme = async ({
|
|
|
89735
89736
|
signPsbt: i
|
|
89736
89737
|
}) => {
|
|
89737
89738
|
try {
|
|
89738
|
-
const a = await
|
|
89739
|
+
const a = await vme(), s = Buffer.from(a).toString("hex"), c = await bme({
|
|
89739
89740
|
contentBase64: e,
|
|
89740
89741
|
mimeType: t,
|
|
89741
89742
|
paymentAddress: n,
|
|
@@ -89754,7 +89755,7 @@ const wme = async ({
|
|
|
89754
89755
|
if (!f) throw new Error("sign psbt failed");
|
|
89755
89756
|
const h = vr.fromHex((f == null ? void 0 : f.signedPsbtHex) || "").extractTransaction(), g = await TE(h.toHex(), Rt);
|
|
89756
89757
|
if (!g) throw new Error("commit tx failed");
|
|
89757
|
-
return await
|
|
89758
|
+
return await wme({
|
|
89758
89759
|
contentBase64: e,
|
|
89759
89760
|
mimeType: t,
|
|
89760
89761
|
ordinalAddress: r,
|
|
@@ -89764,7 +89765,7 @@ const wme = async ({
|
|
|
89764
89765
|
} catch (a) {
|
|
89765
89766
|
throw a;
|
|
89766
89767
|
}
|
|
89767
|
-
},
|
|
89768
|
+
}, bme = async ({
|
|
89768
89769
|
contentBase64: e,
|
|
89769
89770
|
mimeType: t,
|
|
89770
89771
|
paymentAddress: r,
|
|
@@ -89775,16 +89776,16 @@ const wme = async ({
|
|
|
89775
89776
|
const i = Buffer.from(e).length;
|
|
89776
89777
|
if (i > 39e4)
|
|
89777
89778
|
throw new Error("Content size is too large, must be less than 390kb");
|
|
89778
|
-
const { fastestFee: a } = await
|
|
89779
|
+
const { fastestFee: a } = await _me(Rt), s = R$(String(o), !0), c = new vr({
|
|
89779
89780
|
network: Yo
|
|
89780
|
-
}), { inscriberAddress: l } =
|
|
89781
|
+
}), { inscriberAddress: l } = Eme(
|
|
89781
89782
|
s,
|
|
89782
89783
|
e,
|
|
89783
89784
|
t
|
|
89784
89785
|
), u = 5 * 34, f = Math.floor(u * a), h = Math.floor(i * a / 3) + 1e3 + 546, g = Math.floor(f + h), y = (await $E(
|
|
89785
89786
|
r,
|
|
89786
89787
|
Rt
|
|
89787
|
-
)).filter((S) => S.value > 3e3).sort((S, O) => O.value - S.value), m =
|
|
89788
|
+
)).filter((S) => S.value > 3e3).sort((S, O) => O.value - S.value), m = yge(y);
|
|
89788
89789
|
if (m === 0)
|
|
89789
89790
|
throw new Error("insufficient funds");
|
|
89790
89791
|
if (m < g)
|
|
@@ -89793,7 +89794,7 @@ const wme = async ({
|
|
|
89793
89794
|
const v = await p3(r);
|
|
89794
89795
|
let x = 0;
|
|
89795
89796
|
for await (const S of y) {
|
|
89796
|
-
const O =
|
|
89797
|
+
const O = bge(r, Rt);
|
|
89797
89798
|
if (console.log({ paymentAddressType: O }), c.addInput({
|
|
89798
89799
|
hash: S.txid,
|
|
89799
89800
|
index: S.vout,
|
|
@@ -89821,7 +89822,7 @@ const wme = async ({
|
|
|
89821
89822
|
} catch (i) {
|
|
89822
89823
|
throw i;
|
|
89823
89824
|
}
|
|
89824
|
-
},
|
|
89825
|
+
}, wme = async ({
|
|
89825
89826
|
contentBase64: e,
|
|
89826
89827
|
mimeType: t,
|
|
89827
89828
|
ordinalAddress: r,
|
|
@@ -89831,9 +89832,9 @@ const wme = async ({
|
|
|
89831
89832
|
}) => {
|
|
89832
89833
|
try {
|
|
89833
89834
|
const a = kie(o), s = R$(o, !0), c = TO(s, e, t), l = mg.encodeScript(c), [u, f] = mg.getPubKey(s, { target: l });
|
|
89834
|
-
if (!await
|
|
89835
|
+
if (!await Ame(String(n)))
|
|
89835
89836
|
throw new Error("ERROR WAITING FOR COMMIT TX");
|
|
89836
|
-
const h = await
|
|
89837
|
+
const h = await Sme(n, 0);
|
|
89837
89838
|
if (h === 0 || !h)
|
|
89838
89839
|
throw new Error("ERROR GETTING FIRST INPUT VALUE");
|
|
89839
89840
|
const g = gi.create({
|
|
@@ -89859,14 +89860,14 @@ const wme = async ({
|
|
|
89859
89860
|
throw a;
|
|
89860
89861
|
}
|
|
89861
89862
|
};
|
|
89862
|
-
async function
|
|
89863
|
-
const e = crypto.getRandomValues(new Uint8Array(32)), t =
|
|
89863
|
+
async function vme() {
|
|
89864
|
+
const e = crypto.getRandomValues(new Uint8Array(32)), t = Kge(Buffer.from(e)), r = await Dge(t), n = mme.fromSeed(r);
|
|
89864
89865
|
return n == null ? void 0 : n.derivePath("m/44'/0'/0'/0/0").privateKey;
|
|
89865
89866
|
}
|
|
89866
89867
|
const TO = (e, t, r) => {
|
|
89867
89868
|
const n = new TextEncoder(), o = n.encode("ord");
|
|
89868
89869
|
let i;
|
|
89869
|
-
if (r ===
|
|
89870
|
+
if (r === gme) {
|
|
89870
89871
|
const s = Buffer.from(t, "base64").toString("utf-8");
|
|
89871
89872
|
i = Buffer.from(s, "utf-8");
|
|
89872
89873
|
} else
|
|
@@ -89886,7 +89887,7 @@ const TO = (e, t, r) => {
|
|
|
89886
89887
|
...a.map((s) => s),
|
|
89887
89888
|
"OP_ENDIF"
|
|
89888
89889
|
];
|
|
89889
|
-
},
|
|
89890
|
+
}, Eme = (e, t, r) => {
|
|
89890
89891
|
const n = TO(e, t, r), o = mg.encodeScript(n), [i] = mg.getPubKey(e, { target: o });
|
|
89891
89892
|
return {
|
|
89892
89893
|
inscriberAddress: BI.p2tr.fromPubKey(i),
|
|
@@ -89894,25 +89895,25 @@ const TO = (e, t, r) => {
|
|
|
89894
89895
|
tapleaf: o
|
|
89895
89896
|
};
|
|
89896
89897
|
};
|
|
89897
|
-
async function
|
|
89898
|
+
async function kme(e, t = Rt) {
|
|
89898
89899
|
try {
|
|
89899
89900
|
return await rr.get(`${Zh(t)}/api/tx/${e}`).then((r) => r.data);
|
|
89900
89901
|
} catch (r) {
|
|
89901
89902
|
throw r;
|
|
89902
89903
|
}
|
|
89903
89904
|
}
|
|
89904
|
-
async function
|
|
89905
|
+
async function xme(e, t = Rt) {
|
|
89905
89906
|
try {
|
|
89906
89907
|
return await rr.get(`${Zh(t)}/api/tx/${e}/raw`).then((r) => r.data);
|
|
89907
89908
|
} catch (r) {
|
|
89908
89909
|
throw r;
|
|
89909
89910
|
}
|
|
89910
89911
|
}
|
|
89911
|
-
async function
|
|
89912
|
+
async function Ame(e) {
|
|
89912
89913
|
const t = Date.now();
|
|
89913
89914
|
for (; ; )
|
|
89914
89915
|
try {
|
|
89915
|
-
if (await
|
|
89916
|
+
if (await xme(e))
|
|
89916
89917
|
return console.log("Transaction found in mempool:", e), !0;
|
|
89917
89918
|
if (Date.now() - t > 6e4)
|
|
89918
89919
|
return !1;
|
|
@@ -89923,16 +89924,16 @@ async function Sme(e) {
|
|
|
89923
89924
|
await new Promise((r) => setTimeout(r, 5e3));
|
|
89924
89925
|
}
|
|
89925
89926
|
}
|
|
89926
|
-
const
|
|
89927
|
+
const _me = async (e) => await rr.get(`${Zh(e)}/api/v1/fees/recommended`, {
|
|
89927
89928
|
headers: {
|
|
89928
89929
|
"Content-Type": "application/json"
|
|
89929
89930
|
}
|
|
89930
89931
|
}).then((t) => t.data);
|
|
89931
|
-
async function
|
|
89932
|
+
async function Sme(e, t) {
|
|
89932
89933
|
const r = Date.now();
|
|
89933
89934
|
for (; ; )
|
|
89934
89935
|
try {
|
|
89935
|
-
const n = await
|
|
89936
|
+
const n = await kme(e);
|
|
89936
89937
|
if (n && n.vout && n.vout.length > 0)
|
|
89937
89938
|
return Math.floor(n.vout[t].value);
|
|
89938
89939
|
if (Date.now() - r > 6e4)
|
|
@@ -89946,7 +89947,7 @@ async function Tme(e, t) {
|
|
|
89946
89947
|
}
|
|
89947
89948
|
const hv = new Error(
|
|
89948
89949
|
"The connected wallet doesn't support this method..."
|
|
89949
|
-
),
|
|
89950
|
+
), $me = new Error("Wallet is not installed");
|
|
89950
89951
|
class cs {
|
|
89951
89952
|
constructor(t, r, n) {
|
|
89952
89953
|
Te(this, "$store"), Te(this, "$network"), this.parent = r, this.config = n, this.$store = t.$store, this.$network = t.$network, this.initialize();
|
|
@@ -89978,7 +89979,7 @@ class cs {
|
|
|
89978
89979
|
return r.startsWith("02") || (console.log("extracting tx..."), r = vr.fromHex(r).extractTransaction().toHex()), await TE(r, this.$network.get());
|
|
89979
89980
|
}
|
|
89980
89981
|
async inscribe(t, r) {
|
|
89981
|
-
return await
|
|
89982
|
+
return await yme({
|
|
89982
89983
|
contentBase64: t,
|
|
89983
89984
|
mimeType: r,
|
|
89984
89985
|
ordinalAddress: this.$store.get().address,
|
|
@@ -89988,7 +89989,7 @@ class cs {
|
|
|
89988
89989
|
});
|
|
89989
89990
|
}
|
|
89990
89991
|
}
|
|
89991
|
-
class
|
|
89992
|
+
class Tme extends cs {
|
|
89992
89993
|
constructor() {
|
|
89993
89994
|
super(...arguments), Te(this, "observer");
|
|
89994
89995
|
}
|
|
@@ -90108,6 +90109,7 @@ class Pme extends cs {
|
|
|
90108
90109
|
await ((r = this.library) == null ? void 0 : r.switchChain(n)), this.$network.set(t), await this.getBalance();
|
|
90109
90110
|
}
|
|
90110
90111
|
}
|
|
90112
|
+
const Ime = (e) => /^(?:[A-Za-z0-9+\/]{4})*?(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e), Pme = (e) => /^[a-fA-F0-9]+$/.test(e);
|
|
90111
90113
|
function Ome() {
|
|
90112
90114
|
typeof window < "u" && typeof localStorage < "u" && setTimeout(() => {
|
|
90113
90115
|
const e = document.createTextNode(" ");
|
|
@@ -91686,7 +91688,7 @@ class Mye extends cs {
|
|
|
91686
91688
|
onFinish: (E) => {
|
|
91687
91689
|
E.txId ? y = E.txId : E.psbtBase64 && (v = vr.fromBase64(String(E.psbtBase64), {
|
|
91688
91690
|
network: wn(this.network)
|
|
91689
|
-
}), m = v.toHex(), w = v.toBase64());
|
|
91691
|
+
}), o && v.finalizeAllInputs(), m = v.toHex(), w = v.toBase64());
|
|
91690
91692
|
},
|
|
91691
91693
|
onCancel: () => {
|
|
91692
91694
|
throw console.error("Request canceled"), new Error("User canceled the request");
|
|
@@ -91749,7 +91751,7 @@ class Fye extends cs {
|
|
|
91749
91751
|
(t = this.observer) == null || t.disconnect(), this.removeLibraryListeners();
|
|
91750
91752
|
}
|
|
91751
91753
|
async connect() {
|
|
91752
|
-
if (!this.library) throw
|
|
91754
|
+
if (!this.library) throw $me;
|
|
91753
91755
|
const t = await this.library.requestAccounts();
|
|
91754
91756
|
if (!t) throw new Error("No accounts found");
|
|
91755
91757
|
const r = await this.library.getPublicKey();
|
|
@@ -93125,7 +93127,7 @@ class T1e {
|
|
|
93125
93127
|
[dc]: new k1e(t, this, r),
|
|
93126
93128
|
[Jc]: new Gye(t, this, r),
|
|
93127
93129
|
[Qc]: new $1e(t, this, r),
|
|
93128
|
-
[fc]: new
|
|
93130
|
+
[fc]: new Tme(t, this, r),
|
|
93129
93131
|
[Ba]: new Mye(t, this, r),
|
|
93130
93132
|
[ru]: new Fye(t, this, r)
|
|
93131
93133
|
}, this.$network.subscribe(this.watchNetworkChange.bind(this)), z8(
|
|
@@ -93235,9 +93237,9 @@ class T1e {
|
|
|
93235
93237
|
var o;
|
|
93236
93238
|
let i, a;
|
|
93237
93239
|
if (!t) throw new Error("No PSBT provided");
|
|
93238
|
-
if (
|
|
93240
|
+
if (Pme(t))
|
|
93239
93241
|
a = vr.fromHex(t).toBase64(), i = t;
|
|
93240
|
-
else if (
|
|
93242
|
+
else if (Ime(t))
|
|
93241
93243
|
a = t, i = vr.fromBase64(t).toHex();
|
|
93242
93244
|
else
|
|
93243
93245
|
throw new Error("Invalid PSBT format");
|
|
@@ -94848,7 +94850,7 @@ export {
|
|
|
94848
94850
|
t_ as UNISAT_TESTNET4,
|
|
94849
94851
|
dw as UNSUPPORTED_PROVIDER_METHOD_ERROR,
|
|
94850
94852
|
M1e as WALLETS,
|
|
94851
|
-
|
|
94853
|
+
XX as WALLET_NOT_INSTALLED_ERROR,
|
|
94852
94854
|
pl as WIZZ,
|
|
94853
94855
|
R0 as WIZZ_MAINNET,
|
|
94854
94856
|
s_ as WIZZ_SIGNET,
|