@gardenfi/core 3.1.3-beta.15 → 3.1.3-beta.16

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.
@@ -85,7 +85,7 @@ const sf = {
85
85
  [Re.MAINNET]: "wss://s.altnet.rippletest.net:51233",
86
86
  [Re.TESTNET]: "wss://s.altnet.rippletest.net:51233",
87
87
  [Re.LOCALNET]: ""
88
- }, ZB = {
88
+ }, eC = {
89
89
  asset: $t.from($6.base.cBBTC)
90
90
  };
91
91
  var Tc = /* @__PURE__ */ ((t) => (t.orderCreated = "orderCreated", t.orderInitiating = "orderInitiating", t.orderInitiated = "orderInitiated", t))(Tc || {}), Hi = /* @__PURE__ */ ((t) => (t.SLOW = "SLOW", t.MEDIUM = "MEDIUM", t.FAST = "FAST", t))(Hi || {}), cn = /* @__PURE__ */ ((t) => (t.Mainnet = "Mainnet", t.Testnet = "Testnet", t.Regtest = "Regtest", t))(cn || {}), Ic = /* @__PURE__ */ ((t) => (t.ALL = "ALL", t.IN = "IN", t.OUT = "OUT", t))(Ic || {});
@@ -133,7 +133,7 @@ const Ye = (t) => t.length === 64 ? t : t.slice(2), S5 = (t) => {
133
133
  return !1;
134
134
  }
135
135
  };
