@gardenfi/core 3.0.5 → 3.0.6
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/{ccip-CDLid_2f.cjs → ccip-B3rC4a4B.cjs} +1 -1
- package/dist/{ccip-DJsqgvYa.js → ccip-CEYa5LHY.js} +1 -1
- package/dist/{index-Dr2UWku_.cjs → index-D8ji0NGd.cjs} +33 -33
- package/dist/{index-DnqAlC96.js → index-i5Tm5x54.js} +741 -745
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/src/lib/utils.d.ts +1 -2
- package/package.json +2 -2
|
@@ -5370,7 +5370,7 @@ async function cu(t, e) {
|
|
|
5370
5370
|
});
|
|
5371
5371
|
return ne === "0x" ? { data: void 0 } : { data: ne };
|
|
5372
5372
|
} catch (te) {
|
|
5373
|
-
const G = j8(te), { offchainLookup: I, offchainLookupSignature: j } = await import("./ccip-
|
|
5373
|
+
const G = j8(te), { offchainLookup: I, offchainLookupSignature: j } = await import("./ccip-CEYa5LHY.js");
|
|
5374
5374
|
if (t.ccipRead !== !1 && (G == null ? void 0 : G.slice(0, 10)) === j && g)
|
|
5375
5375
|
return { data: await I(t, { data: G, to: g }) };
|
|
5376
5376
|
throw M && (G == null ? void 0 : G.slice(0, 10)) === "0x101bb98d" ? new wE({ factory: p }) : xg(te, {
|
|
@@ -12384,11 +12384,11 @@ const hf = {
|
|
|
12384
12384
|
moduleName: "AtomicSwap"
|
|
12385
12385
|
},
|
|
12386
12386
|
[Qe.LOCALNET]: { packageId: "", moduleName: "" }
|
|
12387
|
-
},
|
|
12387
|
+
}, eC = {
|
|
12388
12388
|
asset: Ct.from(v6.base.cBBTC)
|
|
12389
12389
|
};
|
|
12390
12390
|
var Ri = /* @__PURE__ */ ((t) => (t.SLOW = "SLOW", t.MEDIUM = "MEDIUM", t.FAST = "FAST", t))(Ri || {}), rn = /* @__PURE__ */ ((t) => (t.Mainnet = "Mainnet", t.Testnet = "Testnet", t.Regtest = "Regtest", t))(rn || {}), gc = /* @__PURE__ */ ((t) => (t.ALL = "ALL", t.IN = "IN", t.OUT = "OUT", t))(gc || {});
|
|
12391
|
-
const
|
|
12391
|
+
const Sk = {
|
|
12392
12392
|
SLOW: "economyFee",
|
|
12393
12393
|
MEDIUM: "hourFee",
|
|
12394
12394
|
FAST: "fastestFee"
|
|
@@ -12400,30 +12400,30 @@ function N0(t) {
|
|
|
12400
12400
|
...t
|
|
12401
12401
|
}, network: e };
|
|
12402
12402
|
}
|
|
12403
|
-
function
|
|
12403
|
+
function Ak(t) {
|
|
12404
12404
|
return typeof t == "string" && (t = Buffer.from(t, "hex")), t.length === 32 ? t : t.subarray(1, 33);
|
|
12405
12405
|
}
|
|
12406
12406
|
function U0(t, e) {
|
|
12407
12407
|
if (!t) throw new Error(e);
|
|
12408
12408
|
}
|
|
12409
|
-
function
|
|
12409
|
+
function xk(t) {
|
|
12410
12410
|
return Buffer.concat([
|
|
12411
12411
|
Uint8Array.from([192]),
|
|
12412
|
-
|
|
12412
|
+
kk(t)
|
|
12413
12413
|
]);
|
|
12414
12414
|
}
|
|
12415
|
-
function
|
|
12415
|
+
function kk(t) {
|
|
12416
12416
|
const e = Op.encodingLength(t.length), r = Buffer.allocUnsafe(e);
|
|
12417
12417
|
return Op.encode(t.length, r), Buffer.concat([r, t]);
|
|
12418
12418
|
}
|
|
12419
|
-
function
|
|
12419
|
+
function _k(t, e) {
|
|
12420
12420
|
if (t.compare(e) > 0) {
|
|
12421
12421
|
const r = t;
|
|
12422
12422
|
t = e, e = r;
|
|
12423
12423
|
}
|
|
12424
12424
|
return [t, e];
|
|
12425
12425
|
}
|
|
12426
|
-
const Ve = (t) => t.length === 64 ? t : t.slice(2),
|
|
12426
|
+
const Ve = (t) => t.length === 64 ? t : t.slice(2), Tk = (t) => {
|
|
12427
12427
|
if (!t) return !1;
|
|
12428
12428
|
try {
|
|
12429
12429
|
const e = Buffer.from(t, "hex");
|
|
@@ -12431,8 +12431,8 @@ const Ve = (t) => t.length === 64 ? t : t.slice(2), Ik = (t) => {
|
|
|
12431
12431
|
} catch {
|
|
12432
12432
|
return !1;
|
|
12433
12433
|
}
|
|
12434
|
-
},
|
|
12435
|
-
function
|
|
12434
|
+
}, tC = (t, e, r, n) => t + ":" + e.toLowerCase() + "::" + r + ":" + n.toLowerCase();
|
|
12435
|
+
function rC(t, e) {
|
|
12436
12436
|
if (!t) return !1;
|
|
12437
12437
|
const r = e === Ip.MAINNET ? Se.networks.bitcoin : e === Ip.TESTNET ? Se.networks.testnet : Se.networks.regtest;
|
|
12438
12438
|
if (!r) return !1;
|
|
@@ -12449,7 +12449,7 @@ function ho(t, e) {
|
|
|
12449
12449
|
r.push(t);
|
|
12450
12450
|
return r;
|
|
12451
12451
|
}
|
|
12452
|
-
const
|
|
12452
|
+
const Ik = (t) => {
|
|
12453
12453
|
switch (t) {
|
|
12454
12454
|
case Qe.MAINNET:
|
|
12455
12455
|
return rn.Mainnet;
|
|
@@ -12460,7 +12460,7 @@ const Pk = (t) => {
|
|
|
12460
12460
|
default:
|
|
12461
12461
|
throw new Error(`Invalid bitcoin network ${t}`);
|
|
12462
12462
|
}
|
|
12463
|
-
},
|
|
12463
|
+
}, Pk = (t) => {
|
|
12464
12464
|
switch (t) {
|
|
12465
12465
|
case Qe.MAINNET:
|
|
12466
12466
|
return Se.networks.bitcoin;
|
|
@@ -12471,14 +12471,14 @@ const Pk = (t) => {
|
|
|
12471
12471
|
default:
|
|
12472
12472
|
throw new Error(`Invalid bitcoin network ${t}`);
|
|
12473
12473
|
}
|
|
12474
|
-
},
|
|
12474
|
+
}, Ok = (t) => {
|
|
12475
12475
|
const e = t.toLowerCase().replace("0x", "");
|
|
12476
12476
|
return /^[0-9a-f]+$/.test(e);
|
|
12477
12477
|
}, M0 = (t) => {
|
|
12478
12478
|
if (typeof t == "object" && "r" in t && "s" in t)
|
|
12479
12479
|
return re([t.r.toString(), t.s.toString()]);
|
|
12480
12480
|
if (Array.isArray(t)) {
|
|
12481
|
-
const e = t.map((r) => typeof r == "string" && r.startsWith("0x") &&
|
|
12481
|
+
const e = t.map((r) => typeof r == "string" && r.startsWith("0x") && Ok(r) ? BigInt(r).toString() : r);
|
|
12482
12482
|
return re(e);
|
|
12483
12483
|
}
|
|
12484
12484
|
return B("Invalid signature format");
|
|
@@ -12522,11 +12522,7 @@ const Qa = async (t, e) => {
|
|
|
12522
12522
|
return B("Invalid amount ", t);
|
|
12523
12523
|
const e = new Ll(t);
|
|
12524
12524
|
return !e.isInteger() || e.isNaN() || e.lt(0) || e.isLessThanOrEqualTo(0) ? B("Invalid amount ", t) : re(e);
|
|
12525
|
-
},
|
|
12526
|
-
fee: e.fee,
|
|
12527
|
-
address: e.address,
|
|
12528
|
-
asset: e.asset ?? Sk.asset
|
|
12529
|
-
})), $k = async (t, e) => {
|
|
12525
|
+
}, Bk = async (t, e) => {
|
|
12530
12526
|
const r = {
|
|
12531
12527
|
[Ze.evm]: { htlc: e.evm, name: "EVM" },
|
|
12532
12528
|
[Ze.solana]: { htlc: e.solana, name: "Solana" },
|
|
@@ -12545,7 +12541,7 @@ const Qa = async (t, e) => {
|
|
|
12545
12541
|
) : B(
|
|
12546
12542
|
`Unsupported blockchain type for swap initiation: ${t}`
|
|
12547
12543
|
);
|
|
12548
|
-
},
|
|
12544
|
+
}, Ck = ["0x90c06174", "0xee1b963b"], $k = (t) => {
|
|
12549
12545
|
if (!t) return "";
|
|
12550
12546
|
if (typeof t == "string") return t;
|
|
12551
12547
|
if (t instanceof Error)
|
|
@@ -12567,11 +12563,11 @@ const Qa = async (t, e) => {
|
|
|
12567
12563
|
}
|
|
12568
12564
|
return String(t);
|
|
12569
12565
|
}, Wh = (t) => {
|
|
12570
|
-
const e =
|
|
12571
|
-
return
|
|
12566
|
+
const e = $k(t).toLowerCase();
|
|
12567
|
+
return Ck.some(
|
|
12572
12568
|
(r) => e.includes(r.toLowerCase())
|
|
12573
12569
|
);
|
|
12574
|
-
},
|
|
12570
|
+
}, Rk = (t) => t.toLowerCase().includes("not supported for initiations"), Q1 = async ({
|
|
12575
12571
|
attempt: t,
|
|
12576
12572
|
wallet: e,
|
|
12577
12573
|
maxAttempts: r = 1,
|
|
@@ -12580,7 +12576,7 @@ const Qa = async (t, e) => {
|
|
|
12580
12576
|
var s;
|
|
12581
12577
|
for (let i = 0; i < r; i++) {
|
|
12582
12578
|
const o = await t();
|
|
12583
|
-
if (o.error &&
|
|
12579
|
+
if (o.error && Rk(o.error))
|
|
12584
12580
|
break;
|
|
12585
12581
|
if (o.ok) {
|
|
12586
12582
|
const a = await Li(
|
|
@@ -12599,13 +12595,13 @@ const Qa = async (t, e) => {
|
|
|
12599
12595
|
i < r - 1 && await Po(n * 2 ** i);
|
|
12600
12596
|
}
|
|
12601
12597
|
return null;
|
|
12602
|
-
},
|
|
12598
|
+
}, Nk = Buffer.from(
|
|
12603
12599
|
"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
|
12604
12600
|
"hex"
|
|
12605
|
-
),
|
|
12601
|
+
), Uk = Buffer.from(
|
|
12606
12602
|
"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
|
|
12607
12603
|
"hex"
|
|
12608
|
-
),
|
|
12604
|
+
), Mk = Buffer.concat([Nk, Uk]), Fk = Buffer.from(
|
|
12609
12605
|
"0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
|
|
12610
12606
|
"hex"
|
|
12611
12607
|
), j0 = {
|
|
@@ -12613,14 +12609,14 @@ const Qa = async (t, e) => {
|
|
|
12613
12609
|
};
|
|
12614
12610
|
function L0() {
|
|
12615
12611
|
const t = U6.sha256(Buffer.from("GardenHTLC", "utf-8")), e = pr.pointMultiply(
|
|
12616
|
-
Buffer.concat([Buffer.from("04", "hex"),
|
|
12612
|
+
Buffer.concat([Buffer.from("04", "hex"), Mk]),
|
|
12617
12613
|
t
|
|
12618
12614
|
);
|
|
12619
12615
|
if (!e)
|
|
12620
12616
|
throw new Error(j0.failedToCreateInternalPubkey);
|
|
12621
|
-
const r = pr.pointAdd(
|
|
12617
|
+
const r = pr.pointAdd(Fk, e);
|
|
12622
12618
|
if (!r) throw new Error(j0.failedToCreateInternalPubkey);
|
|
12623
|
-
return
|
|
12619
|
+
return Ak(Buffer.from(r));
|
|
12624
12620
|
}
|
|
12625
12621
|
var an = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
12626
12622
|
function ew(t) {
|
|
@@ -12643,11 +12639,11 @@ function ew(t) {
|
|
|
12643
12639
|
}), r;
|
|
12644
12640
|
}
|
|
12645
12641
|
var je = {}, kt = {}, ai = {}, wu = {};
|
|
12646
|
-
wu.byteLength =
|
|
12647
|
-
wu.toByteArray =
|
|
12648
|
-
wu.fromByteArray =
|
|
12649
|
-
var Jr = [], ur = [],
|
|
12650
|
-
for (var yi = 0,
|
|
12642
|
+
wu.byteLength = Hk;
|
|
12643
|
+
wu.toByteArray = zk;
|
|
12644
|
+
wu.fromByteArray = qk;
|
|
12645
|
+
var Jr = [], ur = [], jk = typeof Uint8Array < "u" ? Uint8Array : Array, pf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
12646
|
+
for (var yi = 0, Lk = pf.length; yi < Lk; ++yi)
|
|
12651
12647
|
Jr[yi] = pf[yi], ur[pf.charCodeAt(yi)] = yi;
|
|
12652
12648
|
ur[45] = 62;
|
|
12653
12649
|
ur[95] = 63;
|
|
@@ -12660,30 +12656,30 @@ function tw(t) {
|
|
|
12660
12656
|
var n = r === e ? 0 : 4 - r % 4;
|
|
12661
12657
|
return [r, n];
|
|
12662
12658
|
}
|
|
12663
|
-
function
|
|
12659
|
+
function Hk(t) {
|
|
12664
12660
|
var e = tw(t), r = e[0], n = e[1];
|
|
12665
12661
|
return (r + n) * 3 / 4 - n;
|
|
12666
12662
|
}
|
|
12667
|
-
function
|
|
12663
|
+
function Dk(t, e, r) {
|
|
12668
12664
|
return (e + r) * 3 / 4 - r;
|
|
12669
12665
|
}
|
|
12670
|
-
function
|
|
12671
|
-
var e, r = tw(t), n = r[0], s = r[1], i = new
|
|
12666
|
+
function zk(t) {
|
|
12667
|
+
var e, r = tw(t), n = r[0], s = r[1], i = new jk(Dk(t, n, s)), o = 0, a = s > 0 ? n - 4 : n, c;
|
|
12672
12668
|
for (c = 0; c < a; c += 4)
|
|
12673
12669
|
e = ur[t.charCodeAt(c)] << 18 | ur[t.charCodeAt(c + 1)] << 12 | ur[t.charCodeAt(c + 2)] << 6 | ur[t.charCodeAt(c + 3)], i[o++] = e >> 16 & 255, i[o++] = e >> 8 & 255, i[o++] = e & 255;
|
|
12674
12670
|
return s === 2 && (e = ur[t.charCodeAt(c)] << 2 | ur[t.charCodeAt(c + 1)] >> 4, i[o++] = e & 255), s === 1 && (e = ur[t.charCodeAt(c)] << 10 | ur[t.charCodeAt(c + 1)] << 4 | ur[t.charCodeAt(c + 2)] >> 2, i[o++] = e >> 8 & 255, i[o++] = e & 255), i;
|
|
12675
12671
|
}
|
|
12676
|
-
function
|
|
12672
|
+
function Vk(t) {
|
|
12677
12673
|
return Jr[t >> 18 & 63] + Jr[t >> 12 & 63] + Jr[t >> 6 & 63] + Jr[t & 63];
|
|
12678
12674
|
}
|
|
12679
|
-
function
|
|
12675
|
+
function Gk(t, e, r) {
|
|
12680
12676
|
for (var n, s = [], i = e; i < r; i += 3)
|
|
12681
|
-
n = (t[i] << 16 & 16711680) + (t[i + 1] << 8 & 65280) + (t[i + 2] & 255), s.push(
|
|
12677
|
+
n = (t[i] << 16 & 16711680) + (t[i + 1] << 8 & 65280) + (t[i + 2] & 255), s.push(Vk(n));
|
|
12682
12678
|
return s.join("");
|
|
12683
12679
|
}
|
|
12684
|
-
function
|
|
12680
|
+
function qk(t) {
|
|
12685
12681
|
for (var e, r = t.length, n = r % 3, s = [], i = 16383, o = 0, a = r - n; o < a; o += i)
|
|
12686
|
-
s.push(
|
|
12682
|
+
s.push(Gk(t, o, o + i > a ? a : o + i));
|
|
12687
12683
|
return n === 1 ? (e = t[r - 1], s.push(
|
|
12688
12684
|
Jr[e >> 2] + Jr[e << 4 & 63] + "=="
|
|
12689
12685
|
)) : n === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
@@ -13697,7 +13693,7 @@ function rw(t) {
|
|
|
13697
13693
|
function Yh(t) {
|
|
13698
13694
|
return Us.Nil(t) ? "" : rw(t.constructor);
|
|
13699
13695
|
}
|
|
13700
|
-
function
|
|
13696
|
+
function Wk(t) {
|
|
13701
13697
|
return Us.Function(t) ? "" : Us.String(t) ? JSON.stringify(t) : t && Us.Object(t) ? "" : t;
|
|
13702
13698
|
}
|
|
13703
13699
|
function Xh(t, e) {
|
|
@@ -13707,7 +13703,7 @@ function Mc(t) {
|
|
|
13707
13703
|
return Us.Function(t) ? t.toJSON ? t.toJSON() : rw(t) : Us.Array(t) ? "Array" : t && Us.Object(t) ? "Object" : t !== void 0 ? t : "";
|
|
13708
13704
|
}
|
|
13709
13705
|
function nw(t, e, r) {
|
|
13710
|
-
var n =
|
|
13706
|
+
var n = Wk(e);
|
|
13711
13707
|
return "Expected " + Mc(t) + ", got" + (r !== "" ? " " + r : "") + (n !== "" ? " " + n : "");
|
|
13712
13708
|
}
|
|
13713
13709
|
function Nn(t, e, r) {
|
|
@@ -13715,19 +13711,19 @@ function Nn(t, e, r) {
|
|
|
13715
13711
|
}
|
|
13716
13712
|
Nn.prototype = Object.create(Error.prototype);
|
|
13717
13713
|
Nn.prototype.constructor = Nn;
|
|
13718
|
-
function
|
|
13714
|
+
function Kk(t, e, r, n, s) {
|
|
13719
13715
|
var i = '" of type ';
|
|
13720
13716
|
return e === "key" && (i = '" with key type '), nw('property "' + Mc(r) + i + Mc(t), n, s);
|
|
13721
13717
|
}
|
|
13722
13718
|
function Ni(t, e, r, n, s) {
|
|
13723
|
-
t ? (s = s || Yh(n), this.message =
|
|
13719
|
+
t ? (s = s || Yh(n), this.message = Kk(t, r, e, n, s)) : this.message = 'Unexpected property "' + e + '"', Xh(this, Nn), this.__label = r, this.__property = e, this.__type = t, this.__value = n, this.__valueTypeName = s;
|
|
13724
13720
|
}
|
|
13725
13721
|
Ni.prototype = Object.create(Error.prototype);
|
|
13726
13722
|
Ni.prototype.constructor = Nn;
|
|
13727
|
-
function
|
|
13723
|
+
function Zk(t, e) {
|
|
13728
13724
|
return new Nn(t, {}, e);
|
|
13729
13725
|
}
|
|
13730
|
-
function
|
|
13726
|
+
function Yk(t, e, r) {
|
|
13731
13727
|
return t instanceof Ni ? (e = e + "." + t.__property, t = new Ni(
|
|
13732
13728
|
t.__type,
|
|
13733
13729
|
e,
|
|
@@ -13745,12 +13741,12 @@ function Jk(t, e, r) {
|
|
|
13745
13741
|
var sw = {
|
|
13746
13742
|
TfTypeError: Nn,
|
|
13747
13743
|
TfPropertyTypeError: Ni,
|
|
13748
|
-
tfCustomError:
|
|
13749
|
-
tfSubError:
|
|
13744
|
+
tfCustomError: Zk,
|
|
13745
|
+
tfSubError: Yk,
|
|
13750
13746
|
tfJSON: Mc,
|
|
13751
13747
|
getValueTypeName: Yh
|
|
13752
13748
|
}, yf, D0;
|
|
13753
|
-
function
|
|
13749
|
+
function Xk() {
|
|
13754
13750
|
if (D0) return yf;
|
|
13755
13751
|
D0 = 1;
|
|
13756
13752
|
var t = Zh, e = sw;
|
|
@@ -13833,7 +13829,7 @@ function Qk() {
|
|
|
13833
13829
|
}).bind(null, x);
|
|
13834
13830
|
return yf = g, yf;
|
|
13835
13831
|
}
|
|
13836
|
-
var Ua = sw, pt = Zh, dn = Ua.tfJSON, iw = Ua.TfTypeError, ow = Ua.TfPropertyTypeError, po = Ua.tfSubError,
|
|
13832
|
+
var Ua = sw, pt = Zh, dn = Ua.tfJSON, iw = Ua.TfTypeError, ow = Ua.TfPropertyTypeError, po = Ua.tfSubError, Jk = Ua.getValueTypeName, kn = {
|
|
13837
13833
|
arrayOf: function(e, r) {
|
|
13838
13834
|
e = Zr(e), r = r || {};
|
|
13839
13835
|
function n(s, i) {
|
|
@@ -13942,7 +13938,7 @@ var Ua = sw, pt = Zh, dn = Ua.tfJSON, iw = Ua.TfTypeError, ow = Ua.TfPropertyTyp
|
|
|
13942
13938
|
},
|
|
13943
13939
|
quacksLike: function(e) {
|
|
13944
13940
|
function r(n) {
|
|
13945
|
-
return e ===
|
|
13941
|
+
return e === Jk(n);
|
|
13946
13942
|
}
|
|
13947
13943
|
return r.toJSON = function() {
|
|
13948
13944
|
return e;
|
|
@@ -13997,17 +13993,17 @@ for (var fs in pt)
|
|
|
13997
13993
|
$t[fs] = pt[fs];
|
|
13998
13994
|
for (fs in kn)
|
|
13999
13995
|
$t[fs] = kn[fs];
|
|
14000
|
-
var z0 =
|
|
13996
|
+
var z0 = Xk();
|
|
14001
13997
|
for (fs in z0)
|
|
14002
13998
|
$t[fs] = z0[fs];
|
|
14003
13999
|
$t.compile = Zr;
|
|
14004
14000
|
$t.TfTypeError = iw;
|
|
14005
14001
|
$t.TfPropertyTypeError = ow;
|
|
14006
|
-
var
|
|
14002
|
+
var Qk = $t;
|
|
14007
14003
|
(function(t) {
|
|
14008
14004
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.oneOf = t.Null = t.BufferN = t.Function = t.UInt32 = t.UInt8 = t.tuple = t.maybe = t.Hex = t.Buffer = t.String = t.Boolean = t.Array = t.Number = t.Hash256bit = t.Hash160bit = t.Buffer256bit = t.isTaptree = t.isTapleaf = t.TAPLEAF_VERSION_MASK = t.Satoshi = t.isPoint = t.stacksEqual = t.typeforce = void 0;
|
|
14009
14005
|
const e = ai;
|
|
14010
|
-
t.typeforce =
|
|
14006
|
+
t.typeforce = Qk;
|
|
14011
14007
|
const r = e.Buffer.alloc(32, 0), n = e.Buffer.from(
|
|
14012
14008
|
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
|
14013
14009
|
"hex"
|
|
@@ -14064,19 +14060,19 @@ function fw(t, e, r) {
|
|
|
14064
14060
|
return cw(e, 9007199254740991), t.writeInt32LE(e & -1, r), t.writeUInt32LE(Math.floor(e / 4294967296), r + 4), r + 8;
|
|
14065
14061
|
}
|
|
14066
14062
|
yt.writeUInt64LE = fw;
|
|
14067
|
-
function
|
|
14063
|
+
function e_(t) {
|
|
14068
14064
|
if (t.length < 1) return t;
|
|
14069
14065
|
let e = t.length - 1, r = 0;
|
|
14070
14066
|
for (let n = 0; n < t.length / 2; n++)
|
|
14071
14067
|
r = t[n], t[n] = t[e], t[e] = r, e--;
|
|
14072
14068
|
return t;
|
|
14073
14069
|
}
|
|
14074
|
-
yt.reverseBuffer =
|
|
14075
|
-
function
|
|
14070
|
+
yt.reverseBuffer = e_;
|
|
14071
|
+
function t_(t) {
|
|
14076
14072
|
const e = Buffer.allocUnsafe(t.length);
|
|
14077
14073
|
return t.copy(e), e;
|
|
14078
14074
|
}
|
|
14079
|
-
yt.cloneBuffer =
|
|
14075
|
+
yt.cloneBuffer = t_;
|
|
14080
14076
|
class Jh {
|
|
14081
14077
|
static withCapacity(e) {
|
|
14082
14078
|
return new Jh(Buffer.alloc(e));
|
|
@@ -14117,7 +14113,7 @@ class Jh {
|
|
|
14117
14113
|
}
|
|
14118
14114
|
}
|
|
14119
14115
|
yt.BufferWriter = Jh;
|
|
14120
|
-
class
|
|
14116
|
+
class r_ {
|
|
14121
14117
|
constructor(e, r = 0) {
|
|
14122
14118
|
this.buffer = e, this.offset = r, aw(Ms.tuple(Ms.Buffer, Ms.UInt32), [e, r]);
|
|
14123
14119
|
}
|
|
@@ -14156,9 +14152,9 @@ class s_ {
|
|
|
14156
14152
|
return r;
|
|
14157
14153
|
}
|
|
14158
14154
|
}
|
|
14159
|
-
yt.BufferReader =
|
|
14155
|
+
yt.BufferReader = r_;
|
|
14160
14156
|
var gs = {};
|
|
14161
|
-
const
|
|
14157
|
+
const n_ = /* @__PURE__ */ ew(QS);
|
|
14162
14158
|
var qi = {}, Lt = {}, Nt = {}, Qh = {}, vu = {};
|
|
14163
14159
|
Object.defineProperty(vu, "__esModule", { value: !0 });
|
|
14164
14160
|
vu.crypto = void 0;
|
|
@@ -14334,8 +14330,8 @@ vu.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
|
|
|
14334
14330
|
Object.defineProperty(Nt, "__esModule", { value: !0 });
|
|
14335
14331
|
Nt.SHA512_IV = Nt.SHA384_IV = Nt.SHA224_IV = Nt.SHA256_IV = Nt.HashMD = void 0;
|
|
14336
14332
|
Nt.setBigUint64 = lw;
|
|
14337
|
-
Nt.Chi =
|
|
14338
|
-
Nt.Maj =
|
|
14333
|
+
Nt.Chi = s_;
|
|
14334
|
+
Nt.Maj = i_;
|
|
14339
14335
|
const Hr = Qh;
|
|
14340
14336
|
function lw(t, e, r, n) {
|
|
14341
14337
|
if (typeof t.setBigUint64 == "function")
|
|
@@ -14343,13 +14339,13 @@ function lw(t, e, r, n) {
|
|
|
14343
14339
|
const s = BigInt(32), i = BigInt(4294967295), o = Number(r >> s & i), a = Number(r & i), c = n ? 4 : 0, u = n ? 0 : 4;
|
|
14344
14340
|
t.setUint32(e + c, o, n), t.setUint32(e + u, a, n);
|
|
14345
14341
|
}
|
|
14346
|
-
function
|
|
14342
|
+
function s_(t, e, r) {
|
|
14347
14343
|
return t & e ^ ~t & r;
|
|
14348
14344
|
}
|
|
14349
|
-
function
|
|
14345
|
+
function i_(t, e, r) {
|
|
14350
14346
|
return t & e ^ t & r ^ e & r;
|
|
14351
14347
|
}
|
|
14352
|
-
class
|
|
14348
|
+
class o_ extends Hr.Hash {
|
|
14353
14349
|
constructor(e, r, n, s) {
|
|
14354
14350
|
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = r, this.padOffset = n, this.isLE = s, this.buffer = new Uint8Array(e), this.view = (0, Hr.createView)(this.buffer);
|
|
14355
14351
|
}
|
|
@@ -14400,7 +14396,7 @@ class c_ extends Hr.Hash {
|
|
|
14400
14396
|
return this._cloneInto();
|
|
14401
14397
|
}
|
|
14402
14398
|
}
|
|
14403
|
-
Nt.HashMD =
|
|
14399
|
+
Nt.HashMD = o_;
|
|
14404
14400
|
Nt.SHA256_IV = Uint32Array.from([
|
|
14405
14401
|
1779033703,
|
|
14406
14402
|
3144134277,
|
|
@@ -14500,7 +14496,7 @@ class dw extends Fs.HashMD {
|
|
|
14500
14496
|
}
|
|
14501
14497
|
Lt.SHA1 = dw;
|
|
14502
14498
|
Lt.sha1 = (0, mt.createHasher)(() => new dw());
|
|
14503
|
-
const
|
|
14499
|
+
const a_ = /* @__PURE__ */ Math.pow(2, 32), c_ = /* @__PURE__ */ Array.from({ length: 64 }, (t, e) => Math.floor(a_ * Math.abs(Math.sin(e + 1)))), ec = /* @__PURE__ */ gi.slice(0, 4), mf = /* @__PURE__ */ new Uint32Array(16);
|
|
14504
14500
|
class hw extends Fs.HashMD {
|
|
14505
14501
|
constructor() {
|
|
14506
14502
|
super(64, 16, 8, !0), this.A = ec[0] | 0, this.B = ec[1] | 0, this.C = ec[2] | 0, this.D = ec[3] | 0;
|
|
@@ -14518,7 +14514,7 @@ class hw extends Fs.HashMD {
|
|
|
14518
14514
|
let { A: n, B: s, C: i, D: o } = this;
|
|
14519
14515
|
for (let a = 0; a < 64; a++) {
|
|
14520
14516
|
let c, u, f;
|
|
14521
|
-
a < 16 ? (c = (0, Fs.Chi)(s, i, o), u = a, f = [7, 12, 17, 22]) : a < 32 ? (c = (0, Fs.Chi)(o, s, i), u = (5 * a + 1) % 16, f = [5, 9, 14, 20]) : a < 48 ? (c = s ^ i ^ o, u = (3 * a + 5) % 16, f = [4, 11, 16, 23]) : (c = i ^ (s | ~o), u = 7 * a % 16, f = [6, 10, 15, 21]), c = c + n +
|
|
14517
|
+
a < 16 ? (c = (0, Fs.Chi)(s, i, o), u = a, f = [7, 12, 17, 22]) : a < 32 ? (c = (0, Fs.Chi)(o, s, i), u = (5 * a + 1) % 16, f = [5, 9, 14, 20]) : a < 48 ? (c = s ^ i ^ o, u = (3 * a + 5) % 16, f = [4, 11, 16, 23]) : (c = i ^ (s | ~o), u = 7 * a % 16, f = [6, 10, 15, 21]), c = c + n + c_[a] + mf[u], n = o, o = i, i = s, s = s + (0, mt.rotl)(c, f[a % 4]);
|
|
14522
14518
|
}
|
|
14523
14519
|
n = n + this.A | 0, s = s + this.B | 0, i = i + this.C | 0, o = o + this.D | 0, this.set(n, s, i, o);
|
|
14524
14520
|
}
|
|
@@ -14531,7 +14527,7 @@ class hw extends Fs.HashMD {
|
|
|
14531
14527
|
}
|
|
14532
14528
|
Lt.MD5 = hw;
|
|
14533
14529
|
Lt.md5 = (0, mt.createHasher)(() => new hw());
|
|
14534
|
-
const
|
|
14530
|
+
const u_ = /* @__PURE__ */ Uint8Array.from([
|
|
14535
14531
|
7,
|
|
14536
14532
|
4,
|
|
14537
14533
|
13,
|
|
@@ -14548,11 +14544,11 @@ const l_ = /* @__PURE__ */ Uint8Array.from([
|
|
|
14548
14544
|
14,
|
|
14549
14545
|
11,
|
|
14550
14546
|
8
|
|
14551
|
-
]), pw = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)),
|
|
14552
|
-
const r = [[pw], [
|
|
14547
|
+
]), pw = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), f_ = pw.map((t) => (9 * t + 5) % 16), yw = /* @__PURE__ */ (() => {
|
|
14548
|
+
const r = [[pw], [f_]];
|
|
14553
14549
|
for (let n = 0; n < 4; n++)
|
|
14554
14550
|
for (let s of r)
|
|
14555
|
-
s.push(s[n].map((i) =>
|
|
14551
|
+
s.push(s[n].map((i) => u_[i]));
|
|
14556
14552
|
return r;
|
|
14557
14553
|
})(), mw = yw[0], bw = yw[1], gw = /* @__PURE__ */ [
|
|
14558
14554
|
[11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
|
|
@@ -14560,13 +14556,13 @@ const l_ = /* @__PURE__ */ Uint8Array.from([
|
|
|
14560
14556
|
[13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
|
|
14561
14557
|
[14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
|
|
14562
14558
|
[15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
|
|
14563
|
-
].map((t) => Uint8Array.from(t)),
|
|
14559
|
+
].map((t) => Uint8Array.from(t)), l_ = /* @__PURE__ */ mw.map((t, e) => t.map((r) => gw[e][r])), d_ = /* @__PURE__ */ bw.map((t, e) => t.map((r) => gw[e][r])), h_ = /* @__PURE__ */ Uint32Array.from([
|
|
14564
14560
|
0,
|
|
14565
14561
|
1518500249,
|
|
14566
14562
|
1859775393,
|
|
14567
14563
|
2400959708,
|
|
14568
14564
|
2840853838
|
|
14569
|
-
]),
|
|
14565
|
+
]), p_ = /* @__PURE__ */ Uint32Array.from([
|
|
14570
14566
|
1352829926,
|
|
14571
14567
|
1548603684,
|
|
14572
14568
|
1836072691,
|
|
@@ -14593,7 +14589,7 @@ class ww extends Fs.HashMD {
|
|
|
14593
14589
|
tc[d] = e.getUint32(r, !0);
|
|
14594
14590
|
let n = this.h0 | 0, s = n, i = this.h1 | 0, o = i, a = this.h2 | 0, c = a, u = this.h3 | 0, f = u, l = this.h4 | 0, p = l;
|
|
14595
14591
|
for (let d = 0; d < 5; d++) {
|
|
14596
|
-
const m = 4 - d, b =
|
|
14592
|
+
const m = 4 - d, b = h_[d], v = p_[d], S = mw[d], T = bw[d], E = l_[d], g = d_[d];
|
|
14597
14593
|
for (let x = 0; x < 16; x++) {
|
|
14598
14594
|
const k = (0, mt.rotl)(n + V0(d, i, a, u) + tc[S[x]] + b, E[x]) + l | 0;
|
|
14599
14595
|
n = l, l = u, u = (0, mt.rotl)(a, 10) | 0, a = i, i = k;
|
|
@@ -14622,7 +14618,7 @@ qi.sha1 = vw.sha1;
|
|
|
14622
14618
|
const Ew = /* @__PURE__ */ ew(KE);
|
|
14623
14619
|
(function(t) {
|
|
14624
14620
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.taggedHash = t.TAGGED_HASH_PREFIXES = t.TAGS = t.hash256 = t.hash160 = t.sha256 = t.sha1 = t.ripemd160 = void 0;
|
|
14625
|
-
const e =
|
|
14621
|
+
const e = n_, r = qi, n = Ew;
|
|
14626
14622
|
function s(f) {
|
|
14627
14623
|
return Buffer.from((0, e.ripemd160)(Uint8Array.from(f)));
|
|
14628
14624
|
}
|
|
@@ -15260,15 +15256,15 @@ const Ew = /* @__PURE__ */ ew(KE);
|
|
|
15260
15256
|
var bf = {}, Bn = {};
|
|
15261
15257
|
Object.defineProperty(Bn, "__esModule", { value: !0 });
|
|
15262
15258
|
Bn.encode = Bn.decode = Bn.check = void 0;
|
|
15263
|
-
function
|
|
15259
|
+
function y_(t) {
|
|
15264
15260
|
if (t.length < 8 || t.length > 72 || t[0] !== 48 || t[1] !== t.length - 2 || t[2] !== 2) return !1;
|
|
15265
15261
|
const e = t[3];
|
|
15266
15262
|
if (e === 0 || 5 + e >= t.length || t[4 + e] !== 2) return !1;
|
|
15267
15263
|
const r = t[5 + e];
|
|
15268
15264
|
return !(r === 0 || 6 + e + r !== t.length || t[4] & 128 || e > 1 && t[4] === 0 && !(t[5] & 128) || t[e + 6] & 128 || r > 1 && t[e + 6] === 0 && !(t[e + 7] & 128));
|
|
15269
15265
|
}
|
|
15270
|
-
Bn.check =
|
|
15271
|
-
function
|
|
15266
|
+
Bn.check = y_;
|
|
15267
|
+
function m_(t) {
|
|
15272
15268
|
if (t.length < 8) throw new Error("DER sequence length is too short");
|
|
15273
15269
|
if (t.length > 72) throw new Error("DER sequence length is too long");
|
|
15274
15270
|
if (t[0] !== 48) throw new Error("Expected DER sequence");
|
|
@@ -15293,8 +15289,8 @@ function g_(t) {
|
|
|
15293
15289
|
s: t.slice(6 + e)
|
|
15294
15290
|
};
|
|
15295
15291
|
}
|
|
15296
|
-
Bn.decode =
|
|
15297
|
-
function
|
|
15292
|
+
Bn.decode = m_;
|
|
15293
|
+
function b_(t, e) {
|
|
15298
15294
|
const r = t.length, n = e.length;
|
|
15299
15295
|
if (r === 0) throw new Error("R length is zero");
|
|
15300
15296
|
if (n === 0) throw new Error("S length is zero");
|
|
@@ -15309,7 +15305,7 @@ function w_(t, e) {
|
|
|
15309
15305
|
const s = Buffer.allocUnsafe(6 + r + n);
|
|
15310
15306
|
return s[0] = 48, s[1] = s.length - 2, s[2] = 2, s[3] = t.length, t.copy(s, 4), s[4 + r] = 2, s[5 + r] = e.length, e.copy(s, 6 + r), s;
|
|
15311
15307
|
}
|
|
15312
|
-
Bn.encode =
|
|
15308
|
+
Bn.encode = b_;
|
|
15313
15309
|
var Ys = {};
|
|
15314
15310
|
Object.defineProperty(Ys, "__esModule", { value: !0 });
|
|
15315
15311
|
Ys.REVERSE_OPS = Ys.OPS = void 0;
|
|
@@ -15449,12 +15445,12 @@ function Aw(t) {
|
|
|
15449
15445
|
return t < as.OPS.OP_PUSHDATA1 ? 1 : t <= 255 ? 2 : t <= 65535 ? 3 : 5;
|
|
15450
15446
|
}
|
|
15451
15447
|
ls.encodingLength = Aw;
|
|
15452
|
-
function
|
|
15448
|
+
function g_(t, e, r) {
|
|
15453
15449
|
const n = Aw(e);
|
|
15454
15450
|
return n === 1 ? t.writeUInt8(e, r) : n === 2 ? (t.writeUInt8(as.OPS.OP_PUSHDATA1, r), t.writeUInt8(e, r + 1)) : n === 3 ? (t.writeUInt8(as.OPS.OP_PUSHDATA2, r), t.writeUInt16LE(e, r + 1)) : (t.writeUInt8(as.OPS.OP_PUSHDATA4, r), t.writeUInt32LE(e, r + 1)), n;
|
|
15455
15451
|
}
|
|
15456
|
-
ls.encode =
|
|
15457
|
-
function
|
|
15452
|
+
ls.encode = g_;
|
|
15453
|
+
function w_(t, e) {
|
|
15458
15454
|
const r = t.readUInt8(e);
|
|
15459
15455
|
let n, s;
|
|
15460
15456
|
if (r < as.OPS.OP_PUSHDATA1)
|
|
@@ -15476,11 +15472,11 @@ function E_(t, e) {
|
|
|
15476
15472
|
size: s
|
|
15477
15473
|
};
|
|
15478
15474
|
}
|
|
15479
|
-
ls.decode =
|
|
15475
|
+
ls.decode = w_;
|
|
15480
15476
|
var Wi = {};
|
|
15481
15477
|
Object.defineProperty(Wi, "__esModule", { value: !0 });
|
|
15482
15478
|
Wi.encode = Wi.decode = void 0;
|
|
15483
|
-
function
|
|
15479
|
+
function v_(t, e, r) {
|
|
15484
15480
|
e = e || 4, r = r === void 0 ? !0 : r;
|
|
15485
15481
|
const n = t.length;
|
|
15486
15482
|
if (n === 0) return 0;
|
|
@@ -15496,20 +15492,20 @@ function S_(t, e, r) {
|
|
|
15496
15492
|
s |= t[i] << 8 * i;
|
|
15497
15493
|
return t[n - 1] & 128 ? -(s & ~(128 << 8 * (n - 1))) : s;
|
|
15498
15494
|
}
|
|
15499
|
-
Wi.decode =
|
|
15500
|
-
function
|
|
15495
|
+
Wi.decode = v_;
|
|
15496
|
+
function E_(t) {
|
|
15501
15497
|
return t > 2147483647 ? 5 : t > 8388607 ? 4 : t > 32767 ? 3 : t > 127 ? 2 : t > 0 ? 1 : 0;
|
|
15502
15498
|
}
|
|
15503
|
-
function
|
|
15499
|
+
function S_(t) {
|
|
15504
15500
|
let e = Math.abs(t);
|
|
15505
|
-
const r =
|
|
15501
|
+
const r = E_(e), n = Buffer.allocUnsafe(r), s = t < 0;
|
|
15506
15502
|
for (let i = 0; i < r; ++i)
|
|
15507
15503
|
n.writeUInt8(e & 255, i), e >>= 8;
|
|
15508
15504
|
return n[r - 1] & 128 ? n.writeUInt8(s ? 128 : 0, r - 1) : s && (n[r - 1] |= 128), n;
|
|
15509
15505
|
}
|
|
15510
|
-
Wi.encode =
|
|
15506
|
+
Wi.encode = S_;
|
|
15511
15507
|
var Ss = {}, G0;
|
|
15512
|
-
function
|
|
15508
|
+
function A_() {
|
|
15513
15509
|
if (G0) return Ss;
|
|
15514
15510
|
G0 = 1, Object.defineProperty(Ss, "__esModule", { value: !0 }), Ss.encode = Ss.decode = void 0;
|
|
15515
15511
|
const t = Bn, e = sr(), r = kt, { typeforce: n } = r, s = Buffer.alloc(1, 0);
|
|
@@ -15558,7 +15554,7 @@ function sr() {
|
|
|
15558
15554
|
return r.OPS;
|
|
15559
15555
|
}
|
|
15560
15556
|
});
|
|
15561
|
-
const n = ls, s = Wi, i =
|
|
15557
|
+
const n = ls, s = Wi, i = A_(), o = kt, { typeforce: a } = o, c = r.OPS.OP_RESERVED;
|
|
15562
15558
|
function u($) {
|
|
15563
15559
|
return o.Number($) && ($ === r.OPS.OP_0 || $ >= r.OPS.OP_1 && $ <= r.OPS.OP_16 || $ === r.OPS.OP_1NEGATE);
|
|
15564
15560
|
}
|
|
@@ -15668,12 +15664,12 @@ function sr() {
|
|
|
15668
15664
|
}
|
|
15669
15665
|
Object.defineProperty(Ma, "__esModule", { value: !0 });
|
|
15670
15666
|
Ma.Transaction = void 0;
|
|
15671
|
-
const Xe = yt, It = gs, W0 = sr(),
|
|
15667
|
+
const Xe = yt, It = gs, W0 = sr(), x_ = sr(), ve = kt, { typeforce: Dr } = ve;
|
|
15672
15668
|
function Wr(t) {
|
|
15673
15669
|
const e = t.length;
|
|
15674
15670
|
return Xe.varuint.encodingLength(e) + e;
|
|
15675
15671
|
}
|
|
15676
|
-
function
|
|
15672
|
+
function k_(t) {
|
|
15677
15673
|
const e = t.length;
|
|
15678
15674
|
return Xe.varuint.encodingLength(e) + t.reduce((r, n) => r + Wr(n), 0);
|
|
15679
15675
|
}
|
|
@@ -15683,11 +15679,11 @@ const Jn = Buffer.allocUnsafe(0), gf = [], wf = Buffer.from(
|
|
|
15683
15679
|
), K0 = Buffer.from(
|
|
15684
15680
|
"0000000000000000000000000000000000000000000000000000000000000001",
|
|
15685
15681
|
"hex"
|
|
15686
|
-
),
|
|
15682
|
+
), __ = Buffer.from("ffffffffffffffff", "hex"), T_ = {
|
|
15687
15683
|
script: Jn,
|
|
15688
|
-
valueBuffer:
|
|
15684
|
+
valueBuffer: __
|
|
15689
15685
|
};
|
|
15690
|
-
function
|
|
15686
|
+
function I_(t) {
|
|
15691
15687
|
return t.value !== void 0;
|
|
15692
15688
|
}
|
|
15693
15689
|
let Ur = class Te {
|
|
@@ -15778,7 +15774,7 @@ let Ur = class Te {
|
|
|
15778
15774
|
}
|
|
15779
15775
|
byteLength(e = !0) {
|
|
15780
15776
|
const r = e && this.hasWitnesses();
|
|
15781
|
-
return (r ? 10 : 8) + Xe.varuint.encodingLength(this.ins.length) + Xe.varuint.encodingLength(this.outs.length) + this.ins.reduce((n, s) => n + 40 + Wr(s.script), 0) + this.outs.reduce((n, s) => n + 8 + Wr(s.script), 0) + (r ? this.ins.reduce((n, s) => n +
|
|
15777
|
+
return (r ? 10 : 8) + Xe.varuint.encodingLength(this.ins.length) + Xe.varuint.encodingLength(this.outs.length) + this.ins.reduce((n, s) => n + 40 + Wr(s.script), 0) + this.outs.reduce((n, s) => n + 8 + Wr(s.script), 0) + (r ? this.ins.reduce((n, s) => n + k_(s.witness), 0) : 0);
|
|
15782
15778
|
}
|
|
15783
15779
|
clone() {
|
|
15784
15780
|
const e = new Te();
|
|
@@ -15812,7 +15808,7 @@ let Ur = class Te {
|
|
|
15812
15808
|
arguments
|
|
15813
15809
|
), e >= this.ins.length) return K0;
|
|
15814
15810
|
const s = W0.compile(
|
|
15815
|
-
W0.decompile(r).filter((a) => a !==
|
|
15811
|
+
W0.decompile(r).filter((a) => a !== x_.OPS.OP_CODESEPARATOR)
|
|
15816
15812
|
), i = this.clone();
|
|
15817
15813
|
if ((n & 31) === Te.SIGHASH_NONE)
|
|
15818
15814
|
i.outs = [], i.ins.forEach((a, c) => {
|
|
@@ -15822,7 +15818,7 @@ let Ur = class Te {
|
|
|
15822
15818
|
if (e >= this.outs.length) return K0;
|
|
15823
15819
|
i.outs.length = e + 1;
|
|
15824
15820
|
for (let a = 0; a < e; a++)
|
|
15825
|
-
i.outs[a] =
|
|
15821
|
+
i.outs[a] = T_;
|
|
15826
15822
|
i.ins.forEach((a, c) => {
|
|
15827
15823
|
c !== e && (a.sequence = 0);
|
|
15828
15824
|
});
|
|
@@ -15946,7 +15942,7 @@ let Ur = class Te {
|
|
|
15946
15942
|
return i && (s.writeUInt8(Te.ADVANCED_TRANSACTION_MARKER), s.writeUInt8(Te.ADVANCED_TRANSACTION_FLAG)), s.writeVarInt(this.ins.length), this.ins.forEach((o) => {
|
|
15947
15943
|
s.writeSlice(o.hash), s.writeUInt32(o.index), s.writeVarSlice(o.script), s.writeUInt32(o.sequence);
|
|
15948
15944
|
}), s.writeVarInt(this.outs.length), this.outs.forEach((o) => {
|
|
15949
|
-
|
|
15945
|
+
I_(o) ? s.writeUInt64(o.value) : s.writeSlice(o.valueBuffer), s.writeVarSlice(o.script);
|
|
15950
15946
|
}), i && this.ins.forEach((o) => {
|
|
15951
15947
|
s.writeVector(o.witness);
|
|
15952
15948
|
}), s.writeUInt32(this.locktime), r !== void 0 ? e.slice(r, s.offset) : e;
|
|
@@ -15965,9 +15961,9 @@ Ur.ADVANCED_TRANSACTION_MARKER = 0;
|
|
|
15965
15961
|
Ur.ADVANCED_TRANSACTION_FLAG = 1;
|
|
15966
15962
|
var Ie = {}, Fa = {};
|
|
15967
15963
|
Object.defineProperty(Fa, "__esModule", { value: !0 });
|
|
15968
|
-
const
|
|
15964
|
+
const P_ = 9007199254740991;
|
|
15969
15965
|
function ep(t) {
|
|
15970
|
-
if (t < 0 || t >
|
|
15966
|
+
if (t < 0 || t > P_ || t % 1 !== 0)
|
|
15971
15967
|
throw new RangeError("value out of range");
|
|
15972
15968
|
}
|
|
15973
15969
|
function Ao(t, e, r) {
|
|
@@ -16064,7 +16060,7 @@ xt.testnet = {
|
|
|
16064
16060
|
var er = {};
|
|
16065
16061
|
Object.defineProperty(er, "__esModule", { value: !0 });
|
|
16066
16062
|
er.value = er.prop = void 0;
|
|
16067
|
-
function
|
|
16063
|
+
function O_(t, e, r) {
|
|
16068
16064
|
Object.defineProperty(t, e, {
|
|
16069
16065
|
configurable: !0,
|
|
16070
16066
|
enumerable: !0,
|
|
@@ -16082,16 +16078,16 @@ function C_(t, e, r) {
|
|
|
16082
16078
|
}
|
|
16083
16079
|
});
|
|
16084
16080
|
}
|
|
16085
|
-
er.prop =
|
|
16086
|
-
function
|
|
16081
|
+
er.prop = O_;
|
|
16082
|
+
function B_(t) {
|
|
16087
16083
|
let e;
|
|
16088
16084
|
return () => (e !== void 0 || (e = t()), e);
|
|
16089
16085
|
}
|
|
16090
|
-
er.value =
|
|
16086
|
+
er.value = B_;
|
|
16091
16087
|
Object.defineProperty(Eu, "__esModule", { value: !0 });
|
|
16092
16088
|
Eu.p2data = void 0;
|
|
16093
|
-
const
|
|
16094
|
-
function
|
|
16089
|
+
const C_ = xt, wc = sr(), zr = kt, Z0 = er, Y0 = wc.OPS;
|
|
16090
|
+
function $_(t, e) {
|
|
16095
16091
|
if (!t.data && !t.output) throw new TypeError("Not enough data");
|
|
16096
16092
|
e = Object.assign({ validate: !0 }, e || {}), (0, zr.typeforce)(
|
|
16097
16093
|
{
|
|
@@ -16103,7 +16099,7 @@ function N_(t, e) {
|
|
|
16103
16099
|
},
|
|
16104
16100
|
t
|
|
16105
16101
|
);
|
|
16106
|
-
const n = { name: "embed", network: t.network ||
|
|
16102
|
+
const n = { name: "embed", network: t.network || C_.bitcoin };
|
|
16107
16103
|
if (Z0.prop(n, "output", () => {
|
|
16108
16104
|
if (t.data)
|
|
16109
16105
|
return wc.compile([Y0.OP_RETURN].concat(t.data));
|
|
@@ -16120,12 +16116,12 @@ function N_(t, e) {
|
|
|
16120
16116
|
}
|
|
16121
16117
|
return Object.assign(n, t);
|
|
16122
16118
|
}
|
|
16123
|
-
Eu.p2data =
|
|
16119
|
+
Eu.p2data = $_;
|
|
16124
16120
|
var Su = {};
|
|
16125
16121
|
Object.defineProperty(Su, "__esModule", { value: !0 });
|
|
16126
16122
|
Su.p2ms = void 0;
|
|
16127
|
-
const
|
|
16128
|
-
function
|
|
16123
|
+
const R_ = xt, wi = sr(), We = kt, Wn = er, vi = wi.OPS, rc = vi.OP_RESERVED;
|
|
16124
|
+
function N_(t, e) {
|
|
16129
16125
|
if (!t.input && !t.output && !(t.pubkeys && t.m !== void 0) && !t.signatures)
|
|
16130
16126
|
throw new TypeError("Not enough data");
|
|
16131
16127
|
e = Object.assign({ validate: !0 }, e || {});
|
|
@@ -16148,7 +16144,7 @@ function M_(t, e) {
|
|
|
16148
16144
|
},
|
|
16149
16145
|
t
|
|
16150
16146
|
);
|
|
16151
|
-
const s = { network: t.network ||
|
|
16147
|
+
const s = { network: t.network || R_.bitcoin };
|
|
16152
16148
|
let i = [], o = !1;
|
|
16153
16149
|
function a(c) {
|
|
16154
16150
|
o || (o = !0, i = wi.decompile(c), s.m = i[0] - rc, s.n = i[i.length - 2] - rc, s.pubkeys = i.slice(1, -2));
|
|
@@ -16224,12 +16220,12 @@ function M_(t, e) {
|
|
|
16224
16220
|
}
|
|
16225
16221
|
return Object.assign(s, t);
|
|
16226
16222
|
}
|
|
16227
|
-
Su.p2ms =
|
|
16223
|
+
Su.p2ms = N_;
|
|
16228
16224
|
var Au = {};
|
|
16229
16225
|
Object.defineProperty(Au, "__esModule", { value: !0 });
|
|
16230
16226
|
Au.p2pk = void 0;
|
|
16231
|
-
const
|
|
16232
|
-
function
|
|
16227
|
+
const U_ = xt, Ei = sr(), vr = kt, mi = er, X0 = Ei.OPS;
|
|
16228
|
+
function M_(t, e) {
|
|
16233
16229
|
if (!t.input && !t.output && !t.pubkey && !t.input && !t.signature)
|
|
16234
16230
|
throw new TypeError("Not enough data");
|
|
16235
16231
|
e = Object.assign({ validate: !0 }, e || {}), (0, vr.typeforce)(
|
|
@@ -16242,7 +16238,7 @@ function j_(t, e) {
|
|
|
16242
16238
|
},
|
|
16243
16239
|
t
|
|
16244
16240
|
);
|
|
16245
|
-
const r = mi.value(() => Ei.decompile(t.input)), s = { name: "p2pk", network: t.network ||
|
|
16241
|
+
const r = mi.value(() => Ei.decompile(t.input)), s = { name: "p2pk", network: t.network || U_.bitcoin };
|
|
16246
16242
|
if (mi.prop(s, "output", () => {
|
|
16247
16243
|
if (t.pubkey)
|
|
16248
16244
|
return Ei.compile([t.pubkey, X0.OP_CHECKSIG]);
|
|
@@ -16277,9 +16273,9 @@ function j_(t, e) {
|
|
|
16277
16273
|
}
|
|
16278
16274
|
return Object.assign(s, t);
|
|
16279
16275
|
}
|
|
16280
|
-
Au.p2pk =
|
|
16276
|
+
Au.p2pk = M_;
|
|
16281
16277
|
var xu = {};
|
|
16282
|
-
function
|
|
16278
|
+
function F_(t) {
|
|
16283
16279
|
if (t.length >= 255)
|
|
16284
16280
|
throw new TypeError("Alphabet too long");
|
|
16285
16281
|
for (var e = new Uint8Array(256), r = 0; r < e.length; r++)
|
|
@@ -16349,9 +16345,9 @@ function L_(t) {
|
|
|
16349
16345
|
decode: p
|
|
16350
16346
|
};
|
|
16351
16347
|
}
|
|
16352
|
-
var
|
|
16353
|
-
const
|
|
16354
|
-
var
|
|
16348
|
+
var j_ = F_;
|
|
16349
|
+
const L_ = j_, H_ = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
16350
|
+
var D_ = L_(H_), Ef = D_, z_ = function(t) {
|
|
16355
16351
|
function e(i) {
|
|
16356
16352
|
var o = Uint8Array.from(i), a = t(o), c = o.length + 4, u = new Uint8Array(c);
|
|
16357
16353
|
return u.set(o, 0), u.set(a.subarray(0, 4), o.length), Ef.encode(u, c);
|
|
@@ -16376,15 +16372,15 @@ var V_ = D_(z_), Ef = V_, G_ = function(t) {
|
|
|
16376
16372
|
decode: s,
|
|
16377
16373
|
decodeUnsafe: n
|
|
16378
16374
|
};
|
|
16379
|
-
}, { sha256: J0 } = Ew,
|
|
16380
|
-
function
|
|
16375
|
+
}, { sha256: J0 } = Ew, V_ = z_;
|
|
16376
|
+
function G_(t) {
|
|
16381
16377
|
return J0(J0(t));
|
|
16382
16378
|
}
|
|
16383
|
-
var tp =
|
|
16379
|
+
var tp = V_(G_);
|
|
16384
16380
|
Object.defineProperty(xu, "__esModule", { value: !0 });
|
|
16385
16381
|
xu.p2pkh = void 0;
|
|
16386
|
-
const Sf = gs,
|
|
16387
|
-
function
|
|
16382
|
+
const Sf = gs, q_ = xt, Si = sr(), Pt = kt, hn = er, Q0 = tp, Kn = Si.OPS;
|
|
16383
|
+
function W_(t, e) {
|
|
16388
16384
|
if (!t.address && !t.hash && !t.output && !t.pubkey && !t.input)
|
|
16389
16385
|
throw new TypeError("Not enough data");
|
|
16390
16386
|
e = Object.assign({ validate: !0 }, e || {}), (0, Pt.typeforce)(
|
|
@@ -16402,7 +16398,7 @@ function Z_(t, e) {
|
|
|
16402
16398
|
const r = hn.value(() => {
|
|
16403
16399
|
const o = Buffer.from(Q0.decode(t.address)), a = o.readUInt8(0), c = o.slice(1);
|
|
16404
16400
|
return { version: a, hash: c };
|
|
16405
|
-
}), n = hn.value(() => Si.decompile(t.input)), s = t.network ||
|
|
16401
|
+
}), n = hn.value(() => Si.decompile(t.input)), s = t.network || q_.bitcoin, i = { name: "p2pkh", network: s };
|
|
16406
16402
|
if (hn.prop(i, "address", () => {
|
|
16407
16403
|
if (!i.hash) return;
|
|
16408
16404
|
const o = Buffer.allocUnsafe(21);
|
|
@@ -16477,12 +16473,12 @@ function Z_(t, e) {
|
|
|
16477
16473
|
}
|
|
16478
16474
|
return Object.assign(i, t);
|
|
16479
16475
|
}
|
|
16480
|
-
xu.p2pkh =
|
|
16476
|
+
xu.p2pkh = W_;
|
|
16481
16477
|
var ku = {};
|
|
16482
16478
|
Object.defineProperty(ku, "__esModule", { value: !0 });
|
|
16483
16479
|
ku.p2sh = void 0;
|
|
16484
|
-
const ey = gs,
|
|
16485
|
-
function
|
|
16480
|
+
const ey = gs, K_ = xt, Kr = sr(), Re = kt, Vr = er, ty = tp, yo = Kr.OPS;
|
|
16481
|
+
function Z_(t, e) {
|
|
16486
16482
|
if (!t.address && !t.hash && !t.output && !t.redeem && !t.input)
|
|
16487
16483
|
throw new TypeError("Not enough data");
|
|
16488
16484
|
e = Object.assign({ validate: !0 }, e || {}), (0, Re.typeforce)(
|
|
@@ -16507,7 +16503,7 @@ function X_(t, e) {
|
|
|
16507
16503
|
t
|
|
16508
16504
|
);
|
|
16509
16505
|
let r = t.network;
|
|
16510
|
-
r || (r = t.redeem && t.redeem.network ||
|
|
16506
|
+
r || (r = t.redeem && t.redeem.network || K_.bitcoin);
|
|
16511
16507
|
const n = { network: r }, s = Vr.value(() => {
|
|
16512
16508
|
const a = Buffer.from(ty.decode(t.address)), c = a.readUInt8(0), u = a.slice(1);
|
|
16513
16509
|
return { version: c, hash: u };
|
|
@@ -16620,7 +16616,7 @@ function X_(t, e) {
|
|
|
16620
16616
|
}
|
|
16621
16617
|
return Object.assign(n, t);
|
|
16622
16618
|
}
|
|
16623
|
-
ku.p2sh =
|
|
16619
|
+
ku.p2sh = Z_;
|
|
16624
16620
|
var _u = {}, Un = {};
|
|
16625
16621
|
Object.defineProperty(Un, "__esModule", { value: !0 });
|
|
16626
16622
|
Un.bech32m = Un.bech32 = void 0;
|
|
@@ -16664,15 +16660,15 @@ function rp(t, e, r, n) {
|
|
|
16664
16660
|
}
|
|
16665
16661
|
return a;
|
|
16666
16662
|
}
|
|
16667
|
-
function
|
|
16663
|
+
function Y_(t) {
|
|
16668
16664
|
return rp(t, 8, 5, !0);
|
|
16669
16665
|
}
|
|
16670
|
-
function
|
|
16666
|
+
function X_(t) {
|
|
16671
16667
|
const e = rp(t, 5, 8, !1);
|
|
16672
16668
|
if (Array.isArray(e))
|
|
16673
16669
|
return e;
|
|
16674
16670
|
}
|
|
16675
|
-
function
|
|
16671
|
+
function J_(t) {
|
|
16676
16672
|
const e = rp(t, 5, 8, !1);
|
|
16677
16673
|
if (Array.isArray(e))
|
|
16678
16674
|
return e;
|
|
@@ -16748,17 +16744,17 @@ function _w(t) {
|
|
|
16748
16744
|
decodeUnsafe: s,
|
|
16749
16745
|
decode: i,
|
|
16750
16746
|
encode: r,
|
|
16751
|
-
toWords:
|
|
16752
|
-
fromWordsUnsafe:
|
|
16753
|
-
fromWords:
|
|
16747
|
+
toWords: Y_,
|
|
16748
|
+
fromWordsUnsafe: X_,
|
|
16749
|
+
fromWords: J_
|
|
16754
16750
|
};
|
|
16755
16751
|
}
|
|
16756
16752
|
Un.bech32 = _w("bech32");
|
|
16757
16753
|
Un.bech32m = _w("bech32m");
|
|
16758
16754
|
Object.defineProperty(_u, "__esModule", { value: !0 });
|
|
16759
16755
|
_u.p2wpkh = void 0;
|
|
16760
|
-
const Af = gs,
|
|
16761
|
-
function
|
|
16756
|
+
const Af = gs, Q_ = xt, vc = sr(), rt = kt, Zn = er, nc = Un, ny = vc.OPS, eT = Buffer.alloc(0);
|
|
16757
|
+
function tT(t, e) {
|
|
16762
16758
|
if (!t.address && !t.hash && !t.output && !t.pubkey && !t.witness)
|
|
16763
16759
|
throw new TypeError("Not enough data");
|
|
16764
16760
|
e = Object.assign({ validate: !0 }, e || {}), (0, rt.typeforce)(
|
|
@@ -16783,7 +16779,7 @@ function nT(t, e) {
|
|
|
16783
16779
|
prefix: i.prefix,
|
|
16784
16780
|
data: Buffer.from(a)
|
|
16785
16781
|
};
|
|
16786
|
-
}), n = t.network ||
|
|
16782
|
+
}), n = t.network || Q_.bitcoin, s = { name: "p2wpkh", network: n };
|
|
16787
16783
|
if (Zn.prop(s, "address", () => {
|
|
16788
16784
|
if (!s.hash) return;
|
|
16789
16785
|
const i = nc.bech32.toWords(s.hash);
|
|
@@ -16804,7 +16800,7 @@ function nT(t, e) {
|
|
|
16804
16800
|
return t.witness[0];
|
|
16805
16801
|
}), Zn.prop(s, "input", () => {
|
|
16806
16802
|
if (s.witness)
|
|
16807
|
-
return
|
|
16803
|
+
return eT;
|
|
16808
16804
|
}), Zn.prop(s, "witness", () => {
|
|
16809
16805
|
if (t.pubkey && t.signature)
|
|
16810
16806
|
return [t.signature, t.pubkey];
|
|
@@ -16855,15 +16851,15 @@ function nT(t, e) {
|
|
|
16855
16851
|
}
|
|
16856
16852
|
return Object.assign(s, t);
|
|
16857
16853
|
}
|
|
16858
|
-
_u.p2wpkh =
|
|
16854
|
+
_u.p2wpkh = tT;
|
|
16859
16855
|
var Tu = {};
|
|
16860
16856
|
Object.defineProperty(Tu, "__esModule", { value: !0 });
|
|
16861
16857
|
Tu.p2wsh = void 0;
|
|
16862
|
-
const sy = gs,
|
|
16858
|
+
const sy = gs, rT = xt, vn = sr(), Ce = kt, pn = er, sc = Un, iy = vn.OPS, xf = Buffer.alloc(0);
|
|
16863
16859
|
function ic(t) {
|
|
16864
16860
|
return !!(Buffer.isBuffer(t) && t.length === 65 && t[0] === 4 && (0, Ce.isPoint)(t));
|
|
16865
16861
|
}
|
|
16866
|
-
function
|
|
16862
|
+
function nT(t, e) {
|
|
16867
16863
|
if (!t.address && !t.hash && !t.output && !t.redeem && !t.witness)
|
|
16868
16864
|
throw new TypeError("Not enough data");
|
|
16869
16865
|
e = Object.assign({ validate: !0 }, e || {}), (0, Ce.typeforce)(
|
|
@@ -16896,7 +16892,7 @@ function iT(t, e) {
|
|
|
16896
16892
|
};
|
|
16897
16893
|
}), n = pn.value(() => vn.decompile(t.redeem.input));
|
|
16898
16894
|
let s = t.network;
|
|
16899
|
-
s || (s = t.redeem && t.redeem.network ||
|
|
16895
|
+
s || (s = t.redeem && t.redeem.network || rT.bitcoin);
|
|
16900
16896
|
const i = { network: s };
|
|
16901
16897
|
if (pn.prop(i, "address", () => {
|
|
16902
16898
|
if (!i.hash) return;
|
|
@@ -16996,25 +16992,25 @@ function iT(t, e) {
|
|
|
16996
16992
|
}
|
|
16997
16993
|
return Object.assign(i, t);
|
|
16998
16994
|
}
|
|
16999
|
-
Tu.p2wsh =
|
|
16995
|
+
Tu.p2wsh = nT;
|
|
17000
16996
|
var mo = {}, Xs = {};
|
|
17001
16997
|
Object.defineProperty(Xs, "__esModule", { value: !0 });
|
|
17002
16998
|
Xs.getEccLib = Xs.initEccLib = void 0;
|
|
17003
16999
|
const $o = {};
|
|
17004
|
-
function
|
|
17005
|
-
t ? t !== $o.eccLib && (e != null && e.DANGER_DO_NOT_VERIFY_ECCLIB ||
|
|
17000
|
+
function sT(t, e) {
|
|
17001
|
+
t ? t !== $o.eccLib && (e != null && e.DANGER_DO_NOT_VERIFY_ECCLIB || oT(t), $o.eccLib = t) : $o.eccLib = t;
|
|
17006
17002
|
}
|
|
17007
|
-
Xs.initEccLib =
|
|
17008
|
-
function
|
|
17003
|
+
Xs.initEccLib = sT;
|
|
17004
|
+
function iT() {
|
|
17009
17005
|
if (!$o.eccLib)
|
|
17010
17006
|
throw new Error(
|
|
17011
17007
|
"No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance"
|
|
17012
17008
|
);
|
|
17013
17009
|
return $o.eccLib;
|
|
17014
17010
|
}
|
|
17015
|
-
Xs.getEccLib =
|
|
17011
|
+
Xs.getEccLib = iT;
|
|
17016
17012
|
const yn = (t) => Buffer.from(t, "hex");
|
|
17017
|
-
function
|
|
17013
|
+
function oT(t) {
|
|
17018
17014
|
or(typeof t.isXOnlyPoint == "function"), or(
|
|
17019
17015
|
t.isXOnlyPoint(
|
|
17020
17016
|
yn("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
|
|
@@ -17039,7 +17035,7 @@ function cT(t) {
|
|
|
17039
17035
|
!t.isXOnlyPoint(
|
|
17040
17036
|
yn("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")
|
|
17041
17037
|
)
|
|
17042
|
-
), or(typeof t.xOnlyPointAddTweak == "function"),
|
|
17038
|
+
), or(typeof t.xOnlyPointAddTweak == "function"), aT.forEach((e) => {
|
|
17043
17039
|
const r = t.xOnlyPointAddTweak(yn(e.pubkey), yn(e.tweak));
|
|
17044
17040
|
e.result === null ? or(r === null) : (or(r !== null), or(r.parity === e.parity), or(Buffer.from(r.xOnlyPubkey).equals(yn(e.result))));
|
|
17045
17041
|
});
|
|
@@ -17047,7 +17043,7 @@ function cT(t) {
|
|
|
17047
17043
|
function or(t) {
|
|
17048
17044
|
if (!t) throw new Error("ecc library invalid");
|
|
17049
17045
|
}
|
|
17050
|
-
const
|
|
17046
|
+
const aT = [
|
|
17051
17047
|
{
|
|
17052
17048
|
pubkey: "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
|
17053
17049
|
tweak: "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140",
|
|
@@ -17146,7 +17142,7 @@ var np = {};
|
|
|
17146
17142
|
}
|
|
17147
17143
|
})(np);
|
|
17148
17144
|
var Ot = {}, oy;
|
|
17149
|
-
function
|
|
17145
|
+
function cT() {
|
|
17150
17146
|
if (oy) return Ot;
|
|
17151
17147
|
oy = 1, Object.defineProperty(Ot, "__esModule", { value: !0 }), Ot.toOutputScript = Ot.fromOutputScript = Ot.toBech32 = Ot.toBase58Check = Ot.fromBech32 = Ot.fromBase58Check = void 0;
|
|
17152
17148
|
const t = xt, e = sp(), r = sr(), n = kt, s = Un, i = tp, o = 40, a = 2, c = 16, u = 2, f = 80, l = "WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";
|
|
@@ -17269,10 +17265,10 @@ function fT() {
|
|
|
17269
17265
|
return Ot.toOutputScript = T, Ot;
|
|
17270
17266
|
}
|
|
17271
17267
|
var ay;
|
|
17272
|
-
function
|
|
17268
|
+
function uT() {
|
|
17273
17269
|
if (ay) return mo;
|
|
17274
17270
|
ay = 1, Object.defineProperty(mo, "__esModule", { value: !0 }), mo.p2tr = void 0;
|
|
17275
|
-
const t = ai, e = xt, r = sr(), n = kt, s = Xs, i = np, o = er, a = Un, c =
|
|
17271
|
+
const t = ai, e = xt, r = sr(), n = kt, s = Xs, i = np, o = er, a = Un, c = cT(), u = r.OPS, f = 1, l = 80;
|
|
17276
17272
|
function p(d, m) {
|
|
17277
17273
|
if (!d.address && !d.output && !d.pubkey && !d.internalPubkey && !(d.witness && d.witness.length > 1))
|
|
17278
17274
|
throw new TypeError("Not enough data");
|
|
@@ -17526,7 +17522,7 @@ function sp() {
|
|
|
17526
17522
|
return a.p2wsh;
|
|
17527
17523
|
}
|
|
17528
17524
|
});
|
|
17529
|
-
const c =
|
|
17525
|
+
const c = uT();
|
|
17530
17526
|
Object.defineProperty(t, "p2tr", {
|
|
17531
17527
|
enumerable: !0,
|
|
17532
17528
|
get: function() {
|
|
@@ -17537,7 +17533,7 @@ function sp() {
|
|
|
17537
17533
|
}
|
|
17538
17534
|
Object.defineProperty(Ie, "__esModule", { value: !0 });
|
|
17539
17535
|
Ie.signatureBlocksAction = Ie.checkInputForSig = Ie.pubkeyInScript = Ie.pubkeyPositionInScript = Ie.witnessStackToScriptWitness = Ie.isP2TR = Ie.isP2SHScript = Ie.isP2WSHScript = Ie.isP2WPKH = Ie.isP2PKH = Ie.isP2PK = Ie.isP2MS = void 0;
|
|
17540
|
-
const uy = Fa, Ro = sr(), oc = Ma,
|
|
17536
|
+
const uy = Fa, Ro = sr(), oc = Ma, fT = gs, ci = sp();
|
|
17541
17537
|
function ui(t) {
|
|
17542
17538
|
return (e) => {
|
|
17543
17539
|
try {
|
|
@@ -17554,7 +17550,7 @@ Ie.isP2WPKH = ui(ci.p2wpkh);
|
|
|
17554
17550
|
Ie.isP2WSHScript = ui(ci.p2wsh);
|
|
17555
17551
|
Ie.isP2SHScript = ui(ci.p2sh);
|
|
17556
17552
|
Ie.isP2TR = ui(ci.p2tr);
|
|
17557
|
-
function
|
|
17553
|
+
function lT(t) {
|
|
17558
17554
|
let e = Buffer.allocUnsafe(0);
|
|
17559
17555
|
function r(o) {
|
|
17560
17556
|
e = Buffer.concat([e, Buffer.from(o)]);
|
|
@@ -17571,23 +17567,23 @@ function hT(t) {
|
|
|
17571
17567
|
}
|
|
17572
17568
|
return i(t), e;
|
|
17573
17569
|
}
|
|
17574
|
-
Ie.witnessStackToScriptWitness =
|
|
17570
|
+
Ie.witnessStackToScriptWitness = lT;
|
|
17575
17571
|
function Tw(t, e) {
|
|
17576
|
-
const r = (0,
|
|
17572
|
+
const r = (0, fT.hash160)(t), n = t.slice(1, 33), s = Ro.decompile(e);
|
|
17577
17573
|
if (s === null) throw new Error("Unknown script error");
|
|
17578
17574
|
return s.findIndex((i) => typeof i == "number" ? !1 : i.equals(t) || i.equals(r) || i.equals(n));
|
|
17579
17575
|
}
|
|
17580
17576
|
Ie.pubkeyPositionInScript = Tw;
|
|
17581
|
-
function
|
|
17577
|
+
function dT(t, e) {
|
|
17582
17578
|
return Tw(t, e) !== -1;
|
|
17583
17579
|
}
|
|
17584
|
-
Ie.pubkeyInScript =
|
|
17585
|
-
function
|
|
17586
|
-
return
|
|
17580
|
+
Ie.pubkeyInScript = dT;
|
|
17581
|
+
function hT(t, e) {
|
|
17582
|
+
return pT(t).some(
|
|
17587
17583
|
(n) => Iw(n, Ro.signature.decode, e)
|
|
17588
17584
|
);
|
|
17589
17585
|
}
|
|
17590
|
-
Ie.checkInputForSig =
|
|
17586
|
+
Ie.checkInputForSig = hT;
|
|
17591
17587
|
function Iw(t, e, r) {
|
|
17592
17588
|
const { hashType: n } = e(t), s = [];
|
|
17593
17589
|
switch (n & oc.Transaction.SIGHASH_ANYONECANPAY && s.push("addInput"), n & 31) {
|
|
@@ -17601,31 +17597,31 @@ function Iw(t, e, r) {
|
|
|
17601
17597
|
return s.indexOf(r) === -1;
|
|
17602
17598
|
}
|
|
17603
17599
|
Ie.signatureBlocksAction = Iw;
|
|
17604
|
-
function
|
|
17600
|
+
function pT(t) {
|
|
17605
17601
|
let e = [];
|
|
17606
17602
|
if ((t.partialSig || []).length === 0) {
|
|
17607
17603
|
if (!t.finalScriptSig && !t.finalScriptWitness) return [];
|
|
17608
|
-
e =
|
|
17604
|
+
e = yT(t);
|
|
17609
17605
|
} else
|
|
17610
17606
|
e = t.partialSig;
|
|
17611
17607
|
return e.map((r) => r.signature);
|
|
17612
17608
|
}
|
|
17613
|
-
function
|
|
17609
|
+
function yT(t) {
|
|
17614
17610
|
const e = t.finalScriptSig ? Ro.decompile(t.finalScriptSig) || [] : [], r = t.finalScriptWitness ? Ro.decompile(t.finalScriptWitness) || [] : [];
|
|
17615
17611
|
return e.concat(r).filter((n) => Buffer.isBuffer(n) && Ro.isCanonicalScriptSignature(n)).map((n) => ({ signature: n }));
|
|
17616
17612
|
}
|
|
17617
17613
|
Object.defineProperty(je, "__esModule", { value: !0 });
|
|
17618
17614
|
je.checkTaprootInputForSigs = je.tapTreeFromList = je.tapTreeToList = je.tweakInternalPubKey = je.checkTaprootOutputFields = je.checkTaprootInputFields = je.isTaprootOutput = je.isTaprootInput = ko = je.serializeTaprootSignature = je.tapScriptFinalizer = je.toXOnly = void 0;
|
|
17619
|
-
const ip = kt,
|
|
17620
|
-
je.toXOnly =
|
|
17621
|
-
function
|
|
17622
|
-
const n =
|
|
17615
|
+
const ip = kt, mT = Ma, Iu = Ie, ms = np, bT = sp(), gT = Ie, wT = (t) => t.length === 32 ? t : t.slice(1, 33);
|
|
17616
|
+
je.toXOnly = wT;
|
|
17617
|
+
function vT(t, e, r) {
|
|
17618
|
+
const n = FT(
|
|
17623
17619
|
e,
|
|
17624
17620
|
t,
|
|
17625
17621
|
r
|
|
17626
17622
|
);
|
|
17627
17623
|
try {
|
|
17628
|
-
const i =
|
|
17624
|
+
const i = UT(e, n).concat(n.script).concat(n.controlBlock);
|
|
17629
17625
|
return {
|
|
17630
17626
|
finalScriptWitness: (0, Iu.witnessStackToScriptWitness)(i)
|
|
17631
17627
|
};
|
|
@@ -17633,12 +17629,12 @@ function ST(t, e, r) {
|
|
|
17633
17629
|
throw new Error(`Can not finalize taproot input #${t}: ${s}`);
|
|
17634
17630
|
}
|
|
17635
17631
|
}
|
|
17636
|
-
je.tapScriptFinalizer =
|
|
17637
|
-
function
|
|
17632
|
+
je.tapScriptFinalizer = vT;
|
|
17633
|
+
function ET(t, e) {
|
|
17638
17634
|
const r = e ? Buffer.from([e]) : Buffer.from([]);
|
|
17639
17635
|
return Buffer.concat([t, r]);
|
|
17640
17636
|
}
|
|
17641
|
-
var ko = je.serializeTaprootSignature =
|
|
17637
|
+
var ko = je.serializeTaprootSignature = ET;
|
|
17642
17638
|
function Ec(t) {
|
|
17643
17639
|
return t && !!(t.tapInternalKey || t.tapMerkleRoot || t.tapLeafScript && t.tapLeafScript.length || t.tapBip32Derivation && t.tapBip32Derivation.length || t.witnessUtxo && (0, Iu.isP2TR)(t.witnessUtxo.script));
|
|
17644
17640
|
}
|
|
@@ -17647,31 +17643,31 @@ function Sc(t, e) {
|
|
|
17647
17643
|
return t && !!(t.tapInternalKey || t.tapTree || t.tapBip32Derivation && t.tapBip32Derivation.length || e && (0, Iu.isP2TR)(e));
|
|
17648
17644
|
}
|
|
17649
17645
|
je.isTaprootOutput = Sc;
|
|
17650
|
-
function
|
|
17651
|
-
|
|
17646
|
+
function ST(t, e, r) {
|
|
17647
|
+
$T(t, e, r), NT(t, e, r);
|
|
17652
17648
|
}
|
|
17653
|
-
je.checkTaprootInputFields =
|
|
17654
|
-
function
|
|
17655
|
-
|
|
17649
|
+
je.checkTaprootInputFields = ST;
|
|
17650
|
+
function AT(t, e, r) {
|
|
17651
|
+
RT(t, e, r), xT(t, e);
|
|
17656
17652
|
}
|
|
17657
|
-
je.checkTaprootOutputFields =
|
|
17658
|
-
function
|
|
17653
|
+
je.checkTaprootOutputFields = AT;
|
|
17654
|
+
function xT(t, e) {
|
|
17659
17655
|
if (!e.tapTree && !e.tapInternalKey) return;
|
|
17660
17656
|
const r = e.tapInternalKey || t.tapInternalKey, n = e.tapTree || t.tapTree;
|
|
17661
17657
|
if (r) {
|
|
17662
|
-
const { script: s } = t, i =
|
|
17658
|
+
const { script: s } = t, i = kT(r, n);
|
|
17663
17659
|
if (s && !s.equals(i))
|
|
17664
17660
|
throw new Error("Error adding output. Script or address missmatch.");
|
|
17665
17661
|
}
|
|
17666
17662
|
}
|
|
17667
|
-
function
|
|
17668
|
-
const r = e && Pw(e.leaves), { output: n } = (0,
|
|
17663
|
+
function kT(t, e) {
|
|
17664
|
+
const r = e && Pw(e.leaves), { output: n } = (0, bT.p2tr)({
|
|
17669
17665
|
internalPubkey: t,
|
|
17670
17666
|
scriptTree: r
|
|
17671
17667
|
});
|
|
17672
17668
|
return n;
|
|
17673
17669
|
}
|
|
17674
|
-
function
|
|
17670
|
+
function _T(t, e) {
|
|
17675
17671
|
const r = e.tapInternalKey, n = r && (0, ms.tweakKey)(r, e.tapMerkleRoot);
|
|
17676
17672
|
if (!n)
|
|
17677
17673
|
throw new Error(
|
|
@@ -17679,43 +17675,43 @@ function IT(t, e) {
|
|
|
17679
17675
|
);
|
|
17680
17676
|
return n.x;
|
|
17681
17677
|
}
|
|
17682
|
-
je.tweakInternalPubKey =
|
|
17683
|
-
function
|
|
17678
|
+
je.tweakInternalPubKey = _T;
|
|
17679
|
+
function TT(t) {
|
|
17684
17680
|
if (!(0, ip.isTaptree)(t))
|
|
17685
17681
|
throw new Error(
|
|
17686
17682
|
"Cannot convert taptree to tapleaf list. Expecting a tapree structure."
|
|
17687
17683
|
);
|
|
17688
17684
|
return Pd(t);
|
|
17689
17685
|
}
|
|
17690
|
-
je.tapTreeToList =
|
|
17686
|
+
je.tapTreeToList = TT;
|
|
17691
17687
|
function Pw(t = []) {
|
|
17692
17688
|
return t.length === 1 && t[0].depth === 0 ? {
|
|
17693
17689
|
output: t[0].script,
|
|
17694
17690
|
version: t[0].leafVersion
|
|
17695
|
-
} :
|
|
17691
|
+
} : CT(t);
|
|
17696
17692
|
}
|
|
17697
17693
|
je.tapTreeFromList = Pw;
|
|
17698
|
-
function
|
|
17699
|
-
return
|
|
17700
|
-
(n) => (0,
|
|
17694
|
+
function IT(t, e) {
|
|
17695
|
+
return OT(t).some(
|
|
17696
|
+
(n) => (0, gT.signatureBlocksAction)(n, PT, e)
|
|
17701
17697
|
);
|
|
17702
17698
|
}
|
|
17703
|
-
je.checkTaprootInputForSigs =
|
|
17704
|
-
function
|
|
17699
|
+
je.checkTaprootInputForSigs = IT;
|
|
17700
|
+
function PT(t) {
|
|
17705
17701
|
return {
|
|
17706
17702
|
signature: t.slice(0, 64),
|
|
17707
|
-
hashType: t.slice(64)[0] ||
|
|
17703
|
+
hashType: t.slice(64)[0] || mT.Transaction.SIGHASH_DEFAULT
|
|
17708
17704
|
};
|
|
17709
17705
|
}
|
|
17710
|
-
function
|
|
17706
|
+
function OT(t) {
|
|
17711
17707
|
const e = [];
|
|
17712
17708
|
if (t.tapKeySig && e.push(t.tapKeySig), t.tapScriptSig && e.push(...t.tapScriptSig.map((r) => r.signature)), !e.length) {
|
|
17713
|
-
const r =
|
|
17709
|
+
const r = BT(t.finalScriptWitness);
|
|
17714
17710
|
r && e.push(r);
|
|
17715
17711
|
}
|
|
17716
17712
|
return e;
|
|
17717
17713
|
}
|
|
17718
|
-
function
|
|
17714
|
+
function BT(t) {
|
|
17719
17715
|
if (!t) return;
|
|
17720
17716
|
const e = t.slice(2);
|
|
17721
17717
|
if (e.length === 64 || e.length === 65) return e;
|
|
@@ -17729,7 +17725,7 @@ function Pd(t, e = [], r = 0) {
|
|
|
17729
17725
|
script: t.output
|
|
17730
17726
|
}), e) : (t[0] && Pd(t[0], e, r + 1), t[1] && Pd(t[1], e, r + 1), e) : [];
|
|
17731
17727
|
}
|
|
17732
|
-
function
|
|
17728
|
+
function CT(t) {
|
|
17733
17729
|
let e;
|
|
17734
17730
|
for (const r of t)
|
|
17735
17731
|
if (e = Od(r, e), !e) throw new Error("No room left to insert tapleaf in tree");
|
|
@@ -17749,21 +17745,21 @@ function Od(t, e, r = 0) {
|
|
|
17749
17745
|
const s = Od(t, e && e[1], r + 1);
|
|
17750
17746
|
if (s) return [e && e[0], s];
|
|
17751
17747
|
}
|
|
17752
|
-
function
|
|
17748
|
+
function $T(t, e, r) {
|
|
17753
17749
|
const n = Ec(t) && Mi(e), s = Mi(t) && Ec(e), i = t === e && Ec(e) && Mi(e);
|
|
17754
17750
|
if (n || s || i)
|
|
17755
17751
|
throw new Error(
|
|
17756
17752
|
`Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
|
|
17757
17753
|
);
|
|
17758
17754
|
}
|
|
17759
|
-
function
|
|
17755
|
+
function RT(t, e, r) {
|
|
17760
17756
|
const n = Sc(t) && Mi(e), s = Mi(t) && Sc(e), i = t === e && Sc(e) && Mi(e);
|
|
17761
17757
|
if (n || s || i)
|
|
17762
17758
|
throw new Error(
|
|
17763
17759
|
`Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
|
|
17764
17760
|
);
|
|
17765
17761
|
}
|
|
17766
|
-
function
|
|
17762
|
+
function NT(t, e, r) {
|
|
17767
17763
|
if (e.tapMerkleRoot) {
|
|
17768
17764
|
const n = (e.tapLeafScript || []).every(
|
|
17769
17765
|
(i) => kf(i, e.tapMerkleRoot)
|
|
@@ -17792,14 +17788,14 @@ function kf(t, e) {
|
|
|
17792
17788
|
r
|
|
17793
17789
|
).equals(e);
|
|
17794
17790
|
}
|
|
17795
|
-
function
|
|
17791
|
+
function UT(t, e) {
|
|
17796
17792
|
const r = (0, ms.tapleafHash)({
|
|
17797
17793
|
output: e.script,
|
|
17798
17794
|
version: e.leafVersion
|
|
17799
17795
|
});
|
|
17800
|
-
return (t.tapScriptSig || []).filter((n) => n.leafHash.equals(r)).map((n) =>
|
|
17796
|
+
return (t.tapScriptSig || []).filter((n) => n.leafHash.equals(r)).map((n) => MT(e.script, n)).sort((n, s) => s.positionInScript - n.positionInScript).map((n) => n.signature);
|
|
17801
17797
|
}
|
|
17802
|
-
function
|
|
17798
|
+
function MT(t, e) {
|
|
17803
17799
|
return Object.assign(
|
|
17804
17800
|
{
|
|
17805
17801
|
positionInScript: (0, Iu.pubkeyPositionInScript)(
|
|
@@ -17810,13 +17806,13 @@ function jT(t, e) {
|
|
|
17810
17806
|
e
|
|
17811
17807
|
);
|
|
17812
17808
|
}
|
|
17813
|
-
function
|
|
17809
|
+
function FT(t, e, r) {
|
|
17814
17810
|
if (!t.tapScriptSig || !t.tapScriptSig.length)
|
|
17815
17811
|
throw new Error(
|
|
17816
17812
|
`Can not finalize taproot input #${e}. No tapleaf script signature provided.`
|
|
17817
17813
|
);
|
|
17818
17814
|
const n = (t.tapLeafScript || []).sort((s, i) => s.controlBlock.length - i.controlBlock.length).find(
|
|
17819
|
-
(s) =>
|
|
17815
|
+
(s) => jT(s, t.tapScriptSig, r)
|
|
17820
17816
|
);
|
|
17821
17817
|
if (!n)
|
|
17822
17818
|
throw new Error(
|
|
@@ -17824,7 +17820,7 @@ function LT(t, e, r) {
|
|
|
17824
17820
|
);
|
|
17825
17821
|
return n;
|
|
17826
17822
|
}
|
|
17827
|
-
function
|
|
17823
|
+
function jT(t, e, r) {
|
|
17828
17824
|
const n = (0, ms.tapleafHash)({
|
|
17829
17825
|
output: t.script,
|
|
17830
17826
|
version: t.leafVersion
|
|
@@ -17854,7 +17850,7 @@ let fy = class {
|
|
|
17854
17850
|
* Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
|
|
17855
17851
|
*/
|
|
17856
17852
|
constructor(e, r) {
|
|
17857
|
-
this.signer = e, this.internalPubkey = L0(), this.network =
|
|
17853
|
+
this.signer = e, this.internalPubkey = L0(), this.network = Pk(r);
|
|
17858
17854
|
}
|
|
17859
17855
|
/**
|
|
17860
17856
|
* Generates a taproot address for receiving the funds
|
|
@@ -18246,7 +18242,7 @@ let fy = class {
|
|
|
18246
18242
|
default:
|
|
18247
18243
|
throw new Error(ar.invalidLeaf);
|
|
18248
18244
|
}
|
|
18249
|
-
return Se.crypto.taggedHash("TapLeaf",
|
|
18245
|
+
return Se.crypto.taggedHash("TapLeaf", xk(n));
|
|
18250
18246
|
}
|
|
18251
18247
|
refundLeaf(e, r) {
|
|
18252
18248
|
return Se.script.fromASM(
|
|
@@ -18332,7 +18328,7 @@ let fy = class {
|
|
|
18332
18328
|
const n = this.leafHash(1, r), s = this.leafHash(2, r), i = this.leafHash(0, r);
|
|
18333
18329
|
switch (e) {
|
|
18334
18330
|
case 1: {
|
|
18335
|
-
const o =
|
|
18331
|
+
const o = _k(
|
|
18336
18332
|
i,
|
|
18337
18333
|
s
|
|
18338
18334
|
);
|
|
@@ -18361,7 +18357,7 @@ let fy = class {
|
|
|
18361
18357
|
return this.signer.getPublicKey();
|
|
18362
18358
|
}
|
|
18363
18359
|
};
|
|
18364
|
-
class
|
|
18360
|
+
class LT {
|
|
18365
18361
|
constructor(e, r) {
|
|
18366
18362
|
this.quoteUrl = new Vt(e), this.auth = r;
|
|
18367
18363
|
}
|
|
@@ -18873,7 +18869,7 @@ const Ow = [
|
|
|
18873
18869
|
stateMutability: "view",
|
|
18874
18870
|
type: "function"
|
|
18875
18871
|
}
|
|
18876
|
-
],
|
|
18872
|
+
], HT = [
|
|
18877
18873
|
{
|
|
18878
18874
|
inputs: [
|
|
18879
18875
|
{
|
|
@@ -19314,12 +19310,12 @@ class ja {
|
|
|
19314
19310
|
}
|
|
19315
19311
|
}
|
|
19316
19312
|
}
|
|
19317
|
-
const
|
|
19313
|
+
const DT = async (t, e) => {
|
|
19318
19314
|
if (!t.account) return B("No account found");
|
|
19319
19315
|
try {
|
|
19320
19316
|
const n = await Th({
|
|
19321
19317
|
address: Ae(e.htlc),
|
|
19322
|
-
abi:
|
|
19318
|
+
abi: HT,
|
|
19323
19319
|
client: t
|
|
19324
19320
|
}).write.initiate(
|
|
19325
19321
|
[
|
|
@@ -19334,7 +19330,7 @@ const VT = async (t, e) => {
|
|
|
19334
19330
|
} catch (r) {
|
|
19335
19331
|
return Wh(r) ? re("already initiated") : B("Failed to initiate on native HTLC", String(r));
|
|
19336
19332
|
}
|
|
19337
|
-
},
|
|
19333
|
+
}, zT = async (t, e, r, n) => {
|
|
19338
19334
|
if (!t.account) return B("No account found");
|
|
19339
19335
|
try {
|
|
19340
19336
|
const s = Th({
|
|
@@ -19389,7 +19385,7 @@ const VT = async (t, e) => {
|
|
|
19389
19385
|
} catch (s) {
|
|
19390
19386
|
return Wh(s) ? re("already initiated") : B("Failed to initiate on ERC20 HTLC", String(s));
|
|
19391
19387
|
}
|
|
19392
|
-
},
|
|
19388
|
+
}, VT = async (t, e) => {
|
|
19393
19389
|
if (!t.account) return B("No account found");
|
|
19394
19390
|
try {
|
|
19395
19391
|
const r = await t.sendTransaction({
|
|
@@ -19404,7 +19400,7 @@ const VT = async (t, e) => {
|
|
|
19404
19400
|
} catch (r) {
|
|
19405
19401
|
return B("Failed to execute approval: " + String(r));
|
|
19406
19402
|
}
|
|
19407
|
-
},
|
|
19403
|
+
}, GT = {
|
|
19408
19404
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
19409
19405
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
19410
19406
|
l2CrossDomainMessenger: {
|
|
@@ -19415,7 +19411,7 @@ const VT = async (t, e) => {
|
|
|
19415
19411
|
l2ToL1MessagePasser: {
|
|
19416
19412
|
address: "0x4200000000000000000000000000000000000016"
|
|
19417
19413
|
}
|
|
19418
|
-
},
|
|
19414
|
+
}, qT = {
|
|
19419
19415
|
block: /* @__PURE__ */ ME({
|
|
19420
19416
|
format(t) {
|
|
19421
19417
|
var r;
|
|
@@ -19447,14 +19443,14 @@ const VT = async (t, e) => {
|
|
|
19447
19443
|
}
|
|
19448
19444
|
})
|
|
19449
19445
|
};
|
|
19450
|
-
function
|
|
19451
|
-
return
|
|
19446
|
+
function WT(t, e) {
|
|
19447
|
+
return YT(t) ? ZT(t) : $S(t, e);
|
|
19452
19448
|
}
|
|
19453
|
-
const
|
|
19454
|
-
transaction:
|
|
19449
|
+
const KT = {
|
|
19450
|
+
transaction: WT
|
|
19455
19451
|
};
|
|
19456
|
-
function
|
|
19457
|
-
|
|
19452
|
+
function ZT(t) {
|
|
19453
|
+
XT(t);
|
|
19458
19454
|
const { sourceHash: e, data: r, from: n, gas: s, isSystemTx: i, mint: o, to: a, value: c } = t, u = [
|
|
19459
19455
|
e,
|
|
19460
19456
|
n,
|
|
@@ -19470,10 +19466,10 @@ function XT(t) {
|
|
|
19470
19466
|
ys(u)
|
|
19471
19467
|
]);
|
|
19472
19468
|
}
|
|
19473
|
-
function
|
|
19469
|
+
function YT(t) {
|
|
19474
19470
|
return t.type === "deposit" || typeof t.sourceHash < "u";
|
|
19475
19471
|
}
|
|
19476
|
-
function
|
|
19472
|
+
function XT(t) {
|
|
19477
19473
|
const { from: e, to: r } = t;
|
|
19478
19474
|
if (e && !ct(e))
|
|
19479
19475
|
throw new Ft({ address: e });
|
|
@@ -19482,10 +19478,10 @@ function QT(t) {
|
|
|
19482
19478
|
}
|
|
19483
19479
|
const Ki = {
|
|
19484
19480
|
blockTime: 2e3,
|
|
19485
|
-
contracts:
|
|
19486
|
-
formatters:
|
|
19487
|
-
serializers:
|
|
19488
|
-
},
|
|
19481
|
+
contracts: GT,
|
|
19482
|
+
formatters: qT,
|
|
19483
|
+
serializers: KT
|
|
19484
|
+
}, JT = /* @__PURE__ */ wt({
|
|
19489
19485
|
id: 42161,
|
|
19490
19486
|
name: "Arbitrum One",
|
|
19491
19487
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -19508,7 +19504,7 @@ const Ki = {
|
|
|
19508
19504
|
blockCreated: 7654707
|
|
19509
19505
|
}
|
|
19510
19506
|
}
|
|
19511
|
-
}),
|
|
19507
|
+
}), QT = /* @__PURE__ */ wt({
|
|
19512
19508
|
id: 421614,
|
|
19513
19509
|
name: "Arbitrum Sepolia",
|
|
19514
19510
|
blockTime: 250,
|
|
@@ -19640,7 +19636,7 @@ const go = 11155111, Cw = /* @__PURE__ */ wt({
|
|
|
19640
19636
|
({
|
|
19641
19637
|
...Cw
|
|
19642
19638
|
});
|
|
19643
|
-
const
|
|
19639
|
+
const eI = /* @__PURE__ */ wt({
|
|
19644
19640
|
id: 80094,
|
|
19645
19641
|
name: "Berachain",
|
|
19646
19642
|
blockTime: 2e3,
|
|
@@ -19674,7 +19670,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19674
19670
|
},
|
|
19675
19671
|
ensTlds: [".bera"],
|
|
19676
19672
|
testnet: !1
|
|
19677
|
-
}),
|
|
19673
|
+
}), tI = /* @__PURE__ */ wt({
|
|
19678
19674
|
id: 80084,
|
|
19679
19675
|
name: "Berachain bArtio",
|
|
19680
19676
|
nativeCurrency: {
|
|
@@ -19707,7 +19703,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19707
19703
|
}
|
|
19708
19704
|
},
|
|
19709
19705
|
testnet: !0
|
|
19710
|
-
}),
|
|
19706
|
+
}), rI = /* @__PURE__ */ wt({
|
|
19711
19707
|
id: 56,
|
|
19712
19708
|
name: "BNB Smart Chain",
|
|
19713
19709
|
blockTime: 750,
|
|
@@ -19732,7 +19728,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19732
19728
|
blockCreated: 15921452
|
|
19733
19729
|
}
|
|
19734
19730
|
}
|
|
19735
|
-
}),
|
|
19731
|
+
}), nI = /* @__PURE__ */ wt({
|
|
19736
19732
|
id: 97,
|
|
19737
19733
|
name: "BNB Smart Chain Testnet",
|
|
19738
19734
|
nativeCurrency: {
|
|
@@ -19757,7 +19753,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19757
19753
|
}
|
|
19758
19754
|
},
|
|
19759
19755
|
testnet: !0
|
|
19760
|
-
}),
|
|
19756
|
+
}), sI = /* @__PURE__ */ wt({
|
|
19761
19757
|
id: 5115,
|
|
19762
19758
|
name: "Citrea Testnet",
|
|
19763
19759
|
nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
|
|
@@ -19774,7 +19770,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19774
19770
|
}
|
|
19775
19771
|
},
|
|
19776
19772
|
testnet: !0
|
|
19777
|
-
}),
|
|
19773
|
+
}), iI = /* @__PURE__ */ wt({
|
|
19778
19774
|
id: 1116,
|
|
19779
19775
|
name: "Core Dao",
|
|
19780
19776
|
nativeCurrency: {
|
|
@@ -19798,7 +19794,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19798
19794
|
}
|
|
19799
19795
|
},
|
|
19800
19796
|
testnet: !1
|
|
19801
|
-
}),
|
|
19797
|
+
}), oI = 1, aI = /* @__PURE__ */ wt({
|
|
19802
19798
|
id: 21e6,
|
|
19803
19799
|
name: "Corn",
|
|
19804
19800
|
nativeCurrency: {
|
|
@@ -19822,8 +19818,8 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19822
19818
|
blockCreated: 3228
|
|
19823
19819
|
}
|
|
19824
19820
|
},
|
|
19825
|
-
sourceId:
|
|
19826
|
-
}),
|
|
19821
|
+
sourceId: oI
|
|
19822
|
+
}), cI = /* @__PURE__ */ wt({
|
|
19827
19823
|
id: 1,
|
|
19828
19824
|
name: "Ethereum",
|
|
19829
19825
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -19850,7 +19846,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19850
19846
|
blockCreated: 14353601
|
|
19851
19847
|
}
|
|
19852
19848
|
}
|
|
19853
|
-
}),
|
|
19849
|
+
}), uI = /* @__PURE__ */ wt({
|
|
19854
19850
|
id: 10143,
|
|
19855
19851
|
name: "Monad Testnet",
|
|
19856
19852
|
blockTime: 400,
|
|
@@ -19877,7 +19873,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19877
19873
|
}
|
|
19878
19874
|
},
|
|
19879
19875
|
testnet: !0
|
|
19880
|
-
}),
|
|
19876
|
+
}), fI = /* @__PURE__ */ wt({
|
|
19881
19877
|
id: 11155111,
|
|
19882
19878
|
name: "Sepolia",
|
|
19883
19879
|
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -19904,7 +19900,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19904
19900
|
}
|
|
19905
19901
|
},
|
|
19906
19902
|
testnet: !0
|
|
19907
|
-
}), cc = 1,
|
|
19903
|
+
}), cc = 1, lI = /* @__PURE__ */ wt({
|
|
19908
19904
|
...Ki,
|
|
19909
19905
|
id: 130,
|
|
19910
19906
|
name: "Unichain",
|
|
@@ -19945,14 +19941,14 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19945
19941
|
}
|
|
19946
19942
|
},
|
|
19947
19943
|
sourceId: cc
|
|
19948
|
-
}),
|
|
19949
|
-
...
|
|
19944
|
+
}), dI = {
|
|
19945
|
+
...fI,
|
|
19950
19946
|
rpcUrls: {
|
|
19951
19947
|
default: {
|
|
19952
19948
|
http: ["https://ethereum-sepolia-rpc.publicnode.com"]
|
|
19953
19949
|
}
|
|
19954
19950
|
}
|
|
19955
|
-
},
|
|
19951
|
+
}, hI = {
|
|
19956
19952
|
id: 3637,
|
|
19957
19953
|
name: "Botanix",
|
|
19958
19954
|
nativeCurrency: {
|
|
@@ -19971,7 +19967,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19971
19967
|
http: ["https://rpc.botanixlabs.com/"]
|
|
19972
19968
|
}
|
|
19973
19969
|
}
|
|
19974
|
-
},
|
|
19970
|
+
}, pI = {
|
|
19975
19971
|
id: 998,
|
|
19976
19972
|
name: "Hyperliquid EVM Testnet",
|
|
19977
19973
|
nativeCurrency: {
|
|
@@ -19990,7 +19986,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
19990
19986
|
http: ["https://rpc.hyperliquid-testnet.xyz/evm"]
|
|
19991
19987
|
}
|
|
19992
19988
|
}
|
|
19993
|
-
},
|
|
19989
|
+
}, yI = {
|
|
19994
19990
|
id: 999,
|
|
19995
19991
|
name: "HyperEVM",
|
|
19996
19992
|
nativeCurrency: {
|
|
@@ -20009,7 +20005,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
20009
20005
|
http: ["https://rpc.hyperliquid.xyz/evm"]
|
|
20010
20006
|
}
|
|
20011
20007
|
}
|
|
20012
|
-
},
|
|
20008
|
+
}, mI = {
|
|
20013
20009
|
id: 8150,
|
|
20014
20010
|
name: "Alpen Network",
|
|
20015
20011
|
nativeCurrency: {
|
|
@@ -20028,7 +20024,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
20028
20024
|
http: ["https://rpc.pectra-testnet.alpenlabs.io"]
|
|
20029
20025
|
}
|
|
20030
20026
|
}
|
|
20031
|
-
},
|
|
20027
|
+
}, bI = {
|
|
20032
20028
|
id: 143,
|
|
20033
20029
|
name: "Monad",
|
|
20034
20030
|
nativeCurrency: {
|
|
@@ -20048,31 +20044,31 @@ const rI = /* @__PURE__ */ wt({
|
|
|
20048
20044
|
}
|
|
20049
20045
|
}
|
|
20050
20046
|
}, op = {
|
|
20051
|
-
ethereum:
|
|
20052
|
-
arbitrum:
|
|
20053
|
-
ethereum_sepolia:
|
|
20054
|
-
arbitrum_sepolia:
|
|
20047
|
+
ethereum: cI,
|
|
20048
|
+
arbitrum: JT,
|
|
20049
|
+
ethereum_sepolia: dI,
|
|
20050
|
+
arbitrum_sepolia: QT,
|
|
20055
20051
|
ethereum_localnet: A6,
|
|
20056
20052
|
arbitrum_localnet: S6,
|
|
20057
20053
|
base_sepolia: Cw,
|
|
20058
20054
|
base: Bw,
|
|
20059
|
-
bera_testnet:
|
|
20060
|
-
citrea_testnet:
|
|
20061
|
-
core:
|
|
20062
|
-
bera:
|
|
20063
|
-
monad:
|
|
20064
|
-
monad_testnet:
|
|
20065
|
-
hyperliquid_testnet:
|
|
20066
|
-
hyperliquid:
|
|
20067
|
-
unichain:
|
|
20068
|
-
corn:
|
|
20069
|
-
botanix:
|
|
20070
|
-
bnbchain:
|
|
20071
|
-
bnbchain_testnet:
|
|
20072
|
-
alpen_testnet:
|
|
20055
|
+
bera_testnet: tI,
|
|
20056
|
+
citrea_testnet: sI,
|
|
20057
|
+
core: iI,
|
|
20058
|
+
bera: eI,
|
|
20059
|
+
monad: bI,
|
|
20060
|
+
monad_testnet: uI,
|
|
20061
|
+
hyperliquid_testnet: pI,
|
|
20062
|
+
hyperliquid: yI,
|
|
20063
|
+
unichain: lI,
|
|
20064
|
+
corn: aI,
|
|
20065
|
+
botanix: hI,
|
|
20066
|
+
bnbchain: rI,
|
|
20067
|
+
bnbchain_testnet: nI,
|
|
20068
|
+
alpen_testnet: mI,
|
|
20073
20069
|
hypercore: {},
|
|
20074
20070
|
hypercore_testnet: {}
|
|
20075
|
-
},
|
|
20071
|
+
}, gI = (t) => {
|
|
20076
20072
|
for (const [e, r] of Object.entries(op))
|
|
20077
20073
|
if (r.id === t)
|
|
20078
20074
|
return e;
|
|
@@ -20095,7 +20091,7 @@ const rI = /* @__PURE__ */ wt({
|
|
|
20095
20091
|
walletClient: a
|
|
20096
20092
|
});
|
|
20097
20093
|
} catch (a) {
|
|
20098
|
-
if (
|
|
20094
|
+
if (wI(a))
|
|
20099
20095
|
if (a.code === 4902 || a.code === -32603)
|
|
20100
20096
|
try {
|
|
20101
20097
|
await e.addChain({ chain: r });
|
|
@@ -20128,8 +20124,8 @@ const rI = /* @__PURE__ */ wt({
|
|
|
20128
20124
|
}
|
|
20129
20125
|
else
|
|
20130
20126
|
return B("Chain not supported");
|
|
20131
|
-
},
|
|
20132
|
-
class
|
|
20127
|
+
}, wI = (t) => typeof t == "object" && t != null && ("code" in t || "message" in t || "body" in t);
|
|
20128
|
+
class vI {
|
|
20133
20129
|
constructor(e, r, n) {
|
|
20134
20130
|
this.wallet = r, this.auth = n, this.url = e instanceof Vt ? e : new Vt(e), this.relayer = new ja(this.auth, this.url);
|
|
20135
20131
|
}
|
|
@@ -20158,10 +20154,10 @@ class SI {
|
|
|
20158
20154
|
amount: BigInt(s.amount),
|
|
20159
20155
|
secretHash: Ae(s.secret_hash)
|
|
20160
20156
|
};
|
|
20161
|
-
return k6(o.chain, o.symbol) ?
|
|
20157
|
+
return k6(o.chain, o.symbol) ? DT(this.wallet, {
|
|
20162
20158
|
...a,
|
|
20163
20159
|
htlc: i.val.htlcAddress
|
|
20164
|
-
}) :
|
|
20160
|
+
}) : zT(this.wallet, this.url, this.auth, {
|
|
20165
20161
|
...a,
|
|
20166
20162
|
htlc: i.val.htlcAddress,
|
|
20167
20163
|
token: i.val.tokenAddress,
|
|
@@ -20170,7 +20166,7 @@ class SI {
|
|
|
20170
20166
|
}
|
|
20171
20167
|
// ------------------ INITIATE FROM API RESPONSE ------------------
|
|
20172
20168
|
async initiateFromAPI(e) {
|
|
20173
|
-
const r =
|
|
20169
|
+
const r = gI(
|
|
20174
20170
|
e.initiate_transaction.chain_id
|
|
20175
20171
|
);
|
|
20176
20172
|
if (!r) return B("Unsupported chain");
|
|
@@ -20189,7 +20185,7 @@ class SI {
|
|
|
20189
20185
|
return c.ok ? !c.val || c.val.status !== "success" ? B("Native initiate transaction failed") : re(a) : B(c.error);
|
|
20190
20186
|
}
|
|
20191
20187
|
if (e.approval_transaction) {
|
|
20192
|
-
const o = await
|
|
20188
|
+
const o = await VT(
|
|
20193
20189
|
this.wallet,
|
|
20194
20190
|
e.approval_transaction
|
|
20195
20191
|
);
|
|
@@ -21369,7 +21365,7 @@ const $w = [
|
|
|
21369
21365
|
}
|
|
21370
21366
|
]
|
|
21371
21367
|
}
|
|
21372
|
-
],
|
|
21368
|
+
], EI = async (t, e, r, n, s) => {
|
|
21373
21369
|
try {
|
|
21374
21370
|
const i = await Ac(
|
|
21375
21371
|
t.address,
|
|
@@ -21442,7 +21438,7 @@ const $w = [
|
|
|
21442
21438
|
`Failed to check allowance: ${s instanceof Error ? s.message : String(s)}`
|
|
21443
21439
|
);
|
|
21444
21440
|
}
|
|
21445
|
-
},
|
|
21441
|
+
}, SI = async (t, e, r, n, s) => {
|
|
21446
21442
|
const i = await Ac(
|
|
21447
21443
|
t,
|
|
21448
21444
|
e,
|
|
@@ -21703,7 +21699,7 @@ const $w = [
|
|
|
21703
21699
|
}
|
|
21704
21700
|
]
|
|
21705
21701
|
}
|
|
21706
|
-
],
|
|
21702
|
+
], AI = {
|
|
21707
21703
|
StarknetDomain: [
|
|
21708
21704
|
{ name: "name", type: "shortstring" },
|
|
21709
21705
|
{ name: "version", type: "shortstring" },
|
|
@@ -21717,7 +21713,7 @@ const $w = [
|
|
|
21717
21713
|
{ name: "secretHash", type: "u128*" }
|
|
21718
21714
|
]
|
|
21719
21715
|
};
|
|
21720
|
-
class
|
|
21716
|
+
class xI {
|
|
21721
21717
|
constructor(e, r, n, s, i) {
|
|
21722
21718
|
this.url = e instanceof Vt ? e : new Vt(e), this.account = r, this.starknetProvider = new zm({
|
|
21723
21719
|
nodeUrl: i || Uc[n].nodeUrl
|
|
@@ -21739,7 +21735,7 @@ class _I {
|
|
|
21739
21735
|
Rw,
|
|
21740
21736
|
e.source_swap.asset,
|
|
21741
21737
|
this.account
|
|
21742
|
-
), o = await (i == null ? void 0 : i.token()), a = Vm.toHex(o), c = await
|
|
21738
|
+
), o = await (i == null ? void 0 : i.token()), a = Vm.toHex(o), c = await SI(
|
|
21743
21739
|
this.account.address,
|
|
21744
21740
|
a,
|
|
21745
21741
|
r.asset,
|
|
@@ -21789,7 +21785,7 @@ class _I {
|
|
|
21789
21785
|
revision: j6.ACTIVE
|
|
21790
21786
|
},
|
|
21791
21787
|
primaryType: "Initiate",
|
|
21792
|
-
types:
|
|
21788
|
+
types: AI,
|
|
21793
21789
|
message: {
|
|
21794
21790
|
redeemer: n,
|
|
21795
21791
|
amount: Bo.uint256(s),
|
|
@@ -21883,12 +21879,12 @@ class _I {
|
|
|
21883
21879
|
return B("Refund is taken care of by the relayer");
|
|
21884
21880
|
}
|
|
21885
21881
|
}
|
|
21886
|
-
const
|
|
21882
|
+
const kI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", _I = {
|
|
21887
21883
|
name: "solana_spl_swaps",
|
|
21888
21884
|
version: "0.4.0",
|
|
21889
21885
|
spec: "0.1.0",
|
|
21890
21886
|
description: "Created with Anchor"
|
|
21891
|
-
},
|
|
21887
|
+
}, TI = [
|
|
21892
21888
|
{
|
|
21893
21889
|
name: "initiate",
|
|
21894
21890
|
docs: [
|
|
@@ -22217,7 +22213,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22217
22213
|
],
|
|
22218
22214
|
args: []
|
|
22219
22215
|
}
|
|
22220
|
-
],
|
|
22216
|
+
], II = [
|
|
22221
22217
|
{
|
|
22222
22218
|
name: "SwapAccount",
|
|
22223
22219
|
discriminator: [
|
|
@@ -22231,7 +22227,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22231
22227
|
182
|
|
22232
22228
|
]
|
|
22233
22229
|
}
|
|
22234
|
-
],
|
|
22230
|
+
], PI = [
|
|
22235
22231
|
{
|
|
22236
22232
|
name: "Initiated",
|
|
22237
22233
|
discriminator: [
|
|
@@ -22284,7 +22280,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22284
22280
|
99
|
|
22285
22281
|
]
|
|
22286
22282
|
}
|
|
22287
|
-
],
|
|
22283
|
+
], OI = [
|
|
22288
22284
|
{
|
|
22289
22285
|
code: 6e3,
|
|
22290
22286
|
name: "InvalidRedeemer",
|
|
@@ -22305,7 +22301,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22305
22301
|
name: "RefundBeforeExpiry",
|
|
22306
22302
|
msg: "Attempt to perform a refund before expiry time"
|
|
22307
22303
|
}
|
|
22308
|
-
],
|
|
22304
|
+
], BI = [
|
|
22309
22305
|
{
|
|
22310
22306
|
name: "Initiated",
|
|
22311
22307
|
docs: [
|
|
@@ -22506,19 +22502,19 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22506
22502
|
}
|
|
22507
22503
|
}
|
|
22508
22504
|
], dy = {
|
|
22509
|
-
address:
|
|
22510
|
-
metadata:
|
|
22511
|
-
instructions:
|
|
22512
|
-
accounts:
|
|
22513
|
-
events:
|
|
22514
|
-
errors:
|
|
22515
|
-
types:
|
|
22516
|
-
},
|
|
22505
|
+
address: kI,
|
|
22506
|
+
metadata: _I,
|
|
22507
|
+
instructions: TI,
|
|
22508
|
+
accounts: II,
|
|
22509
|
+
events: PI,
|
|
22510
|
+
errors: OI,
|
|
22511
|
+
types: BI
|
|
22512
|
+
}, CI = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", $I = {
|
|
22517
22513
|
name: "solana_native_swaps",
|
|
22518
22514
|
version: "0.3.0",
|
|
22519
22515
|
spec: "0.1.0",
|
|
22520
22516
|
description: "Created with Anchor"
|
|
22521
|
-
},
|
|
22517
|
+
}, RI = [
|
|
22522
22518
|
{
|
|
22523
22519
|
name: "initiate",
|
|
22524
22520
|
discriminator: [
|
|
@@ -22698,7 +22694,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22698
22694
|
],
|
|
22699
22695
|
args: []
|
|
22700
22696
|
}
|
|
22701
|
-
],
|
|
22697
|
+
], NI = [
|
|
22702
22698
|
{
|
|
22703
22699
|
name: "SwapAccount",
|
|
22704
22700
|
discriminator: [
|
|
@@ -22712,7 +22708,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22712
22708
|
182
|
|
22713
22709
|
]
|
|
22714
22710
|
}
|
|
22715
|
-
],
|
|
22711
|
+
], UI = [
|
|
22716
22712
|
{
|
|
22717
22713
|
name: "Initiated",
|
|
22718
22714
|
discriminator: [
|
|
@@ -22765,7 +22761,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22765
22761
|
99
|
|
22766
22762
|
]
|
|
22767
22763
|
}
|
|
22768
|
-
],
|
|
22764
|
+
], MI = [
|
|
22769
22765
|
{
|
|
22770
22766
|
code: 6e3,
|
|
22771
22767
|
name: "InvalidInitiator",
|
|
@@ -22786,7 +22782,7 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22786
22782
|
name: "RefundBeforeExpiry",
|
|
22787
22783
|
msg: "Attempt to perform a refund before expiry time"
|
|
22788
22784
|
}
|
|
22789
|
-
],
|
|
22785
|
+
], FI = [
|
|
22790
22786
|
{
|
|
22791
22787
|
name: "Initiated",
|
|
22792
22788
|
type: {
|
|
@@ -22917,23 +22913,23 @@ const TI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", II = {
|
|
|
22917
22913
|
}
|
|
22918
22914
|
}
|
|
22919
22915
|
], Bd = {
|
|
22920
|
-
address:
|
|
22921
|
-
metadata:
|
|
22922
|
-
instructions:
|
|
22923
|
-
accounts:
|
|
22924
|
-
events:
|
|
22925
|
-
errors:
|
|
22926
|
-
types:
|
|
22916
|
+
address: CI,
|
|
22917
|
+
metadata: $I,
|
|
22918
|
+
instructions: RI,
|
|
22919
|
+
accounts: NI,
|
|
22920
|
+
events: UI,
|
|
22921
|
+
errors: MI,
|
|
22922
|
+
types: FI
|
|
22927
22923
|
};
|
|
22928
22924
|
var _n = {}, Pu = {};
|
|
22929
22925
|
Object.defineProperty(Pu, "__esModule", { value: !0 });
|
|
22930
|
-
Pu.encode =
|
|
22931
|
-
Pu.decode =
|
|
22926
|
+
Pu.encode = jI;
|
|
22927
|
+
Pu.decode = LI;
|
|
22932
22928
|
const hy = ai;
|
|
22933
|
-
function
|
|
22929
|
+
function jI(t) {
|
|
22934
22930
|
return t.reduce((e, r) => e + r.toString(16).padStart(2, "0"), "0x");
|
|
22935
22931
|
}
|
|
22936
|
-
function
|
|
22932
|
+
function LI(t) {
|
|
22937
22933
|
t.indexOf("0x") === 0 && (t = t.substr(2)), t.length % 2 === 1 && (t = "0" + t);
|
|
22938
22934
|
let e = t.match(/.{2}/g);
|
|
22939
22935
|
return e === null ? hy.Buffer.from([]) : hy.Buffer.from(e.map((r) => parseInt(r, 16)));
|
|
@@ -22941,13 +22937,13 @@ function DI(t) {
|
|
|
22941
22937
|
var Ou = {}, Js = {}, _f;
|
|
22942
22938
|
Object.defineProperty(Js, "__esModule", { value: !0 });
|
|
22943
22939
|
Js.isVersionedTransaction = Js.isBrowser = void 0;
|
|
22944
|
-
Js.chunks =
|
|
22940
|
+
Js.chunks = HI;
|
|
22945
22941
|
Js.isBrowser = process.env.ANCHOR_BROWSER || typeof window < "u" && !(!((_f = window.process) === null || _f === void 0) && _f.hasOwnProperty("type"));
|
|
22946
|
-
function
|
|
22942
|
+
function HI(t, e) {
|
|
22947
22943
|
return Array.apply(0, new Array(Math.ceil(t.length / e))).map((r, n) => t.slice(n * e, (n + 1) * e));
|
|
22948
22944
|
}
|
|
22949
|
-
const
|
|
22950
|
-
Js.isVersionedTransaction =
|
|
22945
|
+
const DI = (t) => "version" in t;
|
|
22946
|
+
Js.isVersionedTransaction = DI;
|
|
22951
22947
|
var Tf = {}, If = {}, Pf, py;
|
|
22952
22948
|
function Nw() {
|
|
22953
22949
|
return py || (py = 1, Pf = function() {
|
|
@@ -22992,19 +22988,19 @@ function Uw() {
|
|
|
22992
22988
|
return my || (my = 1, Bf = Object), Bf;
|
|
22993
22989
|
}
|
|
22994
22990
|
var Cf, by;
|
|
22995
|
-
function
|
|
22991
|
+
function zI() {
|
|
22996
22992
|
return by || (by = 1, Cf = Error), Cf;
|
|
22997
22993
|
}
|
|
22998
22994
|
var $f, gy;
|
|
22999
|
-
function
|
|
22995
|
+
function VI() {
|
|
23000
22996
|
return gy || (gy = 1, $f = EvalError), $f;
|
|
23001
22997
|
}
|
|
23002
22998
|
var Rf, wy;
|
|
23003
|
-
function
|
|
22999
|
+
function GI() {
|
|
23004
23000
|
return wy || (wy = 1, Rf = RangeError), Rf;
|
|
23005
23001
|
}
|
|
23006
23002
|
var Nf, vy;
|
|
23007
|
-
function
|
|
23003
|
+
function qI() {
|
|
23008
23004
|
return vy || (vy = 1, Nf = ReferenceError), Nf;
|
|
23009
23005
|
}
|
|
23010
23006
|
var Uf, Ey;
|
|
@@ -23016,57 +23012,57 @@ function La() {
|
|
|
23016
23012
|
return Sy || (Sy = 1, Mf = TypeError), Mf;
|
|
23017
23013
|
}
|
|
23018
23014
|
var Ff, Ay;
|
|
23019
|
-
function
|
|
23015
|
+
function WI() {
|
|
23020
23016
|
return Ay || (Ay = 1, Ff = URIError), Ff;
|
|
23021
23017
|
}
|
|
23022
23018
|
var jf, xy;
|
|
23023
|
-
function
|
|
23019
|
+
function KI() {
|
|
23024
23020
|
return xy || (xy = 1, jf = Math.abs), jf;
|
|
23025
23021
|
}
|
|
23026
23022
|
var Lf, ky;
|
|
23027
|
-
function
|
|
23023
|
+
function ZI() {
|
|
23028
23024
|
return ky || (ky = 1, Lf = Math.floor), Lf;
|
|
23029
23025
|
}
|
|
23030
23026
|
var Hf, _y;
|
|
23031
|
-
function
|
|
23027
|
+
function YI() {
|
|
23032
23028
|
return _y || (_y = 1, Hf = Math.max), Hf;
|
|
23033
23029
|
}
|
|
23034
23030
|
var Df, Ty;
|
|
23035
|
-
function
|
|
23031
|
+
function XI() {
|
|
23036
23032
|
return Ty || (Ty = 1, Df = Math.min), Df;
|
|
23037
23033
|
}
|
|
23038
23034
|
var zf, Iy;
|
|
23039
|
-
function
|
|
23035
|
+
function JI() {
|
|
23040
23036
|
return Iy || (Iy = 1, zf = Math.pow), zf;
|
|
23041
23037
|
}
|
|
23042
23038
|
var Vf, Py;
|
|
23043
|
-
function
|
|
23039
|
+
function QI() {
|
|
23044
23040
|
return Py || (Py = 1, Vf = Math.round), Vf;
|
|
23045
23041
|
}
|
|
23046
23042
|
var Gf, Oy;
|
|
23047
|
-
function
|
|
23043
|
+
function eP() {
|
|
23048
23044
|
return Oy || (Oy = 1, Gf = Number.isNaN || function(e) {
|
|
23049
23045
|
return e !== e;
|
|
23050
23046
|
}), Gf;
|
|
23051
23047
|
}
|
|
23052
23048
|
var qf, By;
|
|
23053
|
-
function
|
|
23049
|
+
function tP() {
|
|
23054
23050
|
if (By) return qf;
|
|
23055
23051
|
By = 1;
|
|
23056
|
-
var t =
|
|
23052
|
+
var t = eP();
|
|
23057
23053
|
return qf = function(r) {
|
|
23058
23054
|
return t(r) || r === 0 ? r : r < 0 ? -1 : 1;
|
|
23059
23055
|
}, qf;
|
|
23060
23056
|
}
|
|
23061
23057
|
var Wf, Cy;
|
|
23062
|
-
function
|
|
23058
|
+
function rP() {
|
|
23063
23059
|
return Cy || (Cy = 1, Wf = Object.getOwnPropertyDescriptor), Wf;
|
|
23064
23060
|
}
|
|
23065
23061
|
var Kf, $y;
|
|
23066
23062
|
function io() {
|
|
23067
23063
|
if ($y) return Kf;
|
|
23068
23064
|
$y = 1;
|
|
23069
|
-
var t =
|
|
23065
|
+
var t = rP();
|
|
23070
23066
|
if (t)
|
|
23071
23067
|
try {
|
|
23072
23068
|
t([], "length");
|
|
@@ -23089,7 +23085,7 @@ function Cu() {
|
|
|
23089
23085
|
return Zf = t, Zf;
|
|
23090
23086
|
}
|
|
23091
23087
|
var Yf, Ny;
|
|
23092
|
-
function
|
|
23088
|
+
function nP() {
|
|
23093
23089
|
if (Ny) return Yf;
|
|
23094
23090
|
Ny = 1;
|
|
23095
23091
|
var t = typeof Symbol < "u" && Symbol, e = Nw();
|
|
@@ -23109,7 +23105,7 @@ function jw() {
|
|
|
23109
23105
|
return Jf = t.getPrototypeOf || null, Jf;
|
|
23110
23106
|
}
|
|
23111
23107
|
var Qf, Fy;
|
|
23112
|
-
function
|
|
23108
|
+
function sP() {
|
|
23113
23109
|
if (Fy) return Qf;
|
|
23114
23110
|
Fy = 1;
|
|
23115
23111
|
var t = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, r = Math.max, n = "[object Function]", s = function(c, u) {
|
|
@@ -23157,7 +23153,7 @@ var el, jy;
|
|
|
23157
23153
|
function Ha() {
|
|
23158
23154
|
if (jy) return el;
|
|
23159
23155
|
jy = 1;
|
|
23160
|
-
var t =
|
|
23156
|
+
var t = sP();
|
|
23161
23157
|
return el = Function.prototype.bind || t, el;
|
|
23162
23158
|
}
|
|
23163
23159
|
var tl, Ly;
|
|
@@ -23169,14 +23165,14 @@ function cp() {
|
|
|
23169
23165
|
return Hy || (Hy = 1, rl = Function.prototype.apply), rl;
|
|
23170
23166
|
}
|
|
23171
23167
|
var nl, Dy;
|
|
23172
|
-
function
|
|
23168
|
+
function iP() {
|
|
23173
23169
|
return Dy || (Dy = 1, nl = typeof Reflect < "u" && Reflect && Reflect.apply), nl;
|
|
23174
23170
|
}
|
|
23175
23171
|
var sl, zy;
|
|
23176
23172
|
function Lw() {
|
|
23177
23173
|
if (zy) return sl;
|
|
23178
23174
|
zy = 1;
|
|
23179
|
-
var t = Ha(), e = cp(), r = ap(), n =
|
|
23175
|
+
var t = Ha(), e = cp(), r = ap(), n = iP();
|
|
23180
23176
|
return sl = n || t.call(r, e), sl;
|
|
23181
23177
|
}
|
|
23182
23178
|
var il, Vy;
|
|
@@ -23191,7 +23187,7 @@ function up() {
|
|
|
23191
23187
|
}, il;
|
|
23192
23188
|
}
|
|
23193
23189
|
var ol, Gy;
|
|
23194
|
-
function
|
|
23190
|
+
function oP() {
|
|
23195
23191
|
if (Gy) return ol;
|
|
23196
23192
|
Gy = 1;
|
|
23197
23193
|
var t = up(), e = io(), r;
|
|
@@ -23218,7 +23214,7 @@ var al, qy;
|
|
|
23218
23214
|
function fp() {
|
|
23219
23215
|
if (qy) return al;
|
|
23220
23216
|
qy = 1;
|
|
23221
|
-
var t = Fw(), e = jw(), r =
|
|
23217
|
+
var t = Fw(), e = jw(), r = oP();
|
|
23222
23218
|
return al = t ? function(s) {
|
|
23223
23219
|
return t(s);
|
|
23224
23220
|
} : e ? function(s) {
|
|
@@ -23240,7 +23236,7 @@ var ul, Ky;
|
|
|
23240
23236
|
function Dw() {
|
|
23241
23237
|
if (Ky) return ul;
|
|
23242
23238
|
Ky = 1;
|
|
23243
|
-
var t, e = Uw(), r =
|
|
23239
|
+
var t, e = Uw(), r = zI(), n = VI(), s = GI(), i = qI(), o = Mw(), a = La(), c = WI(), u = KI(), f = ZI(), l = YI(), p = XI(), d = JI(), m = QI(), b = tP(), v = Function, S = function(oe) {
|
|
23244
23240
|
try {
|
|
23245
23241
|
return v('"use strict"; return (' + oe + ").constructor;")();
|
|
23246
23242
|
} catch {
|
|
@@ -23257,7 +23253,7 @@ function Dw() {
|
|
|
23257
23253
|
return g;
|
|
23258
23254
|
}
|
|
23259
23255
|
}
|
|
23260
|
-
}() : g, k =
|
|
23256
|
+
}() : g, k = nP()(), O = fp(), N = jw(), $ = Fw(), L = cp(), M = ap(), V = {}, q = typeof Uint8Array > "u" || !O ? t : O(Uint8Array), J = {
|
|
23261
23257
|
__proto__: null,
|
|
23262
23258
|
"%AggregateError%": typeof AggregateError > "u" ? t : AggregateError,
|
|
23263
23259
|
"%Array%": Array,
|
|
@@ -23490,7 +23486,7 @@ function Da() {
|
|
|
23490
23486
|
}, fl;
|
|
23491
23487
|
}
|
|
23492
23488
|
var ll, Yy;
|
|
23493
|
-
function
|
|
23489
|
+
function aP() {
|
|
23494
23490
|
if (Yy) return ll;
|
|
23495
23491
|
Yy = 1;
|
|
23496
23492
|
var t = Bu()(), e = Da(), r = e("Object.prototype.toString"), n = function(a) {
|
|
@@ -23503,7 +23499,7 @@ function uP() {
|
|
|
23503
23499
|
return n.isLegacyArguments = s, ll = i ? n : s, ll;
|
|
23504
23500
|
}
|
|
23505
23501
|
var dl, Xy;
|
|
23506
|
-
function
|
|
23502
|
+
function cP() {
|
|
23507
23503
|
if (Xy) return dl;
|
|
23508
23504
|
Xy = 1;
|
|
23509
23505
|
var t = Da(), e = Bu()(), r = Hw(), n = io(), s;
|
|
@@ -23547,10 +23543,10 @@ function fP() {
|
|
|
23547
23543
|
return dl = s, dl;
|
|
23548
23544
|
}
|
|
23549
23545
|
var hl, Jy;
|
|
23550
|
-
function
|
|
23546
|
+
function uP() {
|
|
23551
23547
|
if (Jy) return hl;
|
|
23552
23548
|
Jy = 1;
|
|
23553
|
-
var t = Da(), e =
|
|
23549
|
+
var t = Da(), e = cP(), r = t("RegExp.prototype.exec"), n = La();
|
|
23554
23550
|
return hl = function(i) {
|
|
23555
23551
|
if (!e(i))
|
|
23556
23552
|
throw new n("`regex` must be a RegExp");
|
|
@@ -23560,10 +23556,10 @@ function lP() {
|
|
|
23560
23556
|
}, hl;
|
|
23561
23557
|
}
|
|
23562
23558
|
var pl, Qy;
|
|
23563
|
-
function
|
|
23559
|
+
function fP() {
|
|
23564
23560
|
if (Qy) return pl;
|
|
23565
23561
|
Qy = 1;
|
|
23566
|
-
var t = Da(), e =
|
|
23562
|
+
var t = Da(), e = uP(), r = e(/^\s*(?:function)?\*/), n = Bu()(), s = fp(), i = t("Object.prototype.toString"), o = t("Function.prototype.toString"), a = function() {
|
|
23567
23563
|
if (!n)
|
|
23568
23564
|
return !1;
|
|
23569
23565
|
try {
|
|
@@ -23593,7 +23589,7 @@ function dP() {
|
|
|
23593
23589
|
}, pl;
|
|
23594
23590
|
}
|
|
23595
23591
|
var yl, em;
|
|
23596
|
-
function
|
|
23592
|
+
function lP() {
|
|
23597
23593
|
if (em) return yl;
|
|
23598
23594
|
em = 1;
|
|
23599
23595
|
var t = Function.prototype.toString, e = typeof Reflect == "object" && Reflect !== null && Reflect.apply, r, n;
|
|
@@ -23665,10 +23661,10 @@ function hP() {
|
|
|
23665
23661
|
}, yl;
|
|
23666
23662
|
}
|
|
23667
23663
|
var ml, tm;
|
|
23668
|
-
function
|
|
23664
|
+
function dP() {
|
|
23669
23665
|
if (tm) return ml;
|
|
23670
23666
|
tm = 1;
|
|
23671
|
-
var t =
|
|
23667
|
+
var t = lP(), e = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, u, f) {
|
|
23672
23668
|
for (var l = 0, p = c.length; l < p; l++)
|
|
23673
23669
|
r.call(c, l) && (f == null ? u(c[l], l, c) : u.call(f, c[l], l, c));
|
|
23674
23670
|
}, s = function(c, u, f) {
|
|
@@ -23689,7 +23685,7 @@ function pP() {
|
|
|
23689
23685
|
}, ml;
|
|
23690
23686
|
}
|
|
23691
23687
|
var bl, rm;
|
|
23692
|
-
function
|
|
23688
|
+
function hP() {
|
|
23693
23689
|
return rm || (rm = 1, bl = [
|
|
23694
23690
|
"Float16Array",
|
|
23695
23691
|
"Float32Array",
|
|
@@ -23706,10 +23702,10 @@ function yP() {
|
|
|
23706
23702
|
]), bl;
|
|
23707
23703
|
}
|
|
23708
23704
|
var gl, nm;
|
|
23709
|
-
function
|
|
23705
|
+
function pP() {
|
|
23710
23706
|
if (nm) return gl;
|
|
23711
23707
|
nm = 1;
|
|
23712
|
-
var t =
|
|
23708
|
+
var t = hP(), e = typeof globalThis > "u" ? an : globalThis;
|
|
23713
23709
|
return gl = function() {
|
|
23714
23710
|
for (var n = [], s = 0; s < t.length; s++)
|
|
23715
23711
|
typeof e[t[s]] == "function" && (n[n.length] = t[s]);
|
|
@@ -23717,7 +23713,7 @@ function mP() {
|
|
|
23717
23713
|
}, gl;
|
|
23718
23714
|
}
|
|
23719
23715
|
var wl = { exports: {} }, vl, sm;
|
|
23720
|
-
function
|
|
23716
|
+
function yP() {
|
|
23721
23717
|
if (sm) return vl;
|
|
23722
23718
|
sm = 1;
|
|
23723
23719
|
var t = Cu(), e = Mw(), r = La(), n = io();
|
|
@@ -23749,7 +23745,7 @@ function bP() {
|
|
|
23749
23745
|
}, vl;
|
|
23750
23746
|
}
|
|
23751
23747
|
var El, im;
|
|
23752
|
-
function
|
|
23748
|
+
function mP() {
|
|
23753
23749
|
if (im) return El;
|
|
23754
23750
|
im = 1;
|
|
23755
23751
|
var t = Cu(), e = function() {
|
|
@@ -23766,10 +23762,10 @@ function gP() {
|
|
|
23766
23762
|
}, El = e, El;
|
|
23767
23763
|
}
|
|
23768
23764
|
var Sl, om;
|
|
23769
|
-
function
|
|
23765
|
+
function bP() {
|
|
23770
23766
|
if (om) return Sl;
|
|
23771
23767
|
om = 1;
|
|
23772
|
-
var t = Dw(), e =
|
|
23768
|
+
var t = Dw(), e = yP(), r = mP()(), n = io(), s = La(), i = t("%Math.floor%");
|
|
23773
23769
|
return Sl = function(a, c) {
|
|
23774
23770
|
if (typeof a != "function")
|
|
23775
23771
|
throw new s("`fn` is not a function");
|
|
@@ -23796,7 +23792,7 @@ function wP() {
|
|
|
23796
23792
|
}, Sl;
|
|
23797
23793
|
}
|
|
23798
23794
|
var Al, am;
|
|
23799
|
-
function
|
|
23795
|
+
function gP() {
|
|
23800
23796
|
if (am) return Al;
|
|
23801
23797
|
am = 1;
|
|
23802
23798
|
var t = Ha(), e = cp(), r = Lw();
|
|
@@ -23805,9 +23801,9 @@ function vP() {
|
|
|
23805
23801
|
}, Al;
|
|
23806
23802
|
}
|
|
23807
23803
|
var cm;
|
|
23808
|
-
function
|
|
23804
|
+
function wP() {
|
|
23809
23805
|
return cm || (cm = 1, function(t) {
|
|
23810
|
-
var e =
|
|
23806
|
+
var e = bP(), r = Cu(), n = up(), s = gP();
|
|
23811
23807
|
t.exports = function(o) {
|
|
23812
23808
|
var a = n(arguments), c = o.length - (arguments.length - 1);
|
|
23813
23809
|
return e(
|
|
@@ -23822,7 +23818,7 @@ var xl, um;
|
|
|
23822
23818
|
function zw() {
|
|
23823
23819
|
if (um) return xl;
|
|
23824
23820
|
um = 1;
|
|
23825
|
-
var t =
|
|
23821
|
+
var t = dP(), e = pP(), r = wP(), n = Da(), s = io(), i = fp(), o = n("Object.prototype.toString"), a = Bu()(), c = typeof globalThis > "u" ? an : globalThis, u = e(), f = n("String.prototype.slice"), l = n("Array.prototype.indexOf", !0) || function(v, S) {
|
|
23826
23822
|
for (var T = 0; T < v.length; T += 1)
|
|
23827
23823
|
if (v[T] === S)
|
|
23828
23824
|
return T;
|
|
@@ -23889,7 +23885,7 @@ function zw() {
|
|
|
23889
23885
|
}, xl;
|
|
23890
23886
|
}
|
|
23891
23887
|
var kl, fm;
|
|
23892
|
-
function
|
|
23888
|
+
function vP() {
|
|
23893
23889
|
if (fm) return kl;
|
|
23894
23890
|
fm = 1;
|
|
23895
23891
|
var t = zw();
|
|
@@ -23898,9 +23894,9 @@ function SP() {
|
|
|
23898
23894
|
}, kl;
|
|
23899
23895
|
}
|
|
23900
23896
|
var lm;
|
|
23901
|
-
function
|
|
23897
|
+
function EP() {
|
|
23902
23898
|
return lm || (lm = 1, function(t) {
|
|
23903
|
-
var e =
|
|
23899
|
+
var e = aP(), r = fP(), n = zw(), s = vP();
|
|
23904
23900
|
function i(z) {
|
|
23905
23901
|
return z.call.bind(z);
|
|
23906
23902
|
}
|
|
@@ -24085,13 +24081,13 @@ function AP() {
|
|
|
24085
24081
|
}(If)), If;
|
|
24086
24082
|
}
|
|
24087
24083
|
var _l, dm;
|
|
24088
|
-
function
|
|
24084
|
+
function SP() {
|
|
24089
24085
|
return dm || (dm = 1, _l = function(e) {
|
|
24090
24086
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
24091
24087
|
}), _l;
|
|
24092
24088
|
}
|
|
24093
24089
|
var uc = { exports: {} }, hm;
|
|
24094
|
-
function
|
|
24090
|
+
function AP() {
|
|
24095
24091
|
return hm || (hm = 1, typeof Object.create == "function" ? uc.exports = function(e, r) {
|
|
24096
24092
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
24097
24093
|
constructor: {
|
|
@@ -24331,7 +24327,7 @@ function Vw() {
|
|
|
24331
24327
|
`) + " " + P.join(`,
|
|
24332
24328
|
`) + " " + F[1] : F[0] + R + " " + P.join(", ") + " " + F[1];
|
|
24333
24329
|
}
|
|
24334
|
-
t.types =
|
|
24330
|
+
t.types = EP();
|
|
24335
24331
|
function v(P) {
|
|
24336
24332
|
return Array.isArray(P);
|
|
24337
24333
|
}
|
|
@@ -24388,7 +24384,7 @@ function Vw() {
|
|
|
24388
24384
|
return P === null || typeof P == "boolean" || typeof P == "number" || typeof P == "string" || typeof P == "symbol" || // ES6 symbol
|
|
24389
24385
|
typeof P > "u";
|
|
24390
24386
|
}
|
|
24391
|
-
t.isPrimitive = q, t.isBuffer =
|
|
24387
|
+
t.isPrimitive = q, t.isBuffer = SP();
|
|
24392
24388
|
function J(P) {
|
|
24393
24389
|
return Object.prototype.toString.call(P);
|
|
24394
24390
|
}
|
|
@@ -24419,7 +24415,7 @@ function Vw() {
|
|
|
24419
24415
|
}
|
|
24420
24416
|
t.log = function() {
|
|
24421
24417
|
console.log("%s - %s", te(), t.format.apply(t, arguments));
|
|
24422
|
-
}, t.inherits =
|
|
24418
|
+
}, t.inherits = AP(), t._extend = function(P, R) {
|
|
24423
24419
|
if (!R || !$(R)) return P;
|
|
24424
24420
|
for (var F = Object.keys(R), ne = F.length; ne--; )
|
|
24425
24421
|
P[F[ne]] = R[F[ne]];
|
|
@@ -24505,13 +24501,13 @@ function Vw() {
|
|
|
24505
24501
|
}(Tf)), Tf;
|
|
24506
24502
|
}
|
|
24507
24503
|
Object.defineProperty(Ou, "__esModule", { value: !0 });
|
|
24508
|
-
Ou.decode =
|
|
24509
|
-
Ou.encode =
|
|
24504
|
+
Ou.decode = xP;
|
|
24505
|
+
Ou.encode = kP;
|
|
24510
24506
|
const Gw = Js;
|
|
24511
|
-
function
|
|
24507
|
+
function xP(t) {
|
|
24512
24508
|
return (Gw.isBrowser ? new TextDecoder("utf-8") : new (Vw()).TextDecoder("utf-8")).decode(t);
|
|
24513
24509
|
}
|
|
24514
|
-
function
|
|
24510
|
+
function kP(t) {
|
|
24515
24511
|
return (Gw.isBrowser ? new TextEncoder() : new (Vw()).TextEncoder("utf-8")).encode(t);
|
|
24516
24512
|
}
|
|
24517
24513
|
var $u = {}, Cd = { exports: {} };
|
|
@@ -24545,8 +24541,8 @@ var $u = {}, Cd = { exports: {} };
|
|
|
24545
24541
|
return r.SlowBuffer(o);
|
|
24546
24542
|
};
|
|
24547
24543
|
})(Cd, Cd.exports);
|
|
24548
|
-
var
|
|
24549
|
-
function
|
|
24544
|
+
var _P = Cd.exports, fc = _P.Buffer;
|
|
24545
|
+
function TP(t) {
|
|
24550
24546
|
if (t.length >= 255)
|
|
24551
24547
|
throw new TypeError("Alphabet too long");
|
|
24552
24548
|
for (var e = new Uint8Array(256), r = 0; r < e.length; r++)
|
|
@@ -24618,31 +24614,31 @@ function PP(t) {
|
|
|
24618
24614
|
decode: p
|
|
24619
24615
|
};
|
|
24620
24616
|
}
|
|
24621
|
-
var
|
|
24617
|
+
var IP = TP, PP = IP, OP = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", BP = PP(OP), CP = an && an.__importDefault || function(t) {
|
|
24622
24618
|
return t && t.__esModule ? t : { default: t };
|
|
24623
24619
|
};
|
|
24624
24620
|
Object.defineProperty($u, "__esModule", { value: !0 });
|
|
24625
|
-
$u.encode =
|
|
24626
|
-
$u.decode =
|
|
24627
|
-
const qw =
|
|
24628
|
-
function
|
|
24621
|
+
$u.encode = $P;
|
|
24622
|
+
$u.decode = RP;
|
|
24623
|
+
const qw = CP(BP);
|
|
24624
|
+
function $P(t) {
|
|
24629
24625
|
return qw.default.encode(t);
|
|
24630
24626
|
}
|
|
24631
|
-
function
|
|
24627
|
+
function RP(t) {
|
|
24632
24628
|
return qw.default.decode(t);
|
|
24633
24629
|
}
|
|
24634
24630
|
var Ru = {};
|
|
24635
24631
|
Object.defineProperty(Ru, "__esModule", { value: !0 });
|
|
24636
|
-
Ru.encode =
|
|
24637
|
-
Ru.decode =
|
|
24638
|
-
const
|
|
24639
|
-
function
|
|
24632
|
+
Ru.encode = UP;
|
|
24633
|
+
Ru.decode = MP;
|
|
24634
|
+
const NP = ai;
|
|
24635
|
+
function UP(t) {
|
|
24640
24636
|
return t.toString("base64");
|
|
24641
24637
|
}
|
|
24642
|
-
function
|
|
24643
|
-
return
|
|
24638
|
+
function MP(t) {
|
|
24639
|
+
return NP.Buffer.from(t, "base64");
|
|
24644
24640
|
}
|
|
24645
|
-
var
|
|
24641
|
+
var FP = an && an.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
24646
24642
|
n === void 0 && (n = r);
|
|
24647
24643
|
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
24648
24644
|
(!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: function() {
|
|
@@ -24650,15 +24646,15 @@ var LP = an && an.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
|
24650
24646
|
} }), Object.defineProperty(t, n, s);
|
|
24651
24647
|
} : function(t, e, r, n) {
|
|
24652
24648
|
n === void 0 && (n = r), t[n] = e[r];
|
|
24653
|
-
}),
|
|
24649
|
+
}), jP = an && an.__setModuleDefault || (Object.create ? function(t, e) {
|
|
24654
24650
|
Object.defineProperty(t, "default", { enumerable: !0, value: e });
|
|
24655
24651
|
} : function(t, e) {
|
|
24656
24652
|
t.default = e;
|
|
24657
24653
|
}), Nu = an && an.__importStar || function(t) {
|
|
24658
24654
|
if (t && t.__esModule) return t;
|
|
24659
24655
|
var e = {};
|
|
24660
|
-
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) &&
|
|
24661
|
-
return
|
|
24656
|
+
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && FP(e, t, r);
|
|
24657
|
+
return jP(e, t), e;
|
|
24662
24658
|
};
|
|
24663
24659
|
Object.defineProperty(_n, "__esModule", { value: !0 });
|
|
24664
24660
|
_n.base64 = _n.bs58 = _n.utf8 = Ww = _n.hex = void 0;
|
|
@@ -24732,7 +24728,7 @@ function Kw(t) {
|
|
|
24732
24728
|
);
|
|
24733
24729
|
return e;
|
|
24734
24730
|
}
|
|
24735
|
-
class
|
|
24731
|
+
class LP {
|
|
24736
24732
|
/**
|
|
24737
24733
|
* Creates a new instance of SolanaRelay.
|
|
24738
24734
|
* @param {AnchorProvider} provider - An abstraction of RPC connection and a Wallet
|
|
@@ -25013,7 +25009,7 @@ class DP {
|
|
|
25013
25009
|
return B("Refund is automatically handled by the relayer.");
|
|
25014
25010
|
}
|
|
25015
25011
|
}
|
|
25016
|
-
const Zw = "1.38.0",
|
|
25012
|
+
const Zw = "1.38.0", HP = "1.57.0", DP = {
|
|
25017
25013
|
"-32700": "ParseError",
|
|
25018
25014
|
"-32701": "OversizedRequest",
|
|
25019
25015
|
"-32702": "OversizedResponse",
|
|
@@ -25035,17 +25031,17 @@ class Yw extends Error {
|
|
|
25035
25031
|
}
|
|
25036
25032
|
class Xw extends Yw {
|
|
25037
25033
|
constructor(e, r) {
|
|
25038
|
-
super(e), this.code = r, this.type =
|
|
25034
|
+
super(e), this.code = r, this.type = DP[r] ?? "ServerError";
|
|
25039
25035
|
}
|
|
25040
25036
|
}
|
|
25041
|
-
class
|
|
25037
|
+
class zP extends Yw {
|
|
25042
25038
|
constructor(e, r, n) {
|
|
25043
25039
|
super(e), this.status = r, this.statusText = n;
|
|
25044
25040
|
}
|
|
25045
25041
|
}
|
|
25046
25042
|
var Jw = (t) => {
|
|
25047
25043
|
throw TypeError(t);
|
|
25048
|
-
}, lp = (t, e, r) => e.has(t) || Jw("Cannot " + r), Me = (t, e, r) => (lp(t, e, "read from private field"), r ? r.call(t) : e.get(t)), As = (t, e, r) => e.has(t) ? Jw("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Fi = (t, e, r, n) => (lp(t, e, "write to private field"), e.set(t, r), r), Qw = (t, e, r) => (lp(t, e, "access private method"), r),
|
|
25044
|
+
}, lp = (t, e, r) => e.has(t) || Jw("Cannot " + r), Me = (t, e, r) => (lp(t, e, "read from private field"), r ? r.call(t) : e.get(t)), As = (t, e, r) => e.has(t) ? Jw("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Fi = (t, e, r, n) => (lp(t, e, "write to private field"), e.set(t, r), r), Qw = (t, e, r) => (lp(t, e, "access private method"), r), VP = (t, e, r, n) => ({
|
|
25049
25045
|
set _(s) {
|
|
25050
25046
|
Fi(t, e, s);
|
|
25051
25047
|
},
|
|
@@ -25053,22 +25049,22 @@ var Jw = (t) => {
|
|
|
25053
25049
|
return Me(t, e, n);
|
|
25054
25050
|
}
|
|
25055
25051
|
}), Qn, No, Sn, Ps, pa, Os, jc, e2, t2;
|
|
25056
|
-
function
|
|
25052
|
+
function GP(t) {
|
|
25057
25053
|
const e = new URL(t);
|
|
25058
25054
|
return e.protocol = e.protocol.replace("http", "ws"), e.toString();
|
|
25059
25055
|
}
|
|
25060
|
-
const
|
|
25056
|
+
const qP = {
|
|
25061
25057
|
// We fudge the typing because we also check for undefined in the constructor:
|
|
25062
25058
|
WebSocketConstructor: typeof WebSocket < "u" ? WebSocket : void 0,
|
|
25063
25059
|
callTimeout: 3e4,
|
|
25064
25060
|
reconnectTimeout: 3e3,
|
|
25065
25061
|
maxReconnects: 5
|
|
25066
25062
|
};
|
|
25067
|
-
class
|
|
25063
|
+
class WP {
|
|
25068
25064
|
constructor(e, r = {}) {
|
|
25069
|
-
if (As(this, jc), As(this, Qn, 0), As(this, No, 0), As(this, Sn, null), As(this, Ps, null), As(this, pa, /* @__PURE__ */ new Set()), As(this, Os, /* @__PURE__ */ new Map()), this.endpoint = e, this.options = { ...
|
|
25065
|
+
if (As(this, jc), As(this, Qn, 0), As(this, No, 0), As(this, Sn, null), As(this, Ps, null), As(this, pa, /* @__PURE__ */ new Set()), As(this, Os, /* @__PURE__ */ new Map()), this.endpoint = e, this.options = { ...qP, ...r }, !this.options.WebSocketConstructor)
|
|
25070
25066
|
throw new Error("Missing WebSocket constructor");
|
|
25071
|
-
this.endpoint.startsWith("http") && (this.endpoint =
|
|
25067
|
+
this.endpoint.startsWith("http") && (this.endpoint = GP(this.endpoint));
|
|
25072
25068
|
}
|
|
25073
25069
|
async makeRequest(e, r, n) {
|
|
25074
25070
|
const s = await Qw(this, jc, e2).call(this);
|
|
@@ -25089,7 +25085,7 @@ class ZP {
|
|
|
25089
25085
|
});
|
|
25090
25086
|
}
|
|
25091
25087
|
async subscribe(e) {
|
|
25092
|
-
const r = new
|
|
25088
|
+
const r = new KP(e);
|
|
25093
25089
|
return Me(this, pa).add(r), await r.subscribe(this), () => r.unsubscribe(this);
|
|
25094
25090
|
}
|
|
25095
25091
|
}
|
|
@@ -25106,7 +25102,7 @@ e2 = function() {
|
|
|
25106
25102
|
(e = Me(this, Sn)) == null || e.close(), Fi(this, Sn, new this.options.WebSocketConstructor(this.endpoint)), Me(this, Sn).addEventListener("open", () => {
|
|
25107
25103
|
Fi(this, No, 0), t(Me(this, Sn));
|
|
25108
25104
|
}), Me(this, Sn).addEventListener("close", () => {
|
|
25109
|
-
|
|
25105
|
+
VP(this, No)._++, Me(this, No) <= this.options.maxReconnects && setTimeout(() => {
|
|
25110
25106
|
Qw(this, jc, t2).call(this);
|
|
25111
25107
|
}, this.options.reconnectTimeout);
|
|
25112
25108
|
}), Me(this, Sn).addEventListener("message", ({ data: r }) => {
|
|
@@ -25135,7 +25131,7 @@ t2 = async function() {
|
|
|
25135
25131
|
[...Me(this, pa)].map((e) => e.subscribe(this))
|
|
25136
25132
|
);
|
|
25137
25133
|
};
|
|
25138
|
-
class
|
|
25134
|
+
class KP {
|
|
25139
25135
|
constructor(e) {
|
|
25140
25136
|
this.subscriptionId = null, this.subscribed = !1, this.input = e;
|
|
25141
25137
|
}
|
|
@@ -25158,8 +25154,8 @@ class YP {
|
|
|
25158
25154
|
}
|
|
25159
25155
|
var r2 = (t) => {
|
|
25160
25156
|
throw TypeError(t);
|
|
25161
|
-
}, dp = (t, e, r) => e.has(t) || r2("Cannot " + r), lr = (t, e, r) => (dp(t, e, "read from private field"), r ? r.call(t) : e.get(t)), lc = (t, e, r) => e.has(t) ? r2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), $d = (t, e, r, n) => (dp(t, e, "write to private field"), e.set(t, r), r),
|
|
25162
|
-
class
|
|
25157
|
+
}, dp = (t, e, r) => e.has(t) || r2("Cannot " + r), lr = (t, e, r) => (dp(t, e, "read from private field"), r ? r.call(t) : e.get(t)), lc = (t, e, r) => e.has(t) ? r2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), $d = (t, e, r, n) => (dp(t, e, "write to private field"), e.set(t, r), r), ZP = (t, e, r) => (dp(t, e, "access private method"), r), _o, Sr, Uo, Rd, n2;
|
|
25158
|
+
class YP {
|
|
25163
25159
|
constructor(e) {
|
|
25164
25160
|
lc(this, Rd), lc(this, _o, 0), lc(this, Sr), lc(this, Uo), $d(this, Sr, e);
|
|
25165
25161
|
}
|
|
@@ -25181,7 +25177,7 @@ class JP {
|
|
|
25181
25177
|
"Content-Type": "application/json",
|
|
25182
25178
|
"Client-Sdk-Type": "typescript",
|
|
25183
25179
|
"Client-Sdk-Version": Zw,
|
|
25184
|
-
"Client-Target-Api-Version":
|
|
25180
|
+
"Client-Target-Api-Version": HP,
|
|
25185
25181
|
"Client-Request-Method": e.method,
|
|
25186
25182
|
...(i = lr(this, Sr).rpc) == null ? void 0 : i.headers
|
|
25187
25183
|
},
|
|
@@ -25193,7 +25189,7 @@ class JP {
|
|
|
25193
25189
|
})
|
|
25194
25190
|
});
|
|
25195
25191
|
if (!r.ok)
|
|
25196
|
-
throw new
|
|
25192
|
+
throw new zP(
|
|
25197
25193
|
`Unexpected status code: ${r.status}`,
|
|
25198
25194
|
r.status,
|
|
25199
25195
|
r.statusText
|
|
@@ -25204,7 +25200,7 @@ class JP {
|
|
|
25204
25200
|
return n.result;
|
|
25205
25201
|
}
|
|
25206
25202
|
async subscribe(e) {
|
|
25207
|
-
const r = await
|
|
25203
|
+
const r = await ZP(this, Rd, n2).call(this).subscribe(e);
|
|
25208
25204
|
return e.signal && (e.signal.throwIfAborted(), e.signal.addEventListener("abort", () => {
|
|
25209
25205
|
r();
|
|
25210
25206
|
})), async () => !!await r();
|
|
@@ -25222,7 +25218,7 @@ n2 = function() {
|
|
|
25222
25218
|
throw new Error(
|
|
25223
25219
|
"The current environment does not support WebSocket, you can provide a WebSocketConstructor in the options for SuiHTTPTransport."
|
|
25224
25220
|
);
|
|
25225
|
-
$d(this, Uo, new
|
|
25221
|
+
$d(this, Uo, new WP(
|
|
25226
25222
|
((t = lr(this, Sr).websocket) == null ? void 0 : t.url) ?? lr(this, Sr).url,
|
|
25227
25223
|
{
|
|
25228
25224
|
WebSocketConstructor: e,
|
|
@@ -25247,7 +25243,7 @@ function ym(t) {
|
|
|
25247
25243
|
}
|
|
25248
25244
|
}
|
|
25249
25245
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
25250
|
-
function
|
|
25246
|
+
function XP(t) {
|
|
25251
25247
|
return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
|
|
25252
25248
|
}
|
|
25253
25249
|
function s2(t, e) {
|
|
@@ -25270,17 +25266,17 @@ function o2(t, e) {
|
|
|
25270
25266
|
if (!s2(!0, e))
|
|
25271
25267
|
throw new Error(`${t}: array of strings expected`);
|
|
25272
25268
|
}
|
|
25273
|
-
function
|
|
25269
|
+
function JP(t, e) {
|
|
25274
25270
|
if (!s2(!1, e))
|
|
25275
25271
|
throw new Error(`${t}: array of numbers expected`);
|
|
25276
25272
|
}
|
|
25277
25273
|
// @__NO_SIDE_EFFECTS__
|
|
25278
|
-
function
|
|
25274
|
+
function QP(...t) {
|
|
25279
25275
|
const e = (i) => i, r = (i, o) => (a) => i(o(a)), n = t.map((i) => i.encode).reduceRight(r, e), s = t.map((i) => i.decode).reduce(r, e);
|
|
25280
25276
|
return { encode: n, decode: s };
|
|
25281
25277
|
}
|
|
25282
25278
|
// @__NO_SIDE_EFFECTS__
|
|
25283
|
-
function
|
|
25279
|
+
function eO(t) {
|
|
25284
25280
|
const e = typeof t == "string" ? t.split("") : t, r = e.length;
|
|
25285
25281
|
o2("alphabet", e);
|
|
25286
25282
|
const n = new Map(e.map((s, i) => [s, i]));
|
|
@@ -25300,7 +25296,7 @@ function rO(t) {
|
|
|
25300
25296
|
};
|
|
25301
25297
|
}
|
|
25302
25298
|
// @__NO_SIDE_EFFECTS__
|
|
25303
|
-
function
|
|
25299
|
+
function tO(t = "") {
|
|
25304
25300
|
return Nd("join", t), {
|
|
25305
25301
|
encode: (e) => (o2("join.decode", e), e.join(t)),
|
|
25306
25302
|
decode: (e) => (Nd("join.decode", e), e.split(t))
|
|
@@ -25342,19 +25338,19 @@ function mm(t, e, r) {
|
|
|
25342
25338
|
return s.reverse();
|
|
25343
25339
|
}
|
|
25344
25340
|
// @__NO_SIDE_EFFECTS__
|
|
25345
|
-
function
|
|
25341
|
+
function rO(t) {
|
|
25346
25342
|
i2(t);
|
|
25347
25343
|
const e = 2 ** 8;
|
|
25348
25344
|
return {
|
|
25349
25345
|
encode: (r) => {
|
|
25350
|
-
if (!
|
|
25346
|
+
if (!XP(r))
|
|
25351
25347
|
throw new Error("radix.encode input should be Uint8Array");
|
|
25352
25348
|
return mm(Array.from(r), e, t);
|
|
25353
25349
|
},
|
|
25354
|
-
decode: (r) => (
|
|
25350
|
+
decode: (r) => (JP("radix.decode", r), Uint8Array.from(mm(r, t, e)))
|
|
25355
25351
|
};
|
|
25356
25352
|
}
|
|
25357
|
-
const
|
|
25353
|
+
const nO = /* @__NO_SIDE_EFFECTS__ */ (t) => /* @__PURE__ */ QP(/* @__PURE__ */ rO(58), /* @__PURE__ */ eO(t), /* @__PURE__ */ tO("")), a2 = /* @__PURE__ */ nO("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), Uu = (t) => a2.encode(t), ya = (t) => a2.decode(t);
|
|
25358
25354
|
function Xt(t) {
|
|
25359
25355
|
return Uint8Array.from(atob(t), (e) => e.charCodeAt(0));
|
|
25360
25356
|
}
|
|
@@ -25388,7 +25384,7 @@ class u2 {
|
|
|
25388
25384
|
throw new TypeError(
|
|
25389
25385
|
`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: ${e}.`
|
|
25390
25386
|
);
|
|
25391
|
-
this._batchLoadFn = e, this._maxBatchSize =
|
|
25387
|
+
this._batchLoadFn = e, this._maxBatchSize = aO(r), this._batchScheduleFn = cO(r), this._cacheKeyFn = uO(r), this._cacheMap = fO(r), this._batch = null, this.name = lO(r);
|
|
25392
25388
|
}
|
|
25393
25389
|
/**
|
|
25394
25390
|
* Loads a key, returning a `Promise` for the value represented by that key.
|
|
@@ -25398,7 +25394,7 @@ class u2 {
|
|
|
25398
25394
|
throw new TypeError(
|
|
25399
25395
|
`The loader.load() function must be called with a value, but got: ${String(e)}.`
|
|
25400
25396
|
);
|
|
25401
|
-
const r =
|
|
25397
|
+
const r = iO(this), n = this._cacheMap;
|
|
25402
25398
|
let s;
|
|
25403
25399
|
if (n) {
|
|
25404
25400
|
s = this._cacheKeyFn(e);
|
|
@@ -25488,7 +25484,7 @@ class u2 {
|
|
|
25488
25484
|
return this;
|
|
25489
25485
|
}
|
|
25490
25486
|
}
|
|
25491
|
-
const
|
|
25487
|
+
const sO = (
|
|
25492
25488
|
/** @ts-ignore */
|
|
25493
25489
|
typeof process == "object" && typeof process.nextTick == "function" ? function(t) {
|
|
25494
25490
|
Il || (Il = Promise.resolve()), Il.then(() => {
|
|
@@ -25504,16 +25500,16 @@ const oO = (
|
|
|
25504
25500
|
)
|
|
25505
25501
|
);
|
|
25506
25502
|
let Il;
|
|
25507
|
-
function
|
|
25503
|
+
function iO(t) {
|
|
25508
25504
|
const e = t._batch;
|
|
25509
25505
|
if (e !== null && !e.hasDispatched && e.keys.length < t._maxBatchSize)
|
|
25510
25506
|
return e;
|
|
25511
25507
|
const r = { hasDispatched: !1, keys: [], callbacks: [] };
|
|
25512
25508
|
return t._batch = r, t._batchScheduleFn(() => {
|
|
25513
|
-
|
|
25509
|
+
oO(t, r);
|
|
25514
25510
|
}), r;
|
|
25515
25511
|
}
|
|
25516
|
-
function
|
|
25512
|
+
function oO(t, e) {
|
|
25517
25513
|
if (e.hasDispatched = !0, e.keys.length === 0) {
|
|
25518
25514
|
Md(e);
|
|
25519
25515
|
return;
|
|
@@ -25572,7 +25568,7 @@ function Md(t) {
|
|
|
25572
25568
|
for (let e = 0; e < t.cacheHits.length; e++)
|
|
25573
25569
|
t.cacheHits[e]();
|
|
25574
25570
|
}
|
|
25575
|
-
function
|
|
25571
|
+
function aO(t) {
|
|
25576
25572
|
if (!(!t || t.batch !== !1))
|
|
25577
25573
|
return 1;
|
|
25578
25574
|
const r = t && t.maxBatchSize;
|
|
@@ -25582,15 +25578,15 @@ function uO(t) {
|
|
|
25582
25578
|
throw new TypeError(`maxBatchSize must be a positive number: ${r}`);
|
|
25583
25579
|
return r;
|
|
25584
25580
|
}
|
|
25585
|
-
function
|
|
25581
|
+
function cO(t) {
|
|
25586
25582
|
const e = t && t.batchScheduleFn;
|
|
25587
25583
|
if (e === void 0)
|
|
25588
|
-
return
|
|
25584
|
+
return sO;
|
|
25589
25585
|
if (typeof e != "function")
|
|
25590
25586
|
throw new TypeError(`batchScheduleFn must be a function: ${e}`);
|
|
25591
25587
|
return e;
|
|
25592
25588
|
}
|
|
25593
|
-
function
|
|
25589
|
+
function uO(t) {
|
|
25594
25590
|
const e = t && t.cacheKeyFn;
|
|
25595
25591
|
if (e === void 0)
|
|
25596
25592
|
return (r) => r;
|
|
@@ -25598,7 +25594,7 @@ function lO(t) {
|
|
|
25598
25594
|
throw new TypeError(`cacheKeyFn must be a function: ${e}`);
|
|
25599
25595
|
return e;
|
|
25600
25596
|
}
|
|
25601
|
-
function
|
|
25597
|
+
function fO(t) {
|
|
25602
25598
|
if (!(!t || t.cache !== !1))
|
|
25603
25599
|
return null;
|
|
25604
25600
|
const r = t && t.cacheMap;
|
|
@@ -25613,7 +25609,7 @@ function dO(t) {
|
|
|
25613
25609
|
}
|
|
25614
25610
|
return r;
|
|
25615
25611
|
}
|
|
25616
|
-
function
|
|
25612
|
+
function lO(t) {
|
|
25617
25613
|
return t && t.name ? t.name : null;
|
|
25618
25614
|
}
|
|
25619
25615
|
function f2(t) {
|
|
@@ -25628,7 +25624,7 @@ function Lc(t) {
|
|
|
25628
25624
|
e[r] = t & 127, (t >>= 7) && (e[r] |= 128), r += 1;
|
|
25629
25625
|
return e;
|
|
25630
25626
|
}
|
|
25631
|
-
function
|
|
25627
|
+
function dO(t) {
|
|
25632
25628
|
let e = 0, r = 0, n = 0;
|
|
25633
25629
|
for (; ; ) {
|
|
25634
25630
|
const s = t[n];
|
|
@@ -25641,7 +25637,7 @@ function pO(t) {
|
|
|
25641
25637
|
length: n
|
|
25642
25638
|
};
|
|
25643
25639
|
}
|
|
25644
|
-
class
|
|
25640
|
+
class hO {
|
|
25645
25641
|
/**
|
|
25646
25642
|
* @param {Uint8Array} data Data to use as a buffer.
|
|
25647
25643
|
*/
|
|
@@ -25718,7 +25714,7 @@ class yO {
|
|
|
25718
25714
|
* @returns {Number} The ULEB value.
|
|
25719
25715
|
*/
|
|
25720
25716
|
readULEB() {
|
|
25721
|
-
const e = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, e), { value: n, length: s } =
|
|
25717
|
+
const e = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, e), { value: n, length: s } = dO(r);
|
|
25722
25718
|
return this.shift(s), n;
|
|
25723
25719
|
}
|
|
25724
25720
|
/**
|
|
@@ -25734,7 +25730,7 @@ class yO {
|
|
|
25734
25730
|
return n;
|
|
25735
25731
|
}
|
|
25736
25732
|
}
|
|
25737
|
-
function
|
|
25733
|
+
function pO(t, e) {
|
|
25738
25734
|
switch (e) {
|
|
25739
25735
|
case "base58":
|
|
25740
25736
|
return Uu(t);
|
|
@@ -25759,7 +25755,7 @@ function l2(t, e = ["<", ">"]) {
|
|
|
25759
25755
|
}
|
|
25760
25756
|
return s.push(i.trim()), s;
|
|
25761
25757
|
}
|
|
25762
|
-
class
|
|
25758
|
+
class yO {
|
|
25763
25759
|
constructor({
|
|
25764
25760
|
initialSize: e = 1024,
|
|
25765
25761
|
maxSize: r = 1 / 0,
|
|
@@ -25880,7 +25876,7 @@ class bO {
|
|
|
25880
25876
|
* @param encoding Encoding to use: 'base64' or 'hex'
|
|
25881
25877
|
*/
|
|
25882
25878
|
toString(e) {
|
|
25883
|
-
return
|
|
25879
|
+
return pO(this.toBytes(), e);
|
|
25884
25880
|
}
|
|
25885
25881
|
}
|
|
25886
25882
|
function Ol(t, e) {
|
|
@@ -25893,10 +25889,10 @@ function Ol(t, e) {
|
|
|
25893
25889
|
var d2 = (t) => {
|
|
25894
25890
|
throw TypeError(t);
|
|
25895
25891
|
}, h2 = (t, e, r) => e.has(t) || d2("Cannot " + r), Ar = (t, e, r) => (h2(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Hc = (t, e, r) => e.has(t) ? d2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Dc = (t, e, r, n) => (h2(t, e, "write to private field"), e.set(t, r), r), Ai, To, xc, es;
|
|
25896
|
-
const
|
|
25892
|
+
const mO = class p2 {
|
|
25897
25893
|
constructor(e) {
|
|
25898
25894
|
Hc(this, Ai), Hc(this, To), this.name = e.name, this.read = e.read, this.serializedSize = e.serializedSize ?? (() => null), Dc(this, Ai, e.write), Dc(this, To, e.serialize ?? ((r, n) => {
|
|
25899
|
-
const s = new
|
|
25895
|
+
const s = new yO({
|
|
25900
25896
|
initialSize: this.serializedSize(r) ?? void 0,
|
|
25901
25897
|
...n
|
|
25902
25898
|
});
|
|
@@ -25908,10 +25904,10 @@ const gO = class p2 {
|
|
|
25908
25904
|
this.validate(e), Ar(this, Ai).call(this, e, r);
|
|
25909
25905
|
}
|
|
25910
25906
|
serialize(e, r) {
|
|
25911
|
-
return this.validate(e), new
|
|
25907
|
+
return this.validate(e), new bO(this, Ar(this, To).call(this, e, r));
|
|
25912
25908
|
}
|
|
25913
25909
|
parse(e) {
|
|
25914
|
-
const r = new
|
|
25910
|
+
const r = new hO(e);
|
|
25915
25911
|
return this.read(r);
|
|
25916
25912
|
}
|
|
25917
25913
|
fromHex(e) {
|
|
@@ -25943,12 +25939,12 @@ const gO = class p2 {
|
|
|
25943
25939
|
};
|
|
25944
25940
|
Ai = /* @__PURE__ */ new WeakMap();
|
|
25945
25941
|
To = /* @__PURE__ */ new WeakMap();
|
|
25946
|
-
let cn =
|
|
25942
|
+
let cn = mO;
|
|
25947
25943
|
const y2 = Symbol.for("@mysten/serialized-bcs");
|
|
25948
25944
|
function hp(t) {
|
|
25949
25945
|
return !!t && typeof t == "object" && t[y2] === !0;
|
|
25950
25946
|
}
|
|
25951
|
-
class
|
|
25947
|
+
class bO {
|
|
25952
25948
|
constructor(e, r) {
|
|
25953
25949
|
Hc(this, xc), Hc(this, es), Dc(this, xc, e), Dc(this, es, r);
|
|
25954
25950
|
}
|
|
@@ -26023,7 +26019,7 @@ function Cl({
|
|
|
26023
26019
|
}
|
|
26024
26020
|
});
|
|
26025
26021
|
}
|
|
26026
|
-
function
|
|
26022
|
+
function gO({
|
|
26027
26023
|
serialize: t,
|
|
26028
26024
|
...e
|
|
26029
26025
|
}) {
|
|
@@ -26037,7 +26033,7 @@ function vO({
|
|
|
26037
26033
|
});
|
|
26038
26034
|
return r;
|
|
26039
26035
|
}
|
|
26040
|
-
function
|
|
26036
|
+
function wO({
|
|
26041
26037
|
toBytes: t,
|
|
26042
26038
|
fromBytes: e,
|
|
26043
26039
|
...r
|
|
@@ -26066,7 +26062,7 @@ function EO({
|
|
|
26066
26062
|
}
|
|
26067
26063
|
});
|
|
26068
26064
|
}
|
|
26069
|
-
function
|
|
26065
|
+
function vO(t) {
|
|
26070
26066
|
let e = null;
|
|
26071
26067
|
function r() {
|
|
26072
26068
|
return e || (e = t()), e;
|
|
@@ -26079,7 +26075,7 @@ function SO(t) {
|
|
|
26079
26075
|
serialize: (n, s) => r().serialize(n, s).toBytes()
|
|
26080
26076
|
});
|
|
26081
26077
|
}
|
|
26082
|
-
class
|
|
26078
|
+
class EO extends cn {
|
|
26083
26079
|
constructor({ name: e, fields: r, ...n }) {
|
|
26084
26080
|
const s = Object.entries(r);
|
|
26085
26081
|
super({
|
|
@@ -26113,7 +26109,7 @@ class AO extends cn {
|
|
|
26113
26109
|
});
|
|
26114
26110
|
}
|
|
26115
26111
|
}
|
|
26116
|
-
class
|
|
26112
|
+
class SO extends cn {
|
|
26117
26113
|
constructor({ fields: e, ...r }) {
|
|
26118
26114
|
const n = Object.entries(e);
|
|
26119
26115
|
super({
|
|
@@ -26158,7 +26154,7 @@ class xO extends cn {
|
|
|
26158
26154
|
});
|
|
26159
26155
|
}
|
|
26160
26156
|
}
|
|
26161
|
-
class
|
|
26157
|
+
class AO extends cn {
|
|
26162
26158
|
constructor({ fields: e, name: r, ...n }) {
|
|
26163
26159
|
super({
|
|
26164
26160
|
name: r ?? `(${e.map((s) => s.name).join(", ")})`,
|
|
@@ -26193,7 +26189,7 @@ class kO extends cn {
|
|
|
26193
26189
|
});
|
|
26194
26190
|
}
|
|
26195
26191
|
}
|
|
26196
|
-
function
|
|
26192
|
+
function xO(t, e, r) {
|
|
26197
26193
|
return new cn({
|
|
26198
26194
|
read: (n) => {
|
|
26199
26195
|
const s = new Array(t);
|
|
@@ -26216,7 +26212,7 @@ function _O(t, e, r) {
|
|
|
26216
26212
|
}
|
|
26217
26213
|
});
|
|
26218
26214
|
}
|
|
26219
|
-
function
|
|
26215
|
+
function kO(t) {
|
|
26220
26216
|
return _.enum(`Option<${t.name}>`, {
|
|
26221
26217
|
None: null,
|
|
26222
26218
|
Some: t
|
|
@@ -26225,7 +26221,7 @@ function TO(t) {
|
|
|
26225
26221
|
output: (e) => e.$kind === "Some" ? e.Some : null
|
|
26226
26222
|
});
|
|
26227
26223
|
}
|
|
26228
|
-
function
|
|
26224
|
+
function _O(t, e) {
|
|
26229
26225
|
return new cn({
|
|
26230
26226
|
read: (r) => {
|
|
26231
26227
|
const n = r.readULEB(), s = new Array(n);
|
|
@@ -26247,7 +26243,7 @@ function IO(t, e) {
|
|
|
26247
26243
|
}
|
|
26248
26244
|
});
|
|
26249
26245
|
}
|
|
26250
|
-
function
|
|
26246
|
+
function TO(t, e) {
|
|
26251
26247
|
return _.vector(_.tuple([t, e])).transform({
|
|
26252
26248
|
name: `Map<${t.name}, ${e.name}>`,
|
|
26253
26249
|
input: (r) => [...r.entries()],
|
|
@@ -26375,7 +26371,7 @@ const _ = {
|
|
|
26375
26371
|
*
|
|
26376
26372
|
*/
|
|
26377
26373
|
uleb128(t) {
|
|
26378
|
-
return
|
|
26374
|
+
return gO({
|
|
26379
26375
|
read: (e) => e.readULEB(),
|
|
26380
26376
|
serialize: (e) => Uint8Array.from(Lc(e)),
|
|
26381
26377
|
...t,
|
|
@@ -26445,7 +26441,7 @@ const _ = {
|
|
|
26445
26441
|
* bcs.string().serialize('a').toBytes() // Uint8Array [ 1, 97 ]
|
|
26446
26442
|
*/
|
|
26447
26443
|
string(t) {
|
|
26448
|
-
return
|
|
26444
|
+
return wO({
|
|
26449
26445
|
toBytes: (e) => new TextEncoder().encode(e),
|
|
26450
26446
|
fromBytes: (e) => new TextDecoder().decode(e),
|
|
26451
26447
|
...t,
|
|
@@ -26459,7 +26455,7 @@ const _ = {
|
|
|
26459
26455
|
* @example
|
|
26460
26456
|
* bcs.fixedArray(3, bcs.u8()).serialize([1, 2, 3]).toBytes() // Uint8Array [ 1, 2, 3 ]
|
|
26461
26457
|
*/
|
|
26462
|
-
fixedArray:
|
|
26458
|
+
fixedArray: xO,
|
|
26463
26459
|
/**
|
|
26464
26460
|
* Creates a BcsType representing an optional value
|
|
26465
26461
|
* @param type The BcsType of the optional value
|
|
@@ -26467,7 +26463,7 @@ const _ = {
|
|
|
26467
26463
|
* bcs.option(bcs.u8()).serialize(null).toBytes() // Uint8Array [ 0 ]
|
|
26468
26464
|
* bcs.option(bcs.u8()).serialize(1).toBytes() // Uint8Array [ 1, 1 ]
|
|
26469
26465
|
*/
|
|
26470
|
-
option:
|
|
26466
|
+
option: kO,
|
|
26471
26467
|
/**
|
|
26472
26468
|
* Creates a BcsType representing a variable length vector of a given type
|
|
26473
26469
|
* @param type The BcsType of each element in the vector
|
|
@@ -26475,7 +26471,7 @@ const _ = {
|
|
|
26475
26471
|
* @example
|
|
26476
26472
|
* bcs.vector(bcs.u8()).toBytes([1, 2, 3]) // Uint8Array [ 3, 1, 2, 3 ]
|
|
26477
26473
|
*/
|
|
26478
|
-
vector:
|
|
26474
|
+
vector: _O,
|
|
26479
26475
|
/**
|
|
26480
26476
|
* Creates a BcsType representing a tuple of a given set of types
|
|
26481
26477
|
* @param types The BcsTypes for each element in the tuple
|
|
@@ -26485,7 +26481,7 @@ const _ = {
|
|
|
26485
26481
|
* tuple.serialize([1, 'a', true]).toBytes() // Uint8Array [ 1, 1, 97, 1 ]
|
|
26486
26482
|
*/
|
|
26487
26483
|
tuple(t, e) {
|
|
26488
|
-
return new
|
|
26484
|
+
return new AO({
|
|
26489
26485
|
fields: t,
|
|
26490
26486
|
...e
|
|
26491
26487
|
});
|
|
@@ -26503,7 +26499,7 @@ const _ = {
|
|
|
26503
26499
|
* struct.serialize({ a: 1, b: 'a' }).toBytes() // Uint8Array [ 1, 1, 97 ]
|
|
26504
26500
|
*/
|
|
26505
26501
|
struct(t, e, r) {
|
|
26506
|
-
return new
|
|
26502
|
+
return new EO({
|
|
26507
26503
|
name: t,
|
|
26508
26504
|
fields: e,
|
|
26509
26505
|
...r
|
|
@@ -26526,7 +26522,7 @@ const _ = {
|
|
|
26526
26522
|
* enum.serialize({ C: true }).toBytes() // Uint8Array [ 2 ]
|
|
26527
26523
|
*/
|
|
26528
26524
|
enum(t, e, r) {
|
|
26529
|
-
return new
|
|
26525
|
+
return new SO({
|
|
26530
26526
|
name: t,
|
|
26531
26527
|
fields: e,
|
|
26532
26528
|
...r
|
|
@@ -26540,19 +26536,19 @@ const _ = {
|
|
|
26540
26536
|
* const map = bcs.map(bcs.u8(), bcs.string())
|
|
26541
26537
|
* map.serialize(new Map([[2, 'a']])).toBytes() // Uint8Array [ 1, 2, 1, 97 ]
|
|
26542
26538
|
*/
|
|
26543
|
-
map:
|
|
26539
|
+
map: TO,
|
|
26544
26540
|
/**
|
|
26545
26541
|
* Creates a BcsType that wraps another BcsType which is lazily evaluated. This is useful for creating recursive types.
|
|
26546
26542
|
* @param cb A callback that returns the BcsType
|
|
26547
26543
|
*/
|
|
26548
26544
|
lazy(t) {
|
|
26549
|
-
return
|
|
26545
|
+
return vO(t);
|
|
26550
26546
|
}
|
|
26551
26547
|
};
|
|
26552
26548
|
var m2 = (t) => {
|
|
26553
26549
|
throw TypeError(t);
|
|
26554
26550
|
}, b2 = (t, e, r) => e.has(t) || m2("Cannot " + r), Et = (t, e, r) => (b2(t, e, "read from private field"), e.get(t)), bm = (t, e, r) => e.has(t) ? m2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), gm = (t, e, r, n) => (b2(t, e, "write to private field"), e.set(t, r), r), ks, Bt;
|
|
26555
|
-
const
|
|
26551
|
+
const IO = class g2 {
|
|
26556
26552
|
constructor({ prefix: e, cache: r } = {}) {
|
|
26557
26553
|
bm(this, ks), bm(this, Bt), gm(this, ks, e ?? []), gm(this, Bt, r ?? /* @__PURE__ */ new Map());
|
|
26558
26554
|
}
|
|
@@ -26590,12 +26586,12 @@ const OO = class g2 {
|
|
|
26590
26586
|
};
|
|
26591
26587
|
ks = /* @__PURE__ */ new WeakMap();
|
|
26592
26588
|
Bt = /* @__PURE__ */ new WeakMap();
|
|
26593
|
-
let
|
|
26589
|
+
let PO = IO;
|
|
26594
26590
|
class w2 {
|
|
26595
26591
|
constructor({
|
|
26596
26592
|
network: e,
|
|
26597
26593
|
base: r,
|
|
26598
|
-
cache: n = (r == null ? void 0 : r.cache) ?? new
|
|
26594
|
+
cache: n = (r == null ? void 0 : r.cache) ?? new PO()
|
|
26599
26595
|
}) {
|
|
26600
26596
|
this.network = e, this.base = r ?? this, this.cache = n;
|
|
26601
26597
|
}
|
|
@@ -26614,11 +26610,11 @@ class w2 {
|
|
|
26614
26610
|
);
|
|
26615
26611
|
}
|
|
26616
26612
|
}
|
|
26617
|
-
const v2 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, E2 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i,
|
|
26618
|
-
function
|
|
26619
|
-
return t.length >
|
|
26613
|
+
const v2 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, E2 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i, OO = 235;
|
|
26614
|
+
function BO(t) {
|
|
26615
|
+
return t.length > OO ? !1 : t.includes("@") ? v2.test(t) : E2.test(t);
|
|
26620
26616
|
}
|
|
26621
|
-
function
|
|
26617
|
+
function CO(t, e = "at") {
|
|
26622
26618
|
const r = t.toLowerCase();
|
|
26623
26619
|
let n;
|
|
26624
26620
|
if (r.includes("@")) {
|
|
@@ -26633,37 +26629,37 @@ function RO(t, e = "at") {
|
|
|
26633
26629
|
}
|
|
26634
26630
|
return e === "dot" ? `${n.join(".")}.sui` : `${n.slice(0, -1).join(".")}@${n[n.length - 1]}`;
|
|
26635
26631
|
}
|
|
26636
|
-
const
|
|
26632
|
+
const $O = /^([a-z0-9]+(?:-[a-z0-9]+)*)$/, RO = /^\d+$/, NO = 64, S2 = "/", Zt = (t) => {
|
|
26637
26633
|
const e = t.split(S2);
|
|
26638
26634
|
if (e.length < 2 || e.length > 3) return !1;
|
|
26639
26635
|
const [r, n, s] = e;
|
|
26640
|
-
return s !== void 0 && !
|
|
26641
|
-
},
|
|
26636
|
+
return s !== void 0 && !RO.test(s) || !BO(r) ? !1 : $O.test(n) && n.length < NO;
|
|
26637
|
+
}, UO = (t) => {
|
|
26642
26638
|
const e = t.split(/::|<|>|,/);
|
|
26643
26639
|
for (const r of e)
|
|
26644
26640
|
if (r.includes(S2) && !Zt(r)) return !1;
|
|
26645
26641
|
return !0;
|
|
26646
|
-
},
|
|
26642
|
+
}, MO = 32;
|
|
26647
26643
|
function wm(t) {
|
|
26648
26644
|
try {
|
|
26649
|
-
return ya(t).length ===
|
|
26645
|
+
return ya(t).length === MO;
|
|
26650
26646
|
} catch {
|
|
26651
26647
|
return !1;
|
|
26652
26648
|
}
|
|
26653
26649
|
}
|
|
26654
26650
|
const Fu = 32;
|
|
26655
26651
|
function xr(t) {
|
|
26656
|
-
return
|
|
26652
|
+
return jO(t) && LO(t) === Fu;
|
|
26657
26653
|
}
|
|
26658
26654
|
function dc(t) {
|
|
26659
26655
|
return xr(t);
|
|
26660
26656
|
}
|
|
26661
|
-
function
|
|
26657
|
+
function FO(t) {
|
|
26662
26658
|
return t.includes("::") ? Qs(t) : t;
|
|
26663
26659
|
}
|
|
26664
26660
|
function Qs(t) {
|
|
26665
26661
|
const [e, r] = t.split("::"), n = Zt(e), s = t.slice(e.length + r.length + 4), i = s.includes("<") ? s.slice(0, s.indexOf("<")) : s, o = s.includes("<") ? l2(s.slice(s.indexOf("<") + 1, s.lastIndexOf(">"))).map(
|
|
26666
|
-
(a) =>
|
|
26662
|
+
(a) => FO(a.trim())
|
|
26667
26663
|
) : [];
|
|
26668
26664
|
return {
|
|
26669
26665
|
address: n ? e : xe(e),
|
|
@@ -26685,13 +26681,13 @@ function xe(t, e = !1) {
|
|
|
26685
26681
|
function Tn(t, e = !1) {
|
|
26686
26682
|
return xe(t, e);
|
|
26687
26683
|
}
|
|
26688
|
-
function
|
|
26684
|
+
function jO(t) {
|
|
26689
26685
|
return /^(0x|0X)?[a-fA-F0-9]+$/.test(t) && t.length % 2 === 0;
|
|
26690
26686
|
}
|
|
26691
|
-
function
|
|
26687
|
+
function LO(t) {
|
|
26692
26688
|
return /^(0x|0X)/.test(t) ? (t.length - 2) / 2 : t.length / 2;
|
|
26693
26689
|
}
|
|
26694
|
-
const
|
|
26690
|
+
const HO = /^vector<(.+)>$/, DO = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
|
|
26695
26691
|
class _r {
|
|
26696
26692
|
static parseFromStr(e, r = !1) {
|
|
26697
26693
|
if (e === "address")
|
|
@@ -26712,12 +26708,12 @@ class _r {
|
|
|
26712
26708
|
return { u256: null };
|
|
26713
26709
|
if (e === "signer")
|
|
26714
26710
|
return { signer: null };
|
|
26715
|
-
const n = e.match(
|
|
26711
|
+
const n = e.match(HO);
|
|
26716
26712
|
if (n)
|
|
26717
26713
|
return {
|
|
26718
26714
|
vector: _r.parseFromStr(n[1], r)
|
|
26719
26715
|
};
|
|
26720
|
-
const s = e.match(
|
|
26716
|
+
const s = e.match(DO);
|
|
26721
26717
|
if (s)
|
|
26722
26718
|
return {
|
|
26723
26719
|
struct: {
|
|
@@ -26762,7 +26758,7 @@ class _r {
|
|
|
26762
26758
|
throw new Error("Invalid TypeTag");
|
|
26763
26759
|
}
|
|
26764
26760
|
}
|
|
26765
|
-
function
|
|
26761
|
+
function zO(t) {
|
|
26766
26762
|
return _.u64({
|
|
26767
26763
|
name: "unsafe_u64",
|
|
26768
26764
|
...t
|
|
@@ -26771,7 +26767,7 @@ function GO(t) {
|
|
|
26771
26767
|
output: (e) => Number(e)
|
|
26772
26768
|
});
|
|
26773
26769
|
}
|
|
26774
|
-
function
|
|
26770
|
+
function VO(t) {
|
|
26775
26771
|
return _.enum("Option", {
|
|
26776
26772
|
None: null,
|
|
26777
26773
|
Some: t
|
|
@@ -26896,7 +26892,7 @@ const Ne = _.bytes(Fu).transform({
|
|
|
26896
26892
|
// * so this call serves a utility function.
|
|
26897
26893
|
// */
|
|
26898
26894
|
MakeMoveVec: _.struct("MakeMoveVec", {
|
|
26899
|
-
type:
|
|
26895
|
+
type: VO(yp).transform({
|
|
26900
26896
|
input: (t) => t === null ? {
|
|
26901
26897
|
None: !0
|
|
26902
26898
|
} : {
|
|
@@ -26927,7 +26923,7 @@ const Ne = _.bytes(Fu).transform({
|
|
|
26927
26923
|
ConsensusCommitPrologue: null
|
|
26928
26924
|
}), O2 = _.enum("TransactionExpiration", {
|
|
26929
26925
|
None: null,
|
|
26930
|
-
Epoch:
|
|
26926
|
+
Epoch: zO()
|
|
26931
26927
|
}), B2 = _.struct("StructTag", {
|
|
26932
26928
|
address: Ne,
|
|
26933
26929
|
module: _.string(),
|
|
@@ -26983,23 +26979,23 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
26983
26979
|
}), z2 = _.struct("MultiSigPublicKey", {
|
|
26984
26980
|
pk_map: _.vector(D2),
|
|
26985
26981
|
threshold: _.u16()
|
|
26986
|
-
}),
|
|
26982
|
+
}), GO = _.struct("MultiSig", {
|
|
26987
26983
|
sigs: _.vector(L2),
|
|
26988
26984
|
bitmap: _.u16(),
|
|
26989
26985
|
multisig_pk: z2
|
|
26990
|
-
}),
|
|
26986
|
+
}), qO = _.vector(_.u8()).transform({
|
|
26991
26987
|
input: (t) => typeof t == "string" ? Xt(t) : t,
|
|
26992
26988
|
output: (t) => At(new Uint8Array(t))
|
|
26993
26989
|
}), V2 = _.struct("SenderSignedTransaction", {
|
|
26994
26990
|
intentMessage: j2(R2),
|
|
26995
|
-
txSignatures: _.vector(
|
|
26996
|
-
}),
|
|
26991
|
+
txSignatures: _.vector(qO)
|
|
26992
|
+
}), WO = _.vector(V2, {
|
|
26997
26993
|
name: "SenderSignedData"
|
|
26998
|
-
}),
|
|
26994
|
+
}), KO = _.struct("PasskeyAuthenticator", {
|
|
26999
26995
|
authenticatorData: _.vector(_.u8()),
|
|
27000
26996
|
clientDataJson: _.string(),
|
|
27001
26997
|
userSignature: _.vector(_.u8())
|
|
27002
|
-
}),
|
|
26998
|
+
}), ZO = _.enum("PackageUpgradeError", {
|
|
27003
26999
|
UnableToFetchPackage: _.struct("UnableToFetchPackage", { packageId: Ne }),
|
|
27004
27000
|
NotAPackage: _.struct("NotAPackage", { objectId: Ne }),
|
|
27005
27001
|
IncompatibleUpgrade: null,
|
|
@@ -27009,15 +27005,15 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27009
27005
|
packageId: Ne,
|
|
27010
27006
|
ticketId: Ne
|
|
27011
27007
|
})
|
|
27012
|
-
}),
|
|
27008
|
+
}), YO = _.struct("ModuleId", {
|
|
27013
27009
|
address: Ne,
|
|
27014
27010
|
name: _.string()
|
|
27015
27011
|
}), vm = _.struct("MoveLocation", {
|
|
27016
|
-
module:
|
|
27012
|
+
module: YO,
|
|
27017
27013
|
function: _.u16(),
|
|
27018
27014
|
instruction: _.u16(),
|
|
27019
27015
|
functionName: _.option(_.string())
|
|
27020
|
-
}),
|
|
27016
|
+
}), XO = _.enum("CommandArgumentError", {
|
|
27021
27017
|
TypeMismatch: null,
|
|
27022
27018
|
InvalidBCSBytes: null,
|
|
27023
27019
|
InvalidUsageOfPureArg: null,
|
|
@@ -27033,10 +27029,10 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27033
27029
|
InvalidObjectByValue: null,
|
|
27034
27030
|
InvalidObjectByMutRef: null,
|
|
27035
27031
|
SharedObjectOperationNotAllowed: null
|
|
27036
|
-
}),
|
|
27032
|
+
}), JO = _.enum("TypeArgumentError", {
|
|
27037
27033
|
TypeNotFound: null,
|
|
27038
27034
|
ConstraintNotSatisfied: null
|
|
27039
|
-
}),
|
|
27035
|
+
}), QO = _.enum("ExecutionFailureStatus", {
|
|
27040
27036
|
InsufficientGas: null,
|
|
27041
27037
|
InvalidGasObject: null,
|
|
27042
27038
|
InvariantViolation: null,
|
|
@@ -27064,11 +27060,11 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27064
27060
|
NonEntryFunctionInvoked: null,
|
|
27065
27061
|
CommandArgumentError: _.struct("CommandArgumentError", {
|
|
27066
27062
|
argIdx: _.u16(),
|
|
27067
|
-
kind:
|
|
27063
|
+
kind: XO
|
|
27068
27064
|
}),
|
|
27069
27065
|
TypeArgumentError: _.struct("TypeArgumentError", {
|
|
27070
27066
|
argumentIdx: _.u16(),
|
|
27071
|
-
kind:
|
|
27067
|
+
kind: JO
|
|
27072
27068
|
}),
|
|
27073
27069
|
UnusedValueWithoutDrop: _.struct("UnusedValueWithoutDrop", {
|
|
27074
27070
|
resultIdx: _.u16(),
|
|
@@ -27081,7 +27077,7 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27081
27077
|
EffectsTooLarge: _.struct("EffectsTooLarge", { currentSize: _.u64(), maxSize: _.u64() }),
|
|
27082
27078
|
PublishUpgradeMissingDependency: null,
|
|
27083
27079
|
PublishUpgradeDependencyDowngrade: null,
|
|
27084
|
-
PackageUpgradeError: _.struct("PackageUpgradeError", { upgradeError:
|
|
27080
|
+
PackageUpgradeError: _.struct("PackageUpgradeError", { upgradeError: ZO }),
|
|
27085
27081
|
WrittenObjectsTooLarge: _.struct("WrittenObjectsTooLarge", {
|
|
27086
27082
|
currentSize: _.u64(),
|
|
27087
27083
|
maxSize: _.u64()
|
|
@@ -27105,7 +27101,7 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27105
27101
|
}), G2 = _.enum("ExecutionStatus", {
|
|
27106
27102
|
Success: null,
|
|
27107
27103
|
Failed: _.struct("ExecutionFailed", {
|
|
27108
|
-
error:
|
|
27104
|
+
error: QO,
|
|
27109
27105
|
command: _.option(_.u64())
|
|
27110
27106
|
})
|
|
27111
27107
|
}), q2 = _.struct("GasCostSummary", {
|
|
@@ -27113,7 +27109,7 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27113
27109
|
storageCost: _.u64(),
|
|
27114
27110
|
storageRebate: _.u64(),
|
|
27115
27111
|
nonRefundableStorageFee: _.u64()
|
|
27116
|
-
}),
|
|
27112
|
+
}), e4 = _.struct("TransactionEffectsV1", {
|
|
27117
27113
|
status: G2,
|
|
27118
27114
|
executedEpoch: _.u64(),
|
|
27119
27115
|
gasUsed: q2,
|
|
@@ -27129,29 +27125,29 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27129
27125
|
gasObject: _.tuple([fr, Bs]),
|
|
27130
27126
|
eventsDigest: _.option(Ir),
|
|
27131
27127
|
dependencies: _.vector(Ir)
|
|
27132
|
-
}), mp = _.tuple([_.u64(), Ir]),
|
|
27128
|
+
}), mp = _.tuple([_.u64(), Ir]), t4 = _.enum("ObjectIn", {
|
|
27133
27129
|
NotExist: null,
|
|
27134
27130
|
Exist: _.tuple([mp, Bs])
|
|
27135
|
-
}),
|
|
27131
|
+
}), r4 = _.enum("ObjectOut", {
|
|
27136
27132
|
NotExist: null,
|
|
27137
27133
|
ObjectWrite: _.tuple([Ir, Bs]),
|
|
27138
27134
|
PackageWrite: mp
|
|
27139
|
-
}),
|
|
27135
|
+
}), n4 = _.enum("IDOperation", {
|
|
27140
27136
|
None: null,
|
|
27141
27137
|
Created: null,
|
|
27142
27138
|
Deleted: null
|
|
27143
|
-
}),
|
|
27144
|
-
inputState:
|
|
27145
|
-
outputState:
|
|
27146
|
-
idOperation:
|
|
27147
|
-
}),
|
|
27139
|
+
}), s4 = _.struct("EffectsObjectChange", {
|
|
27140
|
+
inputState: t4,
|
|
27141
|
+
outputState: r4,
|
|
27142
|
+
idOperation: n4
|
|
27143
|
+
}), i4 = _.enum("UnchangedSharedKind", {
|
|
27148
27144
|
ReadOnlyRoot: mp,
|
|
27149
27145
|
// TODO: these have been renamed to MutateConsensusStreamEnded and ReadConsensusStreamEnded
|
|
27150
27146
|
MutateDeleted: _.u64(),
|
|
27151
27147
|
ReadDeleted: _.u64(),
|
|
27152
27148
|
Cancelled: _.u64(),
|
|
27153
27149
|
PerEpochConfig: null
|
|
27154
|
-
}),
|
|
27150
|
+
}), o4 = _.struct("TransactionEffectsV2", {
|
|
27155
27151
|
status: G2,
|
|
27156
27152
|
executedEpoch: _.u64(),
|
|
27157
27153
|
gasUsed: q2,
|
|
@@ -27160,12 +27156,12 @@ const L2 = _.enum("CompressedSignature", {
|
|
|
27160
27156
|
eventsDigest: _.option(Ir),
|
|
27161
27157
|
dependencies: _.vector(Ir),
|
|
27162
27158
|
lamportVersion: _.u64(),
|
|
27163
|
-
changedObjects: _.vector(_.tuple([Ne,
|
|
27164
|
-
unchangedSharedObjects: _.vector(_.tuple([Ne,
|
|
27159
|
+
changedObjects: _.vector(_.tuple([Ne, s4])),
|
|
27160
|
+
unchangedSharedObjects: _.vector(_.tuple([Ne, i4])),
|
|
27165
27161
|
auxDataDigest: _.option(Ir)
|
|
27166
|
-
}),
|
|
27167
|
-
V1:
|
|
27168
|
-
V2:
|
|
27162
|
+
}), a4 = _.enum("TransactionEffects", {
|
|
27163
|
+
V1: e4,
|
|
27164
|
+
V2: o4
|
|
27169
27165
|
});
|
|
27170
27166
|
function Mo(t) {
|
|
27171
27167
|
switch (t) {
|
|
@@ -27218,30 +27214,30 @@ const he = {
|
|
|
27218
27214
|
IntentMessage: j2,
|
|
27219
27215
|
IntentScope: N2,
|
|
27220
27216
|
IntentVersion: U2,
|
|
27221
|
-
MultiSig:
|
|
27217
|
+
MultiSig: GO,
|
|
27222
27218
|
MultiSigPkMap: D2,
|
|
27223
27219
|
MultiSigPublicKey: z2,
|
|
27224
27220
|
ObjectArg: x2,
|
|
27225
27221
|
ObjectDigest: Ir,
|
|
27226
27222
|
Owner: Bs,
|
|
27227
|
-
PasskeyAuthenticator:
|
|
27223
|
+
PasskeyAuthenticator: KO,
|
|
27228
27224
|
ProgrammableMoveCall: _2,
|
|
27229
27225
|
ProgrammableTransaction: I2,
|
|
27230
27226
|
PublicKey: H2,
|
|
27231
|
-
SenderSignedData:
|
|
27227
|
+
SenderSignedData: WO,
|
|
27232
27228
|
SenderSignedTransaction: V2,
|
|
27233
27229
|
SharedObjectRef: A2,
|
|
27234
27230
|
StructTag: B2,
|
|
27235
27231
|
SuiObjectRef: fr,
|
|
27236
27232
|
TransactionData: R2,
|
|
27237
27233
|
TransactionDataV1: $2,
|
|
27238
|
-
TransactionEffects:
|
|
27234
|
+
TransactionEffects: a4,
|
|
27239
27235
|
TransactionExpiration: O2,
|
|
27240
27236
|
TransactionKind: P2,
|
|
27241
27237
|
TypeTag: yp
|
|
27242
27238
|
};
|
|
27243
27239
|
var mn;
|
|
27244
|
-
function
|
|
27240
|
+
function c4(t) {
|
|
27245
27241
|
return {
|
|
27246
27242
|
lang: (t == null ? void 0 : t.lang) ?? (mn == null ? void 0 : mn.lang),
|
|
27247
27243
|
message: t == null ? void 0 : t.message,
|
|
@@ -27250,15 +27246,15 @@ function f4(t) {
|
|
|
27250
27246
|
};
|
|
27251
27247
|
}
|
|
27252
27248
|
var $l;
|
|
27253
|
-
function
|
|
27249
|
+
function u4(t) {
|
|
27254
27250
|
return $l == null ? void 0 : $l.get(t);
|
|
27255
27251
|
}
|
|
27256
27252
|
var Rl;
|
|
27257
|
-
function
|
|
27253
|
+
function f4(t) {
|
|
27258
27254
|
return Rl == null ? void 0 : Rl.get(t);
|
|
27259
27255
|
}
|
|
27260
27256
|
var Nl;
|
|
27261
|
-
function
|
|
27257
|
+
function l4(t, e) {
|
|
27262
27258
|
var r;
|
|
27263
27259
|
return (r = Nl == null ? void 0 : Nl.get(t)) == null ? void 0 : r.get(e);
|
|
27264
27260
|
}
|
|
@@ -27283,13 +27279,13 @@ function tr(t, e, r, n, s) {
|
|
|
27283
27279
|
abortEarly: n.abortEarly,
|
|
27284
27280
|
abortPipeEarly: n.abortPipeEarly
|
|
27285
27281
|
}, u = t.kind === "schema", f = (s == null ? void 0 : s.message) ?? // @ts-expect-error
|
|
27286
|
-
t.message ??
|
|
27282
|
+
t.message ?? l4(t.reference, c.lang) ?? (u ? f4(c.lang) : null) ?? n.message ?? u4(c.lang);
|
|
27287
27283
|
f && (c.message = typeof f == "function" ? f(c) : f), u && (r.typed = !1), r.issues ? r.issues.push(c) : r.issues = [c];
|
|
27288
27284
|
}
|
|
27289
|
-
function
|
|
27285
|
+
function d4(t, e) {
|
|
27290
27286
|
return Object.hasOwn(t, e) && e !== "__proto__" && e !== "prototype" && e !== "constructor";
|
|
27291
27287
|
}
|
|
27292
|
-
var
|
|
27288
|
+
var h4 = class extends Error {
|
|
27293
27289
|
/**
|
|
27294
27290
|
* Creates a Valibot error with useful information.
|
|
27295
27291
|
*
|
|
@@ -27573,7 +27569,7 @@ function ba(t, e, r) {
|
|
|
27573
27569
|
if (i && typeof i == "object") {
|
|
27574
27570
|
n.typed = !0, n.value = {};
|
|
27575
27571
|
for (const c in i)
|
|
27576
|
-
if (
|
|
27572
|
+
if (d4(i, c)) {
|
|
27577
27573
|
const u = i[c], f = this.key._run(
|
|
27578
27574
|
{ typed: !1, value: c },
|
|
27579
27575
|
s
|
|
@@ -27742,10 +27738,10 @@ function ei() {
|
|
|
27742
27738
|
function Ge(t, e, r) {
|
|
27743
27739
|
const n = t._run(
|
|
27744
27740
|
{ typed: !1, value: e },
|
|
27745
|
-
|
|
27741
|
+
c4(r)
|
|
27746
27742
|
);
|
|
27747
27743
|
if (n.issues)
|
|
27748
|
-
throw new
|
|
27744
|
+
throw new h4(n.issues);
|
|
27749
27745
|
return n.value;
|
|
27750
27746
|
}
|
|
27751
27747
|
function Pe(...t) {
|
|
@@ -27804,7 +27800,7 @@ const ao = Pe(
|
|
|
27804
27800
|
$kind: Object.keys(t)[0]
|
|
27805
27801
|
}))
|
|
27806
27802
|
// Defined manually to add `type?: 'pure' | 'object'` to Input
|
|
27807
|
-
),
|
|
27803
|
+
), p4 = Q({
|
|
27808
27804
|
budget: Ee(qt),
|
|
27809
27805
|
price: Ee(qt),
|
|
27810
27806
|
owner: Ee(ao),
|
|
@@ -27828,23 +27824,23 @@ const ao = Pe(
|
|
|
27828
27824
|
})
|
|
27829
27825
|
}),
|
|
27830
27826
|
Q({ typeParameter: Pe(Le(), qe()) })
|
|
27831
|
-
]),
|
|
27827
|
+
]), y4 = Q({
|
|
27832
27828
|
ref: Ee(vt([de("&"), de("&mut")])),
|
|
27833
27829
|
body: jd
|
|
27834
|
-
}),
|
|
27830
|
+
}), m4 = Q({
|
|
27835
27831
|
package: Jt,
|
|
27836
27832
|
module: pe(),
|
|
27837
27833
|
function: pe(),
|
|
27838
27834
|
// snake case in rust
|
|
27839
27835
|
typeArguments: fe(pe()),
|
|
27840
27836
|
arguments: fe(Fe),
|
|
27841
|
-
_argumentTypes: ot(Ee(fe(
|
|
27842
|
-
}),
|
|
27837
|
+
_argumentTypes: ot(Ee(fe(y4)))
|
|
27838
|
+
}), b4 = Q({
|
|
27843
27839
|
name: pe(),
|
|
27844
27840
|
inputs: ba(pe(), vt([Fe, fe(Fe)])),
|
|
27845
27841
|
data: ba(pe(), ei())
|
|
27846
|
-
}),
|
|
27847
|
-
MoveCall:
|
|
27842
|
+
}), g4 = fi({
|
|
27843
|
+
MoveCall: m4,
|
|
27848
27844
|
TransferObjects: Q({
|
|
27849
27845
|
objects: fe(Fe),
|
|
27850
27846
|
address: Fe
|
|
@@ -27871,7 +27867,7 @@ const ao = Pe(
|
|
|
27871
27867
|
package: Jt,
|
|
27872
27868
|
ticket: Fe
|
|
27873
27869
|
}),
|
|
27874
|
-
$Intent:
|
|
27870
|
+
$Intent: b4
|
|
27875
27871
|
}), K2 = fi({
|
|
27876
27872
|
ImmOrOwnedObject: bs,
|
|
27877
27873
|
SharedObject: Q({
|
|
@@ -27881,7 +27877,7 @@ const ao = Pe(
|
|
|
27881
27877
|
mutable: oo()
|
|
27882
27878
|
}),
|
|
27883
27879
|
Receiving: bs
|
|
27884
|
-
}),
|
|
27880
|
+
}), w4 = fi({
|
|
27885
27881
|
Object: K2,
|
|
27886
27882
|
Pure: Q({
|
|
27887
27883
|
bytes: ti
|
|
@@ -27908,9 +27904,9 @@ const ao = Pe(
|
|
|
27908
27904
|
version: de(2),
|
|
27909
27905
|
sender: Yi(ao),
|
|
27910
27906
|
expiration: Yi(Z2),
|
|
27911
|
-
gasData:
|
|
27912
|
-
inputs: fe(
|
|
27913
|
-
commands: fe(
|
|
27907
|
+
gasData: p4,
|
|
27908
|
+
inputs: fe(w4),
|
|
27909
|
+
commands: fe(g4)
|
|
27914
27910
|
}), xs = {
|
|
27915
27911
|
MoveCall(t) {
|
|
27916
27912
|
const [e, r = "", n = ""] = "target" in t ? t.target.split("::") : [t.package, t.module, t.function];
|
|
@@ -28019,7 +28015,7 @@ const ao = Pe(
|
|
|
28019
28015
|
digest: pe(),
|
|
28020
28016
|
objectId: pe(),
|
|
28021
28017
|
version: vt([Pe(Le(), qe()), pe(), gp()])
|
|
28022
|
-
}),
|
|
28018
|
+
}), v4 = fi({
|
|
28023
28019
|
ImmOrOwned: Ld,
|
|
28024
28020
|
Shared: Q({
|
|
28025
28021
|
objectId: Jt,
|
|
@@ -28028,7 +28024,7 @@ const ao = Pe(
|
|
|
28028
28024
|
}),
|
|
28029
28025
|
Receiving: Ld
|
|
28030
28026
|
}), Am = fi({
|
|
28031
|
-
Object:
|
|
28027
|
+
Object: v4,
|
|
28032
28028
|
Pure: fe(Pe(Le(), qe()))
|
|
28033
28029
|
}), Y2 = vt([
|
|
28034
28030
|
Q({
|
|
@@ -28043,7 +28039,7 @@ const ao = Pe(
|
|
|
28043
28039
|
value: ei(),
|
|
28044
28040
|
type: de("pure")
|
|
28045
28041
|
})
|
|
28046
|
-
]),
|
|
28042
|
+
]), E4 = vt([
|
|
28047
28043
|
Q({ Epoch: Pe(Le(), qe()) }),
|
|
28048
28044
|
Q({ None: Ee(de(!0)) })
|
|
28049
28045
|
]), xm = Pe(
|
|
@@ -28064,21 +28060,21 @@ const ao = Pe(
|
|
|
28064
28060
|
Q({ address: Ee(de(!0)) }),
|
|
28065
28061
|
Q({ signer: Ee(de(!0)) }),
|
|
28066
28062
|
Q({ vector: ma(() => vp) }),
|
|
28067
|
-
Q({ struct: ma(() =>
|
|
28063
|
+
Q({ struct: ma(() => S4) }),
|
|
28068
28064
|
Q({ u16: Ee(de(!0)) }),
|
|
28069
28065
|
Q({ u32: Ee(de(!0)) }),
|
|
28070
28066
|
Q({ u256: Ee(de(!0)) })
|
|
28071
|
-
]),
|
|
28067
|
+
]), S4 = Q({
|
|
28072
28068
|
address: pe(),
|
|
28073
28069
|
module: pe(),
|
|
28074
28070
|
name: pe(),
|
|
28075
28071
|
typeParams: fe(vp)
|
|
28076
|
-
}),
|
|
28072
|
+
}), A4 = Q({
|
|
28077
28073
|
budget: ot(xm),
|
|
28078
28074
|
price: ot(xm),
|
|
28079
28075
|
payment: ot(fe(Ld)),
|
|
28080
28076
|
owner: ot(pe())
|
|
28081
|
-
}),
|
|
28077
|
+
}), x4 = [
|
|
28082
28078
|
Y2,
|
|
28083
28079
|
Q({ kind: de("GasCoin") }),
|
|
28084
28080
|
Q({ kind: de("Result"), index: Pe(Le(), qe()) }),
|
|
@@ -28087,7 +28083,7 @@ const ao = Pe(
|
|
|
28087
28083
|
index: Pe(Le(), qe()),
|
|
28088
28084
|
resultIndex: Pe(Le(), qe())
|
|
28089
28085
|
})
|
|
28090
|
-
], Mn = vt([...
|
|
28086
|
+
], Mn = vt([...x4]), k4 = Q({
|
|
28091
28087
|
kind: de("MoveCall"),
|
|
28092
28088
|
target: Pe(
|
|
28093
28089
|
pe(),
|
|
@@ -28095,48 +28091,48 @@ const ao = Pe(
|
|
|
28095
28091
|
),
|
|
28096
28092
|
typeArguments: fe(pe()),
|
|
28097
28093
|
arguments: fe(Mn)
|
|
28098
|
-
}),
|
|
28094
|
+
}), _4 = Q({
|
|
28099
28095
|
kind: de("TransferObjects"),
|
|
28100
28096
|
objects: fe(Mn),
|
|
28101
28097
|
address: Mn
|
|
28102
|
-
}),
|
|
28098
|
+
}), T4 = Q({
|
|
28103
28099
|
kind: de("SplitCoins"),
|
|
28104
28100
|
coin: Mn,
|
|
28105
28101
|
amounts: fe(Mn)
|
|
28106
|
-
}),
|
|
28102
|
+
}), I4 = Q({
|
|
28107
28103
|
kind: de("MergeCoins"),
|
|
28108
28104
|
destination: Mn,
|
|
28109
28105
|
sources: fe(Mn)
|
|
28110
|
-
}),
|
|
28106
|
+
}), P4 = Q({
|
|
28111
28107
|
kind: de("MakeMoveVec"),
|
|
28112
28108
|
type: vt([Q({ Some: vp }), Q({ None: Ee(de(!0)) })]),
|
|
28113
28109
|
objects: fe(Mn)
|
|
28114
|
-
}),
|
|
28110
|
+
}), O4 = Q({
|
|
28115
28111
|
kind: de("Publish"),
|
|
28116
28112
|
modules: fe(fe(Pe(Le(), qe()))),
|
|
28117
28113
|
dependencies: fe(pe())
|
|
28118
|
-
}),
|
|
28114
|
+
}), B4 = Q({
|
|
28119
28115
|
kind: de("Upgrade"),
|
|
28120
28116
|
modules: fe(fe(Pe(Le(), qe()))),
|
|
28121
28117
|
dependencies: fe(pe()),
|
|
28122
28118
|
packageId: pe(),
|
|
28123
28119
|
ticket: Mn
|
|
28124
|
-
}),
|
|
28120
|
+
}), C4 = [
|
|
28121
|
+
k4,
|
|
28122
|
+
_4,
|
|
28125
28123
|
T4,
|
|
28126
28124
|
I4,
|
|
28127
|
-
P4,
|
|
28128
28125
|
O4,
|
|
28129
|
-
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
], N4 = vt([...R4]);
|
|
28126
|
+
B4,
|
|
28127
|
+
P4
|
|
28128
|
+
], $4 = vt([...C4]);
|
|
28133
28129
|
Q({
|
|
28134
28130
|
version: de(1),
|
|
28135
28131
|
sender: ot(pe()),
|
|
28136
|
-
expiration: Yi(
|
|
28137
|
-
gasConfig:
|
|
28132
|
+
expiration: Yi(E4),
|
|
28133
|
+
gasConfig: A4,
|
|
28138
28134
|
inputs: fe(Y2),
|
|
28139
|
-
transactions: fe(
|
|
28135
|
+
transactions: fe($4)
|
|
28140
28136
|
});
|
|
28141
28137
|
function km(t) {
|
|
28142
28138
|
var r;
|
|
@@ -28269,7 +28265,7 @@ function bn(t, e) {
|
|
|
28269
28265
|
return e[t.Input];
|
|
28270
28266
|
throw new Error(`Invalid argument ${Object.keys(t)}`);
|
|
28271
28267
|
}
|
|
28272
|
-
function
|
|
28268
|
+
function R4(t) {
|
|
28273
28269
|
var e, r, n;
|
|
28274
28270
|
return Ge(kc, {
|
|
28275
28271
|
version: 2,
|
|
@@ -28425,24 +28421,24 @@ const Er = Va({
|
|
|
28425
28421
|
Input: Pe(Le(), qe()),
|
|
28426
28422
|
Result: Pe(Le(), qe()),
|
|
28427
28423
|
NestedResult: wp([Pe(Le(), qe()), Pe(Le(), qe())])
|
|
28428
|
-
}),
|
|
28424
|
+
}), N4 = Q({
|
|
28429
28425
|
budget: Ee(qt),
|
|
28430
28426
|
price: Ee(qt),
|
|
28431
28427
|
owner: Ee(ao),
|
|
28432
28428
|
payment: Ee(fe(bs))
|
|
28433
|
-
}),
|
|
28429
|
+
}), U4 = Q({
|
|
28434
28430
|
package: Jt,
|
|
28435
28431
|
module: pe(),
|
|
28436
28432
|
function: pe(),
|
|
28437
28433
|
// snake case in rust
|
|
28438
28434
|
typeArguments: fe(pe()),
|
|
28439
28435
|
arguments: fe(Er)
|
|
28440
|
-
}),
|
|
28436
|
+
}), M4 = Q({
|
|
28441
28437
|
name: pe(),
|
|
28442
28438
|
inputs: ba(pe(), vt([Er, fe(Er)])),
|
|
28443
28439
|
data: ba(pe(), ei())
|
|
28444
|
-
}),
|
|
28445
|
-
MoveCall:
|
|
28440
|
+
}), F4 = Va({
|
|
28441
|
+
MoveCall: U4,
|
|
28446
28442
|
TransferObjects: Q({
|
|
28447
28443
|
objects: fe(Er),
|
|
28448
28444
|
address: Er
|
|
@@ -28469,8 +28465,8 @@ const Er = Va({
|
|
|
28469
28465
|
package: Jt,
|
|
28470
28466
|
ticket: Er
|
|
28471
28467
|
}),
|
|
28472
|
-
$Intent:
|
|
28473
|
-
}),
|
|
28468
|
+
$Intent: M4
|
|
28469
|
+
}), j4 = Va({
|
|
28474
28470
|
ImmOrOwnedObject: bs,
|
|
28475
28471
|
SharedObject: Q({
|
|
28476
28472
|
objectId: Jt,
|
|
@@ -28479,8 +28475,8 @@ const Er = Va({
|
|
|
28479
28475
|
mutable: oo()
|
|
28480
28476
|
}),
|
|
28481
28477
|
Receiving: bs
|
|
28482
|
-
}),
|
|
28483
|
-
Object:
|
|
28478
|
+
}), L4 = Va({
|
|
28479
|
+
Object: j4,
|
|
28484
28480
|
Pure: Q({
|
|
28485
28481
|
bytes: ti
|
|
28486
28482
|
}),
|
|
@@ -28494,19 +28490,19 @@ const Er = Va({
|
|
|
28494
28490
|
initialSharedVersion: ot(Ee(qt)),
|
|
28495
28491
|
mutable: ot(Ee(oo()))
|
|
28496
28492
|
})
|
|
28497
|
-
}),
|
|
28493
|
+
}), H4 = Va({
|
|
28498
28494
|
None: de(!0),
|
|
28499
28495
|
Epoch: qt
|
|
28500
|
-
}),
|
|
28496
|
+
}), D4 = Q({
|
|
28501
28497
|
version: de(2),
|
|
28502
28498
|
sender: Yi(ao),
|
|
28503
|
-
expiration: Yi(
|
|
28504
|
-
gasData:
|
|
28505
|
-
inputs: fe(
|
|
28506
|
-
commands: fe(
|
|
28499
|
+
expiration: Yi(H4),
|
|
28500
|
+
gasData: N4,
|
|
28501
|
+
inputs: fe(L4),
|
|
28502
|
+
commands: fe(F4),
|
|
28507
28503
|
digest: ot(Ee(pe()))
|
|
28508
28504
|
});
|
|
28509
|
-
function
|
|
28505
|
+
function z4(t) {
|
|
28510
28506
|
return {
|
|
28511
28507
|
$kind: "Pure",
|
|
28512
28508
|
Pure: {
|
|
@@ -28515,7 +28511,7 @@ function G4(t) {
|
|
|
28515
28511
|
};
|
|
28516
28512
|
}
|
|
28517
28513
|
const Pr = {
|
|
28518
|
-
Pure:
|
|
28514
|
+
Pure: z4,
|
|
28519
28515
|
ObjectRef({ objectId: t, digest: e, version: r }) {
|
|
28520
28516
|
return {
|
|
28521
28517
|
$kind: "Object",
|
|
@@ -28561,9 +28557,9 @@ const Pr = {
|
|
|
28561
28557
|
}
|
|
28562
28558
|
};
|
|
28563
28559
|
BigInt(1e9);
|
|
28564
|
-
const
|
|
28560
|
+
const V4 = "0x1", X2 = "0x2", G4 = Tn("0x6"), q4 = `${X2}::sui::SUI`;
|
|
28565
28561
|
Tn("0x5");
|
|
28566
|
-
const
|
|
28562
|
+
const W4 = /* @__PURE__ */ Uint8Array.from([
|
|
28567
28563
|
0,
|
|
28568
28564
|
1,
|
|
28569
28565
|
2,
|
|
@@ -28849,7 +28845,7 @@ function Xn(t, e, r, n, s, i) {
|
|
|
28849
28845
|
let c = ee[2 * t], u = ee[2 * t + 1], f = ee[2 * e], l = ee[2 * e + 1], p = ee[2 * r], d = ee[2 * r + 1], m = ee[2 * n], b = ee[2 * n + 1], v = wb(c, f, o);
|
|
28850
28846
|
u = vb(v, u, l, a), c = v | 0, { Dh: b, Dl: m } = { Dh: b ^ u, Dl: m ^ c }, { Dh: b, Dl: m } = { Dh: mb(b, m, 16), Dl: bb(b, m, 16) }, { h: d, l: p } = gb(d, p, b, m), { Bh: l, Bl: f } = { Bh: l ^ d, Bl: f ^ p }, { Bh: l, Bl: f } = { Bh: i5(l, f, 63), Bl: o5(l, f, 63) }, ee[2 * t] = c, ee[2 * t + 1] = u, ee[2 * e] = f, ee[2 * e + 1] = l, ee[2 * r] = p, ee[2 * r + 1] = d, ee[2 * n] = m, ee[2 * n + 1] = b;
|
|
28851
28847
|
}
|
|
28852
|
-
function
|
|
28848
|
+
function K4(t, e = {}, r, n, s) {
|
|
28853
28849
|
if (ds(r), t < 0 || t > r)
|
|
28854
28850
|
throw new Error("outputLen bigger than keyLen");
|
|
28855
28851
|
const { key: i, salt: o, personalization: a } = e;
|
|
@@ -28860,7 +28856,7 @@ function Y4(t, e = {}, r, n, s) {
|
|
|
28860
28856
|
if (a !== void 0 && a.length !== s)
|
|
28861
28857
|
throw new Error("personalization must be undefined or " + s);
|
|
28862
28858
|
}
|
|
28863
|
-
class
|
|
28859
|
+
class Z4 extends Kc {
|
|
28864
28860
|
constructor(e, r) {
|
|
28865
28861
|
super(), this.finished = !1, this.destroyed = !1, this.length = 0, this.pos = 0, ds(e), ds(r), this.blockLen = e, this.outputLen = r, this.buffer = new Uint8Array(e), this.buffer32 = Ho(this.buffer);
|
|
28866
28862
|
}
|
|
@@ -28903,10 +28899,10 @@ class X4 extends Kc {
|
|
|
28903
28899
|
return this._cloneInto();
|
|
28904
28900
|
}
|
|
28905
28901
|
}
|
|
28906
|
-
class
|
|
28902
|
+
class Y4 extends Z4 {
|
|
28907
28903
|
constructor(e = {}) {
|
|
28908
28904
|
const r = e.dkLen === void 0 ? 64 : e.dkLen;
|
|
28909
|
-
super(128, r), this.v0l = nt[0] | 0, this.v0h = nt[1] | 0, this.v1l = nt[2] | 0, this.v1h = nt[3] | 0, this.v2l = nt[4] | 0, this.v2h = nt[5] | 0, this.v3l = nt[6] | 0, this.v3h = nt[7] | 0, this.v4l = nt[8] | 0, this.v4h = nt[9] | 0, this.v5l = nt[10] | 0, this.v5h = nt[11] | 0, this.v6l = nt[12] | 0, this.v6h = nt[13] | 0, this.v7l = nt[14] | 0, this.v7h = nt[15] | 0,
|
|
28905
|
+
super(128, r), this.v0l = nt[0] | 0, this.v0h = nt[1] | 0, this.v1l = nt[2] | 0, this.v1h = nt[3] | 0, this.v2l = nt[4] | 0, this.v2h = nt[5] | 0, this.v3l = nt[6] | 0, this.v3h = nt[7] | 0, this.v4l = nt[8] | 0, this.v4h = nt[9] | 0, this.v5l = nt[10] | 0, this.v5h = nt[11] | 0, this.v6l = nt[12] | 0, this.v6h = nt[13] | 0, this.v7l = nt[14] | 0, this.v7h = nt[15] | 0, K4(r, e, 64, 16, 16);
|
|
28910
28906
|
let { key: n, personalization: s, salt: i } = e, o = 0;
|
|
28911
28907
|
if (n !== void 0 && (n = In(n), o = n.length), this.v0l ^= this.outputLen | o << 8 | 65536 | 1 << 24, i !== void 0) {
|
|
28912
28908
|
i = In(i);
|
|
@@ -28937,7 +28933,7 @@ class J4 extends X4 {
|
|
|
28937
28933
|
let { h: s, l: i } = yb(BigInt(this.length));
|
|
28938
28934
|
ee[24] = nt[8] ^ i, ee[25] = nt[9] ^ s, n && (ee[28] = ~ee[28], ee[29] = ~ee[29]);
|
|
28939
28935
|
let o = 0;
|
|
28940
|
-
const a =
|
|
28936
|
+
const a = W4;
|
|
28941
28937
|
for (let c = 0; c < 12; c++)
|
|
28942
28938
|
Yn(0, 4, 8, 12, e, r + 2 * a[o++]), Xn(0, 4, 8, 12, e, r + 2 * a[o++]), Yn(1, 5, 9, 13, e, r + 2 * a[o++]), Xn(1, 5, 9, 13, e, r + 2 * a[o++]), Yn(2, 6, 10, 14, e, r + 2 * a[o++]), Xn(2, 6, 10, 14, e, r + 2 * a[o++]), Yn(3, 7, 11, 15, e, r + 2 * a[o++]), Xn(3, 7, 11, 15, e, r + 2 * a[o++]), Yn(0, 5, 10, 15, e, r + 2 * a[o++]), Xn(0, 5, 10, 15, e, r + 2 * a[o++]), Yn(1, 6, 11, 12, e, r + 2 * a[o++]), Xn(1, 6, 11, 12, e, r + 2 * a[o++]), Yn(2, 7, 8, 13, e, r + 2 * a[o++]), Xn(2, 7, 8, 13, e, r + 2 * a[o++]), Yn(3, 4, 9, 14, e, r + 2 * a[o++]), Xn(3, 4, 9, 14, e, r + 2 * a[o++]);
|
|
28943
28939
|
this.v0l ^= ee[0] ^ ee[16], this.v0h ^= ee[1] ^ ee[17], this.v1l ^= ee[2] ^ ee[18], this.v1h ^= ee[3] ^ ee[19], this.v2l ^= ee[4] ^ ee[20], this.v2h ^= ee[5] ^ ee[21], this.v3l ^= ee[6] ^ ee[22], this.v3h ^= ee[7] ^ ee[23], this.v4l ^= ee[8] ^ ee[24], this.v4h ^= ee[9] ^ ee[25], this.v5l ^= ee[10] ^ ee[26], this.v5h ^= ee[11] ^ ee[27], this.v6l ^= ee[12] ^ ee[28], this.v6h ^= ee[13] ^ ee[29], this.v7l ^= ee[14] ^ ee[30], this.v7h ^= ee[15] ^ ee[31], Br(ee);
|
|
@@ -28946,15 +28942,15 @@ class J4 extends X4 {
|
|
|
28946
28942
|
this.destroyed = !0, Br(this.buffer32), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
28947
28943
|
}
|
|
28948
28944
|
}
|
|
28949
|
-
const
|
|
28950
|
-
function
|
|
28945
|
+
const X4 = /* @__PURE__ */ g5((t) => new Y4(t)), J2 = X4;
|
|
28946
|
+
function J4(t, e, r) {
|
|
28951
28947
|
const n = he.Address.serialize(t).toBytes(), s = he.TypeTag.serialize(e).toBytes(), i = he.u64().serialize(r.length).toBytes(), o = J2.create({
|
|
28952
28948
|
dkLen: 32
|
|
28953
28949
|
});
|
|
28954
28950
|
return o.update(new Uint8Array([240])), o.update(n), o.update(i), o.update(r), o.update(s), `0x${Zi(o.digest().slice(0, 32))}`;
|
|
28955
28951
|
}
|
|
28956
|
-
const
|
|
28957
|
-
function
|
|
28952
|
+
const Q4 = "object", eB = "ID", tB = "ascii", rB = "String", nB = "string", sB = "String", iB = "option", oB = "Option";
|
|
28953
|
+
function aB(t) {
|
|
28958
28954
|
const e = typeof t.body == "object" && "datatype" in t.body ? t.body.datatype : null;
|
|
28959
28955
|
return !!e && xe(e.package) === xe("0x2") && e.module === "tx_context" && e.type === "TxContext";
|
|
28960
28956
|
}
|
|
@@ -28991,20 +28987,20 @@ function Hd(t) {
|
|
|
28991
28987
|
}
|
|
28992
28988
|
if ("datatype" in t) {
|
|
28993
28989
|
const e = xe(t.datatype.package);
|
|
28994
|
-
if (e === xe(
|
|
28995
|
-
if (t.datatype.module ===
|
|
28990
|
+
if (e === xe(V4)) {
|
|
28991
|
+
if (t.datatype.module === tB && t.datatype.type === rB || t.datatype.module === nB && t.datatype.type === sB)
|
|
28996
28992
|
return he.String;
|
|
28997
|
-
if (t.datatype.module ===
|
|
28993
|
+
if (t.datatype.module === iB && t.datatype.type === oB) {
|
|
28998
28994
|
const r = Hd(t.datatype.typeParameters[0]);
|
|
28999
28995
|
return r ? he.vector(r) : null;
|
|
29000
28996
|
}
|
|
29001
28997
|
}
|
|
29002
|
-
if (e === xe(X2) && t.datatype.module ===
|
|
28998
|
+
if (e === xe(X2) && t.datatype.module === Q4 && t.datatype.type === eB)
|
|
29003
28999
|
return he.Address;
|
|
29004
29000
|
}
|
|
29005
29001
|
return null;
|
|
29006
29002
|
}
|
|
29007
|
-
function
|
|
29003
|
+
function cB(t) {
|
|
29008
29004
|
return typeof t == "object" && "Reference" in t ? {
|
|
29009
29005
|
ref: "&",
|
|
29010
29006
|
body: Fo(t.Reference)
|
|
@@ -29053,23 +29049,23 @@ function Fo(t) {
|
|
|
29053
29049
|
return { typeParameter: t.TypeParameter };
|
|
29054
29050
|
throw new Error(`Unexpected type ${JSON.stringify(t)}`);
|
|
29055
29051
|
}
|
|
29056
|
-
const
|
|
29052
|
+
const uB = 50, fB = 1000n, lB = 5e10;
|
|
29057
29053
|
function Q2(t) {
|
|
29058
29054
|
return async function(r, n, s) {
|
|
29059
|
-
return await
|
|
29055
|
+
return await mB(r, t), await yB(r, t), n.onlyTransactionKind || (await dB(r, t), await hB(r, t), await pB(r, t)), await s();
|
|
29060
29056
|
};
|
|
29061
29057
|
}
|
|
29062
|
-
async function
|
|
29058
|
+
async function dB(t, e) {
|
|
29063
29059
|
t.gasConfig.price || (t.gasConfig.price = String(await e.getReferenceGasPrice()));
|
|
29064
29060
|
}
|
|
29065
|
-
async function
|
|
29061
|
+
async function hB(t, e) {
|
|
29066
29062
|
if (t.gasConfig.budget)
|
|
29067
29063
|
return;
|
|
29068
29064
|
const r = await e.dryRunTransactionBlock({
|
|
29069
29065
|
transactionBlock: t.build({
|
|
29070
29066
|
overrides: {
|
|
29071
29067
|
gasData: {
|
|
29072
|
-
budget: String(
|
|
29068
|
+
budget: String(lB),
|
|
29073
29069
|
payment: []
|
|
29074
29070
|
}
|
|
29075
29071
|
}
|
|
@@ -29080,16 +29076,16 @@ async function yB(t, e) {
|
|
|
29080
29076
|
`Dry run failed, could not automatically determine a budget: ${r.effects.status.error}`,
|
|
29081
29077
|
{ cause: r }
|
|
29082
29078
|
);
|
|
29083
|
-
const n =
|
|
29079
|
+
const n = fB * BigInt(t.gasConfig.price || 1n), s = BigInt(r.effects.gasUsed.computationCost) + n, i = s + BigInt(r.effects.gasUsed.storageCost) - BigInt(r.effects.gasUsed.storageRebate);
|
|
29084
29080
|
t.gasConfig.budget = String(
|
|
29085
29081
|
i > s ? i : s
|
|
29086
29082
|
);
|
|
29087
29083
|
}
|
|
29088
|
-
async function
|
|
29084
|
+
async function pB(t, e) {
|
|
29089
29085
|
if (!t.gasConfig.payment) {
|
|
29090
29086
|
const n = (await e.getCoins({
|
|
29091
29087
|
owner: t.gasConfig.owner || t.sender,
|
|
29092
|
-
coinType:
|
|
29088
|
+
coinType: q4
|
|
29093
29089
|
})).data.filter((s) => !t.inputs.find((o) => {
|
|
29094
29090
|
var a;
|
|
29095
29091
|
return (a = o.Object) != null && a.ImmOrOwnedObject ? s.coinObjectId === o.Object.ImmOrOwnedObject.objectId : !1;
|
|
@@ -29105,7 +29101,7 @@ async function mB(t, e) {
|
|
|
29105
29101
|
);
|
|
29106
29102
|
}
|
|
29107
29103
|
}
|
|
29108
|
-
async function
|
|
29104
|
+
async function yB(t, e) {
|
|
29109
29105
|
const r = t.inputs.filter((f) => {
|
|
29110
29106
|
var l;
|
|
29111
29107
|
return f.UnresolvedObject && !(f.UnresolvedObject.version || (l = f.UnresolvedObject) != null && l.initialSharedVersion);
|
|
@@ -29113,7 +29109,7 @@ async function bB(t, e) {
|
|
|
29113
29109
|
...new Set(
|
|
29114
29110
|
r.map((f) => Tn(f.UnresolvedObject.objectId))
|
|
29115
29111
|
)
|
|
29116
|
-
], s = n.length ? Mu(n,
|
|
29112
|
+
], s = n.length ? Mu(n, uB) : [], i = (await Promise.all(
|
|
29117
29113
|
s.map(
|
|
29118
29114
|
(f) => e.multiGetObjects({
|
|
29119
29115
|
ids: f,
|
|
@@ -29146,8 +29142,8 @@ async function bB(t, e) {
|
|
|
29146
29142
|
l.UnresolvedObject.initialSharedVersion ?? (m == null ? void 0 : m.initialSharedVersion) ? p = Pr.SharedObjectRef({
|
|
29147
29143
|
objectId: d,
|
|
29148
29144
|
initialSharedVersion: l.UnresolvedObject.initialSharedVersion || (m == null ? void 0 : m.initialSharedVersion),
|
|
29149
|
-
mutable: l.UnresolvedObject.mutable ||
|
|
29150
|
-
}) :
|
|
29145
|
+
mutable: l.UnresolvedObject.mutable || bB(t, f)
|
|
29146
|
+
}) : gB(t, f) && (p = Pr.ReceivingRef(
|
|
29151
29147
|
{
|
|
29152
29148
|
objectId: d,
|
|
29153
29149
|
digest: l.UnresolvedObject.digest ?? (m == null ? void 0 : m.digest),
|
|
@@ -29160,7 +29156,7 @@ async function bB(t, e) {
|
|
|
29160
29156
|
});
|
|
29161
29157
|
}
|
|
29162
29158
|
}
|
|
29163
|
-
async function
|
|
29159
|
+
async function mB(t, e) {
|
|
29164
29160
|
const { inputs: r, commands: n } = t, s = [], i = /* @__PURE__ */ new Set();
|
|
29165
29161
|
n.forEach((a) => {
|
|
29166
29162
|
if (a.MoveCall) {
|
|
@@ -29184,7 +29180,7 @@ async function gB(t, e) {
|
|
|
29184
29180
|
});
|
|
29185
29181
|
o.set(
|
|
29186
29182
|
a,
|
|
29187
|
-
l.parameters.map((p) =>
|
|
29183
|
+
l.parameters.map((p) => cB(p))
|
|
29188
29184
|
);
|
|
29189
29185
|
})
|
|
29190
29186
|
), s.length && await Promise.all(
|
|
@@ -29194,7 +29190,7 @@ async function gB(t, e) {
|
|
|
29194
29190
|
);
|
|
29195
29191
|
if (!c)
|
|
29196
29192
|
return;
|
|
29197
|
-
const f = c.length > 0 &&
|
|
29193
|
+
const f = c.length > 0 && aB(c.at(-1)) ? c.slice(0, c.length - 1) : c;
|
|
29198
29194
|
a._argumentTypes = f;
|
|
29199
29195
|
})
|
|
29200
29196
|
), n.forEach((a) => {
|
|
@@ -29236,7 +29232,7 @@ async function gB(t, e) {
|
|
|
29236
29232
|
}
|
|
29237
29233
|
});
|
|
29238
29234
|
}
|
|
29239
|
-
function
|
|
29235
|
+
function bB(t, e) {
|
|
29240
29236
|
let r = !1;
|
|
29241
29237
|
return t.getInputUses(e, (n, s) => {
|
|
29242
29238
|
if (s.MoveCall && s.MoveCall._argumentTypes) {
|
|
@@ -29246,26 +29242,26 @@ function wB(t, e) {
|
|
|
29246
29242
|
(s.$kind === "MakeMoveVec" || s.$kind === "MergeCoins" || s.$kind === "SplitCoins" || s.$kind === "TransferObjects") && (r = !0);
|
|
29247
29243
|
}), r;
|
|
29248
29244
|
}
|
|
29249
|
-
function
|
|
29245
|
+
function gB(t, e) {
|
|
29250
29246
|
let r = !1;
|
|
29251
29247
|
return t.getInputUses(e, (n, s) => {
|
|
29252
29248
|
if (s.MoveCall && s.MoveCall._argumentTypes) {
|
|
29253
29249
|
const i = s.MoveCall.arguments.indexOf(n);
|
|
29254
|
-
r =
|
|
29250
|
+
r = wB(s.MoveCall._argumentTypes[i]) || r;
|
|
29255
29251
|
}
|
|
29256
29252
|
}), r;
|
|
29257
29253
|
}
|
|
29258
|
-
function
|
|
29254
|
+
function wB(t) {
|
|
29259
29255
|
return typeof t.body != "object" || !("datatype" in t.body) ? !1 : t.body.datatype.package === "0x2" && t.body.datatype.module === "transfer" && t.body.datatype.type === "Receiving";
|
|
29260
29256
|
}
|
|
29261
29257
|
function e6(t, e) {
|
|
29262
29258
|
return !!(t.inputs.some((r) => r.UnresolvedObject || r.UnresolvedPure) || !e.onlyTransactionKind && (!t.gasConfig.price || !t.gasConfig.budget || !t.gasConfig.payment));
|
|
29263
29259
|
}
|
|
29264
|
-
async function
|
|
29260
|
+
async function vB(t, e, r) {
|
|
29265
29261
|
var i;
|
|
29266
|
-
if (
|
|
29262
|
+
if (SB(t), !e6(t, e))
|
|
29267
29263
|
return await _m(t), r();
|
|
29268
|
-
const n =
|
|
29264
|
+
const n = EB(e);
|
|
29269
29265
|
return (((i = n.core) == null ? void 0 : i.resolveTransactionPlugin()) ?? Q2(n))(t, e, async () => {
|
|
29270
29266
|
await _m(t), await r();
|
|
29271
29267
|
});
|
|
@@ -29280,14 +29276,14 @@ function _m(t) {
|
|
|
29280
29276
|
);
|
|
29281
29277
|
});
|
|
29282
29278
|
}
|
|
29283
|
-
function
|
|
29279
|
+
function EB(t) {
|
|
29284
29280
|
if (!t.client)
|
|
29285
29281
|
throw new Error(
|
|
29286
29282
|
"No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
|
|
29287
29283
|
);
|
|
29288
29284
|
return t.client;
|
|
29289
29285
|
}
|
|
29290
|
-
function
|
|
29286
|
+
function SB(t) {
|
|
29291
29287
|
for (const e of t.commands)
|
|
29292
29288
|
switch (e.$kind) {
|
|
29293
29289
|
case "SplitCoins":
|
|
@@ -29306,7 +29302,7 @@ function Tm(t, e, r) {
|
|
|
29306
29302
|
const n = r.inputs[t.Input];
|
|
29307
29303
|
n.$kind === "UnresolvedPure" && (r.inputs[t.Input] = Pr.Pure(e.serialize(n.UnresolvedPure.value)));
|
|
29308
29304
|
}
|
|
29309
|
-
function
|
|
29305
|
+
function AB(t) {
|
|
29310
29306
|
function e(r) {
|
|
29311
29307
|
return t(r);
|
|
29312
29308
|
}
|
|
@@ -29349,7 +29345,7 @@ function kB(t) {
|
|
|
29349
29345
|
arguments: n === null ? [] : [s.object(n)]
|
|
29350
29346
|
}), e;
|
|
29351
29347
|
}
|
|
29352
|
-
function
|
|
29348
|
+
function xB(t) {
|
|
29353
29349
|
function e(r, n) {
|
|
29354
29350
|
if (typeof r == "string")
|
|
29355
29351
|
return t(Mo(r).serialize(n));
|
|
@@ -29361,7 +29357,7 @@ function _B(t) {
|
|
|
29361
29357
|
he.vector(Mo(r)).serialize(n)
|
|
29362
29358
|
), e.option = (r, n) => t(he.option(Mo(r)).serialize(n)), e;
|
|
29363
29359
|
}
|
|
29364
|
-
function
|
|
29360
|
+
function kB(t, e) {
|
|
29365
29361
|
const r = Array.from(`${t}::`).map((s) => s.charCodeAt(0)), n = new Uint8Array(r.length + e.length);
|
|
29366
29362
|
return n.set(r), n.set(e, r.length), J2(n, { dkLen: 32 });
|
|
29367
29363
|
}
|
|
@@ -29409,7 +29405,7 @@ class Ht {
|
|
|
29409
29405
|
});
|
|
29410
29406
|
}
|
|
29411
29407
|
static restore(e) {
|
|
29412
|
-
return e.version === 2 ? new Ht(Ge(kc, e)) : new Ht(Ge(kc,
|
|
29408
|
+
return e.version === 2 ? new Ht(Ge(kc, e)) : new Ht(Ge(kc, R4(e)));
|
|
29413
29409
|
}
|
|
29414
29410
|
/**
|
|
29415
29411
|
* Generate transaction digest.
|
|
@@ -29418,7 +29414,7 @@ class Ht {
|
|
|
29418
29414
|
* @returns transaction digest.
|
|
29419
29415
|
*/
|
|
29420
29416
|
static getDigestFromBytes(e) {
|
|
29421
|
-
const r =
|
|
29417
|
+
const r = kB("TransactionData", e);
|
|
29422
29418
|
return Uu(r);
|
|
29423
29419
|
}
|
|
29424
29420
|
// @deprecated use gasData instead
|
|
@@ -29577,15 +29573,15 @@ function Pm(t) {
|
|
|
29577
29573
|
var t6 = (t) => {
|
|
29578
29574
|
throw TypeError(t);
|
|
29579
29575
|
}, Ep = (t, e, r) => e.has(t) || t6("Cannot " + r), it = (t, e, r) => (Ep(t, e, "read from private field"), r ? r.call(t) : e.get(t)), wo = (t, e, r) => e.has(t) ? t6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), hc = (t, e, r, n) => (Ep(t, e, "write to private field"), e.set(t, r), r), Lu = (t, e, r) => (Ep(t, e, "access private method"), r), ga, Fn, wa, rs, Qr, Dd, zd, r6, n6, Sp;
|
|
29580
|
-
const
|
|
29576
|
+
const _B = "/", TB = {
|
|
29581
29577
|
"Mvr-Source": `@mysten/sui@${Zw}`
|
|
29582
29578
|
};
|
|
29583
|
-
class
|
|
29579
|
+
class IB {
|
|
29584
29580
|
constructor({ cache: e, url: r, pageSize: n = 50, overrides: s }) {
|
|
29585
29581
|
wo(this, Qr), wo(this, ga), wo(this, Fn), wo(this, wa), wo(this, rs), hc(this, ga, e), hc(this, Fn, r), hc(this, wa, n), hc(this, rs, {
|
|
29586
29582
|
packages: s == null ? void 0 : s.packages,
|
|
29587
29583
|
types: s == null ? void 0 : s.types
|
|
29588
|
-
}),
|
|
29584
|
+
}), PB(it(this, rs));
|
|
29589
29585
|
}
|
|
29590
29586
|
async resolvePackage({
|
|
29591
29587
|
package: e
|
|
@@ -29732,7 +29728,7 @@ Sp = async function(t, e) {
|
|
|
29732
29728
|
method: "POST",
|
|
29733
29729
|
headers: {
|
|
29734
29730
|
"Content-Type": "application/json",
|
|
29735
|
-
...
|
|
29731
|
+
...TB
|
|
29736
29732
|
},
|
|
29737
29733
|
body: JSON.stringify(e)
|
|
29738
29734
|
});
|
|
@@ -29742,7 +29738,7 @@ Sp = async function(t, e) {
|
|
|
29742
29738
|
}
|
|
29743
29739
|
return r.json();
|
|
29744
29740
|
};
|
|
29745
|
-
function
|
|
29741
|
+
function PB(t) {
|
|
29746
29742
|
if (t != null && t.packages)
|
|
29747
29743
|
for (const [e, r] of Object.entries(t.packages)) {
|
|
29748
29744
|
if (!Zt(e))
|
|
@@ -29778,12 +29774,12 @@ function Gd(t, e) {
|
|
|
29778
29774
|
});
|
|
29779
29775
|
}
|
|
29780
29776
|
function Dt(t) {
|
|
29781
|
-
return t.includes(
|
|
29777
|
+
return t.includes(_B) || t.includes("@") || t.includes(".sui");
|
|
29782
29778
|
}
|
|
29783
29779
|
function s6(t) {
|
|
29784
29780
|
return typeof t == "object" && "address" in t && "module" in t && "name" in t && "typeParams" in t;
|
|
29785
29781
|
}
|
|
29786
|
-
function
|
|
29782
|
+
function OB(t) {
|
|
29787
29783
|
const e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
29788
29784
|
for (const n of t.commands)
|
|
29789
29785
|
switch (n.$kind) {
|
|
@@ -29808,7 +29804,7 @@ function CB(t) {
|
|
|
29808
29804
|
types: [...r]
|
|
29809
29805
|
};
|
|
29810
29806
|
}
|
|
29811
|
-
function
|
|
29807
|
+
function BB(t, e) {
|
|
29812
29808
|
var r;
|
|
29813
29809
|
for (const n of t.commands) {
|
|
29814
29810
|
if ((r = n.MakeMoveVec) != null && r.type) {
|
|
@@ -29838,22 +29834,22 @@ function Om(t) {
|
|
|
29838
29834
|
const e = /* @__PURE__ */ new Set();
|
|
29839
29835
|
for (const r of t)
|
|
29840
29836
|
if (Dt(r)) {
|
|
29841
|
-
if (!
|
|
29837
|
+
if (!UO(r)) throw new Error(`Invalid type with names: ${r}`);
|
|
29842
29838
|
e.add(r);
|
|
29843
29839
|
}
|
|
29844
29840
|
return e;
|
|
29845
29841
|
}
|
|
29846
|
-
const
|
|
29847
|
-
const s =
|
|
29842
|
+
const CB = (t) => async (e, r, n) => {
|
|
29843
|
+
const s = OB(e);
|
|
29848
29844
|
if (s.types.length === 0 && s.packages.length === 0)
|
|
29849
29845
|
return n();
|
|
29850
|
-
const i = await
|
|
29846
|
+
const i = await $B(r).core.mvr.resolve({
|
|
29851
29847
|
types: s.types,
|
|
29852
29848
|
packages: s.packages
|
|
29853
29849
|
});
|
|
29854
|
-
|
|
29850
|
+
BB(e, i), await n();
|
|
29855
29851
|
};
|
|
29856
|
-
function
|
|
29852
|
+
function $B(t) {
|
|
29857
29853
|
if (!t.client)
|
|
29858
29854
|
throw new Error(
|
|
29859
29855
|
"No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
|
|
@@ -29918,7 +29914,7 @@ function vo() {
|
|
|
29918
29914
|
}
|
|
29919
29915
|
const l6 = class Wd {
|
|
29920
29916
|
constructor() {
|
|
29921
|
-
Gr(this, Ke), Gr(this, Cs), Gr(this, js), Gr(this, An, /* @__PURE__ */ new Map()), Gr(this, nn, []), Gr(this, dr, []), Gr(this, hr, /* @__PURE__ */ new Set()), Gr(this, Tr, /* @__PURE__ */ new Set()), Gr(this, ns, /* @__PURE__ */ new Map()), Gr(this, ce), this.object =
|
|
29917
|
+
Gr(this, Ke), Gr(this, Cs), Gr(this, js), Gr(this, An, /* @__PURE__ */ new Map()), Gr(this, nn, []), Gr(this, dr, []), Gr(this, hr, /* @__PURE__ */ new Set()), Gr(this, Tr, /* @__PURE__ */ new Set()), Gr(this, ns, /* @__PURE__ */ new Map()), Gr(this, ce), this.object = AB(
|
|
29922
29918
|
(r) => {
|
|
29923
29919
|
var i, o;
|
|
29924
29920
|
if (typeof r == "function")
|
|
@@ -30031,7 +30027,7 @@ const l6 = class Wd {
|
|
|
30031
30027
|
get pure() {
|
|
30032
30028
|
return Object.defineProperty(this, "pure", {
|
|
30033
30029
|
enumerable: !1,
|
|
30034
|
-
value:
|
|
30030
|
+
value: xB((e) => hp(e) ? st(this, Ke, Tc).call(this, "pure", {
|
|
30035
30031
|
$kind: "Pure",
|
|
30036
30032
|
Pure: {
|
|
30037
30033
|
bytes: e.toBase64()
|
|
@@ -30176,7 +30172,7 @@ const l6 = class Wd {
|
|
|
30176
30172
|
const r = this.isFullyResolved();
|
|
30177
30173
|
return JSON.stringify(
|
|
30178
30174
|
Ge(
|
|
30179
|
-
|
|
30175
|
+
D4,
|
|
30180
30176
|
r ? {
|
|
30181
30177
|
...Y(this, ce).snapshot(),
|
|
30182
30178
|
digest: Y(this, ce).getDigest()
|
|
@@ -30228,7 +30224,7 @@ const l6 = class Wd {
|
|
|
30228
30224
|
throw new Error(`Missing intent resolver for ${i}`);
|
|
30229
30225
|
n.push(Y(this, An).get(i));
|
|
30230
30226
|
}
|
|
30231
|
-
n.push(
|
|
30227
|
+
n.push(CB()), await st(this, Ke, xp).call(this, n, e);
|
|
30232
30228
|
}
|
|
30233
30229
|
};
|
|
30234
30230
|
Cs = /* @__PURE__ */ new WeakMap();
|
|
@@ -30279,7 +30275,7 @@ Gc = function(t) {
|
|
|
30279
30275
|
qd = async function(t) {
|
|
30280
30276
|
if (!t.onlyTransactionKind && !Y(this, ce).sender)
|
|
30281
30277
|
throw new Error("Missing transaction sender");
|
|
30282
|
-
await st(this, Ke, xp).call(this, [...Y(this, js),
|
|
30278
|
+
await st(this, Ke, xp).call(this, [...Y(this, js), vB], t);
|
|
30283
30279
|
};
|
|
30284
30280
|
xp = async function(t, e) {
|
|
30285
30281
|
try {
|
|
@@ -30363,16 +30359,16 @@ c6 = function() {
|
|
|
30363
30359
|
}
|
|
30364
30360
|
};
|
|
30365
30361
|
let Kd = l6;
|
|
30366
|
-
const
|
|
30362
|
+
const RB = {
|
|
30367
30363
|
mainnet: "https://mainnet.mvr.mystenlabs.com",
|
|
30368
30364
|
testnet: "https://testnet.mvr.mystenlabs.com"
|
|
30369
30365
|
};
|
|
30370
|
-
class
|
|
30366
|
+
class NB extends w2 {
|
|
30371
30367
|
constructor(e) {
|
|
30372
30368
|
var r, n, s;
|
|
30373
|
-
super(e), this.core = this, this.mvr = new
|
|
30369
|
+
super(e), this.core = this, this.mvr = new IB({
|
|
30374
30370
|
cache: this.cache.scope("core.mvr"),
|
|
30375
|
-
url: ((r = e.mvr) == null ? void 0 : r.url) ??
|
|
30371
|
+
url: ((r = e.mvr) == null ? void 0 : r.url) ?? RB[this.network],
|
|
30376
30372
|
pageSize: (n = e.mvr) == null ? void 0 : n.pageSize,
|
|
30377
30373
|
overrides: (s = e.mvr) == null ? void 0 : s.overrides
|
|
30378
30374
|
});
|
|
@@ -30386,7 +30382,7 @@ class MB extends w2 {
|
|
|
30386
30382
|
return { object: n };
|
|
30387
30383
|
}
|
|
30388
30384
|
async getDynamicField(e) {
|
|
30389
|
-
const r =
|
|
30385
|
+
const r = J4(
|
|
30390
30386
|
e.parentId,
|
|
30391
30387
|
_r.parseFromStr(e.name.type),
|
|
30392
30388
|
e.name.bcs
|
|
@@ -30438,9 +30434,9 @@ class MB extends w2 {
|
|
|
30438
30434
|
}
|
|
30439
30435
|
}
|
|
30440
30436
|
}
|
|
30441
|
-
class
|
|
30437
|
+
class UB extends Error {
|
|
30442
30438
|
}
|
|
30443
|
-
class ss extends
|
|
30439
|
+
class ss extends UB {
|
|
30444
30440
|
constructor(e, r) {
|
|
30445
30441
|
super(r), this.code = e;
|
|
30446
30442
|
}
|
|
@@ -30466,29 +30462,29 @@ class ss extends FB {
|
|
|
30466
30462
|
}
|
|
30467
30463
|
}
|
|
30468
30464
|
}
|
|
30469
|
-
function
|
|
30465
|
+
function MB(t) {
|
|
30470
30466
|
return {
|
|
30471
30467
|
...Ht.fromBytes(t).snapshot(),
|
|
30472
30468
|
bcs: t
|
|
30473
30469
|
};
|
|
30474
30470
|
}
|
|
30475
|
-
function
|
|
30471
|
+
function FB(t) {
|
|
30476
30472
|
const e = he.TransactionEffects.parse(t);
|
|
30477
30473
|
switch (e.$kind) {
|
|
30478
30474
|
case "V1":
|
|
30479
|
-
return
|
|
30475
|
+
return jB({ effects: e.V1 });
|
|
30480
30476
|
case "V2":
|
|
30481
|
-
return
|
|
30477
|
+
return LB({ bytes: t, effects: e.V2 });
|
|
30482
30478
|
default:
|
|
30483
30479
|
throw new Error(
|
|
30484
30480
|
`Unknown transaction effects version: ${e.$kind}`
|
|
30485
30481
|
);
|
|
30486
30482
|
}
|
|
30487
30483
|
}
|
|
30488
|
-
function
|
|
30484
|
+
function jB(t) {
|
|
30489
30485
|
throw new Error("V1 effects are not supported yet");
|
|
30490
30486
|
}
|
|
30491
|
-
function
|
|
30487
|
+
function LB({
|
|
30492
30488
|
bytes: t,
|
|
30493
30489
|
effects: e
|
|
30494
30490
|
}) {
|
|
@@ -30541,13 +30537,13 @@ function DB({
|
|
|
30541
30537
|
}
|
|
30542
30538
|
var d6 = (t) => {
|
|
30543
30539
|
throw TypeError(t);
|
|
30544
|
-
}, h6 = (t, e, r) => e.has(t) || d6("Cannot " + r), Kt = (t, e, r) => (h6(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
30545
|
-
class
|
|
30540
|
+
}, h6 = (t, e, r) => e.has(t) || d6("Cannot " + r), Kt = (t, e, r) => (h6(t, e, "read from private field"), r ? r.call(t) : e.get(t)), HB = (t, e, r) => e.has(t) ? d6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), DB = (t, e, r, n) => (h6(t, e, "write to private field"), e.set(t, r), r), St;
|
|
30541
|
+
class zB extends NB {
|
|
30546
30542
|
constructor({
|
|
30547
30543
|
jsonRpcClient: e,
|
|
30548
30544
|
mvr: r
|
|
30549
30545
|
}) {
|
|
30550
|
-
super({ network: e.network, base: e, mvr: r }),
|
|
30546
|
+
super({ network: e.network, base: e, mvr: r }), HB(this, St), DB(this, St, e);
|
|
30551
30547
|
}
|
|
30552
30548
|
async getObjects(e) {
|
|
30553
30549
|
const r = Mu(e.objectIds, 50), n = [];
|
|
@@ -30607,7 +30603,7 @@ class GB extends MB {
|
|
|
30607
30603
|
balance: n.balance,
|
|
30608
30604
|
type: `0x2::coin::Coin<${n.coinType}>`,
|
|
30609
30605
|
content: Promise.resolve(
|
|
30610
|
-
|
|
30606
|
+
qB.serialize({
|
|
30611
30607
|
id: n.coinObjectId,
|
|
30612
30608
|
balance: {
|
|
30613
30609
|
value: n.balance
|
|
@@ -30686,7 +30682,7 @@ class GB extends MB {
|
|
|
30686
30682
|
const r = Kd.from(e.transaction), n = await Kt(this, St).dryRunTransactionBlock({
|
|
30687
30683
|
transactionBlock: e.transaction,
|
|
30688
30684
|
signal: e.signal
|
|
30689
|
-
}), { effects: s, objectTypes: i } =
|
|
30685
|
+
}), { effects: s, objectTypes: i } = VB({
|
|
30690
30686
|
effects: n.effects,
|
|
30691
30687
|
objectChanges: n.objectChanges
|
|
30692
30688
|
});
|
|
@@ -30697,7 +30693,7 @@ class GB extends MB {
|
|
|
30697
30693
|
effects: s,
|
|
30698
30694
|
objectTypes: Promise.resolve(i),
|
|
30699
30695
|
signatures: [],
|
|
30700
|
-
transaction:
|
|
30696
|
+
transaction: MB(e.transaction)
|
|
30701
30697
|
}
|
|
30702
30698
|
};
|
|
30703
30699
|
}
|
|
@@ -30811,7 +30807,7 @@ function $m(t) {
|
|
|
30811
30807
|
return {
|
|
30812
30808
|
digest: t.digest,
|
|
30813
30809
|
epoch: ((o = t.effects) == null ? void 0 : o.executedEpoch) ?? null,
|
|
30814
|
-
effects:
|
|
30810
|
+
effects: FB(new Uint8Array(t.rawEffects)),
|
|
30815
30811
|
objectTypes: Promise.resolve(r),
|
|
30816
30812
|
transaction: {
|
|
30817
30813
|
...s,
|
|
@@ -30820,7 +30816,7 @@ function $m(t) {
|
|
|
30820
30816
|
signatures: e.txSignatures
|
|
30821
30817
|
};
|
|
30822
30818
|
}
|
|
30823
|
-
function
|
|
30819
|
+
function VB({
|
|
30824
30820
|
bytes: t,
|
|
30825
30821
|
effects: e,
|
|
30826
30822
|
objectChanges: r
|
|
@@ -30954,12 +30950,12 @@ function qB({
|
|
|
30954
30950
|
}
|
|
30955
30951
|
};
|
|
30956
30952
|
}
|
|
30957
|
-
const
|
|
30953
|
+
const GB = he.struct("Balance", {
|
|
30958
30954
|
value: he.u64()
|
|
30959
|
-
}),
|
|
30955
|
+
}), qB = he.struct("Coin", {
|
|
30960
30956
|
id: he.Address,
|
|
30961
|
-
balance:
|
|
30962
|
-
}),
|
|
30957
|
+
balance: GB
|
|
30958
|
+
}), WB = Symbol.for("@mysten/SuiClient");
|
|
30963
30959
|
class Rm extends w2 {
|
|
30964
30960
|
/**
|
|
30965
30961
|
* Establish a connection to a Sui RPC endpoint
|
|
@@ -30967,12 +30963,12 @@ class Rm extends w2 {
|
|
|
30967
30963
|
* @param options configuration options for the API Client
|
|
30968
30964
|
*/
|
|
30969
30965
|
constructor(e) {
|
|
30970
|
-
super({ network: e.network ?? "unknown" }), this.jsonRpc = this, this.transport = e.transport ?? new
|
|
30966
|
+
super({ network: e.network ?? "unknown" }), this.jsonRpc = this, this.transport = e.transport ?? new YP({ url: e.url }), this.core = new zB({
|
|
30971
30967
|
jsonRpcClient: this,
|
|
30972
30968
|
mvr: e.mvr
|
|
30973
30969
|
});
|
|
30974
30970
|
}
|
|
30975
|
-
get [
|
|
30971
|
+
get [WB]() {
|
|
30976
30972
|
return !0;
|
|
30977
30973
|
}
|
|
30978
30974
|
async getRpcApiVersion({ signal: e } = {}) {
|
|
@@ -31628,7 +31624,7 @@ class Rm extends w2 {
|
|
|
31628
31624
|
return {
|
|
31629
31625
|
hasNextPage: s,
|
|
31630
31626
|
nextCursor: n,
|
|
31631
|
-
data: i.map((o) =>
|
|
31627
|
+
data: i.map((o) => CO(o, e))
|
|
31632
31628
|
};
|
|
31633
31629
|
}
|
|
31634
31630
|
async getProtocolConfig(e) {
|
|
@@ -31681,7 +31677,7 @@ class Rm extends w2 {
|
|
|
31681
31677
|
};
|
|
31682
31678
|
}
|
|
31683
31679
|
}
|
|
31684
|
-
class
|
|
31680
|
+
class KB {
|
|
31685
31681
|
constructor(e, r, n, s) {
|
|
31686
31682
|
this.client = new Rm({ url: ym(n) }), this.url = e instanceof Vt ? e : new Vt(e), this.account = r, this.network = n, this.auth = s, this.relayer = new ja(this.auth, this.url);
|
|
31687
31683
|
}
|
|
@@ -31718,7 +31714,7 @@ class YB {
|
|
|
31718
31714
|
p.pure.u256(i.timelock),
|
|
31719
31715
|
p.pure.vector("u8", Buffer.from("")),
|
|
31720
31716
|
d,
|
|
31721
|
-
p.object(
|
|
31717
|
+
p.object(G4)
|
|
31722
31718
|
]
|
|
31723
31719
|
});
|
|
31724
31720
|
const m = await p.build({ client: this.client }), b = await this.client.dryRunTransactionBlock({
|
|
@@ -31790,7 +31786,7 @@ class YB {
|
|
|
31790
31786
|
return B("Refund is taken care of by the relayer");
|
|
31791
31787
|
}
|
|
31792
31788
|
}
|
|
31793
|
-
const
|
|
31789
|
+
const ZB = (t) => {
|
|
31794
31790
|
if (t)
|
|
31795
31791
|
if (typeof t == "string") {
|
|
31796
31792
|
const e = $6.from(t);
|
|
@@ -31799,7 +31795,7 @@ const XB = (t) => {
|
|
|
31799
31795
|
} else
|
|
31800
31796
|
return t;
|
|
31801
31797
|
}, Nm = (t) => typeof t == "string" ? new R6(t) : t;
|
|
31802
|
-
class
|
|
31798
|
+
class YB {
|
|
31803
31799
|
constructor(e = {}) {
|
|
31804
31800
|
const r = {
|
|
31805
31801
|
stdTTL: e.ttl ? e.ttl / 1e3 : 3600,
|
|
@@ -31880,7 +31876,7 @@ class JB {
|
|
|
31880
31876
|
}
|
|
31881
31877
|
}
|
|
31882
31878
|
var va, Ea, Sa, Je, ji, is;
|
|
31883
|
-
class
|
|
31879
|
+
class XB {
|
|
31884
31880
|
constructor(e, r, n, s, i, o) {
|
|
31885
31881
|
vs(this, va);
|
|
31886
31882
|
vs(this, Ea);
|
|
@@ -31888,7 +31884,7 @@ class QB {
|
|
|
31888
31884
|
vs(this, Je);
|
|
31889
31885
|
vs(this, ji);
|
|
31890
31886
|
vs(this, is);
|
|
31891
|
-
this.isBackgroundServiceRunning = !1, this.stopBackgroundExecution = null, this.htlcs = r, this.events = o, Es(this, va, e), Es(this, Ea, n), Es(this, Sa, ha.fromDigestKey(e.digestKey)), Es(this, Je, new
|
|
31887
|
+
this.isBackgroundServiceRunning = !1, this.stopBackgroundExecution = null, this.htlcs = r, this.events = o, Es(this, va, e), Es(this, Ea, n), Es(this, Sa, ha.fromDigestKey(e.digestKey)), Es(this, Je, new YB()), Es(this, ji, s), Es(this, is, i);
|
|
31892
31888
|
}
|
|
31893
31889
|
async getAddressesFromHTLCs() {
|
|
31894
31890
|
var n, s, i, o, a;
|
|
@@ -32329,7 +32325,7 @@ const _s = {
|
|
|
32329
32325
|
INVALID_PUBKEY_OR_SECRET: "invalid public key or secret",
|
|
32330
32326
|
INVALID_PUBKEY: "invalid public key",
|
|
32331
32327
|
ORDER_NOT_EXPIRED: "you cannot refund before your transaction expires"
|
|
32332
|
-
},
|
|
32328
|
+
}, JB = (t, e, r = !1) => {
|
|
32333
32329
|
const n = (o) => {
|
|
32334
32330
|
try {
|
|
32335
32331
|
o = Oo.fromBech32(o).data.toString("hex");
|
|
@@ -32376,7 +32372,7 @@ const _s = {
|
|
|
32376
32372
|
P2TR: "p2tr"
|
|
32377
32373
|
};
|
|
32378
32374
|
var p6 = /* @__PURE__ */ ((t) => (t[t.Bitcoin = 0] = "Bitcoin", t[t.EVM = 1] = "EVM", t))(p6 || {});
|
|
32379
|
-
class
|
|
32375
|
+
class QB {
|
|
32380
32376
|
addSignatureSegwitV0(e = Pc.ALL) {
|
|
32381
32377
|
return new Ls("segwitV0", e);
|
|
32382
32378
|
}
|
|
@@ -32470,11 +32466,11 @@ class t9 {
|
|
|
32470
32466
|
async newSwap(e) {
|
|
32471
32467
|
if (e.secretHash = lt(e.secretHash), e.secretHash.length !== 64)
|
|
32472
32468
|
throw new Error(Io.INVALID_SECRET_HASH);
|
|
32473
|
-
const { script: r, address: n } =
|
|
32469
|
+
const { script: r, address: n } = JB(
|
|
32474
32470
|
e,
|
|
32475
32471
|
await this.getNetwork()
|
|
32476
32472
|
);
|
|
32477
|
-
return new
|
|
32473
|
+
return new e9(this, {
|
|
32478
32474
|
...e,
|
|
32479
32475
|
redeemScript: r,
|
|
32480
32476
|
scriptAddress: n
|
|
@@ -32502,7 +32498,7 @@ class t9 {
|
|
|
32502
32498
|
throw new Error("Unsupported script type");
|
|
32503
32499
|
}
|
|
32504
32500
|
}
|
|
32505
|
-
class
|
|
32501
|
+
class e9 {
|
|
32506
32502
|
/**
|
|
32507
32503
|
* @constructor
|
|
32508
32504
|
* @param {IBitcoinWallet} wallet
|
|
@@ -32617,20 +32613,20 @@ function jl(t) {
|
|
|
32617
32613
|
return Hu.regtest;
|
|
32618
32614
|
throw new Error("Invalid network");
|
|
32619
32615
|
}
|
|
32620
|
-
function
|
|
32616
|
+
function t9(t, e, r) {
|
|
32621
32617
|
if (!z6(t))
|
|
32622
32618
|
throw new Error("Invalid mnemonic");
|
|
32623
32619
|
const n = (r == null ? void 0 : r.path) ?? y6.bip44(e, (r == null ? void 0 : r.index) ?? 0), s = G6(pr).fromSeed(V6(t));
|
|
32624
|
-
return
|
|
32620
|
+
return r9(s, n);
|
|
32625
32621
|
}
|
|
32626
|
-
const
|
|
32622
|
+
const r9 = (t, e) => {
|
|
32627
32623
|
const r = t.derivePath(e).privateKey;
|
|
32628
32624
|
if (!r)
|
|
32629
32625
|
throw new Error("Unable to derive private key from mnemonic");
|
|
32630
32626
|
return r.toString("hex");
|
|
32631
32627
|
};
|
|
32632
32628
|
M6(pr);
|
|
32633
|
-
class Pi extends
|
|
32629
|
+
class Pi extends QB {
|
|
32634
32630
|
/**
|
|
32635
32631
|
* @constructor
|
|
32636
32632
|
* @param {BitcoinWalletOpts} opts
|
|
@@ -32652,7 +32648,7 @@ class Pi extends t9 {
|
|
|
32652
32648
|
* else use multi-key wallet's `fromMnemonic`
|
|
32653
32649
|
*/
|
|
32654
32650
|
static fromMnemonic(e, r, n) {
|
|
32655
|
-
const s = y6.bip84(r.getNetwork(), n == null ? void 0 : n.index), i =
|
|
32651
|
+
const s = y6.bip84(r.getNetwork(), n == null ? void 0 : n.index), i = t9(e, r.getNetwork(), {
|
|
32656
32652
|
path: s
|
|
32657
32653
|
});
|
|
32658
32654
|
return new Pi({
|
|
@@ -32916,19 +32912,19 @@ class Pi extends t9 {
|
|
|
32916
32912
|
return this.signer.signSchnorr(e);
|
|
32917
32913
|
}
|
|
32918
32914
|
}
|
|
32919
|
-
const
|
|
32915
|
+
const n9 = (t) => t.map((e) => e), s9 = (t) => {
|
|
32920
32916
|
if (t === Qe.TESTNET)
|
|
32921
|
-
return
|
|
32917
|
+
return i9;
|
|
32922
32918
|
if (t === Qe.MAINNET)
|
|
32923
|
-
return
|
|
32919
|
+
return o9;
|
|
32924
32920
|
throw new Error("Invalid network");
|
|
32925
|
-
},
|
|
32921
|
+
}, i9 = ["https://mempool.space/testnet4/api"], o9 = [
|
|
32926
32922
|
"https://mempool.space/api",
|
|
32927
32923
|
"https://blockstream.info/api"
|
|
32928
32924
|
], Um = (t) => t.sort((e, r) => e.status.confirmed != r.status.confirmed ? e.status.confirmed ? -1 : 1 : r.value - e.value);
|
|
32929
|
-
class
|
|
32925
|
+
class a9 {
|
|
32930
32926
|
constructor(e, r) {
|
|
32931
|
-
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ?
|
|
32927
|
+
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? n9([r]) : s9(e), this.network = Ik(e);
|
|
32932
32928
|
}
|
|
32933
32929
|
/**
|
|
32934
32930
|
* Gets the output index of the UTXO
|
|
@@ -33136,7 +33132,7 @@ class u9 {
|
|
|
33136
33132
|
*/
|
|
33137
33133
|
async suggestFee(e, r, n) {
|
|
33138
33134
|
const i = (await this.getUTXOs(e, r)).length, o = 2, a = await this.getFeeRates();
|
|
33139
|
-
return Math.floor(a[
|
|
33135
|
+
return Math.floor(a[Sk[n]] * 1.05) * (i * 70 + o * 31 + 10);
|
|
33140
33136
|
}
|
|
33141
33137
|
/**
|
|
33142
33138
|
* Returns the timestamps when a list of unconfirmed transactions was initially observed in the mempool.
|
|
@@ -33169,7 +33165,7 @@ const Mm = (t, e) => {
|
|
|
33169
33165
|
}
|
|
33170
33166
|
return [];
|
|
33171
33167
|
};
|
|
33172
|
-
class
|
|
33168
|
+
class c9 extends Dm {
|
|
33173
33169
|
emit(e, ...r) {
|
|
33174
33170
|
super.emit(e, ...r);
|
|
33175
33171
|
}
|
|
@@ -33178,7 +33174,7 @@ class m6 extends B6 {
|
|
|
33178
33174
|
constructor(e) {
|
|
33179
33175
|
const { api: r, network: n } = N0(e.environment);
|
|
33180
33176
|
if (!r) throw new Error("API Key not found");
|
|
33181
|
-
super(new Vt(r.baseurl)), this._redeemServiceEnabled = !0, this.executeInterval = 5e3, this.network = n, this._api = r, this._digestKey =
|
|
33177
|
+
super(new Vt(r.baseurl)), this._redeemServiceEnabled = !0, this.executeInterval = 5e3, this.network = n, this._api = r, this._digestKey = ZB(e.digestKey), this._auth = Nm(e.apiKey), this._quote = e.quote ?? new LT(this._api.baseurl, this._auth), this._htlcs = e.htlc ?? {}, this._events = new c9(), this._executor = this._digestKey ? new XB(
|
|
33182
33178
|
this._digestKey,
|
|
33183
33179
|
this.htlcs,
|
|
33184
33180
|
this,
|
|
@@ -33205,7 +33201,7 @@ class m6 extends B6 {
|
|
|
33205
33201
|
if (this._secretManager = ha.fromDigestKey(
|
|
33206
33202
|
this._digestKey.digestKey
|
|
33207
33203
|
), !this._htlcs.bitcoin) {
|
|
33208
|
-
const s = new
|
|
33204
|
+
const s = new a9(this.network);
|
|
33209
33205
|
this._htlcs.bitcoin = new fy(
|
|
33210
33206
|
Pi.fromPrivateKey(this._digestKey.digestKey, s),
|
|
33211
33207
|
this.network
|
|
@@ -33222,14 +33218,14 @@ class m6 extends B6 {
|
|
|
33222
33218
|
"API not found, invalid environment " + e.environment
|
|
33223
33219
|
);
|
|
33224
33220
|
const i = e.wallets ? {
|
|
33225
|
-
evm: e.wallets.evm ? new
|
|
33226
|
-
starknet: e.wallets.starknet ? new
|
|
33221
|
+
evm: e.wallets.evm ? new vI(n.baseurl, e.wallets.evm, r) : void 0,
|
|
33222
|
+
starknet: e.wallets.starknet ? new xI(
|
|
33227
33223
|
n.baseurl,
|
|
33228
33224
|
e.wallets.starknet,
|
|
33229
33225
|
s,
|
|
33230
33226
|
r
|
|
33231
33227
|
) : void 0,
|
|
33232
|
-
solana: e.wallets.solana ? new
|
|
33228
|
+
solana: e.wallets.solana ? new LP(
|
|
33233
33229
|
e.wallets.solana,
|
|
33234
33230
|
new Vt(n.baseurl),
|
|
33235
33231
|
s,
|
|
@@ -33238,7 +33234,7 @@ class m6 extends B6 {
|
|
|
33238
33234
|
programAddress: e.solanaProgramAddress
|
|
33239
33235
|
}
|
|
33240
33236
|
) : void 0,
|
|
33241
|
-
sui: e.wallets.sui ? new
|
|
33237
|
+
sui: e.wallets.sui ? new KB(n.baseurl, e.wallets.sui, s, r) : void 0,
|
|
33242
33238
|
bitcoin: e.wallets.bitcoin ? new fy(e.wallets.bitcoin, s) : void 0
|
|
33243
33239
|
} : {};
|
|
33244
33240
|
return new m6({
|
|
@@ -33281,7 +33277,7 @@ class m6 extends B6 {
|
|
|
33281
33277
|
* @returns AsyncResult<Order, string>
|
|
33282
33278
|
*/
|
|
33283
33279
|
async createSwap(e) {
|
|
33284
|
-
const r = Ct.from(e.fromAsset).blockchainType, n = await
|
|
33280
|
+
const r = Ct.from(e.fromAsset).blockchainType, n = await Bk(
|
|
33285
33281
|
r,
|
|
33286
33282
|
this._htlcs
|
|
33287
33283
|
);
|
|
@@ -33376,7 +33372,7 @@ class m6 extends B6 {
|
|
|
33376
33372
|
secret_hash: lt(u)
|
|
33377
33373
|
} : {},
|
|
33378
33374
|
solver_id: r.solverId,
|
|
33379
|
-
affiliate_fees:
|
|
33375
|
+
affiliate_fees: r.affiliateFee,
|
|
33380
33376
|
slippage: 0
|
|
33381
33377
|
}, b = await super.createOrder(m, this._auth);
|
|
33382
33378
|
if (!b.ok) return B(b.error);
|
|
@@ -33429,7 +33425,7 @@ class m6 extends B6 {
|
|
|
33429
33425
|
);
|
|
33430
33426
|
case Ze.bitcoin: {
|
|
33431
33427
|
const s = (n = this._htlcs.bitcoin) == null ? void 0 : n.getPublicKey;
|
|
33432
|
-
return !s || !
|
|
33428
|
+
return !s || !Tk(s) ? B(
|
|
33433
33429
|
"Invalid btc public key or pass Bitcoin address in SwapParams"
|
|
33434
33430
|
) : re(Ve(s));
|
|
33435
33431
|
}
|
|
@@ -33456,7 +33452,7 @@ class m6 extends B6 {
|
|
|
33456
33452
|
return this._events.off(e, r), this;
|
|
33457
33453
|
}
|
|
33458
33454
|
}
|
|
33459
|
-
class
|
|
33455
|
+
class iC {
|
|
33460
33456
|
constructor(e, r, n) {
|
|
33461
33457
|
this.callData = new Bp($w), this.account = e, this.starknetProvider = new zm({
|
|
33462
33458
|
nodeUrl: r || (n ? Uc[n].nodeUrl : Uc.mainnet.nodeUrl)
|
|
@@ -33481,7 +33477,7 @@ class oC {
|
|
|
33481
33477
|
throw new Error("Token address retrieval failed");
|
|
33482
33478
|
const s = Vm.toHex(n), i = Bo.uint256(BigInt(e.source_swap.amount));
|
|
33483
33479
|
try {
|
|
33484
|
-
const c = await
|
|
33480
|
+
const c = await EI(
|
|
33485
33481
|
this.account,
|
|
33486
33482
|
s,
|
|
33487
33483
|
e.source_swap.asset,
|
|
@@ -33556,7 +33552,7 @@ class oC {
|
|
|
33556
33552
|
}
|
|
33557
33553
|
}
|
|
33558
33554
|
}
|
|
33559
|
-
class
|
|
33555
|
+
class oC {
|
|
33560
33556
|
/**
|
|
33561
33557
|
* Creates a new instance of SolanaHTLC.
|
|
33562
33558
|
* @param {AnchorProvider} provider - Solana Provider (abstraction of RPC connection and a Wallet)
|
|
@@ -33672,23 +33668,23 @@ class aC {
|
|
|
33672
33668
|
}
|
|
33673
33669
|
}
|
|
33674
33670
|
export {
|
|
33675
|
-
|
|
33671
|
+
mI as A,
|
|
33676
33672
|
H as B,
|
|
33677
33673
|
ly as C,
|
|
33678
33674
|
rn as D,
|
|
33679
|
-
|
|
33680
|
-
|
|
33675
|
+
vI as E,
|
|
33676
|
+
a9 as F,
|
|
33681
33677
|
m6 as G,
|
|
33682
33678
|
Co as H,
|
|
33683
33679
|
Pi as I,
|
|
33684
|
-
|
|
33680
|
+
eC as J,
|
|
33685
33681
|
hf as K,
|
|
33686
33682
|
Uc as L,
|
|
33687
33683
|
R0 as M,
|
|
33688
33684
|
Ek as N,
|
|
33689
33685
|
$0 as O,
|
|
33690
|
-
|
|
33691
|
-
|
|
33686
|
+
LT as Q,
|
|
33687
|
+
xI as S,
|
|
33692
33688
|
Q8 as a,
|
|
33693
33689
|
br as b,
|
|
33694
33690
|
cu as c,
|
|
@@ -33696,23 +33692,23 @@ export {
|
|
|
33696
33692
|
ri as e,
|
|
33697
33693
|
sn as f,
|
|
33698
33694
|
ih as g,
|
|
33699
|
-
|
|
33695
|
+
iC as h,
|
|
33700
33696
|
Oa as i,
|
|
33701
|
-
|
|
33702
|
-
|
|
33697
|
+
LP as j,
|
|
33698
|
+
oC as k,
|
|
33703
33699
|
du as l,
|
|
33704
33700
|
ha as m,
|
|
33705
|
-
|
|
33706
|
-
|
|
33701
|
+
EI as n,
|
|
33702
|
+
SI as o,
|
|
33707
33703
|
Ac as p,
|
|
33708
|
-
|
|
33704
|
+
tC as q,
|
|
33709
33705
|
N0 as r,
|
|
33710
33706
|
at as s,
|
|
33711
33707
|
Ve as t,
|
|
33712
|
-
|
|
33713
|
-
|
|
33708
|
+
hI as u,
|
|
33709
|
+
rC as v,
|
|
33714
33710
|
op as w,
|
|
33715
|
-
|
|
33716
|
-
|
|
33717
|
-
|
|
33711
|
+
gI as x,
|
|
33712
|
+
yI as y,
|
|
33713
|
+
pI as z
|
|
33718
33714
|
};
|