@gardenfi/core 2.4.5-beta.1 → 2.4.5-beta.2
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-Bk7KRTxY.cjs → ccip-CvSsB-cf.cjs} +1 -1
- package/dist/{ccip-OyIG47X8.js → ccip-DwgNRFry.js} +1 -1
- package/dist/{index-CNKYZEui.cjs → index-CyVu8oHr.cjs} +20 -20
- package/dist/{index-yKalz_cV.js → index-N7ZGxzvN.js} +750 -750
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/src/lib/constants.d.ts +1 -0
- package/package.json +3 -3
|
@@ -5346,7 +5346,7 @@ async function Fc(e, t) {
|
|
|
5346
5346
|
});
|
|
5347
5347
|
return J === "0x" ? { data: void 0 } : { data: J };
|
|
5348
5348
|
} catch (re) {
|
|
5349
|
-
const D = oA(re), { offchainLookup: O, offchainLookupSignature: q } = await import("./ccip-
|
|
5349
|
+
const D = oA(re), { offchainLookup: O, offchainLookupSignature: q } = await import("./ccip-DwgNRFry.js");
|
|
5350
5350
|
if (e.ccipRead !== !1 && (D == null ? void 0 : D.slice(0, 10)) === q && S)
|
|
5351
5351
|
return { data: await O(e, { data: D, to: S }) };
|
|
5352
5352
|
throw C && (D == null ? void 0 : D.slice(0, 10)) === "0x101bb98d" ? new VE({ factory: p }) : Eg(re, {
|
|
@@ -10981,7 +10981,7 @@ const ju = {
|
|
|
10981
10981
|
}
|
|
10982
10982
|
}, Dp = {
|
|
10983
10983
|
[Vt.TESTNET]: {
|
|
10984
|
-
packageId: "
|
|
10984
|
+
packageId: "0x9bc40081ec0a6e04d90b3c4db23b7daf6f5ae75e57d2779e70c210d803a39e6b",
|
|
10985
10985
|
moduleName: "AtomicSwap"
|
|
10986
10986
|
},
|
|
10987
10987
|
[Vt.MAINNET]: {
|
|
@@ -10992,9 +10992,9 @@ const ju = {
|
|
|
10992
10992
|
}, Hp = {
|
|
10993
10993
|
chain: Fh.mainnet.base_cbBTC.chain,
|
|
10994
10994
|
asset: Fh.mainnet.base_cbBTC.atomicSwapAddress
|
|
10995
|
-
};
|
|
10995
|
+
}, k_ = 100000000n;
|
|
10996
10996
|
var gi = /* @__PURE__ */ ((e) => (e.SLOW = "SLOW", e.MEDIUM = "MEDIUM", e.FAST = "FAST", e))(gi || {}), ur = /* @__PURE__ */ ((e) => (e.Mainnet = "Mainnet", e.Testnet = "Testnet", e.Regtest = "Regtest", e))(ur || {}), Ga = /* @__PURE__ */ ((e) => (e.ALL = "ALL", e.IN = "IN", e.OUT = "OUT", e))(Ga || {});
|
|
10997
|
-
const
|
|
10997
|
+
const I_ = {
|
|
10998
10998
|
SLOW: "economyFee",
|
|
10999
10999
|
MEDIUM: "hourFee",
|
|
11000
11000
|
FAST: "fastestFee"
|
|
@@ -11012,24 +11012,24 @@ function Gl(e) {
|
|
|
11012
11012
|
function ri(e, t) {
|
|
11013
11013
|
if (!e) throw new Error(t);
|
|
11014
11014
|
}
|
|
11015
|
-
function
|
|
11015
|
+
function P_(e) {
|
|
11016
11016
|
return Buffer.concat([
|
|
11017
11017
|
Uint8Array.from([192]),
|
|
11018
|
-
|
|
11018
|
+
O_(e)
|
|
11019
11019
|
]);
|
|
11020
11020
|
}
|
|
11021
|
-
function
|
|
11021
|
+
function O_(e) {
|
|
11022
11022
|
const t = Dh.encodingLength(e.length), r = Buffer.allocUnsafe(t);
|
|
11023
11023
|
return Dh.encode(e.length, r), Buffer.concat([r, e]);
|
|
11024
11024
|
}
|
|
11025
|
-
function
|
|
11025
|
+
function B_(e, t) {
|
|
11026
11026
|
if (e.compare(t) > 0) {
|
|
11027
11027
|
const r = e;
|
|
11028
11028
|
e = t, t = r;
|
|
11029
11029
|
}
|
|
11030
11030
|
return [e, t];
|
|
11031
11031
|
}
|
|
11032
|
-
const us = (e) => e.length === 64 ? e : e.slice(2),
|
|
11032
|
+
const us = (e) => e.length === 64 ? e : e.slice(2), C_ = (e) => {
|
|
11033
11033
|
if (!e) return !1;
|
|
11034
11034
|
try {
|
|
11035
11035
|
const t = Buffer.from(e, "hex");
|
|
@@ -11038,7 +11038,7 @@ const us = (e) => e.length === 64 ? e : e.slice(2), B_ = (e) => {
|
|
|
11038
11038
|
return !1;
|
|
11039
11039
|
}
|
|
11040
11040
|
}, Vp = (e, t, r, n) => e + ":" + t.toLowerCase() + "::" + r + ":" + n.toLowerCase();
|
|
11041
|
-
function
|
|
11041
|
+
function $O(e, t) {
|
|
11042
11042
|
if (!e) return !1;
|
|
11043
11043
|
const r = t === Sr.MAINNET ? Se.networks.bitcoin : t === Sr.TESTNET ? Se.networks.testnet : Se.networks.regtest;
|
|
11044
11044
|
if (!r) return !1;
|
|
@@ -11049,7 +11049,7 @@ function RO(e, t) {
|
|
|
11049
11049
|
return !1;
|
|
11050
11050
|
}
|
|
11051
11051
|
}
|
|
11052
|
-
const
|
|
11052
|
+
const R_ = (e) => {
|
|
11053
11053
|
switch (e) {
|
|
11054
11054
|
case Sr.MAINNET:
|
|
11055
11055
|
return ur.Mainnet;
|
|
@@ -11060,14 +11060,14 @@ const C_ = (e) => {
|
|
|
11060
11060
|
default:
|
|
11061
11061
|
throw new Error(`Invalid bitcoin network ${e}`);
|
|
11062
11062
|
}
|
|
11063
|
-
},
|
|
11063
|
+
}, $_ = (e) => {
|
|
11064
11064
|
const t = e.toLowerCase().replace("0x", "");
|
|
11065
11065
|
return /^[0-9a-f]+$/.test(t);
|
|
11066
|
-
},
|
|
11066
|
+
}, N_ = (e) => {
|
|
11067
11067
|
if (typeof e == "object" && "r" in e && "s" in e)
|
|
11068
11068
|
return ue([e.r.toString(), e.s.toString()]);
|
|
11069
11069
|
if (Array.isArray(e)) {
|
|
11070
|
-
const t = e.map((r) => typeof r == "string" && r.startsWith("0x") &&
|
|
11070
|
+
const t = e.map((r) => typeof r == "string" && r.startsWith("0x") && $_(r) ? BigInt(r).toString() : r);
|
|
11071
11071
|
return ue(t);
|
|
11072
11072
|
}
|
|
11073
11073
|
return F("Invalid signature format");
|
|
@@ -11131,7 +11131,7 @@ const Cb = (e, t, r) => {
|
|
|
11131
11131
|
if (t > r) return Fe.Expired;
|
|
11132
11132
|
}
|
|
11133
11133
|
return e.initiate_tx_hash ? Number(e.initiate_block_number) ? Fe.Initiated : Fe.InitiateDetected : Fe.Idle;
|
|
11134
|
-
},
|
|
11134
|
+
}, NO = (e, t, r) => {
|
|
11135
11135
|
const n = Cb(
|
|
11136
11136
|
e,
|
|
11137
11137
|
t,
|
|
@@ -11154,29 +11154,29 @@ const Cb = (e, t, r) => {
|
|
|
11154
11154
|
}, lc = (e, t = 0) => {
|
|
11155
11155
|
const r = Date.now(), n = e * 1e3 + t * 36e5;
|
|
11156
11156
|
return r >= n;
|
|
11157
|
-
},
|
|
11157
|
+
}, MO = (e) => e.filter((t) => !M_(t)), M_ = (e) => {
|
|
11158
11158
|
const { source_swap: t, create_order: r } = e, { initiate_tx_hash: n, initiate_block_number: s } = t, { deadline: i } = r.additional_data;
|
|
11159
11159
|
return n && Number(s) ? !1 : n && !Number(s) ? lc(Number(i), 12) : n ? !1 : lc(Number(i), 1);
|
|
11160
|
-
},
|
|
11160
|
+
}, U_ = Buffer.from(
|
|
11161
11161
|
"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
|
11162
11162
|
"hex"
|
|
11163
|
-
),
|
|
11163
|
+
), F_ = Buffer.from(
|
|
11164
11164
|
"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
|
|
11165
11165
|
"hex"
|
|
11166
|
-
),
|
|
11166
|
+
), j_ = Buffer.concat([U_, F_]), L_ = Buffer.from(
|
|
11167
11167
|
"0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
|
|
11168
11168
|
"hex"
|
|
11169
11169
|
), Gp = {
|
|
11170
11170
|
failedToCreateInternalPubkey: "failed to create internal pubkey"
|
|
11171
11171
|
};
|
|
11172
|
-
function
|
|
11172
|
+
function D_() {
|
|
11173
11173
|
const e = f2.sha256(Buffer.from("GardenHTLC", "utf-8")), t = ar.pointMultiply(
|
|
11174
|
-
Buffer.concat([Buffer.from("04", "hex"),
|
|
11174
|
+
Buffer.concat([Buffer.from("04", "hex"), j_]),
|
|
11175
11175
|
e
|
|
11176
11176
|
);
|
|
11177
11177
|
if (!t)
|
|
11178
11178
|
throw new Error(Gp.failedToCreateInternalPubkey);
|
|
11179
|
-
const r = ar.pointAdd(
|
|
11179
|
+
const r = ar.pointAdd(L_, t);
|
|
11180
11180
|
if (!r) throw new Error(Gp.failedToCreateInternalPubkey);
|
|
11181
11181
|
return Gl(Buffer.from(r));
|
|
11182
11182
|
}
|
|
@@ -11201,11 +11201,11 @@ function $b(e) {
|
|
|
11201
11201
|
}), r;
|
|
11202
11202
|
}
|
|
11203
11203
|
var je = {}, bt = {}, Xs = {}, Kc = {};
|
|
11204
|
-
Kc.byteLength =
|
|
11205
|
-
Kc.toByteArray =
|
|
11206
|
-
Kc.fromByteArray =
|
|
11207
|
-
var Gr = [], tr = [],
|
|
11208
|
-
for (var ni = 0,
|
|
11204
|
+
Kc.byteLength = V_;
|
|
11205
|
+
Kc.toByteArray = G_;
|
|
11206
|
+
Kc.fromByteArray = X_;
|
|
11207
|
+
var Gr = [], tr = [], H_ = typeof Uint8Array < "u" ? Uint8Array : Array, Du = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
11208
|
+
for (var ni = 0, z_ = Du.length; ni < z_; ++ni)
|
|
11209
11209
|
Gr[ni] = Du[ni], tr[Du.charCodeAt(ni)] = ni;
|
|
11210
11210
|
tr[45] = 62;
|
|
11211
11211
|
tr[95] = 63;
|
|
@@ -11218,30 +11218,30 @@ function Nb(e) {
|
|
|
11218
11218
|
var n = r === t ? 0 : 4 - r % 4;
|
|
11219
11219
|
return [r, n];
|
|
11220
11220
|
}
|
|
11221
|
-
function
|
|
11221
|
+
function V_(e) {
|
|
11222
11222
|
var t = Nb(e), r = t[0], n = t[1];
|
|
11223
11223
|
return (r + n) * 3 / 4 - n;
|
|
11224
11224
|
}
|
|
11225
|
-
function
|
|
11225
|
+
function q_(e, t, r) {
|
|
11226
11226
|
return (t + r) * 3 / 4 - r;
|
|
11227
11227
|
}
|
|
11228
|
-
function
|
|
11229
|
-
var t, r = Nb(e), n = r[0], s = r[1], i = new
|
|
11228
|
+
function G_(e) {
|
|
11229
|
+
var t, r = Nb(e), n = r[0], s = r[1], i = new H_(q_(e, n, s)), o = 0, a = s > 0 ? n - 4 : n, c;
|
|
11230
11230
|
for (c = 0; c < a; c += 4)
|
|
11231
11231
|
t = tr[e.charCodeAt(c)] << 18 | tr[e.charCodeAt(c + 1)] << 12 | tr[e.charCodeAt(c + 2)] << 6 | tr[e.charCodeAt(c + 3)], i[o++] = t >> 16 & 255, i[o++] = t >> 8 & 255, i[o++] = t & 255;
|
|
11232
11232
|
return s === 2 && (t = tr[e.charCodeAt(c)] << 2 | tr[e.charCodeAt(c + 1)] >> 4, i[o++] = t & 255), s === 1 && (t = tr[e.charCodeAt(c)] << 10 | tr[e.charCodeAt(c + 1)] << 4 | tr[e.charCodeAt(c + 2)] >> 2, i[o++] = t >> 8 & 255, i[o++] = t & 255), i;
|
|
11233
11233
|
}
|
|
11234
|
-
function
|
|
11234
|
+
function W_(e) {
|
|
11235
11235
|
return Gr[e >> 18 & 63] + Gr[e >> 12 & 63] + Gr[e >> 6 & 63] + Gr[e & 63];
|
|
11236
11236
|
}
|
|
11237
|
-
function
|
|
11237
|
+
function K_(e, t, r) {
|
|
11238
11238
|
for (var n, s = [], i = t; i < r; i += 3)
|
|
11239
|
-
n = (e[i] << 16 & 16711680) + (e[i + 1] << 8 & 65280) + (e[i + 2] & 255), s.push(
|
|
11239
|
+
n = (e[i] << 16 & 16711680) + (e[i + 1] << 8 & 65280) + (e[i + 2] & 255), s.push(W_(n));
|
|
11240
11240
|
return s.join("");
|
|
11241
11241
|
}
|
|
11242
|
-
function
|
|
11242
|
+
function X_(e) {
|
|
11243
11243
|
for (var t, r = e.length, n = r % 3, s = [], i = 16383, o = 0, a = r - n; o < a; o += i)
|
|
11244
|
-
s.push(
|
|
11244
|
+
s.push(K_(e, o, o + i > a ? a : o + i));
|
|
11245
11245
|
return n === 1 ? (t = e[r - 1], s.push(
|
|
11246
11246
|
Gr[t >> 2] + Gr[t << 4 & 63] + "=="
|
|
11247
11247
|
)) : n === 2 && (t = (e[r - 2] << 8) + e[r - 1], s.push(
|
|
@@ -12255,7 +12255,7 @@ function Mb(e) {
|
|
|
12255
12255
|
function uh(e) {
|
|
12256
12256
|
return Ts.Nil(e) ? "" : Mb(e.constructor);
|
|
12257
12257
|
}
|
|
12258
|
-
function
|
|
12258
|
+
function Y_(e) {
|
|
12259
12259
|
return Ts.Function(e) ? "" : Ts.String(e) ? JSON.stringify(e) : e && Ts.Object(e) ? "" : e;
|
|
12260
12260
|
}
|
|
12261
12261
|
function fh(e, t) {
|
|
@@ -12265,7 +12265,7 @@ function dc(e) {
|
|
|
12265
12265
|
return Ts.Function(e) ? e.toJSON ? e.toJSON() : Mb(e) : Ts.Array(e) ? "Array" : e && Ts.Object(e) ? "Object" : e !== void 0 ? e : "";
|
|
12266
12266
|
}
|
|
12267
12267
|
function Ub(e, t, r) {
|
|
12268
|
-
var n =
|
|
12268
|
+
var n = Y_(t);
|
|
12269
12269
|
return "Expected " + dc(e) + ", got" + (r !== "" ? " " + r : "") + (n !== "" ? " " + n : "");
|
|
12270
12270
|
}
|
|
12271
12271
|
function kn(e, t, r) {
|
|
@@ -12273,19 +12273,19 @@ function kn(e, t, r) {
|
|
|
12273
12273
|
}
|
|
12274
12274
|
kn.prototype = Object.create(Error.prototype);
|
|
12275
12275
|
kn.prototype.constructor = kn;
|
|
12276
|
-
function
|
|
12276
|
+
function Z_(e, t, r, n, s) {
|
|
12277
12277
|
var i = '" of type ';
|
|
12278
12278
|
return t === "key" && (i = '" with key type '), Ub('property "' + dc(r) + i + dc(e), n, s);
|
|
12279
12279
|
}
|
|
12280
12280
|
function bi(e, t, r, n, s) {
|
|
12281
|
-
e ? (s = s || uh(n), this.message =
|
|
12281
|
+
e ? (s = s || uh(n), this.message = Z_(e, r, t, n, s)) : this.message = 'Unexpected property "' + t + '"', fh(this, kn), this.__label = r, this.__property = t, this.__type = e, this.__value = n, this.__valueTypeName = s;
|
|
12282
12282
|
}
|
|
12283
12283
|
bi.prototype = Object.create(Error.prototype);
|
|
12284
12284
|
bi.prototype.constructor = kn;
|
|
12285
|
-
function
|
|
12285
|
+
function J_(e, t) {
|
|
12286
12286
|
return new kn(e, {}, t);
|
|
12287
12287
|
}
|
|
12288
|
-
function
|
|
12288
|
+
function Q_(e, t, r) {
|
|
12289
12289
|
return e instanceof bi ? (t = t + "." + e.__property, e = new bi(
|
|
12290
12290
|
e.__type,
|
|
12291
12291
|
t,
|
|
@@ -12303,12 +12303,12 @@ function J_(e, t, r) {
|
|
|
12303
12303
|
var Fb = {
|
|
12304
12304
|
TfTypeError: kn,
|
|
12305
12305
|
TfPropertyTypeError: bi,
|
|
12306
|
-
tfCustomError:
|
|
12307
|
-
tfSubError:
|
|
12306
|
+
tfCustomError: J_,
|
|
12307
|
+
tfSubError: Q_,
|
|
12308
12308
|
tfJSON: dc,
|
|
12309
12309
|
getValueTypeName: uh
|
|
12310
12310
|
}, Hu, Kp;
|
|
12311
|
-
function
|
|
12311
|
+
function eT() {
|
|
12312
12312
|
if (Kp) return Hu;
|
|
12313
12313
|
Kp = 1;
|
|
12314
12314
|
var e = ch, t = Fb;
|
|
@@ -12391,7 +12391,7 @@ function Q_() {
|
|
|
12391
12391
|
}).bind(null, k);
|
|
12392
12392
|
return Hu = S, Hu;
|
|
12393
12393
|
}
|
|
12394
|
-
var fa = Fb, ot = ch, on = fa.tfJSON, jb = fa.TfTypeError, Lb = fa.TfPropertyTypeError, Wi = fa.tfSubError,
|
|
12394
|
+
var fa = Fb, ot = ch, on = fa.tfJSON, jb = fa.TfTypeError, Lb = fa.TfPropertyTypeError, Wi = fa.tfSubError, tT = fa.getValueTypeName, bn = {
|
|
12395
12395
|
arrayOf: function(t, r) {
|
|
12396
12396
|
t = zr(t), r = r || {};
|
|
12397
12397
|
function n(s, i) {
|
|
@@ -12500,7 +12500,7 @@ var fa = Fb, ot = ch, on = fa.tfJSON, jb = fa.TfTypeError, Lb = fa.TfPropertyTyp
|
|
|
12500
12500
|
},
|
|
12501
12501
|
quacksLike: function(t) {
|
|
12502
12502
|
function r(n) {
|
|
12503
|
-
return t ===
|
|
12503
|
+
return t === tT(n);
|
|
12504
12504
|
}
|
|
12505
12505
|
return r.toJSON = function() {
|
|
12506
12506
|
return t;
|
|
@@ -12555,17 +12555,17 @@ for (var Qn in ot)
|
|
|
12555
12555
|
Tt[Qn] = ot[Qn];
|
|
12556
12556
|
for (Qn in bn)
|
|
12557
12557
|
Tt[Qn] = bn[Qn];
|
|
12558
|
-
var Xp =
|
|
12558
|
+
var Xp = eT();
|
|
12559
12559
|
for (Qn in Xp)
|
|
12560
12560
|
Tt[Qn] = Xp[Qn];
|
|
12561
12561
|
Tt.compile = zr;
|
|
12562
12562
|
Tt.TfTypeError = jb;
|
|
12563
12563
|
Tt.TfPropertyTypeError = Lb;
|
|
12564
|
-
var
|
|
12564
|
+
var rT = Tt;
|
|
12565
12565
|
(function(e) {
|
|
12566
12566
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.oneOf = e.Null = e.BufferN = e.Function = e.UInt32 = e.UInt8 = e.tuple = e.maybe = e.Hex = e.Buffer = e.String = e.Boolean = e.Array = e.Number = e.Hash256bit = e.Hash160bit = e.Buffer256bit = e.isTaptree = e.isTapleaf = e.TAPLEAF_VERSION_MASK = e.Satoshi = e.isPoint = e.stacksEqual = e.typeforce = void 0;
|
|
12567
12567
|
const t = Xs;
|
|
12568
|
-
e.typeforce =
|
|
12568
|
+
e.typeforce = rT;
|
|
12569
12569
|
const r = t.Buffer.alloc(32, 0), n = t.Buffer.from(
|
|
12570
12570
|
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
|
12571
12571
|
"hex"
|
|
@@ -12622,19 +12622,19 @@ function Vb(e, t, r) {
|
|
|
12622
12622
|
return Hb(t, 9007199254740991), e.writeInt32LE(t & -1, r), e.writeUInt32LE(Math.floor(t / 4294967296), r + 4), r + 8;
|
|
12623
12623
|
}
|
|
12624
12624
|
at.writeUInt64LE = Vb;
|
|
12625
|
-
function
|
|
12625
|
+
function nT(e) {
|
|
12626
12626
|
if (e.length < 1) return e;
|
|
12627
12627
|
let t = e.length - 1, r = 0;
|
|
12628
12628
|
for (let n = 0; n < e.length / 2; n++)
|
|
12629
12629
|
r = e[n], e[n] = e[t], e[t] = r, t--;
|
|
12630
12630
|
return e;
|
|
12631
12631
|
}
|
|
12632
|
-
at.reverseBuffer =
|
|
12633
|
-
function
|
|
12632
|
+
at.reverseBuffer = nT;
|
|
12633
|
+
function sT(e) {
|
|
12634
12634
|
const t = Buffer.allocUnsafe(e.length);
|
|
12635
12635
|
return e.copy(t), t;
|
|
12636
12636
|
}
|
|
12637
|
-
at.cloneBuffer =
|
|
12637
|
+
at.cloneBuffer = sT;
|
|
12638
12638
|
class lh {
|
|
12639
12639
|
static withCapacity(t) {
|
|
12640
12640
|
return new lh(Buffer.alloc(t));
|
|
@@ -12675,7 +12675,7 @@ class lh {
|
|
|
12675
12675
|
}
|
|
12676
12676
|
}
|
|
12677
12677
|
at.BufferWriter = lh;
|
|
12678
|
-
class
|
|
12678
|
+
class iT {
|
|
12679
12679
|
constructor(t, r = 0) {
|
|
12680
12680
|
this.buffer = t, this.offset = r, Db(ks.tuple(ks.Buffer, ks.UInt32), [t, r]);
|
|
12681
12681
|
}
|
|
@@ -12714,9 +12714,9 @@ class sT {
|
|
|
12714
12714
|
return r;
|
|
12715
12715
|
}
|
|
12716
12716
|
}
|
|
12717
|
-
at.BufferReader =
|
|
12717
|
+
at.BufferReader = iT;
|
|
12718
12718
|
var as = {};
|
|
12719
|
-
const
|
|
12719
|
+
const oT = /* @__PURE__ */ $b(BS);
|
|
12720
12720
|
var Ii = {}, Rt = {}, It = {}, dh = {}, Xc = {};
|
|
12721
12721
|
Object.defineProperty(Xc, "__esModule", { value: !0 });
|
|
12722
12722
|
Xc.crypto = void 0;
|
|
@@ -12892,8 +12892,8 @@ Xc.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
|
|
|
12892
12892
|
Object.defineProperty(It, "__esModule", { value: !0 });
|
|
12893
12893
|
It.SHA512_IV = It.SHA384_IV = It.SHA224_IV = It.SHA256_IV = It.HashMD = void 0;
|
|
12894
12894
|
It.setBigUint64 = qb;
|
|
12895
|
-
It.Chi =
|
|
12896
|
-
It.Maj =
|
|
12895
|
+
It.Chi = aT;
|
|
12896
|
+
It.Maj = cT;
|
|
12897
12897
|
const Nr = dh;
|
|
12898
12898
|
function qb(e, t, r, n) {
|
|
12899
12899
|
if (typeof e.setBigUint64 == "function")
|
|
@@ -12901,13 +12901,13 @@ function qb(e, t, r, n) {
|
|
|
12901
12901
|
const s = BigInt(32), i = BigInt(4294967295), o = Number(r >> s & i), a = Number(r & i), c = n ? 4 : 0, f = n ? 0 : 4;
|
|
12902
12902
|
e.setUint32(t + c, o, n), e.setUint32(t + f, a, n);
|
|
12903
12903
|
}
|
|
12904
|
-
function
|
|
12904
|
+
function aT(e, t, r) {
|
|
12905
12905
|
return e & t ^ ~e & r;
|
|
12906
12906
|
}
|
|
12907
|
-
function
|
|
12907
|
+
function cT(e, t, r) {
|
|
12908
12908
|
return e & t ^ e & r ^ t & r;
|
|
12909
12909
|
}
|
|
12910
|
-
class
|
|
12910
|
+
class uT extends Nr.Hash {
|
|
12911
12911
|
constructor(t, r, n, s) {
|
|
12912
12912
|
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = s, this.buffer = new Uint8Array(t), this.view = (0, Nr.createView)(this.buffer);
|
|
12913
12913
|
}
|
|
@@ -12958,7 +12958,7 @@ class cT extends Nr.Hash {
|
|
|
12958
12958
|
return this._cloneInto();
|
|
12959
12959
|
}
|
|
12960
12960
|
}
|
|
12961
|
-
It.HashMD =
|
|
12961
|
+
It.HashMD = uT;
|
|
12962
12962
|
It.SHA256_IV = Uint32Array.from([
|
|
12963
12963
|
1779033703,
|
|
12964
12964
|
3144134277,
|
|
@@ -13058,7 +13058,7 @@ class Gb extends Is.HashMD {
|
|
|
13058
13058
|
}
|
|
13059
13059
|
Rt.SHA1 = Gb;
|
|
13060
13060
|
Rt.sha1 = (0, ct.createHasher)(() => new Gb());
|
|
13061
|
-
const
|
|
13061
|
+
const fT = /* @__PURE__ */ Math.pow(2, 32), lT = /* @__PURE__ */ Array.from({ length: 64 }, (e, t) => Math.floor(fT * Math.abs(Math.sin(t + 1)))), Ia = /* @__PURE__ */ ii.slice(0, 4), zu = /* @__PURE__ */ new Uint32Array(16);
|
|
13062
13062
|
class Wb extends Is.HashMD {
|
|
13063
13063
|
constructor() {
|
|
13064
13064
|
super(64, 16, 8, !0), this.A = Ia[0] | 0, this.B = Ia[1] | 0, this.C = Ia[2] | 0, this.D = Ia[3] | 0;
|
|
@@ -13076,7 +13076,7 @@ class Wb extends Is.HashMD {
|
|
|
13076
13076
|
let { A: n, B: s, C: i, D: o } = this;
|
|
13077
13077
|
for (let a = 0; a < 64; a++) {
|
|
13078
13078
|
let c, f, u;
|
|
13079
|
-
a < 16 ? (c = (0, Is.Chi)(s, i, o), f = a, u = [7, 12, 17, 22]) : a < 32 ? (c = (0, Is.Chi)(o, s, i), f = (5 * a + 1) % 16, u = [5, 9, 14, 20]) : a < 48 ? (c = s ^ i ^ o, f = (3 * a + 5) % 16, u = [4, 11, 16, 23]) : (c = i ^ (s | ~o), f = 7 * a % 16, u = [6, 10, 15, 21]), c = c + n +
|
|
13079
|
+
a < 16 ? (c = (0, Is.Chi)(s, i, o), f = a, u = [7, 12, 17, 22]) : a < 32 ? (c = (0, Is.Chi)(o, s, i), f = (5 * a + 1) % 16, u = [5, 9, 14, 20]) : a < 48 ? (c = s ^ i ^ o, f = (3 * a + 5) % 16, u = [4, 11, 16, 23]) : (c = i ^ (s | ~o), f = 7 * a % 16, u = [6, 10, 15, 21]), c = c + n + lT[a] + zu[f], n = o, o = i, i = s, s = s + (0, ct.rotl)(c, u[a % 4]);
|
|
13080
13080
|
}
|
|
13081
13081
|
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);
|
|
13082
13082
|
}
|
|
@@ -13089,7 +13089,7 @@ class Wb extends Is.HashMD {
|
|
|
13089
13089
|
}
|
|
13090
13090
|
Rt.MD5 = Wb;
|
|
13091
13091
|
Rt.md5 = (0, ct.createHasher)(() => new Wb());
|
|
13092
|
-
const
|
|
13092
|
+
const dT = /* @__PURE__ */ Uint8Array.from([
|
|
13093
13093
|
7,
|
|
13094
13094
|
4,
|
|
13095
13095
|
13,
|
|
@@ -13106,11 +13106,11 @@ const lT = /* @__PURE__ */ Uint8Array.from([
|
|
|
13106
13106
|
14,
|
|
13107
13107
|
11,
|
|
13108
13108
|
8
|
|
13109
|
-
]), Kb = Uint8Array.from(new Array(16).fill(0).map((e, t) => t)),
|
|
13110
|
-
const r = [[Kb], [
|
|
13109
|
+
]), Kb = Uint8Array.from(new Array(16).fill(0).map((e, t) => t)), hT = Kb.map((e) => (9 * e + 5) % 16), Xb = /* @__PURE__ */ (() => {
|
|
13110
|
+
const r = [[Kb], [hT]];
|
|
13111
13111
|
for (let n = 0; n < 4; n++)
|
|
13112
13112
|
for (let s of r)
|
|
13113
|
-
s.push(s[n].map((i) =>
|
|
13113
|
+
s.push(s[n].map((i) => dT[i]));
|
|
13114
13114
|
return r;
|
|
13115
13115
|
})(), Yb = Xb[0], Zb = Xb[1], Jb = /* @__PURE__ */ [
|
|
13116
13116
|
[11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
|
|
@@ -13118,13 +13118,13 @@ const lT = /* @__PURE__ */ Uint8Array.from([
|
|
|
13118
13118
|
[13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
|
|
13119
13119
|
[14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
|
|
13120
13120
|
[15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
|
|
13121
|
-
].map((e) => Uint8Array.from(e)),
|
|
13121
|
+
].map((e) => Uint8Array.from(e)), pT = /* @__PURE__ */ Yb.map((e, t) => e.map((r) => Jb[t][r])), yT = /* @__PURE__ */ Zb.map((e, t) => e.map((r) => Jb[t][r])), mT = /* @__PURE__ */ Uint32Array.from([
|
|
13122
13122
|
0,
|
|
13123
13123
|
1518500249,
|
|
13124
13124
|
1859775393,
|
|
13125
13125
|
2400959708,
|
|
13126
13126
|
2840853838
|
|
13127
|
-
]),
|
|
13127
|
+
]), gT = /* @__PURE__ */ Uint32Array.from([
|
|
13128
13128
|
1352829926,
|
|
13129
13129
|
1548603684,
|
|
13130
13130
|
1836072691,
|
|
@@ -13151,7 +13151,7 @@ class Qb extends Is.HashMD {
|
|
|
13151
13151
|
Pa[d] = t.getUint32(r, !0);
|
|
13152
13152
|
let n = this.h0 | 0, s = n, i = this.h1 | 0, o = i, a = this.h2 | 0, c = a, f = this.h3 | 0, u = f, l = this.h4 | 0, p = l;
|
|
13153
13153
|
for (let d = 0; d < 5; d++) {
|
|
13154
|
-
const m = 4 - d, g =
|
|
13154
|
+
const m = 4 - d, g = mT[d], w = gT[d], E = Yb[d], T = Zb[d], v = pT[d], S = yT[d];
|
|
13155
13155
|
for (let k = 0; k < 16; k++) {
|
|
13156
13156
|
const I = (0, ct.rotl)(n + Yp(d, i, a, f) + Pa[E[k]] + g, v[k]) + l | 0;
|
|
13157
13157
|
n = l, l = f, f = (0, ct.rotl)(a, 10) | 0, a = i, i = I;
|
|
@@ -13180,7 +13180,7 @@ Ii.sha1 = ew.sha1;
|
|
|
13180
13180
|
const tw = /* @__PURE__ */ $b(w6);
|
|
13181
13181
|
(function(e) {
|
|
13182
13182
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.taggedHash = e.TAGGED_HASH_PREFIXES = e.TAGS = e.hash256 = e.hash160 = e.sha256 = e.sha1 = e.ripemd160 = void 0;
|
|
13183
|
-
const t =
|
|
13183
|
+
const t = oT, r = Ii, n = tw;
|
|
13184
13184
|
function s(u) {
|
|
13185
13185
|
return Buffer.from((0, t.ripemd160)(Uint8Array.from(u)));
|
|
13186
13186
|
}
|
|
@@ -13818,15 +13818,15 @@ const tw = /* @__PURE__ */ $b(w6);
|
|
|
13818
13818
|
var Vu = {}, xn = {};
|
|
13819
13819
|
Object.defineProperty(xn, "__esModule", { value: !0 });
|
|
13820
13820
|
xn.encode = xn.decode = xn.check = void 0;
|
|
13821
|
-
function
|
|
13821
|
+
function bT(e) {
|
|
13822
13822
|
if (e.length < 8 || e.length > 72 || e[0] !== 48 || e[1] !== e.length - 2 || e[2] !== 2) return !1;
|
|
13823
13823
|
const t = e[3];
|
|
13824
13824
|
if (t === 0 || 5 + t >= e.length || e[4 + t] !== 2) return !1;
|
|
13825
13825
|
const r = e[5 + t];
|
|
13826
13826
|
return !(r === 0 || 6 + t + r !== e.length || e[4] & 128 || t > 1 && e[4] === 0 && !(e[5] & 128) || e[t + 6] & 128 || r > 1 && e[t + 6] === 0 && !(e[t + 7] & 128));
|
|
13827
13827
|
}
|
|
13828
|
-
xn.check =
|
|
13829
|
-
function
|
|
13828
|
+
xn.check = bT;
|
|
13829
|
+
function wT(e) {
|
|
13830
13830
|
if (e.length < 8) throw new Error("DER sequence length is too short");
|
|
13831
13831
|
if (e.length > 72) throw new Error("DER sequence length is too long");
|
|
13832
13832
|
if (e[0] !== 48) throw new Error("Expected DER sequence");
|
|
@@ -13851,8 +13851,8 @@ function bT(e) {
|
|
|
13851
13851
|
s: e.slice(6 + t)
|
|
13852
13852
|
};
|
|
13853
13853
|
}
|
|
13854
|
-
xn.decode =
|
|
13855
|
-
function
|
|
13854
|
+
xn.decode = wT;
|
|
13855
|
+
function vT(e, t) {
|
|
13856
13856
|
const r = e.length, n = t.length;
|
|
13857
13857
|
if (r === 0) throw new Error("R length is zero");
|
|
13858
13858
|
if (n === 0) throw new Error("S length is zero");
|
|
@@ -13867,7 +13867,7 @@ function wT(e, t) {
|
|
|
13867
13867
|
const s = Buffer.allocUnsafe(6 + r + n);
|
|
13868
13868
|
return s[0] = 48, s[1] = s.length - 2, s[2] = 2, s[3] = e.length, e.copy(s, 4), s[4 + r] = 2, s[5 + r] = t.length, t.copy(s, 6 + r), s;
|
|
13869
13869
|
}
|
|
13870
|
-
xn.encode =
|
|
13870
|
+
xn.encode = vT;
|
|
13871
13871
|
var js = {};
|
|
13872
13872
|
Object.defineProperty(js, "__esModule", { value: !0 });
|
|
13873
13873
|
js.REVERSE_OPS = js.OPS = void 0;
|
|
@@ -14007,12 +14007,12 @@ function nw(e) {
|
|
|
14007
14007
|
return e < Yn.OPS.OP_PUSHDATA1 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5;
|
|
14008
14008
|
}
|
|
14009
14009
|
es.encodingLength = nw;
|
|
14010
|
-
function
|
|
14010
|
+
function ET(e, t, r) {
|
|
14011
14011
|
const n = nw(t);
|
|
14012
14012
|
return n === 1 ? e.writeUInt8(t, r) : n === 2 ? (e.writeUInt8(Yn.OPS.OP_PUSHDATA1, r), e.writeUInt8(t, r + 1)) : n === 3 ? (e.writeUInt8(Yn.OPS.OP_PUSHDATA2, r), e.writeUInt16LE(t, r + 1)) : (e.writeUInt8(Yn.OPS.OP_PUSHDATA4, r), e.writeUInt32LE(t, r + 1)), n;
|
|
14013
14013
|
}
|
|
14014
|
-
es.encode =
|
|
14015
|
-
function
|
|
14014
|
+
es.encode = ET;
|
|
14015
|
+
function AT(e, t) {
|
|
14016
14016
|
const r = e.readUInt8(t);
|
|
14017
14017
|
let n, s;
|
|
14018
14018
|
if (r < Yn.OPS.OP_PUSHDATA1)
|
|
@@ -14034,11 +14034,11 @@ function ET(e, t) {
|
|
|
14034
14034
|
size: s
|
|
14035
14035
|
};
|
|
14036
14036
|
}
|
|
14037
|
-
es.decode =
|
|
14037
|
+
es.decode = AT;
|
|
14038
14038
|
var Pi = {};
|
|
14039
14039
|
Object.defineProperty(Pi, "__esModule", { value: !0 });
|
|
14040
14040
|
Pi.encode = Pi.decode = void 0;
|
|
14041
|
-
function
|
|
14041
|
+
function ST(e, t, r) {
|
|
14042
14042
|
t = t || 4, r = r === void 0 ? !0 : r;
|
|
14043
14043
|
const n = e.length;
|
|
14044
14044
|
if (n === 0) return 0;
|
|
@@ -14054,20 +14054,20 @@ function AT(e, t, r) {
|
|
|
14054
14054
|
s |= e[i] << 8 * i;
|
|
14055
14055
|
return e[n - 1] & 128 ? -(s & ~(128 << 8 * (n - 1))) : s;
|
|
14056
14056
|
}
|
|
14057
|
-
Pi.decode =
|
|
14058
|
-
function
|
|
14057
|
+
Pi.decode = ST;
|
|
14058
|
+
function xT(e) {
|
|
14059
14059
|
return e > 2147483647 ? 5 : e > 8388607 ? 4 : e > 32767 ? 3 : e > 127 ? 2 : e > 0 ? 1 : 0;
|
|
14060
14060
|
}
|
|
14061
|
-
function
|
|
14061
|
+
function _T(e) {
|
|
14062
14062
|
let t = Math.abs(e);
|
|
14063
|
-
const r =
|
|
14063
|
+
const r = xT(t), n = Buffer.allocUnsafe(r), s = e < 0;
|
|
14064
14064
|
for (let i = 0; i < r; ++i)
|
|
14065
14065
|
n.writeUInt8(t & 255, i), t >>= 8;
|
|
14066
14066
|
return n[r - 1] & 128 ? n.writeUInt8(s ? 128 : 0, r - 1) : s && (n[r - 1] |= 128), n;
|
|
14067
14067
|
}
|
|
14068
|
-
Pi.encode =
|
|
14068
|
+
Pi.encode = _T;
|
|
14069
14069
|
var fs = {}, Zp;
|
|
14070
|
-
function
|
|
14070
|
+
function TT() {
|
|
14071
14071
|
if (Zp) return fs;
|
|
14072
14072
|
Zp = 1, Object.defineProperty(fs, "__esModule", { value: !0 }), fs.encode = fs.decode = void 0;
|
|
14073
14073
|
const e = xn, t = Zt(), r = bt, { typeforce: n } = r, s = Buffer.alloc(1, 0);
|
|
@@ -14116,7 +14116,7 @@ function Zt() {
|
|
|
14116
14116
|
return r.OPS;
|
|
14117
14117
|
}
|
|
14118
14118
|
});
|
|
14119
|
-
const n = es, s = Pi, i =
|
|
14119
|
+
const n = es, s = Pi, i = TT(), o = bt, { typeforce: a } = o, c = r.OPS.OP_RESERVED;
|
|
14120
14120
|
function f(_) {
|
|
14121
14121
|
return o.Number(_) && (_ === r.OPS.OP_0 || _ >= r.OPS.OP_1 && _ <= r.OPS.OP_16 || _ === r.OPS.OP_1NEGATE);
|
|
14122
14122
|
}
|
|
@@ -14226,12 +14226,12 @@ function Zt() {
|
|
|
14226
14226
|
}
|
|
14227
14227
|
Object.defineProperty(la, "__esModule", { value: !0 });
|
|
14228
14228
|
la.Transaction = void 0;
|
|
14229
|
-
const Ye = at, Et = as, Qp = Zt(),
|
|
14229
|
+
const Ye = at, Et = as, Qp = Zt(), kT = Zt(), be = bt, { typeforce: Mr } = be;
|
|
14230
14230
|
function Dr(e) {
|
|
14231
14231
|
const t = e.length;
|
|
14232
14232
|
return Ye.varuint.encodingLength(t) + t;
|
|
14233
14233
|
}
|
|
14234
|
-
function
|
|
14234
|
+
function IT(e) {
|
|
14235
14235
|
const t = e.length;
|
|
14236
14236
|
return Ye.varuint.encodingLength(t) + e.reduce((r, n) => r + Dr(n), 0);
|
|
14237
14237
|
}
|
|
@@ -14241,11 +14241,11 @@ const zn = Buffer.allocUnsafe(0), qu = [], Gu = Buffer.from(
|
|
|
14241
14241
|
), ey = Buffer.from(
|
|
14242
14242
|
"0000000000000000000000000000000000000000000000000000000000000001",
|
|
14243
14243
|
"hex"
|
|
14244
|
-
),
|
|
14244
|
+
), PT = Buffer.from("ffffffffffffffff", "hex"), OT = {
|
|
14245
14245
|
script: zn,
|
|
14246
|
-
valueBuffer:
|
|
14246
|
+
valueBuffer: PT
|
|
14247
14247
|
};
|
|
14248
|
-
function
|
|
14248
|
+
function BT(e) {
|
|
14249
14249
|
return e.value !== void 0;
|
|
14250
14250
|
}
|
|
14251
14251
|
let Or = class Te {
|
|
@@ -14336,7 +14336,7 @@ let Or = class Te {
|
|
|
14336
14336
|
}
|
|
14337
14337
|
byteLength(t = !0) {
|
|
14338
14338
|
const r = t && this.hasWitnesses();
|
|
14339
|
-
return (r ? 10 : 8) + Ye.varuint.encodingLength(this.ins.length) + Ye.varuint.encodingLength(this.outs.length) + this.ins.reduce((n, s) => n + 40 + Dr(s.script), 0) + this.outs.reduce((n, s) => n + 8 + Dr(s.script), 0) + (r ? this.ins.reduce((n, s) => n +
|
|
14339
|
+
return (r ? 10 : 8) + Ye.varuint.encodingLength(this.ins.length) + Ye.varuint.encodingLength(this.outs.length) + this.ins.reduce((n, s) => n + 40 + Dr(s.script), 0) + this.outs.reduce((n, s) => n + 8 + Dr(s.script), 0) + (r ? this.ins.reduce((n, s) => n + IT(s.witness), 0) : 0);
|
|
14340
14340
|
}
|
|
14341
14341
|
clone() {
|
|
14342
14342
|
const t = new Te();
|
|
@@ -14370,7 +14370,7 @@ let Or = class Te {
|
|
|
14370
14370
|
arguments
|
|
14371
14371
|
), t >= this.ins.length) return ey;
|
|
14372
14372
|
const s = Qp.compile(
|
|
14373
|
-
Qp.decompile(r).filter((a) => a !==
|
|
14373
|
+
Qp.decompile(r).filter((a) => a !== kT.OPS.OP_CODESEPARATOR)
|
|
14374
14374
|
), i = this.clone();
|
|
14375
14375
|
if ((n & 31) === Te.SIGHASH_NONE)
|
|
14376
14376
|
i.outs = [], i.ins.forEach((a, c) => {
|
|
@@ -14380,7 +14380,7 @@ let Or = class Te {
|
|
|
14380
14380
|
if (t >= this.outs.length) return ey;
|
|
14381
14381
|
i.outs.length = t + 1;
|
|
14382
14382
|
for (let a = 0; a < t; a++)
|
|
14383
|
-
i.outs[a] =
|
|
14383
|
+
i.outs[a] = OT;
|
|
14384
14384
|
i.ins.forEach((a, c) => {
|
|
14385
14385
|
c !== t && (a.sequence = 0);
|
|
14386
14386
|
});
|
|
@@ -14504,7 +14504,7 @@ let Or = class Te {
|
|
|
14504
14504
|
return i && (s.writeUInt8(Te.ADVANCED_TRANSACTION_MARKER), s.writeUInt8(Te.ADVANCED_TRANSACTION_FLAG)), s.writeVarInt(this.ins.length), this.ins.forEach((o) => {
|
|
14505
14505
|
s.writeSlice(o.hash), s.writeUInt32(o.index), s.writeVarSlice(o.script), s.writeUInt32(o.sequence);
|
|
14506
14506
|
}), s.writeVarInt(this.outs.length), this.outs.forEach((o) => {
|
|
14507
|
-
|
|
14507
|
+
BT(o) ? s.writeUInt64(o.value) : s.writeSlice(o.valueBuffer), s.writeVarSlice(o.script);
|
|
14508
14508
|
}), i && this.ins.forEach((o) => {
|
|
14509
14509
|
s.writeVector(o.witness);
|
|
14510
14510
|
}), s.writeUInt32(this.locktime), r !== void 0 ? t.slice(r, s.offset) : t;
|
|
@@ -14523,9 +14523,9 @@ Or.ADVANCED_TRANSACTION_MARKER = 0;
|
|
|
14523
14523
|
Or.ADVANCED_TRANSACTION_FLAG = 1;
|
|
14524
14524
|
var ke = {}, da = {};
|
|
14525
14525
|
Object.defineProperty(da, "__esModule", { value: !0 });
|
|
14526
|
-
const
|
|
14526
|
+
const CT = 9007199254740991;
|
|
14527
14527
|
function hh(e) {
|
|
14528
|
-
if (e < 0 || e >
|
|
14528
|
+
if (e < 0 || e > CT || e % 1 !== 0)
|
|
14529
14529
|
throw new RangeError("value out of range");
|
|
14530
14530
|
}
|
|
14531
14531
|
function no(e, t, r) {
|
|
@@ -14622,7 +14622,7 @@ mt.testnet = {
|
|
|
14622
14622
|
var Wt = {};
|
|
14623
14623
|
Object.defineProperty(Wt, "__esModule", { value: !0 });
|
|
14624
14624
|
Wt.value = Wt.prop = void 0;
|
|
14625
|
-
function
|
|
14625
|
+
function RT(e, t, r) {
|
|
14626
14626
|
Object.defineProperty(e, t, {
|
|
14627
14627
|
configurable: !0,
|
|
14628
14628
|
enumerable: !0,
|
|
@@ -14640,16 +14640,16 @@ function CT(e, t, r) {
|
|
|
14640
14640
|
}
|
|
14641
14641
|
});
|
|
14642
14642
|
}
|
|
14643
|
-
Wt.prop =
|
|
14644
|
-
function
|
|
14643
|
+
Wt.prop = RT;
|
|
14644
|
+
function $T(e) {
|
|
14645
14645
|
let t;
|
|
14646
14646
|
return () => (t !== void 0 || (t = e()), t);
|
|
14647
14647
|
}
|
|
14648
|
-
Wt.value =
|
|
14648
|
+
Wt.value = $T;
|
|
14649
14649
|
Object.defineProperty(Yc, "__esModule", { value: !0 });
|
|
14650
14650
|
Yc.p2data = void 0;
|
|
14651
|
-
const
|
|
14652
|
-
function
|
|
14651
|
+
const NT = mt, Wa = Zt(), Ur = bt, ty = Wt, ry = Wa.OPS;
|
|
14652
|
+
function MT(e, t) {
|
|
14653
14653
|
if (!e.data && !e.output) throw new TypeError("Not enough data");
|
|
14654
14654
|
t = Object.assign({ validate: !0 }, t || {}), (0, Ur.typeforce)(
|
|
14655
14655
|
{
|
|
@@ -14661,7 +14661,7 @@ function NT(e, t) {
|
|
|
14661
14661
|
},
|
|
14662
14662
|
e
|
|
14663
14663
|
);
|
|
14664
|
-
const n = { name: "embed", network: e.network ||
|
|
14664
|
+
const n = { name: "embed", network: e.network || NT.bitcoin };
|
|
14665
14665
|
if (ty.prop(n, "output", () => {
|
|
14666
14666
|
if (e.data)
|
|
14667
14667
|
return Wa.compile([ry.OP_RETURN].concat(e.data));
|
|
@@ -14678,12 +14678,12 @@ function NT(e, t) {
|
|
|
14678
14678
|
}
|
|
14679
14679
|
return Object.assign(n, e);
|
|
14680
14680
|
}
|
|
14681
|
-
Yc.p2data =
|
|
14681
|
+
Yc.p2data = MT;
|
|
14682
14682
|
var Zc = {};
|
|
14683
14683
|
Object.defineProperty(Zc, "__esModule", { value: !0 });
|
|
14684
14684
|
Zc.p2ms = void 0;
|
|
14685
|
-
const
|
|
14686
|
-
function
|
|
14685
|
+
const UT = mt, oi = Zt(), Ge = bt, Fn = Wt, ai = oi.OPS, Oa = ai.OP_RESERVED;
|
|
14686
|
+
function FT(e, t) {
|
|
14687
14687
|
if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures)
|
|
14688
14688
|
throw new TypeError("Not enough data");
|
|
14689
14689
|
t = Object.assign({ validate: !0 }, t || {});
|
|
@@ -14706,7 +14706,7 @@ function UT(e, t) {
|
|
|
14706
14706
|
},
|
|
14707
14707
|
e
|
|
14708
14708
|
);
|
|
14709
|
-
const s = { network: e.network ||
|
|
14709
|
+
const s = { network: e.network || UT.bitcoin };
|
|
14710
14710
|
let i = [], o = !1;
|
|
14711
14711
|
function a(c) {
|
|
14712
14712
|
o || (o = !0, i = oi.decompile(c), s.m = i[0] - Oa, s.n = i[i.length - 2] - Oa, s.pubkeys = i.slice(1, -2));
|
|
@@ -14782,12 +14782,12 @@ function UT(e, t) {
|
|
|
14782
14782
|
}
|
|
14783
14783
|
return Object.assign(s, e);
|
|
14784
14784
|
}
|
|
14785
|
-
Zc.p2ms =
|
|
14785
|
+
Zc.p2ms = FT;
|
|
14786
14786
|
var Jc = {};
|
|
14787
14787
|
Object.defineProperty(Jc, "__esModule", { value: !0 });
|
|
14788
14788
|
Jc.p2pk = void 0;
|
|
14789
|
-
const
|
|
14790
|
-
function
|
|
14789
|
+
const jT = mt, ci = Zt(), yr = bt, si = Wt, ny = ci.OPS;
|
|
14790
|
+
function LT(e, t) {
|
|
14791
14791
|
if (!e.input && !e.output && !e.pubkey && !e.input && !e.signature)
|
|
14792
14792
|
throw new TypeError("Not enough data");
|
|
14793
14793
|
t = Object.assign({ validate: !0 }, t || {}), (0, yr.typeforce)(
|
|
@@ -14800,7 +14800,7 @@ function jT(e, t) {
|
|
|
14800
14800
|
},
|
|
14801
14801
|
e
|
|
14802
14802
|
);
|
|
14803
|
-
const r = si.value(() => ci.decompile(e.input)), s = { name: "p2pk", network: e.network ||
|
|
14803
|
+
const r = si.value(() => ci.decompile(e.input)), s = { name: "p2pk", network: e.network || jT.bitcoin };
|
|
14804
14804
|
if (si.prop(s, "output", () => {
|
|
14805
14805
|
if (e.pubkey)
|
|
14806
14806
|
return ci.compile([e.pubkey, ny.OP_CHECKSIG]);
|
|
@@ -14835,9 +14835,9 @@ function jT(e, t) {
|
|
|
14835
14835
|
}
|
|
14836
14836
|
return Object.assign(s, e);
|
|
14837
14837
|
}
|
|
14838
|
-
Jc.p2pk =
|
|
14838
|
+
Jc.p2pk = LT;
|
|
14839
14839
|
var Qc = {};
|
|
14840
|
-
function
|
|
14840
|
+
function DT(e) {
|
|
14841
14841
|
if (e.length >= 255)
|
|
14842
14842
|
throw new TypeError("Alphabet too long");
|
|
14843
14843
|
for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
|
|
@@ -14907,9 +14907,9 @@ function LT(e) {
|
|
|
14907
14907
|
decode: p
|
|
14908
14908
|
};
|
|
14909
14909
|
}
|
|
14910
|
-
var
|
|
14911
|
-
const
|
|
14912
|
-
var
|
|
14910
|
+
var HT = DT;
|
|
14911
|
+
const zT = HT, VT = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
14912
|
+
var qT = zT(VT), Ku = qT, GT = function(e) {
|
|
14913
14913
|
function t(i) {
|
|
14914
14914
|
var o = Uint8Array.from(i), a = e(o), c = o.length + 4, f = new Uint8Array(c);
|
|
14915
14915
|
return f.set(o, 0), f.set(a.subarray(0, 4), o.length), Ku.encode(f, c);
|
|
@@ -14934,15 +14934,15 @@ var VT = HT(zT), Ku = VT, qT = function(e) {
|
|
|
14934
14934
|
decode: s,
|
|
14935
14935
|
decodeUnsafe: n
|
|
14936
14936
|
};
|
|
14937
|
-
}, { sha256: sy } = tw,
|
|
14938
|
-
function
|
|
14937
|
+
}, { sha256: sy } = tw, WT = GT;
|
|
14938
|
+
function KT(e) {
|
|
14939
14939
|
return sy(sy(e));
|
|
14940
14940
|
}
|
|
14941
|
-
var ph =
|
|
14941
|
+
var ph = WT(KT);
|
|
14942
14942
|
Object.defineProperty(Qc, "__esModule", { value: !0 });
|
|
14943
14943
|
Qc.p2pkh = void 0;
|
|
14944
|
-
const Xu = as,
|
|
14945
|
-
function
|
|
14944
|
+
const Xu = as, XT = mt, ui = Zt(), At = bt, an = Wt, iy = ph, jn = ui.OPS;
|
|
14945
|
+
function YT(e, t) {
|
|
14946
14946
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.input)
|
|
14947
14947
|
throw new TypeError("Not enough data");
|
|
14948
14948
|
t = Object.assign({ validate: !0 }, t || {}), (0, At.typeforce)(
|
|
@@ -14960,7 +14960,7 @@ function XT(e, t) {
|
|
|
14960
14960
|
const r = an.value(() => {
|
|
14961
14961
|
const o = Buffer.from(iy.decode(e.address)), a = o.readUInt8(0), c = o.slice(1);
|
|
14962
14962
|
return { version: a, hash: c };
|
|
14963
|
-
}), n = an.value(() => ui.decompile(e.input)), s = e.network ||
|
|
14963
|
+
}), n = an.value(() => ui.decompile(e.input)), s = e.network || XT.bitcoin, i = { name: "p2pkh", network: s };
|
|
14964
14964
|
if (an.prop(i, "address", () => {
|
|
14965
14965
|
if (!i.hash) return;
|
|
14966
14966
|
const o = Buffer.allocUnsafe(21);
|
|
@@ -15035,12 +15035,12 @@ function XT(e, t) {
|
|
|
15035
15035
|
}
|
|
15036
15036
|
return Object.assign(i, e);
|
|
15037
15037
|
}
|
|
15038
|
-
Qc.p2pkh =
|
|
15038
|
+
Qc.p2pkh = YT;
|
|
15039
15039
|
var eu = {};
|
|
15040
15040
|
Object.defineProperty(eu, "__esModule", { value: !0 });
|
|
15041
15041
|
eu.p2sh = void 0;
|
|
15042
|
-
const oy = as,
|
|
15043
|
-
function
|
|
15042
|
+
const oy = as, ZT = mt, Hr = Zt(), Be = bt, Fr = Wt, ay = ph, Ki = Hr.OPS;
|
|
15043
|
+
function JT(e, t) {
|
|
15044
15044
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.input)
|
|
15045
15045
|
throw new TypeError("Not enough data");
|
|
15046
15046
|
t = Object.assign({ validate: !0 }, t || {}), (0, Be.typeforce)(
|
|
@@ -15065,7 +15065,7 @@ function ZT(e, t) {
|
|
|
15065
15065
|
e
|
|
15066
15066
|
);
|
|
15067
15067
|
let r = e.network;
|
|
15068
|
-
r || (r = e.redeem && e.redeem.network ||
|
|
15068
|
+
r || (r = e.redeem && e.redeem.network || ZT.bitcoin);
|
|
15069
15069
|
const n = { network: r }, s = Fr.value(() => {
|
|
15070
15070
|
const a = Buffer.from(ay.decode(e.address)), c = a.readUInt8(0), f = a.slice(1);
|
|
15071
15071
|
return { version: c, hash: f };
|
|
@@ -15178,7 +15178,7 @@ function ZT(e, t) {
|
|
|
15178
15178
|
}
|
|
15179
15179
|
return Object.assign(n, e);
|
|
15180
15180
|
}
|
|
15181
|
-
eu.p2sh =
|
|
15181
|
+
eu.p2sh = JT;
|
|
15182
15182
|
var tu = {}, In = {};
|
|
15183
15183
|
Object.defineProperty(In, "__esModule", { value: !0 });
|
|
15184
15184
|
In.bech32m = In.bech32 = void 0;
|
|
@@ -15222,15 +15222,15 @@ function yh(e, t, r, n) {
|
|
|
15222
15222
|
}
|
|
15223
15223
|
return a;
|
|
15224
15224
|
}
|
|
15225
|
-
function
|
|
15225
|
+
function QT(e) {
|
|
15226
15226
|
return yh(e, 8, 5, !0);
|
|
15227
15227
|
}
|
|
15228
|
-
function
|
|
15228
|
+
function ek(e) {
|
|
15229
15229
|
const t = yh(e, 5, 8, !1);
|
|
15230
15230
|
if (Array.isArray(t))
|
|
15231
15231
|
return t;
|
|
15232
15232
|
}
|
|
15233
|
-
function
|
|
15233
|
+
function tk(e) {
|
|
15234
15234
|
const t = yh(e, 5, 8, !1);
|
|
15235
15235
|
if (Array.isArray(t))
|
|
15236
15236
|
return t;
|
|
@@ -15306,17 +15306,17 @@ function ow(e) {
|
|
|
15306
15306
|
decodeUnsafe: s,
|
|
15307
15307
|
decode: i,
|
|
15308
15308
|
encode: r,
|
|
15309
|
-
toWords:
|
|
15310
|
-
fromWordsUnsafe:
|
|
15311
|
-
fromWords:
|
|
15309
|
+
toWords: QT,
|
|
15310
|
+
fromWordsUnsafe: ek,
|
|
15311
|
+
fromWords: tk
|
|
15312
15312
|
};
|
|
15313
15313
|
}
|
|
15314
15314
|
In.bech32 = ow("bech32");
|
|
15315
15315
|
In.bech32m = ow("bech32m");
|
|
15316
15316
|
Object.defineProperty(tu, "__esModule", { value: !0 });
|
|
15317
15317
|
tu.p2wpkh = void 0;
|
|
15318
|
-
const Yu = as,
|
|
15319
|
-
function
|
|
15318
|
+
const Yu = as, rk = mt, Ka = Zt(), Qe = bt, Ln = Wt, Ba = In, uy = Ka.OPS, nk = Buffer.alloc(0);
|
|
15319
|
+
function sk(e, t) {
|
|
15320
15320
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.witness)
|
|
15321
15321
|
throw new TypeError("Not enough data");
|
|
15322
15322
|
t = Object.assign({ validate: !0 }, t || {}), (0, Qe.typeforce)(
|
|
@@ -15341,7 +15341,7 @@ function nk(e, t) {
|
|
|
15341
15341
|
prefix: i.prefix,
|
|
15342
15342
|
data: Buffer.from(a)
|
|
15343
15343
|
};
|
|
15344
|
-
}), n = e.network ||
|
|
15344
|
+
}), n = e.network || rk.bitcoin, s = { name: "p2wpkh", network: n };
|
|
15345
15345
|
if (Ln.prop(s, "address", () => {
|
|
15346
15346
|
if (!s.hash) return;
|
|
15347
15347
|
const i = Ba.bech32.toWords(s.hash);
|
|
@@ -15362,7 +15362,7 @@ function nk(e, t) {
|
|
|
15362
15362
|
return e.witness[0];
|
|
15363
15363
|
}), Ln.prop(s, "input", () => {
|
|
15364
15364
|
if (s.witness)
|
|
15365
|
-
return
|
|
15365
|
+
return nk;
|
|
15366
15366
|
}), Ln.prop(s, "witness", () => {
|
|
15367
15367
|
if (e.pubkey && e.signature)
|
|
15368
15368
|
return [e.signature, e.pubkey];
|
|
@@ -15413,15 +15413,15 @@ function nk(e, t) {
|
|
|
15413
15413
|
}
|
|
15414
15414
|
return Object.assign(s, e);
|
|
15415
15415
|
}
|
|
15416
|
-
tu.p2wpkh =
|
|
15416
|
+
tu.p2wpkh = sk;
|
|
15417
15417
|
var ru = {};
|
|
15418
15418
|
Object.defineProperty(ru, "__esModule", { value: !0 });
|
|
15419
15419
|
ru.p2wsh = void 0;
|
|
15420
|
-
const fy = as,
|
|
15420
|
+
const fy = as, ik = mt, pn = Zt(), Pe = bt, cn = Wt, Ca = In, ly = pn.OPS, Zu = Buffer.alloc(0);
|
|
15421
15421
|
function Ra(e) {
|
|
15422
15422
|
return !!(Buffer.isBuffer(e) && e.length === 65 && e[0] === 4 && (0, Pe.isPoint)(e));
|
|
15423
15423
|
}
|
|
15424
|
-
function
|
|
15424
|
+
function ok(e, t) {
|
|
15425
15425
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.witness)
|
|
15426
15426
|
throw new TypeError("Not enough data");
|
|
15427
15427
|
t = Object.assign({ validate: !0 }, t || {}), (0, Pe.typeforce)(
|
|
@@ -15454,7 +15454,7 @@ function ik(e, t) {
|
|
|
15454
15454
|
};
|
|
15455
15455
|
}), n = cn.value(() => pn.decompile(e.redeem.input));
|
|
15456
15456
|
let s = e.network;
|
|
15457
|
-
s || (s = e.redeem && e.redeem.network ||
|
|
15457
|
+
s || (s = e.redeem && e.redeem.network || ik.bitcoin);
|
|
15458
15458
|
const i = { network: s };
|
|
15459
15459
|
if (cn.prop(i, "address", () => {
|
|
15460
15460
|
if (!i.hash) return;
|
|
@@ -15554,25 +15554,25 @@ function ik(e, t) {
|
|
|
15554
15554
|
}
|
|
15555
15555
|
return Object.assign(i, e);
|
|
15556
15556
|
}
|
|
15557
|
-
ru.p2wsh =
|
|
15557
|
+
ru.p2wsh = ok;
|
|
15558
15558
|
var Xi = {}, Ls = {};
|
|
15559
15559
|
Object.defineProperty(Ls, "__esModule", { value: !0 });
|
|
15560
15560
|
Ls.getEccLib = Ls.initEccLib = void 0;
|
|
15561
15561
|
const mo = {};
|
|
15562
|
-
function
|
|
15563
|
-
e ? e !== mo.eccLib && (t != null && t.DANGER_DO_NOT_VERIFY_ECCLIB ||
|
|
15562
|
+
function ak(e, t) {
|
|
15563
|
+
e ? e !== mo.eccLib && (t != null && t.DANGER_DO_NOT_VERIFY_ECCLIB || uk(e), mo.eccLib = e) : mo.eccLib = e;
|
|
15564
15564
|
}
|
|
15565
|
-
Ls.initEccLib =
|
|
15566
|
-
function
|
|
15565
|
+
Ls.initEccLib = ak;
|
|
15566
|
+
function ck() {
|
|
15567
15567
|
if (!mo.eccLib)
|
|
15568
15568
|
throw new Error(
|
|
15569
15569
|
"No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance"
|
|
15570
15570
|
);
|
|
15571
15571
|
return mo.eccLib;
|
|
15572
15572
|
}
|
|
15573
|
-
Ls.getEccLib =
|
|
15573
|
+
Ls.getEccLib = ck;
|
|
15574
15574
|
const un = (e) => Buffer.from(e, "hex");
|
|
15575
|
-
function
|
|
15575
|
+
function uk(e) {
|
|
15576
15576
|
Qt(typeof e.isXOnlyPoint == "function"), Qt(
|
|
15577
15577
|
e.isXOnlyPoint(
|
|
15578
15578
|
un("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
|
|
@@ -15597,7 +15597,7 @@ function ck(e) {
|
|
|
15597
15597
|
!e.isXOnlyPoint(
|
|
15598
15598
|
un("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")
|
|
15599
15599
|
)
|
|
15600
|
-
), Qt(typeof e.xOnlyPointAddTweak == "function"),
|
|
15600
|
+
), Qt(typeof e.xOnlyPointAddTweak == "function"), fk.forEach((t) => {
|
|
15601
15601
|
const r = e.xOnlyPointAddTweak(un(t.pubkey), un(t.tweak));
|
|
15602
15602
|
t.result === null ? Qt(r === null) : (Qt(r !== null), Qt(r.parity === t.parity), Qt(Buffer.from(r.xOnlyPubkey).equals(un(t.result))));
|
|
15603
15603
|
});
|
|
@@ -15605,7 +15605,7 @@ function ck(e) {
|
|
|
15605
15605
|
function Qt(e) {
|
|
15606
15606
|
if (!e) throw new Error("ecc library invalid");
|
|
15607
15607
|
}
|
|
15608
|
-
const
|
|
15608
|
+
const fk = [
|
|
15609
15609
|
{
|
|
15610
15610
|
pubkey: "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
|
15611
15611
|
tweak: "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140",
|
|
@@ -15704,7 +15704,7 @@ var mh = {};
|
|
|
15704
15704
|
}
|
|
15705
15705
|
})(mh);
|
|
15706
15706
|
var St = {}, dy;
|
|
15707
|
-
function
|
|
15707
|
+
function lk() {
|
|
15708
15708
|
if (dy) return St;
|
|
15709
15709
|
dy = 1, Object.defineProperty(St, "__esModule", { value: !0 }), St.toOutputScript = St.fromOutputScript = St.toBech32 = St.toBase58Check = St.fromBech32 = St.fromBase58Check = void 0;
|
|
15710
15710
|
const e = mt, t = gh(), r = Zt(), n = bt, s = In, i = ph, o = 40, a = 2, c = 16, f = 2, u = 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.";
|
|
@@ -15827,10 +15827,10 @@ function fk() {
|
|
|
15827
15827
|
return St.toOutputScript = T, St;
|
|
15828
15828
|
}
|
|
15829
15829
|
var hy;
|
|
15830
|
-
function
|
|
15830
|
+
function dk() {
|
|
15831
15831
|
if (hy) return Xi;
|
|
15832
15832
|
hy = 1, Object.defineProperty(Xi, "__esModule", { value: !0 }), Xi.p2tr = void 0;
|
|
15833
|
-
const e = Xs, t = mt, r = Zt(), n = bt, s = Ls, i = mh, o = Wt, a = In, c =
|
|
15833
|
+
const e = Xs, t = mt, r = Zt(), n = bt, s = Ls, i = mh, o = Wt, a = In, c = lk(), f = r.OPS, u = 1, l = 80;
|
|
15834
15834
|
function p(d, m) {
|
|
15835
15835
|
if (!d.address && !d.output && !d.pubkey && !d.internalPubkey && !(d.witness && d.witness.length > 1))
|
|
15836
15836
|
throw new TypeError("Not enough data");
|
|
@@ -16084,7 +16084,7 @@ function gh() {
|
|
|
16084
16084
|
return a.p2wsh;
|
|
16085
16085
|
}
|
|
16086
16086
|
});
|
|
16087
|
-
const c =
|
|
16087
|
+
const c = dk();
|
|
16088
16088
|
Object.defineProperty(e, "p2tr", {
|
|
16089
16089
|
enumerable: !0,
|
|
16090
16090
|
get: function() {
|
|
@@ -16095,7 +16095,7 @@ function gh() {
|
|
|
16095
16095
|
}
|
|
16096
16096
|
Object.defineProperty(ke, "__esModule", { value: !0 });
|
|
16097
16097
|
ke.signatureBlocksAction = ke.checkInputForSig = ke.pubkeyInScript = ke.pubkeyPositionInScript = ke.witnessStackToScriptWitness = ke.isP2TR = ke.isP2SHScript = ke.isP2WSHScript = ke.isP2WPKH = ke.isP2PKH = ke.isP2PK = ke.isP2MS = void 0;
|
|
16098
|
-
const yy = da, go = Zt(), $a = la,
|
|
16098
|
+
const yy = da, go = Zt(), $a = la, hk = as, Ys = gh();
|
|
16099
16099
|
function Zs(e) {
|
|
16100
16100
|
return (t) => {
|
|
16101
16101
|
try {
|
|
@@ -16112,7 +16112,7 @@ ke.isP2WPKH = Zs(Ys.p2wpkh);
|
|
|
16112
16112
|
ke.isP2WSHScript = Zs(Ys.p2wsh);
|
|
16113
16113
|
ke.isP2SHScript = Zs(Ys.p2sh);
|
|
16114
16114
|
ke.isP2TR = Zs(Ys.p2tr);
|
|
16115
|
-
function
|
|
16115
|
+
function pk(e) {
|
|
16116
16116
|
let t = Buffer.allocUnsafe(0);
|
|
16117
16117
|
function r(o) {
|
|
16118
16118
|
t = Buffer.concat([t, Buffer.from(o)]);
|
|
@@ -16129,23 +16129,23 @@ function hk(e) {
|
|
|
16129
16129
|
}
|
|
16130
16130
|
return i(e), t;
|
|
16131
16131
|
}
|
|
16132
|
-
ke.witnessStackToScriptWitness =
|
|
16132
|
+
ke.witnessStackToScriptWitness = pk;
|
|
16133
16133
|
function aw(e, t) {
|
|
16134
|
-
const r = (0,
|
|
16134
|
+
const r = (0, hk.hash160)(e), n = e.slice(1, 33), s = go.decompile(t);
|
|
16135
16135
|
if (s === null) throw new Error("Unknown script error");
|
|
16136
16136
|
return s.findIndex((i) => typeof i == "number" ? !1 : i.equals(e) || i.equals(r) || i.equals(n));
|
|
16137
16137
|
}
|
|
16138
16138
|
ke.pubkeyPositionInScript = aw;
|
|
16139
|
-
function
|
|
16139
|
+
function yk(e, t) {
|
|
16140
16140
|
return aw(e, t) !== -1;
|
|
16141
16141
|
}
|
|
16142
|
-
ke.pubkeyInScript =
|
|
16143
|
-
function
|
|
16144
|
-
return
|
|
16142
|
+
ke.pubkeyInScript = yk;
|
|
16143
|
+
function mk(e, t) {
|
|
16144
|
+
return gk(e).some(
|
|
16145
16145
|
(n) => cw(n, go.signature.decode, t)
|
|
16146
16146
|
);
|
|
16147
16147
|
}
|
|
16148
|
-
ke.checkInputForSig =
|
|
16148
|
+
ke.checkInputForSig = mk;
|
|
16149
16149
|
function cw(e, t, r) {
|
|
16150
16150
|
const { hashType: n } = t(e), s = [];
|
|
16151
16151
|
switch (n & $a.Transaction.SIGHASH_ANYONECANPAY && s.push("addInput"), n & 31) {
|
|
@@ -16159,31 +16159,31 @@ function cw(e, t, r) {
|
|
|
16159
16159
|
return s.indexOf(r) === -1;
|
|
16160
16160
|
}
|
|
16161
16161
|
ke.signatureBlocksAction = cw;
|
|
16162
|
-
function
|
|
16162
|
+
function gk(e) {
|
|
16163
16163
|
let t = [];
|
|
16164
16164
|
if ((e.partialSig || []).length === 0) {
|
|
16165
16165
|
if (!e.finalScriptSig && !e.finalScriptWitness) return [];
|
|
16166
|
-
t =
|
|
16166
|
+
t = bk(e);
|
|
16167
16167
|
} else
|
|
16168
16168
|
t = e.partialSig;
|
|
16169
16169
|
return t.map((r) => r.signature);
|
|
16170
16170
|
}
|
|
16171
|
-
function
|
|
16171
|
+
function bk(e) {
|
|
16172
16172
|
const t = e.finalScriptSig ? go.decompile(e.finalScriptSig) || [] : [], r = e.finalScriptWitness ? go.decompile(e.finalScriptWitness) || [] : [];
|
|
16173
16173
|
return t.concat(r).filter((n) => Buffer.isBuffer(n) && go.isCanonicalScriptSignature(n)).map((n) => ({ signature: n }));
|
|
16174
16174
|
}
|
|
16175
16175
|
Object.defineProperty(je, "__esModule", { value: !0 });
|
|
16176
16176
|
je.checkTaprootInputForSigs = je.tapTreeFromList = je.tapTreeToList = je.tweakInternalPubKey = je.checkTaprootOutputFields = je.checkTaprootInputFields = je.isTaprootOutput = je.isTaprootInput = io = je.serializeTaprootSignature = je.tapScriptFinalizer = je.toXOnly = void 0;
|
|
16177
|
-
const bh = bt,
|
|
16178
|
-
je.toXOnly =
|
|
16179
|
-
function
|
|
16180
|
-
const n =
|
|
16177
|
+
const bh = bt, wk = la, nu = ke, ss = mh, vk = gh(), Ek = ke, Ak = (e) => e.length === 32 ? e : e.slice(1, 33);
|
|
16178
|
+
je.toXOnly = Ak;
|
|
16179
|
+
function Sk(e, t, r) {
|
|
16180
|
+
const n = Dk(
|
|
16181
16181
|
t,
|
|
16182
16182
|
e,
|
|
16183
16183
|
r
|
|
16184
16184
|
);
|
|
16185
16185
|
try {
|
|
16186
|
-
const i =
|
|
16186
|
+
const i = jk(t, n).concat(n.script).concat(n.controlBlock);
|
|
16187
16187
|
return {
|
|
16188
16188
|
finalScriptWitness: (0, nu.witnessStackToScriptWitness)(i)
|
|
16189
16189
|
};
|
|
@@ -16191,12 +16191,12 @@ function Ak(e, t, r) {
|
|
|
16191
16191
|
throw new Error(`Can not finalize taproot input #${e}: ${s}`);
|
|
16192
16192
|
}
|
|
16193
16193
|
}
|
|
16194
|
-
je.tapScriptFinalizer =
|
|
16195
|
-
function
|
|
16194
|
+
je.tapScriptFinalizer = Sk;
|
|
16195
|
+
function xk(e, t) {
|
|
16196
16196
|
const r = t ? Buffer.from([t]) : Buffer.from([]);
|
|
16197
16197
|
return Buffer.concat([e, r]);
|
|
16198
16198
|
}
|
|
16199
|
-
var io = je.serializeTaprootSignature =
|
|
16199
|
+
var io = je.serializeTaprootSignature = xk;
|
|
16200
16200
|
function Xa(e) {
|
|
16201
16201
|
return e && !!(e.tapInternalKey || e.tapMerkleRoot || e.tapLeafScript && e.tapLeafScript.length || e.tapBip32Derivation && e.tapBip32Derivation.length || e.witnessUtxo && (0, nu.isP2TR)(e.witnessUtxo.script));
|
|
16202
16202
|
}
|
|
@@ -16205,31 +16205,31 @@ function Ya(e, t) {
|
|
|
16205
16205
|
return e && !!(e.tapInternalKey || e.tapTree || e.tapBip32Derivation && e.tapBip32Derivation.length || t && (0, nu.isP2TR)(t));
|
|
16206
16206
|
}
|
|
16207
16207
|
je.isTaprootOutput = Ya;
|
|
16208
|
-
function xk(e, t, r) {
|
|
16209
|
-
Nk(e, t, r), Uk(e, t, r);
|
|
16210
|
-
}
|
|
16211
|
-
je.checkTaprootInputFields = xk;
|
|
16212
16208
|
function _k(e, t, r) {
|
|
16213
|
-
Mk(e, t, r),
|
|
16209
|
+
Mk(e, t, r), Fk(e, t, r);
|
|
16210
|
+
}
|
|
16211
|
+
je.checkTaprootInputFields = _k;
|
|
16212
|
+
function Tk(e, t, r) {
|
|
16213
|
+
Uk(e, t, r), kk(e, t);
|
|
16214
16214
|
}
|
|
16215
|
-
je.checkTaprootOutputFields =
|
|
16216
|
-
function
|
|
16215
|
+
je.checkTaprootOutputFields = Tk;
|
|
16216
|
+
function kk(e, t) {
|
|
16217
16217
|
if (!t.tapTree && !t.tapInternalKey) return;
|
|
16218
16218
|
const r = t.tapInternalKey || e.tapInternalKey, n = t.tapTree || e.tapTree;
|
|
16219
16219
|
if (r) {
|
|
16220
|
-
const { script: s } = e, i =
|
|
16220
|
+
const { script: s } = e, i = Ik(r, n);
|
|
16221
16221
|
if (s && !s.equals(i))
|
|
16222
16222
|
throw new Error("Error adding output. Script or address missmatch.");
|
|
16223
16223
|
}
|
|
16224
16224
|
}
|
|
16225
|
-
function
|
|
16226
|
-
const r = t && uw(t.leaves), { output: n } = (0,
|
|
16225
|
+
function Ik(e, t) {
|
|
16226
|
+
const r = t && uw(t.leaves), { output: n } = (0, vk.p2tr)({
|
|
16227
16227
|
internalPubkey: e,
|
|
16228
16228
|
scriptTree: r
|
|
16229
16229
|
});
|
|
16230
16230
|
return n;
|
|
16231
16231
|
}
|
|
16232
|
-
function
|
|
16232
|
+
function Pk(e, t) {
|
|
16233
16233
|
const r = t.tapInternalKey, n = r && (0, ss.tweakKey)(r, t.tapMerkleRoot);
|
|
16234
16234
|
if (!n)
|
|
16235
16235
|
throw new Error(
|
|
@@ -16237,43 +16237,43 @@ function Ik(e, t) {
|
|
|
16237
16237
|
);
|
|
16238
16238
|
return n.x;
|
|
16239
16239
|
}
|
|
16240
|
-
je.tweakInternalPubKey =
|
|
16241
|
-
function
|
|
16240
|
+
je.tweakInternalPubKey = Pk;
|
|
16241
|
+
function Ok(e) {
|
|
16242
16242
|
if (!(0, bh.isTaptree)(e))
|
|
16243
16243
|
throw new Error(
|
|
16244
16244
|
"Cannot convert taptree to tapleaf list. Expecting a tapree structure."
|
|
16245
16245
|
);
|
|
16246
16246
|
return Yl(e);
|
|
16247
16247
|
}
|
|
16248
|
-
je.tapTreeToList =
|
|
16248
|
+
je.tapTreeToList = Ok;
|
|
16249
16249
|
function uw(e = []) {
|
|
16250
16250
|
return e.length === 1 && e[0].depth === 0 ? {
|
|
16251
16251
|
output: e[0].script,
|
|
16252
16252
|
version: e[0].leafVersion
|
|
16253
|
-
} :
|
|
16253
|
+
} : Nk(e);
|
|
16254
16254
|
}
|
|
16255
16255
|
je.tapTreeFromList = uw;
|
|
16256
|
-
function
|
|
16257
|
-
return
|
|
16258
|
-
(n) => (0,
|
|
16256
|
+
function Bk(e, t) {
|
|
16257
|
+
return Rk(e).some(
|
|
16258
|
+
(n) => (0, Ek.signatureBlocksAction)(n, Ck, t)
|
|
16259
16259
|
);
|
|
16260
16260
|
}
|
|
16261
|
-
je.checkTaprootInputForSigs =
|
|
16262
|
-
function
|
|
16261
|
+
je.checkTaprootInputForSigs = Bk;
|
|
16262
|
+
function Ck(e) {
|
|
16263
16263
|
return {
|
|
16264
16264
|
signature: e.slice(0, 64),
|
|
16265
|
-
hashType: e.slice(64)[0] ||
|
|
16265
|
+
hashType: e.slice(64)[0] || wk.Transaction.SIGHASH_DEFAULT
|
|
16266
16266
|
};
|
|
16267
16267
|
}
|
|
16268
|
-
function
|
|
16268
|
+
function Rk(e) {
|
|
16269
16269
|
const t = [];
|
|
16270
16270
|
if (e.tapKeySig && t.push(e.tapKeySig), e.tapScriptSig && t.push(...e.tapScriptSig.map((r) => r.signature)), !t.length) {
|
|
16271
|
-
const r =
|
|
16271
|
+
const r = $k(e.finalScriptWitness);
|
|
16272
16272
|
r && t.push(r);
|
|
16273
16273
|
}
|
|
16274
16274
|
return t;
|
|
16275
16275
|
}
|
|
16276
|
-
function
|
|
16276
|
+
function $k(e) {
|
|
16277
16277
|
if (!e) return;
|
|
16278
16278
|
const t = e.slice(2);
|
|
16279
16279
|
if (t.length === 64 || t.length === 65) return t;
|
|
@@ -16287,7 +16287,7 @@ function Yl(e, t = [], r = 0) {
|
|
|
16287
16287
|
script: e.output
|
|
16288
16288
|
}), t) : (e[0] && Yl(e[0], t, r + 1), e[1] && Yl(e[1], t, r + 1), t) : [];
|
|
16289
16289
|
}
|
|
16290
|
-
function
|
|
16290
|
+
function Nk(e) {
|
|
16291
16291
|
let t;
|
|
16292
16292
|
for (const r of e)
|
|
16293
16293
|
if (t = Zl(r, t), !t) throw new Error("No room left to insert tapleaf in tree");
|
|
@@ -16307,21 +16307,21 @@ function Zl(e, t, r = 0) {
|
|
|
16307
16307
|
const s = Zl(e, t && t[1], r + 1);
|
|
16308
16308
|
if (s) return [t && t[0], s];
|
|
16309
16309
|
}
|
|
16310
|
-
function
|
|
16310
|
+
function Mk(e, t, r) {
|
|
16311
16311
|
const n = Xa(e) && vi(t), s = vi(e) && Xa(t), i = e === t && Xa(t) && vi(t);
|
|
16312
16312
|
if (n || s || i)
|
|
16313
16313
|
throw new Error(
|
|
16314
16314
|
`Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
|
|
16315
16315
|
);
|
|
16316
16316
|
}
|
|
16317
|
-
function
|
|
16317
|
+
function Uk(e, t, r) {
|
|
16318
16318
|
const n = Ya(e) && vi(t), s = vi(e) && Ya(t), i = e === t && Ya(t) && vi(t);
|
|
16319
16319
|
if (n || s || i)
|
|
16320
16320
|
throw new Error(
|
|
16321
16321
|
`Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
|
|
16322
16322
|
);
|
|
16323
16323
|
}
|
|
16324
|
-
function
|
|
16324
|
+
function Fk(e, t, r) {
|
|
16325
16325
|
if (t.tapMerkleRoot) {
|
|
16326
16326
|
const n = (t.tapLeafScript || []).every(
|
|
16327
16327
|
(i) => Ju(i, t.tapMerkleRoot)
|
|
@@ -16350,14 +16350,14 @@ function Ju(e, t) {
|
|
|
16350
16350
|
r
|
|
16351
16351
|
).equals(t);
|
|
16352
16352
|
}
|
|
16353
|
-
function
|
|
16353
|
+
function jk(e, t) {
|
|
16354
16354
|
const r = (0, ss.tapleafHash)({
|
|
16355
16355
|
output: t.script,
|
|
16356
16356
|
version: t.leafVersion
|
|
16357
16357
|
});
|
|
16358
|
-
return (e.tapScriptSig || []).filter((n) => n.leafHash.equals(r)).map((n) =>
|
|
16358
|
+
return (e.tapScriptSig || []).filter((n) => n.leafHash.equals(r)).map((n) => Lk(t.script, n)).sort((n, s) => s.positionInScript - n.positionInScript).map((n) => n.signature);
|
|
16359
16359
|
}
|
|
16360
|
-
function
|
|
16360
|
+
function Lk(e, t) {
|
|
16361
16361
|
return Object.assign(
|
|
16362
16362
|
{
|
|
16363
16363
|
positionInScript: (0, nu.pubkeyPositionInScript)(
|
|
@@ -16368,13 +16368,13 @@ function jk(e, t) {
|
|
|
16368
16368
|
t
|
|
16369
16369
|
);
|
|
16370
16370
|
}
|
|
16371
|
-
function
|
|
16371
|
+
function Dk(e, t, r) {
|
|
16372
16372
|
if (!e.tapScriptSig || !e.tapScriptSig.length)
|
|
16373
16373
|
throw new Error(
|
|
16374
16374
|
`Can not finalize taproot input #${t}. No tapleaf script signature provided.`
|
|
16375
16375
|
);
|
|
16376
16376
|
const n = (e.tapLeafScript || []).sort((s, i) => s.controlBlock.length - i.controlBlock.length).find(
|
|
16377
|
-
(s) =>
|
|
16377
|
+
(s) => Hk(s, e.tapScriptSig, r)
|
|
16378
16378
|
);
|
|
16379
16379
|
if (!n)
|
|
16380
16380
|
throw new Error(
|
|
@@ -16382,7 +16382,7 @@ function Lk(e, t, r) {
|
|
|
16382
16382
|
);
|
|
16383
16383
|
return n;
|
|
16384
16384
|
}
|
|
16385
|
-
function
|
|
16385
|
+
function Hk(e, t, r) {
|
|
16386
16386
|
const n = (0, ss.tapleafHash)({
|
|
16387
16387
|
output: e.script,
|
|
16388
16388
|
version: e.leafVersion
|
|
@@ -16412,7 +16412,7 @@ class bo {
|
|
|
16412
16412
|
* Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
|
|
16413
16413
|
*/
|
|
16414
16414
|
constructor(t, r, n, s, i, o, a, c) {
|
|
16415
|
-
this.secretHash = n, this.redeemerPubkey = s, this.initiatorPubkey = i, this.expiry = o, this.signer = t, this.network = a, this.internalPubkey =
|
|
16415
|
+
this.secretHash = n, this.redeemerPubkey = s, this.initiatorPubkey = i, this.expiry = o, this.signer = t, this.network = a, this.internalPubkey = D_(), this.initiateAmount = r, this.utxoHashes = c;
|
|
16416
16416
|
}
|
|
16417
16417
|
/**
|
|
16418
16418
|
* Creates a GardenHTLC instance
|
|
@@ -16786,7 +16786,7 @@ class bo {
|
|
|
16786
16786
|
*/
|
|
16787
16787
|
leafHash(t) {
|
|
16788
16788
|
let r = this.redeemLeaf();
|
|
16789
|
-
return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), Se.crypto.taggedHash("TapLeaf",
|
|
16789
|
+
return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), Se.crypto.taggedHash("TapLeaf", P_(r));
|
|
16790
16790
|
}
|
|
16791
16791
|
refundLeaf() {
|
|
16792
16792
|
return Se.script.fromASM(
|
|
@@ -16857,7 +16857,7 @@ class bo {
|
|
|
16857
16857
|
);
|
|
16858
16858
|
switch (t) {
|
|
16859
16859
|
case 1: {
|
|
16860
|
-
const i =
|
|
16860
|
+
const i = B_(
|
|
16861
16861
|
s,
|
|
16862
16862
|
n
|
|
16863
16863
|
);
|
|
@@ -16883,7 +16883,7 @@ function Yi(e, t) {
|
|
|
16883
16883
|
r.push(e);
|
|
16884
16884
|
return r;
|
|
16885
16885
|
}
|
|
16886
|
-
class
|
|
16886
|
+
class zk {
|
|
16887
16887
|
constructor() {
|
|
16888
16888
|
this.cache = {};
|
|
16889
16889
|
}
|
|
@@ -16902,7 +16902,7 @@ class Hk {
|
|
|
16902
16902
|
delete this.cache[`${r}_${t.create_order.create_id}`];
|
|
16903
16903
|
}
|
|
16904
16904
|
}
|
|
16905
|
-
class
|
|
16905
|
+
class Vk {
|
|
16906
16906
|
constructor() {
|
|
16907
16907
|
this.cache = {};
|
|
16908
16908
|
}
|
|
@@ -16913,7 +16913,7 @@ class zk {
|
|
|
16913
16913
|
return this.cache[t] || null;
|
|
16914
16914
|
}
|
|
16915
16915
|
}
|
|
16916
|
-
class
|
|
16916
|
+
class qk {
|
|
16917
16917
|
constructor(t, r) {
|
|
16918
16918
|
this.url = new Ct(t).endpoint("blocknumbers").endpoint(r);
|
|
16919
16919
|
}
|
|
@@ -16926,7 +16926,7 @@ class Vk {
|
|
|
16926
16926
|
}
|
|
16927
16927
|
}
|
|
16928
16928
|
}
|
|
16929
|
-
class
|
|
16929
|
+
class Gk {
|
|
16930
16930
|
constructor(t) {
|
|
16931
16931
|
this.quoteUrl = new Ct(t);
|
|
16932
16932
|
}
|
|
@@ -17465,7 +17465,7 @@ const my = [
|
|
|
17465
17465
|
stateMutability: "view",
|
|
17466
17466
|
type: "function"
|
|
17467
17467
|
}
|
|
17468
|
-
],
|
|
17468
|
+
], Wk = {
|
|
17469
17469
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
17470
17470
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
17471
17471
|
l2CrossDomainMessenger: {
|
|
@@ -17476,7 +17476,7 @@ const my = [
|
|
|
17476
17476
|
l2ToL1MessagePasser: {
|
|
17477
17477
|
address: "0x4200000000000000000000000000000000000016"
|
|
17478
17478
|
}
|
|
17479
|
-
},
|
|
17479
|
+
}, Kk = {
|
|
17480
17480
|
block: /* @__PURE__ */ c6({
|
|
17481
17481
|
format(e) {
|
|
17482
17482
|
var r;
|
|
@@ -17508,14 +17508,14 @@ const my = [
|
|
|
17508
17508
|
}
|
|
17509
17509
|
})
|
|
17510
17510
|
};
|
|
17511
|
-
function
|
|
17512
|
-
return
|
|
17511
|
+
function Xk(e, t) {
|
|
17512
|
+
return Jk(e) ? Zk(e) : yS(e, t);
|
|
17513
17513
|
}
|
|
17514
|
-
const
|
|
17515
|
-
transaction:
|
|
17514
|
+
const Yk = {
|
|
17515
|
+
transaction: Xk
|
|
17516
17516
|
};
|
|
17517
|
-
function
|
|
17518
|
-
|
|
17517
|
+
function Zk(e) {
|
|
17518
|
+
Qk(e);
|
|
17519
17519
|
const { sourceHash: t, data: r, from: n, gas: s, isSystemTx: i, mint: o, to: a, value: c } = e, f = [
|
|
17520
17520
|
t,
|
|
17521
17521
|
n,
|
|
@@ -17531,10 +17531,10 @@ function Yk(e) {
|
|
|
17531
17531
|
ns(f)
|
|
17532
17532
|
]);
|
|
17533
17533
|
}
|
|
17534
|
-
function
|
|
17534
|
+
function Jk(e) {
|
|
17535
17535
|
return e.type === "deposit" || typeof e.sourceHash < "u";
|
|
17536
17536
|
}
|
|
17537
|
-
function
|
|
17537
|
+
function Qk(e) {
|
|
17538
17538
|
const { from: t, to: r } = e;
|
|
17539
17539
|
if (t && !st(t))
|
|
17540
17540
|
throw new Ot({ address: t });
|
|
@@ -17543,10 +17543,10 @@ function Jk(e) {
|
|
|
17543
17543
|
}
|
|
17544
17544
|
const Oi = {
|
|
17545
17545
|
blockTime: 2e3,
|
|
17546
|
-
contracts:
|
|
17547
|
-
formatters:
|
|
17548
|
-
serializers:
|
|
17549
|
-
},
|
|
17546
|
+
contracts: Wk,
|
|
17547
|
+
formatters: Kk,
|
|
17548
|
+
serializers: Yk
|
|
17549
|
+
}, eI = /* @__PURE__ */ gt({
|
|
17550
17550
|
id: 42161,
|
|
17551
17551
|
name: "Arbitrum One",
|
|
17552
17552
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -17569,7 +17569,7 @@ const Oi = {
|
|
|
17569
17569
|
blockCreated: 7654707
|
|
17570
17570
|
}
|
|
17571
17571
|
}
|
|
17572
|
-
}),
|
|
17572
|
+
}), tI = /* @__PURE__ */ gt({
|
|
17573
17573
|
id: 421614,
|
|
17574
17574
|
name: "Arbitrum Sepolia",
|
|
17575
17575
|
blockTime: 250,
|
|
@@ -17701,7 +17701,7 @@ const Ji = 11155111, lw = /* @__PURE__ */ gt({
|
|
|
17701
17701
|
({
|
|
17702
17702
|
...lw
|
|
17703
17703
|
});
|
|
17704
|
-
const
|
|
17704
|
+
const rI = /* @__PURE__ */ gt({
|
|
17705
17705
|
id: 80094,
|
|
17706
17706
|
name: "Berachain",
|
|
17707
17707
|
nativeCurrency: {
|
|
@@ -17734,7 +17734,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17734
17734
|
},
|
|
17735
17735
|
ensTlds: [".bera"],
|
|
17736
17736
|
testnet: !1
|
|
17737
|
-
}),
|
|
17737
|
+
}), nI = /* @__PURE__ */ gt({
|
|
17738
17738
|
id: 80084,
|
|
17739
17739
|
name: "Berachain bArtio",
|
|
17740
17740
|
nativeCurrency: {
|
|
@@ -17767,7 +17767,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17767
17767
|
}
|
|
17768
17768
|
},
|
|
17769
17769
|
testnet: !0
|
|
17770
|
-
}),
|
|
17770
|
+
}), sI = /* @__PURE__ */ gt({
|
|
17771
17771
|
id: 56,
|
|
17772
17772
|
name: "BNB Smart Chain",
|
|
17773
17773
|
nativeCurrency: {
|
|
@@ -17791,7 +17791,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17791
17791
|
blockCreated: 15921452
|
|
17792
17792
|
}
|
|
17793
17793
|
}
|
|
17794
|
-
}),
|
|
17794
|
+
}), iI = /* @__PURE__ */ gt({
|
|
17795
17795
|
id: 97,
|
|
17796
17796
|
name: "BNB Smart Chain Testnet",
|
|
17797
17797
|
nativeCurrency: {
|
|
@@ -17816,7 +17816,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17816
17816
|
}
|
|
17817
17817
|
},
|
|
17818
17818
|
testnet: !0
|
|
17819
|
-
}),
|
|
17819
|
+
}), oI = /* @__PURE__ */ gt({
|
|
17820
17820
|
id: 5115,
|
|
17821
17821
|
name: "Citrea Testnet",
|
|
17822
17822
|
nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
|
|
@@ -17833,7 +17833,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17833
17833
|
}
|
|
17834
17834
|
},
|
|
17835
17835
|
testnet: !0
|
|
17836
|
-
}),
|
|
17836
|
+
}), aI = 1, cI = /* @__PURE__ */ gt({
|
|
17837
17837
|
id: 21e6,
|
|
17838
17838
|
name: "Corn",
|
|
17839
17839
|
nativeCurrency: {
|
|
@@ -17857,8 +17857,8 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17857
17857
|
blockCreated: 3228
|
|
17858
17858
|
}
|
|
17859
17859
|
},
|
|
17860
|
-
sourceId:
|
|
17861
|
-
}),
|
|
17860
|
+
sourceId: aI
|
|
17861
|
+
}), uI = /* @__PURE__ */ gt({
|
|
17862
17862
|
id: 1,
|
|
17863
17863
|
name: "Ethereum",
|
|
17864
17864
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -17887,7 +17887,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17887
17887
|
blockCreated: 14353601
|
|
17888
17888
|
}
|
|
17889
17889
|
}
|
|
17890
|
-
}),
|
|
17890
|
+
}), fI = /* @__PURE__ */ gt({
|
|
17891
17891
|
id: 10143,
|
|
17892
17892
|
name: "Monad Testnet",
|
|
17893
17893
|
nativeCurrency: {
|
|
@@ -17913,7 +17913,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17913
17913
|
}
|
|
17914
17914
|
},
|
|
17915
17915
|
testnet: !0
|
|
17916
|
-
}),
|
|
17916
|
+
}), lI = /* @__PURE__ */ gt({
|
|
17917
17917
|
id: 11155111,
|
|
17918
17918
|
name: "Sepolia",
|
|
17919
17919
|
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -17941,7 +17941,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17941
17941
|
}
|
|
17942
17942
|
},
|
|
17943
17943
|
testnet: !0
|
|
17944
|
-
}), Ma = 1,
|
|
17944
|
+
}), Ma = 1, dI = /* @__PURE__ */ gt({
|
|
17945
17945
|
...Oi,
|
|
17946
17946
|
id: 130,
|
|
17947
17947
|
name: "Unichain",
|
|
@@ -17981,14 +17981,14 @@ const tI = /* @__PURE__ */ gt({
|
|
|
17981
17981
|
}
|
|
17982
17982
|
},
|
|
17983
17983
|
sourceId: Ma
|
|
17984
|
-
}),
|
|
17985
|
-
...
|
|
17984
|
+
}), hI = {
|
|
17985
|
+
...lI,
|
|
17986
17986
|
rpcUrls: {
|
|
17987
17987
|
default: {
|
|
17988
17988
|
http: ["https://ethereum-sepolia-rpc.publicnode.com"]
|
|
17989
17989
|
}
|
|
17990
17990
|
}
|
|
17991
|
-
},
|
|
17991
|
+
}, pI = {
|
|
17992
17992
|
id: 3637,
|
|
17993
17993
|
name: "Botanix",
|
|
17994
17994
|
nativeCurrency: {
|
|
@@ -18007,7 +18007,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
18007
18007
|
http: ["https://rpc.botanixlabs.com/"]
|
|
18008
18008
|
}
|
|
18009
18009
|
}
|
|
18010
|
-
},
|
|
18010
|
+
}, yI = {
|
|
18011
18011
|
id: 998,
|
|
18012
18012
|
name: "Hyperliquid EVM Testnet",
|
|
18013
18013
|
nativeCurrency: {
|
|
@@ -18026,7 +18026,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
18026
18026
|
http: ["https://rpc.hyperliquid-testnet.xyz/evm"]
|
|
18027
18027
|
}
|
|
18028
18028
|
}
|
|
18029
|
-
},
|
|
18029
|
+
}, mI = {
|
|
18030
18030
|
id: 999,
|
|
18031
18031
|
name: "HyperEVM",
|
|
18032
18032
|
nativeCurrency: {
|
|
@@ -18046,26 +18046,26 @@ const tI = /* @__PURE__ */ gt({
|
|
|
18046
18046
|
}
|
|
18047
18047
|
}
|
|
18048
18048
|
}, dw = {
|
|
18049
|
-
ethereum:
|
|
18050
|
-
arbitrum:
|
|
18051
|
-
ethereum_sepolia:
|
|
18052
|
-
arbitrum_sepolia:
|
|
18049
|
+
ethereum: uI,
|
|
18050
|
+
arbitrum: eI,
|
|
18051
|
+
ethereum_sepolia: hI,
|
|
18052
|
+
arbitrum_sepolia: tI,
|
|
18053
18053
|
ethereum_localnet: r2,
|
|
18054
18054
|
arbitrum_localnet: t2,
|
|
18055
18055
|
base_sepolia: lw,
|
|
18056
18056
|
base: fw,
|
|
18057
|
-
bera_testnet:
|
|
18058
|
-
citrea_testnet:
|
|
18059
|
-
bera:
|
|
18060
|
-
monad_testnet:
|
|
18061
|
-
hyperliquid_testnet:
|
|
18062
|
-
hyperliquid:
|
|
18063
|
-
unichain:
|
|
18064
|
-
corn:
|
|
18065
|
-
botanix:
|
|
18066
|
-
bnbchain:
|
|
18067
|
-
bnbchain_testnet:
|
|
18068
|
-
},
|
|
18057
|
+
bera_testnet: nI,
|
|
18058
|
+
citrea_testnet: oI,
|
|
18059
|
+
bera: rI,
|
|
18060
|
+
monad_testnet: fI,
|
|
18061
|
+
hyperliquid_testnet: yI,
|
|
18062
|
+
hyperliquid: mI,
|
|
18063
|
+
unichain: dI,
|
|
18064
|
+
corn: cI,
|
|
18065
|
+
botanix: pI,
|
|
18066
|
+
bnbchain: sI,
|
|
18067
|
+
bnbchain_testnet: iI
|
|
18068
|
+
}, gI = async (e, t) => {
|
|
18069
18069
|
var s, i, o;
|
|
18070
18070
|
const r = dw[e], n = await t.getChainId();
|
|
18071
18071
|
if (r)
|
|
@@ -18083,7 +18083,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
18083
18083
|
walletClient: a
|
|
18084
18084
|
});
|
|
18085
18085
|
} catch (a) {
|
|
18086
|
-
if (
|
|
18086
|
+
if (bI(a))
|
|
18087
18087
|
if (a.code === 4902 || a.code === -32603)
|
|
18088
18088
|
try {
|
|
18089
18089
|
await t.addChain({ chain: r });
|
|
@@ -18116,7 +18116,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
18116
18116
|
}
|
|
18117
18117
|
else
|
|
18118
18118
|
return F("Chain not supported");
|
|
18119
|
-
},
|
|
18119
|
+
}, bI = (e) => typeof e == "object" && e != null && ("code" in e || "message" in e || "body" in e), wI = [
|
|
18120
18120
|
{
|
|
18121
18121
|
inputs: [
|
|
18122
18122
|
{
|
|
@@ -18513,7 +18513,7 @@ const tI = /* @__PURE__ */ gt({
|
|
|
18513
18513
|
type: "function"
|
|
18514
18514
|
}
|
|
18515
18515
|
];
|
|
18516
|
-
class
|
|
18516
|
+
class vI {
|
|
18517
18517
|
constructor(t, r, n) {
|
|
18518
18518
|
this.url = new Ct("/relayer", t), this.auth = n, this.wallet = r;
|
|
18519
18519
|
}
|
|
@@ -18527,7 +18527,7 @@ class wI {
|
|
|
18527
18527
|
return F("Account address and order initiator mismatch");
|
|
18528
18528
|
if (!n2(t.source_swap.chain))
|
|
18529
18529
|
return F("Source chain is not an EVM chain");
|
|
18530
|
-
const r = await
|
|
18530
|
+
const r = await gI(
|
|
18531
18531
|
t.source_swap.chain,
|
|
18532
18532
|
this.wallet
|
|
18533
18533
|
);
|
|
@@ -18570,7 +18570,7 @@ class wI {
|
|
|
18570
18570
|
try {
|
|
18571
18571
|
const a = await Pu({
|
|
18572
18572
|
address: Mt(i),
|
|
18573
|
-
abi:
|
|
18573
|
+
abi: wI,
|
|
18574
18574
|
client: this.wallet
|
|
18575
18575
|
}).write.initiate(
|
|
18576
18576
|
[s, r, n, t],
|
|
@@ -19805,7 +19805,7 @@ const hw = [
|
|
|
19805
19805
|
}
|
|
19806
19806
|
]
|
|
19807
19807
|
}
|
|
19808
|
-
],
|
|
19808
|
+
], EI = async (e, t, r, n, s) => {
|
|
19809
19809
|
try {
|
|
19810
19810
|
const i = await Za(
|
|
19811
19811
|
e.address,
|
|
@@ -19878,7 +19878,7 @@ const hw = [
|
|
|
19878
19878
|
`Failed to check allowance: ${s instanceof Error ? s.message : String(s)}`
|
|
19879
19879
|
);
|
|
19880
19880
|
}
|
|
19881
|
-
},
|
|
19881
|
+
}, AI = async (e, t, r, n, s) => {
|
|
19882
19882
|
const i = await Za(
|
|
19883
19883
|
e,
|
|
19884
19884
|
t,
|
|
@@ -20139,7 +20139,7 @@ const hw = [
|
|
|
20139
20139
|
}
|
|
20140
20140
|
]
|
|
20141
20141
|
}
|
|
20142
|
-
],
|
|
20142
|
+
], SI = {
|
|
20143
20143
|
StarknetDomain: [
|
|
20144
20144
|
{ name: "name", type: "shortstring" },
|
|
20145
20145
|
{ name: "version", type: "shortstring" },
|
|
@@ -20153,7 +20153,7 @@ const hw = [
|
|
|
20153
20153
|
{ name: "secretHash", type: "u128*" }
|
|
20154
20154
|
]
|
|
20155
20155
|
};
|
|
20156
|
-
class
|
|
20156
|
+
class xI {
|
|
20157
20157
|
constructor(t, r, n, s) {
|
|
20158
20158
|
this.url = t instanceof Ct ? t : new Ct(t), this.account = r, this.starknetProvider = new Hm({
|
|
20159
20159
|
nodeUrl: s || fc[n].nodeUrl
|
|
@@ -20173,7 +20173,7 @@ class SI {
|
|
|
20173
20173
|
pw,
|
|
20174
20174
|
t.source_swap.asset,
|
|
20175
20175
|
this.account
|
|
20176
|
-
), i = await (s == null ? void 0 : s.token()), o = zm.toHex(i), a = await
|
|
20176
|
+
), i = await (s == null ? void 0 : s.token()), o = zm.toHex(i), a = await AI(
|
|
20177
20177
|
this.account.address,
|
|
20178
20178
|
o,
|
|
20179
20179
|
n.asset,
|
|
@@ -20226,7 +20226,7 @@ class SI {
|
|
|
20226
20226
|
revision: h2.ACTIVE
|
|
20227
20227
|
},
|
|
20228
20228
|
primaryType: "Initiate",
|
|
20229
|
-
types:
|
|
20229
|
+
types: SI,
|
|
20230
20230
|
message: {
|
|
20231
20231
|
redeemer: s,
|
|
20232
20232
|
amount: fo.uint256(i),
|
|
@@ -20235,7 +20235,7 @@ class SI {
|
|
|
20235
20235
|
}
|
|
20236
20236
|
};
|
|
20237
20237
|
try {
|
|
20238
|
-
const f = await this.account.signMessage(c), u =
|
|
20238
|
+
const f = await this.account.signMessage(c), u = N_(f);
|
|
20239
20239
|
if (u.error)
|
|
20240
20240
|
return F(u.error);
|
|
20241
20241
|
const l = await Ke.post(
|
|
@@ -20284,13 +20284,13 @@ class SI {
|
|
|
20284
20284
|
return F("Refund is taken care of by the relayer");
|
|
20285
20285
|
}
|
|
20286
20286
|
}
|
|
20287
|
-
const
|
|
20287
|
+
const _I = (e) => e.map((t) => t), TI = (e) => {
|
|
20288
20288
|
if (e === ur.Testnet)
|
|
20289
|
-
return TI;
|
|
20290
|
-
if (e === ur.Mainnet)
|
|
20291
20289
|
return kI;
|
|
20290
|
+
if (e === ur.Mainnet)
|
|
20291
|
+
return II;
|
|
20292
20292
|
throw new Error("Invalid network");
|
|
20293
|
-
},
|
|
20293
|
+
}, kI = ["https://mempool.space/testnet4/api"], II = [
|
|
20294
20294
|
"https://mempool.space/api",
|
|
20295
20295
|
"https://blockstream.info/api"
|
|
20296
20296
|
], hs = {
|
|
@@ -20308,9 +20308,9 @@ const xI = (e) => e.map((t) => t), _I = (e) => {
|
|
|
20308
20308
|
INVALID_PUBKEY: "invalid public key",
|
|
20309
20309
|
ORDER_NOT_EXPIRED: "you cannot refund before your transaction expires"
|
|
20310
20310
|
}, gy = (e) => e.sort((t, r) => t.status.confirmed != r.status.confirmed ? t.status.confirmed ? -1 : 1 : r.value - t.value);
|
|
20311
|
-
class
|
|
20311
|
+
class PI {
|
|
20312
20312
|
constructor(t, r) {
|
|
20313
|
-
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ?
|
|
20313
|
+
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? _I([r]) : TI(t), this.network = t;
|
|
20314
20314
|
}
|
|
20315
20315
|
/**
|
|
20316
20316
|
* Gets the output index of the UTXO
|
|
@@ -20518,7 +20518,7 @@ class II {
|
|
|
20518
20518
|
*/
|
|
20519
20519
|
async suggestFee(t, r, n) {
|
|
20520
20520
|
const i = (await this.getUTXOs(t, r)).length, o = 2, a = await this.getFeeRates();
|
|
20521
|
-
return Math.floor(a[
|
|
20521
|
+
return Math.floor(a[I_[n]] * 1.05) * (i * 70 + o * 31 + 10);
|
|
20522
20522
|
}
|
|
20523
20523
|
/**
|
|
20524
20524
|
* Returns the timestamps when a list of unconfirmed transactions was initially observed in the mempool.
|
|
@@ -20579,7 +20579,7 @@ class Ps {
|
|
|
20579
20579
|
return new Ps(s, i);
|
|
20580
20580
|
}
|
|
20581
20581
|
}
|
|
20582
|
-
const
|
|
20582
|
+
const OI = (e, t, r = !1) => {
|
|
20583
20583
|
const n = (o) => {
|
|
20584
20584
|
try {
|
|
20585
20585
|
o = uo.fromBech32(o).data.toString("hex");
|
|
@@ -20626,7 +20626,7 @@ const PI = (e, t, r = !1) => {
|
|
|
20626
20626
|
P2TR: "p2tr"
|
|
20627
20627
|
};
|
|
20628
20628
|
var yw = /* @__PURE__ */ ((e) => (e[e.Bitcoin = 0] = "Bitcoin", e[e.EVM = 1] = "EVM", e))(yw || {});
|
|
20629
|
-
class
|
|
20629
|
+
class BI {
|
|
20630
20630
|
addSignatureSegwitV0(t = Ja.ALL) {
|
|
20631
20631
|
return new Ps("segwitV0", t);
|
|
20632
20632
|
}
|
|
@@ -20720,11 +20720,11 @@ class OI {
|
|
|
20720
20720
|
async newSwap(t) {
|
|
20721
20721
|
if (t.secretHash = Kr(t.secretHash), t.secretHash.length !== 64)
|
|
20722
20722
|
throw new Error(oo.INVALID_SECRET_HASH);
|
|
20723
|
-
const { script: r, address: n } =
|
|
20723
|
+
const { script: r, address: n } = OI(
|
|
20724
20724
|
t,
|
|
20725
20725
|
await this.getNetwork()
|
|
20726
20726
|
);
|
|
20727
|
-
return new
|
|
20727
|
+
return new CI(this, {
|
|
20728
20728
|
...t,
|
|
20729
20729
|
redeemScript: r,
|
|
20730
20730
|
scriptAddress: n
|
|
@@ -20752,7 +20752,7 @@ class OI {
|
|
|
20752
20752
|
throw new Error("Unsupported script type");
|
|
20753
20753
|
}
|
|
20754
20754
|
}
|
|
20755
|
-
class
|
|
20755
|
+
class CI {
|
|
20756
20756
|
/**
|
|
20757
20757
|
* @constructor
|
|
20758
20758
|
* @param {IBitcoinWallet} wallet
|
|
@@ -20867,20 +20867,20 @@ function ef(e) {
|
|
|
20867
20867
|
return wu.regtest;
|
|
20868
20868
|
throw new Error("Invalid network");
|
|
20869
20869
|
}
|
|
20870
|
-
function
|
|
20870
|
+
function RI(e, t, r) {
|
|
20871
20871
|
if (!y2(e))
|
|
20872
20872
|
throw new Error("Invalid mnemonic");
|
|
20873
20873
|
const n = (r == null ? void 0 : r.path) ?? mw.bip44(t, (r == null ? void 0 : r.index) ?? 0), s = g2(ar).fromSeed(m2(e));
|
|
20874
|
-
return
|
|
20874
|
+
return $I(s, n);
|
|
20875
20875
|
}
|
|
20876
|
-
const
|
|
20876
|
+
const $I = (e, t) => {
|
|
20877
20877
|
const r = e.derivePath(t).privateKey;
|
|
20878
20878
|
if (!r)
|
|
20879
20879
|
throw new Error("Unable to derive private key from mnemonic");
|
|
20880
20880
|
return r.toString("hex");
|
|
20881
20881
|
};
|
|
20882
20882
|
l2(ar);
|
|
20883
|
-
class pi extends
|
|
20883
|
+
class pi extends BI {
|
|
20884
20884
|
/**
|
|
20885
20885
|
* @constructor
|
|
20886
20886
|
* @param {BitcoinWalletOpts} opts
|
|
@@ -20902,7 +20902,7 @@ class pi extends OI {
|
|
|
20902
20902
|
* else use multi-key wallet's `fromMnemonic`
|
|
20903
20903
|
*/
|
|
20904
20904
|
static fromMnemonic(t, r, n) {
|
|
20905
|
-
const s = mw.bip84(r.getNetwork(), n == null ? void 0 : n.index), i =
|
|
20905
|
+
const s = mw.bip84(r.getNetwork(), n == null ? void 0 : n.index), i = RI(t, r.getNetwork(), {
|
|
20906
20906
|
path: s
|
|
20907
20907
|
});
|
|
20908
20908
|
return new pi({
|
|
@@ -21166,12 +21166,12 @@ class pi extends OI {
|
|
|
21166
21166
|
return this.signer.signSchnorr(t);
|
|
21167
21167
|
}
|
|
21168
21168
|
}
|
|
21169
|
-
const
|
|
21169
|
+
const NI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", MI = {
|
|
21170
21170
|
name: "solana_spl_swaps",
|
|
21171
21171
|
version: "0.4.0",
|
|
21172
21172
|
spec: "0.1.0",
|
|
21173
21173
|
description: "Created with Anchor"
|
|
21174
|
-
},
|
|
21174
|
+
}, UI = [
|
|
21175
21175
|
{
|
|
21176
21176
|
name: "initiate",
|
|
21177
21177
|
docs: [
|
|
@@ -21500,7 +21500,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21500
21500
|
],
|
|
21501
21501
|
args: []
|
|
21502
21502
|
}
|
|
21503
|
-
],
|
|
21503
|
+
], FI = [
|
|
21504
21504
|
{
|
|
21505
21505
|
name: "SwapAccount",
|
|
21506
21506
|
discriminator: [
|
|
@@ -21514,7 +21514,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21514
21514
|
182
|
|
21515
21515
|
]
|
|
21516
21516
|
}
|
|
21517
|
-
],
|
|
21517
|
+
], jI = [
|
|
21518
21518
|
{
|
|
21519
21519
|
name: "Initiated",
|
|
21520
21520
|
discriminator: [
|
|
@@ -21567,7 +21567,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21567
21567
|
99
|
|
21568
21568
|
]
|
|
21569
21569
|
}
|
|
21570
|
-
],
|
|
21570
|
+
], LI = [
|
|
21571
21571
|
{
|
|
21572
21572
|
code: 6e3,
|
|
21573
21573
|
name: "InvalidRedeemer",
|
|
@@ -21588,7 +21588,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21588
21588
|
name: "RefundBeforeExpiry",
|
|
21589
21589
|
msg: "Attempt to perform a refund before expiry time"
|
|
21590
21590
|
}
|
|
21591
|
-
],
|
|
21591
|
+
], DI = [
|
|
21592
21592
|
{
|
|
21593
21593
|
name: "Initiated",
|
|
21594
21594
|
docs: [
|
|
@@ -21789,19 +21789,19 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21789
21789
|
}
|
|
21790
21790
|
}
|
|
21791
21791
|
], wy = {
|
|
21792
|
-
address:
|
|
21793
|
-
metadata:
|
|
21794
|
-
instructions:
|
|
21795
|
-
accounts:
|
|
21796
|
-
events:
|
|
21797
|
-
errors:
|
|
21798
|
-
types:
|
|
21799
|
-
},
|
|
21792
|
+
address: NI,
|
|
21793
|
+
metadata: MI,
|
|
21794
|
+
instructions: UI,
|
|
21795
|
+
accounts: FI,
|
|
21796
|
+
events: jI,
|
|
21797
|
+
errors: LI,
|
|
21798
|
+
types: DI
|
|
21799
|
+
}, HI = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", zI = {
|
|
21800
21800
|
name: "solana_native_swaps",
|
|
21801
21801
|
version: "0.3.0",
|
|
21802
21802
|
spec: "0.1.0",
|
|
21803
21803
|
description: "Created with Anchor"
|
|
21804
|
-
},
|
|
21804
|
+
}, VI = [
|
|
21805
21805
|
{
|
|
21806
21806
|
name: "initiate",
|
|
21807
21807
|
discriminator: [
|
|
@@ -21981,7 +21981,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21981
21981
|
],
|
|
21982
21982
|
args: []
|
|
21983
21983
|
}
|
|
21984
|
-
],
|
|
21984
|
+
], qI = [
|
|
21985
21985
|
{
|
|
21986
21986
|
name: "SwapAccount",
|
|
21987
21987
|
discriminator: [
|
|
@@ -21995,7 +21995,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
21995
21995
|
182
|
|
21996
21996
|
]
|
|
21997
21997
|
}
|
|
21998
|
-
],
|
|
21998
|
+
], GI = [
|
|
21999
21999
|
{
|
|
22000
22000
|
name: "Initiated",
|
|
22001
22001
|
discriminator: [
|
|
@@ -22048,7 +22048,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
22048
22048
|
99
|
|
22049
22049
|
]
|
|
22050
22050
|
}
|
|
22051
|
-
],
|
|
22051
|
+
], WI = [
|
|
22052
22052
|
{
|
|
22053
22053
|
code: 6e3,
|
|
22054
22054
|
name: "InvalidInitiator",
|
|
@@ -22069,7 +22069,7 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
22069
22069
|
name: "RefundBeforeExpiry",
|
|
22070
22070
|
msg: "Attempt to perform a refund before expiry time"
|
|
22071
22071
|
}
|
|
22072
|
-
],
|
|
22072
|
+
], KI = [
|
|
22073
22073
|
{
|
|
22074
22074
|
name: "Initiated",
|
|
22075
22075
|
type: {
|
|
@@ -22200,23 +22200,23 @@ const $I = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", NI = {
|
|
|
22200
22200
|
}
|
|
22201
22201
|
}
|
|
22202
22202
|
], Jl = {
|
|
22203
|
-
address:
|
|
22204
|
-
metadata:
|
|
22205
|
-
instructions:
|
|
22206
|
-
accounts:
|
|
22207
|
-
events:
|
|
22208
|
-
errors:
|
|
22209
|
-
types:
|
|
22203
|
+
address: HI,
|
|
22204
|
+
metadata: zI,
|
|
22205
|
+
instructions: VI,
|
|
22206
|
+
accounts: qI,
|
|
22207
|
+
events: GI,
|
|
22208
|
+
errors: WI,
|
|
22209
|
+
types: KI
|
|
22210
22210
|
};
|
|
22211
22211
|
var wn = {}, su = {};
|
|
22212
22212
|
Object.defineProperty(su, "__esModule", { value: !0 });
|
|
22213
|
-
su.encode =
|
|
22214
|
-
su.decode =
|
|
22213
|
+
su.encode = XI;
|
|
22214
|
+
su.decode = YI;
|
|
22215
22215
|
const vy = Xs;
|
|
22216
|
-
function
|
|
22216
|
+
function XI(e) {
|
|
22217
22217
|
return e.reduce((t, r) => t + r.toString(16).padStart(2, "0"), "0x");
|
|
22218
22218
|
}
|
|
22219
|
-
function
|
|
22219
|
+
function YI(e) {
|
|
22220
22220
|
e.indexOf("0x") === 0 && (e = e.substr(2)), e.length % 2 === 1 && (e = "0" + e);
|
|
22221
22221
|
let t = e.match(/.{2}/g);
|
|
22222
22222
|
return t === null ? vy.Buffer.from([]) : vy.Buffer.from(t.map((r) => parseInt(r, 16)));
|
|
@@ -22224,13 +22224,13 @@ function XI(e) {
|
|
|
22224
22224
|
var iu = {}, Ds = {}, tf;
|
|
22225
22225
|
Object.defineProperty(Ds, "__esModule", { value: !0 });
|
|
22226
22226
|
Ds.isVersionedTransaction = Ds.isBrowser = void 0;
|
|
22227
|
-
Ds.chunks =
|
|
22227
|
+
Ds.chunks = ZI;
|
|
22228
22228
|
Ds.isBrowser = process.env.ANCHOR_BROWSER || typeof window < "u" && !(!((tf = window.process) === null || tf === void 0) && tf.hasOwnProperty("type"));
|
|
22229
|
-
function
|
|
22229
|
+
function ZI(e, t) {
|
|
22230
22230
|
return Array.apply(0, new Array(Math.ceil(e.length / t))).map((r, n) => e.slice(n * t, (n + 1) * t));
|
|
22231
22231
|
}
|
|
22232
|
-
const
|
|
22233
|
-
Ds.isVersionedTransaction =
|
|
22232
|
+
const JI = (e) => "version" in e;
|
|
22233
|
+
Ds.isVersionedTransaction = JI;
|
|
22234
22234
|
var rf = {}, nf = {}, sf, Ey;
|
|
22235
22235
|
function gw() {
|
|
22236
22236
|
return Ey || (Ey = 1, sf = function() {
|
|
@@ -22275,19 +22275,19 @@ function bw() {
|
|
|
22275
22275
|
return Sy || (Sy = 1, af = Object), af;
|
|
22276
22276
|
}
|
|
22277
22277
|
var cf, xy;
|
|
22278
|
-
function
|
|
22278
|
+
function QI() {
|
|
22279
22279
|
return xy || (xy = 1, cf = Error), cf;
|
|
22280
22280
|
}
|
|
22281
22281
|
var uf, _y;
|
|
22282
|
-
function
|
|
22282
|
+
function eP() {
|
|
22283
22283
|
return _y || (_y = 1, uf = EvalError), uf;
|
|
22284
22284
|
}
|
|
22285
22285
|
var ff, Ty;
|
|
22286
|
-
function
|
|
22286
|
+
function tP() {
|
|
22287
22287
|
return Ty || (Ty = 1, ff = RangeError), ff;
|
|
22288
22288
|
}
|
|
22289
22289
|
var lf, ky;
|
|
22290
|
-
function
|
|
22290
|
+
function rP() {
|
|
22291
22291
|
return ky || (ky = 1, lf = ReferenceError), lf;
|
|
22292
22292
|
}
|
|
22293
22293
|
var df, Iy;
|
|
@@ -22299,57 +22299,57 @@ function ha() {
|
|
|
22299
22299
|
return Py || (Py = 1, hf = TypeError), hf;
|
|
22300
22300
|
}
|
|
22301
22301
|
var pf, Oy;
|
|
22302
|
-
function
|
|
22302
|
+
function nP() {
|
|
22303
22303
|
return Oy || (Oy = 1, pf = URIError), pf;
|
|
22304
22304
|
}
|
|
22305
22305
|
var yf, By;
|
|
22306
|
-
function
|
|
22306
|
+
function sP() {
|
|
22307
22307
|
return By || (By = 1, yf = Math.abs), yf;
|
|
22308
22308
|
}
|
|
22309
22309
|
var mf, Cy;
|
|
22310
|
-
function
|
|
22310
|
+
function iP() {
|
|
22311
22311
|
return Cy || (Cy = 1, mf = Math.floor), mf;
|
|
22312
22312
|
}
|
|
22313
22313
|
var gf, Ry;
|
|
22314
|
-
function
|
|
22314
|
+
function oP() {
|
|
22315
22315
|
return Ry || (Ry = 1, gf = Math.max), gf;
|
|
22316
22316
|
}
|
|
22317
22317
|
var bf, $y;
|
|
22318
|
-
function
|
|
22318
|
+
function aP() {
|
|
22319
22319
|
return $y || ($y = 1, bf = Math.min), bf;
|
|
22320
22320
|
}
|
|
22321
22321
|
var wf, Ny;
|
|
22322
|
-
function
|
|
22322
|
+
function cP() {
|
|
22323
22323
|
return Ny || (Ny = 1, wf = Math.pow), wf;
|
|
22324
22324
|
}
|
|
22325
22325
|
var vf, My;
|
|
22326
|
-
function
|
|
22326
|
+
function uP() {
|
|
22327
22327
|
return My || (My = 1, vf = Math.round), vf;
|
|
22328
22328
|
}
|
|
22329
22329
|
var Ef, Uy;
|
|
22330
|
-
function
|
|
22330
|
+
function fP() {
|
|
22331
22331
|
return Uy || (Uy = 1, Ef = Number.isNaN || function(t) {
|
|
22332
22332
|
return t !== t;
|
|
22333
22333
|
}), Ef;
|
|
22334
22334
|
}
|
|
22335
22335
|
var Af, Fy;
|
|
22336
|
-
function
|
|
22336
|
+
function lP() {
|
|
22337
22337
|
if (Fy) return Af;
|
|
22338
22338
|
Fy = 1;
|
|
22339
|
-
var e =
|
|
22339
|
+
var e = fP();
|
|
22340
22340
|
return Af = function(r) {
|
|
22341
22341
|
return e(r) || r === 0 ? r : r < 0 ? -1 : 1;
|
|
22342
22342
|
}, Af;
|
|
22343
22343
|
}
|
|
22344
22344
|
var Sf, jy;
|
|
22345
|
-
function
|
|
22345
|
+
function dP() {
|
|
22346
22346
|
return jy || (jy = 1, Sf = Object.getOwnPropertyDescriptor), Sf;
|
|
22347
22347
|
}
|
|
22348
22348
|
var xf, Ly;
|
|
22349
22349
|
function Li() {
|
|
22350
22350
|
if (Ly) return xf;
|
|
22351
22351
|
Ly = 1;
|
|
22352
|
-
var e =
|
|
22352
|
+
var e = dP();
|
|
22353
22353
|
if (e)
|
|
22354
22354
|
try {
|
|
22355
22355
|
e([], "length");
|
|
@@ -22372,7 +22372,7 @@ function au() {
|
|
|
22372
22372
|
return _f = e, _f;
|
|
22373
22373
|
}
|
|
22374
22374
|
var Tf, Hy;
|
|
22375
|
-
function
|
|
22375
|
+
function hP() {
|
|
22376
22376
|
if (Hy) return Tf;
|
|
22377
22377
|
Hy = 1;
|
|
22378
22378
|
var e = typeof Symbol < "u" && Symbol, t = gw();
|
|
@@ -22392,7 +22392,7 @@ function Ew() {
|
|
|
22392
22392
|
return If = e.getPrototypeOf || null, If;
|
|
22393
22393
|
}
|
|
22394
22394
|
var Pf, qy;
|
|
22395
|
-
function
|
|
22395
|
+
function pP() {
|
|
22396
22396
|
if (qy) return Pf;
|
|
22397
22397
|
qy = 1;
|
|
22398
22398
|
var e = "Function.prototype.bind called on incompatible ", t = Object.prototype.toString, r = Math.max, n = "[object Function]", s = function(c, f) {
|
|
@@ -22440,7 +22440,7 @@ var Of, Gy;
|
|
|
22440
22440
|
function pa() {
|
|
22441
22441
|
if (Gy) return Of;
|
|
22442
22442
|
Gy = 1;
|
|
22443
|
-
var e =
|
|
22443
|
+
var e = pP();
|
|
22444
22444
|
return Of = Function.prototype.bind || e, Of;
|
|
22445
22445
|
}
|
|
22446
22446
|
var Bf, Wy;
|
|
@@ -22452,14 +22452,14 @@ function vh() {
|
|
|
22452
22452
|
return Ky || (Ky = 1, Cf = Function.prototype.apply), Cf;
|
|
22453
22453
|
}
|
|
22454
22454
|
var Rf, Xy;
|
|
22455
|
-
function
|
|
22455
|
+
function yP() {
|
|
22456
22456
|
return Xy || (Xy = 1, Rf = typeof Reflect < "u" && Reflect && Reflect.apply), Rf;
|
|
22457
22457
|
}
|
|
22458
22458
|
var $f, Yy;
|
|
22459
22459
|
function Aw() {
|
|
22460
22460
|
if (Yy) return $f;
|
|
22461
22461
|
Yy = 1;
|
|
22462
|
-
var e = pa(), t = vh(), r = wh(), n =
|
|
22462
|
+
var e = pa(), t = vh(), r = wh(), n = yP();
|
|
22463
22463
|
return $f = n || e.call(r, t), $f;
|
|
22464
22464
|
}
|
|
22465
22465
|
var Nf, Zy;
|
|
@@ -22474,7 +22474,7 @@ function Eh() {
|
|
|
22474
22474
|
}, Nf;
|
|
22475
22475
|
}
|
|
22476
22476
|
var Mf, Jy;
|
|
22477
|
-
function
|
|
22477
|
+
function mP() {
|
|
22478
22478
|
if (Jy) return Mf;
|
|
22479
22479
|
Jy = 1;
|
|
22480
22480
|
var e = Eh(), t = Li(), r;
|
|
@@ -22501,7 +22501,7 @@ var Uf, Qy;
|
|
|
22501
22501
|
function Ah() {
|
|
22502
22502
|
if (Qy) return Uf;
|
|
22503
22503
|
Qy = 1;
|
|
22504
|
-
var e = vw(), t = Ew(), r =
|
|
22504
|
+
var e = vw(), t = Ew(), r = mP();
|
|
22505
22505
|
return Uf = e ? function(s) {
|
|
22506
22506
|
return e(s);
|
|
22507
22507
|
} : t ? function(s) {
|
|
@@ -22523,7 +22523,7 @@ var jf, tm;
|
|
|
22523
22523
|
function xw() {
|
|
22524
22524
|
if (tm) return jf;
|
|
22525
22525
|
tm = 1;
|
|
22526
|
-
var e, t = bw(), r =
|
|
22526
|
+
var e, t = bw(), r = QI(), n = eP(), s = tP(), i = rP(), o = ww(), a = ha(), c = nP(), f = sP(), u = iP(), l = oP(), p = aP(), d = cP(), m = uP(), g = lP(), w = Function, E = function(oe) {
|
|
22527
22527
|
try {
|
|
22528
22528
|
return w('"use strict"; return (' + oe + ").constructor;")();
|
|
22529
22529
|
} catch {
|
|
@@ -22540,7 +22540,7 @@ function xw() {
|
|
|
22540
22540
|
return S;
|
|
22541
22541
|
}
|
|
22542
22542
|
}
|
|
22543
|
-
}() : S, I =
|
|
22543
|
+
}() : S, I = hP()(), R = Ah(), j = Ew(), _ = vw(), U = vh(), C = wh(), N = {}, H = typeof Uint8Array > "u" || !R ? e : R(Uint8Array), W = {
|
|
22544
22544
|
__proto__: null,
|
|
22545
22545
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
22546
22546
|
"%Array%": Array,
|
|
@@ -22773,7 +22773,7 @@ function ya() {
|
|
|
22773
22773
|
}, Lf;
|
|
22774
22774
|
}
|
|
22775
22775
|
var Df, nm;
|
|
22776
|
-
function
|
|
22776
|
+
function gP() {
|
|
22777
22777
|
if (nm) return Df;
|
|
22778
22778
|
nm = 1;
|
|
22779
22779
|
var e = ou()(), t = ya(), r = t("Object.prototype.toString"), n = function(a) {
|
|
@@ -22786,7 +22786,7 @@ function mP() {
|
|
|
22786
22786
|
return n.isLegacyArguments = s, Df = i ? n : s, Df;
|
|
22787
22787
|
}
|
|
22788
22788
|
var Hf, sm;
|
|
22789
|
-
function
|
|
22789
|
+
function bP() {
|
|
22790
22790
|
if (sm) return Hf;
|
|
22791
22791
|
sm = 1;
|
|
22792
22792
|
var e = ya(), t = ou()(), r = Sw(), n = Li(), s;
|
|
@@ -22830,10 +22830,10 @@ function gP() {
|
|
|
22830
22830
|
return Hf = s, Hf;
|
|
22831
22831
|
}
|
|
22832
22832
|
var zf, im;
|
|
22833
|
-
function
|
|
22833
|
+
function wP() {
|
|
22834
22834
|
if (im) return zf;
|
|
22835
22835
|
im = 1;
|
|
22836
|
-
var e = ya(), t =
|
|
22836
|
+
var e = ya(), t = bP(), r = e("RegExp.prototype.exec"), n = ha();
|
|
22837
22837
|
return zf = function(i) {
|
|
22838
22838
|
if (!t(i))
|
|
22839
22839
|
throw new n("`regex` must be a RegExp");
|
|
@@ -22843,10 +22843,10 @@ function bP() {
|
|
|
22843
22843
|
}, zf;
|
|
22844
22844
|
}
|
|
22845
22845
|
var Vf, om;
|
|
22846
|
-
function
|
|
22846
|
+
function vP() {
|
|
22847
22847
|
if (om) return Vf;
|
|
22848
22848
|
om = 1;
|
|
22849
|
-
var e = ya(), t =
|
|
22849
|
+
var e = ya(), t = wP(), r = t(/^\s*(?:function)?\*/), n = ou()(), s = Ah(), i = e("Object.prototype.toString"), o = e("Function.prototype.toString"), a = function() {
|
|
22850
22850
|
if (!n)
|
|
22851
22851
|
return !1;
|
|
22852
22852
|
try {
|
|
@@ -22876,7 +22876,7 @@ function wP() {
|
|
|
22876
22876
|
}, Vf;
|
|
22877
22877
|
}
|
|
22878
22878
|
var qf, am;
|
|
22879
|
-
function
|
|
22879
|
+
function EP() {
|
|
22880
22880
|
if (am) return qf;
|
|
22881
22881
|
am = 1;
|
|
22882
22882
|
var e = Function.prototype.toString, t = typeof Reflect == "object" && Reflect !== null && Reflect.apply, r, n;
|
|
@@ -22948,10 +22948,10 @@ function vP() {
|
|
|
22948
22948
|
}, qf;
|
|
22949
22949
|
}
|
|
22950
22950
|
var Gf, cm;
|
|
22951
|
-
function
|
|
22951
|
+
function AP() {
|
|
22952
22952
|
if (cm) return Gf;
|
|
22953
22953
|
cm = 1;
|
|
22954
|
-
var e =
|
|
22954
|
+
var e = EP(), t = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, f, u) {
|
|
22955
22955
|
for (var l = 0, p = c.length; l < p; l++)
|
|
22956
22956
|
r.call(c, l) && (u == null ? f(c[l], l, c) : f.call(u, c[l], l, c));
|
|
22957
22957
|
}, s = function(c, f, u) {
|
|
@@ -22972,7 +22972,7 @@ function EP() {
|
|
|
22972
22972
|
}, Gf;
|
|
22973
22973
|
}
|
|
22974
22974
|
var Wf, um;
|
|
22975
|
-
function
|
|
22975
|
+
function SP() {
|
|
22976
22976
|
return um || (um = 1, Wf = [
|
|
22977
22977
|
"Float16Array",
|
|
22978
22978
|
"Float32Array",
|
|
@@ -22989,10 +22989,10 @@ function AP() {
|
|
|
22989
22989
|
]), Wf;
|
|
22990
22990
|
}
|
|
22991
22991
|
var Kf, fm;
|
|
22992
|
-
function
|
|
22992
|
+
function xP() {
|
|
22993
22993
|
if (fm) return Kf;
|
|
22994
22994
|
fm = 1;
|
|
22995
|
-
var e =
|
|
22995
|
+
var e = SP(), t = typeof globalThis > "u" ? en : globalThis;
|
|
22996
22996
|
return Kf = function() {
|
|
22997
22997
|
for (var n = [], s = 0; s < e.length; s++)
|
|
22998
22998
|
typeof t[e[s]] == "function" && (n[n.length] = e[s]);
|
|
@@ -23000,7 +23000,7 @@ function SP() {
|
|
|
23000
23000
|
}, Kf;
|
|
23001
23001
|
}
|
|
23002
23002
|
var Xf = { exports: {} }, Yf, lm;
|
|
23003
|
-
function
|
|
23003
|
+
function _P() {
|
|
23004
23004
|
if (lm) return Yf;
|
|
23005
23005
|
lm = 1;
|
|
23006
23006
|
var e = au(), t = ww(), r = ha(), n = Li();
|
|
@@ -23032,7 +23032,7 @@ function xP() {
|
|
|
23032
23032
|
}, Yf;
|
|
23033
23033
|
}
|
|
23034
23034
|
var Zf, dm;
|
|
23035
|
-
function
|
|
23035
|
+
function TP() {
|
|
23036
23036
|
if (dm) return Zf;
|
|
23037
23037
|
dm = 1;
|
|
23038
23038
|
var e = au(), t = function() {
|
|
@@ -23049,10 +23049,10 @@ function _P() {
|
|
|
23049
23049
|
}, Zf = t, Zf;
|
|
23050
23050
|
}
|
|
23051
23051
|
var Jf, hm;
|
|
23052
|
-
function
|
|
23052
|
+
function kP() {
|
|
23053
23053
|
if (hm) return Jf;
|
|
23054
23054
|
hm = 1;
|
|
23055
|
-
var e = xw(), t =
|
|
23055
|
+
var e = xw(), t = _P(), r = TP()(), n = Li(), s = ha(), i = e("%Math.floor%");
|
|
23056
23056
|
return Jf = function(a, c) {
|
|
23057
23057
|
if (typeof a != "function")
|
|
23058
23058
|
throw new s("`fn` is not a function");
|
|
@@ -23079,7 +23079,7 @@ function TP() {
|
|
|
23079
23079
|
}, Jf;
|
|
23080
23080
|
}
|
|
23081
23081
|
var Qf, pm;
|
|
23082
|
-
function
|
|
23082
|
+
function IP() {
|
|
23083
23083
|
if (pm) return Qf;
|
|
23084
23084
|
pm = 1;
|
|
23085
23085
|
var e = pa(), t = vh(), r = Aw();
|
|
@@ -23088,9 +23088,9 @@ function kP() {
|
|
|
23088
23088
|
}, Qf;
|
|
23089
23089
|
}
|
|
23090
23090
|
var ym;
|
|
23091
|
-
function
|
|
23091
|
+
function PP() {
|
|
23092
23092
|
return ym || (ym = 1, function(e) {
|
|
23093
|
-
var t =
|
|
23093
|
+
var t = kP(), r = au(), n = Eh(), s = IP();
|
|
23094
23094
|
e.exports = function(o) {
|
|
23095
23095
|
var a = n(arguments), c = o.length - (arguments.length - 1);
|
|
23096
23096
|
return t(
|
|
@@ -23105,7 +23105,7 @@ var el, mm;
|
|
|
23105
23105
|
function _w() {
|
|
23106
23106
|
if (mm) return el;
|
|
23107
23107
|
mm = 1;
|
|
23108
|
-
var e =
|
|
23108
|
+
var e = AP(), t = xP(), r = PP(), n = ya(), s = Li(), i = Ah(), o = n("Object.prototype.toString"), a = ou()(), c = typeof globalThis > "u" ? en : globalThis, f = t(), u = n("String.prototype.slice"), l = n("Array.prototype.indexOf", !0) || function(w, E) {
|
|
23109
23109
|
for (var T = 0; T < w.length; T += 1)
|
|
23110
23110
|
if (w[T] === E)
|
|
23111
23111
|
return T;
|
|
@@ -23172,7 +23172,7 @@ function _w() {
|
|
|
23172
23172
|
}, el;
|
|
23173
23173
|
}
|
|
23174
23174
|
var tl, gm;
|
|
23175
|
-
function
|
|
23175
|
+
function OP() {
|
|
23176
23176
|
if (gm) return tl;
|
|
23177
23177
|
gm = 1;
|
|
23178
23178
|
var e = _w();
|
|
@@ -23181,9 +23181,9 @@ function PP() {
|
|
|
23181
23181
|
}, tl;
|
|
23182
23182
|
}
|
|
23183
23183
|
var bm;
|
|
23184
|
-
function
|
|
23184
|
+
function BP() {
|
|
23185
23185
|
return bm || (bm = 1, function(e) {
|
|
23186
|
-
var t =
|
|
23186
|
+
var t = gP(), r = vP(), n = _w(), s = OP();
|
|
23187
23187
|
function i(G) {
|
|
23188
23188
|
return G.call.bind(G);
|
|
23189
23189
|
}
|
|
@@ -23368,13 +23368,13 @@ function OP() {
|
|
|
23368
23368
|
}(nf)), nf;
|
|
23369
23369
|
}
|
|
23370
23370
|
var rl, wm;
|
|
23371
|
-
function
|
|
23371
|
+
function CP() {
|
|
23372
23372
|
return wm || (wm = 1, rl = function(t) {
|
|
23373
23373
|
return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function";
|
|
23374
23374
|
}), rl;
|
|
23375
23375
|
}
|
|
23376
23376
|
var Ua = { exports: {} }, vm;
|
|
23377
|
-
function
|
|
23377
|
+
function RP() {
|
|
23378
23378
|
return vm || (vm = 1, typeof Object.create == "function" ? Ua.exports = function(t, r) {
|
|
23379
23379
|
r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
|
|
23380
23380
|
constructor: {
|
|
@@ -23614,7 +23614,7 @@ function Tw() {
|
|
|
23614
23614
|
`) + " " + P.join(`,
|
|
23615
23615
|
`) + " " + L[1] : L[0] + $ + " " + P.join(", ") + " " + L[1];
|
|
23616
23616
|
}
|
|
23617
|
-
e.types =
|
|
23617
|
+
e.types = BP();
|
|
23618
23618
|
function w(P) {
|
|
23619
23619
|
return Array.isArray(P);
|
|
23620
23620
|
}
|
|
@@ -23671,7 +23671,7 @@ function Tw() {
|
|
|
23671
23671
|
return P === null || typeof P == "boolean" || typeof P == "number" || typeof P == "string" || typeof P == "symbol" || // ES6 symbol
|
|
23672
23672
|
typeof P > "u";
|
|
23673
23673
|
}
|
|
23674
|
-
e.isPrimitive = H, e.isBuffer =
|
|
23674
|
+
e.isPrimitive = H, e.isBuffer = CP();
|
|
23675
23675
|
function W(P) {
|
|
23676
23676
|
return Object.prototype.toString.call(P);
|
|
23677
23677
|
}
|
|
@@ -23702,7 +23702,7 @@ function Tw() {
|
|
|
23702
23702
|
}
|
|
23703
23703
|
e.log = function() {
|
|
23704
23704
|
console.log("%s - %s", re(), e.format.apply(e, arguments));
|
|
23705
|
-
}, e.inherits =
|
|
23705
|
+
}, e.inherits = RP(), e._extend = function(P, $) {
|
|
23706
23706
|
if (!$ || !_($)) return P;
|
|
23707
23707
|
for (var L = Object.keys($), J = L.length; J--; )
|
|
23708
23708
|
P[L[J]] = $[L[J]];
|
|
@@ -23788,13 +23788,13 @@ function Tw() {
|
|
|
23788
23788
|
}(rf)), rf;
|
|
23789
23789
|
}
|
|
23790
23790
|
Object.defineProperty(iu, "__esModule", { value: !0 });
|
|
23791
|
-
iu.decode =
|
|
23792
|
-
iu.encode =
|
|
23791
|
+
iu.decode = $P;
|
|
23792
|
+
iu.encode = NP;
|
|
23793
23793
|
const kw = Ds;
|
|
23794
|
-
function
|
|
23794
|
+
function $P(e) {
|
|
23795
23795
|
return (kw.isBrowser ? new TextDecoder("utf-8") : new (Tw()).TextDecoder("utf-8")).decode(e);
|
|
23796
23796
|
}
|
|
23797
|
-
function
|
|
23797
|
+
function NP(e) {
|
|
23798
23798
|
return (kw.isBrowser ? new TextEncoder() : new (Tw()).TextEncoder("utf-8")).encode(e);
|
|
23799
23799
|
}
|
|
23800
23800
|
var cu = {}, Ql = { exports: {} };
|
|
@@ -23828,8 +23828,8 @@ var cu = {}, Ql = { exports: {} };
|
|
|
23828
23828
|
return r.SlowBuffer(o);
|
|
23829
23829
|
};
|
|
23830
23830
|
})(Ql, Ql.exports);
|
|
23831
|
-
var
|
|
23832
|
-
function
|
|
23831
|
+
var MP = Ql.exports, Fa = MP.Buffer;
|
|
23832
|
+
function UP(e) {
|
|
23833
23833
|
if (e.length >= 255)
|
|
23834
23834
|
throw new TypeError("Alphabet too long");
|
|
23835
23835
|
for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
|
|
@@ -23901,31 +23901,31 @@ function MP(e) {
|
|
|
23901
23901
|
decode: p
|
|
23902
23902
|
};
|
|
23903
23903
|
}
|
|
23904
|
-
var
|
|
23904
|
+
var FP = UP, jP = FP, LP = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", DP = jP(LP), HP = en && en.__importDefault || function(e) {
|
|
23905
23905
|
return e && e.__esModule ? e : { default: e };
|
|
23906
23906
|
};
|
|
23907
23907
|
Object.defineProperty(cu, "__esModule", { value: !0 });
|
|
23908
|
-
cu.encode =
|
|
23909
|
-
cu.decode =
|
|
23910
|
-
const Iw = DP
|
|
23911
|
-
function
|
|
23908
|
+
cu.encode = zP;
|
|
23909
|
+
cu.decode = VP;
|
|
23910
|
+
const Iw = HP(DP);
|
|
23911
|
+
function zP(e) {
|
|
23912
23912
|
return Iw.default.encode(e);
|
|
23913
23913
|
}
|
|
23914
|
-
function
|
|
23914
|
+
function VP(e) {
|
|
23915
23915
|
return Iw.default.decode(e);
|
|
23916
23916
|
}
|
|
23917
23917
|
var uu = {};
|
|
23918
23918
|
Object.defineProperty(uu, "__esModule", { value: !0 });
|
|
23919
|
-
uu.encode =
|
|
23920
|
-
uu.decode =
|
|
23921
|
-
const
|
|
23922
|
-
function
|
|
23919
|
+
uu.encode = GP;
|
|
23920
|
+
uu.decode = WP;
|
|
23921
|
+
const qP = Xs;
|
|
23922
|
+
function GP(e) {
|
|
23923
23923
|
return e.toString("base64");
|
|
23924
23924
|
}
|
|
23925
|
-
function
|
|
23926
|
-
return
|
|
23925
|
+
function WP(e) {
|
|
23926
|
+
return qP.Buffer.from(e, "base64");
|
|
23927
23927
|
}
|
|
23928
|
-
var
|
|
23928
|
+
var KP = en && en.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
23929
23929
|
n === void 0 && (n = r);
|
|
23930
23930
|
var s = Object.getOwnPropertyDescriptor(t, r);
|
|
23931
23931
|
(!s || ("get" in s ? !t.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: function() {
|
|
@@ -23933,15 +23933,15 @@ var WP = en && en.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
|
23933
23933
|
} }), Object.defineProperty(e, n, s);
|
|
23934
23934
|
} : function(e, t, r, n) {
|
|
23935
23935
|
n === void 0 && (n = r), e[n] = t[r];
|
|
23936
|
-
}),
|
|
23936
|
+
}), XP = en && en.__setModuleDefault || (Object.create ? function(e, t) {
|
|
23937
23937
|
Object.defineProperty(e, "default", { enumerable: !0, value: t });
|
|
23938
23938
|
} : function(e, t) {
|
|
23939
23939
|
e.default = t;
|
|
23940
23940
|
}), fu = en && en.__importStar || function(e) {
|
|
23941
23941
|
if (e && e.__esModule) return e;
|
|
23942
23942
|
var t = {};
|
|
23943
|
-
if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) &&
|
|
23944
|
-
return
|
|
23943
|
+
if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) && KP(t, e, r);
|
|
23944
|
+
return XP(t, e), t;
|
|
23945
23945
|
};
|
|
23946
23946
|
Object.defineProperty(wn, "__esModule", { value: !0 });
|
|
23947
23947
|
wn.base64 = wn.bs58 = wn.utf8 = Pw = wn.hex = void 0;
|
|
@@ -24015,7 +24015,7 @@ function Ow(e) {
|
|
|
24015
24015
|
);
|
|
24016
24016
|
return t;
|
|
24017
24017
|
}
|
|
24018
|
-
class
|
|
24018
|
+
class YP {
|
|
24019
24019
|
/**
|
|
24020
24020
|
* Creates a new instance of SolanaRelay.
|
|
24021
24021
|
* @param {AnchorProvider} provider - An abstraction of RPC connection and a Wallet
|
|
@@ -24281,7 +24281,7 @@ class XP {
|
|
|
24281
24281
|
return F("Refund is automatically handled by the relayer.");
|
|
24282
24282
|
}
|
|
24283
24283
|
}
|
|
24284
|
-
const Bw = "1.37.1",
|
|
24284
|
+
const Bw = "1.37.1", ZP = "1.54.0", JP = {
|
|
24285
24285
|
"-32700": "ParseError",
|
|
24286
24286
|
"-32701": "OversizedRequest",
|
|
24287
24287
|
"-32702": "OversizedResponse",
|
|
@@ -24303,17 +24303,17 @@ class Cw extends Error {
|
|
|
24303
24303
|
}
|
|
24304
24304
|
class Rw extends Cw {
|
|
24305
24305
|
constructor(t, r) {
|
|
24306
|
-
super(t), this.code = r, this.type =
|
|
24306
|
+
super(t), this.code = r, this.type = JP[r] ?? "ServerError";
|
|
24307
24307
|
}
|
|
24308
24308
|
}
|
|
24309
|
-
class
|
|
24309
|
+
class QP extends Cw {
|
|
24310
24310
|
constructor(t, r, n) {
|
|
24311
24311
|
super(t), this.status = r, this.statusText = n;
|
|
24312
24312
|
}
|
|
24313
24313
|
}
|
|
24314
24314
|
var $w = (e) => {
|
|
24315
24315
|
throw TypeError(e);
|
|
24316
|
-
}, Sh = (e, t, r) => t.has(e) || $w("Cannot " + r), $e = (e, t, r) => (Sh(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ls = (e, t, r) => t.has(e) ? $w("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Ei = (e, t, r, n) => (Sh(e, t, "write to private field"), t.set(e, r), r), Nw = (e, t, r) => (Sh(e, t, "access private method"), r),
|
|
24316
|
+
}, Sh = (e, t, r) => t.has(e) || $w("Cannot " + r), $e = (e, t, r) => (Sh(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ls = (e, t, r) => t.has(e) ? $w("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Ei = (e, t, r, n) => (Sh(e, t, "write to private field"), t.set(e, r), r), Nw = (e, t, r) => (Sh(e, t, "access private method"), r), e5 = (e, t, r, n) => ({
|
|
24317
24317
|
set _(s) {
|
|
24318
24318
|
Ei(e, t, s);
|
|
24319
24319
|
},
|
|
@@ -24321,22 +24321,22 @@ var $w = (e) => {
|
|
|
24321
24321
|
return $e(e, t, n);
|
|
24322
24322
|
}
|
|
24323
24323
|
}), Vn, vo, mn, ws, Xo, vs, yc, Mw, Uw;
|
|
24324
|
-
function
|
|
24324
|
+
function t5(e) {
|
|
24325
24325
|
const t = new URL(e);
|
|
24326
24326
|
return t.protocol = t.protocol.replace("http", "ws"), t.toString();
|
|
24327
24327
|
}
|
|
24328
|
-
const
|
|
24328
|
+
const r5 = {
|
|
24329
24329
|
// We fudge the typing because we also check for undefined in the constructor:
|
|
24330
24330
|
WebSocketConstructor: typeof WebSocket < "u" ? WebSocket : void 0,
|
|
24331
24331
|
callTimeout: 3e4,
|
|
24332
24332
|
reconnectTimeout: 3e3,
|
|
24333
24333
|
maxReconnects: 5
|
|
24334
24334
|
};
|
|
24335
|
-
class
|
|
24335
|
+
class n5 {
|
|
24336
24336
|
constructor(t, r = {}) {
|
|
24337
|
-
if (ls(this, yc), ls(this, Vn, 0), ls(this, vo, 0), ls(this, mn, null), ls(this, ws, null), ls(this, Xo, /* @__PURE__ */ new Set()), ls(this, vs, /* @__PURE__ */ new Map()), this.endpoint = t, this.options = { ...
|
|
24337
|
+
if (ls(this, yc), ls(this, Vn, 0), ls(this, vo, 0), ls(this, mn, null), ls(this, ws, null), ls(this, Xo, /* @__PURE__ */ new Set()), ls(this, vs, /* @__PURE__ */ new Map()), this.endpoint = t, this.options = { ...r5, ...r }, !this.options.WebSocketConstructor)
|
|
24338
24338
|
throw new Error("Missing WebSocket constructor");
|
|
24339
|
-
this.endpoint.startsWith("http") && (this.endpoint =
|
|
24339
|
+
this.endpoint.startsWith("http") && (this.endpoint = t5(this.endpoint));
|
|
24340
24340
|
}
|
|
24341
24341
|
async makeRequest(t, r, n) {
|
|
24342
24342
|
const s = await Nw(this, yc, Mw).call(this);
|
|
@@ -24357,7 +24357,7 @@ class r5 {
|
|
|
24357
24357
|
});
|
|
24358
24358
|
}
|
|
24359
24359
|
async subscribe(t) {
|
|
24360
|
-
const r = new
|
|
24360
|
+
const r = new s5(t);
|
|
24361
24361
|
return $e(this, Xo).add(r), await r.subscribe(this), () => r.unsubscribe(this);
|
|
24362
24362
|
}
|
|
24363
24363
|
}
|
|
@@ -24374,7 +24374,7 @@ Mw = function() {
|
|
|
24374
24374
|
(t = $e(this, mn)) == null || t.close(), Ei(this, mn, new this.options.WebSocketConstructor(this.endpoint)), $e(this, mn).addEventListener("open", () => {
|
|
24375
24375
|
Ei(this, vo, 0), e($e(this, mn));
|
|
24376
24376
|
}), $e(this, mn).addEventListener("close", () => {
|
|
24377
|
-
|
|
24377
|
+
e5(this, vo)._++, $e(this, vo) <= this.options.maxReconnects && setTimeout(() => {
|
|
24378
24378
|
Nw(this, yc, Uw).call(this);
|
|
24379
24379
|
}, this.options.reconnectTimeout);
|
|
24380
24380
|
}), $e(this, mn).addEventListener("message", ({ data: r }) => {
|
|
@@ -24403,7 +24403,7 @@ Uw = async function() {
|
|
|
24403
24403
|
[...$e(this, Xo)].map((t) => t.subscribe(this))
|
|
24404
24404
|
);
|
|
24405
24405
|
};
|
|
24406
|
-
class
|
|
24406
|
+
class s5 {
|
|
24407
24407
|
constructor(t) {
|
|
24408
24408
|
this.subscriptionId = null, this.subscribed = !1, this.input = t;
|
|
24409
24409
|
}
|
|
@@ -24426,8 +24426,8 @@ class n5 {
|
|
|
24426
24426
|
}
|
|
24427
24427
|
var Fw = (e) => {
|
|
24428
24428
|
throw TypeError(e);
|
|
24429
|
-
}, xh = (e, t, r) => t.has(e) || Fw("Cannot " + r), sr = (e, t, r) => (xh(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ja = (e, t, r) => t.has(e) ? Fw("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ed = (e, t, r, n) => (xh(e, t, "write to private field"), t.set(e, r), r),
|
|
24430
|
-
class
|
|
24429
|
+
}, xh = (e, t, r) => t.has(e) || Fw("Cannot " + r), sr = (e, t, r) => (xh(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ja = (e, t, r) => t.has(e) ? Fw("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ed = (e, t, r, n) => (xh(e, t, "write to private field"), t.set(e, r), r), i5 = (e, t, r) => (xh(e, t, "access private method"), r), ao, gr, Eo, td, jw;
|
|
24430
|
+
class o5 {
|
|
24431
24431
|
constructor(t) {
|
|
24432
24432
|
ja(this, td), ja(this, ao, 0), ja(this, gr), ja(this, Eo), ed(this, gr, t);
|
|
24433
24433
|
}
|
|
@@ -24449,7 +24449,7 @@ class i5 {
|
|
|
24449
24449
|
"Content-Type": "application/json",
|
|
24450
24450
|
"Client-Sdk-Type": "typescript",
|
|
24451
24451
|
"Client-Sdk-Version": Bw,
|
|
24452
|
-
"Client-Target-Api-Version":
|
|
24452
|
+
"Client-Target-Api-Version": ZP,
|
|
24453
24453
|
"Client-Request-Method": t.method,
|
|
24454
24454
|
...(i = sr(this, gr).rpc) == null ? void 0 : i.headers
|
|
24455
24455
|
},
|
|
@@ -24461,7 +24461,7 @@ class i5 {
|
|
|
24461
24461
|
})
|
|
24462
24462
|
});
|
|
24463
24463
|
if (!r.ok)
|
|
24464
|
-
throw new
|
|
24464
|
+
throw new QP(
|
|
24465
24465
|
`Unexpected status code: ${r.status}`,
|
|
24466
24466
|
r.status,
|
|
24467
24467
|
r.statusText
|
|
@@ -24472,7 +24472,7 @@ class i5 {
|
|
|
24472
24472
|
return n.result;
|
|
24473
24473
|
}
|
|
24474
24474
|
async subscribe(t) {
|
|
24475
|
-
const r = await
|
|
24475
|
+
const r = await i5(this, td, jw).call(this).subscribe(t);
|
|
24476
24476
|
return t.signal && (t.signal.throwIfAborted(), t.signal.addEventListener("abort", () => {
|
|
24477
24477
|
r();
|
|
24478
24478
|
})), async () => !!await r();
|
|
@@ -24490,7 +24490,7 @@ jw = function() {
|
|
|
24490
24490
|
throw new Error(
|
|
24491
24491
|
"The current environment does not support WebSocket, you can provide a WebSocketConstructor in the options for SuiHTTPTransport."
|
|
24492
24492
|
);
|
|
24493
|
-
ed(this, Eo, new
|
|
24493
|
+
ed(this, Eo, new n5(
|
|
24494
24494
|
((e = sr(this, gr).websocket) == null ? void 0 : e.url) ?? sr(this, gr).url,
|
|
24495
24495
|
{
|
|
24496
24496
|
WebSocketConstructor: t,
|
|
@@ -24500,7 +24500,7 @@ jw = function() {
|
|
|
24500
24500
|
}
|
|
24501
24501
|
return sr(this, Eo);
|
|
24502
24502
|
};
|
|
24503
|
-
function
|
|
24503
|
+
function a5(e) {
|
|
24504
24504
|
switch (e) {
|
|
24505
24505
|
case "mainnet":
|
|
24506
24506
|
return "https://fullnode.mainnet.sui.io:443";
|
|
@@ -24515,7 +24515,7 @@ function o5(e) {
|
|
|
24515
24515
|
}
|
|
24516
24516
|
}
|
|
24517
24517
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
24518
|
-
function
|
|
24518
|
+
function c5(e) {
|
|
24519
24519
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
24520
24520
|
}
|
|
24521
24521
|
function Lw(e, t) {
|
|
@@ -24538,17 +24538,17 @@ function Hw(e, t) {
|
|
|
24538
24538
|
if (!Lw(!0, t))
|
|
24539
24539
|
throw new Error(`${e}: array of strings expected`);
|
|
24540
24540
|
}
|
|
24541
|
-
function
|
|
24541
|
+
function u5(e, t) {
|
|
24542
24542
|
if (!Lw(!1, t))
|
|
24543
24543
|
throw new Error(`${e}: array of numbers expected`);
|
|
24544
24544
|
}
|
|
24545
24545
|
// @__NO_SIDE_EFFECTS__
|
|
24546
|
-
function
|
|
24546
|
+
function f5(...e) {
|
|
24547
24547
|
const t = (i) => i, r = (i, o) => (a) => i(o(a)), n = e.map((i) => i.encode).reduceRight(r, t), s = e.map((i) => i.decode).reduce(r, t);
|
|
24548
24548
|
return { encode: n, decode: s };
|
|
24549
24549
|
}
|
|
24550
24550
|
// @__NO_SIDE_EFFECTS__
|
|
24551
|
-
function
|
|
24551
|
+
function l5(e) {
|
|
24552
24552
|
const t = typeof e == "string" ? e.split("") : e, r = t.length;
|
|
24553
24553
|
Hw("alphabet", t);
|
|
24554
24554
|
const n = new Map(t.map((s, i) => [s, i]));
|
|
@@ -24568,7 +24568,7 @@ function f5(e) {
|
|
|
24568
24568
|
};
|
|
24569
24569
|
}
|
|
24570
24570
|
// @__NO_SIDE_EFFECTS__
|
|
24571
|
-
function
|
|
24571
|
+
function d5(e = "") {
|
|
24572
24572
|
return rd("join", e), {
|
|
24573
24573
|
encode: (t) => (Hw("join.decode", t), t.join(e)),
|
|
24574
24574
|
decode: (t) => (rd("join.decode", t), t.split(e))
|
|
@@ -24610,19 +24610,19 @@ function Am(e, t, r) {
|
|
|
24610
24610
|
return s.reverse();
|
|
24611
24611
|
}
|
|
24612
24612
|
// @__NO_SIDE_EFFECTS__
|
|
24613
|
-
function
|
|
24613
|
+
function h5(e) {
|
|
24614
24614
|
Dw(e);
|
|
24615
24615
|
const t = 2 ** 8;
|
|
24616
24616
|
return {
|
|
24617
24617
|
encode: (r) => {
|
|
24618
|
-
if (!
|
|
24618
|
+
if (!c5(r))
|
|
24619
24619
|
throw new Error("radix.encode input should be Uint8Array");
|
|
24620
24620
|
return Am(Array.from(r), t, e);
|
|
24621
24621
|
},
|
|
24622
|
-
decode: (r) => (
|
|
24622
|
+
decode: (r) => (u5("radix.decode", r), Uint8Array.from(Am(r, e, t)))
|
|
24623
24623
|
};
|
|
24624
24624
|
}
|
|
24625
|
-
const
|
|
24625
|
+
const p5 = /* @__NO_SIDE_EFFECTS__ */ (e) => /* @__PURE__ */ f5(/* @__PURE__ */ h5(58), /* @__PURE__ */ l5(e), /* @__PURE__ */ d5("")), zw = /* @__PURE__ */ p5("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), lu = (e) => zw.encode(e), Yo = (e) => zw.decode(e);
|
|
24626
24626
|
function qt(e) {
|
|
24627
24627
|
return Uint8Array.from(atob(e), (t) => t.charCodeAt(0));
|
|
24628
24628
|
}
|
|
@@ -24656,7 +24656,7 @@ class qw {
|
|
|
24656
24656
|
throw new TypeError(
|
|
24657
24657
|
`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: ${t}.`
|
|
24658
24658
|
);
|
|
24659
|
-
this._batchLoadFn = t, this._maxBatchSize =
|
|
24659
|
+
this._batchLoadFn = t, this._maxBatchSize = b5(r), this._batchScheduleFn = w5(r), this._cacheKeyFn = v5(r), this._cacheMap = E5(r), this._batch = null, this.name = A5(r);
|
|
24660
24660
|
}
|
|
24661
24661
|
/**
|
|
24662
24662
|
* Loads a key, returning a `Promise` for the value represented by that key.
|
|
@@ -24666,7 +24666,7 @@ class qw {
|
|
|
24666
24666
|
throw new TypeError(
|
|
24667
24667
|
`The loader.load() function must be called with a value, but got: ${String(t)}.`
|
|
24668
24668
|
);
|
|
24669
|
-
const r =
|
|
24669
|
+
const r = m5(this), n = this._cacheMap;
|
|
24670
24670
|
let s;
|
|
24671
24671
|
if (n) {
|
|
24672
24672
|
s = this._cacheKeyFn(t);
|
|
@@ -24756,7 +24756,7 @@ class qw {
|
|
|
24756
24756
|
return this;
|
|
24757
24757
|
}
|
|
24758
24758
|
}
|
|
24759
|
-
const
|
|
24759
|
+
const y5 = (
|
|
24760
24760
|
/** @ts-ignore */
|
|
24761
24761
|
typeof process == "object" && typeof process.nextTick == "function" ? function(e) {
|
|
24762
24762
|
sl || (sl = Promise.resolve()), sl.then(() => {
|
|
@@ -24772,16 +24772,16 @@ const p5 = (
|
|
|
24772
24772
|
)
|
|
24773
24773
|
);
|
|
24774
24774
|
let sl;
|
|
24775
|
-
function
|
|
24775
|
+
function m5(e) {
|
|
24776
24776
|
const t = e._batch;
|
|
24777
24777
|
if (t !== null && !t.hasDispatched && t.keys.length < e._maxBatchSize)
|
|
24778
24778
|
return t;
|
|
24779
24779
|
const r = { hasDispatched: !1, keys: [], callbacks: [] };
|
|
24780
24780
|
return e._batch = r, e._batchScheduleFn(() => {
|
|
24781
|
-
|
|
24781
|
+
g5(e, r);
|
|
24782
24782
|
}), r;
|
|
24783
24783
|
}
|
|
24784
|
-
function
|
|
24784
|
+
function g5(e, t) {
|
|
24785
24785
|
if (t.hasDispatched = !0, t.keys.length === 0) {
|
|
24786
24786
|
sd(t);
|
|
24787
24787
|
return;
|
|
@@ -24840,7 +24840,7 @@ function sd(e) {
|
|
|
24840
24840
|
for (let t = 0; t < e.cacheHits.length; t++)
|
|
24841
24841
|
e.cacheHits[t]();
|
|
24842
24842
|
}
|
|
24843
|
-
function
|
|
24843
|
+
function b5(e) {
|
|
24844
24844
|
if (!(!e || e.batch !== !1))
|
|
24845
24845
|
return 1;
|
|
24846
24846
|
const r = e && e.maxBatchSize;
|
|
@@ -24850,15 +24850,15 @@ function g5(e) {
|
|
|
24850
24850
|
throw new TypeError(`maxBatchSize must be a positive number: ${r}`);
|
|
24851
24851
|
return r;
|
|
24852
24852
|
}
|
|
24853
|
-
function
|
|
24853
|
+
function w5(e) {
|
|
24854
24854
|
const t = e && e.batchScheduleFn;
|
|
24855
24855
|
if (t === void 0)
|
|
24856
|
-
return
|
|
24856
|
+
return y5;
|
|
24857
24857
|
if (typeof t != "function")
|
|
24858
24858
|
throw new TypeError(`batchScheduleFn must be a function: ${t}`);
|
|
24859
24859
|
return t;
|
|
24860
24860
|
}
|
|
24861
|
-
function
|
|
24861
|
+
function v5(e) {
|
|
24862
24862
|
const t = e && e.cacheKeyFn;
|
|
24863
24863
|
if (t === void 0)
|
|
24864
24864
|
return (r) => r;
|
|
@@ -24866,7 +24866,7 @@ function w5(e) {
|
|
|
24866
24866
|
throw new TypeError(`cacheKeyFn must be a function: ${t}`);
|
|
24867
24867
|
return t;
|
|
24868
24868
|
}
|
|
24869
|
-
function
|
|
24869
|
+
function E5(e) {
|
|
24870
24870
|
if (!(!e || e.cache !== !1))
|
|
24871
24871
|
return null;
|
|
24872
24872
|
const r = e && e.cacheMap;
|
|
@@ -24881,7 +24881,7 @@ function v5(e) {
|
|
|
24881
24881
|
}
|
|
24882
24882
|
return r;
|
|
24883
24883
|
}
|
|
24884
|
-
function
|
|
24884
|
+
function A5(e) {
|
|
24885
24885
|
return e && e.name ? e.name : null;
|
|
24886
24886
|
}
|
|
24887
24887
|
function Gw(e) {
|
|
@@ -24896,7 +24896,7 @@ function mc(e) {
|
|
|
24896
24896
|
t[r] = e & 127, (e >>= 7) && (t[r] |= 128), r += 1;
|
|
24897
24897
|
return t;
|
|
24898
24898
|
}
|
|
24899
|
-
function
|
|
24899
|
+
function S5(e) {
|
|
24900
24900
|
let t = 0, r = 0, n = 0;
|
|
24901
24901
|
for (; ; ) {
|
|
24902
24902
|
const s = e[n];
|
|
@@ -24909,7 +24909,7 @@ function A5(e) {
|
|
|
24909
24909
|
length: n
|
|
24910
24910
|
};
|
|
24911
24911
|
}
|
|
24912
|
-
class
|
|
24912
|
+
class x5 {
|
|
24913
24913
|
/**
|
|
24914
24914
|
* @param {Uint8Array} data Data to use as a buffer.
|
|
24915
24915
|
*/
|
|
@@ -24986,7 +24986,7 @@ class S5 {
|
|
|
24986
24986
|
* @returns {Number} The ULEB value.
|
|
24987
24987
|
*/
|
|
24988
24988
|
readULEB() {
|
|
24989
|
-
const t = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, t), { value: n, length: s } =
|
|
24989
|
+
const t = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, t), { value: n, length: s } = S5(r);
|
|
24990
24990
|
return this.shift(s), n;
|
|
24991
24991
|
}
|
|
24992
24992
|
/**
|
|
@@ -25002,7 +25002,7 @@ class S5 {
|
|
|
25002
25002
|
return n;
|
|
25003
25003
|
}
|
|
25004
25004
|
}
|
|
25005
|
-
function
|
|
25005
|
+
function _5(e, t) {
|
|
25006
25006
|
switch (t) {
|
|
25007
25007
|
case "base58":
|
|
25008
25008
|
return lu(e);
|
|
@@ -25027,7 +25027,7 @@ function Ww(e, t = ["<", ">"]) {
|
|
|
25027
25027
|
}
|
|
25028
25028
|
return s.push(i.trim()), s;
|
|
25029
25029
|
}
|
|
25030
|
-
class
|
|
25030
|
+
class T5 {
|
|
25031
25031
|
constructor({
|
|
25032
25032
|
initialSize: t = 1024,
|
|
25033
25033
|
maxSize: r = 1 / 0,
|
|
@@ -25148,7 +25148,7 @@ class _5 {
|
|
|
25148
25148
|
* @param encoding Encoding to use: 'base64' or 'hex'
|
|
25149
25149
|
*/
|
|
25150
25150
|
toString(t) {
|
|
25151
|
-
return
|
|
25151
|
+
return _5(this.toBytes(), t);
|
|
25152
25152
|
}
|
|
25153
25153
|
}
|
|
25154
25154
|
function ol(e, t) {
|
|
@@ -25161,10 +25161,10 @@ function ol(e, t) {
|
|
|
25161
25161
|
var Kw = (e) => {
|
|
25162
25162
|
throw TypeError(e);
|
|
25163
25163
|
}, Xw = (e, t, r) => t.has(e) || Kw("Cannot " + r), br = (e, t, r) => (Xw(e, t, "read from private field"), r ? r.call(e) : t.get(e)), gc = (e, t, r) => t.has(e) ? Kw("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), bc = (e, t, r, n) => (Xw(e, t, "write to private field"), t.set(e, r), r), fi, co, Qa, qn;
|
|
25164
|
-
const
|
|
25164
|
+
const k5 = class Yw {
|
|
25165
25165
|
constructor(t) {
|
|
25166
25166
|
gc(this, fi), gc(this, co), this.name = t.name, this.read = t.read, this.serializedSize = t.serializedSize ?? (() => null), bc(this, fi, t.write), bc(this, co, t.serialize ?? ((r, n) => {
|
|
25167
|
-
const s = new
|
|
25167
|
+
const s = new T5({
|
|
25168
25168
|
initialSize: this.serializedSize(r) ?? void 0,
|
|
25169
25169
|
...n
|
|
25170
25170
|
});
|
|
@@ -25176,10 +25176,10 @@ const T5 = class Yw {
|
|
|
25176
25176
|
this.validate(t), br(this, fi).call(this, t, r);
|
|
25177
25177
|
}
|
|
25178
25178
|
serialize(t, r) {
|
|
25179
|
-
return this.validate(t), new
|
|
25179
|
+
return this.validate(t), new I5(this, br(this, co).call(this, t, r));
|
|
25180
25180
|
}
|
|
25181
25181
|
parse(t) {
|
|
25182
|
-
const r = new
|
|
25182
|
+
const r = new x5(t);
|
|
25183
25183
|
return this.read(r);
|
|
25184
25184
|
}
|
|
25185
25185
|
fromHex(t) {
|
|
@@ -25211,12 +25211,12 @@ const T5 = class Yw {
|
|
|
25211
25211
|
};
|
|
25212
25212
|
fi = /* @__PURE__ */ new WeakMap();
|
|
25213
25213
|
co = /* @__PURE__ */ new WeakMap();
|
|
25214
|
-
let tn =
|
|
25214
|
+
let tn = k5;
|
|
25215
25215
|
const Zw = Symbol.for("@mysten/serialized-bcs");
|
|
25216
25216
|
function _h(e) {
|
|
25217
25217
|
return !!e && typeof e == "object" && e[Zw] === !0;
|
|
25218
25218
|
}
|
|
25219
|
-
class
|
|
25219
|
+
class I5 {
|
|
25220
25220
|
constructor(t, r) {
|
|
25221
25221
|
gc(this, Qa), gc(this, qn), bc(this, Qa, t), bc(this, qn, r);
|
|
25222
25222
|
}
|
|
@@ -25291,7 +25291,7 @@ function cl({
|
|
|
25291
25291
|
}
|
|
25292
25292
|
});
|
|
25293
25293
|
}
|
|
25294
|
-
function
|
|
25294
|
+
function P5({
|
|
25295
25295
|
serialize: e,
|
|
25296
25296
|
...t
|
|
25297
25297
|
}) {
|
|
@@ -25305,7 +25305,7 @@ function I5({
|
|
|
25305
25305
|
});
|
|
25306
25306
|
return r;
|
|
25307
25307
|
}
|
|
25308
|
-
function
|
|
25308
|
+
function O5({
|
|
25309
25309
|
toBytes: e,
|
|
25310
25310
|
fromBytes: t,
|
|
25311
25311
|
...r
|
|
@@ -25334,7 +25334,7 @@ function P5({
|
|
|
25334
25334
|
}
|
|
25335
25335
|
});
|
|
25336
25336
|
}
|
|
25337
|
-
function
|
|
25337
|
+
function B5(e) {
|
|
25338
25338
|
let t = null;
|
|
25339
25339
|
function r() {
|
|
25340
25340
|
return t || (t = e()), t;
|
|
@@ -25347,7 +25347,7 @@ function O5(e) {
|
|
|
25347
25347
|
serialize: (n, s) => r().serialize(n, s).toBytes()
|
|
25348
25348
|
});
|
|
25349
25349
|
}
|
|
25350
|
-
class
|
|
25350
|
+
class C5 extends tn {
|
|
25351
25351
|
constructor({ name: t, fields: r, ...n }) {
|
|
25352
25352
|
const s = Object.entries(r);
|
|
25353
25353
|
super({
|
|
@@ -25381,7 +25381,7 @@ class B5 extends tn {
|
|
|
25381
25381
|
});
|
|
25382
25382
|
}
|
|
25383
25383
|
}
|
|
25384
|
-
class
|
|
25384
|
+
class R5 extends tn {
|
|
25385
25385
|
constructor({ fields: t, ...r }) {
|
|
25386
25386
|
const n = Object.entries(t);
|
|
25387
25387
|
super({
|
|
@@ -25426,7 +25426,7 @@ class C5 extends tn {
|
|
|
25426
25426
|
});
|
|
25427
25427
|
}
|
|
25428
25428
|
}
|
|
25429
|
-
class
|
|
25429
|
+
class $5 extends tn {
|
|
25430
25430
|
constructor({ fields: t, name: r, ...n }) {
|
|
25431
25431
|
super({
|
|
25432
25432
|
name: r ?? `(${t.map((s) => s.name).join(", ")})`,
|
|
@@ -25461,7 +25461,7 @@ class R5 extends tn {
|
|
|
25461
25461
|
});
|
|
25462
25462
|
}
|
|
25463
25463
|
}
|
|
25464
|
-
function
|
|
25464
|
+
function N5(e, t, r) {
|
|
25465
25465
|
return new tn({
|
|
25466
25466
|
read: (n) => {
|
|
25467
25467
|
const s = new Array(e);
|
|
@@ -25484,7 +25484,7 @@ function $5(e, t, r) {
|
|
|
25484
25484
|
}
|
|
25485
25485
|
});
|
|
25486
25486
|
}
|
|
25487
|
-
function
|
|
25487
|
+
function M5(e) {
|
|
25488
25488
|
return x.enum(`Option<${e.name}>`, {
|
|
25489
25489
|
None: null,
|
|
25490
25490
|
Some: e
|
|
@@ -25493,7 +25493,7 @@ function N5(e) {
|
|
|
25493
25493
|
output: (t) => t.$kind === "Some" ? t.Some : null
|
|
25494
25494
|
});
|
|
25495
25495
|
}
|
|
25496
|
-
function
|
|
25496
|
+
function U5(e, t) {
|
|
25497
25497
|
return new tn({
|
|
25498
25498
|
read: (r) => {
|
|
25499
25499
|
const n = r.readULEB(), s = new Array(n);
|
|
@@ -25515,7 +25515,7 @@ function M5(e, t) {
|
|
|
25515
25515
|
}
|
|
25516
25516
|
});
|
|
25517
25517
|
}
|
|
25518
|
-
function
|
|
25518
|
+
function F5(e, t) {
|
|
25519
25519
|
return x.vector(x.tuple([e, t])).transform({
|
|
25520
25520
|
name: `Map<${e.name}, ${t.name}>`,
|
|
25521
25521
|
input: (r) => [...r.entries()],
|
|
@@ -25643,7 +25643,7 @@ const x = {
|
|
|
25643
25643
|
*
|
|
25644
25644
|
*/
|
|
25645
25645
|
uleb128(e) {
|
|
25646
|
-
return
|
|
25646
|
+
return P5({
|
|
25647
25647
|
read: (t) => t.readULEB(),
|
|
25648
25648
|
serialize: (t) => Uint8Array.from(mc(t)),
|
|
25649
25649
|
...e,
|
|
@@ -25713,7 +25713,7 @@ const x = {
|
|
|
25713
25713
|
* bcs.string().serialize('a').toBytes() // Uint8Array [ 1, 97 ]
|
|
25714
25714
|
*/
|
|
25715
25715
|
string(e) {
|
|
25716
|
-
return
|
|
25716
|
+
return O5({
|
|
25717
25717
|
toBytes: (t) => new TextEncoder().encode(t),
|
|
25718
25718
|
fromBytes: (t) => new TextDecoder().decode(t),
|
|
25719
25719
|
...e,
|
|
@@ -25727,7 +25727,7 @@ const x = {
|
|
|
25727
25727
|
* @example
|
|
25728
25728
|
* bcs.fixedArray(3, bcs.u8()).serialize([1, 2, 3]).toBytes() // Uint8Array [ 1, 2, 3 ]
|
|
25729
25729
|
*/
|
|
25730
|
-
fixedArray:
|
|
25730
|
+
fixedArray: N5,
|
|
25731
25731
|
/**
|
|
25732
25732
|
* Creates a BcsType representing an optional value
|
|
25733
25733
|
* @param type The BcsType of the optional value
|
|
@@ -25735,7 +25735,7 @@ const x = {
|
|
|
25735
25735
|
* bcs.option(bcs.u8()).serialize(null).toBytes() // Uint8Array [ 0 ]
|
|
25736
25736
|
* bcs.option(bcs.u8()).serialize(1).toBytes() // Uint8Array [ 1, 1 ]
|
|
25737
25737
|
*/
|
|
25738
|
-
option:
|
|
25738
|
+
option: M5,
|
|
25739
25739
|
/**
|
|
25740
25740
|
* Creates a BcsType representing a variable length vector of a given type
|
|
25741
25741
|
* @param type The BcsType of each element in the vector
|
|
@@ -25743,7 +25743,7 @@ const x = {
|
|
|
25743
25743
|
* @example
|
|
25744
25744
|
* bcs.vector(bcs.u8()).toBytes([1, 2, 3]) // Uint8Array [ 3, 1, 2, 3 ]
|
|
25745
25745
|
*/
|
|
25746
|
-
vector:
|
|
25746
|
+
vector: U5,
|
|
25747
25747
|
/**
|
|
25748
25748
|
* Creates a BcsType representing a tuple of a given set of types
|
|
25749
25749
|
* @param types The BcsTypes for each element in the tuple
|
|
@@ -25753,7 +25753,7 @@ const x = {
|
|
|
25753
25753
|
* tuple.serialize([1, 'a', true]).toBytes() // Uint8Array [ 1, 1, 97, 1 ]
|
|
25754
25754
|
*/
|
|
25755
25755
|
tuple(e, t) {
|
|
25756
|
-
return new
|
|
25756
|
+
return new $5({
|
|
25757
25757
|
fields: e,
|
|
25758
25758
|
...t
|
|
25759
25759
|
});
|
|
@@ -25771,7 +25771,7 @@ const x = {
|
|
|
25771
25771
|
* struct.serialize({ a: 1, b: 'a' }).toBytes() // Uint8Array [ 1, 1, 97 ]
|
|
25772
25772
|
*/
|
|
25773
25773
|
struct(e, t, r) {
|
|
25774
|
-
return new
|
|
25774
|
+
return new C5({
|
|
25775
25775
|
name: e,
|
|
25776
25776
|
fields: t,
|
|
25777
25777
|
...r
|
|
@@ -25794,7 +25794,7 @@ const x = {
|
|
|
25794
25794
|
* enum.serialize({ C: true }).toBytes() // Uint8Array [ 2 ]
|
|
25795
25795
|
*/
|
|
25796
25796
|
enum(e, t, r) {
|
|
25797
|
-
return new
|
|
25797
|
+
return new R5({
|
|
25798
25798
|
name: e,
|
|
25799
25799
|
fields: t,
|
|
25800
25800
|
...r
|
|
@@ -25808,19 +25808,19 @@ const x = {
|
|
|
25808
25808
|
* const map = bcs.map(bcs.u8(), bcs.string())
|
|
25809
25809
|
* map.serialize(new Map([[2, 'a']])).toBytes() // Uint8Array [ 1, 2, 1, 97 ]
|
|
25810
25810
|
*/
|
|
25811
|
-
map:
|
|
25811
|
+
map: F5,
|
|
25812
25812
|
/**
|
|
25813
25813
|
* Creates a BcsType that wraps another BcsType which is lazily evaluated. This is useful for creating recursive types.
|
|
25814
25814
|
* @param cb A callback that returns the BcsType
|
|
25815
25815
|
*/
|
|
25816
25816
|
lazy(e) {
|
|
25817
|
-
return
|
|
25817
|
+
return B5(e);
|
|
25818
25818
|
}
|
|
25819
25819
|
};
|
|
25820
25820
|
var Jw = (e) => {
|
|
25821
25821
|
throw TypeError(e);
|
|
25822
25822
|
}, Qw = (e, t, r) => t.has(e) || Jw("Cannot " + r), dt = (e, t, r) => (Qw(e, t, "read from private field"), t.get(e)), Sm = (e, t, r) => t.has(e) ? Jw("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), xm = (e, t, r, n) => (Qw(e, t, "write to private field"), t.set(e, r), r), ps, _t;
|
|
25823
|
-
const
|
|
25823
|
+
const j5 = class e1 {
|
|
25824
25824
|
constructor({ prefix: t, cache: r } = {}) {
|
|
25825
25825
|
Sm(this, ps), Sm(this, _t), xm(this, ps, t ?? []), xm(this, _t, r ?? /* @__PURE__ */ new Map());
|
|
25826
25826
|
}
|
|
@@ -25858,12 +25858,12 @@ const F5 = class e1 {
|
|
|
25858
25858
|
};
|
|
25859
25859
|
ps = /* @__PURE__ */ new WeakMap();
|
|
25860
25860
|
_t = /* @__PURE__ */ new WeakMap();
|
|
25861
|
-
let
|
|
25861
|
+
let L5 = j5;
|
|
25862
25862
|
class t1 {
|
|
25863
25863
|
constructor({
|
|
25864
25864
|
network: t,
|
|
25865
25865
|
base: r,
|
|
25866
|
-
cache: n = (r == null ? void 0 : r.cache) ?? new
|
|
25866
|
+
cache: n = (r == null ? void 0 : r.cache) ?? new L5()
|
|
25867
25867
|
}) {
|
|
25868
25868
|
this.network = t, this.base = r ?? this, this.cache = n;
|
|
25869
25869
|
}
|
|
@@ -25882,11 +25882,11 @@ class t1 {
|
|
|
25882
25882
|
);
|
|
25883
25883
|
}
|
|
25884
25884
|
}
|
|
25885
|
-
const r1 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, n1 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i,
|
|
25886
|
-
function
|
|
25887
|
-
return e.length >
|
|
25885
|
+
const r1 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, n1 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i, D5 = 235;
|
|
25886
|
+
function H5(e) {
|
|
25887
|
+
return e.length > D5 ? !1 : e.includes("@") ? r1.test(e) : n1.test(e);
|
|
25888
25888
|
}
|
|
25889
|
-
function
|
|
25889
|
+
function z5(e, t = "at") {
|
|
25890
25890
|
const r = e.toLowerCase();
|
|
25891
25891
|
let n;
|
|
25892
25892
|
if (r.includes("@")) {
|
|
@@ -25901,37 +25901,37 @@ function H5(e, t = "at") {
|
|
|
25901
25901
|
}
|
|
25902
25902
|
return t === "dot" ? `${n.join(".")}.sui` : `${n.slice(0, -1).join(".")}@${n[n.length - 1]}`;
|
|
25903
25903
|
}
|
|
25904
|
-
const
|
|
25904
|
+
const V5 = /^([a-z0-9]+(?:-[a-z0-9]+)*)$/, q5 = /^\d+$/, G5 = 64, s1 = "/", zt = (e) => {
|
|
25905
25905
|
const t = e.split(s1);
|
|
25906
25906
|
if (t.length < 2 || t.length > 3) return !1;
|
|
25907
25907
|
const [r, n, s] = t;
|
|
25908
|
-
return s !== void 0 && !
|
|
25909
|
-
},
|
|
25908
|
+
return s !== void 0 && !q5.test(s) || !H5(r) ? !1 : V5.test(n) && n.length < G5;
|
|
25909
|
+
}, W5 = (e) => {
|
|
25910
25910
|
const t = e.split(/::|<|>|,/);
|
|
25911
25911
|
for (const r of t)
|
|
25912
25912
|
if (r.includes(s1) && !zt(r)) return !1;
|
|
25913
25913
|
return !0;
|
|
25914
|
-
},
|
|
25914
|
+
}, K5 = 32;
|
|
25915
25915
|
function _m(e) {
|
|
25916
25916
|
try {
|
|
25917
|
-
return Yo(e).length ===
|
|
25917
|
+
return Yo(e).length === K5;
|
|
25918
25918
|
} catch {
|
|
25919
25919
|
return !1;
|
|
25920
25920
|
}
|
|
25921
25921
|
}
|
|
25922
25922
|
const hu = 32;
|
|
25923
25923
|
function wr(e) {
|
|
25924
|
-
return
|
|
25924
|
+
return Y5(e) && Z5(e) === hu;
|
|
25925
25925
|
}
|
|
25926
25926
|
function La(e) {
|
|
25927
25927
|
return wr(e);
|
|
25928
25928
|
}
|
|
25929
|
-
function
|
|
25929
|
+
function X5(e) {
|
|
25930
25930
|
return e.includes("::") ? Hs(e) : e;
|
|
25931
25931
|
}
|
|
25932
25932
|
function Hs(e) {
|
|
25933
25933
|
const [t, r] = e.split("::"), n = zt(t), s = e.slice(t.length + r.length + 4), i = s.includes("<") ? s.slice(0, s.indexOf("<")) : s, o = s.includes("<") ? Ww(s.slice(s.indexOf("<") + 1, s.lastIndexOf(">"))).map(
|
|
25934
|
-
(a) =>
|
|
25934
|
+
(a) => X5(a.trim())
|
|
25935
25935
|
) : [];
|
|
25936
25936
|
return {
|
|
25937
25937
|
address: n ? t : Ee(t),
|
|
@@ -25953,13 +25953,13 @@ function Ee(e, t = !1) {
|
|
|
25953
25953
|
function vn(e, t = !1) {
|
|
25954
25954
|
return Ee(e, t);
|
|
25955
25955
|
}
|
|
25956
|
-
function
|
|
25956
|
+
function Y5(e) {
|
|
25957
25957
|
return /^(0x|0X)?[a-fA-F0-9]+$/.test(e) && e.length % 2 === 0;
|
|
25958
25958
|
}
|
|
25959
|
-
function
|
|
25959
|
+
function Z5(e) {
|
|
25960
25960
|
return /^(0x|0X)/.test(e) ? (e.length - 2) / 2 : e.length / 2;
|
|
25961
25961
|
}
|
|
25962
|
-
const
|
|
25962
|
+
const J5 = /^vector<(.+)>$/, Q5 = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
|
|
25963
25963
|
class Er {
|
|
25964
25964
|
static parseFromStr(t, r = !1) {
|
|
25965
25965
|
if (t === "address")
|
|
@@ -25980,12 +25980,12 @@ class Er {
|
|
|
25980
25980
|
return { u256: null };
|
|
25981
25981
|
if (t === "signer")
|
|
25982
25982
|
return { signer: null };
|
|
25983
|
-
const n = t.match(
|
|
25983
|
+
const n = t.match(J5);
|
|
25984
25984
|
if (n)
|
|
25985
25985
|
return {
|
|
25986
25986
|
vector: Er.parseFromStr(n[1], r)
|
|
25987
25987
|
};
|
|
25988
|
-
const s = t.match(
|
|
25988
|
+
const s = t.match(Q5);
|
|
25989
25989
|
if (s)
|
|
25990
25990
|
return {
|
|
25991
25991
|
struct: {
|
|
@@ -26030,7 +26030,7 @@ class Er {
|
|
|
26030
26030
|
throw new Error("Invalid TypeTag");
|
|
26031
26031
|
}
|
|
26032
26032
|
}
|
|
26033
|
-
function
|
|
26033
|
+
function e3(e) {
|
|
26034
26034
|
return x.u64({
|
|
26035
26035
|
name: "unsafe_u64",
|
|
26036
26036
|
...e
|
|
@@ -26039,7 +26039,7 @@ function Q5(e) {
|
|
|
26039
26039
|
output: (t) => Number(t)
|
|
26040
26040
|
});
|
|
26041
26041
|
}
|
|
26042
|
-
function
|
|
26042
|
+
function t3(e) {
|
|
26043
26043
|
return x.enum("Option", {
|
|
26044
26044
|
None: null,
|
|
26045
26045
|
Some: e
|
|
@@ -26164,7 +26164,7 @@ const Ce = x.bytes(hu).transform({
|
|
|
26164
26164
|
// * so this call serves a utility function.
|
|
26165
26165
|
// */
|
|
26166
26166
|
MakeMoveVec: x.struct("MakeMoveVec", {
|
|
26167
|
-
type:
|
|
26167
|
+
type: t3(kh).transform({
|
|
26168
26168
|
input: (e) => e === null ? {
|
|
26169
26169
|
None: !0
|
|
26170
26170
|
} : {
|
|
@@ -26195,7 +26195,7 @@ const Ce = x.bytes(hu).transform({
|
|
|
26195
26195
|
ConsensusCommitPrologue: null
|
|
26196
26196
|
}), d1 = x.enum("TransactionExpiration", {
|
|
26197
26197
|
None: null,
|
|
26198
|
-
Epoch:
|
|
26198
|
+
Epoch: e3()
|
|
26199
26199
|
}), h1 = x.struct("StructTag", {
|
|
26200
26200
|
address: Ce,
|
|
26201
26201
|
module: x.string(),
|
|
@@ -26251,23 +26251,23 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26251
26251
|
}), _1 = x.struct("MultiSigPublicKey", {
|
|
26252
26252
|
pk_map: x.vector(x1),
|
|
26253
26253
|
threshold: x.u16()
|
|
26254
|
-
}),
|
|
26254
|
+
}), r3 = x.struct("MultiSig", {
|
|
26255
26255
|
sigs: x.vector(A1),
|
|
26256
26256
|
bitmap: x.u16(),
|
|
26257
26257
|
multisig_pk: _1
|
|
26258
|
-
}),
|
|
26258
|
+
}), n3 = x.vector(x.u8()).transform({
|
|
26259
26259
|
input: (e) => typeof e == "string" ? qt(e) : e,
|
|
26260
26260
|
output: (e) => pt(new Uint8Array(e))
|
|
26261
26261
|
}), T1 = x.struct("SenderSignedTransaction", {
|
|
26262
26262
|
intentMessage: E1(m1),
|
|
26263
|
-
txSignatures: x.vector(
|
|
26264
|
-
}),
|
|
26263
|
+
txSignatures: x.vector(n3)
|
|
26264
|
+
}), s3 = x.vector(T1, {
|
|
26265
26265
|
name: "SenderSignedData"
|
|
26266
|
-
}),
|
|
26266
|
+
}), i3 = x.struct("PasskeyAuthenticator", {
|
|
26267
26267
|
authenticatorData: x.vector(x.u8()),
|
|
26268
26268
|
clientDataJson: x.string(),
|
|
26269
26269
|
userSignature: x.vector(x.u8())
|
|
26270
|
-
}),
|
|
26270
|
+
}), o3 = x.enum("PackageUpgradeError", {
|
|
26271
26271
|
UnableToFetchPackage: x.struct("UnableToFetchPackage", { packageId: Ce }),
|
|
26272
26272
|
NotAPackage: x.struct("NotAPackage", { objectId: Ce }),
|
|
26273
26273
|
IncompatibleUpgrade: null,
|
|
@@ -26277,15 +26277,15 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26277
26277
|
packageId: Ce,
|
|
26278
26278
|
ticketId: Ce
|
|
26279
26279
|
})
|
|
26280
|
-
}),
|
|
26280
|
+
}), a3 = x.struct("ModuleId", {
|
|
26281
26281
|
address: Ce,
|
|
26282
26282
|
name: x.string()
|
|
26283
26283
|
}), Tm = x.struct("MoveLocation", {
|
|
26284
|
-
module:
|
|
26284
|
+
module: a3,
|
|
26285
26285
|
function: x.u16(),
|
|
26286
26286
|
instruction: x.u16(),
|
|
26287
26287
|
functionName: x.option(x.string())
|
|
26288
|
-
}),
|
|
26288
|
+
}), c3 = x.enum("CommandArgumentError", {
|
|
26289
26289
|
TypeMismatch: null,
|
|
26290
26290
|
InvalidBCSBytes: null,
|
|
26291
26291
|
InvalidUsageOfPureArg: null,
|
|
@@ -26301,10 +26301,10 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26301
26301
|
InvalidObjectByValue: null,
|
|
26302
26302
|
InvalidObjectByMutRef: null,
|
|
26303
26303
|
SharedObjectOperationNotAllowed: null
|
|
26304
|
-
}),
|
|
26304
|
+
}), u3 = x.enum("TypeArgumentError", {
|
|
26305
26305
|
TypeNotFound: null,
|
|
26306
26306
|
ConstraintNotSatisfied: null
|
|
26307
|
-
}),
|
|
26307
|
+
}), f3 = x.enum("ExecutionFailureStatus", {
|
|
26308
26308
|
InsufficientGas: null,
|
|
26309
26309
|
InvalidGasObject: null,
|
|
26310
26310
|
InvariantViolation: null,
|
|
@@ -26332,11 +26332,11 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26332
26332
|
NonEntryFunctionInvoked: null,
|
|
26333
26333
|
CommandArgumentError: x.struct("CommandArgumentError", {
|
|
26334
26334
|
argIdx: x.u16(),
|
|
26335
|
-
kind:
|
|
26335
|
+
kind: c3
|
|
26336
26336
|
}),
|
|
26337
26337
|
TypeArgumentError: x.struct("TypeArgumentError", {
|
|
26338
26338
|
argumentIdx: x.u16(),
|
|
26339
|
-
kind:
|
|
26339
|
+
kind: u3
|
|
26340
26340
|
}),
|
|
26341
26341
|
UnusedValueWithoutDrop: x.struct("UnusedValueWithoutDrop", {
|
|
26342
26342
|
resultIdx: x.u16(),
|
|
@@ -26349,7 +26349,7 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26349
26349
|
EffectsTooLarge: x.struct("EffectsTooLarge", { currentSize: x.u64(), maxSize: x.u64() }),
|
|
26350
26350
|
PublishUpgradeMissingDependency: null,
|
|
26351
26351
|
PublishUpgradeDependencyDowngrade: null,
|
|
26352
|
-
PackageUpgradeError: x.struct("PackageUpgradeError", { upgradeError:
|
|
26352
|
+
PackageUpgradeError: x.struct("PackageUpgradeError", { upgradeError: o3 }),
|
|
26353
26353
|
WrittenObjectsTooLarge: x.struct("WrittenObjectsTooLarge", {
|
|
26354
26354
|
currentSize: x.u64(),
|
|
26355
26355
|
maxSize: x.u64()
|
|
@@ -26373,7 +26373,7 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26373
26373
|
}), k1 = x.enum("ExecutionStatus", {
|
|
26374
26374
|
Success: null,
|
|
26375
26375
|
Failed: x.struct("ExecutionFailed", {
|
|
26376
|
-
error:
|
|
26376
|
+
error: f3,
|
|
26377
26377
|
command: x.option(x.u64())
|
|
26378
26378
|
})
|
|
26379
26379
|
}), I1 = x.struct("GasCostSummary", {
|
|
@@ -26381,7 +26381,7 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26381
26381
|
storageCost: x.u64(),
|
|
26382
26382
|
storageRebate: x.u64(),
|
|
26383
26383
|
nonRefundableStorageFee: x.u64()
|
|
26384
|
-
}),
|
|
26384
|
+
}), l3 = x.struct("TransactionEffectsV1", {
|
|
26385
26385
|
status: k1,
|
|
26386
26386
|
executedEpoch: x.u64(),
|
|
26387
26387
|
gasUsed: I1,
|
|
@@ -26397,29 +26397,29 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26397
26397
|
gasObject: x.tuple([rr, Es]),
|
|
26398
26398
|
eventsDigest: x.option(xr),
|
|
26399
26399
|
dependencies: x.vector(xr)
|
|
26400
|
-
}), Ih = x.tuple([x.u64(), xr]),
|
|
26400
|
+
}), Ih = x.tuple([x.u64(), xr]), d3 = x.enum("ObjectIn", {
|
|
26401
26401
|
NotExist: null,
|
|
26402
26402
|
Exist: x.tuple([Ih, Es])
|
|
26403
|
-
}),
|
|
26403
|
+
}), h3 = x.enum("ObjectOut", {
|
|
26404
26404
|
NotExist: null,
|
|
26405
26405
|
ObjectWrite: x.tuple([xr, Es]),
|
|
26406
26406
|
PackageWrite: Ih
|
|
26407
|
-
}),
|
|
26407
|
+
}), p3 = x.enum("IDOperation", {
|
|
26408
26408
|
None: null,
|
|
26409
26409
|
Created: null,
|
|
26410
26410
|
Deleted: null
|
|
26411
|
-
}),
|
|
26412
|
-
inputState:
|
|
26413
|
-
outputState:
|
|
26414
|
-
idOperation:
|
|
26415
|
-
}),
|
|
26411
|
+
}), y3 = x.struct("EffectsObjectChange", {
|
|
26412
|
+
inputState: d3,
|
|
26413
|
+
outputState: h3,
|
|
26414
|
+
idOperation: p3
|
|
26415
|
+
}), m3 = x.enum("UnchangedSharedKind", {
|
|
26416
26416
|
ReadOnlyRoot: Ih,
|
|
26417
26417
|
// TODO: these have been renamed to MutateConsensusStreamEnded and ReadConsensusStreamEnded
|
|
26418
26418
|
MutateDeleted: x.u64(),
|
|
26419
26419
|
ReadDeleted: x.u64(),
|
|
26420
26420
|
Cancelled: x.u64(),
|
|
26421
26421
|
PerEpochConfig: null
|
|
26422
|
-
}),
|
|
26422
|
+
}), g3 = x.struct("TransactionEffectsV2", {
|
|
26423
26423
|
status: k1,
|
|
26424
26424
|
executedEpoch: x.u64(),
|
|
26425
26425
|
gasUsed: I1,
|
|
@@ -26428,12 +26428,12 @@ const A1 = x.enum("CompressedSignature", {
|
|
|
26428
26428
|
eventsDigest: x.option(xr),
|
|
26429
26429
|
dependencies: x.vector(xr),
|
|
26430
26430
|
lamportVersion: x.u64(),
|
|
26431
|
-
changedObjects: x.vector(x.tuple([Ce,
|
|
26432
|
-
unchangedSharedObjects: x.vector(x.tuple([Ce,
|
|
26431
|
+
changedObjects: x.vector(x.tuple([Ce, y3])),
|
|
26432
|
+
unchangedSharedObjects: x.vector(x.tuple([Ce, m3])),
|
|
26433
26433
|
auxDataDigest: x.option(xr)
|
|
26434
|
-
}),
|
|
26435
|
-
V1:
|
|
26436
|
-
V2:
|
|
26434
|
+
}), b3 = x.enum("TransactionEffects", {
|
|
26435
|
+
V1: l3,
|
|
26436
|
+
V2: g3
|
|
26437
26437
|
});
|
|
26438
26438
|
function Ao(e) {
|
|
26439
26439
|
switch (e) {
|
|
@@ -26486,30 +26486,30 @@ const he = {
|
|
|
26486
26486
|
IntentMessage: E1,
|
|
26487
26487
|
IntentScope: g1,
|
|
26488
26488
|
IntentVersion: b1,
|
|
26489
|
-
MultiSig:
|
|
26489
|
+
MultiSig: r3,
|
|
26490
26490
|
MultiSigPkMap: x1,
|
|
26491
26491
|
MultiSigPublicKey: _1,
|
|
26492
26492
|
ObjectArg: o1,
|
|
26493
26493
|
ObjectDigest: xr,
|
|
26494
26494
|
Owner: Es,
|
|
26495
|
-
PasskeyAuthenticator:
|
|
26495
|
+
PasskeyAuthenticator: i3,
|
|
26496
26496
|
ProgrammableMoveCall: c1,
|
|
26497
26497
|
ProgrammableTransaction: f1,
|
|
26498
26498
|
PublicKey: S1,
|
|
26499
|
-
SenderSignedData:
|
|
26499
|
+
SenderSignedData: s3,
|
|
26500
26500
|
SenderSignedTransaction: T1,
|
|
26501
26501
|
SharedObjectRef: i1,
|
|
26502
26502
|
StructTag: h1,
|
|
26503
26503
|
SuiObjectRef: rr,
|
|
26504
26504
|
TransactionData: m1,
|
|
26505
26505
|
TransactionDataV1: y1,
|
|
26506
|
-
TransactionEffects:
|
|
26506
|
+
TransactionEffects: b3,
|
|
26507
26507
|
TransactionExpiration: d1,
|
|
26508
26508
|
TransactionKind: l1,
|
|
26509
26509
|
TypeTag: kh
|
|
26510
26510
|
};
|
|
26511
26511
|
var fn;
|
|
26512
|
-
function
|
|
26512
|
+
function w3(e) {
|
|
26513
26513
|
return {
|
|
26514
26514
|
lang: (e == null ? void 0 : e.lang) ?? (fn == null ? void 0 : fn.lang),
|
|
26515
26515
|
message: e == null ? void 0 : e.message,
|
|
@@ -26518,15 +26518,15 @@ function b3(e) {
|
|
|
26518
26518
|
};
|
|
26519
26519
|
}
|
|
26520
26520
|
var ul;
|
|
26521
|
-
function
|
|
26521
|
+
function v3(e) {
|
|
26522
26522
|
return ul == null ? void 0 : ul.get(e);
|
|
26523
26523
|
}
|
|
26524
26524
|
var fl;
|
|
26525
|
-
function
|
|
26525
|
+
function E3(e) {
|
|
26526
26526
|
return fl == null ? void 0 : fl.get(e);
|
|
26527
26527
|
}
|
|
26528
26528
|
var ll;
|
|
26529
|
-
function
|
|
26529
|
+
function A3(e, t) {
|
|
26530
26530
|
var r;
|
|
26531
26531
|
return (r = ll == null ? void 0 : ll.get(e)) == null ? void 0 : r.get(t);
|
|
26532
26532
|
}
|
|
@@ -26551,13 +26551,13 @@ function Kt(e, t, r, n, s) {
|
|
|
26551
26551
|
abortEarly: n.abortEarly,
|
|
26552
26552
|
abortPipeEarly: n.abortPipeEarly
|
|
26553
26553
|
}, f = e.kind === "schema", u = (s == null ? void 0 : s.message) ?? // @ts-expect-error
|
|
26554
|
-
e.message ??
|
|
26554
|
+
e.message ?? A3(e.reference, c.lang) ?? (f ? E3(c.lang) : null) ?? n.message ?? v3(c.lang);
|
|
26555
26555
|
u && (c.message = typeof u == "function" ? u(c) : u), f && (r.typed = !1), r.issues ? r.issues.push(c) : r.issues = [c];
|
|
26556
26556
|
}
|
|
26557
|
-
function
|
|
26557
|
+
function S3(e, t) {
|
|
26558
26558
|
return Object.hasOwn(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
26559
26559
|
}
|
|
26560
|
-
var
|
|
26560
|
+
var x3 = class extends Error {
|
|
26561
26561
|
/**
|
|
26562
26562
|
* Creates a Valibot error with useful information.
|
|
26563
26563
|
*
|
|
@@ -26841,7 +26841,7 @@ function Jo(e, t, r) {
|
|
|
26841
26841
|
if (i && typeof i == "object") {
|
|
26842
26842
|
n.typed = !0, n.value = {};
|
|
26843
26843
|
for (const c in i)
|
|
26844
|
-
if (
|
|
26844
|
+
if (S3(i, c)) {
|
|
26845
26845
|
const f = i[c], u = this.key._run(
|
|
26846
26846
|
{ typed: !1, value: c },
|
|
26847
26847
|
s
|
|
@@ -27010,10 +27010,10 @@ function zs() {
|
|
|
27010
27010
|
function Ve(e, t, r) {
|
|
27011
27011
|
const n = e._run(
|
|
27012
27012
|
{ typed: !1, value: t },
|
|
27013
|
-
|
|
27013
|
+
w3(r)
|
|
27014
27014
|
);
|
|
27015
27015
|
if (n.issues)
|
|
27016
|
-
throw new
|
|
27016
|
+
throw new x3(n.issues);
|
|
27017
27017
|
return n.value;
|
|
27018
27018
|
}
|
|
27019
27019
|
function Ie(...e) {
|
|
@@ -27072,7 +27072,7 @@ const Di = Ie(
|
|
|
27072
27072
|
$kind: Object.keys(e)[0]
|
|
27073
27073
|
}))
|
|
27074
27074
|
// Defined manually to add `type?: 'pure' | 'object'` to Input
|
|
27075
|
-
),
|
|
27075
|
+
), _3 = ee({
|
|
27076
27076
|
budget: ve(jt),
|
|
27077
27077
|
price: ve(jt),
|
|
27078
27078
|
owner: ve(Di),
|
|
@@ -27096,23 +27096,23 @@ const Di = Ie(
|
|
|
27096
27096
|
})
|
|
27097
27097
|
}),
|
|
27098
27098
|
ee({ typeParameter: Ie(Le(), qe()) })
|
|
27099
|
-
]),
|
|
27099
|
+
]), T3 = ee({
|
|
27100
27100
|
ref: ve(lt([le("&"), le("&mut")])),
|
|
27101
27101
|
body: od
|
|
27102
|
-
}),
|
|
27102
|
+
}), k3 = ee({
|
|
27103
27103
|
package: Gt,
|
|
27104
27104
|
module: ye(),
|
|
27105
27105
|
function: ye(),
|
|
27106
27106
|
// snake case in rust
|
|
27107
27107
|
typeArguments: fe(ye()),
|
|
27108
27108
|
arguments: fe(Ne),
|
|
27109
|
-
_argumentTypes: ft(ve(fe(
|
|
27110
|
-
}),
|
|
27109
|
+
_argumentTypes: ft(ve(fe(T3)))
|
|
27110
|
+
}), I3 = ee({
|
|
27111
27111
|
name: ye(),
|
|
27112
27112
|
inputs: Jo(ye(), lt([Ne, fe(Ne)])),
|
|
27113
27113
|
data: Jo(ye(), zs())
|
|
27114
|
-
}),
|
|
27115
|
-
MoveCall:
|
|
27114
|
+
}), P3 = Js({
|
|
27115
|
+
MoveCall: k3,
|
|
27116
27116
|
TransferObjects: ee({
|
|
27117
27117
|
objects: fe(Ne),
|
|
27118
27118
|
address: Ne
|
|
@@ -27139,7 +27139,7 @@ const Di = Ie(
|
|
|
27139
27139
|
package: Gt,
|
|
27140
27140
|
ticket: Ne
|
|
27141
27141
|
}),
|
|
27142
|
-
$Intent:
|
|
27142
|
+
$Intent: I3
|
|
27143
27143
|
}), O1 = Js({
|
|
27144
27144
|
ImmOrOwnedObject: is,
|
|
27145
27145
|
SharedObject: ee({
|
|
@@ -27149,7 +27149,7 @@ const Di = Ie(
|
|
|
27149
27149
|
mutable: yu()
|
|
27150
27150
|
}),
|
|
27151
27151
|
Receiving: is
|
|
27152
|
-
}),
|
|
27152
|
+
}), O3 = Js({
|
|
27153
27153
|
Object: O1,
|
|
27154
27154
|
Pure: ee({
|
|
27155
27155
|
bytes: Vs
|
|
@@ -27175,9 +27175,9 @@ const Di = Ie(
|
|
|
27175
27175
|
version: le(2),
|
|
27176
27176
|
sender: Ci(Di),
|
|
27177
27177
|
expiration: Ci(B1),
|
|
27178
|
-
gasData:
|
|
27179
|
-
inputs: fe(
|
|
27180
|
-
commands: fe(
|
|
27178
|
+
gasData: _3,
|
|
27179
|
+
inputs: fe(O3),
|
|
27180
|
+
commands: fe(P3)
|
|
27181
27181
|
}), ds = {
|
|
27182
27182
|
MoveCall(e) {
|
|
27183
27183
|
const [t, r = "", n = ""] = "target" in e ? e.target.split("::") : [e.package, e.module, e.function];
|
|
@@ -27286,7 +27286,7 @@ const Di = Ie(
|
|
|
27286
27286
|
digest: ye(),
|
|
27287
27287
|
objectId: ye(),
|
|
27288
27288
|
version: lt([Ie(Le(), qe()), ye(), Oh()])
|
|
27289
|
-
}),
|
|
27289
|
+
}), B3 = Js({
|
|
27290
27290
|
ImmOrOwned: ad,
|
|
27291
27291
|
Shared: ee({
|
|
27292
27292
|
objectId: Gt,
|
|
@@ -27295,7 +27295,7 @@ const Di = Ie(
|
|
|
27295
27295
|
}),
|
|
27296
27296
|
Receiving: ad
|
|
27297
27297
|
}), Pm = Js({
|
|
27298
|
-
Object:
|
|
27298
|
+
Object: B3,
|
|
27299
27299
|
Pure: fe(Ie(Le(), qe()))
|
|
27300
27300
|
}), C1 = lt([
|
|
27301
27301
|
ee({
|
|
@@ -27310,7 +27310,7 @@ const Di = Ie(
|
|
|
27310
27310
|
value: zs(),
|
|
27311
27311
|
type: le("pure")
|
|
27312
27312
|
})
|
|
27313
|
-
]),
|
|
27313
|
+
]), C3 = lt([
|
|
27314
27314
|
ee({ Epoch: Ie(Le(), qe()) }),
|
|
27315
27315
|
ee({ None: ve(le(!0)) })
|
|
27316
27316
|
]), Om = Ie(
|
|
@@ -27331,21 +27331,21 @@ const Di = Ie(
|
|
|
27331
27331
|
ee({ address: ve(le(!0)) }),
|
|
27332
27332
|
ee({ signer: ve(le(!0)) }),
|
|
27333
27333
|
ee({ vector: Zo(() => Ch) }),
|
|
27334
|
-
ee({ struct: Zo(() =>
|
|
27334
|
+
ee({ struct: Zo(() => R3) }),
|
|
27335
27335
|
ee({ u16: ve(le(!0)) }),
|
|
27336
27336
|
ee({ u32: ve(le(!0)) }),
|
|
27337
27337
|
ee({ u256: ve(le(!0)) })
|
|
27338
|
-
]),
|
|
27338
|
+
]), R3 = ee({
|
|
27339
27339
|
address: ye(),
|
|
27340
27340
|
module: ye(),
|
|
27341
27341
|
name: ye(),
|
|
27342
27342
|
typeParams: fe(Ch)
|
|
27343
|
-
}),
|
|
27343
|
+
}), $3 = ee({
|
|
27344
27344
|
budget: ft(Om),
|
|
27345
27345
|
price: ft(Om),
|
|
27346
27346
|
payment: ft(fe(ad)),
|
|
27347
27347
|
owner: ft(ye())
|
|
27348
|
-
}),
|
|
27348
|
+
}), N3 = [
|
|
27349
27349
|
C1,
|
|
27350
27350
|
ee({ kind: le("GasCoin") }),
|
|
27351
27351
|
ee({ kind: le("Result"), index: Ie(Le(), qe()) }),
|
|
@@ -27354,7 +27354,7 @@ const Di = Ie(
|
|
|
27354
27354
|
index: Ie(Le(), qe()),
|
|
27355
27355
|
resultIndex: Ie(Le(), qe())
|
|
27356
27356
|
})
|
|
27357
|
-
], Pn = lt([
|
|
27357
|
+
], Pn = lt([...N3]), M3 = ee({
|
|
27358
27358
|
kind: le("MoveCall"),
|
|
27359
27359
|
target: Ie(
|
|
27360
27360
|
ye(),
|
|
@@ -27362,48 +27362,48 @@ const Di = Ie(
|
|
|
27362
27362
|
),
|
|
27363
27363
|
typeArguments: fe(ye()),
|
|
27364
27364
|
arguments: fe(Pn)
|
|
27365
|
-
}),
|
|
27365
|
+
}), U3 = ee({
|
|
27366
27366
|
kind: le("TransferObjects"),
|
|
27367
27367
|
objects: fe(Pn),
|
|
27368
27368
|
address: Pn
|
|
27369
|
-
}),
|
|
27369
|
+
}), F3 = ee({
|
|
27370
27370
|
kind: le("SplitCoins"),
|
|
27371
27371
|
coin: Pn,
|
|
27372
27372
|
amounts: fe(Pn)
|
|
27373
|
-
}),
|
|
27373
|
+
}), j3 = ee({
|
|
27374
27374
|
kind: le("MergeCoins"),
|
|
27375
27375
|
destination: Pn,
|
|
27376
27376
|
sources: fe(Pn)
|
|
27377
|
-
}),
|
|
27377
|
+
}), L3 = ee({
|
|
27378
27378
|
kind: le("MakeMoveVec"),
|
|
27379
27379
|
type: lt([ee({ Some: Ch }), ee({ None: ve(le(!0)) })]),
|
|
27380
27380
|
objects: fe(Pn)
|
|
27381
|
-
}),
|
|
27381
|
+
}), D3 = ee({
|
|
27382
27382
|
kind: le("Publish"),
|
|
27383
27383
|
modules: fe(fe(Ie(Le(), qe()))),
|
|
27384
27384
|
dependencies: fe(ye())
|
|
27385
|
-
}),
|
|
27385
|
+
}), H3 = ee({
|
|
27386
27386
|
kind: le("Upgrade"),
|
|
27387
27387
|
modules: fe(fe(Ie(Le(), qe()))),
|
|
27388
27388
|
dependencies: fe(ye()),
|
|
27389
27389
|
packageId: ye(),
|
|
27390
27390
|
ticket: Pn
|
|
27391
|
-
}),
|
|
27392
|
-
N3,
|
|
27391
|
+
}), z3 = [
|
|
27393
27392
|
M3,
|
|
27394
27393
|
U3,
|
|
27395
27394
|
F3,
|
|
27396
|
-
|
|
27395
|
+
j3,
|
|
27397
27396
|
D3,
|
|
27398
|
-
|
|
27399
|
-
|
|
27397
|
+
H3,
|
|
27398
|
+
L3
|
|
27399
|
+
], V3 = lt([...z3]);
|
|
27400
27400
|
ee({
|
|
27401
27401
|
version: le(1),
|
|
27402
27402
|
sender: ft(ye()),
|
|
27403
|
-
expiration: Ci(
|
|
27404
|
-
gasConfig:
|
|
27403
|
+
expiration: Ci(C3),
|
|
27404
|
+
gasConfig: $3,
|
|
27405
27405
|
inputs: fe(C1),
|
|
27406
|
-
transactions: fe(
|
|
27406
|
+
transactions: fe(V3)
|
|
27407
27407
|
});
|
|
27408
27408
|
function Bm(e) {
|
|
27409
27409
|
var r;
|
|
@@ -27536,7 +27536,7 @@ function ln(e, t) {
|
|
|
27536
27536
|
return t[e.Input];
|
|
27537
27537
|
throw new Error(`Invalid argument ${Object.keys(e)}`);
|
|
27538
27538
|
}
|
|
27539
|
-
function
|
|
27539
|
+
function q3(e) {
|
|
27540
27540
|
var t, r, n;
|
|
27541
27541
|
return Ve(ec, {
|
|
27542
27542
|
version: 2,
|
|
@@ -27692,24 +27692,24 @@ const mr = ga({
|
|
|
27692
27692
|
Input: Ie(Le(), qe()),
|
|
27693
27693
|
Result: Ie(Le(), qe()),
|
|
27694
27694
|
NestedResult: Bh([Ie(Le(), qe()), Ie(Le(), qe())])
|
|
27695
|
-
}),
|
|
27695
|
+
}), G3 = ee({
|
|
27696
27696
|
budget: ve(jt),
|
|
27697
27697
|
price: ve(jt),
|
|
27698
27698
|
owner: ve(Di),
|
|
27699
27699
|
payment: ve(fe(is))
|
|
27700
|
-
}),
|
|
27700
|
+
}), W3 = ee({
|
|
27701
27701
|
package: Gt,
|
|
27702
27702
|
module: ye(),
|
|
27703
27703
|
function: ye(),
|
|
27704
27704
|
// snake case in rust
|
|
27705
27705
|
typeArguments: fe(ye()),
|
|
27706
27706
|
arguments: fe(mr)
|
|
27707
|
-
}),
|
|
27707
|
+
}), K3 = ee({
|
|
27708
27708
|
name: ye(),
|
|
27709
27709
|
inputs: Jo(ye(), lt([mr, fe(mr)])),
|
|
27710
27710
|
data: Jo(ye(), zs())
|
|
27711
|
-
}),
|
|
27712
|
-
MoveCall:
|
|
27711
|
+
}), X3 = ga({
|
|
27712
|
+
MoveCall: W3,
|
|
27713
27713
|
TransferObjects: ee({
|
|
27714
27714
|
objects: fe(mr),
|
|
27715
27715
|
address: mr
|
|
@@ -27736,8 +27736,8 @@ const mr = ga({
|
|
|
27736
27736
|
package: Gt,
|
|
27737
27737
|
ticket: mr
|
|
27738
27738
|
}),
|
|
27739
|
-
$Intent:
|
|
27740
|
-
}),
|
|
27739
|
+
$Intent: K3
|
|
27740
|
+
}), Y3 = ga({
|
|
27741
27741
|
ImmOrOwnedObject: is,
|
|
27742
27742
|
SharedObject: ee({
|
|
27743
27743
|
objectId: Gt,
|
|
@@ -27746,8 +27746,8 @@ const mr = ga({
|
|
|
27746
27746
|
mutable: yu()
|
|
27747
27747
|
}),
|
|
27748
27748
|
Receiving: is
|
|
27749
|
-
}),
|
|
27750
|
-
Object:
|
|
27749
|
+
}), Z3 = ga({
|
|
27750
|
+
Object: Y3,
|
|
27751
27751
|
Pure: ee({
|
|
27752
27752
|
bytes: Vs
|
|
27753
27753
|
}),
|
|
@@ -27760,19 +27760,19 @@ const mr = ga({
|
|
|
27760
27760
|
digest: ft(ve(ye())),
|
|
27761
27761
|
initialSharedVersion: ft(ve(jt))
|
|
27762
27762
|
})
|
|
27763
|
-
}),
|
|
27763
|
+
}), J3 = ga({
|
|
27764
27764
|
None: le(!0),
|
|
27765
27765
|
Epoch: jt
|
|
27766
|
-
}),
|
|
27766
|
+
}), Q3 = ee({
|
|
27767
27767
|
version: le(2),
|
|
27768
27768
|
sender: Ci(Di),
|
|
27769
|
-
expiration: Ci(
|
|
27770
|
-
gasData:
|
|
27771
|
-
inputs: fe(
|
|
27772
|
-
commands: fe(
|
|
27769
|
+
expiration: Ci(J3),
|
|
27770
|
+
gasData: G3,
|
|
27771
|
+
inputs: fe(Z3),
|
|
27772
|
+
commands: fe(X3),
|
|
27773
27773
|
digest: ft(ve(ye()))
|
|
27774
27774
|
});
|
|
27775
|
-
function
|
|
27775
|
+
function e8(e) {
|
|
27776
27776
|
return {
|
|
27777
27777
|
$kind: "Pure",
|
|
27778
27778
|
Pure: {
|
|
@@ -27781,7 +27781,7 @@ function Q3(e) {
|
|
|
27781
27781
|
};
|
|
27782
27782
|
}
|
|
27783
27783
|
const En = {
|
|
27784
|
-
Pure:
|
|
27784
|
+
Pure: e8,
|
|
27785
27785
|
ObjectRef({ objectId: e, digest: t, version: r }) {
|
|
27786
27786
|
return {
|
|
27787
27787
|
$kind: "Object",
|
|
@@ -27827,9 +27827,9 @@ const En = {
|
|
|
27827
27827
|
}
|
|
27828
27828
|
};
|
|
27829
27829
|
BigInt(1e9);
|
|
27830
|
-
const
|
|
27830
|
+
const t8 = "0x1", R1 = "0x2", r8 = vn("0x6"), n8 = `${R1}::sui::SUI`;
|
|
27831
27831
|
vn("0x5");
|
|
27832
|
-
const
|
|
27832
|
+
const s8 = /* @__PURE__ */ Uint8Array.from([
|
|
27833
27833
|
0,
|
|
27834
27834
|
1,
|
|
27835
27835
|
2,
|
|
@@ -28115,7 +28115,7 @@ function Hn(e, t, r, n, s, i) {
|
|
|
28115
28115
|
let c = te[2 * e], f = te[2 * e + 1], u = te[2 * t], l = te[2 * t + 1], p = te[2 * r], d = te[2 * r + 1], m = te[2 * n], g = te[2 * n + 1], w = b0(c, u, o);
|
|
28116
28116
|
f = w0(w, f, l, a), c = w | 0, { Dh: g, Dl: m } = { Dh: g ^ f, Dl: m ^ c }, { Dh: g, Dl: m } = { Dh: y0(g, m, 16), Dl: m0(g, m, 16) }, { h: d, l: p } = g0(d, p, g, m), { Bh: l, Bl: u } = { Bh: l ^ d, Bl: u ^ p }, { Bh: l, Bl: u } = { Bh: Bv(l, u, 63), Bl: Cv(l, u, 63) }, te[2 * e] = c, te[2 * e + 1] = f, te[2 * t] = u, te[2 * t + 1] = l, te[2 * r] = p, te[2 * r + 1] = d, te[2 * n] = m, te[2 * n + 1] = g;
|
|
28117
28117
|
}
|
|
28118
|
-
function
|
|
28118
|
+
function i8(e, t = {}, r, n, s) {
|
|
28119
28119
|
if (ts(r), e < 0 || e > r)
|
|
28120
28120
|
throw new Error("outputLen bigger than keyLen");
|
|
28121
28121
|
const { key: i, salt: o, personalization: a } = t;
|
|
@@ -28126,7 +28126,7 @@ function s8(e, t = {}, r, n, s) {
|
|
|
28126
28126
|
if (a !== void 0 && a.length !== s)
|
|
28127
28127
|
throw new Error("personalization must be undefined or " + s);
|
|
28128
28128
|
}
|
|
28129
|
-
class
|
|
28129
|
+
class o8 extends xc {
|
|
28130
28130
|
constructor(t, r) {
|
|
28131
28131
|
super(), this.finished = !1, this.destroyed = !1, this.length = 0, this.pos = 0, ts(t), ts(r), this.blockLen = t, this.outputLen = r, this.buffer = new Uint8Array(t), this.buffer32 = _o(this.buffer);
|
|
28132
28132
|
}
|
|
@@ -28169,10 +28169,10 @@ class i8 extends xc {
|
|
|
28169
28169
|
return this._cloneInto();
|
|
28170
28170
|
}
|
|
28171
28171
|
}
|
|
28172
|
-
class
|
|
28172
|
+
class a8 extends o8 {
|
|
28173
28173
|
constructor(t = {}) {
|
|
28174
28174
|
const r = t.dkLen === void 0 ? 64 : t.dkLen;
|
|
28175
|
-
super(128, r), this.v0l = et[0] | 0, this.v0h = et[1] | 0, this.v1l = et[2] | 0, this.v1h = et[3] | 0, this.v2l = et[4] | 0, this.v2h = et[5] | 0, this.v3l = et[6] | 0, this.v3h = et[7] | 0, this.v4l = et[8] | 0, this.v4h = et[9] | 0, this.v5l = et[10] | 0, this.v5h = et[11] | 0, this.v6l = et[12] | 0, this.v6h = et[13] | 0, this.v7l = et[14] | 0, this.v7h = et[15] | 0,
|
|
28175
|
+
super(128, r), this.v0l = et[0] | 0, this.v0h = et[1] | 0, this.v1l = et[2] | 0, this.v1h = et[3] | 0, this.v2l = et[4] | 0, this.v2h = et[5] | 0, this.v3l = et[6] | 0, this.v3h = et[7] | 0, this.v4l = et[8] | 0, this.v4h = et[9] | 0, this.v5l = et[10] | 0, this.v5h = et[11] | 0, this.v6l = et[12] | 0, this.v6h = et[13] | 0, this.v7l = et[14] | 0, this.v7h = et[15] | 0, i8(r, t, 64, 16, 16);
|
|
28176
28176
|
let { key: n, personalization: s, salt: i } = t, o = 0;
|
|
28177
28177
|
if (n !== void 0 && (n = An(n), o = n.length), this.v0l ^= this.outputLen | o << 8 | 65536 | 1 << 24, i !== void 0) {
|
|
28178
28178
|
i = An(i);
|
|
@@ -28203,7 +28203,7 @@ class o8 extends i8 {
|
|
|
28203
28203
|
let { h: s, l: i } = p0(BigInt(this.length));
|
|
28204
28204
|
te[24] = et[8] ^ i, te[25] = et[9] ^ s, n && (te[28] = ~te[28], te[29] = ~te[29]);
|
|
28205
28205
|
let o = 0;
|
|
28206
|
-
const a =
|
|
28206
|
+
const a = s8;
|
|
28207
28207
|
for (let c = 0; c < 12; c++)
|
|
28208
28208
|
Dn(0, 4, 8, 12, t, r + 2 * a[o++]), Hn(0, 4, 8, 12, t, r + 2 * a[o++]), Dn(1, 5, 9, 13, t, r + 2 * a[o++]), Hn(1, 5, 9, 13, t, r + 2 * a[o++]), Dn(2, 6, 10, 14, t, r + 2 * a[o++]), Hn(2, 6, 10, 14, t, r + 2 * a[o++]), Dn(3, 7, 11, 15, t, r + 2 * a[o++]), Hn(3, 7, 11, 15, t, r + 2 * a[o++]), Dn(0, 5, 10, 15, t, r + 2 * a[o++]), Hn(0, 5, 10, 15, t, r + 2 * a[o++]), Dn(1, 6, 11, 12, t, r + 2 * a[o++]), Hn(1, 6, 11, 12, t, r + 2 * a[o++]), Dn(2, 7, 8, 13, t, r + 2 * a[o++]), Hn(2, 7, 8, 13, t, r + 2 * a[o++]), Dn(3, 4, 9, 14, t, r + 2 * a[o++]), Hn(3, 4, 9, 14, t, r + 2 * a[o++]);
|
|
28209
28209
|
this.v0l ^= te[0] ^ te[16], this.v0h ^= te[1] ^ te[17], this.v1l ^= te[2] ^ te[18], this.v1h ^= te[3] ^ te[19], this.v2l ^= te[4] ^ te[20], this.v2h ^= te[5] ^ te[21], this.v3l ^= te[6] ^ te[22], this.v3h ^= te[7] ^ te[23], this.v4l ^= te[8] ^ te[24], this.v4h ^= te[9] ^ te[25], this.v5l ^= te[10] ^ te[26], this.v5h ^= te[11] ^ te[27], this.v6l ^= te[12] ^ te[28], this.v6h ^= te[13] ^ te[29], this.v7l ^= te[14] ^ te[30], this.v7h ^= te[15] ^ te[31], kr(te);
|
|
@@ -28212,15 +28212,15 @@ class o8 extends i8 {
|
|
|
28212
28212
|
this.destroyed = !0, kr(this.buffer32), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
28213
28213
|
}
|
|
28214
28214
|
}
|
|
28215
|
-
const
|
|
28216
|
-
function
|
|
28215
|
+
const c8 = /* @__PURE__ */ zv((e) => new a8(e)), $1 = c8;
|
|
28216
|
+
function u8(e, t, r) {
|
|
28217
28217
|
const n = he.Address.serialize(e).toBytes(), s = he.TypeTag.serialize(t).toBytes(), i = he.u64().serialize(r.length).toBytes(), o = $1.create({
|
|
28218
28218
|
dkLen: 32
|
|
28219
28219
|
});
|
|
28220
28220
|
return o.update(new Uint8Array([240])), o.update(n), o.update(i), o.update(r), o.update(s), `0x${Bi(o.digest().slice(0, 32))}`;
|
|
28221
28221
|
}
|
|
28222
|
-
const
|
|
28223
|
-
function
|
|
28222
|
+
const f8 = "object", l8 = "ID", d8 = "ascii", h8 = "String", p8 = "string", y8 = "String", m8 = "option", g8 = "Option";
|
|
28223
|
+
function b8(e) {
|
|
28224
28224
|
const t = typeof e.body == "object" && "datatype" in e.body ? e.body.datatype : null;
|
|
28225
28225
|
return !!t && Ee(t.package) === Ee("0x2") && t.module === "tx_context" && t.type === "TxContext";
|
|
28226
28226
|
}
|
|
@@ -28257,20 +28257,20 @@ function cd(e) {
|
|
|
28257
28257
|
}
|
|
28258
28258
|
if ("datatype" in e) {
|
|
28259
28259
|
const t = Ee(e.datatype.package);
|
|
28260
|
-
if (t === Ee(
|
|
28261
|
-
if (e.datatype.module ===
|
|
28260
|
+
if (t === Ee(t8)) {
|
|
28261
|
+
if (e.datatype.module === d8 && e.datatype.type === h8 || e.datatype.module === p8 && e.datatype.type === y8)
|
|
28262
28262
|
return he.String;
|
|
28263
|
-
if (e.datatype.module ===
|
|
28263
|
+
if (e.datatype.module === m8 && e.datatype.type === g8) {
|
|
28264
28264
|
const r = cd(e.datatype.typeParameters[0]);
|
|
28265
28265
|
return r ? he.vector(r) : null;
|
|
28266
28266
|
}
|
|
28267
28267
|
}
|
|
28268
|
-
if (t === Ee(R1) && e.datatype.module ===
|
|
28268
|
+
if (t === Ee(R1) && e.datatype.module === f8 && e.datatype.type === l8)
|
|
28269
28269
|
return he.Address;
|
|
28270
28270
|
}
|
|
28271
28271
|
return null;
|
|
28272
28272
|
}
|
|
28273
|
-
function
|
|
28273
|
+
function w8(e) {
|
|
28274
28274
|
return typeof e == "object" && "Reference" in e ? {
|
|
28275
28275
|
ref: "&",
|
|
28276
28276
|
body: So(e.Reference)
|
|
@@ -28319,23 +28319,23 @@ function So(e) {
|
|
|
28319
28319
|
return { typeParameter: e.TypeParameter };
|
|
28320
28320
|
throw new Error(`Unexpected type ${JSON.stringify(e)}`);
|
|
28321
28321
|
}
|
|
28322
|
-
const
|
|
28322
|
+
const v8 = 50, E8 = 1000n, A8 = 5e10;
|
|
28323
28323
|
function N1(e) {
|
|
28324
28324
|
return async function(r, n, s) {
|
|
28325
|
-
return await
|
|
28325
|
+
return await k8(r, e), await T8(r, e), n.onlyTransactionKind || (await S8(r, e), await x8(r, e), await _8(r, e)), await s();
|
|
28326
28326
|
};
|
|
28327
28327
|
}
|
|
28328
|
-
async function
|
|
28328
|
+
async function S8(e, t) {
|
|
28329
28329
|
e.gasConfig.price || (e.gasConfig.price = String(await t.getReferenceGasPrice()));
|
|
28330
28330
|
}
|
|
28331
|
-
async function
|
|
28331
|
+
async function x8(e, t) {
|
|
28332
28332
|
if (e.gasConfig.budget)
|
|
28333
28333
|
return;
|
|
28334
28334
|
const r = await t.dryRunTransactionBlock({
|
|
28335
28335
|
transactionBlock: e.build({
|
|
28336
28336
|
overrides: {
|
|
28337
28337
|
gasData: {
|
|
28338
|
-
budget: String(
|
|
28338
|
+
budget: String(A8),
|
|
28339
28339
|
payment: []
|
|
28340
28340
|
}
|
|
28341
28341
|
}
|
|
@@ -28346,16 +28346,16 @@ async function S8(e, t) {
|
|
|
28346
28346
|
`Dry run failed, could not automatically determine a budget: ${r.effects.status.error}`,
|
|
28347
28347
|
{ cause: r }
|
|
28348
28348
|
);
|
|
28349
|
-
const n =
|
|
28349
|
+
const n = E8 * BigInt(e.gasConfig.price || 1n), s = BigInt(r.effects.gasUsed.computationCost) + n, i = s + BigInt(r.effects.gasUsed.storageCost) - BigInt(r.effects.gasUsed.storageRebate);
|
|
28350
28350
|
e.gasConfig.budget = String(
|
|
28351
28351
|
i > s ? i : s
|
|
28352
28352
|
);
|
|
28353
28353
|
}
|
|
28354
|
-
async function
|
|
28354
|
+
async function _8(e, t) {
|
|
28355
28355
|
if (!e.gasConfig.payment) {
|
|
28356
28356
|
const n = (await t.getCoins({
|
|
28357
28357
|
owner: e.gasConfig.owner || e.sender,
|
|
28358
|
-
coinType:
|
|
28358
|
+
coinType: n8
|
|
28359
28359
|
})).data.filter((s) => !e.inputs.find((o) => {
|
|
28360
28360
|
var a;
|
|
28361
28361
|
return (a = o.Object) != null && a.ImmOrOwnedObject ? s.coinObjectId === o.Object.ImmOrOwnedObject.objectId : !1;
|
|
@@ -28369,7 +28369,7 @@ async function x8(e, t) {
|
|
|
28369
28369
|
e.gasConfig.payment = n.map((s) => Ve(is, s));
|
|
28370
28370
|
}
|
|
28371
28371
|
}
|
|
28372
|
-
async function
|
|
28372
|
+
async function T8(e, t) {
|
|
28373
28373
|
const r = e.inputs.filter((u) => {
|
|
28374
28374
|
var l;
|
|
28375
28375
|
return u.UnresolvedObject && !(u.UnresolvedObject.version || (l = u.UnresolvedObject) != null && l.initialSharedVersion);
|
|
@@ -28377,7 +28377,7 @@ async function _8(e, t) {
|
|
|
28377
28377
|
...new Set(
|
|
28378
28378
|
r.map((u) => vn(u.UnresolvedObject.objectId))
|
|
28379
28379
|
)
|
|
28380
|
-
], s = n.length ? du(n,
|
|
28380
|
+
], s = n.length ? du(n, v8) : [], i = (await Promise.all(
|
|
28381
28381
|
s.map(
|
|
28382
28382
|
(u) => t.multiGetObjects({
|
|
28383
28383
|
ids: u,
|
|
@@ -28410,8 +28410,8 @@ async function _8(e, t) {
|
|
|
28410
28410
|
l.UnresolvedObject.initialSharedVersion ?? (m == null ? void 0 : m.initialSharedVersion) ? p = En.SharedObjectRef({
|
|
28411
28411
|
objectId: d,
|
|
28412
28412
|
initialSharedVersion: l.UnresolvedObject.initialSharedVersion || (m == null ? void 0 : m.initialSharedVersion),
|
|
28413
|
-
mutable:
|
|
28414
|
-
}) :
|
|
28413
|
+
mutable: I8(e, u)
|
|
28414
|
+
}) : P8(e, u) && (p = En.ReceivingRef(
|
|
28415
28415
|
{
|
|
28416
28416
|
objectId: d,
|
|
28417
28417
|
digest: l.UnresolvedObject.digest ?? (m == null ? void 0 : m.digest),
|
|
@@ -28424,7 +28424,7 @@ async function _8(e, t) {
|
|
|
28424
28424
|
});
|
|
28425
28425
|
}
|
|
28426
28426
|
}
|
|
28427
|
-
async function
|
|
28427
|
+
async function k8(e, t) {
|
|
28428
28428
|
const { inputs: r, commands: n } = e, s = [], i = /* @__PURE__ */ new Set();
|
|
28429
28429
|
n.forEach((a) => {
|
|
28430
28430
|
if (a.MoveCall) {
|
|
@@ -28448,7 +28448,7 @@ async function T8(e, t) {
|
|
|
28448
28448
|
});
|
|
28449
28449
|
o.set(
|
|
28450
28450
|
a,
|
|
28451
|
-
l.parameters.map((p) =>
|
|
28451
|
+
l.parameters.map((p) => w8(p))
|
|
28452
28452
|
);
|
|
28453
28453
|
})
|
|
28454
28454
|
), s.length && await Promise.all(
|
|
@@ -28458,7 +28458,7 @@ async function T8(e, t) {
|
|
|
28458
28458
|
);
|
|
28459
28459
|
if (!c)
|
|
28460
28460
|
return;
|
|
28461
|
-
const u = c.length > 0 &&
|
|
28461
|
+
const u = c.length > 0 && b8(c.at(-1)) ? c.slice(0, c.length - 1) : c;
|
|
28462
28462
|
a._argumentTypes = u;
|
|
28463
28463
|
})
|
|
28464
28464
|
), n.forEach((a) => {
|
|
@@ -28500,7 +28500,7 @@ async function T8(e, t) {
|
|
|
28500
28500
|
}
|
|
28501
28501
|
});
|
|
28502
28502
|
}
|
|
28503
|
-
function
|
|
28503
|
+
function I8(e, t) {
|
|
28504
28504
|
let r = !1;
|
|
28505
28505
|
return e.getInputUses(t, (n, s) => {
|
|
28506
28506
|
if (s.MoveCall && s.MoveCall._argumentTypes) {
|
|
@@ -28510,26 +28510,26 @@ function k8(e, t) {
|
|
|
28510
28510
|
(s.$kind === "MakeMoveVec" || s.$kind === "MergeCoins" || s.$kind === "SplitCoins" || s.$kind === "TransferObjects") && (r = !0);
|
|
28511
28511
|
}), r;
|
|
28512
28512
|
}
|
|
28513
|
-
function
|
|
28513
|
+
function P8(e, t) {
|
|
28514
28514
|
let r = !1;
|
|
28515
28515
|
return e.getInputUses(t, (n, s) => {
|
|
28516
28516
|
if (s.MoveCall && s.MoveCall._argumentTypes) {
|
|
28517
28517
|
const i = s.MoveCall.arguments.indexOf(n);
|
|
28518
|
-
r =
|
|
28518
|
+
r = O8(s.MoveCall._argumentTypes[i]) || r;
|
|
28519
28519
|
}
|
|
28520
28520
|
}), r;
|
|
28521
28521
|
}
|
|
28522
|
-
function
|
|
28522
|
+
function O8(e) {
|
|
28523
28523
|
return typeof e.body != "object" || !("datatype" in e.body) ? !1 : e.body.datatype.package === "0x2" && e.body.datatype.module === "transfer" && e.body.datatype.type === "Receiving";
|
|
28524
28524
|
}
|
|
28525
28525
|
function M1(e, t) {
|
|
28526
28526
|
return !!(e.inputs.some((r) => r.UnresolvedObject || r.UnresolvedPure) || !t.onlyTransactionKind && (!e.gasConfig.price || !e.gasConfig.budget || !e.gasConfig.payment));
|
|
28527
28527
|
}
|
|
28528
|
-
async function
|
|
28528
|
+
async function B8(e, t, r) {
|
|
28529
28529
|
var i;
|
|
28530
|
-
if (
|
|
28530
|
+
if (R8(e), !M1(e, t))
|
|
28531
28531
|
return await Cm(e), r();
|
|
28532
|
-
const n =
|
|
28532
|
+
const n = C8(t);
|
|
28533
28533
|
return (((i = n.core) == null ? void 0 : i.resolveTransactionPlugin()) ?? N1(n))(e, t, async () => {
|
|
28534
28534
|
await Cm(e), await r();
|
|
28535
28535
|
});
|
|
@@ -28544,14 +28544,14 @@ function Cm(e) {
|
|
|
28544
28544
|
);
|
|
28545
28545
|
});
|
|
28546
28546
|
}
|
|
28547
|
-
function
|
|
28547
|
+
function C8(e) {
|
|
28548
28548
|
if (!e.client)
|
|
28549
28549
|
throw new Error(
|
|
28550
28550
|
"No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
|
|
28551
28551
|
);
|
|
28552
28552
|
return e.client;
|
|
28553
28553
|
}
|
|
28554
|
-
function
|
|
28554
|
+
function R8(e) {
|
|
28555
28555
|
for (const t of e.commands)
|
|
28556
28556
|
switch (t.$kind) {
|
|
28557
28557
|
case "SplitCoins":
|
|
@@ -28570,7 +28570,7 @@ function Rm(e, t, r) {
|
|
|
28570
28570
|
const n = r.inputs[e.Input];
|
|
28571
28571
|
n.$kind === "UnresolvedPure" && (r.inputs[e.Input] = En.Pure(t.serialize(n.UnresolvedPure.value)));
|
|
28572
28572
|
}
|
|
28573
|
-
function
|
|
28573
|
+
function $8(e) {
|
|
28574
28574
|
function t(r) {
|
|
28575
28575
|
return e(r);
|
|
28576
28576
|
}
|
|
@@ -28580,7 +28580,7 @@ function R8(e) {
|
|
|
28580
28580
|
arguments: n === null ? [] : [s.object(n)]
|
|
28581
28581
|
}), t;
|
|
28582
28582
|
}
|
|
28583
|
-
function
|
|
28583
|
+
function N8(e) {
|
|
28584
28584
|
function t(r, n) {
|
|
28585
28585
|
if (typeof r == "string")
|
|
28586
28586
|
return e(Ao(r).serialize(n));
|
|
@@ -28592,7 +28592,7 @@ function $8(e) {
|
|
|
28592
28592
|
he.vector(Ao(r)).serialize(n)
|
|
28593
28593
|
), t.option = (r, n) => e(he.option(Ao(r)).serialize(n)), t;
|
|
28594
28594
|
}
|
|
28595
|
-
function
|
|
28595
|
+
function M8(e, t) {
|
|
28596
28596
|
const r = Array.from(`${e}::`).map((s) => s.charCodeAt(0)), n = new Uint8Array(r.length + t.length);
|
|
28597
28597
|
return n.set(r), n.set(t, r.length), $1(n, { dkLen: 32 });
|
|
28598
28598
|
}
|
|
@@ -28640,7 +28640,7 @@ class $t {
|
|
|
28640
28640
|
});
|
|
28641
28641
|
}
|
|
28642
28642
|
static restore(t) {
|
|
28643
|
-
return t.version === 2 ? new $t(Ve(ec, t)) : new $t(Ve(ec,
|
|
28643
|
+
return t.version === 2 ? new $t(Ve(ec, t)) : new $t(Ve(ec, q3(t)));
|
|
28644
28644
|
}
|
|
28645
28645
|
/**
|
|
28646
28646
|
* Generate transaction digest.
|
|
@@ -28649,7 +28649,7 @@ class $t {
|
|
|
28649
28649
|
* @returns transaction digest.
|
|
28650
28650
|
*/
|
|
28651
28651
|
static getDigestFromBytes(t) {
|
|
28652
|
-
const r =
|
|
28652
|
+
const r = M8("TransactionData", t);
|
|
28653
28653
|
return lu(r);
|
|
28654
28654
|
}
|
|
28655
28655
|
// @deprecated use gasData instead
|
|
@@ -28808,15 +28808,15 @@ function Nm(e) {
|
|
|
28808
28808
|
var U1 = (e) => {
|
|
28809
28809
|
throw TypeError(e);
|
|
28810
28810
|
}, Rh = (e, t, r) => t.has(e) || U1("Cannot " + r), rt = (e, t, r) => (Rh(e, t, "read from private field"), r ? r.call(e) : t.get(e)), eo = (e, t, r) => t.has(e) ? U1("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Da = (e, t, r, n) => (Rh(e, t, "write to private field"), t.set(e, r), r), mu = (e, t, r) => (Rh(e, t, "access private method"), r), Qo, On, ea, Wn, Wr, ud, fd, F1, j1, $h;
|
|
28811
|
-
const
|
|
28811
|
+
const U8 = "/", F8 = {
|
|
28812
28812
|
"Mvr-Source": `@mysten/sui@${Bw}`
|
|
28813
28813
|
};
|
|
28814
|
-
class
|
|
28814
|
+
class j8 {
|
|
28815
28815
|
constructor({ cache: t, url: r, pageSize: n = 50, overrides: s }) {
|
|
28816
28816
|
eo(this, Wr), eo(this, Qo), eo(this, On), eo(this, ea), eo(this, Wn), Da(this, Qo, t), Da(this, On, r), Da(this, ea, n), Da(this, Wn, {
|
|
28817
28817
|
packages: s == null ? void 0 : s.packages,
|
|
28818
28818
|
types: s == null ? void 0 : s.types
|
|
28819
|
-
}),
|
|
28819
|
+
}), L8(rt(this, Wn));
|
|
28820
28820
|
}
|
|
28821
28821
|
async resolvePackage({
|
|
28822
28822
|
package: t
|
|
@@ -28963,7 +28963,7 @@ $h = async function(e, t) {
|
|
|
28963
28963
|
method: "POST",
|
|
28964
28964
|
headers: {
|
|
28965
28965
|
"Content-Type": "application/json",
|
|
28966
|
-
...
|
|
28966
|
+
...F8
|
|
28967
28967
|
},
|
|
28968
28968
|
body: JSON.stringify(t)
|
|
28969
28969
|
});
|
|
@@ -28973,7 +28973,7 @@ $h = async function(e, t) {
|
|
|
28973
28973
|
}
|
|
28974
28974
|
return r.json();
|
|
28975
28975
|
};
|
|
28976
|
-
function
|
|
28976
|
+
function L8(e) {
|
|
28977
28977
|
if (e != null && e.packages)
|
|
28978
28978
|
for (const [t, r] of Object.entries(e.packages)) {
|
|
28979
28979
|
if (!zt(t))
|
|
@@ -29009,12 +29009,12 @@ function dd(e, t) {
|
|
|
29009
29009
|
});
|
|
29010
29010
|
}
|
|
29011
29011
|
function Nt(e) {
|
|
29012
|
-
return e.includes(
|
|
29012
|
+
return e.includes(U8) || e.includes("@") || e.includes(".sui");
|
|
29013
29013
|
}
|
|
29014
29014
|
function L1(e) {
|
|
29015
29015
|
return typeof e == "object" && "address" in e && "module" in e && "name" in e && "typeParams" in e;
|
|
29016
29016
|
}
|
|
29017
|
-
function
|
|
29017
|
+
function D8(e) {
|
|
29018
29018
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
29019
29019
|
for (const n of e.commands)
|
|
29020
29020
|
switch (n.$kind) {
|
|
@@ -29039,7 +29039,7 @@ function L8(e) {
|
|
|
29039
29039
|
types: [...r]
|
|
29040
29040
|
};
|
|
29041
29041
|
}
|
|
29042
|
-
function
|
|
29042
|
+
function H8(e, t) {
|
|
29043
29043
|
var r;
|
|
29044
29044
|
for (const n of e.commands) {
|
|
29045
29045
|
if ((r = n.MakeMoveVec) != null && r.type) {
|
|
@@ -29069,22 +29069,22 @@ function Mm(e) {
|
|
|
29069
29069
|
const t = /* @__PURE__ */ new Set();
|
|
29070
29070
|
for (const r of e)
|
|
29071
29071
|
if (Nt(r)) {
|
|
29072
|
-
if (!
|
|
29072
|
+
if (!W5(r)) throw new Error(`Invalid type with names: ${r}`);
|
|
29073
29073
|
t.add(r);
|
|
29074
29074
|
}
|
|
29075
29075
|
return t;
|
|
29076
29076
|
}
|
|
29077
|
-
const
|
|
29078
|
-
const s =
|
|
29077
|
+
const z8 = (e) => async (t, r, n) => {
|
|
29078
|
+
const s = D8(t);
|
|
29079
29079
|
if (s.types.length === 0 && s.packages.length === 0)
|
|
29080
29080
|
return n();
|
|
29081
|
-
const i = await
|
|
29081
|
+
const i = await V8(r).core.mvr.resolve({
|
|
29082
29082
|
types: s.types,
|
|
29083
29083
|
packages: s.packages
|
|
29084
29084
|
});
|
|
29085
|
-
|
|
29085
|
+
H8(t, i), await n();
|
|
29086
29086
|
};
|
|
29087
|
-
function
|
|
29087
|
+
function V8(e) {
|
|
29088
29088
|
if (!e.client)
|
|
29089
29089
|
throw new Error(
|
|
29090
29090
|
"No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
|
|
@@ -29149,7 +29149,7 @@ function to() {
|
|
|
29149
29149
|
}
|
|
29150
29150
|
const W1 = class pd {
|
|
29151
29151
|
constructor() {
|
|
29152
|
-
jr(this, We), jr(this, As), jr(this, Os), jr(this, gn, /* @__PURE__ */ new Map()), jr(this, Yr, []), jr(this, ir, []), jr(this, or, /* @__PURE__ */ new Set()), jr(this, Ar, /* @__PURE__ */ new Set()), jr(this, Kn, /* @__PURE__ */ new Map()), jr(this, ae), this.object =
|
|
29152
|
+
jr(this, We), jr(this, As), jr(this, Os), jr(this, gn, /* @__PURE__ */ new Map()), jr(this, Yr, []), jr(this, ir, []), jr(this, or, /* @__PURE__ */ new Set()), jr(this, Ar, /* @__PURE__ */ new Set()), jr(this, Kn, /* @__PURE__ */ new Map()), jr(this, ae), this.object = $8(
|
|
29153
29153
|
(r) => {
|
|
29154
29154
|
var i, o;
|
|
29155
29155
|
if (typeof r == "function")
|
|
@@ -29262,7 +29262,7 @@ const W1 = class pd {
|
|
|
29262
29262
|
get pure() {
|
|
29263
29263
|
return Object.defineProperty(this, "pure", {
|
|
29264
29264
|
enumerable: !1,
|
|
29265
|
-
value:
|
|
29265
|
+
value: N8((t) => _h(t) ? tt(this, We, rc).call(this, "pure", {
|
|
29266
29266
|
$kind: "Pure",
|
|
29267
29267
|
Pure: {
|
|
29268
29268
|
bytes: t.toBase64()
|
|
@@ -29407,7 +29407,7 @@ const W1 = class pd {
|
|
|
29407
29407
|
const r = this.isFullyResolved();
|
|
29408
29408
|
return JSON.stringify(
|
|
29409
29409
|
Ve(
|
|
29410
|
-
|
|
29410
|
+
Q3,
|
|
29411
29411
|
r ? {
|
|
29412
29412
|
...Y(this, ae).snapshot(),
|
|
29413
29413
|
digest: Y(this, ae).getDigest()
|
|
@@ -29459,7 +29459,7 @@ const W1 = class pd {
|
|
|
29459
29459
|
throw new Error(`Missing intent resolver for ${i}`);
|
|
29460
29460
|
n.push(Y(this, gn).get(i));
|
|
29461
29461
|
}
|
|
29462
|
-
n.push(
|
|
29462
|
+
n.push(z8()), await tt(this, We, Mh).call(this, n, t);
|
|
29463
29463
|
}
|
|
29464
29464
|
};
|
|
29465
29465
|
As = /* @__PURE__ */ new WeakMap();
|
|
@@ -29510,7 +29510,7 @@ Ec = function(e) {
|
|
|
29510
29510
|
hd = async function(e) {
|
|
29511
29511
|
if (!e.onlyTransactionKind && !Y(this, ae).sender)
|
|
29512
29512
|
throw new Error("Missing transaction sender");
|
|
29513
|
-
await tt(this, We, Mh).call(this, [...Y(this, Os),
|
|
29513
|
+
await tt(this, We, Mh).call(this, [...Y(this, Os), B8], e);
|
|
29514
29514
|
};
|
|
29515
29515
|
Mh = async function(e, t) {
|
|
29516
29516
|
const r = (n) => {
|
|
@@ -29590,16 +29590,16 @@ V1 = function() {
|
|
|
29590
29590
|
}
|
|
29591
29591
|
};
|
|
29592
29592
|
let K1 = W1;
|
|
29593
|
-
const
|
|
29593
|
+
const q8 = {
|
|
29594
29594
|
mainnet: "https://mainnet.mvr.mystenlabs.com",
|
|
29595
29595
|
testnet: "https://testnet.mvr.mystenlabs.com"
|
|
29596
29596
|
};
|
|
29597
|
-
class
|
|
29597
|
+
class G8 extends t1 {
|
|
29598
29598
|
constructor(t) {
|
|
29599
29599
|
var r, n, s;
|
|
29600
|
-
super(t), this.core = this, this.mvr = new
|
|
29600
|
+
super(t), this.core = this, this.mvr = new j8({
|
|
29601
29601
|
cache: this.cache.scope("core.mvr"),
|
|
29602
|
-
url: ((r = t.mvr) == null ? void 0 : r.url) ??
|
|
29602
|
+
url: ((r = t.mvr) == null ? void 0 : r.url) ?? q8[this.network],
|
|
29603
29603
|
pageSize: (n = t.mvr) == null ? void 0 : n.pageSize,
|
|
29604
29604
|
overrides: (s = t.mvr) == null ? void 0 : s.overrides
|
|
29605
29605
|
});
|
|
@@ -29613,7 +29613,7 @@ class q8 extends t1 {
|
|
|
29613
29613
|
return { object: n };
|
|
29614
29614
|
}
|
|
29615
29615
|
async getDynamicField(t) {
|
|
29616
|
-
const r =
|
|
29616
|
+
const r = u8(
|
|
29617
29617
|
t.parentId,
|
|
29618
29618
|
Er.parseFromStr(t.name.type),
|
|
29619
29619
|
t.name.bcs
|
|
@@ -29665,9 +29665,9 @@ class q8 extends t1 {
|
|
|
29665
29665
|
}
|
|
29666
29666
|
}
|
|
29667
29667
|
}
|
|
29668
|
-
class
|
|
29668
|
+
class W8 extends Error {
|
|
29669
29669
|
}
|
|
29670
|
-
class Xn extends
|
|
29670
|
+
class Xn extends W8 {
|
|
29671
29671
|
constructor(t, r) {
|
|
29672
29672
|
super(r), this.code = t;
|
|
29673
29673
|
}
|
|
@@ -29693,29 +29693,29 @@ class Xn extends G8 {
|
|
|
29693
29693
|
}
|
|
29694
29694
|
}
|
|
29695
29695
|
}
|
|
29696
|
-
function
|
|
29696
|
+
function K8(e) {
|
|
29697
29697
|
return {
|
|
29698
29698
|
...$t.fromBytes(e).snapshot(),
|
|
29699
29699
|
bcs: e
|
|
29700
29700
|
};
|
|
29701
29701
|
}
|
|
29702
|
-
function
|
|
29702
|
+
function X8(e) {
|
|
29703
29703
|
const t = he.TransactionEffects.parse(e);
|
|
29704
29704
|
switch (t.$kind) {
|
|
29705
29705
|
case "V1":
|
|
29706
|
-
return
|
|
29706
|
+
return Y8({ effects: t.V1 });
|
|
29707
29707
|
case "V2":
|
|
29708
|
-
return
|
|
29708
|
+
return Z8({ bytes: e, effects: t.V2 });
|
|
29709
29709
|
default:
|
|
29710
29710
|
throw new Error(
|
|
29711
29711
|
`Unknown transaction effects version: ${t.$kind}`
|
|
29712
29712
|
);
|
|
29713
29713
|
}
|
|
29714
29714
|
}
|
|
29715
|
-
function
|
|
29715
|
+
function Y8(e) {
|
|
29716
29716
|
throw new Error("V1 effects are not supported yet");
|
|
29717
29717
|
}
|
|
29718
|
-
function
|
|
29718
|
+
function Z8({
|
|
29719
29719
|
bytes: e,
|
|
29720
29720
|
effects: t
|
|
29721
29721
|
}) {
|
|
@@ -29768,13 +29768,13 @@ function Y8({
|
|
|
29768
29768
|
}
|
|
29769
29769
|
var X1 = (e) => {
|
|
29770
29770
|
throw TypeError(e);
|
|
29771
|
-
}, Y1 = (e, t, r) => t.has(e) || X1("Cannot " + r), Ht = (e, t, r) => (Y1(e, t, "read from private field"), r ? r.call(e) : t.get(e)),
|
|
29772
|
-
class
|
|
29771
|
+
}, Y1 = (e, t, r) => t.has(e) || X1("Cannot " + r), Ht = (e, t, r) => (Y1(e, t, "read from private field"), r ? r.call(e) : t.get(e)), J8 = (e, t, r) => t.has(e) ? X1("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Q8 = (e, t, r, n) => (Y1(e, t, "write to private field"), t.set(e, r), r), ht;
|
|
29772
|
+
class eO extends G8 {
|
|
29773
29773
|
constructor({
|
|
29774
29774
|
jsonRpcClient: t,
|
|
29775
29775
|
mvr: r
|
|
29776
29776
|
}) {
|
|
29777
|
-
super({ network: t.network, base: t, mvr: r }),
|
|
29777
|
+
super({ network: t.network, base: t, mvr: r }), J8(this, ht), Q8(this, ht, t);
|
|
29778
29778
|
}
|
|
29779
29779
|
async getObjects(t) {
|
|
29780
29780
|
const r = du(t.objectIds, 50), n = [];
|
|
@@ -29834,7 +29834,7 @@ class Q8 extends q8 {
|
|
|
29834
29834
|
balance: n.balance,
|
|
29835
29835
|
type: `0x2::coin::Coin<${n.coinType}>`,
|
|
29836
29836
|
content: Promise.resolve(
|
|
29837
|
-
|
|
29837
|
+
nO.serialize({
|
|
29838
29838
|
id: n.coinObjectId,
|
|
29839
29839
|
balance: {
|
|
29840
29840
|
value: n.balance
|
|
@@ -29913,7 +29913,7 @@ class Q8 extends q8 {
|
|
|
29913
29913
|
const r = K1.from(t.transaction), n = await Ht(this, ht).dryRunTransactionBlock({
|
|
29914
29914
|
transactionBlock: t.transaction,
|
|
29915
29915
|
signal: t.signal
|
|
29916
|
-
}), { effects: s, objectTypes: i } =
|
|
29916
|
+
}), { effects: s, objectTypes: i } = tO({
|
|
29917
29917
|
effects: n.effects,
|
|
29918
29918
|
objectChanges: n.objectChanges
|
|
29919
29919
|
});
|
|
@@ -29924,7 +29924,7 @@ class Q8 extends q8 {
|
|
|
29924
29924
|
effects: s,
|
|
29925
29925
|
objectTypes: Promise.resolve(i),
|
|
29926
29926
|
signatures: [],
|
|
29927
|
-
transaction:
|
|
29927
|
+
transaction: K8(t.transaction)
|
|
29928
29928
|
}
|
|
29929
29929
|
};
|
|
29930
29930
|
}
|
|
@@ -30038,7 +30038,7 @@ function jm(e) {
|
|
|
30038
30038
|
return {
|
|
30039
30039
|
digest: e.digest,
|
|
30040
30040
|
epoch: ((o = e.effects) == null ? void 0 : o.executedEpoch) ?? null,
|
|
30041
|
-
effects:
|
|
30041
|
+
effects: X8(new Uint8Array(e.rawEffects)),
|
|
30042
30042
|
objectTypes: Promise.resolve(r),
|
|
30043
30043
|
transaction: {
|
|
30044
30044
|
...s,
|
|
@@ -30047,7 +30047,7 @@ function jm(e) {
|
|
|
30047
30047
|
signatures: t.txSignatures
|
|
30048
30048
|
};
|
|
30049
30049
|
}
|
|
30050
|
-
function
|
|
30050
|
+
function tO({
|
|
30051
30051
|
bytes: e,
|
|
30052
30052
|
effects: t,
|
|
30053
30053
|
objectChanges: r
|
|
@@ -30181,25 +30181,25 @@ function eO({
|
|
|
30181
30181
|
}
|
|
30182
30182
|
};
|
|
30183
30183
|
}
|
|
30184
|
-
const
|
|
30184
|
+
const rO = he.struct("Balance", {
|
|
30185
30185
|
value: he.u64()
|
|
30186
|
-
}),
|
|
30186
|
+
}), nO = he.struct("Coin", {
|
|
30187
30187
|
id: he.Address,
|
|
30188
|
-
balance:
|
|
30189
|
-
}),
|
|
30190
|
-
class
|
|
30188
|
+
balance: rO
|
|
30189
|
+
}), sO = Symbol.for("@mysten/SuiClient");
|
|
30190
|
+
class iO extends t1 {
|
|
30191
30191
|
/**
|
|
30192
30192
|
* Establish a connection to a Sui RPC endpoint
|
|
30193
30193
|
*
|
|
30194
30194
|
* @param options configuration options for the API Client
|
|
30195
30195
|
*/
|
|
30196
30196
|
constructor(t) {
|
|
30197
|
-
super({ network: t.network ?? "unknown" }), this.jsonRpc = this, this.transport = t.transport ?? new
|
|
30197
|
+
super({ network: t.network ?? "unknown" }), this.jsonRpc = this, this.transport = t.transport ?? new o5({ url: t.url }), this.core = new eO({
|
|
30198
30198
|
jsonRpcClient: this,
|
|
30199
30199
|
mvr: t.mvr
|
|
30200
30200
|
});
|
|
30201
30201
|
}
|
|
30202
|
-
get [
|
|
30202
|
+
get [sO]() {
|
|
30203
30203
|
return !0;
|
|
30204
30204
|
}
|
|
30205
30205
|
async getRpcApiVersion({ signal: t } = {}) {
|
|
@@ -30855,7 +30855,7 @@ class sO extends t1 {
|
|
|
30855
30855
|
return {
|
|
30856
30856
|
hasNextPage: s,
|
|
30857
30857
|
nextCursor: n,
|
|
30858
|
-
data: i.map((o) =>
|
|
30858
|
+
data: i.map((o) => z5(o, t))
|
|
30859
30859
|
};
|
|
30860
30860
|
}
|
|
30861
30861
|
async getProtocolConfig(t) {
|
|
@@ -30908,9 +30908,9 @@ class sO extends t1 {
|
|
|
30908
30908
|
};
|
|
30909
30909
|
}
|
|
30910
30910
|
}
|
|
30911
|
-
class
|
|
30911
|
+
class oO {
|
|
30912
30912
|
constructor(t, r, n) {
|
|
30913
|
-
this.client = new
|
|
30913
|
+
this.client = new iO({ url: a5(n) }), this.url = t instanceof Ct ? t : new Ct(t), this.account = r, this.network = n;
|
|
30914
30914
|
}
|
|
30915
30915
|
get htlcActorAddress() {
|
|
30916
30916
|
return "accounts" in this.account ? this.account.accounts[0].address : this.account.toSuiAddress();
|
|
@@ -30918,49 +30918,49 @@ class iO {
|
|
|
30918
30918
|
async initiate(t) {
|
|
30919
30919
|
var r, n, s;
|
|
30920
30920
|
try {
|
|
30921
|
-
const { source_swap: i } = t, o = BigInt(i.amount), a = i.asset, c = i.redeemer, f = i.secret_hash, u =
|
|
30922
|
-
|
|
30923
|
-
const [
|
|
30924
|
-
|
|
30925
|
-
target: `${Dp[this.network].packageId}::${Dp[this.network].moduleName}::
|
|
30921
|
+
const { source_swap: i } = t, o = BigInt(i.amount), a = i.asset, c = i.redeemer, f = i.secret_hash, u = new K1();
|
|
30922
|
+
u.setGasBudget(o + k_), u.setSender(this.htlcActorAddress);
|
|
30923
|
+
const [l] = u.splitCoins(u.gas, [o]);
|
|
30924
|
+
u.moveCall({
|
|
30925
|
+
target: `${Dp[this.network].packageId}::${Dp[this.network].moduleName}::initiate`,
|
|
30926
30926
|
typeArguments: [i.token_address],
|
|
30927
30927
|
arguments: [
|
|
30928
|
-
|
|
30929
|
-
|
|
30930
|
-
|
|
30931
|
-
|
|
30932
|
-
|
|
30933
|
-
|
|
30934
|
-
|
|
30935
|
-
|
|
30936
|
-
|
|
30928
|
+
u.object(a),
|
|
30929
|
+
u.pure.address(this.htlcActorAddress),
|
|
30930
|
+
u.pure.address(c),
|
|
30931
|
+
u.pure.vector("u8", Buffer.from(f, "hex")),
|
|
30932
|
+
u.pure.u64(o),
|
|
30933
|
+
u.pure.u256(i.timelock),
|
|
30934
|
+
u.pure.vector("u8", Buffer.from("")),
|
|
30935
|
+
l,
|
|
30936
|
+
u.object(r8)
|
|
30937
30937
|
]
|
|
30938
30938
|
});
|
|
30939
|
-
const
|
|
30940
|
-
transactionBlock:
|
|
30939
|
+
const p = await u.build({ client: this.client }), d = await this.client.dryRunTransactionBlock({
|
|
30940
|
+
transactionBlock: p
|
|
30941
30941
|
});
|
|
30942
|
-
if (
|
|
30943
|
-
return F(`${
|
|
30944
|
-
let
|
|
30945
|
-
if ("features" in this.account ?
|
|
30946
|
-
transaction:
|
|
30942
|
+
if (d.effects.status.status === "failure")
|
|
30943
|
+
return F(`${d.effects.status.error}`);
|
|
30944
|
+
let m;
|
|
30945
|
+
if ("features" in this.account ? m = await ((r = this.account.features[w2]) == null ? void 0 : r.signAndExecuteTransaction({
|
|
30946
|
+
transaction: u,
|
|
30947
30947
|
account: this.account.accounts[0],
|
|
30948
30948
|
chain: `sui:${this.network}`
|
|
30949
|
-
})) :
|
|
30949
|
+
})) : m = await this.client.signAndExecuteTransaction({
|
|
30950
30950
|
signer: this.account,
|
|
30951
|
-
transaction:
|
|
30951
|
+
transaction: u,
|
|
30952
30952
|
options: {
|
|
30953
30953
|
showEffects: !0
|
|
30954
30954
|
}
|
|
30955
|
-
}), !
|
|
30955
|
+
}), !m)
|
|
30956
30956
|
return F("Failed to initiate");
|
|
30957
|
-
const
|
|
30958
|
-
digest:
|
|
30957
|
+
const g = await this.client.waitForTransaction({
|
|
30958
|
+
digest: m.digest,
|
|
30959
30959
|
options: {
|
|
30960
30960
|
showEffects: !0
|
|
30961
30961
|
}
|
|
30962
30962
|
});
|
|
30963
|
-
return ((n =
|
|
30963
|
+
return ((n = g.effects) == null ? void 0 : n.status.status) === "failure" ? F(`Failed to initiate: ${(s = g.effects) == null ? void 0 : s.status.error}`) : ue(g.digest);
|
|
30964
30964
|
} catch (i) {
|
|
30965
30965
|
return F(i);
|
|
30966
30966
|
}
|
|
@@ -30993,7 +30993,7 @@ class iO {
|
|
|
30993
30993
|
}
|
|
30994
30994
|
class Z1 extends Lm {
|
|
30995
30995
|
constructor(t) {
|
|
30996
|
-
super(), this.environment = Sr.TESTNET, this.getOrderThreshold = 20, this.refundSacpCache = /* @__PURE__ */ new Map(), this.bitcoinRedeemCache = new
|
|
30996
|
+
super(), this.environment = Sr.TESTNET, this.getOrderThreshold = 20, this.refundSacpCache = /* @__PURE__ */ new Map(), this.bitcoinRedeemCache = new Vk(), this.isSecretManagementEnabled = !1;
|
|
30997
30997
|
const { api: r, environment: n } = zp(t.environment);
|
|
30998
30998
|
if (this.environment = n, this._api = r, typeof t.digestKey == "string") {
|
|
30999
30999
|
const i = jh.from(t.digestKey);
|
|
@@ -31001,8 +31001,8 @@ class Z1 extends Lm {
|
|
|
31001
31001
|
this._digestKey = i.val;
|
|
31002
31002
|
} else
|
|
31003
31003
|
this._digestKey = t.digestKey;
|
|
31004
|
-
this._quote = t.quote ?? new
|
|
31005
|
-
const s = new
|
|
31004
|
+
this._quote = t.quote ?? new Gk(this._api.quote), this._auth = t.auth ?? Lh.fromDigestKey(new Ct(this._api.auth), this._digestKey), this._orderbook = t.orderbook ?? new o2(new Ct(this._api.orderbook)), this._evmHTLC = t.htlc.evm, this._starknetHTLC = t.htlc.starknet, this._solanaHTLC = t.htlc.solana, this._suiHTLC = t.htlc.sui, this._secretManager = t.secretManager ?? pc.fromDigestKey(this._digestKey.digestKey), this.orderExecutorCache = new zk(), this._blockNumberFetcher = t.blockNumberFetcher ?? new qk(this._api.info, this.environment);
|
|
31005
|
+
const s = new PI(R_(this.environment));
|
|
31006
31006
|
this._btcWallet = pi.fromPrivateKey(
|
|
31007
31007
|
this._digestKey.digestKey,
|
|
31008
31008
|
s
|
|
@@ -31025,17 +31025,17 @@ class Z1 extends Lm {
|
|
|
31025
31025
|
"API not found, invalid environment " + t.environment
|
|
31026
31026
|
);
|
|
31027
31027
|
const s = {
|
|
31028
|
-
evm: t.wallets.evm ? new
|
|
31028
|
+
evm: t.wallets.evm ? new vI(
|
|
31029
31029
|
n.evmRelay,
|
|
31030
31030
|
t.wallets.evm,
|
|
31031
31031
|
Lh.fromDigestKey(new Ct(n.auth), r)
|
|
31032
31032
|
) : void 0,
|
|
31033
|
-
starknet: t.wallets.starknet ? new
|
|
31033
|
+
starknet: t.wallets.starknet ? new xI(
|
|
31034
31034
|
n.starknetRelay,
|
|
31035
31035
|
t.wallets.starknet,
|
|
31036
31036
|
t.environment === Sr.MAINNET ? Vt.MAINNET : Vt.TESTNET
|
|
31037
31037
|
) : void 0,
|
|
31038
|
-
solana: t.wallets.solana ? new
|
|
31038
|
+
solana: t.wallets.solana ? new YP(
|
|
31039
31039
|
t.wallets.solana,
|
|
31040
31040
|
new Ct(n.solanaRelay),
|
|
31041
31041
|
t.environment === Sr.MAINNET ? jp.mainnet : jp.testnet,
|
|
@@ -31044,7 +31044,7 @@ class Z1 extends Lm {
|
|
|
31044
31044
|
spl: t.solanaProgramAddress && t.solanaProgramAddress.spl ? t.solanaProgramAddress.spl : Lp.mainnet.spl
|
|
31045
31045
|
}
|
|
31046
31046
|
) : void 0,
|
|
31047
|
-
sui: t.wallets.sui ? new
|
|
31047
|
+
sui: t.wallets.sui ? new oO(
|
|
31048
31048
|
n.suiRelay,
|
|
31049
31049
|
t.wallets.sui,
|
|
31050
31050
|
t.environment === Sr.MAINNET ? Vt.MAINNET : Vt.TESTNET
|
|
@@ -31177,7 +31177,7 @@ class Z1 extends Lm {
|
|
|
31177
31177
|
return this._evmHTLC ? ue(this._evmHTLC.htlcActorAddress) : F("Please provide evmHTLC when initializing garden");
|
|
31178
31178
|
case Bt.Bitcoin: {
|
|
31179
31179
|
const s = await ((n = this._btcWallet) == null ? void 0 : n.getPublicKey());
|
|
31180
|
-
return !s || !
|
|
31180
|
+
return !s || !C_(s) ? F("Invalid btc public key") : ue(us(s));
|
|
31181
31181
|
}
|
|
31182
31182
|
case Bt.Solana:
|
|
31183
31183
|
return this._solanaHTLC ? ue(this._solanaHTLC.htlcActorAddress) : F("Please provide solanaHTLC when initializing garden");
|
|
@@ -31640,7 +31640,7 @@ class Z1 extends Lm {
|
|
|
31640
31640
|
}
|
|
31641
31641
|
}
|
|
31642
31642
|
}
|
|
31643
|
-
class
|
|
31643
|
+
class FO {
|
|
31644
31644
|
constructor(t, r, n) {
|
|
31645
31645
|
this.callData = new zh(hw), this.account = t, this.starknetProvider = new Hm({
|
|
31646
31646
|
nodeUrl: r || (n ? fc[n].nodeUrl : fc.mainnet.nodeUrl)
|
|
@@ -31665,7 +31665,7 @@ class UO {
|
|
|
31665
31665
|
throw new Error("Token address retrieval failed");
|
|
31666
31666
|
const s = zm.toHex(n), i = fo.uint256(BigInt(t.source_swap.amount));
|
|
31667
31667
|
try {
|
|
31668
|
-
const c = await
|
|
31668
|
+
const c = await EI(
|
|
31669
31669
|
this.account,
|
|
31670
31670
|
s,
|
|
31671
31671
|
t.source_swap.asset,
|
|
@@ -31740,7 +31740,7 @@ class UO {
|
|
|
31740
31740
|
}
|
|
31741
31741
|
}
|
|
31742
31742
|
}
|
|
31743
|
-
class
|
|
31743
|
+
class jO {
|
|
31744
31744
|
/**
|
|
31745
31745
|
* Creates a new instance of SolanaHTLC.
|
|
31746
31746
|
* @param {AnchorProvider} provider - Solana Provider (abstraction of RPC connection and a Wallet)
|
|
@@ -31860,23 +31860,23 @@ class FO {
|
|
|
31860
31860
|
export {
|
|
31861
31861
|
Vp as A,
|
|
31862
31862
|
z as B,
|
|
31863
|
-
|
|
31863
|
+
$O as C,
|
|
31864
31864
|
us as D,
|
|
31865
|
-
|
|
31865
|
+
vI as E,
|
|
31866
31866
|
zp as F,
|
|
31867
31867
|
Z1 as G,
|
|
31868
31868
|
lo as H,
|
|
31869
31869
|
dw as I,
|
|
31870
|
-
|
|
31871
|
-
|
|
31872
|
-
|
|
31873
|
-
|
|
31870
|
+
gI as J,
|
|
31871
|
+
yI as K,
|
|
31872
|
+
mI as L,
|
|
31873
|
+
pI as M,
|
|
31874
31874
|
ur as N,
|
|
31875
31875
|
Ae as O,
|
|
31876
31876
|
Cb as P,
|
|
31877
|
-
|
|
31878
|
-
|
|
31879
|
-
|
|
31877
|
+
Gk as Q,
|
|
31878
|
+
PI as R,
|
|
31879
|
+
xI as S,
|
|
31880
31880
|
pi as T,
|
|
31881
31881
|
ju as U,
|
|
31882
31882
|
fc as V,
|
|
@@ -31889,23 +31889,23 @@ export {
|
|
|
31889
31889
|
os as e,
|
|
31890
31890
|
Zr as f,
|
|
31891
31891
|
kd as g,
|
|
31892
|
-
|
|
31892
|
+
FO as h,
|
|
31893
31893
|
Nc as i,
|
|
31894
|
-
|
|
31895
|
-
|
|
31894
|
+
YP as j,
|
|
31895
|
+
jO as k,
|
|
31896
31896
|
Yd as l,
|
|
31897
|
-
|
|
31897
|
+
qk as m,
|
|
31898
31898
|
ge as n,
|
|
31899
31899
|
Fe as o,
|
|
31900
|
-
|
|
31900
|
+
NO as p,
|
|
31901
31901
|
qp as q,
|
|
31902
31902
|
lc as r,
|
|
31903
31903
|
nt as s,
|
|
31904
|
-
|
|
31905
|
-
|
|
31904
|
+
M_ as t,
|
|
31905
|
+
MO as u,
|
|
31906
31906
|
Rb as v,
|
|
31907
31907
|
pc as w,
|
|
31908
|
-
|
|
31909
|
-
|
|
31908
|
+
EI as x,
|
|
31909
|
+
AI as y,
|
|
31910
31910
|
Za as z
|
|
31911
31911
|
};
|