136
- function QB(t, e) {
136
+ function tC(t, e) {
137
137
  if (!t) return !1;
138
138
  const r = e === Gs.MAINNET ? ke.networks.bitcoin : e === Gs.TESTNET ? ke.networks.testnet : ke.networks.regtest;
139
139
  if (!r) return !1;
@@ -144,7 +144,7 @@ function QB(t, e) {
144
144
  return !1;
145
145
  }
146
146
  }
147
- function eC(t, e) {
147
+ function rC(t, e) {
148
148
  if (!t) return !1;
149
149
  const r = e === Gs.MAINNET ? "MAINNET" : "REGTEST";
150
150
  try {
@@ -153,7 +153,7 @@ function eC(t, e) {
153
153
  return !1;
154
154
  }
155
155
  }
156
- function tC(t, e) {
156
+ function nC(t, e) {
157
157
  if (!t) return !1;
158
158
  let r;
159
159
  if (e === Gs.MAINNET ? r = ec.Networks.livenet : e === Gs.TESTNET ? r = ec.Networks.testnet : r = ec.Networks.testnet, !r) return !1;
@@ -180,7 +180,7 @@ function tC(t, e) {
180
180
  return !1;
181
181
  }
182
182
  }
183
- function rC(t, e) {
183
+ function sC(t, e) {
184
184
  if (!t) return !1;
185
185
  const r = t.trim();
186
186
  if (r.includes("@")) {
@@ -12201,7 +12201,7 @@ async function Uu(t, e) {
12201
12201
  });
12202
12202
  return ne === "0x" ? { data: void 0 } : { data: ne };
12203
12203
  } catch (ee) {
12204
- const G = Bx(ee), { offchainLookup: O, offchainLookupSignature: L } = await import("./ccip-u2gxhoVe.js");
12204
+ const G = Bx(ee), { offchainLookup: O, offchainLookupSignature: L } = await import("./ccip-8ZE9lZ-m.js");
12205
12205
  if (t.ccipRead !== !1 && (G == null ? void 0 : G.slice(0, 10)) === L && g)
12206
12206
  return { data: await O(t, { data: G, to: g }) };
12207
12207
  throw F && (G == null ? void 0 : G.slice(0, 10)) === "0x101bb98d" ? new fS({ factory: p }) : L1(ee, {
@@ -20036,6 +20036,44 @@ const _T = /* @__PURE__ */ nt({
20036
20036
  http: ["https://rpc.botanixlabs.com/"]
20037
20037
  }
20038
20038
  }
20039
+ }, DT = {
20040
+ id: 46630,
20041
+ name: "Robinhood Testnet",
20042
+ nativeCurrency: {
20043
+ name: "Ethereum",
20044
+ symbol: "ETH",
20045
+ decimals: 18
20046
+ },
20047
+ blockExplorers: {
20048
+ default: {
20049
+ name: "Robinhood Testnet Explorer",
20050
+ url: "https://explorer.testnet.chain.robinhood.com"
20051
+ }
20052
+ },
20053
+ rpcUrls: {
20054
+ default: {
20055
+ http: ["https://rpc.testnet.chain.robinhood.com"]
20056
+ }
20057
+ }
20058
+ }, zT = {
20059
+ id: 4663,
20060
+ name: "Robinhood",
20061
+ nativeCurrency: {
20062
+ name: "Ethereum",
20063
+ symbol: "ETH",
20064
+ decimals: 18
20065
+ },
20066
+ blockExplorers: {
20067
+ default: {
20068
+ name: "Robinhood Explorer",
20069
+ url: "https://robinhoodchain.blockscout.com"
20070
+ }
20071
+ },
20072
+ rpcUrls: {
20073
+ default: {
20074
+ http: ["https://rpc.mainnet.chain.robinhood.com"]
20075
+ }
20076
+ }
20039
20077
  }, ky = {
20040
20078
  id: 998,
20041
20079
  name: "Hyperliquid EVM Testnet",
@@ -20074,7 +20112,7 @@ const _T = /* @__PURE__ */ nt({
20074
20112
  http: ["https://rpc.hyperliquid.xyz/evm"]
20075
20113
  }
20076
20114
  }
20077
- }, DT = {
20115
+ }, VT = {
20078
20116
  id: 8150,
20079
20117
  name: "Alpen Network",
20080
20118
  nativeCurrency: {
@@ -20093,7 +20131,7 @@ const _T = /* @__PURE__ */ nt({
20093
20131
  http: ["https://rpc.pectra-testnet.alpenlabs.io"]
20094
20132
  }
20095
20133
  }
20096
- }, zT = {
20134
+ }, GT = {
20097
20135
  id: 143,
20098
20136
  name: "Monad",
20099
20137
  nativeCurrency: {
@@ -20112,7 +20150,7 @@ const _T = /* @__PURE__ */ nt({
20112
20150
  http: ["https://rpc1.monad.xyz"]
20113
20151
  }
20114
20152
  }
20115
- }, VT = {
20153
+ }, qT = {
20116
20154
  id: 4114,
20117
20155
  name: "Citrea Mainnet",
20118
20156
  nativeCurrency: {
@@ -20133,7 +20171,7 @@ const _T = /* @__PURE__ */ nt({
20133
20171
  }
20134
20172
  },
20135
20173
  testnet: !1
20136
- }, GT = {
20174
+ }, WT = {
20137
20175
  id: 4326,
20138
20176
  name: "MegaETH",
20139
20177
  nativeCurrency: {
@@ -20163,11 +20201,11 @@ const _T = /* @__PURE__ */ nt({
20163
20201
  base_sepolia: Yw,
20164
20202
  base: Xw,
20165
20203
  bera_testnet: TT,
20166
- citrea: VT,
20204
+ citrea: qT,
20167
20205
  citrea_testnet: OT,
20168
20206
  core: BT,
20169
20207
  bera: _T,
20170
- monad: zT,
20208
+ monad: GT,
20171
20209
  monad_testnet: FT,
20172
20210
  hyperliquid_testnet: ky,
20173
20211
  hyperevm: _y,
@@ -20176,16 +20214,18 @@ const _T = /* @__PURE__ */ nt({
20176
20214
  botanix: LT,
20177
20215
  bnbchain: IT,
20178
20216
  bnbchain_testnet: PT,
20179
- alpen_testnet: DT,
20217
+ alpen_testnet: VT,
20180
20218
  hypercore: {},
20181
20219
  hypercore_testnet: {},
20182
20220
  arc_testnet: kT,
20183
20221
  hyperliquid: _y,
20184
- megaeth: GT,
20222
+ megaeth: WT,
20185
20223
  hyperevm_testnet: ky,
20186
20224
  ink_sepolia: UT,
20187
- ink: NT
20188
- }, qT = (t) => {
20225
+ ink: NT,
20226
+ robinhood_testnet: DT,
20227
+ robinhood: zT
20228
+ }, KT = (t) => {
20189
20229
  for (const [e, r] of Object.entries(I0))
20190
20230
  if (r.id === t) return e;
20191
20231
  return null;
@@ -20207,7 +20247,7 @@ const _T = /* @__PURE__ */ nt({
20207
20247
  walletClient: o
20208
20248
  });
20209
20249
  } catch (o) {
20210
- if (WT(o))
20250
+ if (XT(o))
20211
20251
  if (o.code === 4902 || o.code === -32603)
20212
20252
  try {
20213
20253
  await e.addChain({ chain: r });
@@ -20240,7 +20280,7 @@ const _T = /* @__PURE__ */ nt({
20240
20280
  }
20241
20281
  else
20242
20282
  return T("Chain not supported");
20243
- }, WT = (t) => typeof t == "object" && t != null && ("code" in t || "message" in t || "body" in t), KT = async (t, e) => {
20283
+ }, XT = (t) => typeof t == "object" && t != null && ("code" in t || "message" in t || "body" in t), YT = async (t, e) => {
20244
20284
  if (!t.account) return T("No account found");
20245
20285
  try {
20246
20286
  const r = await t.sendTransaction({
@@ -20256,7 +20296,7 @@ const _T = /* @__PURE__ */ nt({
20256
20296
  return T("Failed to execute hypercore to evm bridge: " + String(r));
20257
20297
  }
20258
20298
  };
20259
- class XT {
20299
+ class JT {
20260
20300
  constructor(e, r, n) {
20261
20301
  this.wallet = r, this.auth = n, this.url = e instanceof It ? e : new It(e), this.relayer = new vi(this.auth, this.url);
20262
20302
  }
@@ -20297,7 +20337,7 @@ class XT {
20297
20337
  }
20298
20338
  // ------------------ INITIATE FROM API RESPONSE ------------------
20299
20339
  async initiateFromAPI(e) {
20300
- const r = qT(
20340
+ const r = KT(
20301
20341
  e.initiate_transaction.chain_id
20302
20342
  );
20303
20343
  if (!r) return T("Unsupported chain");
@@ -20316,7 +20356,7 @@ class XT {
20316
20356
  return c.ok ? !c.val || c.val.status !== "success" ? T("Native initiate transaction failed") : J(o) : T(c.error);
20317
20357
  }
20318
20358
  if (e.core_to_evm_transfer) {
20319
- const a = await KT(
20359
+ const a = await YT(
20320
20360
  this.wallet,
20321
20361
  e.core_to_evm_transfer
20322
20362
  );
@@ -21508,7 +21548,7 @@ const Jw = [
21508
21548
  }
21509
21549
  ]
21510
21550
  }
21511
- ], YT = async (t, e, r, n, s) => {
21551
+ ], ZT = async (t, e, r, n, s) => {
21512
21552
  try {
21513
21553
  const i = await Nc(
21514
21554
  t.address,
@@ -21581,7 +21621,7 @@ const Jw = [
21581
21621
  `Failed to check allowance: ${s instanceof Error ? s.message : String(s)}`
21582
21622
  );
21583
21623
  }
21584
- }, JT = async (t, e, r, n, s) => {
21624
+ }, QT = async (t, e, r, n, s) => {
21585
21625
  const i = await Nc(
21586
21626
  t,
21587
21627
  e,
@@ -21980,7 +22020,7 @@ const Jw = [
21980
22020
  }
21981
22021
  ]
21982
22022
  }
21983
- ], ZT = {
22023
+ ], eI = {
21984
22024
  StarknetDomain: [
21985
22025
  { name: "name", type: "shortstring" },
21986
22026
  { name: "version", type: "shortstring" },
@@ -21995,7 +22035,7 @@ const Jw = [
21995
22035
  { name: "verifyingContract", type: "ContractAddress" }
21996
22036
  ]
21997
22037
  };
21998
- class QT {
22038
+ class tI {
21999
22039
  constructor(e, r, n, s, i) {
22000
22040
  this.url = e instanceof It ? e : new It(e), this.starknetProvider = new ab({
22001
22041
  nodeUrl: i || Dc[n].nodeUrl
@@ -22019,7 +22059,7 @@ class QT {
22019
22059
  providerOrAccount: this.starknetProvider,
22020
22060
  abi: Zw,
22021
22061
  address: i.val.htlcAddress
22022
- }), o = await (a == null ? void 0 : a.token()), c = ob.toHex(o), u = await JT(
22062
+ }), o = await (a == null ? void 0 : a.token()), c = ob.toHex(o), u = await QT(
22023
22063
  this.account.address,
22024
22064
  c,
22025
22065
  i.val.htlcAddress,
@@ -22071,7 +22111,7 @@ class QT {
22071
22111
  }, c = id(a), u = {
22072
22112
  domain: o,
22073
22113
  primaryType: "Initiate",
22074
- types: ZT,
22114
+ types: eI,
22075
22115
  message: {
22076
22116
  redeemer: s,
22077
22117
  amount: $a.uint256(i),
@@ -22166,12 +22206,12 @@ class QT {
22166
22206
  return T("Refund is taken care of by the relayer");
22167
22207
  }
22168
22208
  }
22169
- const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22209
+ const rI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", nI = {
22170
22210
  name: "solana_spl_swaps",
22171
22211
  version: "0.4.0",
22172
22212
  spec: "0.1.0",
22173
22213
  description: "Created with Anchor"
22174
- }, rI = [
22214
+ }, sI = [
22175
22215
  {
22176
22216
  name: "initiate",
22177
22217
  docs: [
@@ -22500,7 +22540,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22500
22540
  ],
22501
22541
  args: []
22502
22542
  }
22503
- ], nI = [
22543
+ ], iI = [
22504
22544
  {
22505
22545
  name: "SwapAccount",
22506
22546
  discriminator: [
@@ -22514,7 +22554,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22514
22554
  182
22515
22555
  ]
22516
22556
  }
22517
- ], sI = [
22557
+ ], aI = [
22518
22558
  {
22519
22559
  name: "Initiated",
22520
22560
  discriminator: [
@@ -22567,7 +22607,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22567
22607
  99
22568
22608
  ]
22569
22609
  }
22570
- ], iI = [
22610
+ ], oI = [
22571
22611
  {
22572
22612
  code: 6e3,
22573
22613
  name: "InvalidRedeemer",
@@ -22588,7 +22628,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22588
22628
  name: "RefundBeforeExpiry",
22589
22629
  msg: "Attempt to perform a refund before expiry time"
22590
22630
  }
22591
- ], aI = [
22631
+ ], cI = [
22592
22632
  {
22593
22633
  name: "Initiated",
22594
22634
  docs: [
@@ -22789,19 +22829,19 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22789
22829
  }
22790
22830
  }
22791
22831
  ], Iy = {
22792
- address: eI,
22793
- metadata: tI,
22794
- instructions: rI,
22795
- accounts: nI,
22796
- events: sI,
22797
- errors: iI,
22798
- types: aI
22799
- }, oI = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", cI = {
22832
+ address: rI,
22833
+ metadata: nI,
22834
+ instructions: sI,
22835
+ accounts: iI,
22836
+ events: aI,
22837
+ errors: oI,
22838
+ types: cI
22839
+ }, uI = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", fI = {
22800
22840
  name: "solana_native_swaps",
22801
22841
  version: "0.3.0",
22802
22842
  spec: "0.1.0",
22803
22843
  description: "Created with Anchor"
22804
- }, uI = [
22844
+ }, lI = [
22805
22845
  {
22806
22846
  name: "initiate",
22807
22847
  discriminator: [
@@ -22981,7 +23021,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22981
23021
  ],
22982
23022
  args: []
22983
23023
  }
22984
- ], fI = [
23024
+ ], dI = [
22985
23025
  {
22986
23026
  name: "SwapAccount",
22987
23027
  discriminator: [
@@ -22995,7 +23035,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
22995
23035
  182
22996
23036
  ]
22997
23037
  }
22998
- ], lI = [
23038
+ ], hI = [
22999
23039
  {
23000
23040
  name: "Initiated",
23001
23041
  discriminator: [
@@ -23048,7 +23088,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
23048
23088
  99
23049
23089
  ]
23050
23090
  }
23051
- ], dI = [
23091
+ ], pI = [
23052
23092
  {
23053
23093
  code: 6e3,
23054
23094
  name: "InvalidInitiator",
@@ -23069,7 +23109,7 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
23069
23109
  name: "RefundBeforeExpiry",
23070
23110
  msg: "Attempt to perform a refund before expiry time"
23071
23111
  }
23072
- ], hI = [
23112
+ ], yI = [
23073
23113
  {
23074
23114
  name: "Initiated",
23075
23115
  type: {
@@ -23200,23 +23240,23 @@ const eI = "2WXpY8havGjfRxme9LUxtjFHTh1EfU3ur4v6wiK4KdNC", tI = {
23200
23240
  }
23201
23241
  }
23202
23242
  ], Yd = {
23203
- address: oI,
23204
- metadata: cI,
23205
- instructions: uI,
23206
- accounts: fI,
23207
- events: lI,
23208
- errors: dI,
23209
- types: hI
23243
+ address: uI,
23244
+ metadata: fI,
23245
+ instructions: lI,
23246
+ accounts: dI,
23247
+ events: hI,
23248
+ errors: pI,
23249
+ types: yI
23210
23250
  };
23211
23251
  var Nn = {}, Vu = {};
23212
23252
  Object.defineProperty(Vu, "__esModule", { value: !0 });
23213
- Vu.encode = pI;
23214
- Vu.decode = yI;
23253
+ Vu.encode = mI;
23254
+ Vu.decode = bI;
23215
23255
  const Py = pi;
23216
- function pI(t) {
23256
+ function mI(t) {
23217
23257
  return t.reduce((e, r) => e + r.toString(16).padStart(2, "0"), "0x");
23218
23258
  }
23219
- function yI(t) {
23259
+ function bI(t) {
23220
23260
  t.indexOf("0x") === 0 && (t = t.substr(2)), t.length % 2 === 1 && (t = "0" + t);
23221
23261
  let e = t.match(/.{2}/g);
23222
23262
  return e === null ? Py.Buffer.from([]) : Py.Buffer.from(e.map((r) => parseInt(r, 16)));
@@ -23224,13 +23264,13 @@ function yI(t) {
23224
23264
  var Gu = {}, li = {}, zf;
23225
23265
  Object.defineProperty(li, "__esModule", { value: !0 });
23226
23266
  li.isVersionedTransaction = li.isBrowser = void 0;
23227
- li.chunks = mI;
23267
+ li.chunks = gI;
23228
23268
  li.isBrowser = process.env.ANCHOR_BROWSER || typeof window < "u" && !(!((zf = window.process) === null || zf === void 0) && zf.hasOwnProperty("type"));
23229
- function mI(t, e) {
23269
+ function gI(t, e) {
23230
23270
  return Array.apply(0, new Array(Math.ceil(t.length / e))).map((r, n) => t.slice(n * e, (n + 1) * e));
23231
23271
  }
23232
- const bI = (t) => "version" in t;
23233
- li.isVersionedTransaction = bI;
23272
+ const wI = (t) => "version" in t;
23273
+ li.isVersionedTransaction = wI;
23234
23274
  var Vf = {}, Gf = {}, qf, Oy;
23235
23275
  function Qw() {
23236
23276
  return Oy || (Oy = 1, qf = function() {
@@ -23275,19 +23315,19 @@ function e2() {
23275
23315
  return Cy || (Cy = 1, Kf = Object), Kf;
23276
23316
  }
23277
23317
  var Xf, Ry;
23278
- function gI() {
23318
+ function vI() {
23279
23319
  return Ry || (Ry = 1, Xf = Error), Xf;
23280
23320
  }
23281
23321
  var Yf, Ny;
23282
- function wI() {
23322
+ function EI() {
23283
23323
  return Ny || (Ny = 1, Yf = EvalError), Yf;
23284
23324
  }
23285
23325
  var Jf, Uy;
23286
- function vI() {
23326
+ function AI() {
23287
23327
  return Uy || (Uy = 1, Jf = RangeError), Jf;
23288
23328
  }
23289
23329
  var Zf, My;
23290
- function EI() {
23330
+ function SI() {
23291
23331
  return My || (My = 1, Zf = ReferenceError), Zf;
23292
23332
  }
23293
23333
  var Qf, Fy;
@@ -23299,57 +23339,57 @@ function Xo() {
23299
23339
  return $y || ($y = 1, el = TypeError), el;
23300
23340
  }
23301
23341
  var tl, jy;
23302
- function AI() {
23342
+ function xI() {
23303
23343
  return jy || (jy = 1, tl = URIError), tl;
23304
23344
  }
23305
23345
  var rl, Hy;
23306
- function SI() {
23346
+ function kI() {
23307
23347
  return Hy || (Hy = 1, rl = Math.abs), rl;
23308
23348
  }
23309
23349
  var nl, Ly;
23310
- function xI() {
23350
+ function _I() {
23311
23351
  return Ly || (Ly = 1, nl = Math.floor), nl;
23312
23352
  }
23313
23353
  var sl, Dy;
23314
- function kI() {
23354
+ function TI() {
23315
23355
  return Dy || (Dy = 1, sl = Math.max), sl;
23316
23356
  }
23317
23357
  var il, zy;
23318
- function _I() {
23358
+ function II() {
23319
23359
  return zy || (zy = 1, il = Math.min), il;
23320
23360
  }
23321
23361
  var al, Vy;
23322
- function TI() {
23362
+ function PI() {
23323
23363
  return Vy || (Vy = 1, al = Math.pow), al;
23324
23364
  }
23325
23365
  var ol, Gy;
23326
- function II() {
23366
+ function OI() {
23327
23367
  return Gy || (Gy = 1, ol = Math.round), ol;
23328
23368
  }
23329
23369
  var cl, qy;
23330
- function PI() {
23370
+ function BI() {
23331
23371
  return qy || (qy = 1, cl = Number.isNaN || function(e) {
23332
23372
  return e !== e;
23333
23373
  }), cl;
23334
23374
  }
23335
23375
  var ul, Wy;
23336
- function OI() {
23376
+ function CI() {
23337
23377
  if (Wy) return ul;
23338
23378
  Wy = 1;
23339
- var t = PI();
23379
+ var t = BI();
23340
23380
  return ul = function(r) {
23341
23381
  return t(r) || r === 0 ? r : r < 0 ? -1 : 1;
23342
23382
  }, ul;
23343
23383
  }
23344
23384
  var fl, Ky;
23345
- function BI() {
23385
+ function RI() {
23346
23386
  return Ky || (Ky = 1, fl = Object.getOwnPropertyDescriptor), fl;
23347
23387
  }
23348
23388
  var ll, Xy;
23349
23389
  function ha() {
23350
23390
  if (Xy) return ll;
23351
23391
  Xy = 1;
23352
- var t = BI();
23392
+ var t = RI();
23353
23393
  if (t)
23354
23394
  try {
23355
23395
  t([], "length");
@@ -23372,7 +23412,7 @@ function Wu() {
23372
23412
  return dl = t, dl;
23373
23413
  }
23374
23414
  var hl, Jy;
23375
- function CI() {
23415
+ function NI() {
23376
23416
  if (Jy) return hl;
23377
23417
  Jy = 1;
23378
23418
  var t = typeof Symbol < "u" && Symbol, e = Qw();
@@ -23392,7 +23432,7 @@ function n2() {
23392
23432
  return yl = t.getPrototypeOf || null, yl;
23393
23433
  }
23394
23434
  var ml, em;
23395
- function RI() {
23435
+ function UI() {
23396
23436
  if (em) return ml;
23397
23437
  em = 1;
23398
23438
  var t = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, r = Math.max, n = "[object Function]", s = function(c, u) {
@@ -23440,7 +23480,7 @@ var bl, tm;
23440
23480
  function Yo() {
23441
23481
  if (tm) return bl;
23442
23482
  tm = 1;
23443
- var t = RI();
23483
+ var t = UI();
23444
23484
  return bl = Function.prototype.bind || t, bl;
23445
23485
  }
23446
23486
  var gl, rm;
@@ -23452,14 +23492,14 @@ function O0() {
23452
23492
  return nm || (nm = 1, wl = Function.prototype.apply), wl;
23453
23493
  }
23454
23494
  var vl, sm;
23455
- function NI() {
23495
+ function MI() {
23456
23496
  return sm || (sm = 1, vl = typeof Reflect < "u" && Reflect && Reflect.apply), vl;
23457
23497
  }
23458
23498
  var El, im;
23459
23499
  function s2() {
23460
23500
  if (im) return El;
23461
23501
  im = 1;
23462
- var t = Yo(), e = O0(), r = P0(), n = NI();
23502
+ var t = Yo(), e = O0(), r = P0(), n = MI();
23463
23503
  return El = n || t.call(r, e), El;
23464
23504
  }
23465
23505
  var Al, am;
@@ -23474,7 +23514,7 @@ function B0() {
23474
23514
  }, Al;
23475
23515
  }
23476
23516
  var Sl, om;
23477
- function UI() {
23517
+ function FI() {
23478
23518
  if (om) return Sl;
23479
23519
  om = 1;
23480
23520
  var t = B0(), e = ha(), r;
@@ -23501,7 +23541,7 @@ var xl, cm;
23501
23541
  function C0() {
23502
23542
  if (cm) return xl;
23503
23543
  cm = 1;
23504
- var t = r2(), e = n2(), r = UI();
23544
+ var t = r2(), e = n2(), r = FI();
23505
23545
  return xl = t ? function(s) {
23506
23546
  return t(s);
23507
23547
  } : e ? function(s) {
@@ -23523,7 +23563,7 @@ var _l, fm;
23523
23563
  function a2() {
23524
23564
  if (fm) return _l;
23525
23565
  fm = 1;
23526
- var t, e = e2(), r = gI(), n = wI(), s = vI(), i = EI(), a = t2(), o = Xo(), c = AI(), u = SI(), f = xI(), l = kI(), p = _I(), d = TI(), m = II(), b = OI(), E = Function, A = function(ie) {
23566
+ var t, e = e2(), r = vI(), n = EI(), s = AI(), i = SI(), a = t2(), o = Xo(), c = xI(), u = kI(), f = _I(), l = TI(), p = II(), d = PI(), m = OI(), b = CI(), E = Function, A = function(ie) {
23527
23567
  try {
23528
23568
  return E('"use strict"; return (' + ie + ").constructor;")();
23529
23569
  } catch {
@@ -23540,7 +23580,7 @@ function a2() {
23540
23580
  return g;
23541
23581
  }
23542
23582
  }
23543
- }() : g, _ = CI()(), I = C0(), N = n2(), C = r2(), j = O0(), F = P0(), H = {}, z = typeof Uint8Array > "u" || !I ? t : I(Uint8Array), Q = {
23583
+ }() : g, _ = NI()(), I = C0(), N = n2(), C = r2(), j = O0(), F = P0(), H = {}, z = typeof Uint8Array > "u" || !I ? t : I(Uint8Array), Q = {
23544
23584
  __proto__: null,
23545
23585
  "%AggregateError%": typeof AggregateError > "u" ? t : AggregateError,
23546
23586
  "%Array%": Array,
@@ -23773,7 +23813,7 @@ function Jo() {
23773
23813
  }, Tl;
23774
23814
  }
23775
23815
  var Il, dm;
23776
- function MI() {
23816
+ function $I() {
23777
23817
  if (dm) return Il;
23778
23818
  dm = 1;
23779
23819
  var t = qu()(), e = Jo(), r = e("Object.prototype.toString"), n = function(o) {
@@ -23786,7 +23826,7 @@ function MI() {
23786
23826
  return n.isLegacyArguments = s, Il = i ? n : s, Il;
23787
23827
  }
23788
23828
  var Pl, hm;
23789
- function FI() {
23829
+ function jI() {
23790
23830
  if (hm) return Pl;
23791
23831
  hm = 1;
23792
23832
  var t = Jo(), e = qu()(), r = i2(), n = ha(), s;
@@ -23830,10 +23870,10 @@ function FI() {
23830
23870
  return Pl = s, Pl;
23831
23871
  }
23832
23872
  var Ol, pm;
23833
- function $I() {
23873
+ function HI() {
23834
23874
  if (pm) return Ol;
23835
23875
  pm = 1;
23836
- var t = Jo(), e = FI(), r = t("RegExp.prototype.exec"), n = Xo();
23876
+ var t = Jo(), e = jI(), r = t("RegExp.prototype.exec"), n = Xo();
23837
23877
  return Ol = function(i) {
23838
23878
  if (!e(i))
23839
23879
  throw new n("`regex` must be a RegExp");
@@ -23843,7 +23883,7 @@ function $I() {
23843
23883
  }, Ol;
23844
23884
  }
23845
23885
  var Bl, ym;
23846
- function jI() {
23886
+ function LI() {
23847
23887
  if (ym) return Bl;
23848
23888
  ym = 1;
23849
23889
  const t = (
@@ -23854,10 +23894,10 @@ function jI() {
23854
23894
  return Bl = () => t, Bl;
23855
23895
  }
23856
23896
  var Cl, mm;
23857
- function HI() {
23897
+ function DI() {
23858
23898
  if (mm) return Cl;
23859
23899
  mm = 1;
23860
- var t = Jo(), e = $I(), r = e(/^\s*(?:function)?\*/), n = qu()(), s = C0(), i = t("Object.prototype.toString"), a = t("Function.prototype.toString"), o = jI();
23900
+ var t = Jo(), e = HI(), r = e(/^\s*(?:function)?\*/), n = qu()(), s = C0(), i = t("Object.prototype.toString"), a = t("Function.prototype.toString"), o = LI();
23861
23901
  return Cl = function(u) {
23862
23902
  if (typeof u != "function")
23863
23903
  return !1;
@@ -23874,7 +23914,7 @@ function HI() {
23874
23914
  }, Cl;
23875
23915
  }
23876
23916
  var Rl, bm;
23877
- function LI() {
23917
+ function zI() {
23878
23918
  if (bm) return Rl;
23879
23919
  bm = 1;
23880
23920
  var t = Function.prototype.toString, e = typeof Reflect == "object" && Reflect !== null && Reflect.apply, r, n;
@@ -23946,10 +23986,10 @@ function LI() {
23946
23986
  }, Rl;
23947
23987
  }
23948
23988
  var Nl, gm;
23949
- function DI() {
23989
+ function VI() {
23950
23990
  if (gm) return Nl;
23951
23991
  gm = 1;
23952
- var t = LI(), e = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, u, f) {
23992
+ var t = zI(), e = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, u, f) {
23953
23993
  for (var l = 0, p = c.length; l < p; l++)
23954
23994
  r.call(c, l) && (f == null ? u(c[l], l, c) : u.call(f, c[l], l, c));
23955
23995
  }, s = function(c, u, f) {
@@ -23970,7 +24010,7 @@ function DI() {
23970
24010
  }, Nl;
23971
24011
  }
23972
24012
  var Ul, wm;
23973
- function zI() {
24013
+ function GI() {
23974
24014
  return wm || (wm = 1, Ul = [
23975
24015
  "Float16Array",
23976
24016
  "Float32Array",
@@ -23987,10 +24027,10 @@ function zI() {
23987
24027
  ]), Ul;
23988
24028
  }
23989
24029
  var Ml, vm;
23990
- function VI() {
24030
+ function qI() {
23991
24031
  if (vm) return Ml;
23992
24032
  vm = 1;
23993
- var t = zI(), e = typeof globalThis > "u" ? ln : globalThis;
24033
+ var t = GI(), e = typeof globalThis > "u" ? ln : globalThis;
23994
24034
  return Ml = function() {
23995
24035
  for (var n = [], s = 0; s < t.length; s++)
23996
24036
  typeof e[t[s]] == "function" && (n[n.length] = t[s]);
@@ -23998,7 +24038,7 @@ function VI() {
23998
24038
  }, Ml;
23999
24039
  }
24000
24040
  var Fl = { exports: {} }, $l, Em;
24001
- function GI() {
24041
+ function WI() {
24002
24042
  if (Em) return $l;
24003
24043
  Em = 1;
24004
24044
  var t = Wu(), e = t2(), r = Xo(), n = ha();
@@ -24030,7 +24070,7 @@ function GI() {
24030
24070
  }, $l;
24031
24071
  }
24032
24072
  var jl, Am;
24033
- function qI() {
24073
+ function KI() {
24034
24074
  if (Am) return jl;
24035
24075
  Am = 1;
24036
24076
  var t = Wu(), e = function() {
@@ -24047,10 +24087,10 @@ function qI() {
24047
24087
  }, jl = e, jl;
24048
24088
  }
24049
24089
  var Hl, Sm;
24050
- function WI() {
24090
+ function XI() {
24051
24091
  if (Sm) return Hl;
24052
24092
  Sm = 1;
24053
- var t = a2(), e = GI(), r = qI()(), n = ha(), s = Xo(), i = t("%Math.floor%");
24093
+ var t = a2(), e = WI(), r = KI()(), n = ha(), s = Xo(), i = t("%Math.floor%");
24054
24094
  return Hl = function(o, c) {
24055
24095
  if (typeof o != "function")
24056
24096
  throw new s("`fn` is not a function");
@@ -24077,7 +24117,7 @@ function WI() {
24077
24117
  }, Hl;
24078
24118
  }
24079
24119
  var Ll, xm;
24080
- function KI() {
24120
+ function YI() {
24081
24121
  if (xm) return Ll;
24082
24122
  xm = 1;
24083
24123
  var t = Yo(), e = O0(), r = s2();
@@ -24086,9 +24126,9 @@ function KI() {
24086
24126
  }, Ll;
24087
24127
  }
24088
24128
  var km;
24089
- function XI() {
24129
+ function JI() {
24090
24130
  return km || (km = 1, function(t) {
24091
- var e = WI(), r = Wu(), n = B0(), s = KI();
24131
+ var e = XI(), r = Wu(), n = B0(), s = YI();
24092
24132
  t.exports = function(a) {
24093
24133
  var o = n(arguments), c = a.length - (arguments.length - 1);
24094
24134
  return e(
@@ -24103,7 +24143,7 @@ var Dl, _m;
24103
24143
  function o2() {
24104
24144
  if (_m) return Dl;
24105
24145
  _m = 1;
24106
- var t = DI(), e = VI(), r = XI(), n = Jo(), s = ha(), 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) {
24146
+ var t = VI(), e = qI(), r = JI(), n = Jo(), s = ha(), 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) {
24107
24147
  for (var k = 0; k < E.length; k += 1)
24108
24148
  if (E[k] === A)
24109
24149
  return k;
@@ -24181,7 +24221,7 @@ function o2() {
24181
24221
  }, Dl;
24182
24222
  }
24183
24223
  var zl, Tm;
24184
- function YI() {
24224
+ function ZI() {
24185
24225
  if (Tm) return zl;
24186
24226
  Tm = 1;
24187
24227
  var t = o2();
@@ -24190,9 +24230,9 @@ function YI() {
24190
24230
  }, zl;
24191
24231
  }
24192
24232
  var Im;
24193
- function JI() {
24233
+ function QI() {
24194
24234
  return Im || (Im = 1, function(t) {
24195
- var e = MI(), r = HI(), n = o2(), s = YI();
24235
+ var e = $I(), r = DI(), n = o2(), s = ZI();
24196
24236
  function i(K) {
24197
24237
  return K.call.bind(K);
24198
24238
  }
@@ -24377,13 +24417,13 @@ function JI() {
24377
24417
  }(Gf)), Gf;
24378
24418
  }
24379
24419
  var Vl, Pm;
24380
- function ZI() {
24420
+ function eP() {
24381
24421
  return Pm || (Pm = 1, Vl = function(e) {
24382
24422
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
24383
24423
  }), Vl;
24384
24424
  }
24385
24425
  var vc = { exports: {} }, Om;
24386
- function QI() {
24426
+ function tP() {
24387
24427
  return Om || (Om = 1, typeof Object.create == "function" ? vc.exports = function(e, r) {
24388
24428
  r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
24389
24429
  constructor: {
@@ -24623,7 +24663,7 @@ function c2() {
24623
24663
  `) + " " + B.join(`,
24624
24664
  `) + " " + D[1] : D[0] + M + " " + B.join(", ") + " " + D[1];
24625
24665
  }
24626
- t.types = JI();
24666
+ t.types = QI();
24627
24667
  function E(B) {
24628
24668
  return Array.isArray(B);
24629
24669
  }
@@ -24680,7 +24720,7 @@ function c2() {
24680
24720
  return B === null || typeof B == "boolean" || typeof B == "number" || typeof B == "string" || typeof B == "symbol" || // ES6 symbol
24681
24721
  typeof B > "u";
24682
24722
  }
24683
- t.isPrimitive = z, t.isBuffer = ZI();
24723
+ t.isPrimitive = z, t.isBuffer = eP();
24684
24724
  function Q(B) {
24685
24725
  return Object.prototype.toString.call(B);
24686
24726
  }
@@ -24711,7 +24751,7 @@ function c2() {
24711
24751
  }
24712
24752
  t.log = function() {
24713
24753
  console.log("%s - %s", ee(), t.format.apply(t, arguments));
24714
- }, t.inherits = QI(), t._extend = function(B, M) {
24754
+ }, t.inherits = tP(), t._extend = function(B, M) {
24715
24755
  if (!M || !C(M)) return B;
24716
24756
  for (var D = Object.keys(M), ne = D.length; ne--; )
24717
24757
  B[D[ne]] = M[D[ne]];
@@ -24797,13 +24837,13 @@ function c2() {
24797
24837
  }(Vf)), Vf;
24798
24838
  }
24799
24839
  Object.defineProperty(Gu, "__esModule", { value: !0 });
24800
- Gu.decode = eP;
24801
- Gu.encode = tP;
24840
+ Gu.decode = rP;
24841
+ Gu.encode = nP;
24802
24842
  const u2 = li;
24803
- function eP(t) {
24843
+ function rP(t) {
24804
24844
  return (u2.isBrowser ? new TextDecoder("utf-8") : new (c2()).TextDecoder("utf-8")).decode(t);
24805
24845
  }
24806
- function tP(t) {
24846
+ function nP(t) {
24807
24847
  return (u2.isBrowser ? new TextEncoder() : new (c2()).TextEncoder("utf-8")).encode(t);
24808
24848
  }
24809
24849
  var Ku = {}, Jd = { exports: {} };
@@ -24837,8 +24877,8 @@ var Ku = {}, Jd = { exports: {} };
24837
24877
  return r.SlowBuffer(a);
24838
24878
  };
24839
24879
  })(Jd, Jd.exports);
24840
- var rP = Jd.exports, Ec = rP.Buffer;
24841
- function nP(t) {
24880
+ var sP = Jd.exports, Ec = sP.Buffer;
24881
+ function iP(t) {
24842
24882
  if (t.length >= 255)
24843
24883
  throw new TypeError("Alphabet too long");
24844
24884
  for (var e = new Uint8Array(256), r = 0; r < e.length; r++)
@@ -24910,31 +24950,31 @@ function nP(t) {
24910
24950
  decode: p
24911
24951
  };
24912
24952
  }
24913
- var sP = nP, iP = sP, aP = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", oP = iP(aP), cP = ln && ln.__importDefault || function(t) {
24953
+ var aP = iP, oP = aP, cP = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", uP = oP(cP), fP = ln && ln.__importDefault || function(t) {
24914
24954
  return t && t.__esModule ? t : { default: t };
24915
24955
  };
24916
24956
  Object.defineProperty(Ku, "__esModule", { value: !0 });
24917
- Ku.encode = uP;
24918
- Ku.decode = fP;
24919
- const f2 = cP(oP);
24920
- function uP(t) {
24957
+ Ku.encode = lP;
24958
+ Ku.decode = dP;
24959
+ const f2 = fP(uP);
24960
+ function lP(t) {
24921
24961
  return f2.default.encode(t);
24922
24962
  }
24923
- function fP(t) {
24963
+ function dP(t) {
24924
24964
  return f2.default.decode(t);
24925
24965
  }
24926
24966
  var Xu = {};
24927
24967
  Object.defineProperty(Xu, "__esModule", { value: !0 });
24928
- Xu.encode = dP;
24929
- Xu.decode = hP;
24930
- const lP = pi;
24931
- function dP(t) {
24968
+ Xu.encode = pP;
24969
+ Xu.decode = yP;
24970
+ const hP = pi;
24971
+ function pP(t) {
24932
24972
  return t.toString("base64");
24933
24973
  }
24934
- function hP(t) {
24935
- return lP.Buffer.from(t, "base64");
24974
+ function yP(t) {
24975
+ return hP.Buffer.from(t, "base64");
24936
24976
  }
24937
- var pP = ln && ln.__createBinding || (Object.create ? function(t, e, r, n) {
24977
+ var mP = ln && ln.__createBinding || (Object.create ? function(t, e, r, n) {
24938
24978
  n === void 0 && (n = r);
24939
24979
  var s = Object.getOwnPropertyDescriptor(e, r);
24940
24980
  (!s || ("get" in s ? !e.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: function() {
@@ -24942,15 +24982,15 @@ var pP = ln && ln.__createBinding || (Object.create ? function(t, e, r, n) {
24942
24982
  } }), Object.defineProperty(t, n, s);
24943
24983
  } : function(t, e, r, n) {
24944
24984
  n === void 0 && (n = r), t[n] = e[r];
24945
- }), yP = ln && ln.__setModuleDefault || (Object.create ? function(t, e) {
24985
+ }), bP = ln && ln.__setModuleDefault || (Object.create ? function(t, e) {
24946
24986
  Object.defineProperty(t, "default", { enumerable: !0, value: e });
24947
24987
  } : function(t, e) {
24948
24988
  t.default = e;
24949
24989
  }), Yu = ln && ln.__importStar || function(t) {
24950
24990
  if (t && t.__esModule) return t;
24951
24991
  var e = {};
24952
- if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && pP(e, t, r);
24953
- return yP(e, t), e;
24992
+ if (t != null) for (var r in t) r !== "default" && Object.prototype.hasOwnProperty.call(t, r) && mP(e, t, r);
24993
+ return bP(e, t), e;
24954
24994
  };
24955
24995
  Object.defineProperty(Nn, "__esModule", { value: !0 });
24956
24996
  Nn.base64 = Nn.bs58 = Nn.utf8 = l2 = Nn.hex = void 0;
@@ -25024,7 +25064,7 @@ function d2(t) {
25024
25064
  );
25025
25065
  return e;
25026
25066
  }
25027
- class mP {
25067
+ class gP {
25028
25068
  /**
25029
25069
  * Creates a new instance of SolanaRelay.
25030
25070
  * @param {AnchorProvider} provider - An abstraction of RPC connection and a Wallet
@@ -25307,7 +25347,7 @@ class mP {
25307
25347
  return T("Refund is automatically handled by the relayer.");
25308
25348
  }
25309
25349
  }
25310
- const h2 = "1.45.2", bP = "1.62.0", gP = {
25350
+ const h2 = "1.45.2", wP = "1.62.0", vP = {
25311
25351
  "-32700": "ParseError",
25312
25352
  "-32701": "OversizedRequest",
25313
25353
  "-32702": "OversizedResponse",
@@ -25329,17 +25369,17 @@ class p2 extends Error {
25329
25369
  }
25330
25370
  class y2 extends p2 {
25331
25371
  constructor(e, r) {
25332
- super(e), this.code = r, this.type = gP[r] ?? "ServerError";
25372
+ super(e), this.code = r, this.type = vP[r] ?? "ServerError";
25333
25373
  }
25334
25374
  }
25335
- class wP extends p2 {
25375
+ class EP extends p2 {
25336
25376
  constructor(e, r, n) {
25337
25377
  super(e), this.status = r, this.statusText = n;
25338
25378
  }
25339
25379
  }
25340
25380
  var m2 = (t) => {
25341
25381
  throw TypeError(t);
25342
- }, R0 = (t, e, r) => e.has(t) || m2("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) ? m2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Wi = (t, e, r, n) => (R0(t, e, "write to private field"), e.set(t, r), r), b2 = (t, e, r) => (R0(t, e, "access private method"), r), vP = (t, e, r, n) => ({
25382
+ }, R0 = (t, e, r) => e.has(t) || m2("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) ? m2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Wi = (t, e, r, n) => (R0(t, e, "write to private field"), e.set(t, r), r), b2 = (t, e, r) => (R0(t, e, "access private method"), r), AP = (t, e, r, n) => ({
25343
25383
  set _(s) {
25344
25384
  Wi(t, e, s);
25345
25385
  },
@@ -25347,22 +25387,22 @@ var m2 = (t) => {
25347
25387
  return ze(t, e, n);
25348
25388
  }
25349
25389
  }), os, Da, On, Ls, Eo, Ds, Zc, g2, w2;
25350
- function EP(t) {
25390
+ function SP(t) {
25351
25391
  const e = new URL(t);
25352
25392
  return e.protocol = e.protocol.replace("http", "ws"), e.toString();
25353
25393
  }
25354
- const AP = {
25394
+ const xP = {
25355
25395
  // We fudge the typing because we also check for undefined in the constructor:
25356
25396
  WebSocketConstructor: typeof WebSocket < "u" ? WebSocket : void 0,
25357
25397
  callTimeout: 3e4,
25358
25398
  reconnectTimeout: 3e3,
25359
25399
  maxReconnects: 5
25360
25400
  };
25361
- class SP {
25401
+ class kP {
25362
25402
  constructor(e, r = {}) {
25363
- if (Us(this, Zc), Us(this, os, 0), Us(this, Da, 0), Us(this, On, null), Us(this, Ls, null), Us(this, Eo, /* @__PURE__ */ new Set()), Us(this, Ds, /* @__PURE__ */ new Map()), this.endpoint = e, this.options = { ...AP, ...r }, !this.options.WebSocketConstructor)
25403
+ if (Us(this, Zc), Us(this, os, 0), Us(this, Da, 0), Us(this, On, null), Us(this, Ls, null), Us(this, Eo, /* @__PURE__ */ new Set()), Us(this, Ds, /* @__PURE__ */ new Map()), this.endpoint = e, this.options = { ...xP, ...r }, !this.options.WebSocketConstructor)
25364
25404
  throw new Error("Missing WebSocket constructor");
25365
- this.endpoint.startsWith("http") && (this.endpoint = EP(this.endpoint));
25405
+ this.endpoint.startsWith("http") && (this.endpoint = SP(this.endpoint));
25366
25406
  }
25367
25407
  async makeRequest(e, r, n) {
25368
25408
  const s = await b2(this, Zc, g2).call(this);
@@ -25383,7 +25423,7 @@ class SP {
25383
25423
  });
25384
25424
  }
25385
25425
  async subscribe(e) {
25386
- const r = new xP(e);
25426
+ const r = new _P(e);
25387
25427
  return ze(this, Eo).add(r), await r.subscribe(this), () => r.unsubscribe(this);
25388
25428
  }
25389
25429
  }
@@ -25400,7 +25440,7 @@ g2 = function() {
25400
25440
  (e = ze(this, On)) == null || e.close(), Wi(this, On, new this.options.WebSocketConstructor(this.endpoint)), ze(this, On).addEventListener("open", () => {
25401
25441
  Wi(this, Da, 0), t(ze(this, On));
25402
25442
  }), ze(this, On).addEventListener("close", () => {
25403
- vP(this, Da)._++, ze(this, Da) <= this.options.maxReconnects && setTimeout(() => {
25443
+ AP(this, Da)._++, ze(this, Da) <= this.options.maxReconnects && setTimeout(() => {
25404
25444
  b2(this, Zc, w2).call(this);
25405
25445
  }, this.options.reconnectTimeout);
25406
25446
  }), ze(this, On).addEventListener("message", ({ data: r }) => {
@@ -25429,7 +25469,7 @@ w2 = async function() {
25429
25469
  [...ze(this, Eo)].map((e) => e.subscribe(this))
25430
25470
  );
25431
25471
  };
25432
- class xP {
25472
+ class _P {
25433
25473
  constructor(e) {
25434
25474
  this.subscriptionId = null, this.subscribed = !1, this.input = e;
25435
25475
  }
@@ -25452,8 +25492,8 @@ class xP {
25452
25492
  }
25453
25493
  var v2 = (t) => {
25454
25494
  throw TypeError(t);
25455
- }, N0 = (t, e, r) => e.has(t) || v2("Cannot " + r), vr = (t, e, r) => (N0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Ac = (t, e, r) => e.has(t) ? v2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Zd = (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), Ca, Ir, za, Qd, E2;
25456
- class _P {
25495
+ }, N0 = (t, e, r) => e.has(t) || v2("Cannot " + r), vr = (t, e, r) => (N0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Ac = (t, e, r) => e.has(t) ? v2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Zd = (t, e, r, n) => (N0(t, e, "write to private field"), e.set(t, r), r), TP = (t, e, r) => (N0(t, e, "access private method"), r), Ca, Ir, za, Qd, E2;
25496
+ class IP {
25457
25497
  constructor(e) {
25458
25498
  Ac(this, Qd), Ac(this, Ca, 0), Ac(this, Ir), Ac(this, za), Zd(this, Ir, e);
25459
25499
  }
@@ -25475,7 +25515,7 @@ class _P {
25475
25515
  "Content-Type": "application/json",
25476
25516
  "Client-Sdk-Type": "typescript",
25477
25517
  "Client-Sdk-Version": h2,
25478
- "Client-Target-Api-Version": bP,
25518
+ "Client-Target-Api-Version": wP,
25479
25519
  "Client-Request-Method": e.method,
25480
25520
  ...(i = vr(this, Ir).rpc) == null ? void 0 : i.headers
25481
25521
  },
@@ -25487,7 +25527,7 @@ class _P {
25487
25527
  })
25488
25528
  });
25489
25529
  if (!r.ok)
25490
- throw new wP(
25530
+ throw new EP(
25491
25531
  `Unexpected status code: ${r.status}`,
25492
25532
  r.status,
25493
25533
  r.statusText
@@ -25498,7 +25538,7 @@ class _P {
25498
25538
  return n.result;
25499
25539
  }
25500
25540
  async subscribe(e) {
25501
- const r = await kP(this, Qd, E2).call(this).subscribe(e);
25541
+ const r = await TP(this, Qd, E2).call(this).subscribe(e);
25502
25542
  return e.signal && (e.signal.throwIfAborted(), e.signal.addEventListener("abort", () => {
25503
25543
  r();
25504
25544
  })), async () => !!await r();
@@ -25516,7 +25556,7 @@ E2 = function() {
25516
25556
  throw new Error(
25517
25557
  "The current environment does not support WebSocket, you can provide a WebSocketConstructor in the options for SuiHTTPTransport."
25518
25558
  );
25519
- Zd(this, za, new SP(
25559
+ Zd(this, za, new kP(
25520
25560
  ((t = vr(this, Ir).websocket) == null ? void 0 : t.url) ?? vr(this, Ir).url,
25521
25561
  {
25522
25562
  WebSocketConstructor: e,
@@ -25541,7 +25581,7 @@ function Cm(t) {
25541
25581
  }
25542
25582
  }
25543
25583
  /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
25544
- function TP(t) {
25584
+ function PP(t) {
25545
25585
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
25546
25586
  }
25547
25587
  function A2(t, e) {
@@ -25564,17 +25604,17 @@ function x2(t, e) {
25564
25604
  if (!A2(!0, e))
25565
25605
  throw new Error(`${t}: array of strings expected`);
25566
25606
  }
25567
- function IP(t, e) {
25607
+ function OP(t, e) {
25568
25608
  if (!A2(!1, e))
25569
25609
  throw new Error(`${t}: array of numbers expected`);
25570
25610
  }
25571
25611
  // @__NO_SIDE_EFFECTS__
25572
- function PP(...t) {
25612
+ function BP(...t) {
25573
25613
  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);
25574
25614
  return { encode: n, decode: s };
25575
25615
  }
25576
25616
  // @__NO_SIDE_EFFECTS__
25577
- function OP(t) {
25617
+ function CP(t) {
25578
25618
  const e = typeof t == "string" ? t.split("") : t, r = e.length;
25579
25619
  x2("alphabet", e);
25580
25620
  const n = new Map(e.map((s, i) => [s, i]));
@@ -25594,7 +25634,7 @@ function OP(t) {
25594
25634
  };
25595
25635
  }
25596
25636
  // @__NO_SIDE_EFFECTS__
25597
- function BP(t = "") {
25637
+ function RP(t = "") {
25598
25638
  return eh("join", t), {
25599
25639
  encode: (e) => (x2("join.decode", e), e.join(t)),
25600
25640
  decode: (e) => (eh("join.decode", e), e.split(t))
@@ -25636,19 +25676,19 @@ function Rm(t, e, r) {
25636
25676
  return s.reverse();
25637
25677
  }
25638
25678
  // @__NO_SIDE_EFFECTS__
25639
- function CP(t) {
25679
+ function NP(t) {
25640
25680
  S2(t);
25641
25681
  const e = 2 ** 8;
25642
25682
  return {
25643
25683
  encode: (r) => {
25644
- if (!TP(r))
25684
+ if (!PP(r))
25645
25685
  throw new Error("radix.encode input should be Uint8Array");
25646
25686
  return Rm(Array.from(r), e, t);
25647
25687
  },
25648
- decode: (r) => (IP("radix.decode", r), Uint8Array.from(Rm(r, t, e)))
25688
+ decode: (r) => (OP("radix.decode", r), Uint8Array.from(Rm(r, t, e)))
25649
25689
  };
25650
25690
  }
25651
- const RP = /* @__NO_SIDE_EFFECTS__ */ (t) => /* @__PURE__ */ PP(/* @__PURE__ */ CP(58), /* @__PURE__ */ OP(t), /* @__PURE__ */ BP("")), k2 = /* @__PURE__ */ RP("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), Ju = (t) => k2.encode(t), Ao = (t) => k2.decode(t);
25691
+ const UP = /* @__NO_SIDE_EFFECTS__ */ (t) => /* @__PURE__ */ BP(/* @__PURE__ */ NP(58), /* @__PURE__ */ CP(t), /* @__PURE__ */ RP("")), k2 = /* @__PURE__ */ UP("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"), Ju = (t) => k2.encode(t), Ao = (t) => k2.decode(t);
25652
25692
  function or(t) {
25653
25693
  return Uint8Array.from(atob(t), (e) => e.charCodeAt(0));
25654
25694
  }
@@ -25682,7 +25722,7 @@ class T2 {
25682
25722
  throw new TypeError(
25683
25723
  `DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: ${e}.`
25684
25724
  );
25685
- 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);
25725
+ this._batchLoadFn = e, this._maxBatchSize = jP(r), this._batchScheduleFn = HP(r), this._cacheKeyFn = LP(r), this._cacheMap = DP(r), this._batch = null, this.name = zP(r);
25686
25726
  }
25687
25727
  /**
25688
25728
  * Loads a key, returning a `Promise` for the value represented by that key.
@@ -25692,7 +25732,7 @@ class T2 {
25692
25732
  throw new TypeError(
25693
25733
  `The loader.load() function must be called with a value, but got: ${String(e)}.`
25694
25734
  );
25695
- const r = UP(this), n = this._cacheMap;
25735
+ const r = FP(this), n = this._cacheMap;
25696
25736
  let s;
25697
25737
  if (n) {
25698
25738
  s = this._cacheKeyFn(e);
@@ -25782,7 +25822,7 @@ class T2 {
25782
25822
  return this;
25783
25823
  }
25784
25824
  }
25785
- const NP = (
25825
+ const MP = (
25786
25826
  /** @ts-ignore */
25787
25827
  typeof process == "object" && typeof process.nextTick == "function" ? function(t) {
25788
25828
  ql || (ql = Promise.resolve()), ql.then(() => {
@@ -25798,16 +25838,16 @@ const NP = (
25798
25838
  )
25799
25839
  );
25800
25840
  let ql;
25801
- function UP(t) {
25841
+ function FP(t) {
25802
25842
  const e = t._batch;
25803
25843
  if (e !== null && !e.hasDispatched && e.keys.length < t._maxBatchSize)
25804
25844
  return e;
25805
25845
  const r = { hasDispatched: !1, keys: [], callbacks: [] };
25806
25846
  return t._batch = r, t._batchScheduleFn(() => {
25807
- MP(t, r);
25847
+ $P(t, r);
25808
25848
  }), r;
25809
25849
  }
25810
- function MP(t, e) {
25850
+ function $P(t, e) {
25811
25851
  if (e.hasDispatched = !0, e.keys.length === 0) {
25812
25852
  rh(e);
25813
25853
  return;
@@ -25866,7 +25906,7 @@ function rh(t) {
25866
25906
  for (let e = 0; e < t.cacheHits.length; e++)
25867
25907
  t.cacheHits[e]();
25868
25908
  }
25869
- function FP(t) {
25909
+ function jP(t) {
25870
25910
  if (!(!t || t.batch !== !1))
25871
25911
  return 1;
25872
25912
  const r = t && t.maxBatchSize;
@@ -25876,15 +25916,15 @@ function FP(t) {
25876
25916
  throw new TypeError(`maxBatchSize must be a positive number: ${r}`);
25877
25917
  return r;
25878
25918
  }
25879
- function $P(t) {
25919
+ function HP(t) {
25880
25920
  const e = t && t.batchScheduleFn;
25881
25921
  if (e === void 0)
25882
- return NP;
25922
+ return MP;
25883
25923
  if (typeof e != "function")
25884
25924
  throw new TypeError(`batchScheduleFn must be a function: ${e}`);
25885
25925
  return e;
25886
25926
  }
25887
- function jP(t) {
25927
+ function LP(t) {
25888
25928
  const e = t && t.cacheKeyFn;
25889
25929
  if (e === void 0)
25890
25930
  return (r) => r;
@@ -25892,7 +25932,7 @@ function jP(t) {
25892
25932
  throw new TypeError(`cacheKeyFn must be a function: ${e}`);
25893
25933
  return e;
25894
25934
  }
25895
- function HP(t) {
25935
+ function DP(t) {
25896
25936
  if (!(!t || t.cache !== !1))
25897
25937
  return null;
25898
25938
  const r = t && t.cacheMap;
@@ -25907,7 +25947,7 @@ function HP(t) {
25907
25947
  }
25908
25948
  return r;
25909
25949
  }
25910
- function LP(t) {
25950
+ function zP(t) {
25911
25951
  return t && t.name ? t.name : null;
25912
25952
  }
25913
25953
  function I2(t) {
@@ -25923,7 +25963,7 @@ function Qc(t) {
25923
25963
  r[n] = Number(e & 0x7fn), e >>= 7n, e > 0n && (r[n] |= 128), n += 1;
25924
25964
  return r;
25925
25965
  }
25926
- function DP(t) {
25966
+ function VP(t) {
25927
25967
  let e = 0n, r = 0n, n = 0;
25928
25968
  for (; ; ) {
25929
25969
  if (n >= t.length)
@@ -25940,7 +25980,7 @@ function DP(t) {
25940
25980
  length: n
25941
25981
  };
25942
25982
  }
25943
- class zP {
25983
+ class GP {
25944
25984
  /**
25945
25985
  * @param {Uint8Array} data Data to use as a buffer.
25946
25986
  */
@@ -26017,7 +26057,7 @@ class zP {
26017
26057
  * @returns {Number} The ULEB value.
26018
26058
  */
26019
26059
  readULEB() {
26020
- const e = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, e), { value: n, length: s } = DP(r);
26060
+ const e = this.bytePosition + this.dataView.byteOffset, r = new Uint8Array(this.dataView.buffer, e), { value: n, length: s } = VP(r);
26021
26061
  return this.shift(s), n;
26022
26062
  }
26023
26063
  /**
@@ -26033,7 +26073,7 @@ class zP {
26033
26073
  return n;
26034
26074
  }
26035
26075
  }
26036
- function VP(t, e) {
26076
+ function qP(t, e) {
26037
26077
  switch (e) {
26038
26078
  case "base58":
26039
26079
  return Ju(t);
@@ -26058,7 +26098,7 @@ function P2(t, e = ["<", ">"]) {
26058
26098
  }
26059
26099
  return s.push(i.trim()), s;
26060
26100
  }
26061
- class GP {
26101
+ class WP {
26062
26102
  constructor({
26063
26103
  initialSize: e = 1024,
26064
26104
  maxSize: r = 1 / 0,
@@ -26194,7 +26234,7 @@ class GP {
26194
26234
  * @param encoding Encoding to use: 'base64' or 'hex'
26195
26235
  */
26196
26236
  toString(e) {
26197
- return VP(this.toBytes(), e);
26237
+ return qP(this.toBytes(), e);
26198
26238
  }
26199
26239
  }
26200
26240
  function Kl(t, e) {
@@ -26207,10 +26247,10 @@ function Kl(t, e) {
26207
26247
  var O2 = (t) => {
26208
26248
  throw TypeError(t);
26209
26249
  }, B2 = (t, e, r) => e.has(t) || O2("Cannot " + r), Pr = (t, e, r) => (B2(t, e, "read from private field"), r ? r.call(t) : e.get(t)), eu = (t, e, r) => e.has(t) ? O2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), tu = (t, e, r, n) => (B2(t, e, "write to private field"), e.set(t, r), r), Ni, Ra, Uc, cs;
26210
- const qP = class C2 {
26250
+ const KP = class C2 {
26211
26251
  constructor(e) {
26212
26252
  eu(this, Ni), eu(this, Ra), this.name = e.name, this.read = e.read, this.serializedSize = e.serializedSize ?? (() => null), tu(this, Ni, e.write), tu(this, Ra, e.serialize ?? ((r, n) => {
26213
- const s = new GP({
26253
+ const s = new WP({
26214
26254
  initialSize: this.serializedSize(r) ?? void 0,
26215
26255
  ...n
26216
26256
  });
@@ -26222,10 +26262,10 @@ const qP = class C2 {
26222
26262
  this.validate(e), Pr(this, Ni).call(this, e, r);
26223
26263
  }
26224
26264
  serialize(e, r) {
26225
- return this.validate(e), new WP(this, Pr(this, Ra).call(this, e, r));
26265
+ return this.validate(e), new XP(this, Pr(this, Ra).call(this, e, r));
26226
26266
  }
26227
26267
  parse(e) {
26228
- const r = new zP(e);
26268
+ const r = new GP(e);
26229
26269
  return this.read(r);
26230
26270
  }
26231
26271
  fromHex(e) {
@@ -26257,12 +26297,12 @@ const qP = class C2 {
26257
26297
  };
26258
26298
  Ni = /* @__PURE__ */ new WeakMap();
26259
26299
  Ra = /* @__PURE__ */ new WeakMap();
26260
- let yn = qP;
26300
+ let yn = KP;
26261
26301
  const R2 = Symbol.for("@mysten/serialized-bcs");
26262
26302
  function U0(t) {
26263
26303
  return !!t && typeof t == "object" && t[R2] === !0;
26264
26304
  }
26265
- class WP {
26305
+ class XP {
26266
26306
  constructor(e, r) {
26267
26307
  eu(this, Uc), eu(this, cs), tu(this, Uc, e), tu(this, cs, r);
26268
26308
  }
@@ -26337,7 +26377,7 @@ function Yl({
26337
26377
  }
26338
26378
  });
26339
26379
  }
26340
- function KP({
26380
+ function YP({
26341
26381
  serialize: t,
26342
26382
  ...e
26343
26383
  }) {
@@ -26351,7 +26391,7 @@ function KP({
26351
26391
  });
26352
26392
  return r;
26353
26393
  }
26354
- function XP({
26394
+ function JP({
26355
26395
  toBytes: t,
26356
26396
  fromBytes: e,
26357
26397
  ...r
@@ -26380,7 +26420,7 @@ function XP({
26380
26420
  }
26381
26421
  });
26382
26422
  }
26383
- function YP(t) {
26423
+ function ZP(t) {
26384
26424
  let e = null;
26385
26425
  function r() {
26386
26426
  return e || (e = t()), e;
@@ -26393,7 +26433,7 @@ function YP(t) {
26393
26433
  serialize: (n, s) => r().serialize(n, s).toBytes()
26394
26434
  });
26395
26435
  }
26396
- class JP extends yn {
26436
+ class QP extends yn {
26397
26437
  constructor({ name: e, fields: r, ...n }) {
26398
26438
  const s = Object.entries(r);
26399
26439
  super({
@@ -26427,7 +26467,7 @@ class JP extends yn {
26427
26467
  });
26428
26468
  }
26429
26469
  }
26430
- class ZP extends yn {
26470
+ class e4 extends yn {
26431
26471
  constructor({ fields: e, ...r }) {
26432
26472
  const n = Object.entries(e);
26433
26473
  super({
@@ -26472,7 +26512,7 @@ class ZP extends yn {
26472
26512
  });
26473
26513
  }
26474
26514
  }
26475
- class QP extends yn {
26515
+ class t4 extends yn {
26476
26516
  constructor({ fields: e, name: r, ...n }) {
26477
26517
  super({
26478
26518
  name: r ?? `(${e.map((s) => s.name).join(", ")})`,
@@ -26507,7 +26547,7 @@ class QP extends yn {
26507
26547
  });
26508
26548
  }
26509
26549
  }
26510
- function e4(t, e, r) {
26550
+ function r4(t, e, r) {
26511
26551
  return new yn({
26512
26552
  read: (n) => {
26513
26553
  const s = new Array(t);
@@ -26530,7 +26570,7 @@ function e4(t, e, r) {
26530
26570
  }
26531
26571
  });
26532
26572
  }
26533
- function t4(t) {
26573
+ function n4(t) {
26534
26574
  return P.enum(`Option<${t.name}>`, {
26535
26575
  None: null,
26536
26576
  Some: t
@@ -26539,7 +26579,7 @@ function t4(t) {
26539
26579
  output: (e) => e.$kind === "Some" ? e.Some : null
26540
26580
  });
26541
26581
  }
26542
- function r4(t, e) {
26582
+ function s4(t, e) {
26543
26583
  return new yn({
26544
26584
  read: (r) => {
26545
26585
  const n = r.readULEB(), s = new Array(n);
@@ -26561,7 +26601,7 @@ function r4(t, e) {
26561
26601
  }
26562
26602
  });
26563
26603
  }
26564
- function n4(t, e) {
26604
+ function i4(t, e) {
26565
26605
  return P.vector(P.tuple([t, e])).transform({
26566
26606
  name: `Map<${t.name}, ${e.name}>`,
26567
26607
  input: (r) => [...r.entries()],
@@ -26689,7 +26729,7 @@ const P = {
26689
26729
  *
26690
26730
  */
26691
26731
  uleb128(t) {
26692
- return KP({
26732
+ return YP({
26693
26733
  read: (e) => e.readULEB(),
26694
26734
  serialize: (e) => Uint8Array.from(Qc(e)),
26695
26735
  ...t,
@@ -26755,7 +26795,7 @@ const P = {
26755
26795
  * bcs.string().serialize('a').toBytes() // Uint8Array [ 1, 97 ]
26756
26796
  */
26757
26797
  string(t) {
26758
- return XP({
26798
+ return JP({
26759
26799
  toBytes: (e) => new TextEncoder().encode(e),
26760
26800
  fromBytes: (e) => new TextDecoder().decode(e),
26761
26801
  ...t,
@@ -26769,7 +26809,7 @@ const P = {
26769
26809
  * @example
26770
26810
  * bcs.fixedArray(3, bcs.u8()).serialize([1, 2, 3]).toBytes() // Uint8Array [ 1, 2, 3 ]
26771
26811
  */
26772
- fixedArray: e4,
26812
+ fixedArray: r4,
26773
26813
  /**
26774
26814
  * Creates a BcsType representing an optional value
26775
26815
  * @param type The BcsType of the optional value
@@ -26777,7 +26817,7 @@ const P = {
26777
26817
  * bcs.option(bcs.u8()).serialize(null).toBytes() // Uint8Array [ 0 ]
26778
26818
  * bcs.option(bcs.u8()).serialize(1).toBytes() // Uint8Array [ 1, 1 ]
26779
26819
  */
26780
- option: t4,
26820
+ option: n4,
26781
26821
  /**
26782
26822
  * Creates a BcsType representing a variable length vector of a given type
26783
26823
  * @param type The BcsType of each element in the vector
@@ -26785,7 +26825,7 @@ const P = {
26785
26825
  * @example
26786
26826
  * bcs.vector(bcs.u8()).toBytes([1, 2, 3]) // Uint8Array [ 3, 1, 2, 3 ]
26787
26827
  */
26788
- vector: r4,
26828
+ vector: s4,
26789
26829
  /**
26790
26830
  * Creates a BcsType representing a tuple of a given set of types
26791
26831
  * @param types The BcsTypes for each element in the tuple
@@ -26795,7 +26835,7 @@ const P = {
26795
26835
  * tuple.serialize([1, 'a', true]).toBytes() // Uint8Array [ 1, 1, 97, 1 ]
26796
26836
  */
26797
26837
  tuple(t, e) {
26798
- return new QP({
26838
+ return new t4({
26799
26839
  fields: t,
26800
26840
  ...e
26801
26841
  });
@@ -26813,7 +26853,7 @@ const P = {
26813
26853
  * struct.serialize({ a: 1, b: 'a' }).toBytes() // Uint8Array [ 1, 1, 97 ]
26814
26854
  */
26815
26855
  struct(t, e, r) {
26816
- return new JP({
26856
+ return new QP({
26817
26857
  name: t,
26818
26858
  fields: e,
26819
26859
  ...r
@@ -26836,7 +26876,7 @@ const P = {
26836
26876
  * enum.serialize({ C: true }).toBytes() // Uint8Array [ 2 ]
26837
26877
  */
26838
26878
  enum(t, e, r) {
26839
- return new ZP({
26879
+ return new e4({
26840
26880
  name: t,
26841
26881
  fields: e,
26842
26882
  ...r
@@ -26850,19 +26890,19 @@ const P = {
26850
26890
  * const map = bcs.map(bcs.u8(), bcs.string())
26851
26891
  * map.serialize(new Map([[2, 'a']])).toBytes() // Uint8Array [ 1, 2, 1, 97 ]
26852
26892
  */
26853
- map: n4,
26893
+ map: i4,
26854
26894
  /**
26855
26895
  * Creates a BcsType that wraps another BcsType which is lazily evaluated. This is useful for creating recursive types.
26856
26896
  * @param cb A callback that returns the BcsType
26857
26897
  */
26858
26898
  lazy(t) {
26859
- return YP(t);
26899
+ return ZP(t);
26860
26900
  }
26861
26901
  };
26862
26902
  var N2 = (t) => {
26863
26903
  throw TypeError(t);
26864
26904
  }, U2 = (t, e, r) => e.has(t) || N2("Cannot " + r), xt = (t, e, r) => (U2(t, e, "read from private field"), e.get(t)), Nm = (t, e, r) => e.has(t) ? N2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Um = (t, e, r, n) => (U2(t, e, "write to private field"), e.set(t, r), r), Fs, Ft;
26865
- const s4 = class M2 {
26905
+ const a4 = class M2 {
26866
26906
  constructor({ prefix: e, cache: r } = {}) {
26867
26907
  Nm(this, Fs), Nm(this, Ft), Um(this, Fs, e ?? []), Um(this, Ft, r ?? /* @__PURE__ */ new Map());
26868
26908
  }
@@ -26900,12 +26940,12 @@ const s4 = class M2 {
26900
26940
  };
26901
26941
  Fs = /* @__PURE__ */ new WeakMap();
26902
26942
  Ft = /* @__PURE__ */ new WeakMap();
26903
- let i4 = s4;
26943
+ let o4 = a4;
26904
26944
  class F2 {
26905
26945
  constructor({
26906
26946
  network: e,
26907
26947
  base: r,
26908
- cache: n = (r == null ? void 0 : r.cache) ?? new i4()
26948
+ cache: n = (r == null ? void 0 : r.cache) ?? new o4()
26909
26949
  }) {
26910
26950
  this.network = e, this.base = r ?? this, this.cache = n;
26911
26951
  }
@@ -26930,17 +26970,17 @@ function $2(t) {
26930
26970
  }
26931
26971
  let Jl;
26932
26972
  // @__NO_SIDE_EFFECTS__
26933
- function a4(t) {
26973
+ function c4(t) {
26934
26974
  return Jl == null ? void 0 : Jl.get(t);
26935
26975
  }
26936
26976
  let Zl;
26937
26977
  // @__NO_SIDE_EFFECTS__
26938
- function o4(t) {
26978
+ function u4(t) {
26939
26979
  return Zl == null ? void 0 : Zl.get(t);
26940
26980
  }
26941
26981
  let Ql;
26942
26982
  // @__NO_SIDE_EFFECTS__
26943
- function c4(t, e) {
26983
+ function f4(t, e) {
26944
26984
  var r;
26945
26985
  return (r = Ql == null ? void 0 : Ql.get(t)) == null ? void 0 : r.get(e);
26946
26986
  }
@@ -26964,7 +27004,7 @@ function Zt(t, e, r, n, s) {
26964
27004
  lang: n.lang,
26965
27005
  abortEarly: n.abortEarly,
26966
27006
  abortPipeEarly: n.abortPipeEarly
26967
- }, 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);
27007
+ }, u = t.kind === "schema", f = (s == null ? void 0 : s.message) ?? t.message ?? /* @__PURE__ */ f4(t.reference, c.lang) ?? (u ? /* @__PURE__ */ u4(c.lang) : null) ?? n.message ?? /* @__PURE__ */ c4(c.lang);
26968
27008
  f !== void 0 && (c.message = typeof f == "function" ? f(c) : f), u && (r.typed = !1), r.issues ? r.issues.push(c) : r.issues = [c];
26969
27009
  }
26970
27010
  // @__NO_SIDE_EFFECTS__
@@ -26978,15 +27018,15 @@ function Bt(t) {
26978
27018
  };
26979
27019
  }
26980
27020
  // @__NO_SIDE_EFFECTS__
26981
- function u4(t, e) {
27021
+ function l4(t, e) {
26982
27022
  return Object.hasOwn(t, e) && e !== "__proto__" && e !== "prototype" && e !== "constructor";
26983
27023
  }
26984
27024
  // @__NO_SIDE_EFFECTS__
26985
- function f4(t, e) {
27025
+ function d4(t, e) {
26986
27026
  const r = [...new Set(t)];
26987
27027
  return r.length > 1 ? `(${r.join(` ${e} `)})` : r[0] ?? "never";
26988
27028
  }
26989
- var l4 = class extends Error {
27029
+ var h4 = class extends Error {
26990
27030
  /**
26991
27031
  * Creates a Valibot error with useful information.
26992
27032
  *
@@ -27040,7 +27080,7 @@ function Qu(t) {
27040
27080
  };
27041
27081
  }
27042
27082
  // @__NO_SIDE_EFFECTS__
27043
- function d4(t, e, r) {
27083
+ function p4(t, e, r) {
27044
27084
  return typeof t.fallback == "function" ? t.fallback(e, r) : t.fallback;
27045
27085
  }
27046
27086
  // @__NO_SIDE_EFFECTS__
@@ -27253,7 +27293,7 @@ function he(t, e) {
27253
27293
  }
27254
27294
  }
27255
27295
  u.typed || (r.typed = !1), r.value[a] = u.value;
27256
- } else if (o.fallback !== void 0) r.value[a] = /* @__PURE__ */ d4(o);
27296
+ } else if (o.fallback !== void 0) r.value[a] = /* @__PURE__ */ p4(o);
27257
27297
  else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (Zt(this, "key", r, n, {
27258
27298
  input: void 0,
27259
27299
  expected: `"${a}"`,
@@ -27309,7 +27349,7 @@ function xo(t, e, r) {
27309
27349
  const i = n.value;
27310
27350
  if (i && typeof i == "object") {
27311
27351
  n.typed = !0, n.value = {};
27312
- for (const c in i) if (/* @__PURE__ */ u4(i, c)) {
27352
+ for (const c in i) if (/* @__PURE__ */ l4(i, c)) {
27313
27353
  const u = i[c], f = this.key["~run"]({ value: c }, s);
27314
27354
  if (f.issues) {
27315
27355
  const p = {
@@ -27420,7 +27460,7 @@ function mn(t, e) {
27420
27460
  kind: "schema",
27421
27461
  type: "union",
27422
27462
  reference: mn,
27423
- expects: /* @__PURE__ */ f4(t.map((r) => r.expects), "|"),
27463
+ expects: /* @__PURE__ */ d4(t.map((r) => r.expects), "|"),
27424
27464
  async: !1,
27425
27465
  options: t,
27426
27466
  message: e,
@@ -27468,7 +27508,7 @@ function Zo() {
27468
27508
  }
27469
27509
  function qe(t, e, r) {
27470
27510
  const n = t["~run"]({ value: e }, /* @__PURE__ */ $2(r));
27471
- if (n.issues) throw new l4(n.issues);
27511
+ if (n.issues) throw new h4(n.issues);
27472
27512
  return n.value;
27473
27513
  }
27474
27514
  // @__NO_SIDE_EFFECTS__
@@ -27491,11 +27531,11 @@ function vt(...t) {
27491
27531
  }
27492
27532
  };
27493
27533
  }
27494
- const L2 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, D2 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i, h4 = 235;
27495
- function p4(t) {
27496
- return t.length > h4 ? !1 : t.includes("@") ? L2.test(t) : D2.test(t);
27534
+ const L2 = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i, D2 = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i, y4 = 235;
27535
+ function m4(t) {
27536
+ return t.length > y4 ? !1 : t.includes("@") ? L2.test(t) : D2.test(t);
27497
27537
  }
27498
- function y4(t, e = "at") {
27538
+ function b4(t, e = "at") {
27499
27539
  const r = t.toLowerCase();
27500
27540
  let n;
27501
27541
  if (r.includes("@")) {
@@ -27510,37 +27550,37 @@ function y4(t, e = "at") {
27510
27550
  }
27511
27551
  return e === "dot" ? `${n.join(".")}.sui` : `${n.slice(0, -1).join(".")}@${n[n.length - 1]}`;
27512
27552
  }
27513
- const m4 = /^([a-z0-9]+(?:-[a-z0-9]+)*)$/, b4 = /^\d+$/, g4 = 64, z2 = "/", rr = (t) => {
27553
+ const g4 = /^([a-z0-9]+(?:-[a-z0-9]+)*)$/, w4 = /^\d+$/, v4 = 64, z2 = "/", rr = (t) => {
27514
27554
  const e = t.split(z2);
27515
27555
  if (e.length < 2 || e.length > 3) return !1;
27516
27556
  const [r, n, s] = e;
27517
- return s !== void 0 && !b4.test(s) || !p4(r) ? !1 : m4.test(n) && n.length < g4;
27518
- }, w4 = (t) => {
27557
+ return s !== void 0 && !w4.test(s) || !m4(r) ? !1 : g4.test(n) && n.length < v4;
27558
+ }, E4 = (t) => {
27519
27559
  const e = t.split(/::|<|>|,/);
27520
27560
  for (const r of e)
27521
27561
  if (r.includes(z2) && !rr(r)) return !1;
27522
27562
  return !0;
27523
- }, v4 = 32;
27563
+ }, A4 = 32;
27524
27564
  function Fm(t) {
27525
27565
  try {
27526
- return Ao(t).length === v4;
27566
+ return Ao(t).length === A4;
27527
27567
  } catch {
27528
27568
  return !1;
27529
27569
  }
27530
27570
  }
27531
27571
  const tf = 32;
27532
27572
  function Or(t) {
27533
- return A4(t) && S4(t) === tf;
27573
+ return x4(t) && k4(t) === tf;
27534
27574
  }
27535
27575
  function Sc(t) {
27536
27576
  return Or(t);
27537
27577
  }
27538
- function E4(t) {
27578
+ function S4(t) {
27539
27579
  return t.includes("::") ? di(t) : t;
27540
27580
  }
27541
27581
  function di(t) {
27542
27582
  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("<") ? P2(s.slice(s.indexOf("<") + 1, s.lastIndexOf(">"))).map(
27543
- (o) => E4(o.trim())
27583
+ (o) => S4(o.trim())
27544
27584
  ) : [];
27545
27585
  return {
27546
27586
  address: n ? e : ve(e),
@@ -27562,10 +27602,10 @@ function ve(t, e = !1) {
27562
27602
  function on(t, e = !1) {
27563
27603
  return ve(t, e);
27564
27604
  }
27565
- function A4(t) {
27605
+ function x4(t) {
27566
27606
  return /^(0x|0X)?[a-fA-F0-9]+$/.test(t) && t.length % 2 === 0;
27567
27607
  }
27568
- function S4(t) {
27608
+ function k4(t) {
27569
27609
  return /^(0x|0X)/.test(t) ? (t.length - 2) / 2 : t.length / 2;
27570
27610
  }
27571
27611
  function Ei(t) {
@@ -27610,7 +27650,7 @@ const ya = /* @__PURE__ */ vt(
27610
27650
  $kind: Object.keys(t)[0]
27611
27651
  }))
27612
27652
  // Defined manually to add `type?: 'pure' | 'object'` to Input
27613
- ), x4 = /* @__PURE__ */ he({
27653
+ ), _4 = /* @__PURE__ */ he({
27614
27654
  budget: /* @__PURE__ */ Je(Qt),
27615
27655
  price: /* @__PURE__ */ Je(Qt),
27616
27656
  owner: /* @__PURE__ */ Je(ya),
@@ -27634,23 +27674,23 @@ const ya = /* @__PURE__ */ vt(
27634
27674
  })
27635
27675
  }),
27636
27676
  /* @__PURE__ */ he({ typeParameter: /* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()) })
27637
- ]), k4 = /* @__PURE__ */ he({
27677
+ ]), T4 = /* @__PURE__ */ he({
27638
27678
  ref: /* @__PURE__ */ Je(/* @__PURE__ */ mn([/* @__PURE__ */ ct("&"), /* @__PURE__ */ ct("&mut")])),
27639
27679
  body: ih
27640
- }), _4 = /* @__PURE__ */ he({
27680
+ }), I4 = /* @__PURE__ */ he({
27641
27681
  package: cr,
27642
27682
  module: /* @__PURE__ */ Ie(),
27643
27683
  function: /* @__PURE__ */ Ie(),
27644
27684
  // snake case in rust
27645
27685
  typeArguments: /* @__PURE__ */ xe(/* @__PURE__ */ Ie()),
27646
27686
  arguments: /* @__PURE__ */ xe(He),
27647
- _argumentTypes: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ xe(k4)))
27648
- }), T4 = /* @__PURE__ */ he({
27687
+ _argumentTypes: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ xe(T4)))
27688
+ }), P4 = /* @__PURE__ */ he({
27649
27689
  name: /* @__PURE__ */ Ie(),
27650
27690
  inputs: /* @__PURE__ */ xo(/* @__PURE__ */ Ie(), /* @__PURE__ */ mn([He, /* @__PURE__ */ xe(He)])),
27651
27691
  data: /* @__PURE__ */ xo(/* @__PURE__ */ Ie(), /* @__PURE__ */ Zo())
27652
- }), I4 = Ei({
27653
- MoveCall: _4,
27692
+ }), O4 = Ei({
27693
+ MoveCall: I4,
27654
27694
  TransferObjects: /* @__PURE__ */ he({
27655
27695
  objects: /* @__PURE__ */ xe(He),
27656
27696
  address: He
@@ -27677,7 +27717,7 @@ const ya = /* @__PURE__ */ vt(
27677
27717
  package: cr,
27678
27718
  ticket: He
27679
27719
  }),
27680
- $Intent: T4
27720
+ $Intent: P4
27681
27721
  }), V2 = Ei({
27682
27722
  ImmOrOwnedObject: _s,
27683
27723
  SharedObject: /* @__PURE__ */ he({
@@ -27687,7 +27727,7 @@ const ya = /* @__PURE__ */ vt(
27687
27727
  mutable: /* @__PURE__ */ pa()
27688
27728
  }),
27689
27729
  Receiving: _s
27690
- }), P4 = Ei({
27730
+ }), B4 = Ei({
27691
27731
  Object: V2,
27692
27732
  Pure: /* @__PURE__ */ he({
27693
27733
  bytes: hi
@@ -27714,9 +27754,9 @@ const ya = /* @__PURE__ */ vt(
27714
27754
  version: /* @__PURE__ */ ct(2),
27715
27755
  sender: /* @__PURE__ */ So(ya),
27716
27756
  expiration: /* @__PURE__ */ So(G2),
27717
- gasData: x4,
27718
- inputs: /* @__PURE__ */ xe(P4),
27719
- commands: /* @__PURE__ */ xe(I4)
27757
+ gasData: _4,
27758
+ inputs: /* @__PURE__ */ xe(B4),
27759
+ commands: /* @__PURE__ */ xe(O4)
27720
27760
  }), Ms = {
27721
27761
  MoveCall(t) {
27722
27762
  const [e, r = "", n = ""] = "target" in t ? t.target.split("::") : [t.package, t.module, t.function];
@@ -27821,7 +27861,7 @@ const ya = /* @__PURE__ */ vt(
27821
27861
  }
27822
27862
  };
27823
27863
  }
27824
- }, O4 = /^vector<(.+)>$/, B4 = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
27864
+ }, C4 = /^vector<(.+)>$/, R4 = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
27825
27865
  class Br {
27826
27866
  static parseFromStr(e, r = !1) {
27827
27867
  if (e === "address")
@@ -27842,12 +27882,12 @@ class Br {
27842
27882
  return { u256: null };
27843
27883
  if (e === "signer")
27844
27884
  return { signer: null };
27845
- const n = e.match(O4);
27885
+ const n = e.match(C4);
27846
27886
  if (n)
27847
27887
  return {
27848
27888
  vector: Br.parseFromStr(n[1], r)
27849
27889
  };
27850
- const s = e.match(B4);
27890
+ const s = e.match(R4);
27851
27891
  if (s)
27852
27892
  return {
27853
27893
  struct: {
@@ -27892,7 +27932,7 @@ class Br {
27892
27932
  throw new Error("Invalid TypeTag");
27893
27933
  }
27894
27934
  }
27895
- function C4(t) {
27935
+ function N4(t) {
27896
27936
  return P.u64({
27897
27937
  name: "unsafe_u64",
27898
27938
  ...t
@@ -27901,7 +27941,7 @@ function C4(t) {
27901
27941
  output: (e) => Number(e)
27902
27942
  });
27903
27943
  }
27904
- function R4(t) {
27944
+ function U4(t) {
27905
27945
  return P.enum("Option", {
27906
27946
  None: null,
27907
27947
  Some: t
@@ -28026,7 +28066,7 @@ const Le = P.bytes(tf).transform({
28026
28066
  // * so this call serves a utility function.
28027
28067
  // */
28028
28068
  MakeMoveVec: P.struct("MakeMoveVec", {
28029
- type: R4(j0).transform({
28069
+ type: U4(j0).transform({
28030
28070
  input: (t) => t === null ? {
28031
28071
  None: !0
28032
28072
  } : {
@@ -28057,7 +28097,7 @@ const Le = P.bytes(tf).transform({
28057
28097
  ConsensusCommitPrologue: null
28058
28098
  }), Q2 = P.enum("TransactionExpiration", {
28059
28099
  None: null,
28060
- Epoch: C4()
28100
+ Epoch: N4()
28061
28101
  }), e6 = P.struct("StructTag", {
28062
28102
  address: Le,
28063
28103
  module: P.string(),
@@ -28113,23 +28153,23 @@ const u6 = P.enum("CompressedSignature", {
28113
28153
  }), d6 = P.struct("MultiSigPublicKey", {
28114
28154
  pk_map: P.vector(l6),
28115
28155
  threshold: P.u16()
28116
- }), N4 = P.struct("MultiSig", {
28156
+ }), M4 = P.struct("MultiSig", {
28117
28157
  sigs: P.vector(u6),
28118
28158
  bitmap: P.u16(),
28119
28159
  multisig_pk: d6
28120
- }), U4 = P.byteVector().transform({
28160
+ }), F4 = P.byteVector().transform({
28121
28161
  input: (t) => typeof t == "string" ? or(t) : t,
28122
28162
  output: (t) => Tt(new Uint8Array(t))
28123
28163
  }), h6 = P.struct("SenderSignedTransaction", {
28124
28164
  intentMessage: c6(n6),
28125
- txSignatures: P.vector(U4)
28126
- }), M4 = P.vector(h6, {
28165
+ txSignatures: P.vector(F4)
28166
+ }), $4 = P.vector(h6, {
28127
28167
  name: "SenderSignedData"
28128
- }), F4 = P.struct("PasskeyAuthenticator", {
28168
+ }), j4 = P.struct("PasskeyAuthenticator", {
28129
28169
  authenticatorData: P.byteVector(),
28130
28170
  clientDataJson: P.string(),
28131
28171
  userSignature: P.byteVector()
28132
- }), $4 = P.enum("PackageUpgradeError", {
28172
+ }), H4 = P.enum("PackageUpgradeError", {
28133
28173
  UnableToFetchPackage: P.struct("UnableToFetchPackage", { packageId: Le }),
28134
28174
  NotAPackage: P.struct("NotAPackage", { objectId: Le }),
28135
28175
  IncompatibleUpgrade: null,
@@ -28139,15 +28179,15 @@ const u6 = P.enum("CompressedSignature", {
28139
28179
  packageId: Le,
28140
28180
  ticketId: Le
28141
28181
  })
28142
- }), j4 = P.struct("ModuleId", {
28182
+ }), L4 = P.struct("ModuleId", {
28143
28183
  address: Le,
28144
28184
  name: P.string()
28145
28185
  }), jm = P.struct("MoveLocation", {
28146
- module: j4,
28186
+ module: L4,
28147
28187
  function: P.u16(),
28148
28188
  instruction: P.u16(),
28149
28189
  functionName: P.option(P.string())
28150
- }), H4 = P.enum("CommandArgumentError", {
28190
+ }), D4 = P.enum("CommandArgumentError", {
28151
28191
  TypeMismatch: null,
28152
28192
  InvalidBCSBytes: null,
28153
28193
  InvalidUsageOfPureArg: null,
@@ -28163,10 +28203,10 @@ const u6 = P.enum("CompressedSignature", {
28163
28203
  InvalidObjectByValue: null,
28164
28204
  InvalidObjectByMutRef: null,
28165
28205
  SharedObjectOperationNotAllowed: null
28166
- }), L4 = P.enum("TypeArgumentError", {
28206
+ }), z4 = P.enum("TypeArgumentError", {
28167
28207
  TypeNotFound: null,
28168
28208
  ConstraintNotSatisfied: null
28169
- }), D4 = P.enum("ExecutionFailureStatus", {
28209
+ }), V4 = P.enum("ExecutionFailureStatus", {
28170
28210
  InsufficientGas: null,
28171
28211
  InvalidGasObject: null,
28172
28212
  InvariantViolation: null,
@@ -28194,11 +28234,11 @@ const u6 = P.enum("CompressedSignature", {
28194
28234
  NonEntryFunctionInvoked: null,
28195
28235
  CommandArgumentError: P.struct("CommandArgumentError", {
28196
28236
  argIdx: P.u16(),
28197
- kind: H4
28237
+ kind: D4
28198
28238
  }),
28199
28239
  TypeArgumentError: P.struct("TypeArgumentError", {
28200
28240
  argumentIdx: P.u16(),
28201
- kind: L4
28241
+ kind: z4
28202
28242
  }),
28203
28243
  UnusedValueWithoutDrop: P.struct("UnusedValueWithoutDrop", {
28204
28244
  resultIdx: P.u16(),
@@ -28211,7 +28251,7 @@ const u6 = P.enum("CompressedSignature", {
28211
28251
  EffectsTooLarge: P.struct("EffectsTooLarge", { currentSize: P.u64(), maxSize: P.u64() }),
28212
28252
  PublishUpgradeMissingDependency: null,
28213
28253
  PublishUpgradeDependencyDowngrade: null,
28214
- PackageUpgradeError: P.struct("PackageUpgradeError", { upgradeError: $4 }),
28254
+ PackageUpgradeError: P.struct("PackageUpgradeError", { upgradeError: H4 }),
28215
28255
  WrittenObjectsTooLarge: P.struct("WrittenObjectsTooLarge", {
28216
28256
  currentSize: P.u64(),
28217
28257
  maxSize: P.u64()
@@ -28235,7 +28275,7 @@ const u6 = P.enum("CompressedSignature", {
28235
28275
  }), p6 = P.enum("ExecutionStatus", {
28236
28276
  Success: null,
28237
28277
  Failed: P.struct("ExecutionFailed", {
28238
- error: D4,
28278
+ error: V4,
28239
28279
  command: P.option(P.u64())
28240
28280
  })
28241
28281
  }), y6 = P.struct("GasCostSummary", {
@@ -28243,7 +28283,7 @@ const u6 = P.enum("CompressedSignature", {
28243
28283
  storageCost: P.u64(),
28244
28284
  storageRebate: P.u64(),
28245
28285
  nonRefundableStorageFee: P.u64()
28246
- }), z4 = P.struct("TransactionEffectsV1", {
28286
+ }), G4 = P.struct("TransactionEffectsV1", {
28247
28287
  status: p6,
28248
28288
  executedEpoch: P.u64(),
28249
28289
  gasUsed: y6,
@@ -28259,29 +28299,29 @@ const u6 = P.enum("CompressedSignature", {
28259
28299
  gasObject: P.tuple([wr, zs]),
28260
28300
  eventsDigest: P.option(Ur),
28261
28301
  dependencies: P.vector(Ur)
28262
- }), H0 = P.tuple([P.u64(), Ur]), V4 = P.enum("ObjectIn", {
28302
+ }), H0 = P.tuple([P.u64(), Ur]), q4 = P.enum("ObjectIn", {
28263
28303
  NotExist: null,
28264
28304
  Exist: P.tuple([H0, zs])
28265
- }), G4 = P.enum("ObjectOut", {
28305
+ }), W4 = P.enum("ObjectOut", {
28266
28306
  NotExist: null,
28267
28307
  ObjectWrite: P.tuple([Ur, zs]),
28268
28308
  PackageWrite: H0
28269
- }), q4 = P.enum("IDOperation", {
28309
+ }), K4 = P.enum("IDOperation", {
28270
28310
  None: null,
28271
28311
  Created: null,
28272
28312
  Deleted: null
28273
- }), W4 = P.struct("EffectsObjectChange", {
28274
- inputState: V4,
28275
- outputState: G4,
28276
- idOperation: q4
28277
- }), K4 = P.enum("UnchangedSharedKind", {
28313
+ }), X4 = P.struct("EffectsObjectChange", {
28314
+ inputState: q4,
28315
+ outputState: W4,
28316
+ idOperation: K4
28317
+ }), Y4 = P.enum("UnchangedSharedKind", {
28278
28318
  ReadOnlyRoot: H0,
28279
28319
  // TODO: these have been renamed to MutateConsensusStreamEnded and ReadConsensusStreamEnded
28280
28320
  MutateDeleted: P.u64(),
28281
28321
  ReadDeleted: P.u64(),
28282
28322
  Cancelled: P.u64(),
28283
28323
  PerEpochConfig: null
28284
- }), X4 = P.struct("TransactionEffectsV2", {
28324
+ }), J4 = P.struct("TransactionEffectsV2", {
28285
28325
  status: p6,
28286
28326
  executedEpoch: P.u64(),
28287
28327
  gasUsed: y6,
@@ -28290,12 +28330,12 @@ const u6 = P.enum("CompressedSignature", {
28290
28330
  eventsDigest: P.option(Ur),
28291
28331
  dependencies: P.vector(Ur),
28292
28332
  lamportVersion: P.u64(),
28293
- changedObjects: P.vector(P.tuple([Le, W4])),
28294
- unchangedSharedObjects: P.vector(P.tuple([Le, K4])),
28333
+ changedObjects: P.vector(P.tuple([Le, X4])),
28334
+ unchangedSharedObjects: P.vector(P.tuple([Le, Y4])),
28295
28335
  auxDataDigest: P.option(Ur)
28296
- }), Y4 = P.enum("TransactionEffects", {
28297
- V1: z4,
28298
- V2: X4
28336
+ }), Z4 = P.enum("TransactionEffects", {
28337
+ V1: G4,
28338
+ V2: J4
28299
28339
  });
28300
28340
  function Va(t) {
28301
28341
  switch (t) {
@@ -28348,24 +28388,24 @@ const ye = {
28348
28388
  IntentMessage: c6,
28349
28389
  IntentScope: s6,
28350
28390
  IntentVersion: i6,
28351
- MultiSig: N4,
28391
+ MultiSig: M4,
28352
28392
  MultiSigPkMap: l6,
28353
28393
  MultiSigPublicKey: d6,
28354
28394
  ObjectArg: W2,
28355
28395
  ObjectDigest: Ur,
28356
28396
  Owner: zs,
28357
- PasskeyAuthenticator: F4,
28397
+ PasskeyAuthenticator: j4,
28358
28398
  ProgrammableMoveCall: X2,
28359
28399
  ProgrammableTransaction: J2,
28360
28400
  PublicKey: f6,
28361
- SenderSignedData: M4,
28401
+ SenderSignedData: $4,
28362
28402
  SenderSignedTransaction: h6,
28363
28403
  SharedObjectRef: q2,
28364
28404
  StructTag: e6,
28365
28405
  SuiObjectRef: wr,
28366
28406
  TransactionData: n6,
28367
28407
  TransactionDataV1: r6,
28368
- TransactionEffects: Y4,
28408
+ TransactionEffects: Z4,
28369
28409
  TransactionExpiration: Q2,
28370
28410
  TransactionKind: Z2,
28371
28411
  TypeTag: j0
@@ -28373,7 +28413,7 @@ const ye = {
28373
28413
  digest: /* @__PURE__ */ Ie(),
28374
28414
  objectId: /* @__PURE__ */ Ie(),
28375
28415
  version: /* @__PURE__ */ mn([/* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()), /* @__PURE__ */ Ie(), /* @__PURE__ */ H2()])
28376
- }), J4 = Ei({
28416
+ }), Q4 = Ei({
28377
28417
  ImmOrOwned: Hm,
28378
28418
  Shared: /* @__PURE__ */ he({
28379
28419
  objectId: cr,
@@ -28382,7 +28422,7 @@ const ye = {
28382
28422
  }),
28383
28423
  Receiving: Hm
28384
28424
  }), Lm = Ei({
28385
- Object: J4,
28425
+ Object: Q4,
28386
28426
  Pure: /* @__PURE__ */ xe(/* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()))
28387
28427
  });
28388
28428
  function Dm(t) {
@@ -28516,7 +28556,7 @@ function kn(t, e) {
28516
28556
  return e[t.Input];
28517
28557
  throw new Error(`Invalid argument ${Object.keys(t)}`);
28518
28558
  }
28519
- function Z4(t) {
28559
+ function eO(t) {
28520
28560
  var e, r, n;
28521
28561
  return qe(Mc, {
28522
28562
  version: 2,
@@ -28672,24 +28712,24 @@ const Tr = Qo({
28672
28712
  Input: /* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()),
28673
28713
  Result: /* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()),
28674
28714
  NestedResult: /* @__PURE__ */ F0([/* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt()), /* @__PURE__ */ vt(/* @__PURE__ */ Xt(), /* @__PURE__ */ Kt())])
28675
- }), Q4 = /* @__PURE__ */ he({
28715
+ }), tO = /* @__PURE__ */ he({
28676
28716
  budget: /* @__PURE__ */ Je(Qt),
28677
28717
  price: /* @__PURE__ */ Je(Qt),
28678
28718
  owner: /* @__PURE__ */ Je(ya),
28679
28719
  payment: /* @__PURE__ */ Je(/* @__PURE__ */ xe(_s))
28680
- }), eO = /* @__PURE__ */ he({
28720
+ }), rO = /* @__PURE__ */ he({
28681
28721
  package: cr,
28682
28722
  module: /* @__PURE__ */ Ie(),
28683
28723
  function: /* @__PURE__ */ Ie(),
28684
28724
  // snake case in rust
28685
28725
  typeArguments: /* @__PURE__ */ xe(/* @__PURE__ */ Ie()),
28686
28726
  arguments: /* @__PURE__ */ xe(Tr)
28687
- }), tO = /* @__PURE__ */ he({
28727
+ }), nO = /* @__PURE__ */ he({
28688
28728
  name: /* @__PURE__ */ Ie(),
28689
28729
  inputs: /* @__PURE__ */ xo(/* @__PURE__ */ Ie(), /* @__PURE__ */ mn([Tr, /* @__PURE__ */ xe(Tr)])),
28690
28730
  data: /* @__PURE__ */ xo(/* @__PURE__ */ Ie(), /* @__PURE__ */ Zo())
28691
- }), rO = Qo({
28692
- MoveCall: eO,
28731
+ }), sO = Qo({
28732
+ MoveCall: rO,
28693
28733
  TransferObjects: /* @__PURE__ */ he({
28694
28734
  objects: /* @__PURE__ */ xe(Tr),
28695
28735
  address: Tr
@@ -28716,8 +28756,8 @@ const Tr = Qo({
28716
28756
  package: cr,
28717
28757
  ticket: Tr
28718
28758
  }),
28719
- $Intent: tO
28720
- }), nO = Qo({
28759
+ $Intent: nO
28760
+ }), iO = Qo({
28721
28761
  ImmOrOwnedObject: _s,
28722
28762
  SharedObject: /* @__PURE__ */ he({
28723
28763
  objectId: cr,
@@ -28726,8 +28766,8 @@ const Tr = Qo({
28726
28766
  mutable: /* @__PURE__ */ pa()
28727
28767
  }),
28728
28768
  Receiving: _s
28729
- }), sO = Qo({
28730
- Object: nO,
28769
+ }), aO = Qo({
28770
+ Object: iO,
28731
28771
  Pure: /* @__PURE__ */ he({
28732
28772
  bytes: hi
28733
28773
  }),
@@ -28741,19 +28781,19 @@ const Tr = Qo({
28741
28781
  initialSharedVersion: /* @__PURE__ */ ar(/* @__PURE__ */ Je(Qt)),
28742
28782
  mutable: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ pa()))
28743
28783
  })
28744
- }), iO = Qo({
28784
+ }), oO = Qo({
28745
28785
  None: /* @__PURE__ */ ct(!0),
28746
28786
  Epoch: Qt
28747
- }), aO = /* @__PURE__ */ he({
28787
+ }), cO = /* @__PURE__ */ he({
28748
28788
  version: /* @__PURE__ */ ct(2),
28749
28789
  sender: /* @__PURE__ */ So(ya),
28750
- expiration: /* @__PURE__ */ So(iO),
28751
- gasData: Q4,
28752
- inputs: /* @__PURE__ */ xe(sO),
28753
- commands: /* @__PURE__ */ xe(rO),
28790
+ expiration: /* @__PURE__ */ So(oO),
28791
+ gasData: tO,
28792
+ inputs: /* @__PURE__ */ xe(aO),
28793
+ commands: /* @__PURE__ */ xe(sO),
28754
28794
  digest: /* @__PURE__ */ ar(/* @__PURE__ */ Je(/* @__PURE__ */ Ie()))
28755
28795
  });
28756
- function oO(t) {
28796
+ function uO(t) {
28757
28797
  return {
28758
28798
  $kind: "Pure",
28759
28799
  Pure: {
@@ -28762,7 +28802,7 @@ function oO(t) {
28762
28802
  };
28763
28803
  }
28764
28804
  const Mr = {
28765
- Pure: oO,
28805
+ Pure: uO,
28766
28806
  ObjectRef({ objectId: t, digest: e, version: r }) {
28767
28807
  return {
28768
28808
  $kind: "Object",
@@ -28808,10 +28848,10 @@ const Mr = {
28808
28848
  }
28809
28849
  };
28810
28850
  BigInt(1e9);
28811
- const cO = "0x1", m6 = "0x2", uO = on("0x6"), fO = `${m6}::sui::SUI`;
28851
+ const fO = "0x1", m6 = "0x2", lO = on("0x6"), dO = `${m6}::sui::SUI`;
28812
28852
  on("0x5");
28813
28853
  on("0x8");
28814
- const lO = /* @__PURE__ */ Uint8Array.from([
28854
+ const hO = /* @__PURE__ */ Uint8Array.from([
28815
28855
  0,
28816
28856
  1,
28817
28857
  2,
@@ -29097,7 +29137,7 @@ function is(t, e, r, n, s, i) {
29097
29137
  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 = Rg(c, f, a);
29098
29138
  u = Ng(E, u, l, o), c = E | 0, { Dh: b, Dl: m } = { Dh: b ^ u, Dl: m ^ c }, { Dh: b, Dl: m } = { Dh: Og(b, m, 16), Dl: Bg(b, m, 16) }, { h: d, l: p } = Cg(d, p, b, m), { Bh: l, Bl: f } = { Bh: l ^ d, Bl: f ^ p }, { Bh: l, Bl: f } = { Bh: J8(l, f, 63), Bl: Z8(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;
29099
29139
  }
29100
- function dO(t, e = {}, r, n, s) {
29140
+ function pO(t, e = {}, r, n, s) {
29101
29141
  if (Es(r), t < 0 || t > r)
29102
29142
  throw new Error("outputLen bigger than keyLen");
29103
29143
  const { key: i, salt: a, personalization: o } = e;
@@ -29108,7 +29148,7 @@ function dO(t, e = {}, r, n, s) {
29108
29148
  if (o !== void 0 && o.length !== s)
29109
29149
  throw new Error("personalization must be undefined or " + s);
29110
29150
  }
29111
- class hO extends Au {
29151
+ class yO extends Au {
29112
29152
  constructor(e, r) {
29113
29153
  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 = Ya(this.buffer);
29114
29154
  }
@@ -29151,10 +29191,10 @@ class hO extends Au {
29151
29191
  return this._cloneInto();
29152
29192
  }
29153
29193
  }
29154
- class pO extends hO {
29194
+ class mO extends yO {
29155
29195
  constructor(e = {}) {
29156
29196
  const r = e.dkLen === void 0 ? 64 : e.dkLen;
29157
- super(128, r), this.v0l = at[0] | 0, this.v0h = at[1] | 0, this.v1l = at[2] | 0, this.v1h = at[3] | 0, this.v2l = at[4] | 0, this.v2h = at[5] | 0, this.v3l = at[6] | 0, this.v3h = at[7] | 0, this.v4l = at[8] | 0, this.v4h = at[9] | 0, this.v5l = at[10] | 0, this.v5h = at[11] | 0, this.v6l = at[12] | 0, this.v6h = at[13] | 0, this.v7l = at[14] | 0, this.v7h = at[15] | 0, dO(r, e, 64, 16, 16);
29197
+ super(128, r), this.v0l = at[0] | 0, this.v0h = at[1] | 0, this.v1l = at[2] | 0, this.v1h = at[3] | 0, this.v2l = at[4] | 0, this.v2h = at[5] | 0, this.v3l = at[6] | 0, this.v3h = at[7] | 0, this.v4l = at[8] | 0, this.v4h = at[9] | 0, this.v5l = at[10] | 0, this.v5h = at[11] | 0, this.v6l = at[12] | 0, this.v6h = at[13] | 0, this.v7l = at[14] | 0, this.v7h = at[15] | 0, pO(r, e, 64, 16, 16);
29158
29198
  let { key: n, personalization: s, salt: i } = e, a = 0;
29159
29199
  if (n !== void 0 && (n = Mn(n), a = n.length), this.v0l ^= this.outputLen | a << 8 | 65536 | 1 << 24, i !== void 0) {
29160
29200
  i = Mn(i);
@@ -29185,7 +29225,7 @@ class pO extends hO {
29185
29225
  let { h: s, l: i } = Pg(BigInt(this.length));
29186
29226
  te[24] = at[8] ^ i, te[25] = at[9] ^ s, n && (te[28] = ~te[28], te[29] = ~te[29]);
29187
29227
  let a = 0;
29188
- const o = lO;
29228
+ const o = hO;
29189
29229
  for (let c = 0; c < 12; c++)
29190
29230
  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++]);
29191
29231
  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);
@@ -29194,15 +29234,15 @@ class pO extends hO {
29194
29234
  this.destroyed = !0, Ln(this.buffer32), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
29195
29235
  }
29196
29236
  }
29197
- const yO = /* @__PURE__ */ fA((t) => new pO(t)), b6 = yO;
29198
- function mO(t, e, r) {
29237
+ const bO = /* @__PURE__ */ fA((t) => new mO(t)), b6 = bO;
29238
+ function gO(t, e, r) {
29199
29239
  const n = ye.Address.serialize(t).toBytes(), s = ye.TypeTag.serialize(e).toBytes(), i = ye.u64().serialize(r.length).toBytes(), a = b6.create({
29200
29240
  dkLen: 32
29201
29241
  });
29202
29242
  return a.update(new Uint8Array([240])), a.update(n), a.update(i), a.update(r), a.update(s), `0x${ia(a.digest().slice(0, 32))}`;
29203
29243
  }
29204
- const bO = "object", gO = "ID", wO = "ascii", vO = "String", EO = "string", AO = "String", SO = "option", xO = "Option";
29205
- function kO(t) {
29244
+ const wO = "object", vO = "ID", EO = "ascii", AO = "String", SO = "string", xO = "String", kO = "option", _O = "Option";
29245
+ function TO(t) {
29206
29246
  const e = typeof t.body == "object" && "datatype" in t.body ? t.body.datatype : null;
29207
29247
  return !!e && ve(e.package) === ve("0x2") && e.module === "tx_context" && e.type === "TxContext";
29208
29248
  }
@@ -29239,20 +29279,20 @@ function ah(t) {
29239
29279
  }
29240
29280
  if ("datatype" in t) {
29241
29281
  const e = ve(t.datatype.package);
29242
- if (e === ve(cO)) {
29243
- if (t.datatype.module === wO && t.datatype.type === vO || t.datatype.module === EO && t.datatype.type === AO)
29282
+ if (e === ve(fO)) {
29283
+ if (t.datatype.module === EO && t.datatype.type === AO || t.datatype.module === SO && t.datatype.type === xO)
29244
29284
  return ye.String;
29245
- if (t.datatype.module === SO && t.datatype.type === xO) {
29285
+ if (t.datatype.module === kO && t.datatype.type === _O) {
29246
29286
  const r = ah(t.datatype.typeParameters[0]);
29247
29287
  return r ? ye.vector(r) : null;
29248
29288
  }
29249
29289
  }
29250
- if (e === ve(m6) && t.datatype.module === bO && t.datatype.type === gO)
29290
+ if (e === ve(m6) && t.datatype.module === wO && t.datatype.type === vO)
29251
29291
  return ye.Address;
29252
29292
  }
29253
29293
  return null;
29254
29294
  }
29255
- function _O(t) {
29295
+ function IO(t) {
29256
29296
  return typeof t == "object" && "Reference" in t ? {
29257
29297
  ref: "&",
29258
29298
  body: Ga(t.Reference)
@@ -29301,23 +29341,23 @@ function Ga(t) {
29301
29341
  return { typeParameter: t.TypeParameter };
29302
29342
  throw new Error(`Unexpected type ${JSON.stringify(t)}`);
29303
29343
  }
29304
- const TO = 50, IO = 1000n, PO = 5e10;
29344
+ const PO = 50, OO = 1000n, BO = 5e10;
29305
29345
  function g6(t) {
29306
29346
  return async function(r, n, s) {
29307
- 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();
29347
+ return await MO(r, t), await UO(r, t), n.onlyTransactionKind || (await CO(r, t), await RO(r, t), await NO(r, t)), await s();
29308
29348
  };
29309
29349
  }
29310
- async function OO(t, e) {
29350
+ async function CO(t, e) {
29311
29351
  t.gasConfig.price || (t.gasConfig.price = String(await e.getReferenceGasPrice()));
29312
29352
  }
29313
- async function BO(t, e) {
29353
+ async function RO(t, e) {
29314
29354
  if (t.gasConfig.budget)
29315
29355
  return;
29316
29356
  const r = await e.dryRunTransactionBlock({
29317
29357
  transactionBlock: t.build({
29318
29358
  overrides: {
29319
29359
  gasData: {
29320
- budget: String(PO),
29360
+ budget: String(BO),
29321
29361
  payment: []
29322
29362
  }
29323
29363
  }
@@ -29328,16 +29368,16 @@ async function BO(t, e) {
29328
29368
  `Dry run failed, could not automatically determine a budget: ${r.effects.status.error}`,
29329
29369
  { cause: r }
29330
29370
  );
29331
- 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);
29371
+ const n = OO * BigInt(t.gasConfig.price || 1n), s = BigInt(r.effects.gasUsed.computationCost) + n, i = s + BigInt(r.effects.gasUsed.storageCost) - BigInt(r.effects.gasUsed.storageRebate);
29332
29372
  t.gasConfig.budget = String(
29333
29373
  i > s ? i : s
29334
29374
  );
29335
29375
  }
29336
- async function CO(t, e) {
29376
+ async function NO(t, e) {
29337
29377
  if (!t.gasConfig.payment) {
29338
29378
  const n = (await e.getCoins({
29339
29379
  owner: t.gasConfig.owner || t.sender,
29340
- coinType: fO
29380
+ coinType: dO
29341
29381
  })).data.filter((s) => !t.inputs.find((a) => {
29342
29382
  var o;
29343
29383
  return (o = a.Object) != null && o.ImmOrOwnedObject ? s.coinObjectId === a.Object.ImmOrOwnedObject.objectId : !1;
@@ -29353,7 +29393,7 @@ async function CO(t, e) {
29353
29393
  );
29354
29394
  }
29355
29395
  }
29356
- async function RO(t, e) {
29396
+ async function UO(t, e) {
29357
29397
  const r = t.inputs.filter((f) => {
29358
29398
  var l;
29359
29399
  return f.UnresolvedObject && !(f.UnresolvedObject.version || (l = f.UnresolvedObject) != null && l.initialSharedVersion);
@@ -29361,7 +29401,7 @@ async function RO(t, e) {
29361
29401
  ...new Set(
29362
29402
  r.map((f) => on(f.UnresolvedObject.objectId))
29363
29403
  )
29364
- ], s = n.length ? Zu(n, TO) : [], i = (await Promise.all(
29404
+ ], s = n.length ? Zu(n, PO) : [], i = (await Promise.all(
29365
29405
  s.map(
29366
29406
  (f) => e.multiGetObjects({
29367
29407
  ids: f,
@@ -29394,8 +29434,8 @@ async function RO(t, e) {
29394
29434
  l.UnresolvedObject.initialSharedVersion ?? (m == null ? void 0 : m.initialSharedVersion) ? p = Mr.SharedObjectRef({
29395
29435
  objectId: d,
29396
29436
  initialSharedVersion: l.UnresolvedObject.initialSharedVersion || (m == null ? void 0 : m.initialSharedVersion),
29397
- mutable: l.UnresolvedObject.mutable || UO(t, f)
29398
- }) : MO(t, f) && (p = Mr.ReceivingRef(
29437
+ mutable: l.UnresolvedObject.mutable || FO(t, f)
29438
+ }) : $O(t, f) && (p = Mr.ReceivingRef(
29399
29439
  {
29400
29440
  objectId: d,
29401
29441
  digest: l.UnresolvedObject.digest ?? (m == null ? void 0 : m.digest),
@@ -29408,7 +29448,7 @@ async function RO(t, e) {
29408
29448
  });
29409
29449
  }
29410
29450
  }
29411
- async function NO(t, e) {
29451
+ async function MO(t, e) {
29412
29452
  const { inputs: r, commands: n } = t, s = [], i = /* @__PURE__ */ new Set();
29413
29453
  n.forEach((o) => {
29414
29454
  if (o.MoveCall) {
@@ -29432,7 +29472,7 @@ async function NO(t, e) {
29432
29472
  });
29433
29473
  a.set(
29434
29474
  o,
29435
- l.parameters.map((p) => _O(p))
29475
+ l.parameters.map((p) => IO(p))
29436
29476
  );
29437
29477
  })
29438
29478
  ), s.length && await Promise.all(
@@ -29442,7 +29482,7 @@ async function NO(t, e) {
29442
29482
  );
29443
29483
  if (!c)
29444
29484
  return;
29445
- const f = c.length > 0 && kO(c.at(-1)) ? c.slice(0, c.length - 1) : c;
29485
+ const f = c.length > 0 && TO(c.at(-1)) ? c.slice(0, c.length - 1) : c;
29446
29486
  o._argumentTypes = f;
29447
29487
  })
29448
29488
  ), n.forEach((o) => {
@@ -29484,7 +29524,7 @@ async function NO(t, e) {
29484
29524
  }
29485
29525
  });
29486
29526
  }
29487
- function UO(t, e) {
29527
+ function FO(t, e) {
29488
29528
  let r = !1;
29489
29529
  return t.getInputUses(e, (n, s) => {
29490
29530
  if (s.MoveCall && s.MoveCall._argumentTypes) {
@@ -29494,26 +29534,26 @@ function UO(t, e) {
29494
29534
  (s.$kind === "MakeMoveVec" || s.$kind === "MergeCoins" || s.$kind === "SplitCoins" || s.$kind === "TransferObjects") && (r = !0);
29495
29535
  }), r;
29496
29536
  }
29497
- function MO(t, e) {
29537
+ function $O(t, e) {
29498
29538
  let r = !1;
29499
29539
  return t.getInputUses(e, (n, s) => {
29500
29540
  if (s.MoveCall && s.MoveCall._argumentTypes) {
29501
29541
  const i = s.MoveCall.arguments.indexOf(n);
29502
- r = FO(s.MoveCall._argumentTypes[i]) || r;
29542
+ r = jO(s.MoveCall._argumentTypes[i]) || r;
29503
29543
  }
29504
29544
  }), r;
29505
29545
  }
29506
- function FO(t) {
29546
+ function jO(t) {
29507
29547
  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";
29508
29548
  }
29509
29549
  function w6(t, e) {
29510
29550
  return !!(t.inputs.some((r) => r.UnresolvedObject || r.UnresolvedPure) || !e.onlyTransactionKind && (!t.gasConfig.price || !t.gasConfig.budget || !t.gasConfig.payment));
29511
29551
  }
29512
- async function $O(t, e, r) {
29552
+ async function HO(t, e, r) {
29513
29553
  var i;
29514
- if (HO(t), !w6(t, e))
29554
+ if (DO(t), !w6(t, e))
29515
29555
  return await zm(t), r();
29516
- const n = jO(e);
29556
+ const n = LO(e);
29517
29557
  return (((i = n.core) == null ? void 0 : i.resolveTransactionPlugin()) ?? g6(n))(t, e, async () => {
29518
29558
  await zm(t), await r();
29519
29559
  });
@@ -29528,14 +29568,14 @@ function zm(t) {
29528
29568
  );
29529
29569
  });
29530
29570
  }
29531
- function jO(t) {
29571
+ function LO(t) {
29532
29572
  if (!t.client)
29533
29573
  throw new Error(
29534
29574
  "No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
29535
29575
  );
29536
29576
  return t.client;
29537
29577
  }
29538
- function HO(t) {
29578
+ function DO(t) {
29539
29579
  for (const e of t.commands)
29540
29580
  switch (e.$kind) {
29541
29581
  case "SplitCoins":
@@ -29554,7 +29594,7 @@ function Vm(t, e, r) {
29554
29594
  const n = r.inputs[t.Input];
29555
29595
  n.$kind === "UnresolvedPure" && (r.inputs[t.Input] = Mr.Pure(e.serialize(n.UnresolvedPure.value)));
29556
29596
  }
29557
- function LO(t) {
29597
+ function zO(t) {
29558
29598
  function e(r) {
29559
29599
  return t(r);
29560
29600
  }
@@ -29597,7 +29637,7 @@ function LO(t) {
29597
29637
  arguments: n === null ? [] : [s.object(n)]
29598
29638
  }), e;
29599
29639
  }
29600
- function DO(t) {
29640
+ function VO(t) {
29601
29641
  function e(r, n) {
29602
29642
  if (typeof r == "string")
29603
29643
  return t(Va(r).serialize(n));
@@ -29609,7 +29649,7 @@ function DO(t) {
29609
29649
  ye.vector(Va(r)).serialize(n)
29610
29650
  ), e.option = (r, n) => t(ye.option(Va(r)).serialize(n)), e;
29611
29651
  }
29612
- function zO(t, e) {
29652
+ function GO(t, e) {
29613
29653
  const r = Array.from(`${t}::`).map((s) => s.charCodeAt(0)), n = new Uint8Array(r.length + e.length);
29614
29654
  return n.set(r), n.set(e, r.length), b6(n, { dkLen: 32 });
29615
29655
  }
@@ -29621,7 +29661,7 @@ function su(t) {
29621
29661
  if (t.UnresolvedObject)
29622
29662
  return ve(t.UnresolvedObject.objectId);
29623
29663
  }
29624
- function VO(t, e, r) {
29664
+ function qO(t, e, r) {
29625
29665
  const n = (s) => {
29626
29666
  switch (s.$kind) {
29627
29667
  case "Input": {
@@ -29714,7 +29754,7 @@ class Wt {
29714
29754
  });
29715
29755
  }
29716
29756
  static restore(e) {
29717
- return e.version === 2 ? new Wt(qe(Mc, e)) : new Wt(qe(Mc, Z4(e)));
29757
+ return e.version === 2 ? new Wt(qe(Mc, e)) : new Wt(qe(Mc, eO(e)));
29718
29758
  }
29719
29759
  /**
29720
29760
  * Generate transaction digest.
@@ -29723,7 +29763,7 @@ class Wt {
29723
29763
  * @returns transaction digest.
29724
29764
  */
29725
29765
  static getDigestFromBytes(e) {
29726
- const r = zO("TransactionData", e);
29766
+ const r = GO("TransactionData", e);
29727
29767
  return Ju(r);
29728
29768
  }
29729
29769
  // @deprecated use gasData instead
@@ -29895,7 +29935,7 @@ class Wt {
29895
29935
  const i = [];
29896
29936
  for (let u = 0; u < r.commands.length; u++) {
29897
29937
  const f = structuredClone(r.commands[u]);
29898
- VO(f, n, s), i.push(f);
29938
+ qO(f, n, s), i.push(f);
29899
29939
  }
29900
29940
  this.commands.splice(e, 0, ...i);
29901
29941
  const a = i.length;
@@ -29982,15 +30022,15 @@ class Wt {
29982
30022
  var v6 = (t) => {
29983
30023
  throw TypeError(t);
29984
30024
  }, L0 = (t, e, r) => e.has(t) || v6("Cannot " + r), ut = (t, e, r) => (L0(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ka = (t, e, r) => e.has(t) ? v6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), xc = (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), ko, Vn, _o, fs, an, oh, ch, E6, A6, D0;
29985
- const GO = "/", qO = {
30025
+ const WO = "/", KO = {
29986
30026
  "Mvr-Source": `@mysten/sui@${h2}`
29987
30027
  };
29988
- class WO {
30028
+ class XO {
29989
30029
  constructor({ cache: e, url: r, pageSize: n = 50, overrides: s }) {
29990
30030
  ka(this, an), ka(this, ko), ka(this, Vn), ka(this, _o), ka(this, fs), xc(this, ko, e), xc(this, Vn, r), xc(this, _o, n), xc(this, fs, {
29991
30031
  packages: s == null ? void 0 : s.packages,
29992
30032
  types: s == null ? void 0 : s.types
29993
- }), KO(ut(this, fs));
30033
+ }), YO(ut(this, fs));
29994
30034
  }
29995
30035
  async resolvePackage({
29996
30036
  package: e
@@ -30143,7 +30183,7 @@ D0 = async function(t, e) {
30143
30183
  method: "POST",
30144
30184
  headers: {
30145
30185
  "Content-Type": "application/json",
30146
- ...qO
30186
+ ...KO
30147
30187
  },
30148
30188
  body: JSON.stringify(e)
30149
30189
  });
@@ -30153,7 +30193,7 @@ D0 = async function(t, e) {
30153
30193
  }
30154
30194
  return r.json();
30155
30195
  };
30156
- function KO(t) {
30196
+ function YO(t) {
30157
30197
  if (t != null && t.packages)
30158
30198
  for (const [e, r] of Object.entries(t.packages)) {
30159
30199
  if (!rr(e))
@@ -30189,12 +30229,12 @@ function fh(t, e) {
30189
30229
  });
30190
30230
  }
30191
30231
  function kt(t) {
30192
- return t.includes(GO) || t.includes("@") || t.includes(".sui");
30232
+ return t.includes(WO) || t.includes("@") || t.includes(".sui");
30193
30233
  }
30194
30234
  function S6(t) {
30195
30235
  return typeof t == "object" && "address" in t && "module" in t && "name" in t && "typeParams" in t;
30196
30236
  }
30197
- function XO(t) {
30237
+ function JO(t) {
30198
30238
  const e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
30199
30239
  for (const n of t.commands)
30200
30240
  switch (n.$kind) {
@@ -30219,7 +30259,7 @@ function XO(t) {
30219
30259
  types: [...r]
30220
30260
  };
30221
30261
  }
30222
- function YO(t, e) {
30262
+ function ZO(t, e) {
30223
30263
  var r;
30224
30264
  for (const n of t.commands) {
30225
30265
  if ((r = n.MakeMoveVec) != null && r.type) {
@@ -30249,22 +30289,22 @@ function qm(t) {
30249
30289
  const e = /* @__PURE__ */ new Set();
30250
30290
  for (const r of t)
30251
30291
  if (kt(r)) {
30252
- if (!w4(r)) throw new Error(`Invalid type with names: ${r}`);
30292
+ if (!E4(r)) throw new Error(`Invalid type with names: ${r}`);
30253
30293
  e.add(r);
30254
30294
  }
30255
30295
  return e;
30256
30296
  }
30257
- const JO = (t) => async (e, r, n) => {
30258
- const s = XO(e);
30297
+ const QO = (t) => async (e, r, n) => {
30298
+ const s = JO(e);
30259
30299
  if (s.types.length === 0 && s.packages.length === 0)
30260
30300
  return n();
30261
- const i = await ZO(r).core.mvr.resolve({
30301
+ const i = await eB(r).core.mvr.resolve({
30262
30302
  types: s.types,
30263
30303
  packages: s.packages
30264
30304
  });
30265
- YO(e, i), await n();
30305
+ ZO(e, i), await n();
30266
30306
  };
30267
- function ZO(t) {
30307
+ function eB(t) {
30268
30308
  if (!t.client)
30269
30309
  throw new Error(
30270
30310
  "No sui client passed to Transaction#build, but transaction data was not sufficient to build offline."
@@ -30329,7 +30369,7 @@ function _a() {
30329
30369
  }
30330
30370
  const O6 = class dh {
30331
30371
  constructor() {
30332
- Jr(this, Qe), Jr(this, Vs), Jr(this, Qs), Jr(this, Bn, /* @__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(
30372
+ Jr(this, Qe), Jr(this, Vs), Jr(this, Qs), Jr(this, Bn, /* @__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 = zO(
30333
30373
  (r) => {
30334
30374
  var i, a;
30335
30375
  if (typeof r == "function")
@@ -30444,7 +30484,7 @@ const O6 = class dh {
30444
30484
  get pure() {
30445
30485
  return Object.defineProperty(this, "pure", {
30446
30486
  enumerable: !1,
30447
- value: DO((e) => U0(e) ? ot(this, Qe, $c).call(this, "pure", {
30487
+ value: VO((e) => U0(e) ? ot(this, Qe, $c).call(this, "pure", {
30448
30488
  $kind: "Pure",
30449
30489
  Pure: {
30450
30490
  bytes: e.toBase64()
@@ -30589,7 +30629,7 @@ const O6 = class dh {
30589
30629
  const r = this.isFullyResolved();
30590
30630
  return JSON.stringify(
30591
30631
  qe(
30592
- aO,
30632
+ cO,
30593
30633
  r ? {
30594
30634
  ...Z(this, oe).snapshot(),
30595
30635
  digest: Z(this, oe).getDigest()
@@ -30641,7 +30681,7 @@ const O6 = class dh {
30641
30681
  throw new Error(`Missing intent resolver for ${i}`);
30642
30682
  n.push(Z(this, Bn).get(i));
30643
30683
  }
30644
- n.push(JO()), await ot(this, Qe, V0).call(this, n, e);
30684
+ n.push(QO()), await ot(this, Qe, V0).call(this, n, e);
30645
30685
  }
30646
30686
  };
30647
30687
  Vs = /* @__PURE__ */ new WeakMap();
@@ -30692,7 +30732,7 @@ iu = function(t) {
30692
30732
  lh = async function(t) {
30693
30733
  if (!t.onlyTransactionKind && !Z(this, oe).sender)
30694
30734
  throw new Error("Missing transaction sender");
30695
- await ot(this, Qe, V0).call(this, [...Z(this, Qs), $O], t);
30735
+ await ot(this, Qe, V0).call(this, [...Z(this, Qs), HO], t);
30696
30736
  };
30697
30737
  V0 = async function(t, e) {
30698
30738
  try {
@@ -30776,16 +30816,16 @@ T6 = function() {
30776
30816
  }
30777
30817
  };
30778
30818
  let hh = O6;
30779
- const QO = {
30819
+ const tB = {
30780
30820
  mainnet: "https://mainnet.mvr.mystenlabs.com",
30781
30821
  testnet: "https://testnet.mvr.mystenlabs.com"
30782
30822
  };
30783
- class eB extends F2 {
30823
+ class rB extends F2 {
30784
30824
  constructor(e) {
30785
30825
  var r, n, s;
30786
- super(e), this.core = this, this.mvr = new WO({
30826
+ super(e), this.core = this, this.mvr = new XO({
30787
30827
  cache: this.cache.scope("core.mvr"),
30788
- url: ((r = e.mvr) == null ? void 0 : r.url) ?? QO[this.network],
30828
+ url: ((r = e.mvr) == null ? void 0 : r.url) ?? tB[this.network],
30789
30829
  pageSize: (n = e.mvr) == null ? void 0 : n.pageSize,
30790
30830
  overrides: (s = e.mvr) == null ? void 0 : s.overrides
30791
30831
  });
@@ -30803,7 +30843,7 @@ class eB extends F2 {
30803
30843
  (await this.core.mvr.resolveType({
30804
30844
  type: e.name.type
30805
30845
  })).type
30806
- ), n = mO(e.parentId, r, e.name.bcs), {
30846
+ ), n = gO(e.parentId, r, e.name.bcs), {
30807
30847
  objects: [s]
30808
30848
  } = await this.getObjects({
30809
30849
  objectIds: [n],
@@ -30852,9 +30892,9 @@ class eB extends F2 {
30852
30892
  }
30853
30893
  }
30854
30894
  }
30855
- class tB extends Error {
30895
+ class nB extends Error {
30856
30896
  }
30857
- class ds extends tB {
30897
+ class ds extends nB {
30858
30898
  constructor(e, r) {
30859
30899
  super(r), this.code = e;
30860
30900
  }
@@ -30880,29 +30920,29 @@ class ds extends tB {
30880
30920
  }
30881
30921
  }
30882
30922
  }
30883
- function rB(t) {
30923
+ function sB(t) {
30884
30924
  return {
30885
30925
  ...Wt.fromBytes(t).snapshot(),
30886
30926
  bcs: t
30887
30927
  };
30888
30928
  }
30889
- function nB(t) {
30929
+ function iB(t) {
30890
30930
  const e = ye.TransactionEffects.parse(t);
30891
30931
  switch (e.$kind) {
30892
30932
  case "V1":
30893
- return sB({ effects: e.V1 });
30933
+ return aB({ effects: e.V1 });
30894
30934
  case "V2":
30895
- return iB({ bytes: t, effects: e.V2 });
30935
+ return oB({ bytes: t, effects: e.V2 });
30896
30936
  default:
30897
30937
  throw new Error(
30898
30938
  `Unknown transaction effects version: ${e.$kind}`
30899
30939
  );
30900
30940
  }
30901
30941
  }
30902
- function sB(t) {
30942
+ function aB(t) {
30903
30943
  throw new Error("V1 effects are not supported yet");
30904
30944
  }
30905
- function iB({
30945
+ function oB({
30906
30946
  bytes: t,
30907
30947
  effects: e
30908
30948
  }) {
@@ -30955,13 +30995,13 @@ function iB({
30955
30995
  }
30956
30996
  var B6 = (t) => {
30957
30997
  throw TypeError(t);
30958
- }, C6 = (t, e, r) => e.has(t) || B6("Cannot " + r), Gt = (t, e, r) => (C6(t, e, "read from private field"), r ? r.call(t) : e.get(t)), aB = (t, e, r) => e.has(t) ? B6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), oB = (t, e, r, n) => (C6(t, e, "write to private field"), e.set(t, r), r), yt;
30959
- class cB extends eB {
30998
+ }, C6 = (t, e, r) => e.has(t) || B6("Cannot " + r), Gt = (t, e, r) => (C6(t, e, "read from private field"), r ? r.call(t) : e.get(t)), cB = (t, e, r) => e.has(t) ? B6("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), uB = (t, e, r, n) => (C6(t, e, "write to private field"), e.set(t, r), r), yt;
30999
+ class fB extends rB {
30960
31000
  constructor({
30961
31001
  jsonRpcClient: e,
30962
31002
  mvr: r
30963
31003
  }) {
30964
- super({ network: e.network, base: e, mvr: r }), aB(this, yt), oB(this, yt, e);
31004
+ super({ network: e.network, base: e, mvr: r }), cB(this, yt), uB(this, yt, e);
30965
31005
  }
30966
31006
  async getObjects(e) {
30967
31007
  const r = Zu(e.objectIds, 50), n = [];
@@ -31023,7 +31063,7 @@ class cB extends eB {
31023
31063
  balance: n.balance,
31024
31064
  type: `0x2::coin::Coin<${n.coinType}>`,
31025
31065
  content: Promise.resolve(
31026
- lB.serialize({
31066
+ hB.serialize({
31027
31067
  id: n.coinObjectId,
31028
31068
  balance: {
31029
31069
  value: n.balance
@@ -31105,7 +31145,7 @@ class cB extends eB {
31105
31145
  const r = hh.from(e.transaction), n = await Gt(this, yt).dryRunTransactionBlock({
31106
31146
  transactionBlock: e.transaction,
31107
31147
  signal: e.signal
31108
- }), { effects: s, objectTypes: i } = uB({
31148
+ }), { effects: s, objectTypes: i } = lB({
31109
31149
  effects: n.effects,
31110
31150
  objectChanges: n.objectChanges
31111
31151
  });
@@ -31116,7 +31156,7 @@ class cB extends eB {
31116
31156
  effects: s,
31117
31157
  objectTypes: Promise.resolve(i),
31118
31158
  signatures: [],
31119
- transaction: rB(e.transaction),
31159
+ transaction: sB(e.transaction),
31120
31160
  balanceChanges: n.balanceChanges.map((a) => ({
31121
31161
  coinType: a.coinType,
31122
31162
  address: R6(a.owner),
@@ -31185,11 +31225,11 @@ class cB extends eB {
31185
31225
  packageId: ve(e.packageId),
31186
31226
  moduleName: e.moduleName,
31187
31227
  name: e.name,
31188
- visibility: hB(r.visibility),
31228
+ visibility: yB(r.visibility),
31189
31229
  isEntry: r.isEntry,
31190
31230
  typeParameters: r.typeParameters.map((n) => ({
31191
31231
  isPhantom: !1,
31192
- constraints: dB(n)
31232
+ constraints: pB(n)
31193
31233
  })),
31194
31234
  parameters: r.parameters.map((n) => Ym(n)),
31195
31235
  returns: r.return.map((n) => Ym(n))
@@ -31275,7 +31315,7 @@ function Xm(t) {
31275
31315
  return {
31276
31316
  digest: t.digest,
31277
31317
  epoch: ((a = t.effects) == null ? void 0 : a.executedEpoch) ?? null,
31278
- effects: nB(new Uint8Array(t.rawEffects)),
31318
+ effects: iB(new Uint8Array(t.rawEffects)),
31279
31319
  objectTypes: Promise.resolve(r),
31280
31320
  transaction: {
31281
31321
  ...s,
@@ -31289,7 +31329,7 @@ function Xm(t) {
31289
31329
  }))) ?? []
31290
31330
  };
31291
31331
  }
31292
- function uB({
31332
+ function lB({
31293
31333
  bytes: t,
31294
31334
  effects: e,
31295
31335
  objectChanges: r
@@ -31423,11 +31463,11 @@ function uB({
31423
31463
  }
31424
31464
  };
31425
31465
  }
31426
- const fB = ye.struct("Balance", {
31466
+ const dB = ye.struct("Balance", {
31427
31467
  value: ye.u64()
31428
- }), lB = ye.struct("Coin", {
31468
+ }), hB = ye.struct("Coin", {
31429
31469
  id: ye.Address,
31430
- balance: fB
31470
+ balance: dB
31431
31471
  });
31432
31472
  function Ym(t) {
31433
31473
  if (typeof t != "string") {
@@ -31488,7 +31528,7 @@ function qa(t) {
31488
31528
  };
31489
31529
  throw new Error(`Unknown type: ${JSON.stringify(t)}`);
31490
31530
  }
31491
- function dB(t) {
31531
+ function pB(t) {
31492
31532
  return t.abilities.map((e) => {
31493
31533
  switch (e) {
31494
31534
  case "Copy":
@@ -31504,7 +31544,7 @@ function dB(t) {
31504
31544
  }
31505
31545
  });
31506
31546
  }
31507
- function hB(t) {
31547
+ function yB(t) {
31508
31548
  switch (t) {
31509
31549
  case "Public":
31510
31550
  return "public";
@@ -31516,7 +31556,7 @@ function hB(t) {
31516
31556
  return "unknown";
31517
31557
  }
31518
31558
  }
31519
- const pB = Symbol.for("@mysten/SuiClient");
31559
+ const mB = Symbol.for("@mysten/SuiClient");
31520
31560
  class Jm extends F2 {
31521
31561
  /**
31522
31562
  * Establish a connection to a Sui RPC endpoint
@@ -31524,12 +31564,12 @@ class Jm extends F2 {
31524
31564
  * @param options configuration options for the API Client
31525
31565
  */
31526
31566
  constructor(e) {
31527
- super({ network: e.network ?? "unknown" }), this.jsonRpc = this, this.transport = e.transport ?? new _P({ url: e.url }), this.core = new cB({
31567
+ super({ network: e.network ?? "unknown" }), this.jsonRpc = this, this.transport = e.transport ?? new IP({ url: e.url }), this.core = new fB({
31528
31568
  jsonRpcClient: this,
31529
31569
  mvr: e.mvr
31530
31570
  });
31531
31571
  }
31532
- get [pB]() {
31572
+ get [mB]() {
31533
31573
  return !0;
31534
31574
  }
31535
31575
  async getRpcApiVersion({ signal: e } = {}) {
@@ -32185,7 +32225,7 @@ class Jm extends F2 {
32185
32225
  return {
32186
32226
  hasNextPage: s,
32187
32227
  nextCursor: n,
32188
- data: i.map((a) => y4(a, e))
32228
+ data: i.map((a) => b4(a, e))
32189
32229
  };
32190
32230
  }
32191
32231
  async getProtocolConfig(e) {
@@ -32232,7 +32272,7 @@ class Jm extends F2 {
32232
32272
  throw i.throwIfAborted(), new Error("Unexpected error while waiting for transaction block.");
32233
32273
  }
32234
32274
  }
32235
- class yB {
32275
+ class bB {
32236
32276
  constructor(e, r, n, s) {
32237
32277
  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 vi(this.auth, this.url);
32238
32278
  }
@@ -32270,7 +32310,7 @@ class yB {
32270
32310
  p.pure.u256(i.timelock),
32271
32311
  p.pure.vector("u8", Buffer.from("")),
32272
32312
  d,
32273
- p.object(uO)
32313
+ p.object(lO)
32274
32314
  ]
32275
32315
  });
32276
32316
  const m = await p.build({ client: this.client }), b = await this.client.dryRunTransactionBlock({
@@ -32346,7 +32386,7 @@ function Zm(t) {
32346
32386
  let e = t.startsWith("0x") ? t.slice(2) : t;
32347
32387
  return e = e.toLowerCase(), e.length > 64 && (e = e.slice(e.length - 64)), e.length < 64 && (e = e.padStart(64, "0")), `0x${e}`;
32348
32388
  }
32349
- class mB {
32389
+ class gB {
32350
32390
  constructor(e, r, n, s) {
32351
32391
  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({
32352
32392
  fullHost: m5[r]
@@ -32567,8 +32607,8 @@ class mB {
32567
32607
  return T("Refund is taken care of by the relayer");
32568
32608
  }
32569
32609
  }
32570
- const bB = 25 * 60 * 60 * 1e3;
32571
- class gB {
32610
+ const wB = 25 * 60 * 60 * 1e3;
32611
+ class vB {
32572
32612
  constructor(e, r, n, s) {
32573
32613
  this.url = typeof e == "string" ? new It(e) : e, this.auth = n, this.wallet = s, this.client = new u5(b5[r], {}), this.relayer = new vi(this.auth, this.url);
32574
32614
  }
@@ -32619,7 +32659,7 @@ class gB {
32619
32659
  Condition: this.buildCondition(s),
32620
32660
  CancelAfter: f5(
32621
32661
  new Date(
32622
- new Date(n.created_at).getTime() + bB
32662
+ new Date(n.created_at).getTime() + wB
32623
32663
  )
32624
32664
  ),
32625
32665
  TransactionType: "EscrowCreate"
@@ -32685,7 +32725,7 @@ class gB {
32685
32725
  return "A0258020" + e.toUpperCase() + "810120";
32686
32726
  }
32687
32727
  }
32688
- const wB = (t) => {
32728
+ const EB = (t) => {
32689
32729
  if (t)
32690
32730
  if (typeof t == "string") {
32691
32731
  const e = Z6.from(t);
@@ -32774,7 +32814,7 @@ class au extends ib {
32774
32814
  return J(c.toString("hex"));
32775
32815
  }
32776
32816
  }
32777
- class vB {
32817
+ class AB {
32778
32818
  constructor(e = {}) {
32779
32819
  const r = {
32780
32820
  stdTTL: e.ttl ? e.ttl / 1e3 : 3600,
@@ -32855,7 +32895,7 @@ class vB {
32855
32895
  }
32856
32896
  }
32857
32897
  var To, Io, Po, Fe, Ki, hs;
32858
- class EB {
32898
+ class SB {
32859
32899
  constructor(e, r, n, s, i, a) {
32860
32900
  Cs(this, To);
32861
32901
  Cs(this, Io);
@@ -32863,7 +32903,7 @@ class EB {
32863
32903
  Cs(this, Fe);
32864
32904
  Cs(this, Ki);
32865
32905
  Cs(this, hs);
32866
- this.isBackgroundServiceRunning = !1, this.stopBackgroundExecution = null, this.htlcs = r, this.events = a, Rs(this, To, e), Rs(this, Io, n), Rs(this, Po, au.fromDigestKey(e.digestKey)), Rs(this, Fe, new vB()), Rs(this, Ki, s), Rs(this, hs, i);
32906
+ this.isBackgroundServiceRunning = !1, this.stopBackgroundExecution = null, this.htlcs = r, this.events = a, Rs(this, To, e), Rs(this, Io, n), Rs(this, Po, au.fromDigestKey(e.digestKey)), Rs(this, Fe, new AB()), Rs(this, Ki, s), Rs(this, hs, i);
32867
32907
  }
32868
32908
  async getAddressesFromHTLCs() {
32869
32909
  var n, s, i, a, o, c, u;
@@ -33311,7 +33351,7 @@ class EB {
33311
33351
  }
33312
33352
  }
33313
33353
  To = new WeakMap(), Io = new WeakMap(), Po = new WeakMap(), Fe = new WeakMap(), Ki = new WeakMap(), hs = new WeakMap();
33314
- class AB extends ib {
33354
+ class xB extends ib {
33315
33355
  emit(e, ...r) {
33316
33356
  super.emit(e, ...r);
33317
33357
  }
@@ -33320,7 +33360,7 @@ class N6 extends X6 {
33320
33360
  constructor(e) {
33321
33361
  const { api: r } = tp(e.environment);
33322
33362
  if (!r) throw new Error("API Key not found");
33323
- 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 FE(this._api.baseurl, this._auth), this._htlcs = e.htlc ?? {}, this._events = new AB(), this._executor = this._digestKey ? new EB(
33363
+ super(new It(r.baseurl), rd(e.apiKey)), this._redeemServiceEnabled = !0, this.executeInterval = 5e3, this._api = r, this._digestKey = EB(e.digestKey), this._auth = rd(e.apiKey), this._quote = e.quote ?? new FE(this._api.baseurl, this._auth), this._htlcs = e.htlc ?? {}, this._events = new xB(), this._executor = this._digestKey ? new SB(
33324
33364
  this._digestKey,
33325
33365
  this.htlcs,
33326
33366
  this,
@@ -33366,14 +33406,14 @@ class N6 extends X6 {
33366
33406
  "API not found, invalid environment " + e.environment
33367
33407
  );
33368
33408
  const i = e.wallets ? {
33369
- evm: e.wallets.evm ? new XT(n.baseurl, e.wallets.evm, r) : void 0,
33370
- starknet: e.wallets.starknet ? new QT(
33409
+ evm: e.wallets.evm ? new JT(n.baseurl, e.wallets.evm, r) : void 0,
33410
+ starknet: e.wallets.starknet ? new tI(
33371
33411
  n.baseurl,
33372
33412
  e.wallets.starknet,
33373
33413
  s,
33374
33414
  r
33375
33415
  ) : void 0,
33376
- solana: e.wallets.solana ? new mP(
33416
+ solana: e.wallets.solana ? new gP(
33377
33417
  e.wallets.solana,
33378
33418
  new It(n.baseurl),
33379
33419
  s,
@@ -33382,10 +33422,10 @@ class N6 extends X6 {
33382
33422
  programAddress: e.solanaProgramAddress
33383
33423
  }
33384
33424
  ) : void 0,
33385
- sui: e.wallets.sui ? new yB(n.baseurl, e.wallets.sui, s, r) : void 0,
33425
+ sui: e.wallets.sui ? new bB(n.baseurl, e.wallets.sui, s, r) : void 0,
33386
33426
  bitcoin: e.wallets.bitcoin ? new ME(e.wallets.bitcoin, s) : void 0,
33387
- tron: e.wallets.tron ? new mB(n.baseurl, s, r, e.wallets.tron) : void 0,
33388
- xrpl: e.wallets.xrpl ? new gB(n.baseurl, s, r, e.wallets.xrpl) : void 0
33427
+ tron: e.wallets.tron ? new gB(n.baseurl, s, r, e.wallets.tron) : void 0,
33428
+ xrpl: e.wallets.xrpl ? new vB(n.baseurl, s, r, e.wallets.xrpl) : void 0
33389
33429
  } : {};
33390
33430
  return new N6({
33391
33431
  htlc: i,
@@ -33659,7 +33699,7 @@ class N6 extends X6 {
33659
33699
  return this._events.off(e, r), this;
33660
33700
  }
33661
33701
  }
33662
- class AC {
33702
+ class xC {
33663
33703
  constructor(e, r, n) {
33664
33704
  this.callData = new X0(Jw), this.account = e, this.starknetProvider = new ab({
33665
33705
  nodeUrl: r || (n ? Dc[n].nodeUrl : Dc.mainnet.nodeUrl)
@@ -33688,7 +33728,7 @@ class AC {
33688
33728
  throw new Error("Token address retrieval failed");
33689
33729
  const s = ob.toHex(n), i = $a.uint256(BigInt(e.source_swap.amount));
33690
33730
  try {
33691
- const u = await YT(
33731
+ const u = await ZT(
33692
33732
  this.account,
33693
33733
  s,
33694
33734
  e.source_swap.asset,
@@ -33763,7 +33803,7 @@ class AC {
33763
33803
  }
33764
33804
  }
33765
33805
  }
33766
- class SC {
33806
+ class kC {
33767
33807
  /**
33768
33808
  * Creates a new instance of SolanaHTLC.
33769
33809
  * @param {AnchorProvider} provider - Solana Provider (abstraction of RPC connection and a Wallet)
@@ -33878,18 +33918,18 @@ class SC {
33878
33918
  }
33879
33919
  }
33880
33920
  }
33881
- const SB = (t) => t.map((e) => e), xB = (t) => {
33921
+ const kB = (t) => t.map((e) => e), _B = (t) => {
33882
33922
  if (t === Re.TESTNET)
33883
- return kB;
33884
- if (t === Re.LOCALNET)
33885
33923
  return TB;
33924
+ if (t === Re.LOCALNET)
33925
+ return PB;
33886
33926
  if (t === Re.MAINNET)
33887
- return _B;
33927
+ return IB;
33888
33928
  throw new Error("Invalid network");
33889
- }, kB = ["https://mempool.space/testnet4/api"], _B = [
33929
+ }, TB = ["https://mempool.space/testnet4/api"], IB = [
33890
33930
  "https://mempool.space/api",
33891
33931
  "https://blockstream.info/api"
33892
- ], TB = ["http://localhost:30000"], $s = {
33932
+ ], PB = ["http://localhost:30000"], $s = {
33893
33933
  INVALID_PK: "invalid private key",
33894
33934
  FEE_EXCEEDS_AMOUNT: (t, e) => `fee exceeds amount: fee: ${t} > amount: ${e}`,
33895
33935
  SWAP_NOT_FOUND: "swap config not found, please set the swap config first",
@@ -33904,9 +33944,9 @@ const SB = (t) => t.map((e) => e), xB = (t) => {
33904
33944
  INVALID_PUBKEY: "invalid public key",
33905
33945
  ORDER_NOT_EXPIRED: "you cannot refund before your transaction expires"
33906
33946
  }, Qm = (t) => t.sort((e, r) => e.status.confirmed != r.status.confirmed ? e.status.confirmed ? -1 : 1 : r.value - e.value);
33907
- class xC {
33947
+ class _C {
33908
33948
  constructor(e, r) {
33909
- this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? SB([r]) : xB(e), this.network = x5(e);
33949
+ this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? kB([r]) : _B(e), this.network = x5(e);
33910
33950
  }
33911
33951
  /**
33912
33952
  * Gets the output index of the UTXO
@@ -34175,7 +34215,7 @@ class ei {
34175
34215
  return new ei(s, i);
34176
34216
  }
34177
34217
  }
34178
- const IB = (t, e, r = !1) => {
34218
+ const OB = (t, e, r = !1) => {
34179
34219
  const n = (a) => {
34180
34220
  try {
34181
34221
  a = Fa.fromBech32(a).data.toString("hex");
@@ -34222,7 +34262,7 @@ const IB = (t, e, r = !1) => {
34222
34262
  P2TR: "p2tr"
34223
34263
  };
34224
34264
  var U6 = /* @__PURE__ */ ((t) => (t[t.Bitcoin = 0] = "Bitcoin", t[t.EVM = 1] = "EVM", t))(U6 || {});
34225
- class PB {
34265
+ class BB {
34226
34266
  addSignatureSegwitV0(e = Hc.ALL) {
34227
34267
  return new ei("segwitV0", e);
34228
34268
  }
@@ -34316,11 +34356,11 @@ class PB {
34316
34356
  async newSwap(e) {
34317
34357
  if (e.secretHash = ft(e.secretHash), e.secretHash.length !== 64)
34318
34358
  throw new Error(Na.INVALID_SECRET_HASH);
34319
- const { script: r, address: n } = IB(
34359
+ const { script: r, address: n } = OB(
34320
34360
  e,
34321
34361
  await this.getNetwork()
34322
34362
  );
34323
- return new OB(this, {
34363
+ return new CB(this, {
34324
34364
  ...e,
34325
34365
  redeemScript: r,
34326
34366
  scriptAddress: n
@@ -34348,7 +34388,7 @@ class PB {
34348
34388
  throw new Error("Unsupported script type");
34349
34389
  }
34350
34390
  }
34351
- class OB {
34391
+ class CB {
34352
34392
  /**
34353
34393
  * @constructor
34354
34394
  * @param {IBitcoinWallet} wallet
@@ -34463,20 +34503,20 @@ function sd(t) {
34463
34503
  return nf.regtest;
34464
34504
  throw new Error("Invalid network");
34465
34505
  }
34466
- function BB(t, e, r) {
34506
+ function RB(t, e, r) {
34467
34507
  if (!d5(t))
34468
34508
  throw new Error("Invalid mnemonic");
34469
34509
  const n = (r == null ? void 0 : r.path) ?? M6.bip44(e, (r == null ? void 0 : r.index) ?? 0), s = p5(Er).fromSeed(h5(t));
34470
- return CB(s, n);
34510
+ return NB(s, n);
34471
34511
  }
34472
- const CB = (t, e) => {
34512
+ const NB = (t, e) => {
34473
34513
  const r = t.derivePath(e).privateKey;
34474
34514
  if (!r)
34475
34515
  throw new Error("Unable to derive private key from mnemonic");
34476
34516
  return r.toString("hex");
34477
34517
  };
34478
34518
  r5(Er);
34479
- class Ua extends PB {
34519
+ class Ua extends BB {
34480
34520
  /**
34481
34521
  * @constructor
34482
34522
  * @param {BitcoinWalletOpts} opts
@@ -34498,7 +34538,7 @@ class Ua extends PB {
34498
34538
  * else use multi-key wallet's `fromMnemonic`
34499
34539
  */
34500
34540
  static fromMnemonic(e, r, n) {
34501
- const s = M6.bip84(r.getNetwork(), n == null ? void 0 : n.index), i = BB(e, r.getNetwork(), {
34541
+ const s = M6.bip84(r.getNetwork(), n == null ? void 0 : n.index), i = RB(e, r.getNetwork(), {
34502
34542
  path: s
34503
34543
  });
34504
34544
  return new Ua({
@@ -34766,27 +34806,27 @@ export {
34766
34806
  _y as A,
34767
34807
  V as B,
34768
34808
  ky as C,
34769
- DT as D,
34770
- XT as E,
34771
- GT as F,
34809
+ VT as D,
34810
+ JT as E,
34811
+ WT as F,
34772
34812
  N6 as G,
34773
34813
  La as H,
34774
34814
  kT as I,
34775
34815
  Ty as J,
34776
34816
  cn as K,
34777
- xC as L,
34817
+ _C as L,
34778
34818
  Ua as M,
34779
- ZB as N,
34819
+ eC as N,
34780
34820
  sf as O,
34781
34821
  Dc as P,
34782
34822
  FE as Q,
34783
34823
  ep as R,
34784
- QT as S,
34824
+ tI as S,
34785
34825
  m5 as T,
34786
34826
  b5 as U,
34787
34827
  y5 as V,
34788
34828
  Q0 as W,
34789
- gB as X,
34829
+ vB as X,
34790
34830
  Tc as Y,
34791
34831
  zx as a,
34792
34832
  xr as b,
@@ -34795,23 +34835,23 @@ export {
34795
34835
  bi as e,
34796
34836
  dn as f,
34797
34837
  Hh as g,
34798
- AC as h,
34838
+ xC as h,
34799
34839
  zo as i,
34800
- mP as j,
34801
- SC as k,
34840
+ gP as j,
34841
+ kC as k,
34802
34842
  ju as l,
34803
34843
  au as m,
34804
- YT as n,
34805
- JT as o,
34844
+ ZT as n,
34845
+ QT as o,
34806
34846
  Nc as p,
34807
- tC as q,
34847
+ nC as q,
34808
34848
  tp as r,
34809
34849
  lt as s,
34810
34850
  Ye as t,
34811
- eC as u,
34812
- QB as v,
34813
- rC as w,
34851
+ rC as u,
34852
+ tC as v,
34853
+ sC as w,
34814
34854
  LT as x,
34815
34855
  I0 as y,
34816
- qT as z
34856
+ KT as z
34817
34857
  };