@gardenfi/core 3.1.1 → 3.1.3
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-BbdJQGO7.cjs → ccip-CcqqBKRt.cjs} +1 -1
- package/dist/{ccip-B0_vR103.js → ccip-CmDSvv5g.js} +1 -1
- package/dist/{index-TNTIdP13.js → index-CXBmeQii.js} +480 -458
- package/dist/{index-DniPFdOW.cjs → index-DO-nU4_X.cjs} +37 -37
- package/dist/index.cjs +1 -1
- package/dist/index.js +12 -11
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/switchOrAddNetwork.d.ts +1 -0
- package/package.json +2 -2
|
@@ -83,7 +83,7 @@ const sf = {
|
|
|
83
83
|
[$e.MAINNET]: "wss://s.altnet.rippletest.net:51233",
|
|
84
84
|
[$e.TESTNET]: "wss://s.altnet.rippletest.net:51233",
|
|
85
85
|
[$e.LOCALNET]: ""
|
|
86
|
-
},
|
|
86
|
+
}, XB = {
|
|
87
87
|
asset: $t.from(H6.base.cBBTC)
|
|
88
88
|
};
|
|
89
89
|
var _c = /* @__PURE__ */ ((t) => (t.orderCreated = "orderCreated", t.orderInitiating = "orderInitiating", t.orderInitiated = "orderInitiated", t))(_c || {}), $i = /* @__PURE__ */ ((t) => (t.SLOW = "SLOW", t.MEDIUM = "MEDIUM", t.FAST = "FAST", t))($i || {}), cn = /* @__PURE__ */ ((t) => (t.Mainnet = "Mainnet", t.Testnet = "Testnet", t.Regtest = "Regtest", t))(cn || {}), Tc = /* @__PURE__ */ ((t) => (t.ALL = "ALL", t.IN = "IN", t.OUT = "OUT", t))(Tc || {});
|
|
@@ -131,7 +131,7 @@ const Ye = (t) => t.length === 64 ? t : t.slice(2), Sv = (t) => {
|
|
|
131
131
|
return !1;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
function
|
|
134
|
+
function YB(t, e) {
|
|
135
135
|
if (!t) return !1;
|
|
136
136
|
const r = e === Lc.MAINNET ? ke.networks.bitcoin : e === Lc.TESTNET ? ke.networks.testnet : ke.networks.regtest;
|
|
137
137
|
if (!r) return !1;
|
|
@@ -142,7 +142,7 @@ function XB(t, e) {
|
|
|
142
142
|
return !1;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function JB(t, e) {
|
|
146
146
|
if (!t) return !1;
|
|
147
147
|
let r;
|
|
148
148
|
if (e === Lc.MAINNET ? r = tc.Networks.livenet : e === Lc.TESTNET ? r = tc.Networks.testnet : r = tc.Networks.testnet, !r) return !1;
|
|
@@ -12286,7 +12286,7 @@ async function Uu(t, e) {
|
|
|
12286
12286
|
});
|
|
12287
12287
|
return ne === "0x" ? { data: void 0 } : { data: ne };
|
|
12288
12288
|
} catch (ee) {
|
|
12289
|
-
const G = Nx(ee), { offchainLookup: O, offchainLookupSignature: L } = await import("./ccip-
|
|
12289
|
+
const G = Nx(ee), { offchainLookup: O, offchainLookupSignature: L } = await import("./ccip-CmDSvv5g.js");
|
|
12290
12290
|
if (t.ccipRead !== !1 && (G == null ? void 0 : G.slice(0, 10)) === L && g)
|
|
12291
12291
|
return { data: await O(t, { data: G, to: g }) };
|
|
12292
12292
|
throw F && (G == null ? void 0 : G.slice(0, 10)) === "0x101bb98d" ? new hS({ factory: p }) : z1(ee, {
|
|
@@ -20094,6 +20094,26 @@ const IT = /* @__PURE__ */ Et({
|
|
|
20094
20094
|
}
|
|
20095
20095
|
},
|
|
20096
20096
|
testnet: !1
|
|
20097
|
+
}, qT = {
|
|
20098
|
+
id: 4326,
|
|
20099
|
+
name: "MegaETH",
|
|
20100
|
+
nativeCurrency: {
|
|
20101
|
+
name: "MegaETH",
|
|
20102
|
+
symbol: "MEGA",
|
|
20103
|
+
decimals: 18
|
|
20104
|
+
},
|
|
20105
|
+
rpcUrls: {
|
|
20106
|
+
default: {
|
|
20107
|
+
http: ["https://mainnet.megaeth.com/rpc"]
|
|
20108
|
+
}
|
|
20109
|
+
},
|
|
20110
|
+
blockExplorers: {
|
|
20111
|
+
default: {
|
|
20112
|
+
name: "MegaETH Explorer",
|
|
20113
|
+
url: "https://megaeth.blockscout.com/"
|
|
20114
|
+
}
|
|
20115
|
+
},
|
|
20116
|
+
testnet: !1
|
|
20097
20117
|
}, I0 = {
|
|
20098
20118
|
ethereum: MT,
|
|
20099
20119
|
arbitrum: _T,
|
|
@@ -20120,8 +20140,9 @@ const IT = /* @__PURE__ */ Et({
|
|
|
20120
20140
|
alpen_testnet: zT,
|
|
20121
20141
|
hypercore: {},
|
|
20122
20142
|
hypercore_testnet: {},
|
|
20123
|
-
hyperliquid: _y
|
|
20124
|
-
|
|
20143
|
+
hyperliquid: _y,
|
|
20144
|
+
megaeth: qT
|
|
20145
|
+
}, WT = (t) => {
|
|
20125
20146
|
for (const [e, r] of Object.entries(I0))
|
|
20126
20147
|
if (r.id === t) return e;
|
|
20127
20148
|
return null;
|
|
@@ -20143,7 +20164,7 @@ const IT = /* @__PURE__ */ Et({
|
|
|
20143
20164
|
walletClient: o
|
|
20144
20165
|
});
|
|
20145
20166
|
} catch (o) {
|
|
20146
|
-
if (
|
|
20167
|
+
if (KT(o))
|
|
20147
20168
|
if (o.code === 4902 || o.code === -32603)
|
|
20148
20169
|
try {
|
|
20149
20170
|
await e.addChain({ chain: r });
|
|
@@ -20176,8 +20197,8 @@ const IT = /* @__PURE__ */ Et({
|
|
|
20176
20197
|
}
|
|
20177
20198
|
else
|
|
20178
20199
|
return T("Chain not supported");
|
|
20179
|
-
},
|
|
20180
|
-
class
|
|
20200
|
+
}, KT = (t) => typeof t == "object" && t != null && ("code" in t || "message" in t || "body" in t);
|
|
20201
|
+
class XT {
|
|
20181
20202
|
constructor(e, r, n) {
|
|
20182
20203
|
this.wallet = r, this.auth = n, this.url = e instanceof It ? e : new It(e), this.relayer = new gi(this.auth, this.url);
|
|
20183
20204
|
}
|
|
@@ -20218,7 +20239,7 @@ class KT {
|
|
|
20218
20239
|
}
|
|
20219
20240
|
// ------------------ INITIATE FROM API RESPONSE ------------------
|
|
20220
20241
|
async initiateFromAPI(e) {
|
|
20221
|
-
const r =
|
|
20242
|
+
const r = WT(
|
|
20222
20243
|
e.initiate_transaction.chain_id
|
|
20223
20244
|
);
|
|
20224
20245
|
if (!r) return T("Unsupported chain");
|
|
@@ -21420,7 +21441,7 @@ const Qw = [
|
|
|
21420
21441
|
}
|
|
21421
21442
|
]
|
|
21422
21443
|
}
|
|
21423
|
-
],
|
|
21444
|
+
], YT = async (t, e, r, n, s) => {
|
|
21424
21445
|
try {
|
|
21425
21446
|
const i = await Rc(
|
|
21426
21447
|
t.address,
|
|
@@ -21493,7 +21514,7 @@ const Qw = [
|
|
|
21493
21514
|
`Failed to check allowance: ${s instanceof Error ? s.message : String(s)}`
|
|
21494
21515
|
);
|
|
21495
21516
|
}
|
|
21496
|
-
},
|
|
21517
|
+
}, JT = async (t, e, r, n, s) => {
|
|
21497
21518
|
const i = await Rc(
|
|
21498
21519
|
t,
|
|
21499
21520
|
e,
|
|
@@ -21892,7 +21913,7 @@ const Qw = [
|
|
|
21892
21913
|
}
|
|
21893
21914
|
]
|
|
21894
21915
|
}
|
|
21895
|
-
],
|
|
21916
|
+
], ZT = {
|
|
21896
21917
|
StarknetDomain: [
|
|
21897
21918
|
{ name: "name", type: "shortstring" },
|
|
21898
21919
|
{ name: "version", type: "shortstring" },
|
|
@@ -21907,7 +21928,7 @@ const Qw = [
|
|
|
21907
21928
|
{ name: "verifyingContract", type: "ContractAddress" }
|
|
21908
21929
|
]
|
|
21909
21930
|
};
|
|
21910
|
-
class
|
|
21931
|
+
class QT {
|
|
21911
21932
|
constructor(e, r, n, s, i) {
|
|
21912
21933
|
this.url = e instanceof It ? e : new It(e), this.starknetProvider = new ab({
|
|
21913
21934
|
nodeUrl: i || Dc[n].nodeUrl
|
|
@@ -21931,7 +21952,7 @@ class ZT {
|
|
|
21931
21952
|
providerOrAccount: this.starknetProvider,
|
|
21932
21953
|
abi: e2,
|
|
21933
21954
|
address: i.val.htlcAddress
|
|
21934
|
-
}), o = await (a == null ? void 0 : a.token()), c = ob.toHex(o), u = await
|
|
21955
|
+
}), o = await (a == null ? void 0 : a.token()), c = ob.toHex(o), u = await JT(
|
|
21935
21956
|
this.account.address,
|
|
21936
21957
|
c,
|
|
21937
21958
|
i.val.htlcAddress,
|
|
@@ -21983,7 +22004,7 @@ class ZT {
|
|
|
21983
22004
|
}, c = id(a), u = {
|
|
21984
22005
|
domain: o,
|
|
21985
22006
|
primaryType: "Initiate",
|
|
21986
|
-
types:
|
|
22007
|
+
types: ZT,
|
|
21987
22008
|
message: {
|
|
21988
22009
|
redeemer: s,
|
|
21989
22010
|
amount: ja.uint256(i),
|
|
@@ -22078,12 +22099,12 @@ class ZT {
|
|
|
22078
22099
|
return T("Refund is taken care of by the relayer");
|
|
22079
22100
|
}
|
|
22080
22101
|
}
|
|
22081
|
-
const
|
|
22102
|
+
const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
|
|
22082
22103
|
name: "solana_spl_swaps",
|
|
22083
22104
|
version: "0.4.0",
|
|
22084
22105
|
spec: "0.1.0",
|
|
22085
22106
|
description: "Created with Anchor"
|
|
22086
|
-
},
|
|
22107
|
+
}, rI = [
|
|
22087
22108
|
{
|
|
22088
22109
|
name: "initiate",
|
|
22089
22110
|
docs: [
|
|
@@ -22412,7 +22433,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22412
22433
|
],
|
|
22413
22434
|
args: []
|
|
22414
22435
|
}
|
|
22415
|
-
],
|
|
22436
|
+
], nI = [
|
|
22416
22437
|
{
|
|
22417
22438
|
name: "SwapAccount",
|
|
22418
22439
|
discriminator: [
|
|
@@ -22426,7 +22447,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22426
22447
|
182
|
|
22427
22448
|
]
|
|
22428
22449
|
}
|
|
22429
|
-
],
|
|
22450
|
+
], sI = [
|
|
22430
22451
|
{
|
|
22431
22452
|
name: "Initiated",
|
|
22432
22453
|
discriminator: [
|
|
@@ -22479,7 +22500,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22479
22500
|
99
|
|
22480
22501
|
]
|
|
22481
22502
|
}
|
|
22482
|
-
],
|
|
22503
|
+
], iI = [
|
|
22483
22504
|
{
|
|
22484
22505
|
code: 6e3,
|
|
22485
22506
|
name: "InvalidRedeemer",
|
|
@@ -22500,7 +22521,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22500
22521
|
name: "RefundBeforeExpiry",
|
|
22501
22522
|
msg: "Attempt to perform a refund before expiry time"
|
|
22502
22523
|
}
|
|
22503
|
-
],
|
|
22524
|
+
], aI = [
|
|
22504
22525
|
{
|
|
22505
22526
|
name: "Initiated",
|
|
22506
22527
|
docs: [
|
|
@@ -22701,19 +22722,19 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22701
22722
|
}
|
|
22702
22723
|
}
|
|
22703
22724
|
], Iy = {
|
|
22704
|
-
address:
|
|
22705
|
-
metadata:
|
|
22706
|
-
instructions:
|
|
22707
|
-
accounts:
|
|
22708
|
-
events:
|
|
22709
|
-
errors:
|
|
22710
|
-
types:
|
|
22711
|
-
},
|
|
22725
|
+
address: eI,
|
|
22726
|
+
metadata: tI,
|
|
22727
|
+
instructions: rI,
|
|
22728
|
+
accounts: nI,
|
|
22729
|
+
events: sI,
|
|
22730
|
+
errors: iI,
|
|
22731
|
+
types: aI
|
|
22732
|
+
}, oI = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", cI = {
|
|
22712
22733
|
name: "solana_native_swaps",
|
|
22713
22734
|
version: "0.3.0",
|
|
22714
22735
|
spec: "0.1.0",
|
|
22715
22736
|
description: "Created with Anchor"
|
|
22716
|
-
},
|
|
22737
|
+
}, uI = [
|
|
22717
22738
|
{
|
|
22718
22739
|
name: "initiate",
|
|
22719
22740
|
discriminator: [
|
|
@@ -22893,7 +22914,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22893
22914
|
],
|
|
22894
22915
|
args: []
|
|
22895
22916
|
}
|
|
22896
|
-
],
|
|
22917
|
+
], fI = [
|
|
22897
22918
|
{
|
|
22898
22919
|
name: "SwapAccount",
|
|
22899
22920
|
discriminator: [
|
|
@@ -22907,7 +22928,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22907
22928
|
182
|
|
22908
22929
|
]
|
|
22909
22930
|
}
|
|
22910
|
-
],
|
|
22931
|
+
], lI = [
|
|
22911
22932
|
{
|
|
22912
22933
|
name: "Initiated",
|
|
22913
22934
|
discriminator: [
|
|
@@ -22960,7 +22981,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22960
22981
|
99
|
|
22961
22982
|
]
|
|
22962
22983
|
}
|
|
22963
|
-
],
|
|
22984
|
+
], dI = [
|
|
22964
22985
|
{
|
|
22965
22986
|
code: 6e3,
|
|
22966
22987
|
name: "InvalidInitiator",
|
|
@@ -22981,7 +23002,7 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
22981
23002
|
name: "RefundBeforeExpiry",
|
|
22982
23003
|
msg: "Attempt to perform a refund before expiry time"
|
|
22983
23004
|
}
|
|
22984
|
-
],
|
|
23005
|
+
], hI = [
|
|
22985
23006
|
{
|
|
22986
23007
|
name: "Initiated",
|
|
22987
23008
|
type: {
|
|
@@ -23112,23 +23133,23 @@ const QT = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", eI = {
|
|
|
23112
23133
|
}
|
|
23113
23134
|
}
|
|
23114
23135
|
], Xd = {
|
|
23115
|
-
address:
|
|
23116
|
-
metadata:
|
|
23117
|
-
instructions:
|
|
23118
|
-
accounts:
|
|
23119
|
-
events:
|
|
23120
|
-
errors:
|
|
23121
|
-
types:
|
|
23136
|
+
address: oI,
|
|
23137
|
+
metadata: cI,
|
|
23138
|
+
instructions: uI,
|
|
23139
|
+
accounts: fI,
|
|
23140
|
+
events: lI,
|
|
23141
|
+
errors: dI,
|
|
23142
|
+
types: hI
|
|
23122
23143
|
};
|
|
23123
23144
|
var Rn = {}, Vu = {};
|
|
23124
23145
|
Object.defineProperty(Vu, "__esModule", { value: !0 });
|
|
23125
|
-
Vu.encode =
|
|
23126
|
-
Vu.decode =
|
|
23146
|
+
Vu.encode = pI;
|
|
23147
|
+
Vu.decode = yI;
|
|
23127
23148
|
const Py = di;
|
|
23128
|
-
function
|
|
23149
|
+
function pI(t) {
|
|
23129
23150
|
return t.reduce((e, r) => e + r.toString(16).padStart(2, "0"), "0x");
|
|
23130
23151
|
}
|
|
23131
|
-
function
|
|
23152
|
+
function yI(t) {
|
|
23132
23153
|
t.indexOf("0x") === 0 && (t = t.substr(2)), t.length % 2 === 1 && (t = "0" + t);
|
|
23133
23154
|
let e = t.match(/.{2}/g);
|
|
23134
23155
|
return e === null ? Py.Buffer.from([]) : Py.Buffer.from(e.map((r) => parseInt(r, 16)));
|
|
@@ -23136,13 +23157,13 @@ function pI(t) {
|
|
|
23136
23157
|
var Gu = {}, ui = {}, zf;
|
|
23137
23158
|
Object.defineProperty(ui, "__esModule", { value: !0 });
|
|
23138
23159
|
ui.isVersionedTransaction = ui.isBrowser = void 0;
|
|
23139
|
-
ui.chunks =
|
|
23160
|
+
ui.chunks = mI;
|
|
23140
23161
|
ui.isBrowser = process.env.ANCHOR_BROWSER || typeof window < "u" && !(!((zf = window.process) === null || zf === void 0) && zf.hasOwnProperty("type"));
|
|
23141
|
-
function
|
|
23162
|
+
function mI(t, e) {
|
|
23142
23163
|
return Array.apply(0, new Array(Math.ceil(t.length / e))).map((r, n) => t.slice(n * e, (n + 1) * e));
|
|
23143
23164
|
}
|
|
23144
|
-
const
|
|
23145
|
-
ui.isVersionedTransaction =
|
|
23165
|
+
const bI = (t) => "version" in t;
|
|
23166
|
+
ui.isVersionedTransaction = bI;
|
|
23146
23167
|
var Vf = {}, Gf = {}, qf, Oy;
|
|
23147
23168
|
function t2() {
|
|
23148
23169
|
return Oy || (Oy = 1, qf = function() {
|
|
@@ -23187,19 +23208,19 @@ function r2() {
|
|
|
23187
23208
|
return Cy || (Cy = 1, Kf = Object), Kf;
|
|
23188
23209
|
}
|
|
23189
23210
|
var Xf, Ry;
|
|
23190
|
-
function
|
|
23211
|
+
function gI() {
|
|
23191
23212
|
return Ry || (Ry = 1, Xf = Error), Xf;
|
|
23192
23213
|
}
|
|
23193
23214
|
var Yf, Ny;
|
|
23194
|
-
function
|
|
23215
|
+
function wI() {
|
|
23195
23216
|
return Ny || (Ny = 1, Yf = EvalError), Yf;
|
|
23196
23217
|
}
|
|
23197
23218
|
var Jf, Uy;
|
|
23198
|
-
function
|
|
23219
|
+
function vI() {
|
|
23199
23220
|
return Uy || (Uy = 1, Jf = RangeError), Jf;
|
|
23200
23221
|
}
|
|
23201
23222
|
var Zf, My;
|
|
23202
|
-
function
|
|
23223
|
+
function EI() {
|
|
23203
23224
|
return My || (My = 1, Zf = ReferenceError), Zf;
|
|
23204
23225
|
}
|
|
23205
23226
|
var Qf, Fy;
|
|
@@ -23211,57 +23232,57 @@ function Yo() {
|
|
|
23211
23232
|
return $y || ($y = 1, el = TypeError), el;
|
|
23212
23233
|
}
|
|
23213
23234
|
var tl, jy;
|
|
23214
|
-
function
|
|
23235
|
+
function AI() {
|
|
23215
23236
|
return jy || (jy = 1, tl = URIError), tl;
|
|
23216
23237
|
}
|
|
23217
23238
|
var rl, Hy;
|
|
23218
|
-
function
|
|
23239
|
+
function SI() {
|
|
23219
23240
|
return Hy || (Hy = 1, rl = Math.abs), rl;
|
|
23220
23241
|
}
|
|
23221
23242
|
var nl, Ly;
|
|
23222
|
-
function
|
|
23243
|
+
function xI() {
|
|
23223
23244
|
return Ly || (Ly = 1, nl = Math.floor), nl;
|
|
23224
23245
|
}
|
|
23225
23246
|
var sl, Dy;
|
|
23226
|
-
function
|
|
23247
|
+
function kI() {
|
|
23227
23248
|
return Dy || (Dy = 1, sl = Math.max), sl;
|
|
23228
23249
|
}
|
|
23229
23250
|
var il, zy;
|
|
23230
|
-
function
|
|
23251
|
+
function _I() {
|
|
23231
23252
|
return zy || (zy = 1, il = Math.min), il;
|
|
23232
23253
|
}
|
|
23233
23254
|
var al, Vy;
|
|
23234
|
-
function
|
|
23255
|
+
function TI() {
|
|
23235
23256
|
return Vy || (Vy = 1, al = Math.pow), al;
|
|
23236
23257
|
}
|
|
23237
23258
|
var ol, Gy;
|
|
23238
|
-
function
|
|
23259
|
+
function II() {
|
|
23239
23260
|
return Gy || (Gy = 1, ol = Math.round), ol;
|
|
23240
23261
|
}
|
|
23241
23262
|
var cl, qy;
|
|
23242
|
-
function
|
|
23263
|
+
function PI() {
|
|
23243
23264
|
return qy || (qy = 1, cl = Number.isNaN || function(e) {
|
|
23244
23265
|
return e !== e;
|
|
23245
23266
|
}), cl;
|
|
23246
23267
|
}
|
|
23247
23268
|
var ul, Wy;
|
|
23248
|
-
function
|
|
23269
|
+
function OI() {
|
|
23249
23270
|
if (Wy) return ul;
|
|
23250
23271
|
Wy = 1;
|
|
23251
|
-
var t =
|
|
23272
|
+
var t = PI();
|
|
23252
23273
|
return ul = function(r) {
|
|
23253
23274
|
return t(r) || r === 0 ? r : r < 0 ? -1 : 1;
|
|
23254
23275
|
}, ul;
|
|
23255
23276
|
}
|
|
23256
23277
|
var fl, Ky;
|
|
23257
|
-
function
|
|
23278
|
+
function BI() {
|
|
23258
23279
|
return Ky || (Ky = 1, fl = Object.getOwnPropertyDescriptor), fl;
|
|
23259
23280
|
}
|
|
23260
23281
|
var ll, Xy;
|
|
23261
23282
|
function pa() {
|
|
23262
23283
|
if (Xy) return ll;
|
|
23263
23284
|
Xy = 1;
|
|
23264
|
-
var t =
|
|
23285
|
+
var t = BI();
|
|
23265
23286
|
if (t)
|
|
23266
23287
|
try {
|
|
23267
23288
|
t([], "length");
|
|
@@ -23284,7 +23305,7 @@ function Wu() {
|
|
|
23284
23305
|
return dl = t, dl;
|
|
23285
23306
|
}
|
|
23286
23307
|
var hl, Jy;
|
|
23287
|
-
function
|
|
23308
|
+
function CI() {
|
|
23288
23309
|
if (Jy) return hl;
|
|
23289
23310
|
Jy = 1;
|
|
23290
23311
|
var t = typeof Symbol < "u" && Symbol, e = t2();
|
|
@@ -23304,7 +23325,7 @@ function i2() {
|
|
|
23304
23325
|
return yl = t.getPrototypeOf || null, yl;
|
|
23305
23326
|
}
|
|
23306
23327
|
var ml, em;
|
|
23307
|
-
function
|
|
23328
|
+
function RI() {
|
|
23308
23329
|
if (em) return ml;
|
|
23309
23330
|
em = 1;
|
|
23310
23331
|
var t = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, r = Math.max, n = "[object Function]", s = function(c, u) {
|
|
@@ -23352,7 +23373,7 @@ var bl, tm;
|
|
|
23352
23373
|
function Jo() {
|
|
23353
23374
|
if (tm) return bl;
|
|
23354
23375
|
tm = 1;
|
|
23355
|
-
var t =
|
|
23376
|
+
var t = RI();
|
|
23356
23377
|
return bl = Function.prototype.bind || t, bl;
|
|
23357
23378
|
}
|
|
23358
23379
|
var gl, rm;
|
|
@@ -23364,14 +23385,14 @@ function O0() {
|
|
|
23364
23385
|
return nm || (nm = 1, wl = Function.prototype.apply), wl;
|
|
23365
23386
|
}
|
|
23366
23387
|
var vl, sm;
|
|
23367
|
-
function
|
|
23388
|
+
function NI() {
|
|
23368
23389
|
return sm || (sm = 1, vl = typeof Reflect < "u" && Reflect && Reflect.apply), vl;
|
|
23369
23390
|
}
|
|
23370
23391
|
var El, im;
|
|
23371
23392
|
function a2() {
|
|
23372
23393
|
if (im) return El;
|
|
23373
23394
|
im = 1;
|
|
23374
|
-
var t = Jo(), e = O0(), r = P0(), n =
|
|
23395
|
+
var t = Jo(), e = O0(), r = P0(), n = NI();
|
|
23375
23396
|
return El = n || t.call(r, e), El;
|
|
23376
23397
|
}
|
|
23377
23398
|
var Al, am;
|
|
@@ -23386,7 +23407,7 @@ function B0() {
|
|
|
23386
23407
|
}, Al;
|
|
23387
23408
|
}
|
|
23388
23409
|
var Sl, om;
|
|
23389
|
-
function
|
|
23410
|
+
function UI() {
|
|
23390
23411
|
if (om) return Sl;
|
|
23391
23412
|
om = 1;
|
|
23392
23413
|
var t = B0(), e = pa(), r;
|
|
@@ -23413,7 +23434,7 @@ var xl, cm;
|
|
|
23413
23434
|
function C0() {
|
|
23414
23435
|
if (cm) return xl;
|
|
23415
23436
|
cm = 1;
|
|
23416
|
-
var t = s2(), e = i2(), r =
|
|
23437
|
+
var t = s2(), e = i2(), r = UI();
|
|
23417
23438
|
return xl = t ? function(s) {
|
|
23418
23439
|
return t(s);
|
|
23419
23440
|
} : e ? function(s) {
|
|
@@ -23435,7 +23456,7 @@ var _l, fm;
|
|
|
23435
23456
|
function c2() {
|
|
23436
23457
|
if (fm) return _l;
|
|
23437
23458
|
fm = 1;
|
|
23438
|
-
var t, e = r2(), r =
|
|
23459
|
+
var t, e = r2(), r = gI(), n = wI(), s = vI(), i = EI(), a = n2(), o = Yo(), c = AI(), u = SI(), f = xI(), l = kI(), p = _I(), d = TI(), m = II(), b = OI(), E = Function, A = function(ie) {
|
|
23439
23460
|
try {
|
|
23440
23461
|
return E('"use strict"; return (' + ie + ").constructor;")();
|
|
23441
23462
|
} catch {
|
|
@@ -23452,7 +23473,7 @@ function c2() {
|
|
|
23452
23473
|
return g;
|
|
23453
23474
|
}
|
|
23454
23475
|
}
|
|
23455
|
-
}() : g, _ =
|
|
23476
|
+
}() : g, _ = CI()(), I = C0(), N = i2(), C = s2(), j = O0(), F = P0(), H = {}, z = typeof Uint8Array > "u" || !I ? t : I(Uint8Array), Q = {
|
|
23456
23477
|
__proto__: null,
|
|
23457
23478
|
"%AggregateError%": typeof AggregateError > "u" ? t : AggregateError,
|
|
23458
23479
|
"%Array%": Array,
|
|
@@ -23685,7 +23706,7 @@ function Zo() {
|
|
|
23685
23706
|
}, Tl;
|
|
23686
23707
|
}
|
|
23687
23708
|
var Il, dm;
|
|
23688
|
-
function
|
|
23709
|
+
function MI() {
|
|
23689
23710
|
if (dm) return Il;
|
|
23690
23711
|
dm = 1;
|
|
23691
23712
|
var t = qu()(), e = Zo(), r = e("Object.prototype.toString"), n = function(o) {
|
|
@@ -23698,7 +23719,7 @@ function UI() {
|
|
|
23698
23719
|
return n.isLegacyArguments = s, Il = i ? n : s, Il;
|
|
23699
23720
|
}
|
|
23700
23721
|
var Pl, hm;
|
|
23701
|
-
function
|
|
23722
|
+
function FI() {
|
|
23702
23723
|
if (hm) return Pl;
|
|
23703
23724
|
hm = 1;
|
|
23704
23725
|
var t = Zo(), e = qu()(), r = o2(), n = pa(), s;
|
|
@@ -23742,10 +23763,10 @@ function MI() {
|
|
|
23742
23763
|
return Pl = s, Pl;
|
|
23743
23764
|
}
|
|
23744
23765
|
var Ol, pm;
|
|
23745
|
-
function
|
|
23766
|
+
function $I() {
|
|
23746
23767
|
if (pm) return Ol;
|
|
23747
23768
|
pm = 1;
|
|
23748
|
-
var t = Zo(), e =
|
|
23769
|
+
var t = Zo(), e = FI(), r = t("RegExp.prototype.exec"), n = Yo();
|
|
23749
23770
|
return Ol = function(i) {
|
|
23750
23771
|
if (!e(i))
|
|
23751
23772
|
throw new n("`regex` must be a RegExp");
|
|
@@ -23755,7 +23776,7 @@ function FI() {
|
|
|
23755
23776
|
}, Ol;
|
|
23756
23777
|
}
|
|
23757
23778
|
var Bl, ym;
|
|
23758
|
-
function
|
|
23779
|
+
function jI() {
|
|
23759
23780
|
if (ym) return Bl;
|
|
23760
23781
|
ym = 1;
|
|
23761
23782
|
const t = (
|
|
@@ -23766,10 +23787,10 @@ function $I() {
|
|
|
23766
23787
|
return Bl = () => t, Bl;
|
|
23767
23788
|
}
|
|
23768
23789
|
var Cl, mm;
|
|
23769
|
-
function
|
|
23790
|
+
function HI() {
|
|
23770
23791
|
if (mm) return Cl;
|
|
23771
23792
|
mm = 1;
|
|
23772
|
-
var t = Zo(), e =
|
|
23793
|
+
var t = Zo(), e = $I(), r = e(/^\s*(?:function)?\*/), n = qu()(), s = C0(), i = t("Object.prototype.toString"), a = t("Function.prototype.toString"), o = jI();
|
|
23773
23794
|
return Cl = function(u) {
|
|
23774
23795
|
if (typeof u != "function")
|
|
23775
23796
|
return !1;
|
|
@@ -23786,7 +23807,7 @@ function jI() {
|
|
|
23786
23807
|
}, Cl;
|
|
23787
23808
|
}
|
|
23788
23809
|
var Rl, bm;
|
|
23789
|
-
function
|
|
23810
|
+
function LI() {
|
|
23790
23811
|
if (bm) return Rl;
|
|
23791
23812
|
bm = 1;
|
|
23792
23813
|
var t = Function.prototype.toString, e = typeof Reflect == "object" && Reflect !== null && Reflect.apply, r, n;
|
|
@@ -23858,10 +23879,10 @@ function HI() {
|
|
|
23858
23879
|
}, Rl;
|
|
23859
23880
|
}
|
|
23860
23881
|
var Nl, gm;
|
|
23861
|
-
function
|
|
23882
|
+
function DI() {
|
|
23862
23883
|
if (gm) return Nl;
|
|
23863
23884
|
gm = 1;
|
|
23864
|
-
var t =
|
|
23885
|
+
var t = LI(), e = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, u, f) {
|
|
23865
23886
|
for (var l = 0, p = c.length; l < p; l++)
|
|
23866
23887
|
r.call(c, l) && (f == null ? u(c[l], l, c) : u.call(f, c[l], l, c));
|
|
23867
23888
|
}, s = function(c, u, f) {
|
|
@@ -23882,7 +23903,7 @@ function LI() {
|
|
|
23882
23903
|
}, Nl;
|
|
23883
23904
|
}
|
|
23884
23905
|
var Ul, wm;
|
|
23885
|
-
function
|
|
23906
|
+
function zI() {
|
|
23886
23907
|
return wm || (wm = 1, Ul = [
|
|
23887
23908
|
"Float16Array",
|
|
23888
23909
|
"Float32Array",
|
|
@@ -23899,10 +23920,10 @@ function DI() {
|
|
|
23899
23920
|
]), Ul;
|
|
23900
23921
|
}
|
|
23901
23922
|
var Ml, vm;
|
|
23902
|
-
function
|
|
23923
|
+
function VI() {
|
|
23903
23924
|
if (vm) return Ml;
|
|
23904
23925
|
vm = 1;
|
|
23905
|
-
var t =
|
|
23926
|
+
var t = zI(), e = typeof globalThis > "u" ? ln : globalThis;
|
|
23906
23927
|
return Ml = function() {
|
|
23907
23928
|
for (var n = [], s = 0; s < t.length; s++)
|
|
23908
23929
|
typeof e[t[s]] == "function" && (n[n.length] = t[s]);
|
|
@@ -23910,7 +23931,7 @@ function zI() {
|
|
|
23910
23931
|
}, Ml;
|
|
23911
23932
|
}
|
|
23912
23933
|
var Fl = { exports: {} }, $l, Em;
|
|
23913
|
-
function
|
|
23934
|
+
function GI() {
|
|
23914
23935
|
if (Em) return $l;
|
|
23915
23936
|
Em = 1;
|
|
23916
23937
|
var t = Wu(), e = n2(), r = Yo(), n = pa();
|
|
@@ -23942,7 +23963,7 @@ function VI() {
|
|
|
23942
23963
|
}, $l;
|
|
23943
23964
|
}
|
|
23944
23965
|
var jl, Am;
|
|
23945
|
-
function
|
|
23966
|
+
function qI() {
|
|
23946
23967
|
if (Am) return jl;
|
|
23947
23968
|
Am = 1;
|
|
23948
23969
|
var t = Wu(), e = function() {
|
|
@@ -23959,10 +23980,10 @@ function GI() {
|
|
|
23959
23980
|
}, jl = e, jl;
|
|
23960
23981
|
}
|
|
23961
23982
|
var Hl, Sm;
|
|
23962
|
-
function
|
|
23983
|
+
function WI() {
|
|
23963
23984
|
if (Sm) return Hl;
|
|
23964
23985
|
Sm = 1;
|
|
23965
|
-
var t = c2(), e =
|
|
23986
|
+
var t = c2(), e = GI(), r = qI()(), n = pa(), s = Yo(), i = t("%Math.floor%");
|
|
23966
23987
|
return Hl = function(o, c) {
|
|
23967
23988
|
if (typeof o != "function")
|
|
23968
23989
|
throw new s("`fn` is not a function");
|
|
@@ -23989,7 +24010,7 @@ function qI() {
|
|
|
23989
24010
|
}, Hl;
|
|
23990
24011
|
}
|
|
23991
24012
|
var Ll, xm;
|
|
23992
|
-
function
|
|
24013
|
+
function KI() {
|
|
23993
24014
|
if (xm) return Ll;
|
|
23994
24015
|
xm = 1;
|
|
23995
24016
|
var t = Jo(), e = O0(), r = a2();
|
|
@@ -23998,9 +24019,9 @@ function WI() {
|
|
|
23998
24019
|
}, Ll;
|
|
23999
24020
|
}
|
|
24000
24021
|
var km;
|
|
24001
|
-
function
|
|
24022
|
+
function XI() {
|
|
24002
24023
|
return km || (km = 1, function(t) {
|
|
24003
|
-
var e =
|
|
24024
|
+
var e = WI(), r = Wu(), n = B0(), s = KI();
|
|
24004
24025
|
t.exports = function(a) {
|
|
24005
24026
|
var o = n(arguments), c = a.length - (arguments.length - 1);
|
|
24006
24027
|
return e(
|
|
@@ -24015,7 +24036,7 @@ var Dl, _m;
|
|
|
24015
24036
|
function u2() {
|
|
24016
24037
|
if (_m) return Dl;
|
|
24017
24038
|
_m = 1;
|
|
24018
|
-
var t =
|
|
24039
|
+
var t = DI(), e = VI(), r = XI(), n = Zo(), s = pa(), i = C0(), a = n("Object.prototype.toString"), o = qu()(), c = typeof globalThis > "u" ? ln : globalThis, u = e(), f = n("String.prototype.slice"), l = n("Array.prototype.indexOf", !0) || function(E, A) {
|
|
24019
24040
|
for (var k = 0; k < E.length; k += 1)
|
|
24020
24041
|
if (E[k] === A)
|
|
24021
24042
|
return k;
|
|
@@ -24093,7 +24114,7 @@ function u2() {
|
|
|
24093
24114
|
}, Dl;
|
|
24094
24115
|
}
|
|
24095
24116
|
var zl, Tm;
|
|
24096
|
-
function
|
|
24117
|
+
function YI() {
|
|
24097
24118
|
if (Tm) return zl;
|
|
24098
24119
|
Tm = 1;
|
|
24099
24120
|
var t = u2();
|
|
@@ -24102,9 +24123,9 @@ function XI() {
|
|
|
24102
24123
|
}, zl;
|
|
24103
24124
|
}
|
|
24104
24125
|
var Im;
|
|
24105
|
-
function
|
|
24126
|
+
function JI() {
|
|
24106
24127
|
return Im || (Im = 1, function(t) {
|
|
24107
|
-
var e =
|
|
24128
|
+
var e = MI(), r = HI(), n = u2(), s = YI();
|
|
24108
24129
|
function i(K) {
|
|
24109
24130
|
return K.call.bind(K);
|
|
24110
24131
|
}
|
|
@@ -24289,13 +24310,13 @@ function YI() {
|
|
|
24289
24310
|
}(Gf)), Gf;
|
|
24290
24311
|
}
|
|
24291
24312
|
var Vl, Pm;
|
|
24292
|
-
function
|
|
24313
|
+
function ZI() {
|
|
24293
24314
|
return Pm || (Pm = 1, Vl = function(e) {
|
|
24294
24315
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
24295
24316
|
}), Vl;
|
|
24296
24317
|
}
|
|
24297
24318
|
var wc = { exports: {} }, Om;
|
|
24298
|
-
function
|
|
24319
|
+
function QI() {
|
|
24299
24320
|
return Om || (Om = 1, typeof Object.create == "function" ? wc.exports = function(e, r) {
|
|
24300
24321
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
24301
24322
|
constructor: {
|
|
@@ -24535,7 +24556,7 @@ function f2() {
|
|
|
24535
24556
|
`) + " " + B.join(`,
|
|
24536
24557
|
`) + " " + D[1] : D[0] + M + " " + B.join(", ") + " " + D[1];
|
|
24537
24558
|
}
|
|
24538
|
-
t.types =
|
|
24559
|
+
t.types = JI();
|
|
24539
24560
|
function E(B) {
|
|
24540
24561
|
return Array.isArray(B);
|
|
24541
24562
|
}
|
|
@@ -24592,7 +24613,7 @@ function f2() {
|
|
|
24592
24613
|
return B === null || typeof B == "boolean" || typeof B == "number" || typeof B == "string" || typeof B == "symbol" || // ES6 symbol
|
|
24593
24614
|
typeof B > "u";
|
|
24594
24615
|
}
|
|
24595
|
-
t.isPrimitive = z, t.isBuffer =
|
|
24616
|
+
t.isPrimitive = z, t.isBuffer = ZI();
|
|
24596
24617
|
function Q(B) {
|
|
24597
24618
|
return Object.prototype.toString.call(B);
|
|
24598
24619
|
}
|
|
@@ -24623,7 +24644,7 @@ function f2() {
|
|
|
24623
24644
|
}
|
|
24624
24645
|
t.log = function() {
|
|
24625
24646
|
console.log("%s - %s", ee(), t.format.apply(t, arguments));
|
|
24626
|
-
}, t.inherits =
|
|
24647
|
+
}, t.inherits = QI(), t._extend = function(B, M) {
|
|
24627
24648
|
if (!M || !C(M)) return B;
|
|
24628
24649
|
for (var D = Object.keys(M), ne = D.length; ne--; )
|
|
24629
24650
|
B[D[ne]] = M[D[ne]];
|
|
@@ -24709,13 +24730,13 @@ function f2() {
|
|
|
24709
24730
|
}(Vf)), Vf;
|
|
24710
24731
|
}
|
|
24711
24732
|
Object.defineProperty(Gu, "__esModule", { value: !0 });
|
|
24712
|
-
Gu.decode =
|
|
24713
|
-
Gu.encode =
|
|
24733
|
+
Gu.decode = eP;
|
|
24734
|
+
Gu.encode = tP;
|
|
24714
24735
|
const l2 = ui;
|
|
24715
|
-
function
|
|
24736
|
+
function eP(t) {
|
|
24716
24737
|
return (l2.isBrowser ? new TextDecoder("utf-8") : new (f2()).TextDecoder("utf-8")).decode(t);
|
|
24717
24738
|
}
|
|
24718
|
-
function
|
|
24739
|
+
function tP(t) {
|
|
24719
24740
|
return (l2.isBrowser ? new TextEncoder() : new (f2()).TextEncoder("utf-8")).encode(t);
|
|
24720
24741
|
}
|
|
24721
24742
|
var Ku = {}, Yd = { exports: {} };
|
|
@@ -24749,8 +24770,8 @@ var Ku = {}, Yd = { exports: {} };
|
|
|
24749
24770
|
return r.SlowBuffer(a);
|
|
24750
24771
|
};
|
|
24751
24772
|
})(Yd, Yd.exports);
|
|
24752
|
-
var
|
|
24753
|
-
function
|
|
24773
|
+
var rP = Yd.exports, vc = rP.Buffer;
|
|
24774
|
+
function nP(t) {
|
|
24754
24775
|
if (t.length >= 255)
|
|
24755
24776
|
throw new TypeError("Alphabet too long");
|
|
24756
24777
|
for (var e = new Uint8Array(256), r = 0; r < e.length; r++)
|
|
@@ -24822,31 +24843,31 @@ function rP(t) {
|
|
|
24822
24843
|
decode: p
|
|
24823
24844
|
};
|
|
24824
24845
|
}
|
|
24825
|
-
var
|
|
24846
|
+
var sP = nP, iP = sP, aP = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", oP = iP(aP), cP = ln && ln.__importDefault || function(t) {
|
|
24826
24847
|
return t && t.__esModule ? t : { default: t };
|
|
24827
24848
|
};
|
|
24828
24849
|
Object.defineProperty(Ku, "__esModule", { value: !0 });
|
|
24829
|
-
Ku.encode =
|
|
24830
|
-
Ku.decode =
|
|
24831
|
-
const d2 = oP
|
|
24832
|
-
function
|
|
24850
|
+
Ku.encode = uP;
|
|
24851
|
+
Ku.decode = fP;
|
|
24852
|
+
const d2 = cP(oP);
|
|
24853
|
+
function uP(t) {
|
|
24833
24854
|
return d2.default.encode(t);
|
|
24834
24855
|
}
|
|
24835
|
-
function
|
|
24856
|
+
function fP(t) {
|
|
24836
24857
|
return d2.default.decode(t);
|
|
24837
24858
|
}
|
|
24838
24859
|
var Xu = {};
|
|
24839
24860
|
Object.defineProperty(Xu, "__esModule", { value: !0 });
|
|
24840
|
-
Xu.encode =
|
|
24841
|
-
Xu.decode =
|
|
24842
|
-
const
|
|
24843
|
-
function
|
|
24861
|
+
Xu.encode = dP;
|
|
24862
|
+
Xu.decode = hP;
|
|
24863
|
+
const lP = di;
|
|
24864
|
+
function dP(t) {
|
|
24844
24865
|
return t.toString("base64");
|
|
24845
24866
|
}
|
|
24846
|
-
function
|
|
24847
|
-
return
|
|
24867
|
+
function hP(t) {
|
|
24868
|
+
return lP.Buffer.from(t, "base64");
|
|
24848
24869
|
}
|
|
24849
|
-
var
|
|
24870
|
+
var pP = ln && ln.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
24850
24871
|
n === void 0 && (n = r);
|
|
24851
24872
|
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
24852
24873
|
(!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: function() {
|
|
@@ -24854,15 +24875,15 @@ var hP = ln && ln.__createBinding || (Object.create ? function(t, e, r, n) {
|
|
|
24854
24875
|
} }), Object.defineProperty(t, n, s);
|
|
24855
24876
|
} : function(t, e, r, n) {
|
|
24856
24877
|
n === void 0 && (n = r), t[n] = e[r];
|
|
24857
|
-
}),
|
|
24878
|
+
}), yP = ln && ln.__setModuleDefault || (Object.create ? function(t, e) {
|
|
24858
24879
|
Object.defineProperty(t, "default", { enumerable: !0, value: e });
|
|
24859
24880
|
} : function(t, e) {
|
|
24860
24881
|
t.default = e;
|
|
24861
24882
|
}), Yu = ln && ln.__importStar || function(t) {
|
|
24862
24883
|
if (t && t.__esModule) return t;
|
|
24863
24884
|
var e = {};
|
|
24864
|
-
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) &&
|
|
24865
|
-
return
|
|
24885
|
+
if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && pP(e, t, r);
|
|
24886
|
+
return yP(e, t), e;
|
|
24866
24887
|
};
|
|
24867
24888
|
Object.defineProperty(Rn, "__esModule", { value: !0 });
|
|
24868
24889
|
Rn.base64 = Rn.bs58 = Rn.utf8 = h2 = Rn.hex = void 0;
|
|
@@ -24936,7 +24957,7 @@ function p2(t) {
|
|
|
24936
24957
|
);
|
|
24937
24958
|
return e;
|
|
24938
24959
|
}
|
|
24939
|
-
class
|
|
24960
|
+
class mP {
|
|
24940
24961
|
/**
|
|
24941
24962
|
* Creates a new instance of SolanaRelay.
|
|
24942
24963
|
* @param {AnchorProvider} provider - An abstraction of RPC connection and a Wallet
|
|
@@ -25219,7 +25240,7 @@ class yP {
|
|
|
25219
25240
|
return T("Refund is automatically handled by the relayer.");
|
|
25220
25241
|
}
|
|
25221
25242
|
}
|
|
25222
|
-
const y2 = "1.45.2",
|
|
25243
|
+
const y2 = "1.45.2", bP = "1.62.0", gP = {
|
|
25223
25244
|
"-32700": "ParseError",
|
|
25224
25245
|
"-32701": "OversizedRequest",
|
|
25225
25246
|
"-32702": "OversizedResponse",
|
|
@@ -25241,17 +25262,17 @@ class m2 extends Error {
|
|
|
25241
25262
|
}
|
|
25242
25263
|
class b2 extends m2 {
|
|
25243
25264
|
constructor(e, r) {
|
|
25244
|
-
super(e), this.code = r, this.type =
|
|
25265
|
+
super(e), this.code = r, this.type = gP[r] ?? "ServerError";
|
|
25245
25266
|
}
|
|
25246
25267
|
}
|
|
25247
|
-
class
|
|
25268
|
+
class wP extends m2 {
|
|
25248
25269
|
constructor(e, r, n) {
|
|
25249
25270
|
super(e), this.status = r, this.statusText = n;
|
|
25250
25271
|
}
|
|
25251
25272
|
}
|
|
25252
25273
|
var g2 = (t) => {
|
|
25253
25274
|
throw TypeError(t);
|
|
25254
|
-
}, R0 = (t, e, r) => e.has(t) || g2("Cannot " + r), ze = (t, e, r) => (R0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Us = (t, e, r) => e.has(t) ? g2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), qi = (t, e, r, n) => (R0(t, e, "write to private field"), e.set(t, r), r), w2 = (t, e, r) => (R0(t, e, "access private method"), r),
|
|
25275
|
+
}, R0 = (t, e, r) => e.has(t) || g2("Cannot " + r), ze = (t, e, r) => (R0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Us = (t, e, r) => e.has(t) ? g2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), qi = (t, e, r, n) => (R0(t, e, "write to private field"), e.set(t, r), r), w2 = (t, e, r) => (R0(t, e, "access private method"), r), vP = (t, e, r, n) => ({
|
|
25255
25276
|
set _(s) {
|
|
25256
25277
|
qi(t, e, s);
|
|
25257
25278
|
},
|
|
@@ -25259,22 +25280,22 @@ var g2 = (t) => {
|
|
|
25259
25280
|
return ze(t, e, n);
|
|
25260
25281
|
}
|
|
25261
25282
|
}), os, za, Pn, Ls, Ao, Ds, Qc, v2, E2;
|
|
25262
|
-
function
|
|
25283
|
+
function EP(t) {
|
|
25263
25284
|
const e = new URL(t);
|
|
25264
25285
|
return e.protocol = e.protocol.replace("http", "ws"), e.toString();
|
|
25265
25286
|
}
|
|
25266
|
-
const
|
|
25287
|
+
const AP = {
|
|
25267
25288
|
// We fudge the typing because we also check for undefined in the constructor:
|
|
25268
25289
|
WebSocketConstructor: typeof WebSocket < "u" ? WebSocket : void 0,
|
|
25269
25290
|
callTimeout: 3e4,
|
|
25270
25291
|
reconnectTimeout: 3e3,
|
|
25271
25292
|
maxReconnects: 5
|
|
25272
25293
|
};
|
|
25273
|
-
class
|
|
25294
|
+
class SP {
|
|
25274
25295
|
constructor(e, r = {}) {
|
|
25275
|
-
if (Us(this, Qc), Us(this, os, 0), Us(this, za, 0), Us(this, Pn, null), Us(this, Ls, null), Us(this, Ao, /* @__PURE__ */ new Set()), Us(this, Ds, /* @__PURE__ */ new Map()), this.endpoint = e, this.options = { ...
|
|
25296
|
+
if (Us(this, Qc), Us(this, os, 0), Us(this, za, 0), Us(this, Pn, null), Us(this, Ls, null), Us(this, Ao, /* @__PURE__ */ new Set()), Us(this, Ds, /* @__PURE__ */ new Map()), this.endpoint = e, this.options = { ...AP, ...r }, !this.options.WebSocketConstructor)
|
|
25276
25297
|
throw new Error("Missing WebSocket constructor");
|
|
25277
|
-
this.endpoint.startsWith("http") && (this.endpoint =
|
|
25298
|
+
this.endpoint.startsWith("http") && (this.endpoint = EP(this.endpoint));
|
|
25278
25299
|
}
|
|
25279
25300
|
async makeRequest(e, r, n) {
|
|
25280
25301
|
const s = await w2(this, Qc, v2).call(this);
|
|
@@ -25295,7 +25316,7 @@ class AP {
|
|
|
25295
25316
|
});
|
|
25296
25317
|
}
|
|
25297
25318
|
async subscribe(e) {
|
|
25298
|
-
const r = new
|
|
25319
|
+
const r = new xP(e);
|
|
25299
25320
|
return ze(this, Ao).add(r), await r.subscribe(this), () => r.unsubscribe(this);
|
|
25300
25321
|
}
|
|
25301
25322
|
}
|
|
@@ -25312,7 +25333,7 @@ v2 = function() {
|
|
|
25312
25333
|
(e = ze(this, Pn)) == null || e.close(), qi(this, Pn, new this.options.WebSocketConstructor(this.endpoint)), ze(this, Pn).addEventListener("open", () => {
|
|
25313
25334
|
qi(this, za, 0), t(ze(this, Pn));
|
|
25314
25335
|
}), ze(this, Pn).addEventListener("close", () => {
|
|
25315
|
-
|
|
25336
|
+
vP(this, za)._++, ze(this, za) <= this.options.maxReconnects && setTimeout(() => {
|
|
25316
25337
|
w2(this, Qc, E2).call(this);
|
|
25317
25338
|
}, this.options.reconnectTimeout);
|
|
25318
25339
|
}), ze(this, Pn).addEventListener("message", ({ data: r }) => {
|
|
@@ -25341,7 +25362,7 @@ E2 = async function() {
|
|
|
25341
25362
|
[...ze(this, Ao)].map((e) => e.subscribe(this))
|
|
25342
25363
|
);
|
|
25343
25364
|
};
|
|
25344
|
-
class
|
|
25365
|
+
class xP {
|
|
25345
25366
|
constructor(e) {
|
|
25346
25367
|
this.subscriptionId = null, this.subscribed = !1, this.input = e;
|
|
25347
25368
|
}
|
|
@@ -25364,8 +25385,8 @@ class SP {
|
|
|
25364
25385
|
}
|
|
25365
25386
|
var A2 = (t) => {
|
|
25366
25387
|
throw TypeError(t);
|
|
25367
|
-
}, N0 = (t, e, r) => e.has(t) || A2("Cannot " + r), vr = (t, e, r) => (N0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Ec = (t, e, r) => e.has(t) ? A2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Jd = (t, e, r, n) => (N0(t, e, "write to private field"), e.set(t, r), r),
|
|
25368
|
-
class
|
|
25388
|
+
}, N0 = (t, e, r) => e.has(t) || A2("Cannot " + r), vr = (t, e, r) => (N0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Ec = (t, e, r) => e.has(t) ? A2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Jd = (t, e, r, n) => (N0(t, e, "write to private field"), e.set(t, r), r), kP = (t, e, r) => (N0(t, e, "access private method"), r), Ra, Ir, Va, Zd, S2;
|
|
25389
|
+
class _P {
|
|
25369
25390
|
constructor(e) {
|
|
25370
25391
|
Ec(this, Zd), Ec(this, Ra, 0), Ec(this, Ir), Ec(this, Va), Jd(this, Ir, e);
|
|
25371
25392
|
}
|
|
@@ -25387,7 +25408,7 @@ class kP {
|
|
|
25387
25408
|
"Content-Type": "application/json",
|
|
25388
25409
|
"Client-Sdk-Type": "typescript",
|
|
25389
25410
|
"Client-Sdk-Version": y2,
|
|
25390
|
-
"Client-Target-Api-Version":
|
|
25411
|
+
"Client-Target-Api-Version": bP,
|
|
25391
25412
|
"Client-Request-Method": e.method,
|
|
25392
25413
|
...(i = vr(this, Ir).rpc) == null ? void 0 : i.headers
|
|
25393
25414
|
},
|
|
@@ -25399,7 +25420,7 @@ class kP {
|
|
|
25399
25420
|
})
|
|
25400
25421
|
});
|
|
25401
25422
|
if (!r.ok)
|
|
25402
|
-
throw new
|
|
25423
|
+
throw new wP(
|
|
25403
25424
|
`Unexpected status code: ${r.status}`,
|
|
25404
25425
|
r.status,
|
|
25405
25426
|
r.statusText
|
|
@@ -25410,7 +25431,7 @@ class kP {
|
|
|
25410
25431
|
return n.result;
|
|
25411
25432
|
}
|
|
25412
25433
|
async subscribe(e) {
|
|
25413
|
-
const r = await
|
|
25434
|
+
const r = await kP(this, Zd, S2).call(this).subscribe(e);
|
|
25414
25435
|
return e.signal && (e.signal.throwIfAborted(), e.signal.addEventListener("abort", () => {
|
|
25415
25436
|
r();
|
|
25416
25437
|
})), async () => !!await r();
|
|
@@ -25428,7 +25449,7 @@ S2 = function() {
|
|
|
25428
25449
|
throw new Error(
|
|
25429
25450
|
"The current environment does not support WebSocket, you can provide a WebSocketConstructor in the options for SuiHTTPTransport."
|
|
25430
25451
|
);
|
|
25431
|
-
Jd(this, Va, new
|
|
25452
|
+
Jd(this, Va, new SP(
|
|
25432
25453
|
((t = vr(this, Ir).websocket) == null ? void 0 : t.url) ?? vr(this, Ir).url,
|
|
25433
25454
|
{
|
|
25434
25455
|
WebSocketConstructor: e,
|
|
@@ -25453,7 +25474,7 @@ function Cm(t) {
|
|
|
25453
25474
|
}
|
|
25454
25475
|
}
|
|
25455
25476
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
25456
|
-
function
|
|
25477
|
+
function TP(t) {
|
|
25457
25478
|
return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
|
|
25458
25479
|
}
|
|
25459
25480
|
function x2(t, e) {
|
|
@@ -25476,17 +25497,17 @@ function _2(t, e) {
|
|
|
25476
25497
|
if (!x2(!0, e))
|
|
25477
25498
|
throw new Error(`${t}: array of strings expected`);
|
|
25478
25499
|
}
|
|
25479
|
-
function
|
|
25500
|
+
function IP(t, e) {
|
|
25480
25501
|
if (!x2(!1, e))
|
|
25481
25502
|
throw new Error(`${t}: array of numbers expected`);
|
|
25482
25503
|
}
|
|
25483
25504
|
// @__NO_SIDE_EFFECTS__
|
|
25484
|
-
function
|
|
25505
|
+
function PP(...t) {
|
|
25485
25506
|
const e = (i) => i, r = (i, a) => (o) => i(a(o)), n = t.map((i) => i.encode).reduceRight(r, e), s = t.map((i) => i.decode).reduce(r, e);
|
|
25486
25507
|
return { encode: n, decode: s };
|
|
25487
25508
|
}
|
|
25488
25509
|
// @__NO_SIDE_EFFECTS__
|
|
25489
|
-
function
|
|
25510
|
+
function OP(t) {
|
|
25490
25511
|
const e = typeof t == "string" ? t.split("") : t, r = e.length;
|
|
25491
25512
|
_2("alphabet", e);
|
|
25492
25513
|
const n = new Map(e.map((s, i) => [s, i]));
|
|
@@ -25506,7 +25527,7 @@ function PP(t) {
|
|
|
25506
25527
|
};
|
|
25507
25528
|
}
|
|
25508
25529
|
// @__NO_SIDE_EFFECTS__
|
|
25509
|
-
function
|
|
25530
|
+
function BP(t = "") {
|
|
25510
25531
|
return Qd("join", t), {
|
|
25511
25532
|
encode: (e) => (_2("join.decode", e), e.join(t)),
|
|
25512
25533
|
decode: (e) => (Qd("join.decode", e), e.split(t))
|
|
@@ -25548,19 +25569,19 @@ function Rm(t, e, r) {
|
|
|
25548
25569
|
return s.reverse();
|
|
25549
25570
|
}
|
|
25550
25571
|
// @__NO_SIDE_EFFECTS__
|
|
25551
|
-
function
|
|
25572
|
+
function CP(t) {
|
|
25552
25573
|
k2(t);
|
|
25553
25574
|
const e = 2 ** 8;
|
|
25554
25575
|
return {
|
|
25555
25576
|
encode: (r) => {
|
|
25556
|
-
if (!
|
|
25577
|
+
if (!TP(r))
|
|
25557
25578
|
throw new Error("radix.encode input should be Uint8Array");
|
|
25558
25579
|
return Rm(Array.from(r), e, t);
|
|
25559
25580
|
},
|
|
25560
|
-
decode: (r) => (
|
|
25581
|
+
decode: (r) => (IP("radix.decode", r), Uint8Array.from(Rm(r, t, e)))
|
|
25561
25582
|
};
|
|
25562
25583
|
}
|
|
25563
|
-
const
|
|
25584
|
+
const RP = /* @__NO_SIDE_EFFECTS__ */ (t) => /* @__PURE__ */ PP(/* @__PURE__ */ CP(58), /* @__PURE__ */ OP(t), /* @__PURE__ */ BP("")), T2 = /* @__PURE__ */ RP("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), Ju = (t) => T2.encode(t), So = (t) => T2.decode(t);
|
|
25564
25585
|
function or(t) {
|
|
25565
25586
|
return Uint8Array.from(atob(t), (e) => e.charCodeAt(0));
|
|
25566
25587
|
}
|
|
@@ -25594,7 +25615,7 @@ class P2 {
|
|
|
25594
25615
|
throw new TypeError(
|
|
25595
25616
|
`DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: ${e}.`
|
|
25596
25617
|
);
|
|
25597
|
-
this._batchLoadFn = e, this._maxBatchSize =
|
|
25618
|
+
this._batchLoadFn = e, this._maxBatchSize = FP(r), this._batchScheduleFn = $P(r), this._cacheKeyFn = jP(r), this._cacheMap = HP(r), this._batch = null, this.name = LP(r);
|
|
25598
25619
|
}
|
|
25599
25620
|
/**
|
|
25600
25621
|
* Loads a key, returning a `Promise` for the value represented by that key.
|
|
@@ -25604,7 +25625,7 @@ class P2 {
|
|
|
25604
25625
|
throw new TypeError(
|
|
25605
25626
|
`The loader.load() function must be called with a value, but got: ${String(e)}.`
|
|
25606
25627
|
);
|
|
25607
|
-
const r =
|
|
25628
|
+
const r = UP(this), n = this._cacheMap;
|
|
25608
25629
|
let s;
|
|
25609
25630
|
if (n) {
|
|
25610
25631
|
s = this._cacheKeyFn(e);
|
|
@@ -25694,7 +25715,7 @@ class P2 {
|
|
|
25694
25715
|
return this;
|
|
25695
25716
|
}
|
|
25696
25717
|
}
|
|
25697
|
-
const
|
|
25718
|
+
const NP = (
|
|
25698
25719
|
/** @ts-ignore */
|
|
25699
25720
|
typeof process == "object" && typeof process.nextTick == "function" ? function(t) {
|
|
25700
25721
|
ql || (ql = Promise.resolve()), ql.then(() => {
|
|
@@ -25710,16 +25731,16 @@ const RP = (
|
|
|
25710
25731
|
)
|
|
25711
25732
|
);
|
|
25712
25733
|
let ql;
|
|
25713
|
-
function
|
|
25734
|
+
function UP(t) {
|
|
25714
25735
|
const e = t._batch;
|
|
25715
25736
|
if (e !== null && !e.hasDispatched && e.keys.length < t._maxBatchSize)
|
|
25716
25737
|
return e;
|
|
25717
25738
|
const r = { hasDispatched: !1, keys: [], callbacks: [] };
|
|
25718
25739
|
return t._batch = r, t._batchScheduleFn(() => {
|
|
25719
|
-
|
|
25740
|
+
MP(t, r);
|
|
25720
25741
|
}), r;
|
|
25721
25742
|
}
|
|
25722
|
-
function
|
|
25743
|
+
function MP(t, e) {
|
|
25723
25744
|
if (e.hasDispatched = !0, e.keys.length === 0) {
|
|
25724
25745
|
th(e);
|
|
25725
25746
|
return;
|
|
@@ -25778,7 +25799,7 @@ function th(t) {
|
|
|
25778
25799
|
for (let e = 0; e < t.cacheHits.length; e++)
|
|
25779
25800
|
t.cacheHits[e]();
|
|
25780
25801
|
}
|
|
25781
|
-
function
|
|
25802
|
+
function FP(t) {
|
|
25782
25803
|
if (!(!t || t.batch !== !1))
|
|
25783
25804
|
return 1;
|
|
25784
25805
|
const r = t && t.maxBatchSize;
|
|
@@ -25788,15 +25809,15 @@ function MP(t) {
|
|
|
25788
25809
|
throw new TypeError(`maxBatchSize must be a positive number: ${r}`);
|
|
25789
25810
|
return r;
|
|
25790
25811
|
}
|
|
25791
|
-
function
|
|
25812
|
+
function $P(t) {
|
|
25792
25813
|
const e = t && t.batchScheduleFn;
|
|
25793
25814
|
if (e === void 0)
|
|
25794
|
-
return
|
|
25815
|
+
return NP;
|
|
25795
25816
|
if (typeof e != "function")
|
|
25796
25817
|
throw new TypeError(`batchScheduleFn must be a function: ${e}`);
|
|
25797
25818
|
return e;
|
|
25798
25819
|
}
|
|
25799
|
-
function
|
|
25820
|
+
function jP(t) {
|
|
25800
25821
|
const e = t && t.cacheKeyFn;
|
|
25801
25822
|
if (e === void 0)
|
|
25802
25823
|
return (r) => r;
|
|
@@ -25804,7 +25825,7 @@ function $P(t) {
|
|
|
25804
25825
|
throw new TypeError(`cacheKeyFn must be a function: ${e}`);
|
|
25805
25826
|
return e;
|
|
25806
25827
|
}
|
|
25807
|
-
function
|
|
25828
|
+
function HP(t) {
|
|
25808
25829
|
if (!(!t || t.cache !== !1))
|
|
25809
25830
|
return null;
|
|
25810
25831
|
const r = t && t.cacheMap;
|
|
@@ -25819,7 +25840,7 @@ function jP(t) {
|
|
|
25819
25840
|
}
|
|
25820
25841
|
return r;
|
|
25821
25842
|
}
|
|
25822
|
-
function
|
|
25843
|
+
function LP(t) {
|
|
25823
25844
|
return t && t.name ? t.name : null;
|
|
25824
25845
|
}
|
|
25825
25846
|
function O2(t) {
|
|
@@ -25835,7 +25856,7 @@ function eu(t) {
|
|
|
25835
25856
|
r[n] = Number(e & 0x7fn), e >>= 7n, e > 0n && (r[n] |= 128), n += 1;
|
|
25836
25857
|
return r;
|
|
25837
25858
|
}
|
|
25838
|
-
function
|
|
25859
|
+
function DP(t) {
|
|
25839
25860
|
let e = 0n, r = 0n, n = 0;
|
|
25840
25861
|
for (; ; ) {
|
|
25841
25862
|
if (n >= t.length)
|
|
@@ -25852,7 +25873,7 @@ function LP(t) {
|
|
|
25852
25873
|
length: n
|
|
25853
25874
|
};
|
|
25854
25875
|
}
|
|
25855
|
-
class
|
|
25876
|
+
class zP {
|
|
25856
25877
|
/**
|
|
25857
25878
|
* @param {Uint8Array} data Data to use as a buffer.
|
|
25858
25879
|
*/
|
|
@@ -25929,7 +25950,7 @@ class DP {
|
|
|
25929
25950
|
* @returns {Number} The ULEB value.
|
|
25930
25951
|
*/
|
|
25931
25952
|
readULEB() {
|
|
25932
|
-
const e = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, e), { value: n, length: s } =
|
|
25953
|
+
const e = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, e), { value: n, length: s } = DP(r);
|
|
25933
25954
|
return this.shift(s), n;
|
|
25934
25955
|
}
|
|
25935
25956
|
/**
|
|
@@ -25945,7 +25966,7 @@ class DP {
|
|
|
25945
25966
|
return n;
|
|
25946
25967
|
}
|
|
25947
25968
|
}
|
|
25948
|
-
function
|
|
25969
|
+
function VP(t, e) {
|
|
25949
25970
|
switch (e) {
|
|
25950
25971
|
case "base58":
|
|
25951
25972
|
return Ju(t);
|
|
@@ -25970,7 +25991,7 @@ function B2(t, e = ["<", ">"]) {
|
|
|
25970
25991
|
}
|
|
25971
25992
|
return s.push(i.trim()), s;
|
|
25972
25993
|
}
|
|
25973
|
-
class
|
|
25994
|
+
class GP {
|
|
25974
25995
|
constructor({
|
|
25975
25996
|
initialSize: e = 1024,
|
|
25976
25997
|
maxSize: r = 1 / 0,
|
|
@@ -26106,7 +26127,7 @@ class VP {
|
|
|
26106
26127
|
* @param encoding Encoding to use: 'base64' or 'hex'
|
|
26107
26128
|
*/
|
|
26108
26129
|
toString(e) {
|
|
26109
|
-
return
|
|
26130
|
+
return VP(this.toBytes(), e);
|
|
26110
26131
|
}
|
|
26111
26132
|
}
|
|
26112
26133
|
function Kl(t, e) {
|
|
@@ -26119,10 +26140,10 @@ function Kl(t, e) {
|
|
|
26119
26140
|
var C2 = (t) => {
|
|
26120
26141
|
throw TypeError(t);
|
|
26121
26142
|
}, R2 = (t, e, r) => e.has(t) || C2("Cannot " + r), Pr = (t, e, r) => (R2(t, e, "read from private field"), r ? r.call(t) : e.get(t)), tu = (t, e, r) => e.has(t) ? C2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), ru = (t, e, r, n) => (R2(t, e, "write to private field"), e.set(t, r), r), Ci, Na, Nc, cs;
|
|
26122
|
-
const
|
|
26143
|
+
const qP = class N2 {
|
|
26123
26144
|
constructor(e) {
|
|
26124
26145
|
tu(this, Ci), tu(this, Na), this.name = e.name, this.read = e.read, this.serializedSize = e.serializedSize ?? (() => null), ru(this, Ci, e.write), ru(this, Na, e.serialize ?? ((r, n) => {
|
|
26125
|
-
const s = new
|
|
26146
|
+
const s = new GP({
|
|
26126
26147
|
initialSize: this.serializedSize(r) ?? void 0,
|
|
26127
26148
|
...n
|
|
26128
26149
|
});
|
|
@@ -26134,10 +26155,10 @@ const GP = class N2 {
|
|
|
26134
26155
|
this.validate(e), Pr(this, Ci).call(this, e, r);
|
|
26135
26156
|
}
|
|
26136
26157
|
serialize(e, r) {
|
|
26137
|
-
return this.validate(e), new
|
|
26158
|
+
return this.validate(e), new WP(this, Pr(this, Na).call(this, e, r));
|
|
26138
26159
|
}
|
|
26139
26160
|
parse(e) {
|
|
26140
|
-
const r = new
|
|
26161
|
+
const r = new zP(e);
|
|
26141
26162
|
return this.read(r);
|
|
26142
26163
|
}
|
|
26143
26164
|
fromHex(e) {
|
|
@@ -26169,12 +26190,12 @@ const GP = class N2 {
|
|
|
26169
26190
|
};
|
|
26170
26191
|
Ci = /* @__PURE__ */ new WeakMap();
|
|
26171
26192
|
Na = /* @__PURE__ */ new WeakMap();
|
|
26172
|
-
let pn =
|
|
26193
|
+
let pn = qP;
|
|
26173
26194
|
const U2 = Symbol.for("@mysten/serialized-bcs");
|
|
26174
26195
|
function U0(t) {
|
|
26175
26196
|
return !!t && typeof t == "object" && t[U2] === !0;
|
|
26176
26197
|
}
|
|
26177
|
-
class
|
|
26198
|
+
class WP {
|
|
26178
26199
|
constructor(e, r) {
|
|
26179
26200
|
tu(this, Nc), tu(this, cs), ru(this, Nc, e), ru(this, cs, r);
|
|
26180
26201
|
}
|
|
@@ -26249,7 +26270,7 @@ function Yl({
|
|
|
26249
26270
|
}
|
|
26250
26271
|
});
|
|
26251
26272
|
}
|
|
26252
|
-
function
|
|
26273
|
+
function KP({
|
|
26253
26274
|
serialize: t,
|
|
26254
26275
|
...e
|
|
26255
26276
|
}) {
|
|
@@ -26263,7 +26284,7 @@ function WP({
|
|
|
26263
26284
|
});
|
|
26264
26285
|
return r;
|
|
26265
26286
|
}
|
|
26266
|
-
function
|
|
26287
|
+
function XP({
|
|
26267
26288
|
toBytes: t,
|
|
26268
26289
|
fromBytes: e,
|
|
26269
26290
|
...r
|
|
@@ -26292,7 +26313,7 @@ function KP({
|
|
|
26292
26313
|
}
|
|
26293
26314
|
});
|
|
26294
26315
|
}
|
|
26295
|
-
function
|
|
26316
|
+
function YP(t) {
|
|
26296
26317
|
let e = null;
|
|
26297
26318
|
function r() {
|
|
26298
26319
|
return e || (e = t()), e;
|
|
@@ -26305,7 +26326,7 @@ function XP(t) {
|
|
|
26305
26326
|
serialize: (n, s) => r().serialize(n, s).toBytes()
|
|
26306
26327
|
});
|
|
26307
26328
|
}
|
|
26308
|
-
class
|
|
26329
|
+
class JP extends pn {
|
|
26309
26330
|
constructor({ name: e, fields: r, ...n }) {
|
|
26310
26331
|
const s = Object.entries(r);
|
|
26311
26332
|
super({
|
|
@@ -26339,7 +26360,7 @@ class YP extends pn {
|
|
|
26339
26360
|
});
|
|
26340
26361
|
}
|
|
26341
26362
|
}
|
|
26342
|
-
class
|
|
26363
|
+
class ZP extends pn {
|
|
26343
26364
|
constructor({ fields: e, ...r }) {
|
|
26344
26365
|
const n = Object.entries(e);
|
|
26345
26366
|
super({
|
|
@@ -26384,7 +26405,7 @@ class JP extends pn {
|
|
|
26384
26405
|
});
|
|
26385
26406
|
}
|
|
26386
26407
|
}
|
|
26387
|
-
class
|
|
26408
|
+
class QP extends pn {
|
|
26388
26409
|
constructor({ fields: e, name: r, ...n }) {
|
|
26389
26410
|
super({
|
|
26390
26411
|
name: r ?? `(${e.map((s) => s.name).join(", ")})`,
|
|
@@ -26419,7 +26440,7 @@ class ZP extends pn {
|
|
|
26419
26440
|
});
|
|
26420
26441
|
}
|
|
26421
26442
|
}
|
|
26422
|
-
function
|
|
26443
|
+
function e4(t, e, r) {
|
|
26423
26444
|
return new pn({
|
|
26424
26445
|
read: (n) => {
|
|
26425
26446
|
const s = new Array(t);
|
|
@@ -26442,7 +26463,7 @@ function QP(t, e, r) {
|
|
|
26442
26463
|
}
|
|
26443
26464
|
});
|
|
26444
26465
|
}
|
|
26445
|
-
function
|
|
26466
|
+
function t4(t) {
|
|
26446
26467
|
return P.enum(`Option<${t.name}>`, {
|
|
26447
26468
|
None: null,
|
|
26448
26469
|
Some: t
|
|
@@ -26451,7 +26472,7 @@ function e4(t) {
|
|
|
26451
26472
|
output: (e) => e.$kind === "Some" ? e.Some : null
|
|
26452
26473
|
});
|
|
26453
26474
|
}
|
|
26454
|
-
function
|
|
26475
|
+
function r4(t, e) {
|
|
26455
26476
|
return new pn({
|
|
26456
26477
|
read: (r) => {
|
|
26457
26478
|
const n = r.readULEB(), s = new Array(n);
|
|
@@ -26473,7 +26494,7 @@ function t4(t, e) {
|
|
|
26473
26494
|
}
|
|
26474
26495
|
});
|
|
26475
26496
|
}
|
|
26476
|
-
function
|
|
26497
|
+
function n4(t, e) {
|
|
26477
26498
|
return P.vector(P.tuple([t, e])).transform({
|
|
26478
26499
|
name: `Map<${t.name}, ${e.name}>`,
|
|
26479
26500
|
input: (r) => [...r.entries()],
|
|
@@ -26601,7 +26622,7 @@ const P = {
|
|
|
26601
26622
|
*
|
|
26602
26623
|
*/
|
|
26603
26624
|
uleb128(t) {
|
|
26604
|
-
return
|
|
26625
|
+
return KP({
|
|
26605
26626
|
read: (e) => e.readULEB(),
|
|
26606
26627
|
serialize: (e) => Uint8Array.from(eu(e)),
|
|
26607
26628
|
...t,
|
|
@@ -26667,7 +26688,7 @@ const P = {
|
|
|
26667
26688
|
* bcs.string().serialize('a').toBytes() // Uint8Array [ 1, 97 ]
|
|
26668
26689
|
*/
|
|
26669
26690
|
string(t) {
|
|
26670
|
-
return
|
|
26691
|
+
return XP({
|
|
26671
26692
|
toBytes: (e) => new TextEncoder().encode(e),
|
|
26672
26693
|
fromBytes: (e) => new TextDecoder().decode(e),
|
|
26673
26694
|
...t,
|
|
@@ -26681,7 +26702,7 @@ const P = {
|
|
|
26681
26702
|
* @example
|
|
26682
26703
|
* bcs.fixedArray(3, bcs.u8()).serialize([1, 2, 3]).toBytes() // Uint8Array [ 1, 2, 3 ]
|
|
26683
26704
|
*/
|
|
26684
|
-
fixedArray:
|
|
26705
|
+
fixedArray: e4,
|
|
26685
26706
|
/**
|
|
26686
26707
|
* Creates a BcsType representing an optional value
|
|
26687
26708
|
* @param type The BcsType of the optional value
|
|
@@ -26689,7 +26710,7 @@ const P = {
|
|
|
26689
26710
|
* bcs.option(bcs.u8()).serialize(null).toBytes() // Uint8Array [ 0 ]
|
|
26690
26711
|
* bcs.option(bcs.u8()).serialize(1).toBytes() // Uint8Array [ 1, 1 ]
|
|
26691
26712
|
*/
|
|
26692
|
-
option:
|
|
26713
|
+
option: t4,
|
|
26693
26714
|
/**
|
|
26694
26715
|
* Creates a BcsType representing a variable length vector of a given type
|
|
26695
26716
|
* @param type The BcsType of each element in the vector
|
|
@@ -26697,7 +26718,7 @@ const P = {
|
|
|
26697
26718
|
* @example
|
|
26698
26719
|
* bcs.vector(bcs.u8()).toBytes([1, 2, 3]) // Uint8Array [ 3, 1, 2, 3 ]
|
|
26699
26720
|
*/
|
|
26700
|
-
vector:
|
|
26721
|
+
vector: r4,
|
|
26701
26722
|
/**
|
|
26702
26723
|
* Creates a BcsType representing a tuple of a given set of types
|
|
26703
26724
|
* @param types The BcsTypes for each element in the tuple
|
|
@@ -26707,7 +26728,7 @@ const P = {
|
|
|
26707
26728
|
* tuple.serialize([1, 'a', true]).toBytes() // Uint8Array [ 1, 1, 97, 1 ]
|
|
26708
26729
|
*/
|
|
26709
26730
|
tuple(t, e) {
|
|
26710
|
-
return new
|
|
26731
|
+
return new QP({
|
|
26711
26732
|
fields: t,
|
|
26712
26733
|
...e
|
|
26713
26734
|
});
|
|
@@ -26725,7 +26746,7 @@ const P = {
|
|
|
26725
26746
|
* struct.serialize({ a: 1, b: 'a' }).toBytes() // Uint8Array [ 1, 1, 97 ]
|
|
26726
26747
|
*/
|
|
26727
26748
|
struct(t, e, r) {
|
|
26728
|
-
return new
|
|
26749
|
+
return new JP({
|
|
26729
26750
|
name: t,
|
|
26730
26751
|
fields: e,
|
|
26731
26752
|
...r
|
|
@@ -26748,7 +26769,7 @@ const P = {
|
|
|
26748
26769
|
* enum.serialize({ C: true }).toBytes() // Uint8Array [ 2 ]
|
|
26749
26770
|
*/
|
|
26750
26771
|
enum(t, e, r) {
|
|
26751
|
-
return new
|
|
26772
|
+
return new ZP({
|
|
26752
26773
|
name: t,
|
|
26753
26774
|
fields: e,
|
|
26754
26775
|
...r
|
|
@@ -26762,19 +26783,19 @@ const P = {
|
|
|
26762
26783
|
* const map = bcs.map(bcs.u8(), bcs.string())
|
|
26763
26784
|
* map.serialize(new Map([[2, 'a']])).toBytes() // Uint8Array [ 1, 2, 1, 97 ]
|
|
26764
26785
|
*/
|
|
26765
|
-
map:
|
|
26786
|
+
map: n4,
|
|
26766
26787
|
/**
|
|
26767
26788
|
* Creates a BcsType that wraps another BcsType which is lazily evaluated. This is useful for creating recursive types.
|
|
26768
26789
|
* @param cb A callback that returns the BcsType
|
|
26769
26790
|
*/
|
|
26770
26791
|
lazy(t) {
|
|
26771
|
-
return
|
|
26792
|
+
return YP(t);
|
|
26772
26793
|
}
|
|
26773
26794
|
};
|
|
26774
26795
|
var M2 = (t) => {
|
|
26775
26796
|
throw TypeError(t);
|
|
26776
26797
|
}, F2 = (t, e, r) => e.has(t) || M2("Cannot " + r), xt = (t, e, r) => (F2(t, e, "read from private field"), e.get(t)), Nm = (t, e, r) => e.has(t) ? M2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Um = (t, e, r, n) => (F2(t, e, "write to private field"), e.set(t, r), r), Fs, Ft;
|
|
26777
|
-
const
|
|
26798
|
+
const s4 = class $2 {
|
|
26778
26799
|
constructor({ prefix: e, cache: r } = {}) {
|
|
26779
26800
|
Nm(this, Fs), Nm(this, Ft), Um(this, Fs, e ?? []), Um(this, Ft, r ?? /* @__PURE__ */ new Map());
|
|
26780
26801
|
}
|
|
@@ -26812,12 +26833,12 @@ const n4 = class $2 {
|
|
|
26812
26833
|
};
|
|
26813
26834
|
Fs = /* @__PURE__ */ new WeakMap();
|
|
26814
26835
|
Ft = /* @__PURE__ */ new WeakMap();
|
|
26815
|
-
let
|
|
26836
|
+
let i4 = s4;
|
|
26816
26837
|
class j2 {
|
|
26817
26838
|
constructor({
|
|
26818
26839
|
network: e,
|
|
26819
26840
|
base: r,
|
|
26820
|
-
cache: n = (r == null ? void 0 : r.cache) ?? new
|
|
26841
|
+
cache: n = (r == null ? void 0 : r.cache) ?? new i4()
|
|
26821
26842
|
}) {
|
|
26822
26843
|
this.network = e, this.base = r ?? this, this.cache = n;
|
|
26823
26844
|
}
|
|
@@ -26842,17 +26863,17 @@ function H2(t) {
|
|
|
26842
26863
|
}
|
|
26843
26864
|
let Jl;
|
|
26844
26865
|
// @__NO_SIDE_EFFECTS__
|
|
26845
|
-
function
|
|
26866
|
+
function a4(t) {
|
|
26846
26867
|
return Jl == null ? void 0 : Jl.get(t);
|
|
26847
26868
|
}
|
|
26848
26869
|
let Zl;
|
|
26849
26870
|
// @__NO_SIDE_EFFECTS__
|
|
26850
|
-
function
|
|
26871
|
+
function o4(t) {
|
|
26851
26872
|
return Zl == null ? void 0 : Zl.get(t);
|
|
26852
26873
|
}
|
|
26853
26874
|
let Ql;
|
|
26854
26875
|
// @__NO_SIDE_EFFECTS__
|
|
26855
|
-
function
|
|
26876
|
+
function c4(t, e) {
|
|
26856
26877
|
var r;
|
|
26857
26878
|
return (r = Ql == null ? void 0 : Ql.get(t)) == null ? void 0 : r.get(e);
|
|
26858
26879
|
}
|
|
@@ -26876,7 +26897,7 @@ function Zt(t, e, r, n, s) {
|
|
|
26876
26897
|
lang: n.lang,
|
|
26877
26898
|
abortEarly: n.abortEarly,
|
|
26878
26899
|
abortPipeEarly: n.abortPipeEarly
|
|
26879
|
-
}, u = t.kind === "schema", f = (s == null ? void 0 : s.message) ?? t.message ?? /* @__PURE__ */
|
|
26900
|
+
}, u = t.kind === "schema", f = (s == null ? void 0 : s.message) ?? t.message ?? /* @__PURE__ */ c4(t.reference, c.lang) ?? (u ? /* @__PURE__ */ o4(c.lang) : null) ?? n.message ?? /* @__PURE__ */ a4(c.lang);
|
|
26880
26901
|
f !== void 0 && (c.message = typeof f == "function" ? f(c) : f), u && (r.typed = !1), r.issues ? r.issues.push(c) : r.issues = [c];
|
|
26881
26902
|
}
|
|
26882
26903
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -26890,15 +26911,15 @@ function Bt(t) {
|
|
|
26890
26911
|
};
|
|
26891
26912
|
}
|
|
26892
26913
|
// @__NO_SIDE_EFFECTS__
|
|
26893
|
-
function
|
|
26914
|
+
function u4(t, e) {
|
|
26894
26915
|
return Object.hasOwn(t, e) && e !== "__proto__" && e !== "prototype" && e !== "constructor";
|
|
26895
26916
|
}
|
|
26896
26917
|
// @__NO_SIDE_EFFECTS__
|
|
26897
|
-
function
|
|
26918
|
+
function f4(t, e) {
|
|
26898
26919
|
const r = [...new Set(t)];
|
|
26899
26920
|
return r.length > 1 ? `(${r.join(` ${e} `)})` : r[0] ?? "never";
|
|
26900
26921
|
}
|
|
26901
|
-
var
|
|
26922
|
+
var l4 = class extends Error {
|
|
26902
26923
|
/**
|
|
26903
26924
|
* Creates a Valibot error with useful information.
|
|
26904
26925
|
*
|
|
@@ -26952,7 +26973,7 @@ function Qu(t) {
|
|
|
26952
26973
|
};
|
|
26953
26974
|
}
|
|
26954
26975
|
// @__NO_SIDE_EFFECTS__
|
|
26955
|
-
function
|
|
26976
|
+
function d4(t, e, r) {
|
|
26956
26977
|
return typeof t.fallback == "function" ? t.fallback(e, r) : t.fallback;
|
|
26957
26978
|
}
|
|
26958
26979
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -27165,7 +27186,7 @@ function he(t, e) {
|
|
|
27165
27186
|
}
|
|
27166
27187
|
}
|
|
27167
27188
|
u.typed || (r.typed = !1), r.value[a] = u.value;
|
|
27168
|
-
} else if (o.fallback !== void 0) r.value[a] = /* @__PURE__ */
|
|
27189
|
+
} else if (o.fallback !== void 0) r.value[a] = /* @__PURE__ */ d4(o);
|
|
27169
27190
|
else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (Zt(this, "key", r, n, {
|
|
27170
27191
|
input: void 0,
|
|
27171
27192
|
expected: `"${a}"`,
|
|
@@ -27221,7 +27242,7 @@ function ko(t, e, r) {
|
|
|
27221
27242
|
const i = n.value;
|
|
27222
27243
|
if (i && typeof i == "object") {
|
|
27223
27244
|
n.typed = !0, n.value = {};
|
|
27224
|
-
for (const c in i) if (/* @__PURE__ */
|
|
27245
|
+
for (const c in i) if (/* @__PURE__ */ u4(i, c)) {
|
|
27225
27246
|
const u = i[c], f = this.key["~run"]({ value: c }, s);
|
|
27226
27247
|
if (f.issues) {
|
|
27227
27248
|
const p = {
|
|
@@ -27332,7 +27353,7 @@ function yn(t, e) {
|
|
|
27332
27353
|
kind: "schema",
|
|
27333
27354
|
type: "union",
|
|
27334
27355
|
reference: yn,
|
|
27335
|
-
expects: /* @__PURE__ */
|
|
27356
|
+
expects: /* @__PURE__ */ f4(t.map((r) => r.expects), "|"),
|
|
27336
27357
|
async: !1,
|
|
27337
27358
|
options: t,
|
|
27338
27359
|
message: e,
|
|
@@ -27380,7 +27401,7 @@ function Qo() {
|
|
|
27380
27401
|
}
|
|
27381
27402
|
function qe(t, e, r) {
|
|
27382
27403
|
const n = t["~run"]({ value: e }, /* @__PURE__ */ H2(r));
|
|
27383
|
-
if (n.issues) throw new
|
|
27404
|
+
if (n.issues) throw new l4(n.issues);
|
|
27384
27405
|
return n.value;
|
|
27385
27406
|
}
|
|
27386
27407
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -27403,11 +27424,11 @@ function wt(...t) {
|
|
|
27403
27424
|
}
|
|
27404
27425
|
};
|
|
27405
27426
|
}
|
|
27406
|
-
const z2 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, V2 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i,
|
|
27407
|
-
function
|
|
27408
|
-
return t.length >
|
|
27427
|
+
const z2 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, V2 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i, h4 = 235;
|
|
27428
|
+
function p4(t) {
|
|
27429
|
+
return t.length > h4 ? !1 : t.includes("@") ? z2.test(t) : V2.test(t);
|
|
27409
27430
|
}
|
|
27410
|
-
function
|
|
27431
|
+
function y4(t, e = "at") {
|
|
27411
27432
|
const r = t.toLowerCase();
|
|
27412
27433
|
let n;
|
|
27413
27434
|
if (r.includes("@")) {
|
|
@@ -27422,37 +27443,37 @@ function p4(t, e = "at") {
|
|
|
27422
27443
|
}
|
|
27423
27444
|
return e === "dot" ? `${n.join(".")}.sui` : `${n.slice(0, -1).join(".")}@${n[n.length - 1]}`;
|
|
27424
27445
|
}
|
|
27425
|
-
const
|
|
27446
|
+
const m4 = /^([a-z0-9]+(?:-[a-z0-9]+)*)$/, b4 = /^\d+$/, g4 = 64, G2 = "/", rr = (t) => {
|
|
27426
27447
|
const e = t.split(G2);
|
|
27427
27448
|
if (e.length < 2 || e.length > 3) return !1;
|
|
27428
27449
|
const [r, n, s] = e;
|
|
27429
|
-
return s !== void 0 && !
|
|
27430
|
-
},
|
|
27450
|
+
return s !== void 0 && !b4.test(s) || !p4(r) ? !1 : m4.test(n) && n.length < g4;
|
|
27451
|
+
}, w4 = (t) => {
|
|
27431
27452
|
const e = t.split(/::|<|>|,/);
|
|
27432
27453
|
for (const r of e)
|
|
27433
27454
|
if (r.includes(G2) && !rr(r)) return !1;
|
|
27434
27455
|
return !0;
|
|
27435
|
-
},
|
|
27456
|
+
}, v4 = 32;
|
|
27436
27457
|
function Fm(t) {
|
|
27437
27458
|
try {
|
|
27438
|
-
return So(t).length ===
|
|
27459
|
+
return So(t).length === v4;
|
|
27439
27460
|
} catch {
|
|
27440
27461
|
return !1;
|
|
27441
27462
|
}
|
|
27442
27463
|
}
|
|
27443
27464
|
const tf = 32;
|
|
27444
27465
|
function Or(t) {
|
|
27445
|
-
return
|
|
27466
|
+
return A4(t) && S4(t) === tf;
|
|
27446
27467
|
}
|
|
27447
27468
|
function Ac(t) {
|
|
27448
27469
|
return Or(t);
|
|
27449
27470
|
}
|
|
27450
|
-
function
|
|
27471
|
+
function E4(t) {
|
|
27451
27472
|
return t.includes("::") ? fi(t) : t;
|
|
27452
27473
|
}
|
|
27453
27474
|
function fi(t) {
|
|
27454
27475
|
const [e, r] = t.split("::"), n = rr(e), s = t.slice(e.length + r.length + 4), i = s.includes("<") ? s.slice(0, s.indexOf("<")) : s, a = s.includes("<") ? B2(s.slice(s.indexOf("<") + 1, s.lastIndexOf(">"))).map(
|
|
27455
|
-
(o) =>
|
|
27476
|
+
(o) => E4(o.trim())
|
|
27456
27477
|
) : [];
|
|
27457
27478
|
return {
|
|
27458
27479
|
address: n ? e : ve(e),
|
|
@@ -27474,10 +27495,10 @@ function ve(t, e = !1) {
|
|
|
27474
27495
|
function on(t, e = !1) {
|
|
27475
27496
|
return ve(t, e);
|
|
27476
27497
|
}
|
|
27477
|
-
function
|
|
27498
|
+
function A4(t) {
|
|
27478
27499
|
return /^(0x|0X)?[a-fA-F0-9]+$/.test(t) && t.length % 2 === 0;
|
|
27479
27500
|
}
|
|
27480
|
-
function
|
|
27501
|
+
function S4(t) {
|
|
27481
27502
|
return /^(0x|0X)/.test(t) ? (t.length - 2) / 2 : t.length / 2;
|
|
27482
27503
|
}
|
|
27483
27504
|
function wi(t) {
|
|
@@ -27522,7 +27543,7 @@ const ma = /* @__PURE__ */ wt(
|
|
|
27522
27543
|
$kind: Object.keys(t)[0]
|
|
27523
27544
|
}))
|
|
27524
27545
|
// Defined manually to add `type?: 'pure' | 'object'` to Input
|
|
27525
|
-
),
|
|
27546
|
+
), x4 = /* @__PURE__ */ he({
|
|
27526
27547
|
budget: /* @__PURE__ */ Je(Qt),
|
|
27527
27548
|
price: /* @__PURE__ */ Je(Qt),
|
|
27528
27549
|
owner: /* @__PURE__ */ Je(ma),
|
|
@@ -27546,23 +27567,23 @@ const ma = /* @__PURE__ */ wt(
|
|
|
27546
27567
|
})
|
|
27547
27568
|
}),
|
|
27548
27569
|
/* @__PURE__ */ he({ typeParameter: /* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()) })
|
|
27549
|
-
]),
|
|
27570
|
+
]), k4 = /* @__PURE__ */ he({
|
|
27550
27571
|
ref: /* @__PURE__ */ Je(/* @__PURE__ */ yn([/* @__PURE__ */ ot("&"), /* @__PURE__ */ ot("&mut")])),
|
|
27551
27572
|
body: sh
|
|
27552
|
-
}),
|
|
27573
|
+
}), _4 = /* @__PURE__ */ he({
|
|
27553
27574
|
package: cr,
|
|
27554
27575
|
module: /* @__PURE__ */ Ie(),
|
|
27555
27576
|
function: /* @__PURE__ */ Ie(),
|
|
27556
27577
|
// snake case in rust
|
|
27557
27578
|
typeArguments: /* @__PURE__ */ xe(/* @__PURE__ */ Ie()),
|
|
27558
27579
|
arguments: /* @__PURE__ */ xe(He),
|
|
27559
|
-
_argumentTypes: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ xe(
|
|
27560
|
-
}),
|
|
27580
|
+
_argumentTypes: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ xe(k4)))
|
|
27581
|
+
}), T4 = /* @__PURE__ */ he({
|
|
27561
27582
|
name: /* @__PURE__ */ Ie(),
|
|
27562
27583
|
inputs: /* @__PURE__ */ ko(/* @__PURE__ */ Ie(), /* @__PURE__ */ yn([He, /* @__PURE__ */ xe(He)])),
|
|
27563
27584
|
data: /* @__PURE__ */ ko(/* @__PURE__ */ Ie(), /* @__PURE__ */ Qo())
|
|
27564
|
-
}),
|
|
27565
|
-
MoveCall:
|
|
27585
|
+
}), I4 = wi({
|
|
27586
|
+
MoveCall: _4,
|
|
27566
27587
|
TransferObjects: /* @__PURE__ */ he({
|
|
27567
27588
|
objects: /* @__PURE__ */ xe(He),
|
|
27568
27589
|
address: He
|
|
@@ -27589,7 +27610,7 @@ const ma = /* @__PURE__ */ wt(
|
|
|
27589
27610
|
package: cr,
|
|
27590
27611
|
ticket: He
|
|
27591
27612
|
}),
|
|
27592
|
-
$Intent:
|
|
27613
|
+
$Intent: T4
|
|
27593
27614
|
}), q2 = wi({
|
|
27594
27615
|
ImmOrOwnedObject: _s,
|
|
27595
27616
|
SharedObject: /* @__PURE__ */ he({
|
|
@@ -27599,7 +27620,7 @@ const ma = /* @__PURE__ */ wt(
|
|
|
27599
27620
|
mutable: /* @__PURE__ */ ya()
|
|
27600
27621
|
}),
|
|
27601
27622
|
Receiving: _s
|
|
27602
|
-
}),
|
|
27623
|
+
}), P4 = wi({
|
|
27603
27624
|
Object: q2,
|
|
27604
27625
|
Pure: /* @__PURE__ */ he({
|
|
27605
27626
|
bytes: li
|
|
@@ -27626,9 +27647,9 @@ const ma = /* @__PURE__ */ wt(
|
|
|
27626
27647
|
version: /* @__PURE__ */ ot(2),
|
|
27627
27648
|
sender: /* @__PURE__ */ xo(ma),
|
|
27628
27649
|
expiration: /* @__PURE__ */ xo(W2),
|
|
27629
|
-
gasData:
|
|
27630
|
-
inputs: /* @__PURE__ */ xe(
|
|
27631
|
-
commands: /* @__PURE__ */ xe(
|
|
27650
|
+
gasData: x4,
|
|
27651
|
+
inputs: /* @__PURE__ */ xe(P4),
|
|
27652
|
+
commands: /* @__PURE__ */ xe(I4)
|
|
27632
27653
|
}), Ms = {
|
|
27633
27654
|
MoveCall(t) {
|
|
27634
27655
|
const [e, r = "", n = ""] = "target" in t ? t.target.split("::") : [t.package, t.module, t.function];
|
|
@@ -27733,7 +27754,7 @@ const ma = /* @__PURE__ */ wt(
|
|
|
27733
27754
|
}
|
|
27734
27755
|
};
|
|
27735
27756
|
}
|
|
27736
|
-
},
|
|
27757
|
+
}, O4 = /^vector<(.+)>$/, B4 = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
|
|
27737
27758
|
class Br {
|
|
27738
27759
|
static parseFromStr(e, r = !1) {
|
|
27739
27760
|
if (e === "address")
|
|
@@ -27754,12 +27775,12 @@ class Br {
|
|
|
27754
27775
|
return { u256: null };
|
|
27755
27776
|
if (e === "signer")
|
|
27756
27777
|
return { signer: null };
|
|
27757
|
-
const n = e.match(
|
|
27778
|
+
const n = e.match(O4);
|
|
27758
27779
|
if (n)
|
|
27759
27780
|
return {
|
|
27760
27781
|
vector: Br.parseFromStr(n[1], r)
|
|
27761
27782
|
};
|
|
27762
|
-
const s = e.match(
|
|
27783
|
+
const s = e.match(B4);
|
|
27763
27784
|
if (s)
|
|
27764
27785
|
return {
|
|
27765
27786
|
struct: {
|
|
@@ -27804,7 +27825,7 @@ class Br {
|
|
|
27804
27825
|
throw new Error("Invalid TypeTag");
|
|
27805
27826
|
}
|
|
27806
27827
|
}
|
|
27807
|
-
function
|
|
27828
|
+
function C4(t) {
|
|
27808
27829
|
return P.u64({
|
|
27809
27830
|
name: "unsafe_u64",
|
|
27810
27831
|
...t
|
|
@@ -27813,7 +27834,7 @@ function B4(t) {
|
|
|
27813
27834
|
output: (e) => Number(e)
|
|
27814
27835
|
});
|
|
27815
27836
|
}
|
|
27816
|
-
function
|
|
27837
|
+
function R4(t) {
|
|
27817
27838
|
return P.enum("Option", {
|
|
27818
27839
|
None: null,
|
|
27819
27840
|
Some: t
|
|
@@ -27938,7 +27959,7 @@ const Le = P.bytes(tf).transform({
|
|
|
27938
27959
|
// * so this call serves a utility function.
|
|
27939
27960
|
// */
|
|
27940
27961
|
MakeMoveVec: P.struct("MakeMoveVec", {
|
|
27941
|
-
type:
|
|
27962
|
+
type: R4(j0).transform({
|
|
27942
27963
|
input: (t) => t === null ? {
|
|
27943
27964
|
None: !0
|
|
27944
27965
|
} : {
|
|
@@ -27969,7 +27990,7 @@ const Le = P.bytes(tf).transform({
|
|
|
27969
27990
|
ConsensusCommitPrologue: null
|
|
27970
27991
|
}), t6 = P.enum("TransactionExpiration", {
|
|
27971
27992
|
None: null,
|
|
27972
|
-
Epoch:
|
|
27993
|
+
Epoch: C4()
|
|
27973
27994
|
}), r6 = P.struct("StructTag", {
|
|
27974
27995
|
address: Le,
|
|
27975
27996
|
module: P.string(),
|
|
@@ -28025,23 +28046,23 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28025
28046
|
}), p6 = P.struct("MultiSigPublicKey", {
|
|
28026
28047
|
pk_map: P.vector(h6),
|
|
28027
28048
|
threshold: P.u16()
|
|
28028
|
-
}),
|
|
28049
|
+
}), N4 = P.struct("MultiSig", {
|
|
28029
28050
|
sigs: P.vector(l6),
|
|
28030
28051
|
bitmap: P.u16(),
|
|
28031
28052
|
multisig_pk: p6
|
|
28032
|
-
}),
|
|
28053
|
+
}), U4 = P.byteVector().transform({
|
|
28033
28054
|
input: (t) => typeof t == "string" ? or(t) : t,
|
|
28034
28055
|
output: (t) => Tt(new Uint8Array(t))
|
|
28035
28056
|
}), y6 = P.struct("SenderSignedTransaction", {
|
|
28036
28057
|
intentMessage: f6(i6),
|
|
28037
|
-
txSignatures: P.vector(
|
|
28038
|
-
}),
|
|
28058
|
+
txSignatures: P.vector(U4)
|
|
28059
|
+
}), M4 = P.vector(y6, {
|
|
28039
28060
|
name: "SenderSignedData"
|
|
28040
|
-
}),
|
|
28061
|
+
}), F4 = P.struct("PasskeyAuthenticator", {
|
|
28041
28062
|
authenticatorData: P.byteVector(),
|
|
28042
28063
|
clientDataJson: P.string(),
|
|
28043
28064
|
userSignature: P.byteVector()
|
|
28044
|
-
}),
|
|
28065
|
+
}), $4 = P.enum("PackageUpgradeError", {
|
|
28045
28066
|
UnableToFetchPackage: P.struct("UnableToFetchPackage", { packageId: Le }),
|
|
28046
28067
|
NotAPackage: P.struct("NotAPackage", { objectId: Le }),
|
|
28047
28068
|
IncompatibleUpgrade: null,
|
|
@@ -28051,15 +28072,15 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28051
28072
|
packageId: Le,
|
|
28052
28073
|
ticketId: Le
|
|
28053
28074
|
})
|
|
28054
|
-
}),
|
|
28075
|
+
}), j4 = P.struct("ModuleId", {
|
|
28055
28076
|
address: Le,
|
|
28056
28077
|
name: P.string()
|
|
28057
28078
|
}), jm = P.struct("MoveLocation", {
|
|
28058
|
-
module:
|
|
28079
|
+
module: j4,
|
|
28059
28080
|
function: P.u16(),
|
|
28060
28081
|
instruction: P.u16(),
|
|
28061
28082
|
functionName: P.option(P.string())
|
|
28062
|
-
}),
|
|
28083
|
+
}), H4 = P.enum("CommandArgumentError", {
|
|
28063
28084
|
TypeMismatch: null,
|
|
28064
28085
|
InvalidBCSBytes: null,
|
|
28065
28086
|
InvalidUsageOfPureArg: null,
|
|
@@ -28075,10 +28096,10 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28075
28096
|
InvalidObjectByValue: null,
|
|
28076
28097
|
InvalidObjectByMutRef: null,
|
|
28077
28098
|
SharedObjectOperationNotAllowed: null
|
|
28078
|
-
}),
|
|
28099
|
+
}), L4 = P.enum("TypeArgumentError", {
|
|
28079
28100
|
TypeNotFound: null,
|
|
28080
28101
|
ConstraintNotSatisfied: null
|
|
28081
|
-
}),
|
|
28102
|
+
}), D4 = P.enum("ExecutionFailureStatus", {
|
|
28082
28103
|
InsufficientGas: null,
|
|
28083
28104
|
InvalidGasObject: null,
|
|
28084
28105
|
InvariantViolation: null,
|
|
@@ -28106,11 +28127,11 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28106
28127
|
NonEntryFunctionInvoked: null,
|
|
28107
28128
|
CommandArgumentError: P.struct("CommandArgumentError", {
|
|
28108
28129
|
argIdx: P.u16(),
|
|
28109
|
-
kind:
|
|
28130
|
+
kind: H4
|
|
28110
28131
|
}),
|
|
28111
28132
|
TypeArgumentError: P.struct("TypeArgumentError", {
|
|
28112
28133
|
argumentIdx: P.u16(),
|
|
28113
|
-
kind:
|
|
28134
|
+
kind: L4
|
|
28114
28135
|
}),
|
|
28115
28136
|
UnusedValueWithoutDrop: P.struct("UnusedValueWithoutDrop", {
|
|
28116
28137
|
resultIdx: P.u16(),
|
|
@@ -28123,7 +28144,7 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28123
28144
|
EffectsTooLarge: P.struct("EffectsTooLarge", { currentSize: P.u64(), maxSize: P.u64() }),
|
|
28124
28145
|
PublishUpgradeMissingDependency: null,
|
|
28125
28146
|
PublishUpgradeDependencyDowngrade: null,
|
|
28126
|
-
PackageUpgradeError: P.struct("PackageUpgradeError", { upgradeError:
|
|
28147
|
+
PackageUpgradeError: P.struct("PackageUpgradeError", { upgradeError: $4 }),
|
|
28127
28148
|
WrittenObjectsTooLarge: P.struct("WrittenObjectsTooLarge", {
|
|
28128
28149
|
currentSize: P.u64(),
|
|
28129
28150
|
maxSize: P.u64()
|
|
@@ -28147,7 +28168,7 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28147
28168
|
}), m6 = P.enum("ExecutionStatus", {
|
|
28148
28169
|
Success: null,
|
|
28149
28170
|
Failed: P.struct("ExecutionFailed", {
|
|
28150
|
-
error:
|
|
28171
|
+
error: D4,
|
|
28151
28172
|
command: P.option(P.u64())
|
|
28152
28173
|
})
|
|
28153
28174
|
}), b6 = P.struct("GasCostSummary", {
|
|
@@ -28155,7 +28176,7 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28155
28176
|
storageCost: P.u64(),
|
|
28156
28177
|
storageRebate: P.u64(),
|
|
28157
28178
|
nonRefundableStorageFee: P.u64()
|
|
28158
|
-
}),
|
|
28179
|
+
}), z4 = P.struct("TransactionEffectsV1", {
|
|
28159
28180
|
status: m6,
|
|
28160
28181
|
executedEpoch: P.u64(),
|
|
28161
28182
|
gasUsed: b6,
|
|
@@ -28171,29 +28192,29 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28171
28192
|
gasObject: P.tuple([wr, zs]),
|
|
28172
28193
|
eventsDigest: P.option(Ur),
|
|
28173
28194
|
dependencies: P.vector(Ur)
|
|
28174
|
-
}), H0 = P.tuple([P.u64(), Ur]),
|
|
28195
|
+
}), H0 = P.tuple([P.u64(), Ur]), V4 = P.enum("ObjectIn", {
|
|
28175
28196
|
NotExist: null,
|
|
28176
28197
|
Exist: P.tuple([H0, zs])
|
|
28177
|
-
}),
|
|
28198
|
+
}), G4 = P.enum("ObjectOut", {
|
|
28178
28199
|
NotExist: null,
|
|
28179
28200
|
ObjectWrite: P.tuple([Ur, zs]),
|
|
28180
28201
|
PackageWrite: H0
|
|
28181
|
-
}),
|
|
28202
|
+
}), q4 = P.enum("IDOperation", {
|
|
28182
28203
|
None: null,
|
|
28183
28204
|
Created: null,
|
|
28184
28205
|
Deleted: null
|
|
28185
|
-
}),
|
|
28186
|
-
inputState:
|
|
28187
|
-
outputState:
|
|
28188
|
-
idOperation:
|
|
28189
|
-
}),
|
|
28206
|
+
}), W4 = P.struct("EffectsObjectChange", {
|
|
28207
|
+
inputState: V4,
|
|
28208
|
+
outputState: G4,
|
|
28209
|
+
idOperation: q4
|
|
28210
|
+
}), K4 = P.enum("UnchangedSharedKind", {
|
|
28190
28211
|
ReadOnlyRoot: H0,
|
|
28191
28212
|
// TODO: these have been renamed to MutateConsensusStreamEnded and ReadConsensusStreamEnded
|
|
28192
28213
|
MutateDeleted: P.u64(),
|
|
28193
28214
|
ReadDeleted: P.u64(),
|
|
28194
28215
|
Cancelled: P.u64(),
|
|
28195
28216
|
PerEpochConfig: null
|
|
28196
|
-
}),
|
|
28217
|
+
}), X4 = P.struct("TransactionEffectsV2", {
|
|
28197
28218
|
status: m6,
|
|
28198
28219
|
executedEpoch: P.u64(),
|
|
28199
28220
|
gasUsed: b6,
|
|
@@ -28202,12 +28223,12 @@ const l6 = P.enum("CompressedSignature", {
|
|
|
28202
28223
|
eventsDigest: P.option(Ur),
|
|
28203
28224
|
dependencies: P.vector(Ur),
|
|
28204
28225
|
lamportVersion: P.u64(),
|
|
28205
|
-
changedObjects: P.vector(P.tuple([Le,
|
|
28206
|
-
unchangedSharedObjects: P.vector(P.tuple([Le,
|
|
28226
|
+
changedObjects: P.vector(P.tuple([Le, W4])),
|
|
28227
|
+
unchangedSharedObjects: P.vector(P.tuple([Le, K4])),
|
|
28207
28228
|
auxDataDigest: P.option(Ur)
|
|
28208
|
-
}),
|
|
28209
|
-
V1:
|
|
28210
|
-
V2:
|
|
28229
|
+
}), Y4 = P.enum("TransactionEffects", {
|
|
28230
|
+
V1: z4,
|
|
28231
|
+
V2: X4
|
|
28211
28232
|
});
|
|
28212
28233
|
function Ga(t) {
|
|
28213
28234
|
switch (t) {
|
|
@@ -28260,24 +28281,24 @@ const ye = {
|
|
|
28260
28281
|
IntentMessage: f6,
|
|
28261
28282
|
IntentScope: a6,
|
|
28262
28283
|
IntentVersion: o6,
|
|
28263
|
-
MultiSig:
|
|
28284
|
+
MultiSig: N4,
|
|
28264
28285
|
MultiSigPkMap: h6,
|
|
28265
28286
|
MultiSigPublicKey: p6,
|
|
28266
28287
|
ObjectArg: X2,
|
|
28267
28288
|
ObjectDigest: Ur,
|
|
28268
28289
|
Owner: zs,
|
|
28269
|
-
PasskeyAuthenticator:
|
|
28290
|
+
PasskeyAuthenticator: F4,
|
|
28270
28291
|
ProgrammableMoveCall: J2,
|
|
28271
28292
|
ProgrammableTransaction: Q2,
|
|
28272
28293
|
PublicKey: d6,
|
|
28273
|
-
SenderSignedData:
|
|
28294
|
+
SenderSignedData: M4,
|
|
28274
28295
|
SenderSignedTransaction: y6,
|
|
28275
28296
|
SharedObjectRef: K2,
|
|
28276
28297
|
StructTag: r6,
|
|
28277
28298
|
SuiObjectRef: wr,
|
|
28278
28299
|
TransactionData: i6,
|
|
28279
28300
|
TransactionDataV1: s6,
|
|
28280
|
-
TransactionEffects:
|
|
28301
|
+
TransactionEffects: Y4,
|
|
28281
28302
|
TransactionExpiration: t6,
|
|
28282
28303
|
TransactionKind: e6,
|
|
28283
28304
|
TypeTag: j0
|
|
@@ -28285,7 +28306,7 @@ const ye = {
|
|
|
28285
28306
|
digest: /* @__PURE__ */ Ie(),
|
|
28286
28307
|
objectId: /* @__PURE__ */ Ie(),
|
|
28287
28308
|
version: /* @__PURE__ */ yn([/* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()), /* @__PURE__ */ Ie(), /* @__PURE__ */ D2()])
|
|
28288
|
-
}),
|
|
28309
|
+
}), J4 = wi({
|
|
28289
28310
|
ImmOrOwned: Hm,
|
|
28290
28311
|
Shared: /* @__PURE__ */ he({
|
|
28291
28312
|
objectId: cr,
|
|
@@ -28294,7 +28315,7 @@ const ye = {
|
|
|
28294
28315
|
}),
|
|
28295
28316
|
Receiving: Hm
|
|
28296
28317
|
}), Lm = wi({
|
|
28297
|
-
Object:
|
|
28318
|
+
Object: J4,
|
|
28298
28319
|
Pure: /* @__PURE__ */ xe(/* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()))
|
|
28299
28320
|
});
|
|
28300
28321
|
function Dm(t) {
|
|
@@ -28428,7 +28449,7 @@ function xn(t, e) {
|
|
|
28428
28449
|
return e[t.Input];
|
|
28429
28450
|
throw new Error(`Invalid argument ${Object.keys(t)}`);
|
|
28430
28451
|
}
|
|
28431
|
-
function
|
|
28452
|
+
function Z4(t) {
|
|
28432
28453
|
var e, r, n;
|
|
28433
28454
|
return qe(Uc, {
|
|
28434
28455
|
version: 2,
|
|
@@ -28584,24 +28605,24 @@ const Tr = ec({
|
|
|
28584
28605
|
Input: /* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()),
|
|
28585
28606
|
Result: /* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()),
|
|
28586
28607
|
NestedResult: /* @__PURE__ */ F0([/* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()), /* @__PURE__ */ wt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt())])
|
|
28587
|
-
}),
|
|
28608
|
+
}), Q4 = /* @__PURE__ */ he({
|
|
28588
28609
|
budget: /* @__PURE__ */ Je(Qt),
|
|
28589
28610
|
price: /* @__PURE__ */ Je(Qt),
|
|
28590
28611
|
owner: /* @__PURE__ */ Je(ma),
|
|
28591
28612
|
payment: /* @__PURE__ */ Je(/* @__PURE__ */ xe(_s))
|
|
28592
|
-
}),
|
|
28613
|
+
}), eO = /* @__PURE__ */ he({
|
|
28593
28614
|
package: cr,
|
|
28594
28615
|
module: /* @__PURE__ */ Ie(),
|
|
28595
28616
|
function: /* @__PURE__ */ Ie(),
|
|
28596
28617
|
// snake case in rust
|
|
28597
28618
|
typeArguments: /* @__PURE__ */ xe(/* @__PURE__ */ Ie()),
|
|
28598
28619
|
arguments: /* @__PURE__ */ xe(Tr)
|
|
28599
|
-
}),
|
|
28620
|
+
}), tO = /* @__PURE__ */ he({
|
|
28600
28621
|
name: /* @__PURE__ */ Ie(),
|
|
28601
28622
|
inputs: /* @__PURE__ */ ko(/* @__PURE__ */ Ie(), /* @__PURE__ */ yn([Tr, /* @__PURE__ */ xe(Tr)])),
|
|
28602
28623
|
data: /* @__PURE__ */ ko(/* @__PURE__ */ Ie(), /* @__PURE__ */ Qo())
|
|
28603
|
-
}),
|
|
28604
|
-
MoveCall:
|
|
28624
|
+
}), rO = ec({
|
|
28625
|
+
MoveCall: eO,
|
|
28605
28626
|
TransferObjects: /* @__PURE__ */ he({
|
|
28606
28627
|
objects: /* @__PURE__ */ xe(Tr),
|
|
28607
28628
|
address: Tr
|
|
@@ -28628,8 +28649,8 @@ const Tr = ec({
|
|
|
28628
28649
|
package: cr,
|
|
28629
28650
|
ticket: Tr
|
|
28630
28651
|
}),
|
|
28631
|
-
$Intent:
|
|
28632
|
-
}),
|
|
28652
|
+
$Intent: tO
|
|
28653
|
+
}), nO = ec({
|
|
28633
28654
|
ImmOrOwnedObject: _s,
|
|
28634
28655
|
SharedObject: /* @__PURE__ */ he({
|
|
28635
28656
|
objectId: cr,
|
|
@@ -28638,8 +28659,8 @@ const Tr = ec({
|
|
|
28638
28659
|
mutable: /* @__PURE__ */ ya()
|
|
28639
28660
|
}),
|
|
28640
28661
|
Receiving: _s
|
|
28641
|
-
}),
|
|
28642
|
-
Object:
|
|
28662
|
+
}), sO = ec({
|
|
28663
|
+
Object: nO,
|
|
28643
28664
|
Pure: /* @__PURE__ */ he({
|
|
28644
28665
|
bytes: li
|
|
28645
28666
|
}),
|
|
@@ -28653,19 +28674,19 @@ const Tr = ec({
|
|
|
28653
28674
|
initialSharedVersion: /* @__PURE__ */ ar(/* @__PURE__ */ Je(Qt)),
|
|
28654
28675
|
mutable: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ ya()))
|
|
28655
28676
|
})
|
|
28656
|
-
}),
|
|
28677
|
+
}), iO = ec({
|
|
28657
28678
|
None: /* @__PURE__ */ ot(!0),
|
|
28658
28679
|
Epoch: Qt
|
|
28659
|
-
}),
|
|
28680
|
+
}), aO = /* @__PURE__ */ he({
|
|
28660
28681
|
version: /* @__PURE__ */ ot(2),
|
|
28661
28682
|
sender: /* @__PURE__ */ xo(ma),
|
|
28662
|
-
expiration: /* @__PURE__ */ xo(
|
|
28663
|
-
gasData:
|
|
28664
|
-
inputs: /* @__PURE__ */ xe(
|
|
28665
|
-
commands: /* @__PURE__ */ xe(
|
|
28683
|
+
expiration: /* @__PURE__ */ xo(iO),
|
|
28684
|
+
gasData: Q4,
|
|
28685
|
+
inputs: /* @__PURE__ */ xe(sO),
|
|
28686
|
+
commands: /* @__PURE__ */ xe(rO),
|
|
28666
28687
|
digest: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ Ie()))
|
|
28667
28688
|
});
|
|
28668
|
-
function
|
|
28689
|
+
function oO(t) {
|
|
28669
28690
|
return {
|
|
28670
28691
|
$kind: "Pure",
|
|
28671
28692
|
Pure: {
|
|
@@ -28674,7 +28695,7 @@ function aO(t) {
|
|
|
28674
28695
|
};
|
|
28675
28696
|
}
|
|
28676
28697
|
const Mr = {
|
|
28677
|
-
Pure:
|
|
28698
|
+
Pure: oO,
|
|
28678
28699
|
ObjectRef({ objectId: t, digest: e, version: r }) {
|
|
28679
28700
|
return {
|
|
28680
28701
|
$kind: "Object",
|
|
@@ -28720,10 +28741,10 @@ const Mr = {
|
|
|
28720
28741
|
}
|
|
28721
28742
|
};
|
|
28722
28743
|
BigInt(1e9);
|
|
28723
|
-
const
|
|
28744
|
+
const cO = "0x1", g6 = "0x2", uO = on("0x6"), fO = `${g6}::sui::SUI`;
|
|
28724
28745
|
on("0x5");
|
|
28725
28746
|
on("0x8");
|
|
28726
|
-
const
|
|
28747
|
+
const lO = /* @__PURE__ */ Uint8Array.from([
|
|
28727
28748
|
0,
|
|
28728
28749
|
1,
|
|
28729
28750
|
2,
|
|
@@ -29009,7 +29030,7 @@ function is(t, e, r, n, s, i) {
|
|
|
29009
29030
|
let c = te[2 * t], u = te[2 * t + 1], f = te[2 * e], l = te[2 * e + 1], p = te[2 * r], d = te[2 * r + 1], m = te[2 * n], b = te[2 * n + 1], E = Ug(c, f, a);
|
|
29010
29031
|
u = Mg(E, u, l, o), c = E | 0, { Dh: b, Dl: m } = { Dh: b ^ u, Dl: m ^ c }, { Dh: b, Dl: m } = { Dh: Cg(b, m, 16), Dl: Rg(b, m, 16) }, { h: d, l: p } = Ng(d, p, b, m), { Bh: l, Bl: f } = { Bh: l ^ d, Bl: f ^ p }, { Bh: l, Bl: f } = { Bh: e8(l, f, 63), Bl: t8(l, f, 63) }, te[2 * t] = c, te[2 * t + 1] = u, te[2 * e] = f, te[2 * e + 1] = l, te[2 * r] = p, te[2 * r + 1] = d, te[2 * n] = m, te[2 * n + 1] = b;
|
|
29011
29032
|
}
|
|
29012
|
-
function
|
|
29033
|
+
function dO(t, e = {}, r, n, s) {
|
|
29013
29034
|
if (Es(r), t < 0 || t > r)
|
|
29014
29035
|
throw new Error("outputLen bigger than keyLen");
|
|
29015
29036
|
const { key: i, salt: a, personalization: o } = e;
|
|
@@ -29020,7 +29041,7 @@ function lO(t, e = {}, r, n, s) {
|
|
|
29020
29041
|
if (o !== void 0 && o.length !== s)
|
|
29021
29042
|
throw new Error("personalization must be undefined or " + s);
|
|
29022
29043
|
}
|
|
29023
|
-
class
|
|
29044
|
+
class hO extends Au {
|
|
29024
29045
|
constructor(e, r) {
|
|
29025
29046
|
super(), this.finished = !1, this.destroyed = !1, this.length = 0, this.pos = 0, Es(e), Es(r), this.blockLen = e, this.outputLen = r, this.buffer = new Uint8Array(e), this.buffer32 = Ja(this.buffer);
|
|
29026
29047
|
}
|
|
@@ -29063,10 +29084,10 @@ class dO extends Au {
|
|
|
29063
29084
|
return this._cloneInto();
|
|
29064
29085
|
}
|
|
29065
29086
|
}
|
|
29066
|
-
class
|
|
29087
|
+
class pO extends hO {
|
|
29067
29088
|
constructor(e = {}) {
|
|
29068
29089
|
const r = e.dkLen === void 0 ? 64 : e.dkLen;
|
|
29069
|
-
super(128, r), this.v0l = it[0] | 0, this.v0h = it[1] | 0, this.v1l = it[2] | 0, this.v1h = it[3] | 0, this.v2l = it[4] | 0, this.v2h = it[5] | 0, this.v3l = it[6] | 0, this.v3h = it[7] | 0, this.v4l = it[8] | 0, this.v4h = it[9] | 0, this.v5l = it[10] | 0, this.v5h = it[11] | 0, this.v6l = it[12] | 0, this.v6h = it[13] | 0, this.v7l = it[14] | 0, this.v7h = it[15] | 0,
|
|
29090
|
+
super(128, r), this.v0l = it[0] | 0, this.v0h = it[1] | 0, this.v1l = it[2] | 0, this.v1h = it[3] | 0, this.v2l = it[4] | 0, this.v2h = it[5] | 0, this.v3l = it[6] | 0, this.v3h = it[7] | 0, this.v4l = it[8] | 0, this.v4h = it[9] | 0, this.v5l = it[10] | 0, this.v5h = it[11] | 0, this.v6l = it[12] | 0, this.v6h = it[13] | 0, this.v7l = it[14] | 0, this.v7h = it[15] | 0, dO(r, e, 64, 16, 16);
|
|
29070
29091
|
let { key: n, personalization: s, salt: i } = e, a = 0;
|
|
29071
29092
|
if (n !== void 0 && (n = Un(n), a = n.length), this.v0l ^= this.outputLen | a << 8 | 65536 | 1 << 24, i !== void 0) {
|
|
29072
29093
|
i = Un(i);
|
|
@@ -29097,7 +29118,7 @@ class hO extends dO {
|
|
|
29097
29118
|
let { h: s, l: i } = Bg(BigInt(this.length));
|
|
29098
29119
|
te[24] = it[8] ^ i, te[25] = it[9] ^ s, n && (te[28] = ~te[28], te[29] = ~te[29]);
|
|
29099
29120
|
let a = 0;
|
|
29100
|
-
const o =
|
|
29121
|
+
const o = lO;
|
|
29101
29122
|
for (let c = 0; c < 12; c++)
|
|
29102
29123
|
ss(0, 4, 8, 12, e, r + 2 * o[a++]), is(0, 4, 8, 12, e, r + 2 * o[a++]), ss(1, 5, 9, 13, e, r + 2 * o[a++]), is(1, 5, 9, 13, e, r + 2 * o[a++]), ss(2, 6, 10, 14, e, r + 2 * o[a++]), is(2, 6, 10, 14, e, r + 2 * o[a++]), ss(3, 7, 11, 15, e, r + 2 * o[a++]), is(3, 7, 11, 15, e, r + 2 * o[a++]), ss(0, 5, 10, 15, e, r + 2 * o[a++]), is(0, 5, 10, 15, e, r + 2 * o[a++]), ss(1, 6, 11, 12, e, r + 2 * o[a++]), is(1, 6, 11, 12, e, r + 2 * o[a++]), ss(2, 7, 8, 13, e, r + 2 * o[a++]), is(2, 7, 8, 13, e, r + 2 * o[a++]), ss(3, 4, 9, 14, e, r + 2 * o[a++]), is(3, 4, 9, 14, e, r + 2 * o[a++]);
|
|
29103
29124
|
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], Ln(te);
|
|
@@ -29106,15 +29127,15 @@ class hO extends dO {
|
|
|
29106
29127
|
this.destroyed = !0, Ln(this.buffer32), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
29107
29128
|
}
|
|
29108
29129
|
}
|
|
29109
|
-
const
|
|
29110
|
-
function
|
|
29130
|
+
const yO = /* @__PURE__ */ h8((t) => new pO(t)), w6 = yO;
|
|
29131
|
+
function mO(t, e, r) {
|
|
29111
29132
|
const n = ye.Address.serialize(t).toBytes(), s = ye.TypeTag.serialize(e).toBytes(), i = ye.u64().serialize(r.length).toBytes(), a = w6.create({
|
|
29112
29133
|
dkLen: 32
|
|
29113
29134
|
});
|
|
29114
29135
|
return a.update(new Uint8Array([240])), a.update(n), a.update(i), a.update(r), a.update(s), `0x${aa(a.digest().slice(0, 32))}`;
|
|
29115
29136
|
}
|
|
29116
|
-
const
|
|
29117
|
-
function
|
|
29137
|
+
const bO = "object", gO = "ID", wO = "ascii", vO = "String", EO = "string", AO = "String", SO = "option", xO = "Option";
|
|
29138
|
+
function kO(t) {
|
|
29118
29139
|
const e = typeof t.body == "object" && "datatype" in t.body ? t.body.datatype : null;
|
|
29119
29140
|
return !!e && ve(e.package) === ve("0x2") && e.module === "tx_context" && e.type === "TxContext";
|
|
29120
29141
|
}
|
|
@@ -29151,20 +29172,20 @@ function ih(t) {
|
|
|
29151
29172
|
}
|
|
29152
29173
|
if ("datatype" in t) {
|
|
29153
29174
|
const e = ve(t.datatype.package);
|
|
29154
|
-
if (e === ve(
|
|
29155
|
-
if (t.datatype.module ===
|
|
29175
|
+
if (e === ve(cO)) {
|
|
29176
|
+
if (t.datatype.module === wO && t.datatype.type === vO || t.datatype.module === EO && t.datatype.type === AO)
|
|
29156
29177
|
return ye.String;
|
|
29157
|
-
if (t.datatype.module ===
|
|
29178
|
+
if (t.datatype.module === SO && t.datatype.type === xO) {
|
|
29158
29179
|
const r = ih(t.datatype.typeParameters[0]);
|
|
29159
29180
|
return r ? ye.vector(r) : null;
|
|
29160
29181
|
}
|
|
29161
29182
|
}
|
|
29162
|
-
if (e === ve(g6) && t.datatype.module ===
|
|
29183
|
+
if (e === ve(g6) && t.datatype.module === bO && t.datatype.type === gO)
|
|
29163
29184
|
return ye.Address;
|
|
29164
29185
|
}
|
|
29165
29186
|
return null;
|
|
29166
29187
|
}
|
|
29167
|
-
function
|
|
29188
|
+
function _O(t) {
|
|
29168
29189
|
return typeof t == "object" && "Reference" in t ? {
|
|
29169
29190
|
ref: "&",
|
|
29170
29191
|
body: qa(t.Reference)
|
|
@@ -29213,23 +29234,23 @@ function qa(t) {
|
|
|
29213
29234
|
return { typeParameter: t.TypeParameter };
|
|
29214
29235
|
throw new Error(`Unexpected type ${JSON.stringify(t)}`);
|
|
29215
29236
|
}
|
|
29216
|
-
const
|
|
29237
|
+
const TO = 50, IO = 1000n, PO = 5e10;
|
|
29217
29238
|
function v6(t) {
|
|
29218
29239
|
return async function(r, n, s) {
|
|
29219
|
-
return await
|
|
29240
|
+
return await NO(r, t), await RO(r, t), n.onlyTransactionKind || (await OO(r, t), await BO(r, t), await CO(r, t)), await s();
|
|
29220
29241
|
};
|
|
29221
29242
|
}
|
|
29222
|
-
async function
|
|
29243
|
+
async function OO(t, e) {
|
|
29223
29244
|
t.gasConfig.price || (t.gasConfig.price = String(await e.getReferenceGasPrice()));
|
|
29224
29245
|
}
|
|
29225
|
-
async function
|
|
29246
|
+
async function BO(t, e) {
|
|
29226
29247
|
if (t.gasConfig.budget)
|
|
29227
29248
|
return;
|
|
29228
29249
|
const r = await e.dryRunTransactionBlock({
|
|
29229
29250
|
transactionBlock: t.build({
|
|
29230
29251
|
overrides: {
|
|
29231
29252
|
gasData: {
|
|
29232
|
-
budget: String(
|
|
29253
|
+
budget: String(PO),
|
|
29233
29254
|
payment: []
|
|
29234
29255
|
}
|
|
29235
29256
|
}
|
|
@@ -29240,16 +29261,16 @@ async function OO(t, e) {
|
|
|
29240
29261
|
`Dry run failed, could not automatically determine a budget: ${r.effects.status.error}`,
|
|
29241
29262
|
{ cause: r }
|
|
29242
29263
|
);
|
|
29243
|
-
const n =
|
|
29264
|
+
const n = IO * BigInt(t.gasConfig.price || 1n), s = BigInt(r.effects.gasUsed.computationCost) + n, i = s + BigInt(r.effects.gasUsed.storageCost) - BigInt(r.effects.gasUsed.storageRebate);
|
|
29244
29265
|
t.gasConfig.budget = String(
|
|
29245
29266
|
i > s ? i : s
|
|
29246
29267
|
);
|
|
29247
29268
|
}
|
|
29248
|
-
async function
|
|
29269
|
+
async function CO(t, e) {
|
|
29249
29270
|
if (!t.gasConfig.payment) {
|
|
29250
29271
|
const n = (await e.getCoins({
|
|
29251
29272
|
owner: t.gasConfig.owner || t.sender,
|
|
29252
|
-
coinType:
|
|
29273
|
+
coinType: fO
|
|
29253
29274
|
})).data.filter((s) => !t.inputs.find((a) => {
|
|
29254
29275
|
var o;
|
|
29255
29276
|
return (o = a.Object) != null && o.ImmOrOwnedObject ? s.coinObjectId === a.Object.ImmOrOwnedObject.objectId : !1;
|
|
@@ -29265,7 +29286,7 @@ async function BO(t, e) {
|
|
|
29265
29286
|
);
|
|
29266
29287
|
}
|
|
29267
29288
|
}
|
|
29268
|
-
async function
|
|
29289
|
+
async function RO(t, e) {
|
|
29269
29290
|
const r = t.inputs.filter((f) => {
|
|
29270
29291
|
var l;
|
|
29271
29292
|
return f.UnresolvedObject && !(f.UnresolvedObject.version || (l = f.UnresolvedObject) != null && l.initialSharedVersion);
|
|
@@ -29273,7 +29294,7 @@ async function CO(t, e) {
|
|
|
29273
29294
|
...new Set(
|
|
29274
29295
|
r.map((f) => on(f.UnresolvedObject.objectId))
|
|
29275
29296
|
)
|
|
29276
|
-
], s = n.length ? Zu(n,
|
|
29297
|
+
], s = n.length ? Zu(n, TO) : [], i = (await Promise.all(
|
|
29277
29298
|
s.map(
|
|
29278
29299
|
(f) => e.multiGetObjects({
|
|
29279
29300
|
ids: f,
|
|
@@ -29306,8 +29327,8 @@ async function CO(t, e) {
|
|
|
29306
29327
|
l.UnresolvedObject.initialSharedVersion ?? (m == null ? void 0 : m.initialSharedVersion) ? p = Mr.SharedObjectRef({
|
|
29307
29328
|
objectId: d,
|
|
29308
29329
|
initialSharedVersion: l.UnresolvedObject.initialSharedVersion || (m == null ? void 0 : m.initialSharedVersion),
|
|
29309
|
-
mutable: l.UnresolvedObject.mutable ||
|
|
29310
|
-
}) :
|
|
29330
|
+
mutable: l.UnresolvedObject.mutable || UO(t, f)
|
|
29331
|
+
}) : MO(t, f) && (p = Mr.ReceivingRef(
|
|
29311
29332
|
{
|
|
29312
29333
|
objectId: d,
|
|
29313
29334
|
digest: l.UnresolvedObject.digest ?? (m == null ? void 0 : m.digest),
|
|
@@ -29320,7 +29341,7 @@ async function CO(t, e) {
|
|
|
29320
29341
|
});
|
|
29321
29342
|
}
|
|
29322
29343
|
}
|
|
29323
|
-
async function
|
|
29344
|
+
async function NO(t, e) {
|
|
29324
29345
|
const { inputs: r, commands: n } = t, s = [], i = /* @__PURE__ */ new Set();
|
|
29325
29346
|
n.forEach((o) => {
|
|
29326
29347
|
if (o.MoveCall) {
|
|
@@ -29344,7 +29365,7 @@ async function RO(t, e) {
|
|
|
29344
29365
|
});
|
|
29345
29366
|
a.set(
|
|
29346
29367
|
o,
|
|
29347
|
-
l.parameters.map((p) =>
|
|
29368
|
+
l.parameters.map((p) => _O(p))
|
|
29348
29369
|
);
|
|
29349
29370
|
})
|
|
29350
29371
|
), s.length && await Promise.all(
|
|
@@ -29354,7 +29375,7 @@ async function RO(t, e) {
|
|
|
29354
29375
|
);
|
|
29355
29376
|
if (!c)
|
|
29356
29377
|
return;
|
|
29357
|
-
const f = c.length > 0 &&
|
|
29378
|
+
const f = c.length > 0 && kO(c.at(-1)) ? c.slice(0, c.length - 1) : c;
|
|
29358
29379
|
o._argumentTypes = f;
|
|
29359
29380
|
})
|
|
29360
29381
|
), n.forEach((o) => {
|
|
@@ -29396,7 +29417,7 @@ async function RO(t, e) {
|
|
|
29396
29417
|
}
|
|
29397
29418
|
});
|
|
29398
29419
|
}
|
|
29399
|
-
function
|
|
29420
|
+
function UO(t, e) {
|
|
29400
29421
|
let r = !1;
|
|
29401
29422
|
return t.getInputUses(e, (n, s) => {
|
|
29402
29423
|
if (s.MoveCall && s.MoveCall._argumentTypes) {
|
|
@@ -29406,26 +29427,26 @@ function NO(t, e) {
|
|
|
29406
29427
|
(s.$kind === "MakeMoveVec" || s.$kind === "MergeCoins" || s.$kind === "SplitCoins" || s.$kind === "TransferObjects") && (r = !0);
|
|
29407
29428
|
}), r;
|
|
29408
29429
|
}
|
|
29409
|
-
function
|
|
29430
|
+
function MO(t, e) {
|
|
29410
29431
|
let r = !1;
|
|
29411
29432
|
return t.getInputUses(e, (n, s) => {
|
|
29412
29433
|
if (s.MoveCall && s.MoveCall._argumentTypes) {
|
|
29413
29434
|
const i = s.MoveCall.arguments.indexOf(n);
|
|
29414
|
-
r =
|
|
29435
|
+
r = FO(s.MoveCall._argumentTypes[i]) || r;
|
|
29415
29436
|
}
|
|
29416
29437
|
}), r;
|
|
29417
29438
|
}
|
|
29418
|
-
function
|
|
29439
|
+
function FO(t) {
|
|
29419
29440
|
return typeof t.body != "object" || !("datatype" in t.body) ? !1 : t.body.datatype.package === "0x2" && t.body.datatype.module === "transfer" && t.body.datatype.type === "Receiving";
|
|
29420
29441
|
}
|
|
29421
29442
|
function E6(t, e) {
|
|
29422
29443
|
return !!(t.inputs.some((r) => r.UnresolvedObject || r.UnresolvedPure) || !e.onlyTransactionKind && (!t.gasConfig.price || !t.gasConfig.budget || !t.gasConfig.payment));
|
|
29423
29444
|
}
|
|
29424
|
-
async function
|
|
29445
|
+
async function $O(t, e, r) {
|
|
29425
29446
|
var i;
|
|
29426
|
-
if (
|
|
29447
|
+
if (HO(t), !E6(t, e))
|
|
29427
29448
|
return await zm(t), r();
|
|
29428
|
-
const n =
|
|
29449
|
+
const n = jO(e);
|
|
29429
29450
|
return (((i = n.core) == null ? void 0 : i.resolveTransactionPlugin()) ?? v6(n))(t, e, async () => {
|
|
29430
29451
|
await zm(t), await r();
|
|
29431
29452
|
});
|
|
@@ -29440,14 +29461,14 @@ function zm(t) {
|
|
|
29440
29461
|
);
|
|
29441
29462
|
});
|
|
29442
29463
|
}
|
|
29443
|
-
function
|
|
29464
|
+
function jO(t) {
|
|
29444
29465
|
if (!t.client)
|
|
29445
29466
|
throw new Error(
|
|
29446
29467
|
"No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
|
|
29447
29468
|
);
|
|
29448
29469
|
return t.client;
|
|
29449
29470
|
}
|
|
29450
|
-
function
|
|
29471
|
+
function HO(t) {
|
|
29451
29472
|
for (const e of t.commands)
|
|
29452
29473
|
switch (e.$kind) {
|
|
29453
29474
|
case "SplitCoins":
|
|
@@ -29466,7 +29487,7 @@ function Vm(t, e, r) {
|
|
|
29466
29487
|
const n = r.inputs[t.Input];
|
|
29467
29488
|
n.$kind === "UnresolvedPure" && (r.inputs[t.Input] = Mr.Pure(e.serialize(n.UnresolvedPure.value)));
|
|
29468
29489
|
}
|
|
29469
|
-
function
|
|
29490
|
+
function LO(t) {
|
|
29470
29491
|
function e(r) {
|
|
29471
29492
|
return t(r);
|
|
29472
29493
|
}
|
|
@@ -29509,7 +29530,7 @@ function HO(t) {
|
|
|
29509
29530
|
arguments: n === null ? [] : [s.object(n)]
|
|
29510
29531
|
}), e;
|
|
29511
29532
|
}
|
|
29512
|
-
function
|
|
29533
|
+
function DO(t) {
|
|
29513
29534
|
function e(r, n) {
|
|
29514
29535
|
if (typeof r == "string")
|
|
29515
29536
|
return t(Ga(r).serialize(n));
|
|
@@ -29521,7 +29542,7 @@ function LO(t) {
|
|
|
29521
29542
|
ye.vector(Ga(r)).serialize(n)
|
|
29522
29543
|
), e.option = (r, n) => t(ye.option(Ga(r)).serialize(n)), e;
|
|
29523
29544
|
}
|
|
29524
|
-
function
|
|
29545
|
+
function zO(t, e) {
|
|
29525
29546
|
const r = Array.from(`${t}::`).map((s) => s.charCodeAt(0)), n = new Uint8Array(r.length + e.length);
|
|
29526
29547
|
return n.set(r), n.set(e, r.length), w6(n, { dkLen: 32 });
|
|
29527
29548
|
}
|
|
@@ -29533,7 +29554,7 @@ function iu(t) {
|
|
|
29533
29554
|
if (t.UnresolvedObject)
|
|
29534
29555
|
return ve(t.UnresolvedObject.objectId);
|
|
29535
29556
|
}
|
|
29536
|
-
function
|
|
29557
|
+
function VO(t, e, r) {
|
|
29537
29558
|
const n = (s) => {
|
|
29538
29559
|
switch (s.$kind) {
|
|
29539
29560
|
case "Input": {
|
|
@@ -29626,7 +29647,7 @@ class Wt {
|
|
|
29626
29647
|
});
|
|
29627
29648
|
}
|
|
29628
29649
|
static restore(e) {
|
|
29629
|
-
return e.version === 2 ? new Wt(qe(Uc, e)) : new Wt(qe(Uc,
|
|
29650
|
+
return e.version === 2 ? new Wt(qe(Uc, e)) : new Wt(qe(Uc, Z4(e)));
|
|
29630
29651
|
}
|
|
29631
29652
|
/**
|
|
29632
29653
|
* Generate transaction digest.
|
|
@@ -29635,7 +29656,7 @@ class Wt {
|
|
|
29635
29656
|
* @returns transaction digest.
|
|
29636
29657
|
*/
|
|
29637
29658
|
static getDigestFromBytes(e) {
|
|
29638
|
-
const r =
|
|
29659
|
+
const r = zO("TransactionData", e);
|
|
29639
29660
|
return Ju(r);
|
|
29640
29661
|
}
|
|
29641
29662
|
// @deprecated use gasData instead
|
|
@@ -29807,7 +29828,7 @@ class Wt {
|
|
|
29807
29828
|
const i = [];
|
|
29808
29829
|
for (let u = 0; u < r.commands.length; u++) {
|
|
29809
29830
|
const f = structuredClone(r.commands[u]);
|
|
29810
|
-
|
|
29831
|
+
VO(f, n, s), i.push(f);
|
|
29811
29832
|
}
|
|
29812
29833
|
this.commands.splice(e, 0, ...i);
|
|
29813
29834
|
const a = i.length;
|
|
@@ -29894,15 +29915,15 @@ class Wt {
|
|
|
29894
29915
|
var A6 = (t) => {
|
|
29895
29916
|
throw TypeError(t);
|
|
29896
29917
|
}, L0 = (t, e, r) => e.has(t) || A6("Cannot " + r), ct = (t, e, r) => (L0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), _a = (t, e, r) => e.has(t) ? A6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Sc = (t, e, r, n) => (L0(t, e, "write to private field"), e.set(t, r), r), rf = (t, e, r) => (L0(t, e, "access private method"), r), _o, Vn, To, fs, an, ah, oh, S6, x6, D0;
|
|
29897
|
-
const
|
|
29918
|
+
const GO = "/", qO = {
|
|
29898
29919
|
"Mvr-Source": `@mysten/sui@${y2}`
|
|
29899
29920
|
};
|
|
29900
|
-
class
|
|
29921
|
+
class WO {
|
|
29901
29922
|
constructor({ cache: e, url: r, pageSize: n = 50, overrides: s }) {
|
|
29902
29923
|
_a(this, an), _a(this, _o), _a(this, Vn), _a(this, To), _a(this, fs), Sc(this, _o, e), Sc(this, Vn, r), Sc(this, To, n), Sc(this, fs, {
|
|
29903
29924
|
packages: s == null ? void 0 : s.packages,
|
|
29904
29925
|
types: s == null ? void 0 : s.types
|
|
29905
|
-
}),
|
|
29926
|
+
}), KO(ct(this, fs));
|
|
29906
29927
|
}
|
|
29907
29928
|
async resolvePackage({
|
|
29908
29929
|
package: e
|
|
@@ -30055,7 +30076,7 @@ D0 = async function(t, e) {
|
|
|
30055
30076
|
method: "POST",
|
|
30056
30077
|
headers: {
|
|
30057
30078
|
"Content-Type": "application/json",
|
|
30058
|
-
...
|
|
30079
|
+
...qO
|
|
30059
30080
|
},
|
|
30060
30081
|
body: JSON.stringify(e)
|
|
30061
30082
|
});
|
|
@@ -30065,7 +30086,7 @@ D0 = async function(t, e) {
|
|
|
30065
30086
|
}
|
|
30066
30087
|
return r.json();
|
|
30067
30088
|
};
|
|
30068
|
-
function
|
|
30089
|
+
function KO(t) {
|
|
30069
30090
|
if (t != null && t.packages)
|
|
30070
30091
|
for (const [e, r] of Object.entries(t.packages)) {
|
|
30071
30092
|
if (!rr(e))
|
|
@@ -30101,12 +30122,12 @@ function uh(t, e) {
|
|
|
30101
30122
|
});
|
|
30102
30123
|
}
|
|
30103
30124
|
function kt(t) {
|
|
30104
|
-
return t.includes(
|
|
30125
|
+
return t.includes(GO) || t.includes("@") || t.includes(".sui");
|
|
30105
30126
|
}
|
|
30106
30127
|
function k6(t) {
|
|
30107
30128
|
return typeof t == "object" && "address" in t && "module" in t && "name" in t && "typeParams" in t;
|
|
30108
30129
|
}
|
|
30109
|
-
function
|
|
30130
|
+
function XO(t) {
|
|
30110
30131
|
const e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
30111
30132
|
for (const n of t.commands)
|
|
30112
30133
|
switch (n.$kind) {
|
|
@@ -30131,7 +30152,7 @@ function KO(t) {
|
|
|
30131
30152
|
types: [...r]
|
|
30132
30153
|
};
|
|
30133
30154
|
}
|
|
30134
|
-
function
|
|
30155
|
+
function YO(t, e) {
|
|
30135
30156
|
var r;
|
|
30136
30157
|
for (const n of t.commands) {
|
|
30137
30158
|
if ((r = n.MakeMoveVec) != null && r.type) {
|
|
@@ -30161,22 +30182,22 @@ function qm(t) {
|
|
|
30161
30182
|
const e = /* @__PURE__ */ new Set();
|
|
30162
30183
|
for (const r of t)
|
|
30163
30184
|
if (kt(r)) {
|
|
30164
|
-
if (!
|
|
30185
|
+
if (!w4(r)) throw new Error(`Invalid type with names: ${r}`);
|
|
30165
30186
|
e.add(r);
|
|
30166
30187
|
}
|
|
30167
30188
|
return e;
|
|
30168
30189
|
}
|
|
30169
|
-
const
|
|
30170
|
-
const s =
|
|
30190
|
+
const JO = (t) => async (e, r, n) => {
|
|
30191
|
+
const s = XO(e);
|
|
30171
30192
|
if (s.types.length === 0 && s.packages.length === 0)
|
|
30172
30193
|
return n();
|
|
30173
|
-
const i = await
|
|
30194
|
+
const i = await ZO(r).core.mvr.resolve({
|
|
30174
30195
|
types: s.types,
|
|
30175
30196
|
packages: s.packages
|
|
30176
30197
|
});
|
|
30177
|
-
|
|
30198
|
+
YO(e, i), await n();
|
|
30178
30199
|
};
|
|
30179
|
-
function
|
|
30200
|
+
function ZO(t) {
|
|
30180
30201
|
if (!t.client)
|
|
30181
30202
|
throw new Error(
|
|
30182
30203
|
"No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
|
|
@@ -30241,7 +30262,7 @@ function Ta() {
|
|
|
30241
30262
|
}
|
|
30242
30263
|
const C6 = class lh {
|
|
30243
30264
|
constructor() {
|
|
30244
|
-
Jr(this, Qe), Jr(this, Vs), Jr(this, Zs), Jr(this, On, /* @__PURE__ */ new Map()), Jr(this, fn, []), Jr(this, sr, []), Jr(this, ir, /* @__PURE__ */ new Set()), Jr(this, Cr, /* @__PURE__ */ new Set()), Jr(this, ls, /* @__PURE__ */ new Map()), Jr(this, oe), this.object =
|
|
30265
|
+
Jr(this, Qe), Jr(this, Vs), Jr(this, Zs), Jr(this, On, /* @__PURE__ */ new Map()), Jr(this, fn, []), Jr(this, sr, []), Jr(this, ir, /* @__PURE__ */ new Set()), Jr(this, Cr, /* @__PURE__ */ new Set()), Jr(this, ls, /* @__PURE__ */ new Map()), Jr(this, oe), this.object = LO(
|
|
30245
30266
|
(r) => {
|
|
30246
30267
|
var i, a;
|
|
30247
30268
|
if (typeof r == "function")
|
|
@@ -30356,7 +30377,7 @@ const C6 = class lh {
|
|
|
30356
30377
|
get pure() {
|
|
30357
30378
|
return Object.defineProperty(this, "pure", {
|
|
30358
30379
|
enumerable: !1,
|
|
30359
|
-
value:
|
|
30380
|
+
value: DO((e) => U0(e) ? at(this, Qe, Fc).call(this, "pure", {
|
|
30360
30381
|
$kind: "Pure",
|
|
30361
30382
|
Pure: {
|
|
30362
30383
|
bytes: e.toBase64()
|
|
@@ -30501,7 +30522,7 @@ const C6 = class lh {
|
|
|
30501
30522
|
const r = this.isFullyResolved();
|
|
30502
30523
|
return JSON.stringify(
|
|
30503
30524
|
qe(
|
|
30504
|
-
|
|
30525
|
+
aO,
|
|
30505
30526
|
r ? {
|
|
30506
30527
|
...J(this, oe).snapshot(),
|
|
30507
30528
|
digest: J(this, oe).getDigest()
|
|
@@ -30553,7 +30574,7 @@ const C6 = class lh {
|
|
|
30553
30574
|
throw new Error(`Missing intent resolver for ${i}`);
|
|
30554
30575
|
n.push(J(this, On).get(i));
|
|
30555
30576
|
}
|
|
30556
|
-
n.push(
|
|
30577
|
+
n.push(JO()), await at(this, Qe, V0).call(this, n, e);
|
|
30557
30578
|
}
|
|
30558
30579
|
};
|
|
30559
30580
|
Vs = /* @__PURE__ */ new WeakMap();
|
|
@@ -30604,7 +30625,7 @@ au = function(t) {
|
|
|
30604
30625
|
fh = async function(t) {
|
|
30605
30626
|
if (!t.onlyTransactionKind && !J(this, oe).sender)
|
|
30606
30627
|
throw new Error("Missing transaction sender");
|
|
30607
|
-
await at(this, Qe, V0).call(this, [...J(this, Zs),
|
|
30628
|
+
await at(this, Qe, V0).call(this, [...J(this, Zs), $O], t);
|
|
30608
30629
|
};
|
|
30609
30630
|
V0 = async function(t, e) {
|
|
30610
30631
|
try {
|
|
@@ -30688,16 +30709,16 @@ P6 = function() {
|
|
|
30688
30709
|
}
|
|
30689
30710
|
};
|
|
30690
30711
|
let dh = C6;
|
|
30691
|
-
const
|
|
30712
|
+
const QO = {
|
|
30692
30713
|
mainnet: "https://mainnet.mvr.mystenlabs.com",
|
|
30693
30714
|
testnet: "https://testnet.mvr.mystenlabs.com"
|
|
30694
30715
|
};
|
|
30695
|
-
class
|
|
30716
|
+
class eB extends j2 {
|
|
30696
30717
|
constructor(e) {
|
|
30697
30718
|
var r, n, s;
|
|
30698
|
-
super(e), this.core = this, this.mvr = new
|
|
30719
|
+
super(e), this.core = this, this.mvr = new WO({
|
|
30699
30720
|
cache: this.cache.scope("core.mvr"),
|
|
30700
|
-
url: ((r = e.mvr) == null ? void 0 : r.url) ??
|
|
30721
|
+
url: ((r = e.mvr) == null ? void 0 : r.url) ?? QO[this.network],
|
|
30701
30722
|
pageSize: (n = e.mvr) == null ? void 0 : n.pageSize,
|
|
30702
30723
|
overrides: (s = e.mvr) == null ? void 0 : s.overrides
|
|
30703
30724
|
});
|
|
@@ -30715,7 +30736,7 @@ class QO extends j2 {
|
|
|
30715
30736
|
(await this.core.mvr.resolveType({
|
|
30716
30737
|
type: e.name.type
|
|
30717
30738
|
})).type
|
|
30718
|
-
), n =
|
|
30739
|
+
), n = mO(e.parentId, r, e.name.bcs), {
|
|
30719
30740
|
objects: [s]
|
|
30720
30741
|
} = await this.getObjects({
|
|
30721
30742
|
objectIds: [n],
|
|
@@ -30764,9 +30785,9 @@ class QO extends j2 {
|
|
|
30764
30785
|
}
|
|
30765
30786
|
}
|
|
30766
30787
|
}
|
|
30767
|
-
class
|
|
30788
|
+
class tB extends Error {
|
|
30768
30789
|
}
|
|
30769
|
-
class ds extends
|
|
30790
|
+
class ds extends tB {
|
|
30770
30791
|
constructor(e, r) {
|
|
30771
30792
|
super(r), this.code = e;
|
|
30772
30793
|
}
|
|
@@ -30792,29 +30813,29 @@ class ds extends eB {
|
|
|
30792
30813
|
}
|
|
30793
30814
|
}
|
|
30794
30815
|
}
|
|
30795
|
-
function
|
|
30816
|
+
function rB(t) {
|
|
30796
30817
|
return {
|
|
30797
30818
|
...Wt.fromBytes(t).snapshot(),
|
|
30798
30819
|
bcs: t
|
|
30799
30820
|
};
|
|
30800
30821
|
}
|
|
30801
|
-
function
|
|
30822
|
+
function nB(t) {
|
|
30802
30823
|
const e = ye.TransactionEffects.parse(t);
|
|
30803
30824
|
switch (e.$kind) {
|
|
30804
30825
|
case "V1":
|
|
30805
|
-
return
|
|
30826
|
+
return sB({ effects: e.V1 });
|
|
30806
30827
|
case "V2":
|
|
30807
|
-
return
|
|
30828
|
+
return iB({ bytes: t, effects: e.V2 });
|
|
30808
30829
|
default:
|
|
30809
30830
|
throw new Error(
|
|
30810
30831
|
`Unknown transaction effects version: ${e.$kind}`
|
|
30811
30832
|
);
|
|
30812
30833
|
}
|
|
30813
30834
|
}
|
|
30814
|
-
function
|
|
30835
|
+
function sB(t) {
|
|
30815
30836
|
throw new Error("V1 effects are not supported yet");
|
|
30816
30837
|
}
|
|
30817
|
-
function
|
|
30838
|
+
function iB({
|
|
30818
30839
|
bytes: t,
|
|
30819
30840
|
effects: e
|
|
30820
30841
|
}) {
|
|
@@ -30867,13 +30888,13 @@ function sB({
|
|
|
30867
30888
|
}
|
|
30868
30889
|
var R6 = (t) => {
|
|
30869
30890
|
throw TypeError(t);
|
|
30870
|
-
}, N6 = (t, e, r) => e.has(t) || R6("Cannot " + r), Gt = (t, e, r) => (N6(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
30871
|
-
class
|
|
30891
|
+
}, N6 = (t, e, r) => e.has(t) || R6("Cannot " + r), Gt = (t, e, r) => (N6(t, e, "read from private field"), r ? r.call(t) : e.get(t)), aB = (t, e, r) => e.has(t) ? R6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), oB = (t, e, r, n) => (N6(t, e, "write to private field"), e.set(t, r), r), pt;
|
|
30892
|
+
class cB extends eB {
|
|
30872
30893
|
constructor({
|
|
30873
30894
|
jsonRpcClient: e,
|
|
30874
30895
|
mvr: r
|
|
30875
30896
|
}) {
|
|
30876
|
-
super({ network: e.network, base: e, mvr: r }),
|
|
30897
|
+
super({ network: e.network, base: e, mvr: r }), aB(this, pt), oB(this, pt, e);
|
|
30877
30898
|
}
|
|
30878
30899
|
async getObjects(e) {
|
|
30879
30900
|
const r = Zu(e.objectIds, 50), n = [];
|
|
@@ -30935,7 +30956,7 @@ class oB extends QO {
|
|
|
30935
30956
|
balance: n.balance,
|
|
30936
30957
|
type: `0x2::coin::Coin<${n.coinType}>`,
|
|
30937
30958
|
content: Promise.resolve(
|
|
30938
|
-
|
|
30959
|
+
lB.serialize({
|
|
30939
30960
|
id: n.coinObjectId,
|
|
30940
30961
|
balance: {
|
|
30941
30962
|
value: n.balance
|
|
@@ -31017,7 +31038,7 @@ class oB extends QO {
|
|
|
31017
31038
|
const r = dh.from(e.transaction), n = await Gt(this, pt).dryRunTransactionBlock({
|
|
31018
31039
|
transactionBlock: e.transaction,
|
|
31019
31040
|
signal: e.signal
|
|
31020
|
-
}), { effects: s, objectTypes: i } =
|
|
31041
|
+
}), { effects: s, objectTypes: i } = uB({
|
|
31021
31042
|
effects: n.effects,
|
|
31022
31043
|
objectChanges: n.objectChanges
|
|
31023
31044
|
});
|
|
@@ -31028,7 +31049,7 @@ class oB extends QO {
|
|
|
31028
31049
|
effects: s,
|
|
31029
31050
|
objectTypes: Promise.resolve(i),
|
|
31030
31051
|
signatures: [],
|
|
31031
|
-
transaction:
|
|
31052
|
+
transaction: rB(e.transaction),
|
|
31032
31053
|
balanceChanges: n.balanceChanges.map((a) => ({
|
|
31033
31054
|
coinType: a.coinType,
|
|
31034
31055
|
address: U6(a.owner),
|
|
@@ -31097,11 +31118,11 @@ class oB extends QO {
|
|
|
31097
31118
|
packageId: ve(e.packageId),
|
|
31098
31119
|
moduleName: e.moduleName,
|
|
31099
31120
|
name: e.name,
|
|
31100
|
-
visibility:
|
|
31121
|
+
visibility: hB(r.visibility),
|
|
31101
31122
|
isEntry: r.isEntry,
|
|
31102
31123
|
typeParameters: r.typeParameters.map((n) => ({
|
|
31103
31124
|
isPhantom: !1,
|
|
31104
|
-
constraints:
|
|
31125
|
+
constraints: dB(n)
|
|
31105
31126
|
})),
|
|
31106
31127
|
parameters: r.parameters.map((n) => Ym(n)),
|
|
31107
31128
|
returns: r.return.map((n) => Ym(n))
|
|
@@ -31187,7 +31208,7 @@ function Xm(t) {
|
|
|
31187
31208
|
return {
|
|
31188
31209
|
digest: t.digest,
|
|
31189
31210
|
epoch: ((a = t.effects) == null ? void 0 : a.executedEpoch) ?? null,
|
|
31190
|
-
effects:
|
|
31211
|
+
effects: nB(new Uint8Array(t.rawEffects)),
|
|
31191
31212
|
objectTypes: Promise.resolve(r),
|
|
31192
31213
|
transaction: {
|
|
31193
31214
|
...s,
|
|
@@ -31201,7 +31222,7 @@ function Xm(t) {
|
|
|
31201
31222
|
}))) ?? []
|
|
31202
31223
|
};
|
|
31203
31224
|
}
|
|
31204
|
-
function
|
|
31225
|
+
function uB({
|
|
31205
31226
|
bytes: t,
|
|
31206
31227
|
effects: e,
|
|
31207
31228
|
objectChanges: r
|
|
@@ -31335,11 +31356,11 @@ function cB({
|
|
|
31335
31356
|
}
|
|
31336
31357
|
};
|
|
31337
31358
|
}
|
|
31338
|
-
const
|
|
31359
|
+
const fB = ye.struct("Balance", {
|
|
31339
31360
|
value: ye.u64()
|
|
31340
|
-
}),
|
|
31361
|
+
}), lB = ye.struct("Coin", {
|
|
31341
31362
|
id: ye.Address,
|
|
31342
|
-
balance:
|
|
31363
|
+
balance: fB
|
|
31343
31364
|
});
|
|
31344
31365
|
function Ym(t) {
|
|
31345
31366
|
if (typeof t != "string") {
|
|
@@ -31400,7 +31421,7 @@ function Wa(t) {
|
|
|
31400
31421
|
};
|
|
31401
31422
|
throw new Error(`Unknown type: ${JSON.stringify(t)}`);
|
|
31402
31423
|
}
|
|
31403
|
-
function
|
|
31424
|
+
function dB(t) {
|
|
31404
31425
|
return t.abilities.map((e) => {
|
|
31405
31426
|
switch (e) {
|
|
31406
31427
|
case "Copy":
|
|
@@ -31416,7 +31437,7 @@ function lB(t) {
|
|
|
31416
31437
|
}
|
|
31417
31438
|
});
|
|
31418
31439
|
}
|
|
31419
|
-
function
|
|
31440
|
+
function hB(t) {
|
|
31420
31441
|
switch (t) {
|
|
31421
31442
|
case "Public":
|
|
31422
31443
|
return "public";
|
|
@@ -31428,7 +31449,7 @@ function dB(t) {
|
|
|
31428
31449
|
return "unknown";
|
|
31429
31450
|
}
|
|
31430
31451
|
}
|
|
31431
|
-
const
|
|
31452
|
+
const pB = Symbol.for("@mysten/SuiClient");
|
|
31432
31453
|
class Jm extends j2 {
|
|
31433
31454
|
/**
|
|
31434
31455
|
* Establish a connection to a Sui RPC endpoint
|
|
@@ -31436,12 +31457,12 @@ class Jm extends j2 {
|
|
|
31436
31457
|
* @param options configuration options for the API Client
|
|
31437
31458
|
*/
|
|
31438
31459
|
constructor(e) {
|
|
31439
|
-
super({ network: e.network ?? "unknown" }), this.jsonRpc = this, this.transport = e.transport ?? new
|
|
31460
|
+
super({ network: e.network ?? "unknown" }), this.jsonRpc = this, this.transport = e.transport ?? new _P({ url: e.url }), this.core = new cB({
|
|
31440
31461
|
jsonRpcClient: this,
|
|
31441
31462
|
mvr: e.mvr
|
|
31442
31463
|
});
|
|
31443
31464
|
}
|
|
31444
|
-
get [
|
|
31465
|
+
get [pB]() {
|
|
31445
31466
|
return !0;
|
|
31446
31467
|
}
|
|
31447
31468
|
async getRpcApiVersion({ signal: e } = {}) {
|
|
@@ -32097,7 +32118,7 @@ class Jm extends j2 {
|
|
|
32097
32118
|
return {
|
|
32098
32119
|
hasNextPage: s,
|
|
32099
32120
|
nextCursor: n,
|
|
32100
|
-
data: i.map((a) =>
|
|
32121
|
+
data: i.map((a) => y4(a, e))
|
|
32101
32122
|
};
|
|
32102
32123
|
}
|
|
32103
32124
|
async getProtocolConfig(e) {
|
|
@@ -32144,7 +32165,7 @@ class Jm extends j2 {
|
|
|
32144
32165
|
throw i.throwIfAborted(), new Error("Unexpected error while waiting for transaction block.");
|
|
32145
32166
|
}
|
|
32146
32167
|
}
|
|
32147
|
-
class
|
|
32168
|
+
class yB {
|
|
32148
32169
|
constructor(e, r, n, s) {
|
|
32149
32170
|
this.client = new Jm({ url: Cm(n) }), this.url = e instanceof It ? e : new It(e), this.account = r, this.network = n, this.auth = s, this.relayer = new gi(this.auth, this.url);
|
|
32150
32171
|
}
|
|
@@ -32182,7 +32203,7 @@ class pB {
|
|
|
32182
32203
|
p.pure.u256(i.timelock),
|
|
32183
32204
|
p.pure.vector("u8", Buffer.from("")),
|
|
32184
32205
|
d,
|
|
32185
|
-
p.object(
|
|
32206
|
+
p.object(uO)
|
|
32186
32207
|
]
|
|
32187
32208
|
});
|
|
32188
32209
|
const m = await p.build({ client: this.client }), b = await this.client.dryRunTransactionBlock({
|
|
@@ -32258,7 +32279,7 @@ function Zm(t) {
|
|
|
32258
32279
|
let e = t.startsWith("0x") ? t.slice(2) : t;
|
|
32259
32280
|
return e = e.toLowerCase(), e.length > 64 && (e = e.slice(e.length - 64)), e.length < 64 && (e = e.padStart(64, "0")), `0x${e}`;
|
|
32260
32281
|
}
|
|
32261
|
-
class
|
|
32282
|
+
class mB {
|
|
32262
32283
|
constructor(e, r, n, s) {
|
|
32263
32284
|
this.url = typeof e == "string" ? new It(e) : e, this.auth = n, s instanceof J0 ? (this.wallet = { tronweb: s }, this.tronweb = s) : (this.wallet = { adapter: s }, this.tronweb = new J0({
|
|
32264
32285
|
fullHost: mv[r]
|
|
@@ -32479,8 +32500,8 @@ class yB {
|
|
|
32479
32500
|
return T("Refund is taken care of by the relayer");
|
|
32480
32501
|
}
|
|
32481
32502
|
}
|
|
32482
|
-
const
|
|
32483
|
-
class
|
|
32503
|
+
const bB = 25 * 60 * 60 * 1e3;
|
|
32504
|
+
class gB {
|
|
32484
32505
|
constructor(e, r, n, s) {
|
|
32485
32506
|
this.url = typeof e == "string" ? new It(e) : e, this.auth = n, this.wallet = s, this.client = new uv(bv[r], {}), this.relayer = new gi(this.auth, this.url);
|
|
32486
32507
|
}
|
|
@@ -32531,7 +32552,7 @@ class bB {
|
|
|
32531
32552
|
Condition: this.buildCondition(s),
|
|
32532
32553
|
CancelAfter: fv(
|
|
32533
32554
|
new Date(
|
|
32534
|
-
new Date(n.created_at).getTime() +
|
|
32555
|
+
new Date(n.created_at).getTime() + bB
|
|
32535
32556
|
)
|
|
32536
32557
|
),
|
|
32537
32558
|
TransactionType: "EscrowCreate"
|
|
@@ -32597,7 +32618,7 @@ class bB {
|
|
|
32597
32618
|
return "A0258020" + e.toUpperCase() + "810120";
|
|
32598
32619
|
}
|
|
32599
32620
|
}
|
|
32600
|
-
const
|
|
32621
|
+
const wB = (t) => {
|
|
32601
32622
|
if (t)
|
|
32602
32623
|
if (typeof t == "string") {
|
|
32603
32624
|
const e = ev.from(t);
|
|
@@ -32686,7 +32707,7 @@ class ou extends ib {
|
|
|
32686
32707
|
return Z(c.toString("hex"));
|
|
32687
32708
|
}
|
|
32688
32709
|
}
|
|
32689
|
-
class
|
|
32710
|
+
class vB {
|
|
32690
32711
|
constructor(e = {}) {
|
|
32691
32712
|
const r = {
|
|
32692
32713
|
stdTTL: e.ttl ? e.ttl / 1e3 : 3600,
|
|
@@ -32767,7 +32788,7 @@ class wB {
|
|
|
32767
32788
|
}
|
|
32768
32789
|
}
|
|
32769
32790
|
var Io, Po, Oo, Me, Wi, hs;
|
|
32770
|
-
class
|
|
32791
|
+
class EB {
|
|
32771
32792
|
constructor(e, r, n, s, i, a) {
|
|
32772
32793
|
Cs(this, Io);
|
|
32773
32794
|
Cs(this, Po);
|
|
@@ -32775,7 +32796,7 @@ class vB {
|
|
|
32775
32796
|
Cs(this, Me);
|
|
32776
32797
|
Cs(this, Wi);
|
|
32777
32798
|
Cs(this, hs);
|
|
32778
|
-
this.isBackgroundServiceRunning = !1, this.stopBackgroundExecution = null, this.htlcs = r, this.events = a, Rs(this, Io, e), Rs(this, Po, n), Rs(this, Oo, ou.fromDigestKey(e.digestKey)), Rs(this, Me, new
|
|
32799
|
+
this.isBackgroundServiceRunning = !1, this.stopBackgroundExecution = null, this.htlcs = r, this.events = a, Rs(this, Io, e), Rs(this, Po, n), Rs(this, Oo, ou.fromDigestKey(e.digestKey)), Rs(this, Me, new vB()), Rs(this, Wi, s), Rs(this, hs, i);
|
|
32779
32800
|
}
|
|
32780
32801
|
async getAddressesFromHTLCs() {
|
|
32781
32802
|
var n, s, i, a, o, c, u;
|
|
@@ -33223,7 +33244,7 @@ class vB {
|
|
|
33223
33244
|
}
|
|
33224
33245
|
}
|
|
33225
33246
|
Io = new WeakMap(), Po = new WeakMap(), Oo = new WeakMap(), Me = new WeakMap(), Wi = new WeakMap(), hs = new WeakMap();
|
|
33226
|
-
class
|
|
33247
|
+
class AB extends ib {
|
|
33227
33248
|
emit(e, ...r) {
|
|
33228
33249
|
super.emit(e, ...r);
|
|
33229
33250
|
}
|
|
@@ -33232,7 +33253,7 @@ class M6 extends J6 {
|
|
|
33232
33253
|
constructor(e) {
|
|
33233
33254
|
const { api: r } = tp(e.environment);
|
|
33234
33255
|
if (!r) throw new Error("API Key not found");
|
|
33235
|
-
super(new It(r.baseurl), rd(e.apiKey)), this._redeemServiceEnabled = !0, this.executeInterval = 5e3, this._api = r, this._digestKey =
|
|
33256
|
+
super(new It(r.baseurl), rd(e.apiKey)), this._redeemServiceEnabled = !0, this.executeInterval = 5e3, this._api = r, this._digestKey = wB(e.digestKey), this._auth = rd(e.apiKey), this._quote = e.quote ?? new HE(this._api.baseurl, this._auth), this._htlcs = e.htlc ?? {}, this._events = new AB(), this._executor = this._digestKey ? new EB(
|
|
33236
33257
|
this._digestKey,
|
|
33237
33258
|
this.htlcs,
|
|
33238
33259
|
this,
|
|
@@ -33278,14 +33299,14 @@ class M6 extends J6 {
|
|
|
33278
33299
|
"API not found, invalid environment " + e.environment
|
|
33279
33300
|
);
|
|
33280
33301
|
const i = e.wallets ? {
|
|
33281
|
-
evm: e.wallets.evm ? new
|
|
33282
|
-
starknet: e.wallets.starknet ? new
|
|
33302
|
+
evm: e.wallets.evm ? new XT(n.baseurl, e.wallets.evm, r) : void 0,
|
|
33303
|
+
starknet: e.wallets.starknet ? new QT(
|
|
33283
33304
|
n.baseurl,
|
|
33284
33305
|
e.wallets.starknet,
|
|
33285
33306
|
s,
|
|
33286
33307
|
r
|
|
33287
33308
|
) : void 0,
|
|
33288
|
-
solana: e.wallets.solana ? new
|
|
33309
|
+
solana: e.wallets.solana ? new mP(
|
|
33289
33310
|
e.wallets.solana,
|
|
33290
33311
|
new It(n.baseurl),
|
|
33291
33312
|
s,
|
|
@@ -33294,10 +33315,10 @@ class M6 extends J6 {
|
|
|
33294
33315
|
programAddress: e.solanaProgramAddress
|
|
33295
33316
|
}
|
|
33296
33317
|
) : void 0,
|
|
33297
|
-
sui: e.wallets.sui ? new
|
|
33318
|
+
sui: e.wallets.sui ? new yB(n.baseurl, e.wallets.sui, s, r) : void 0,
|
|
33298
33319
|
bitcoin: e.wallets.bitcoin ? new jE(e.wallets.bitcoin, s) : void 0,
|
|
33299
|
-
tron: e.wallets.tron ? new
|
|
33300
|
-
xrpl: e.wallets.xrpl ? new
|
|
33320
|
+
tron: e.wallets.tron ? new mB(n.baseurl, s, r, e.wallets.tron) : void 0,
|
|
33321
|
+
xrpl: e.wallets.xrpl ? new gB(n.baseurl, s, r, e.wallets.xrpl) : void 0
|
|
33301
33322
|
} : {};
|
|
33302
33323
|
return new M6({
|
|
33303
33324
|
htlc: i,
|
|
@@ -33568,7 +33589,7 @@ class M6 extends J6 {
|
|
|
33568
33589
|
return this._events.off(e, r), this;
|
|
33569
33590
|
}
|
|
33570
33591
|
}
|
|
33571
|
-
class
|
|
33592
|
+
class bC {
|
|
33572
33593
|
constructor(e, r, n) {
|
|
33573
33594
|
this.callData = new X0(Qw), this.account = e, this.starknetProvider = new ab({
|
|
33574
33595
|
nodeUrl: r || (n ? Dc[n].nodeUrl : Dc.mainnet.nodeUrl)
|
|
@@ -33597,7 +33618,7 @@ class mC {
|
|
|
33597
33618
|
throw new Error("Token address retrieval failed");
|
|
33598
33619
|
const s = ob.toHex(n), i = ja.uint256(BigInt(e.source_swap.amount));
|
|
33599
33620
|
try {
|
|
33600
|
-
const u = await
|
|
33621
|
+
const u = await YT(
|
|
33601
33622
|
this.account,
|
|
33602
33623
|
s,
|
|
33603
33624
|
e.source_swap.asset,
|
|
@@ -33672,7 +33693,7 @@ class mC {
|
|
|
33672
33693
|
}
|
|
33673
33694
|
}
|
|
33674
33695
|
}
|
|
33675
|
-
class
|
|
33696
|
+
class gC {
|
|
33676
33697
|
/**
|
|
33677
33698
|
* Creates a new instance of SolanaHTLC.
|
|
33678
33699
|
* @param {AnchorProvider} provider - Solana Provider (abstraction of RPC connection and a Wallet)
|
|
@@ -33787,13 +33808,13 @@ class bC {
|
|
|
33787
33808
|
}
|
|
33788
33809
|
}
|
|
33789
33810
|
}
|
|
33790
|
-
const
|
|
33811
|
+
const SB = (t) => t.map((e) => e), xB = (t) => {
|
|
33791
33812
|
if (t === $e.TESTNET)
|
|
33792
|
-
return xB;
|
|
33793
|
-
if (t === $e.MAINNET)
|
|
33794
33813
|
return kB;
|
|
33814
|
+
if (t === $e.MAINNET)
|
|
33815
|
+
return _B;
|
|
33795
33816
|
throw new Error("Invalid network");
|
|
33796
|
-
},
|
|
33817
|
+
}, kB = ["https://mempool.space/testnet4/api"], _B = [
|
|
33797
33818
|
"https://mempool.space/api",
|
|
33798
33819
|
"https://blockstream.info/api"
|
|
33799
33820
|
], $s = {
|
|
@@ -33811,9 +33832,9 @@ const AB = (t) => t.map((e) => e), SB = (t) => {
|
|
|
33811
33832
|
INVALID_PUBKEY: "invalid public key",
|
|
33812
33833
|
ORDER_NOT_EXPIRED: "you cannot refund before your transaction expires"
|
|
33813
33834
|
}, Qm = (t) => t.sort((e, r) => e.status.confirmed != r.status.confirmed ? e.status.confirmed ? -1 : 1 : r.value - e.value);
|
|
33814
|
-
class
|
|
33835
|
+
class wC {
|
|
33815
33836
|
constructor(e, r) {
|
|
33816
|
-
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ?
|
|
33837
|
+
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? SB([r]) : xB(e), this.network = xv(e);
|
|
33817
33838
|
}
|
|
33818
33839
|
/**
|
|
33819
33840
|
* Gets the output index of the UTXO
|
|
@@ -34082,7 +34103,7 @@ class Qs {
|
|
|
34082
34103
|
return new Qs(s, i);
|
|
34083
34104
|
}
|
|
34084
34105
|
}
|
|
34085
|
-
const
|
|
34106
|
+
const TB = (t, e, r = !1) => {
|
|
34086
34107
|
const n = (a) => {
|
|
34087
34108
|
try {
|
|
34088
34109
|
a = $a.fromBech32(a).data.toString("hex");
|
|
@@ -34129,7 +34150,7 @@ const _B = (t, e, r = !1) => {
|
|
|
34129
34150
|
P2TR: "p2tr"
|
|
34130
34151
|
};
|
|
34131
34152
|
var F6 = /* @__PURE__ */ ((t) => (t[t.Bitcoin = 0] = "Bitcoin", t[t.EVM = 1] = "EVM", t))(F6 || {});
|
|
34132
|
-
class
|
|
34153
|
+
class IB {
|
|
34133
34154
|
addSignatureSegwitV0(e = jc.ALL) {
|
|
34134
34155
|
return new Qs("segwitV0", e);
|
|
34135
34156
|
}
|
|
@@ -34223,11 +34244,11 @@ class TB {
|
|
|
34223
34244
|
async newSwap(e) {
|
|
34224
34245
|
if (e.secretHash = ut(e.secretHash), e.secretHash.length !== 64)
|
|
34225
34246
|
throw new Error(Ua.INVALID_SECRET_HASH);
|
|
34226
|
-
const { script: r, address: n } =
|
|
34247
|
+
const { script: r, address: n } = TB(
|
|
34227
34248
|
e,
|
|
34228
34249
|
await this.getNetwork()
|
|
34229
34250
|
);
|
|
34230
|
-
return new
|
|
34251
|
+
return new PB(this, {
|
|
34231
34252
|
...e,
|
|
34232
34253
|
redeemScript: r,
|
|
34233
34254
|
scriptAddress: n
|
|
@@ -34255,7 +34276,7 @@ class TB {
|
|
|
34255
34276
|
throw new Error("Unsupported script type");
|
|
34256
34277
|
}
|
|
34257
34278
|
}
|
|
34258
|
-
class
|
|
34279
|
+
class PB {
|
|
34259
34280
|
/**
|
|
34260
34281
|
* @constructor
|
|
34261
34282
|
* @param {IBitcoinWallet} wallet
|
|
@@ -34370,20 +34391,20 @@ function sd(t) {
|
|
|
34370
34391
|
return nf.regtest;
|
|
34371
34392
|
throw new Error("Invalid network");
|
|
34372
34393
|
}
|
|
34373
|
-
function
|
|
34394
|
+
function OB(t, e, r) {
|
|
34374
34395
|
if (!dv(t))
|
|
34375
34396
|
throw new Error("Invalid mnemonic");
|
|
34376
34397
|
const n = (r == null ? void 0 : r.path) ?? $6.bip44(e, (r == null ? void 0 : r.index) ?? 0), s = pv(Er).fromSeed(hv(t));
|
|
34377
|
-
return
|
|
34398
|
+
return BB(s, n);
|
|
34378
34399
|
}
|
|
34379
|
-
const
|
|
34400
|
+
const BB = (t, e) => {
|
|
34380
34401
|
const r = t.derivePath(e).privateKey;
|
|
34381
34402
|
if (!r)
|
|
34382
34403
|
throw new Error("Unable to derive private key from mnemonic");
|
|
34383
34404
|
return r.toString("hex");
|
|
34384
34405
|
};
|
|
34385
34406
|
sv(Er);
|
|
34386
|
-
class Ma extends
|
|
34407
|
+
class Ma extends IB {
|
|
34387
34408
|
/**
|
|
34388
34409
|
* @constructor
|
|
34389
34410
|
* @param {BitcoinWalletOpts} opts
|
|
@@ -34405,7 +34426,7 @@ class Ma extends TB {
|
|
|
34405
34426
|
* else use multi-key wallet's `fromMnemonic`
|
|
34406
34427
|
*/
|
|
34407
34428
|
static fromMnemonic(e, r, n) {
|
|
34408
|
-
const s = $6.bip84(r.getNetwork(), n == null ? void 0 : n.index), i =
|
|
34429
|
+
const s = $6.bip84(r.getNetwork(), n == null ? void 0 : n.index), i = OB(e, r.getNetwork(), {
|
|
34409
34430
|
path: s
|
|
34410
34431
|
});
|
|
34411
34432
|
return new Ma({
|
|
@@ -34672,25 +34693,26 @@ class Ma extends TB {
|
|
|
34672
34693
|
export {
|
|
34673
34694
|
zT as A,
|
|
34674
34695
|
V as B,
|
|
34675
|
-
|
|
34676
|
-
|
|
34677
|
-
|
|
34678
|
-
|
|
34696
|
+
qT as C,
|
|
34697
|
+
Ty as D,
|
|
34698
|
+
XT as E,
|
|
34699
|
+
cn as F,
|
|
34679
34700
|
M6 as G,
|
|
34680
34701
|
Da as H,
|
|
34681
|
-
|
|
34682
|
-
|
|
34683
|
-
|
|
34684
|
-
|
|
34685
|
-
|
|
34686
|
-
|
|
34687
|
-
|
|
34688
|
-
|
|
34702
|
+
wC as I,
|
|
34703
|
+
Ma as J,
|
|
34704
|
+
XB as K,
|
|
34705
|
+
sf as L,
|
|
34706
|
+
Dc as M,
|
|
34707
|
+
ep as N,
|
|
34708
|
+
bv as O,
|
|
34709
|
+
yv as P,
|
|
34689
34710
|
HE as Q,
|
|
34690
|
-
|
|
34691
|
-
|
|
34711
|
+
Q0 as R,
|
|
34712
|
+
QT as S,
|
|
34692
34713
|
mv as T,
|
|
34693
|
-
|
|
34714
|
+
_c as U,
|
|
34715
|
+
gB as X,
|
|
34694
34716
|
qx as a,
|
|
34695
34717
|
xr as b,
|
|
34696
34718
|
Uu as c,
|
|
@@ -34698,23 +34720,23 @@ export {
|
|
|
34698
34720
|
yi as e,
|
|
34699
34721
|
dn as f,
|
|
34700
34722
|
Hh as g,
|
|
34701
|
-
|
|
34723
|
+
bC as h,
|
|
34702
34724
|
Vo as i,
|
|
34703
|
-
|
|
34704
|
-
|
|
34725
|
+
mP as j,
|
|
34726
|
+
gC as k,
|
|
34705
34727
|
ju as l,
|
|
34706
34728
|
ou as m,
|
|
34707
|
-
|
|
34708
|
-
|
|
34729
|
+
YT as n,
|
|
34730
|
+
JT as o,
|
|
34709
34731
|
Rc as p,
|
|
34710
|
-
|
|
34732
|
+
JB as q,
|
|
34711
34733
|
tp as r,
|
|
34712
34734
|
ft as s,
|
|
34713
34735
|
Ye as t,
|
|
34714
34736
|
LT as u,
|
|
34715
|
-
|
|
34737
|
+
YB as v,
|
|
34716
34738
|
I0 as w,
|
|
34717
|
-
|
|
34739
|
+
WT as x,
|
|
34718
34740
|
_y as y,
|
|
34719
34741
|
DT as z
|
|
34720
34742
|
};
|