@imtbl/checkout-sdk 2.2.0 → 2.2.1-alpha.0

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.
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5;// src/widgets/definitions/events/widgets.ts
2
- var rn = /* @__PURE__ */ ((u) => {
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4;// src/widgets/definitions/events/widgets.ts
2
+ var en = /* @__PURE__ */ ((u) => {
3
3
  u["IMTBL_WIDGETS_PROVIDER"] = "imtbl-widgets-provider";
4
4
  u["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
5
5
  u["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
@@ -12,43 +12,43 @@ var rn = /* @__PURE__ */ ((u) => {
12
12
  u["IMTBL_PURCHASE_WIDGET_EVENT"] = "imtbl-purchase-widget";
13
13
  u["IMTBL_TRANSFER_WIDGET_EVENT"] = "imtbl-transfer-widget";
14
14
  return u;
15
- })(rn || {});
16
- var nn = /* @__PURE__ */ ((e) => {
15
+ })(en || {});
16
+ var tn = /* @__PURE__ */ ((e) => {
17
17
  e["PROVIDER_UPDATED"] = "PROVIDER_UPDATED";
18
18
  return e;
19
- })(nn || {});
19
+ })(tn || {});
20
20
 
21
21
  // src/widgets/definitions/events/connect.ts
22
- var on = /* @__PURE__ */ ((a) => {
22
+ var rn = /* @__PURE__ */ ((a) => {
23
23
  a["CLOSE_WIDGET"] = "close-widget";
24
24
  a["SUCCESS"] = "success";
25
25
  a["FAILURE"] = "failure";
26
26
  a["LANGUAGE_CHANGED"] = "language-changed";
27
27
  a["WALLETCONNECT_PROVIDER_UPDATED"] = "walletconnect-provider-updated";
28
28
  return a;
29
- })(on || {});
29
+ })(rn || {});
30
30
 
31
31
  // src/widgets/definitions/events/wallet.ts
32
- var an = /* @__PURE__ */ ((o) => {
32
+ var nn = /* @__PURE__ */ ((o) => {
33
33
  o["CLOSE_WIDGET"] = "close-widget";
34
34
  o["NETWORK_SWITCH"] = "network-switch";
35
35
  o["DISCONNECT_WALLET"] = "disconnect-wallet";
36
36
  o["LANGUAGE_CHANGED"] = "language-changed";
37
37
  return o;
38
- })(an || {});
38
+ })(nn || {});
39
39
 
40
40
  // src/widgets/definitions/events/swap.ts
41
- var sn = /* @__PURE__ */ ((a) => {
41
+ var on = /* @__PURE__ */ ((a) => {
42
42
  a["CLOSE_WIDGET"] = "close-widget";
43
43
  a["SUCCESS"] = "success";
44
44
  a["FAILURE"] = "failure";
45
45
  a["REJECTED"] = "rejected";
46
46
  a["LANGUAGE_CHANGED"] = "language-changed";
47
47
  return a;
48
- })(sn || {});
48
+ })(on || {});
49
49
 
50
50
  // src/widgets/definitions/events/sale.ts
51
- var cn = /* @__PURE__ */ ((u) => {
51
+ var an = /* @__PURE__ */ ((u) => {
52
52
  u["CLOSE_WIDGET"] = "close-widget";
53
53
  u["SUCCESS"] = "success";
54
54
  u["FAILURE"] = "failure";
@@ -61,16 +61,16 @@ var cn = /* @__PURE__ */ ((u) => {
61
61
  u["REQUEST_SWAP"] = "request-swap";
62
62
  u["PAYMENT_TOKEN"] = "payment-token";
63
63
  return u;
64
- })(cn || {});
65
- var dn = /* @__PURE__ */ ((n) => {
64
+ })(an || {});
65
+ var sn = /* @__PURE__ */ ((n) => {
66
66
  n["CRYPTO"] = "crypto";
67
67
  n["DEBIT"] = "debit";
68
68
  n["CREDIT"] = "credit";
69
69
  return n;
70
- })(dn || {});
70
+ })(sn || {});
71
71
 
72
72
  // src/widgets/definitions/events/bridge.ts
73
- var ln = /* @__PURE__ */ ((s) => {
73
+ var cn = /* @__PURE__ */ ((s) => {
74
74
  s["CLOSE_WIDGET"] = "close-widget";
75
75
  s["FAILURE"] = "failure";
76
76
  s["TRANSACTION_SENT"] = "transaction-sent";
@@ -78,10 +78,10 @@ var ln = /* @__PURE__ */ ((s) => {
78
78
  s["CLAIM_WITHDRAWAL_SUCCESS"] = "claim-withdrawal-success";
79
79
  s["CLAIM_WITHDRAWAL_FAILURE"] = "claim-withdrawal-failure";
80
80
  return s;
81
- })(ln || {});
81
+ })(cn || {});
82
82
 
83
83
  // src/widgets/definitions/events/orchestration.ts
84
- var pn = /* @__PURE__ */ ((c) => {
84
+ var dn = /* @__PURE__ */ ((c) => {
85
85
  c["REQUEST_CONNECT"] = "request-connect";
86
86
  c["REQUEST_WALLET"] = "request-wallet";
87
87
  c["REQUEST_SWAP"] = "request-swap";
@@ -91,19 +91,19 @@ var pn = /* @__PURE__ */ ((c) => {
91
91
  c["REQUEST_PURCHASE"] = "request-purchase";
92
92
  c["REQUEST_GO_BACK"] = "request-go-back";
93
93
  return c;
94
- })(pn || {});
94
+ })(dn || {});
95
95
 
96
96
  // src/widgets/definitions/events/onramp.ts
97
- var un = /* @__PURE__ */ ((o) => {
97
+ var ln = /* @__PURE__ */ ((o) => {
98
98
  o["CLOSE_WIDGET"] = "close-widget";
99
99
  o["SUCCESS"] = "success";
100
100
  o["FAILURE"] = "failure";
101
101
  o["LANGUAGE_CHANGED"] = "language-changed";
102
102
  return o;
103
- })(un || {});
103
+ })(ln || {});
104
104
 
105
105
  // src/widgets/definitions/events/commerce.ts
106
- var mn = /* @__PURE__ */ ((i) => {
106
+ var pn = /* @__PURE__ */ ((i) => {
107
107
  i["INITIALISED"] = "INITIALISED";
108
108
  i["PROVIDER_UPDATED"] = "PROVIDER_UPDATED";
109
109
  i["CLOSE"] = "CLOSE";
@@ -112,8 +112,8 @@ var mn = /* @__PURE__ */ ((i) => {
112
112
  i["DISCONNECTED"] = "DISCONNECTED";
113
113
  i["USER_ACTION"] = "USER_ACTION";
114
114
  return i;
115
- })(mn || {});
116
- var fn = /* @__PURE__ */ ((d) => {
115
+ })(pn || {});
116
+ var un = /* @__PURE__ */ ((d) => {
117
117
  d["SWAP_SUCCESS"] = "SWAP_SUCCESS";
118
118
  d["ONRAMP_SUCCESS"] = "ONRAMP_SUCCESS";
119
119
  d["CONNECT_SUCCESS"] = "CONNECT_SUCCESS";
@@ -124,8 +124,8 @@ var fn = /* @__PURE__ */ ((d) => {
124
124
  d["ADD_TOKENS_SUCCESS"] = "ADD_TOKENS_SUCCESS";
125
125
  d["ADD_TOKENS_CONNECT_SUCCESS"] = "ADD_TOKENS_CONNECT_SUCCESS";
126
126
  return d;
127
- })(fn || {});
128
- var En = /* @__PURE__ */ ((c) => {
127
+ })(un || {});
128
+ var mn = /* @__PURE__ */ ((c) => {
129
129
  c["BRIDGE_FAILED"] = "BRIDGE_FAILED";
130
130
  c["BRIDGE_CLAIM_WITHDRAWAL_FAILED"] = "BRIDGE_CLAIM_WITHDRAWAL_FAILED";
131
131
  c["SWAP_FAILED"] = "SWAP_FAILED";
@@ -135,44 +135,44 @@ var En = /* @__PURE__ */ ((c) => {
135
135
  c["ONRAMP_FAILED"] = "ONRAMP_FAILED";
136
136
  c["ADD_TOKENS_FAILED"] = "ADD_TOKENS_FAILED";
137
137
  return c;
138
- })(En || {});
139
- var gn = /* @__PURE__ */ ((n) => {
138
+ })(mn || {});
139
+ var fn = /* @__PURE__ */ ((n) => {
140
140
  n["PAYMENT_METHOD_SELECTED"] = "PAYMENT_METHOD_SELECTED";
141
141
  n["PAYMENT_TOKEN_SELECTED"] = "PAYMENT_TOKEN_SELECTED";
142
142
  n["NETWORK_SWITCH"] = "NETWORK_SWITCH";
143
143
  return n;
144
- })(gn || {});
144
+ })(fn || {});
145
145
 
146
146
  // src/widgets/definitions/events/addTokens.ts
147
- var Rn = /* @__PURE__ */ ((a) => {
147
+ var En = /* @__PURE__ */ ((a) => {
148
148
  a["CLOSE_WIDGET"] = "close-widget";
149
149
  a["LANGUAGE_CHANGED"] = "language-changed";
150
150
  a["CONNECT_SUCCESS"] = "connect-success";
151
151
  a["SUCCESS"] = "success";
152
152
  a["FAILURE"] = "failure";
153
153
  return a;
154
- })(Rn || {});
154
+ })(En || {});
155
155
 
156
156
  // src/widgets/definitions/events/purchase.ts
157
- var Cn = /* @__PURE__ */ ((o) => {
157
+ var gn = /* @__PURE__ */ ((o) => {
158
158
  o["CLOSE_WIDGET"] = "close-widget";
159
159
  o["CONNECT_SUCCESS"] = "connect-success";
160
160
  o["SUCCESS"] = "success";
161
161
  o["FAILURE"] = "failure";
162
162
  return o;
163
- })(Cn || {});
163
+ })(gn || {});
164
164
 
165
165
  // src/widgets/definitions/events/transfer.ts
166
- var Tn = /* @__PURE__ */ ((o) => {
166
+ var Rn = /* @__PURE__ */ ((o) => {
167
167
  o["CLOSE_WIDGET"] = "close-widget";
168
168
  o["REJECTED"] = "rejected";
169
169
  o["SUCCESS"] = "success";
170
170
  o["FAILURE"] = "failure";
171
171
  return o;
172
- })(Tn || {});
172
+ })(Rn || {});
173
173
 
174
174
  // src/widgets/definitions/types.ts
175
- var In = /* @__PURE__ */ ((p) => {
175
+ var Cn = /* @__PURE__ */ ((p) => {
176
176
  p["CONNECT"] = "connect";
177
177
  p["WALLET"] = "wallet";
178
178
  p["SWAP"] = "swap";
@@ -184,24 +184,24 @@ var In = /* @__PURE__ */ ((p) => {
184
184
  p["PURCHASE"] = "purchase";
185
185
  p["TRANSFER"] = "transfer";
186
186
  return p;
187
- })(In || {});
187
+ })(Cn || {});
188
188
 
189
189
  // src/widgets/definitions/parameters/connect.ts
190
- var hn = /* @__PURE__ */ ((t) => {
190
+ var Tn = /* @__PURE__ */ ((t) => {
191
191
  t["LAYER1"] = "LAYER1";
192
192
  t["LAYER2"] = "LAYER2";
193
193
  return t;
194
- })(hn || {});
194
+ })(Tn || {});
195
195
 
196
196
  // src/widgets/definitions/parameters/swap.ts
197
- var An = /* @__PURE__ */ ((t) => {
197
+ var In = /* @__PURE__ */ ((t) => {
198
198
  t["FROM"] = "FROM";
199
199
  t["TO"] = "TO";
200
200
  return t;
201
- })(An || {});
201
+ })(In || {});
202
202
 
203
203
  // src/widgets/definitions/parameters/commerce.ts
204
- var yn = /* @__PURE__ */ ((d) => {
204
+ var hn = /* @__PURE__ */ ((d) => {
205
205
  d["CONNECT"] = "CONNECT";
206
206
  d["WALLET"] = "WALLET";
207
207
  d["SALE"] = "SALE";
@@ -212,27 +212,27 @@ var yn = /* @__PURE__ */ ((d) => {
212
212
  d["PURCHASE"] = "PURCHASE";
213
213
  d["TRANSFER"] = "TRANSFER";
214
214
  return d;
215
- })(yn || {});
215
+ })(hn || {});
216
216
 
217
217
  // src/widgets/definitions/configurations/theme.ts
218
- var wn = /* @__PURE__ */ ((t) => {
218
+ var An = /* @__PURE__ */ ((t) => {
219
219
  t["LIGHT"] = "light";
220
220
  t["DARK"] = "dark";
221
221
  return t;
222
- })(wn || {});
222
+ })(An || {});
223
223
 
224
224
  // src/sdk.ts
225
225
  var _config = require('@imtbl/config');
226
226
 
227
227
  // src/api/http/httpClient.ts
228
228
  var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);
229
- var Pn = "pk_imapik-";
230
- var kn = [
229
+ var wn = "pk_imapik-";
230
+ var Sn = [
231
231
  "https://checkout-api.dev.immutable.com",
232
232
  "https://checkout-api.sandbox.immutable.com",
233
233
  "https://checkout-api.immutable.com"
234
234
  ];
235
- var de = class {
235
+ var le = class {
236
236
 
237
237
 
238
238
  constructor(e) {
@@ -242,14 +242,14 @@ var de = class {
242
242
  }
243
243
  // eslint-disable-next-line class-methods-use-this
244
244
  shouldAddPublishableKey(e) {
245
- return kn.some((t) => e.startsWith(t));
245
+ return Sn.some((t) => e.startsWith(t));
246
246
  }
247
247
  setupInterceptors() {
248
248
  this.axiosInstance.interceptors.request.use(
249
249
  (e) => {
250
250
  const t = _optionalChain([this, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.baseConfig, 'optionalAccess', _4 => _4.publishableKey]);
251
251
  if (t && this.shouldAddPublishableKey(e.url || "")) {
252
- if (!t.startsWith(Pn)) {
252
+ if (!t.startsWith(wn)) {
253
253
  throw new Error(
254
254
  "Invalid Publishable key. Create your Publishable key in Immutable developer hub. https://hub.immutable.com"
255
255
  );
@@ -380,66 +380,66 @@ var x = async (r, e) => {
380
380
 
381
381
 
382
382
  // src/types/chains.ts
383
- var Z = /* @__PURE__ */ ((a) => {
383
+ var Q = /* @__PURE__ */ ((a) => {
384
384
  a[a["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
385
385
  a[a["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
386
386
  a[a["IMTBL_ZKEVM_DEVNET"] = 15003] = "IMTBL_ZKEVM_DEVNET";
387
387
  a[a["ETHEREUM"] = 1] = "ETHEREUM";
388
388
  a[a["SEPOLIA"] = 11155111] = "SEPOLIA";
389
389
  return a;
390
- })(Z || {});
391
- var tt = /* @__PURE__ */ ((a) => {
390
+ })(Q || {});
391
+ var rt = /* @__PURE__ */ ((a) => {
392
392
  a["ETHEREUM"] = "Ethereum";
393
393
  a["SEPOLIA"] = "Sepolia";
394
394
  a["IMTBL_ZKEVM_TESTNET"] = "Immutable zkEVM Testnet";
395
395
  a["IMTBL_ZKEVM_DEVNET"] = "Immutable zkEVM Dev";
396
396
  a["IMTBL_ZKEVM_MAINNET"] = "Immutable zkEVM";
397
397
  return a;
398
- })(tt || {});
399
- var he = /* @__PURE__ */ ((a) => {
398
+ })(rt || {});
399
+ var Ae = /* @__PURE__ */ ((a) => {
400
400
  a["ETHEREUM"] = "ethereum";
401
401
  a["SEPOLIA"] = "sepolia";
402
402
  a["IMTBL_ZKEVM_MAINNET"] = "imtbl-zkevm-mainnet";
403
403
  a["IMTBL_ZKEVM_TESTNET"] = "imtbl-zkevm-testnet";
404
404
  a["IMTBL_ZKEVM_DEVNET"] = "imtbl-zkevm-devnet";
405
405
  return a;
406
- })(he || {});
406
+ })(Ae || {});
407
407
 
408
408
  // src/env/constants.ts
409
- var K = "development";
409
+ var Z = "development";
410
410
  var G = 18;
411
- var Ot = 6;
411
+ var Mt = 6;
412
412
  var _ = "native";
413
- var we = {
413
+ var Se = {
414
414
  name: "IMX",
415
415
  symbol: "IMX",
416
416
  decimals: G,
417
417
  address: _
418
418
  };
419
- var vn = {
419
+ var Pn = {
420
420
  name: "tIMX",
421
421
  symbol: "tIMX",
422
422
  decimals: G,
423
423
  address: _
424
424
  };
425
425
  var U = {
426
- [K]: "https://api.dev.immutable.com",
426
+ [Z]: "https://api.dev.immutable.com",
427
427
  [_config.Environment.SANDBOX]: "https://api.sandbox.immutable.com",
428
428
  [_config.Environment.PRODUCTION]: "https://api.immutable.com"
429
429
  };
430
- var Se = {
431
- [K]: "https://checkout-api.dev.immutable.com",
430
+ var Pe = {
431
+ [Z]: "https://checkout-api.dev.immutable.com",
432
432
  [_config.Environment.SANDBOX]: "https://checkout-api.sandbox.immutable.com",
433
433
  [_config.Environment.PRODUCTION]: "https://checkout-api.immutable.com"
434
434
  };
435
- var Mt = true;
436
435
  var Bt = true;
437
436
  var xt = true;
438
- var bt = {
437
+ var bt = true;
438
+ var Lt = {
439
439
  [_config.Environment.SANDBOX]: "https://global-stg.transak.com",
440
440
  [_config.Environment.PRODUCTION]: "https://global.transak.com/"
441
441
  };
442
- var Ae = /* @__PURE__ */ new Map([
442
+ var ye = /* @__PURE__ */ new Map([
443
443
  [
444
444
  1,
445
445
  {
@@ -460,11 +460,11 @@ var Ae = /* @__PURE__ */ new Map([
460
460
  chainIdHex: `0x${13371 .toString(16)}`,
461
461
  chainName: "Immutable zkEVM",
462
462
  rpcUrls: ["https://rpc.immutable.com"],
463
- nativeCurrency: we
463
+ nativeCurrency: Se
464
464
  }
465
465
  ]
466
466
  ]);
467
- var ye = /* @__PURE__ */ new Map([
467
+ var we = /* @__PURE__ */ new Map([
468
468
  [
469
469
  11155111,
470
470
  {
@@ -487,11 +487,11 @@ var ye = /* @__PURE__ */ new Map([
487
487
  chainIdHex: `0x${13473 .toString(16)}`,
488
488
  chainName: "Immutable zkEVM Testnet",
489
489
  rpcUrls: ["https://rpc.testnet.immutable.com"],
490
- nativeCurrency: vn
490
+ nativeCurrency: Pn
491
491
  }
492
492
  ]
493
493
  ]);
494
- var Lt = /* @__PURE__ */ new Map([
494
+ var Dt = /* @__PURE__ */ new Map([
495
495
  [
496
496
  11155111,
497
497
  {
@@ -512,26 +512,26 @@ var Lt = /* @__PURE__ */ new Map([
512
512
  chainIdHex: `0x${15003 .toString(16)}`,
513
513
  chainName: "Immutable zkEVM Dev",
514
514
  rpcUrls: ["https://rpc.dev.immutable.com"],
515
- nativeCurrency: we
515
+ nativeCurrency: Se
516
516
  }
517
517
  ]
518
518
  ]);
519
519
  var te = {
520
520
  [13473]: {
521
521
  url: "https://explorer.testnet.immutable.com",
522
- nativeToken: ye.get(13473).nativeCurrency
522
+ nativeToken: we.get(13473).nativeCurrency
523
523
  },
524
524
  [13371]: {
525
525
  url: "https://explorer.immutable.com",
526
- nativeToken: Ae.get(13371).nativeCurrency
526
+ nativeToken: ye.get(13371).nativeCurrency
527
527
  },
528
528
  [11155111]: {
529
529
  url: "https://eth-sepolia.blockscout.com",
530
- nativeToken: ye.get(11155111).nativeCurrency
530
+ nativeToken: we.get(11155111).nativeCurrency
531
531
  },
532
532
  [1]: {
533
533
  url: "https://eth.blockscout.com/",
534
- nativeToken: Ae.get(1).nativeCurrency
534
+ nativeToken: ye.get(1).nativeCurrency
535
535
  }
536
536
  };
537
537
  var L = [
@@ -727,7 +727,7 @@ var re = [
727
727
  type: "function"
728
728
  }
729
729
  ];
730
- var rt = [
730
+ var nt = [
731
731
  {
732
732
  inputs: [
733
733
  {
@@ -795,19 +795,19 @@ var rt = [
795
795
  type: "function"
796
796
  }
797
797
  ];
798
- var nt = {
798
+ var ot = {
799
799
  maxFeePerGas: BigInt(15e9),
800
800
  maxPriorityFeePerGas: BigInt(1e10)
801
801
  };
802
802
 
803
803
  // src/env/env.ts
804
- var Nn = "2.2.0";
805
- var le = () => Nn;
804
+ var kn = "2.2.1-alpha.0";
805
+ var pe = () => kn;
806
806
 
807
807
  // src/availability/availability.ts
808
- var Pe = (r, e) => {
808
+ var ke = (r, e) => {
809
809
  const t = () => {
810
- if (r) return U[K];
810
+ if (r) return U[Z];
811
811
  if (e) return U[_config.Environment.PRODUCTION];
812
812
  return U[_config.Environment.SANDBOX];
813
813
  };
@@ -836,17 +836,17 @@ var Pe = (r, e) => {
836
836
  var _ethers = require('ethers');
837
837
 
838
838
  // src/types/gasEstimate.ts
839
- var ot = /* @__PURE__ */ ((t) => {
839
+ var at = /* @__PURE__ */ ((t) => {
840
840
  t["BRIDGE_TO_L2"] = "BRIDGE_TO_L2";
841
841
  t["SWAP"] = "SWAP";
842
842
  return t;
843
- })(ot || {});
843
+ })(at || {});
844
844
 
845
845
  // src/types/network.ts
846
- var pe = /* @__PURE__ */ ((e) => {
846
+ var ue = /* @__PURE__ */ ((e) => {
847
847
  e["ALL"] = "all";
848
848
  return e;
849
- })(pe || {});
849
+ })(ue || {});
850
850
 
851
851
  // src/types/token.ts
852
852
  var ne = /* @__PURE__ */ ((o) => {
@@ -858,28 +858,28 @@ var ne = /* @__PURE__ */ ((o) => {
858
858
  })(ne || {});
859
859
 
860
860
  // src/types/wallet.ts
861
- var Ft = /* @__PURE__ */ ((e) => {
861
+ var Wt = /* @__PURE__ */ ((e) => {
862
862
  e["ALL"] = "all";
863
863
  return e;
864
- })(Ft || {});
864
+ })(Wt || {});
865
865
 
866
866
  // src/types/provider.ts
867
867
 
868
868
 
869
869
 
870
- var ue = /* @__PURE__ */ ((n) => {
870
+ var me = /* @__PURE__ */ ((n) => {
871
871
  n["PASSPORT"] = "passport";
872
872
  n["METAMASK"] = "metamask";
873
873
  n["WALLETCONNECT"] = "walletconnect";
874
874
  return n;
875
- })(ue || {});
876
- var Wt = /* @__PURE__ */ ((n) => {
875
+ })(me || {});
876
+ var Ut = /* @__PURE__ */ ((n) => {
877
877
  n["PASSPORT"] = "com.immutable.passport";
878
878
  n["METAMASK"] = "io.metamask";
879
879
  n["WALLETCONNECT"] = "walletconnect";
880
880
  return n;
881
- })(Wt || {});
882
- var Ut = {
881
+ })(Ut || {});
882
+ var Gt = {
883
883
  allowMistmatchedChainId: false,
884
884
  allowUnsupportedProvider: false
885
885
  };
@@ -899,13 +899,13 @@ var b = class extends _ethers.BrowserProvider {
899
899
  };
900
900
 
901
901
  // src/types/smartCheckout.ts
902
- var me = /* @__PURE__ */ ((o) => {
902
+ var fe = /* @__PURE__ */ ((o) => {
903
903
  o["SUCCESS"] = "SUCCESS";
904
904
  o["FAILED"] = "FAILED";
905
905
  o["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
906
906
  o["FULFILLMENTS_UNSETTLED"] = "FULFILLMENTS_UNSETTLED";
907
907
  return o;
908
- })(me || {});
908
+ })(fe || {});
909
909
  var M = /* @__PURE__ */ ((o) => {
910
910
  o["NATIVE"] = "NATIVE";
911
911
  o["ERC20"] = "ERC20";
@@ -913,44 +913,44 @@ var M = /* @__PURE__ */ ((o) => {
913
913
  o["ERC1155"] = "ERC1155";
914
914
  return o;
915
915
  })(M || {});
916
- var fe = /* @__PURE__ */ ((t) => {
916
+ var Ee = /* @__PURE__ */ ((t) => {
917
917
  t["TRANSACTION"] = "TRANSACTION";
918
918
  t["GAS"] = "GAS";
919
919
  return t;
920
- })(fe || {});
921
- var Ee = /* @__PURE__ */ ((t) => {
920
+ })(Ee || {});
921
+ var ge = /* @__PURE__ */ ((t) => {
922
922
  t["NATIVE"] = "NATIVE";
923
923
  t["ERC20"] = "ERC20";
924
924
  return t;
925
- })(Ee || {});
926
- var at = /* @__PURE__ */ ((n) => {
925
+ })(ge || {});
926
+ var st = /* @__PURE__ */ ((n) => {
927
927
  n["ROUTES_FOUND"] = "ROUTES_FOUND";
928
928
  n["NO_ROUTES_FOUND"] = "NO_ROUTES_FOUND";
929
929
  n["NO_ROUTE_OPTIONS"] = "NO_ROUTE_OPTIONS";
930
930
  return n;
931
- })(at || {});
932
- var ke = /* @__PURE__ */ ((o) => {
931
+ })(st || {});
932
+ var ve = /* @__PURE__ */ ((o) => {
933
933
  o["GAS"] = "GAS";
934
934
  o["BRIDGE_FEE"] = "BRIDGE_FEE";
935
935
  o["SWAP_FEE"] = "SWAP_FEE";
936
936
  o["IMMUTABLE_FEE"] = "IMMUTABLE_FEE";
937
937
  return o;
938
- })(ke || {});
939
- var ge = /* @__PURE__ */ ((n) => {
938
+ })(ve || {});
939
+ var Re = /* @__PURE__ */ ((n) => {
940
940
  n["BRIDGE"] = "BRIDGE";
941
941
  n["SWAP"] = "SWAP";
942
942
  n["ONRAMP"] = "ONRAMP";
943
943
  return n;
944
- })(ge || {});
944
+ })(Re || {});
945
945
 
946
946
  // src/types/fiatRamp.ts
947
- var Gt = /* @__PURE__ */ ((e) => {
947
+ var qt = /* @__PURE__ */ ((e) => {
948
948
  e["ONRAMP"] = "onramp";
949
949
  return e;
950
- })(Gt || {});
950
+ })(qt || {});
951
951
 
952
952
  // src/provider/getUnderlyingProvider.ts
953
- async function Mn(r) {
953
+ async function _n(r) {
954
954
  if (!r.send) {
955
955
  throw new l(
956
956
  "Parsed provider is not a valid WrappedBrowserProvider",
@@ -963,22 +963,22 @@ async function Mn(r) {
963
963
  }
964
964
  return e;
965
965
  }
966
- async function Re(r) {
966
+ async function Ce(r) {
967
967
  const e = await r.getNetwork();
968
968
  if (e.chainId && typeof e.chainId === "bigint") {
969
969
  return e.chainId;
970
970
  }
971
- return Mn(r);
971
+ return _n(r);
972
972
  }
973
973
 
974
974
  // src/network/network.ts
975
- var Bn = 4902;
976
- async function xn(r, e, t) {
975
+ var On = 4902;
976
+ async function Mn(r, e, t) {
977
977
  return await e.send("wallet_switchEthereumChain", [
978
978
  { chainId: _optionalChain([r, 'access', _7 => _7.get, 'call', _8 => _8(t), 'optionalAccess', _9 => _9.chainIdHex]) }
979
979
  ]);
980
980
  }
981
- async function st(r, e, t) {
981
+ async function it(r, e, t) {
982
982
  if (e.send) {
983
983
  const n = r.get(t);
984
984
  const o = {
@@ -1021,7 +1021,7 @@ async function Y(r, { type: e = "all", exclude: t }) {
1021
1021
  networks: s
1022
1022
  };
1023
1023
  }
1024
- async function Ce(r, e) {
1024
+ async function Te(r, e) {
1025
1025
  const { networkMap: t } = r;
1026
1026
  return x(
1027
1027
  async () => {
@@ -1042,7 +1042,7 @@ async function Ce(r, e) {
1042
1042
  isSupported: false
1043
1043
  };
1044
1044
  } catch (n) {
1045
- const o = await Re(e);
1045
+ const o = await Ce(e);
1046
1046
  const a = Array.from(t.keys()).includes(Number(o));
1047
1047
  return {
1048
1048
  chainId: Number(o),
@@ -1055,7 +1055,7 @@ async function Ce(r, e) {
1055
1055
  }
1056
1056
  );
1057
1057
  }
1058
- async function jt(r, e, t) {
1058
+ async function Vt(r, e, t) {
1059
1059
  const { networkMap: n } = r;
1060
1060
  const o = await Y(r, {
1061
1061
  type: "all"
@@ -1074,7 +1074,7 @@ async function jt(r, e, t) {
1074
1074
  }
1075
1075
  try {
1076
1076
  if (e && "ethereumProvider" in e) {
1077
- await xn(n, e, t);
1077
+ await Mn(n, e, t);
1078
1078
  } else {
1079
1079
  throw new l(
1080
1080
  "Incorrect provider type",
@@ -1083,10 +1083,10 @@ async function jt(r, e, t) {
1083
1083
  }
1084
1084
  } catch (c) {
1085
1085
  console.error(c);
1086
- if (c.code === Bn) {
1086
+ if (c.code === On) {
1087
1087
  try {
1088
1088
  if ("ethereumProvider" in e) {
1089
- await st(n, e, t);
1089
+ await it(n, e, t);
1090
1090
  } else {
1091
1091
  throw new l(
1092
1092
  "Incorrect provider type",
@@ -1115,7 +1115,7 @@ async function jt(r, e, t) {
1115
1115
  "USER_REJECTED_REQUEST_ERROR"
1116
1116
  );
1117
1117
  }
1118
- const i = await Ce(r, a);
1118
+ const i = await Te(r, a);
1119
1119
  return {
1120
1120
  network: i,
1121
1121
  provider: a
@@ -1129,23 +1129,15 @@ async function jt(r, e, t) {
1129
1129
 
1130
1130
 
1131
1131
  // src/config/remoteConfigFetcher.ts
1132
-
1133
- var ve = (_class = class {
1134
-
1132
+ var Ne = (_class = class {
1135
1133
 
1136
1134
 
1137
1135
 
1138
1136
  __init() {this.version = "v1"}
1139
- constructor(e, t) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);
1140
- this.isDevelopment = t.isDevelopment;
1141
- this.isProduction = t.isProduction;
1137
+ constructor(e, t) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);
1138
+ this.endpoint = t.remoteConfigEndpoint;
1142
1139
  this.httpClient = e;
1143
1140
  }
1144
- __init2() {this.getEndpoint = () => {
1145
- if (this.isDevelopment) return Se[K];
1146
- if (this.isProduction) return Se[_config.Environment.PRODUCTION];
1147
- return Se[_config.Environment.SANDBOX];
1148
- }}
1149
1141
  // eslint-disable-next-line class-methods-use-this
1150
1142
  parseResponse(e) {
1151
1143
  let t = e.data;
@@ -1167,7 +1159,7 @@ var ve = (_class = class {
1167
1159
  let e;
1168
1160
  try {
1169
1161
  e = await this.httpClient.get(
1170
- `${this.getEndpoint()}/${this.version}/config`
1162
+ `${this.endpoint}/${this.version}/config`
1171
1163
  );
1172
1164
  } catch (t) {
1173
1165
  throw new l(
@@ -1185,34 +1177,23 @@ var ve = (_class = class {
1185
1177
  if (!e) return t;
1186
1178
  return t[e];
1187
1179
  }
1188
- __init3() {this.getHttpClient = () => this.httpClient}
1180
+ __init2() {this.getHttpClient = () => this.httpClient}
1189
1181
  }, _class);
1190
1182
 
1191
1183
  // src/config/tokensFetcher.ts
1192
-
1193
- var bn = "0x0000000000000000000000000000000000000eee";
1194
- var Ne = (_class2 = class {
1184
+ var Bn = "0x0000000000000000000000000000000000000eee";
1185
+ var _e = class {
1195
1186
 
1196
1187
 
1197
1188
 
1198
1189
 
1199
1190
 
1200
- constructor(e, t, n) {;_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);
1201
- this.isDevelopment = n.isDevelopment;
1202
- this.isProduction = n.isProduction;
1191
+ constructor(e, t, n) {
1192
+ this.baseUrl = n.baseUrl;
1193
+ this.chainSlug = n.chainSlug;
1203
1194
  this.httpClient = e;
1204
1195
  this.remoteConfig = t;
1205
1196
  }
1206
- __init4() {this.getBaseUrl = () => {
1207
- if (this.isDevelopment) return U[K];
1208
- if (this.isProduction) return U[_config.Environment.PRODUCTION];
1209
- return U[_config.Environment.SANDBOX];
1210
- }}
1211
- __init5() {this.getChainSlug = () => {
1212
- if (this.isDevelopment) return "imtbl-zkevm-devnet";
1213
- if (this.isProduction) return "imtbl-zkevm-mainnet";
1214
- return "imtbl-zkevm-testnet";
1215
- }}
1216
1197
  async loadTokens() {
1217
1198
  if (this.tokensCache) {
1218
1199
  return this.tokensCache;
@@ -1220,7 +1201,7 @@ var Ne = (_class2 = class {
1220
1201
  let e;
1221
1202
  try {
1222
1203
  e = await this.httpClient.get(
1223
- `${this.getBaseUrl()}/v1/chains/${this.getChainSlug()}/tokens?verification_status=verified&is_canonical=true`
1204
+ `${this.baseUrl}/v1/chains/${this.chainSlug}/tokens?verification_status=verified&is_canonical=true`
1224
1205
  );
1225
1206
  } catch (n) {
1226
1207
  throw new l(
@@ -1287,7 +1268,7 @@ var Ne = (_class2 = class {
1287
1268
  if (!t[i]) {
1288
1269
  t[i] = [];
1289
1270
  }
1290
- if (c === bn) {
1271
+ if (c === Bn) {
1291
1272
  c = "native";
1292
1273
  }
1293
1274
  _optionalChain([t, 'access', _32 => _32[i], 'optionalAccess', _33 => _33.push, 'call', _34 => _34({
@@ -1319,22 +1300,32 @@ var Ne = (_class2 = class {
1319
1300
  "imxAddressMapping"
1320
1301
  );
1321
1302
  }
1322
- }, _class2);
1303
+ };
1323
1304
 
1324
1305
  // src/config/config.ts
1325
- var it = class extends Error {
1306
+ var ct = class extends Error {
1326
1307
 
1327
1308
  constructor(e) {
1328
1309
  super(e);
1329
1310
  this.message = e;
1330
1311
  }
1331
1312
  };
1313
+ var xn = (r, e) => {
1314
+ if (e) return Dt;
1315
+ if (r) return ye;
1316
+ return we;
1317
+ };
1318
+ var bn = (r, e) => {
1319
+ if (e) return U[Z];
1320
+ if (r) return U[_config.Environment.PRODUCTION];
1321
+ return U[_config.Environment.SANDBOX];
1322
+ };
1332
1323
  var Ln = (r, e) => {
1333
- if (e) return Lt;
1334
- if (r) return Ae;
1335
- return ye;
1324
+ if (e) return "imtbl-zkevm-devnet";
1325
+ if (r) return "imtbl-zkevm-mainnet";
1326
+ return "imtbl-zkevm-testnet";
1336
1327
  };
1337
- var N = (r) => {
1328
+ var v = (r) => {
1338
1329
  if (!r.isProduction) return 11155111;
1339
1330
  return 1;
1340
1331
  };
@@ -1343,12 +1334,18 @@ var A = (r) => {
1343
1334
  if (r.isProduction) return 13371;
1344
1335
  return 13473;
1345
1336
  };
1346
- var Te = (_class3 = class {
1337
+ var Dn = (r, e) => {
1338
+ if (e) return Pe[Z];
1339
+ if (r) return Pe[_config.Environment.PRODUCTION];
1340
+ return Pe[_config.Environment.SANDBOX];
1341
+ };
1342
+ var Ie = (_class2 = class {
1347
1343
  // This is a hidden feature that is only available
1348
1344
  // when building the project from source code.
1349
1345
  // This will be used to get around the lack of
1350
1346
  // Environment.DEVELOPMENT
1351
- __init6() {this.isDevelopment = false}
1347
+ __init3() {this.isDevelopment = false}
1348
+
1352
1349
 
1353
1350
 
1354
1351
 
@@ -1359,39 +1356,42 @@ var Te = (_class3 = class {
1359
1356
 
1360
1357
 
1361
1358
 
1362
- constructor(e, t) {;_class3.prototype.__init6.call(this);
1359
+
1360
+ constructor(e, t) {;_class2.prototype.__init3.call(this);
1363
1361
  if (!Object.values(_config.Environment).includes(e.baseConfig.environment)) {
1364
- throw new it(
1362
+ throw new ct(
1365
1363
  "Invalid checkout configuration of environment"
1366
1364
  );
1367
1365
  }
1368
1366
  this.environment = e.baseConfig.environment;
1369
1367
  this.isProduction = !this.isDevelopment && this.environment === _config.Environment.PRODUCTION;
1370
- this.isOnRampEnabled = _nullishCoalesce(_optionalChain([e, 'access', _35 => _35.onRamp, 'optionalAccess', _36 => _36.enable]), () => ( Mt));
1371
- this.isSwapEnabled = _nullishCoalesce(_optionalChain([e, 'access', _37 => _37.swap, 'optionalAccess', _38 => _38.enable]), () => ( Bt));
1372
- this.isBridgeEnabled = _nullishCoalesce(_optionalChain([e, 'access', _39 => _39.bridge, 'optionalAccess', _40 => _40.enable]), () => ( xt));
1368
+ this.isOnRampEnabled = _nullishCoalesce(_optionalChain([e, 'access', _35 => _35.onRamp, 'optionalAccess', _36 => _36.enable]), () => ( Bt));
1369
+ this.isSwapEnabled = _nullishCoalesce(_optionalChain([e, 'access', _37 => _37.swap, 'optionalAccess', _38 => _38.enable]), () => ( xt));
1370
+ this.isBridgeEnabled = _nullishCoalesce(_optionalChain([e, 'access', _39 => _39.bridge, 'optionalAccess', _40 => _40.enable]), () => ( bt));
1373
1371
  this.publishableKey = _nullishCoalesce(e.publishableKey, () => ( "<no-publishable-key>"));
1374
- this.networkMap = Ln(this.isProduction, this.isDevelopment);
1375
- this.remote = new ve(t, {
1376
- isDevelopment: this.isDevelopment,
1377
- isProduction: this.isProduction
1372
+ this.networkMap = _nullishCoalesce(_optionalChain([e, 'access', _41 => _41.overrides, 'optionalAccess', _42 => _42.networkMap]), () => ( xn(this.isProduction, this.isDevelopment)));
1373
+ const n = _nullishCoalesce(_optionalChain([e, 'access', _43 => _43.overrides, 'optionalAccess', _44 => _44.remoteConfigEndpoint]), () => ( Dn(this.isProduction, this.isDevelopment)));
1374
+ this.remote = new Ne(t, {
1375
+ remoteConfigEndpoint: n
1378
1376
  });
1379
- this.tokens = new Ne(t, this.remote, {
1380
- isDevelopment: this.isDevelopment,
1381
- isProduction: this.isProduction
1377
+ this.tokens = new _e(t, this.remote, {
1378
+ baseUrl: _nullishCoalesce(_optionalChain([e, 'access', _45 => _45.overrides, 'optionalAccess', _46 => _46.baseUrl]), () => ( bn(this.isProduction, this.isDevelopment))),
1379
+ chainSlug: _nullishCoalesce(_optionalChain([e, 'access', _47 => _47.overrides, 'optionalAccess', _48 => _48.chainSlug]), () => ( Ln(this.isProduction, this.isDevelopment)))
1382
1380
  });
1381
+ this.l1ChainId = v(this);
1382
+ this.l2ChainId = _nullishCoalesce(_optionalChain([e, 'access', _49 => _49.overrides, 'optionalAccess', _50 => _50.l2ChainId]), () => ( A(this)));
1383
1383
  this.overrides = _nullishCoalesce(e.overrides, () => ( {}));
1384
1384
  }
1385
1385
  // eslint-disable-next-line class-methods-use-this
1386
1386
  get sdkVersion() {
1387
- return le();
1387
+ return pe();
1388
1388
  }
1389
- }, _class3);
1389
+ }, _class2);
1390
1390
 
1391
1391
  // src/utils/utils.ts
1392
1392
  var T = (r = "", e = "") => r.toLowerCase() === e.toLowerCase();
1393
- var Qt = (r) => r === 15003 || r === 13473 || r === 13371;
1394
- var Dn = (r, e) => {
1393
+ var zt = (r) => r === 15003 || r === 13473 || r === 13371;
1394
+ var Fn = (r, e) => {
1395
1395
  const t = r.indexOf(".");
1396
1396
  const n = r.substring(t + e + 1);
1397
1397
  if (n && parseFloat(n) >= 1) {
@@ -1401,15 +1401,15 @@ var Dn = (r, e) => {
1401
1401
  }
1402
1402
  return parseFloat(r.substring(0, t + e + 1)).toString();
1403
1403
  };
1404
- var Q = (r, e = Ot) => {
1404
+ var K = (r, e = Mt) => {
1405
1405
  const t = r.indexOf(".");
1406
1406
  if (t === -1) return r;
1407
- const n = Dn(r, e);
1407
+ const n = Fn(r, e);
1408
1408
  return n;
1409
1409
  };
1410
1410
 
1411
1411
  // src/tokens/tokens.ts
1412
- var Un = "native";
1412
+ var Gn = "native";
1413
1413
  var H = async (r, {
1414
1414
  type: e = "all",
1415
1415
  chainId: t,
@@ -1418,33 +1418,33 @@ var H = async (r, {
1418
1418
  let o = [];
1419
1419
  let a;
1420
1420
  let s;
1421
- const i = _nullishCoalesce(t, () => ( N(r)));
1421
+ const i = _nullishCoalesce(t, () => ( v(r)));
1422
1422
  const c = A(r);
1423
1423
  switch (e) {
1424
1424
  case "swap":
1425
1425
  o = await r.tokens.getTokensConfig(c);
1426
- s = (await _asyncOptionalChain([(await r.remote.getConfig("dex")), 'optionalAccess', async _41 => _41.blocklist]) || []).map((d) => d.address.toLowerCase());
1426
+ s = (await _asyncOptionalChain([(await r.remote.getConfig("dex")), 'optionalAccess', async _51 => _51.blocklist]) || []).map((d) => d.address.toLowerCase());
1427
1427
  o = o.filter((d) => d.address && !s.includes(d.address));
1428
1428
  break;
1429
1429
  case "onramp":
1430
1430
  a = await r.remote.getConfig("onramp");
1431
1431
  if (!a) o = [];
1432
- o = _optionalChain([a, 'access', _42 => _42["201811419111"], 'optionalAccess', _43 => _43.tokens]) || [];
1432
+ o = _optionalChain([a, 'access', _52 => _52["201811419111"], 'optionalAccess', _53 => _53.tokens]) || [];
1433
1433
  break;
1434
1434
  case "bridge":
1435
- o = (await r.tokens.getTokensConfig(i)).filter((d) => d.bridge === Un);
1435
+ o = (await r.tokens.getTokensConfig(i)).filter((d) => d.bridge === Gn);
1436
1436
  break;
1437
1437
  case "all":
1438
1438
  default:
1439
1439
  o = await r.tokens.getTokensConfig(i);
1440
1440
  }
1441
- if (!n || _optionalChain([n, 'optionalAccess', _44 => _44.length]) === 0) return { tokens: o };
1441
+ if (!n || _optionalChain([n, 'optionalAccess', _54 => _54.length]) === 0) return { tokens: o };
1442
1442
  return {
1443
1443
  tokens: o.filter((d) => !n.map((p) => p.address).includes(d.address || ""))
1444
1444
  };
1445
1445
  };
1446
1446
  var O = (r) => !r || T(r, _);
1447
- async function _e(r, e) {
1447
+ async function Oe(r, e) {
1448
1448
  return await x(
1449
1449
  async () => {
1450
1450
  const t = new (0, _ethers.Contract)(e, JSON.stringify(L), r);
@@ -1468,8 +1468,8 @@ async function _e(r, e) {
1468
1468
 
1469
1469
 
1470
1470
 
1471
- var qn = 5;
1472
- var Ie = (_class4 = class {
1471
+ var jn = 5;
1472
+ var he = (_class3 = class {
1473
1473
 
1474
1474
 
1475
1475
 
@@ -1502,7 +1502,7 @@ var Ie = (_class4 = class {
1502
1502
  symbol: o.symbol
1503
1503
  };
1504
1504
  this.cacheMap = {};
1505
- this.ttl = n !== void 0 ? n : qn;
1505
+ this.ttl = n !== void 0 ? n : jn;
1506
1506
  }
1507
1507
  /**
1508
1508
  * isChainSupported verifies if the chain is supported by Blockscout
@@ -1529,11 +1529,11 @@ var Ie = (_class4 = class {
1529
1529
  if (n) return Promise.resolve(n);
1530
1530
  const o = await this.httpClient.get(t);
1531
1531
  const a = {
1532
- items: _optionalChain([o, 'access', _45 => _45.data, 'optionalAccess', _46 => _46.items, 'optionalAccess', _47 => _47.filter, 'call', _48 => _48(
1532
+ items: _optionalChain([o, 'access', _55 => _55.data, 'optionalAccess', _56 => _56.items, 'optionalAccess', _57 => _57.filter, 'call', _58 => _58(
1533
1533
  (s) => s.token.address && s.token.address !== this.nativeToken.address
1534
1534
  )]),
1535
1535
  // eslint-disable-next-line @typescript-eslint/naming-convention
1536
- next_page_params: _optionalChain([o, 'access', _49 => _49.data, 'optionalAccess', _50 => _50.next_page_params])
1536
+ next_page_params: _optionalChain([o, 'access', _59 => _59.data, 'optionalAccess', _60 => _60.next_page_params])
1537
1537
  };
1538
1538
  this.setCache(t, a);
1539
1539
  return Promise.resolve(a);
@@ -1541,7 +1541,7 @@ var Ie = (_class4 = class {
1541
1541
  let n = _axios.HttpStatusCode.InternalServerError;
1542
1542
  let o = "InternalServerError";
1543
1543
  if (_axios2.default.isAxiosError(t)) {
1544
- n = _optionalChain([t, 'access', _51 => _51.response, 'optionalAccess', _52 => _52.status]) || n;
1544
+ n = _optionalChain([t, 'access', _61 => _61.response, 'optionalAccess', _62 => _62.status]) || n;
1545
1545
  o = t.message;
1546
1546
  }
1547
1547
  return Promise.reject({ code: n, message: o });
@@ -1568,16 +1568,16 @@ var Ie = (_class4 = class {
1568
1568
  let n = _axios.HttpStatusCode.InternalServerError;
1569
1569
  let o = "InternalServerError";
1570
1570
  if (_axios2.default.isAxiosError(t)) {
1571
- n = _optionalChain([t, 'access', _53 => _53.response, 'optionalAccess', _54 => _54.status]) || n;
1571
+ n = _optionalChain([t, 'access', _63 => _63.response, 'optionalAccess', _64 => _64.status]) || n;
1572
1572
  o = t.message;
1573
1573
  }
1574
1574
  return Promise.reject({ code: n, message: o });
1575
1575
  }
1576
1576
  }
1577
- }, _class4.__initStatic(), _class4.__initStatic2(), _class4);
1577
+ }, _class3.__initStatic(), _class3.__initStatic2(), _class3);
1578
1578
 
1579
1579
  // src/logger/debugLogger.ts
1580
- var ct = (r, e, t) => {
1580
+ var dt = (r, e, t) => {
1581
1581
  if (!r.isProduction) console.info(e, t);
1582
1582
  };
1583
1583
  var S = async (r, e, t) => {
@@ -1585,14 +1585,14 @@ var S = async (r, e, t) => {
1585
1585
  const o = await t;
1586
1586
  const a = performance.now();
1587
1587
  const s = (a - n) / 1e3;
1588
- ct(r, e, s);
1588
+ dt(r, e, s);
1589
1589
  return o;
1590
1590
  };
1591
1591
 
1592
1592
  // src/balances/balances.ts
1593
- var ut = async (r, e, t) => await x(
1593
+ var mt = async (r, e, t) => await x(
1594
1594
  async () => {
1595
- const n = await Ce(r, e);
1595
+ const n = await Te(r, e);
1596
1596
  if (!n.isSupported) {
1597
1597
  throw new l(
1598
1598
  `Chain:${n.chainId} is not a supported chain`,
@@ -1612,7 +1612,7 @@ var ut = async (r, e, t) => await x(
1612
1612
  },
1613
1613
  { type: "GET_BALANCE_ERROR" }
1614
1614
  );
1615
- async function mt(r, e, t) {
1615
+ async function ft(r, e, t) {
1616
1616
  return await x(
1617
1617
  async () => {
1618
1618
  const n = new (0, _ethers.Contract)(
@@ -1621,7 +1621,7 @@ async function mt(r, e, t) {
1621
1621
  r
1622
1622
  );
1623
1623
  return Promise.all([
1624
- _e(r, t),
1624
+ Oe(r, t),
1625
1625
  n.balanceOf(e)
1626
1626
  ]).then(([o, a]) => {
1627
1627
  const s = _ethers.formatUnits.call(void 0, a, o.decimals);
@@ -1640,19 +1640,19 @@ async function mt(r, e, t) {
1640
1640
  { type: "GET_ERC20_BALANCE_ERROR" }
1641
1641
  );
1642
1642
  }
1643
- var lt = /* @__PURE__ */ new Map();
1644
- var ft = () => lt.clear();
1645
- var Vn = async (r, e, t, n) => {
1643
+ var pt = /* @__PURE__ */ new Map();
1644
+ var Et = () => pt.clear();
1645
+ var Hn = async (r, e, t, n) => {
1646
1646
  const o = n !== void 0;
1647
1647
  const a = Object.assign(
1648
1648
  {},
1649
- ...(_nullishCoalesce(n, () => ( []))).map((m) => ({ [_optionalChain([m, 'access', _55 => _55.address, 'optionalAccess', _56 => _56.toLowerCase, 'call', _57 => _57()]) || _]: m }))
1649
+ ...(_nullishCoalesce(n, () => ( []))).map((m) => ({ [_optionalChain([m, 'access', _65 => _65.address, 'optionalAccess', _66 => _66.toLowerCase, 'call', _67 => _67()]) || _]: m }))
1650
1650
  );
1651
- let s = lt.get(t);
1651
+ let s = pt.get(t);
1652
1652
  if (!s) {
1653
1653
  const m = r.remote.getHttpClient();
1654
- s = new Ie(m, t);
1655
- lt.set(t, s);
1654
+ s = new he(m, t);
1655
+ pt.set(t, s);
1656
1656
  }
1657
1657
  const i = [];
1658
1658
  const c = "ERC-20";
@@ -1663,12 +1663,12 @@ var Vn = async (r, e, t, n) => {
1663
1663
  E = await m.getTokensByWalletAddress({
1664
1664
  walletAddress: e,
1665
1665
  tokenType: c,
1666
- nextPage: _optionalChain([E, 'optionalAccess', _58 => _58.next_page_params])
1666
+ nextPage: _optionalChain([E, 'optionalAccess', _68 => _68.next_page_params])
1667
1667
  });
1668
1668
  i.push(...E.items);
1669
1669
  } while (E.next_page_params);
1670
1670
  } catch (g) {
1671
- if (_optionalChain([g, 'optionalAccess', _59 => _59.code]) !== _axios.HttpStatusCode.NotFound) {
1671
+ if (_optionalChain([g, 'optionalAccess', _69 => _69.code]) !== _axios.HttpStatusCode.NotFound) {
1672
1672
  throw new l(
1673
1673
  g.message || "InternalServerError | getTokensByWalletAddress",
1674
1674
  "GET_INDEXER_BALANCE_ERROR",
@@ -1683,7 +1683,7 @@ var Vn = async (r, e, t, n) => {
1683
1683
  E.token.address ||= _;
1684
1684
  i.push(E);
1685
1685
  } catch (E) {
1686
- if (_optionalChain([E, 'optionalAccess', _60 => _60.code]) !== _axios.HttpStatusCode.NotFound) {
1686
+ if (_optionalChain([E, 'optionalAccess', _70 => _70.code]) !== _axios.HttpStatusCode.NotFound) {
1687
1687
  throw new l(
1688
1688
  E.message || "InternalServerError | getNativeTokenByWalletAddress",
1689
1689
  "GET_INDEXER_BALANCE_ERROR",
@@ -1716,31 +1716,31 @@ var Vn = async (r, e, t, n) => {
1716
1716
  });
1717
1717
  return { balances: u };
1718
1718
  };
1719
- var Hn = async (r, e, t, n) => {
1719
+ var zn = async (r, e, t, n) => {
1720
1720
  const o = [];
1721
- n.forEach((i) => {
1722
- if (!i.address || T(i.address, _)) {
1721
+ n.forEach((s) => {
1722
+ if (!s.address || T(s.address, _)) {
1723
1723
  o.push(
1724
- ut(r, e, t)
1724
+ mt(r, e, t)
1725
1725
  );
1726
1726
  } else {
1727
1727
  o.push(
1728
- mt(e, t, i.address)
1728
+ ft(e, t, s.address)
1729
1729
  );
1730
1730
  }
1731
1731
  });
1732
1732
  const a = await Promise.allSettled(o);
1733
- const s = a.filter(
1734
- (i) => i.status === "fulfilled"
1735
- ).map((i) => {
1736
- const c = i;
1737
- const { token: d } = c.value;
1738
- if (!d.address || T(d.address, _)) c.value.token.address = _;
1739
- return c.value;
1740
- });
1741
- return { balances: s };
1733
+ return a.reduce((s, i) => {
1734
+ if (i.status !== "fulfilled" || i.value.balance === 0n) return s;
1735
+ const { value: c } = i;
1736
+ if (!c.token.address || T(c.token.address, _)) {
1737
+ c.token.address = _;
1738
+ }
1739
+ s.balances.push(c);
1740
+ return s;
1741
+ }, { balances: new Array() });
1742
1742
  };
1743
- var Jt = async (r, e, t, n, o) => {
1743
+ var Zt = async (r, e, t, n, o) => {
1744
1744
  if (!e) {
1745
1745
  throw new l(
1746
1746
  "indexer is disabled for this chain, you must provide a provider.",
@@ -1752,7 +1752,7 @@ var Jt = async (r, e, t, n, o) => {
1752
1752
  return await S(
1753
1753
  r,
1754
1754
  `Time to fetch balances using RPC for ${n}`,
1755
- Hn(r, e, a, o)
1755
+ zn(r, e, a, o)
1756
1756
  );
1757
1757
  };
1758
1758
  var q = async (r, e, t, n, o = false) => {
@@ -1776,29 +1776,29 @@ var q = async (r, e, t, n, o = false) => {
1776
1776
  }
1777
1777
  );
1778
1778
  if (o) {
1779
- ft();
1779
+ Et();
1780
1780
  }
1781
- if (Ie.isChainSupported(n)) {
1782
- const s = await _asyncNullishCoalesce(t, async () => ( await await _asyncOptionalChain([(await _optionalChain([e, 'optionalAccess', _61 => _61.getSigner, 'call', _62 => _62()])), 'optionalAccess', async _63 => _63.getAddress, 'call', async _64 => _64()])));
1781
+ if (he.isChainSupported(n)) {
1782
+ const s = await _asyncNullishCoalesce(t, async () => ( await await _asyncOptionalChain([(await _optionalChain([e, 'optionalAccess', _71 => _71.getSigner, 'call', _72 => _72()])), 'optionalAccess', async _73 => _73.getAddress, 'call', async _74 => _74()])));
1783
1783
  try {
1784
1784
  return await S(
1785
1785
  r,
1786
1786
  `Time to fetch balances using blockscout for ${n}`,
1787
- Vn(r, s, n, a)
1787
+ Hn(r, s, n, a)
1788
1788
  );
1789
1789
  } catch (i) {
1790
- if (i.type === "GET_INDEXER_BALANCE_ERROR" && _optionalChain([i, 'access', _65 => _65.data, 'optionalAccess', _66 => _66.error, 'optionalAccess', _67 => _67.code]) === _axios.HttpStatusCode.TooManyRequests) {
1791
- return Jt(r, e, t, n, a);
1790
+ if (i.type === "GET_INDEXER_BALANCE_ERROR" && _optionalChain([i, 'access', _75 => _75.data, 'optionalAccess', _76 => _76.error, 'optionalAccess', _77 => _77.code]) === _axios.HttpStatusCode.TooManyRequests) {
1791
+ return Zt(r, e, t, n, a);
1792
1792
  }
1793
1793
  throw i;
1794
1794
  }
1795
1795
  }
1796
- return Jt(r, e, t, n, a);
1796
+ return Zt(r, e, t, n, a);
1797
1797
  };
1798
1798
 
1799
1799
  // src/connect/connect.ts
1800
- async function $t(r) {
1801
- if (!_optionalChain([r, 'optionalAccess', _68 => _68.send])) {
1800
+ async function Yt(r) {
1801
+ if (!_optionalChain([r, 'optionalAccess', _78 => _78.send])) {
1802
1802
  throw new l(
1803
1803
  "Check wallet connection request failed",
1804
1804
  "PROVIDER_REQUEST_FAILED_ERROR",
@@ -1825,7 +1825,7 @@ async function $t(r) {
1825
1825
  walletAddress: _nullishCoalesce(e[0], () => ( ""))
1826
1826
  };
1827
1827
  }
1828
- async function Xt(r) {
1828
+ async function Jt(r) {
1829
1829
  if (!r || !r.send) {
1830
1830
  throw new l(
1831
1831
  "Incompatible provider",
@@ -1842,7 +1842,7 @@ async function Xt(r) {
1842
1842
  );
1843
1843
  return r;
1844
1844
  }
1845
- async function er(r) {
1845
+ async function $t(r) {
1846
1846
  if (!r || !r.send) {
1847
1847
  throw new l(
1848
1848
  "Incompatible provider",
@@ -1861,7 +1861,7 @@ async function er(r) {
1861
1861
  }
1862
1862
 
1863
1863
  // src/fiatRamp/fiatRamp.ts
1864
- var Oe = class {
1864
+ var Me = class {
1865
1865
 
1866
1866
  /**
1867
1867
  * Constructs a new instance of the FiatRampService class.
@@ -1874,7 +1874,7 @@ var Oe = class {
1874
1874
  const e = await this.config.remote.getConfig(
1875
1875
  "onramp"
1876
1876
  );
1877
- return _optionalChain([e, 'access', _69 => _69["201811419111"], 'optionalAccess', _70 => _70.fees]);
1877
+ return _optionalChain([e, 'access', _79 => _79["201811419111"], 'optionalAccess', _80 => _80.fees]);
1878
1878
  }
1879
1879
  async createWidgetUrl(e) {
1880
1880
  return await this.getTransakWidgetUrl(e);
@@ -1883,7 +1883,7 @@ var Oe = class {
1883
1883
  const t = await this.config.remote.getConfig(
1884
1884
  "onramp"
1885
1885
  );
1886
- const n = bt[this.config.environment];
1886
+ const n = Lt[this.config.environment];
1887
1887
  let o = {
1888
1888
  apiKey: t["201811419111"].publishableApiKey,
1889
1889
  network: "immutablezkevm",
@@ -1924,7 +1924,7 @@ var Oe = class {
1924
1924
  if (e.allowedTokens) {
1925
1925
  o = {
1926
1926
  ...o,
1927
- cryptoCurrencyList: _optionalChain([e, 'access', _71 => _71.allowedTokens, 'optionalAccess', _72 => _72.join, 'call', _73 => _73(","), 'access', _74 => _74.toLowerCase, 'call', _75 => _75()])
1927
+ cryptoCurrencyList: _optionalChain([e, 'access', _81 => _81.allowedTokens, 'optionalAccess', _82 => _82.join, 'call', _83 => _83(","), 'access', _84 => _84.toLowerCase, 'call', _85 => _85()])
1928
1928
  };
1929
1929
  }
1930
1930
  return `${n}?${new URLSearchParams(o).toString()}`;
@@ -1938,8 +1938,8 @@ var Oe = class {
1938
1938
 
1939
1939
 
1940
1940
  var _bridgesdk = require('@imtbl/bridge-sdk');
1941
- async function rr(r, e, t, n) {
1942
- const o = e === N(n) ? _bridgesdk.BridgeFeeActions.DEPOSIT : _bridgesdk.BridgeFeeActions.WITHDRAW;
1941
+ async function er(r, e, t, n) {
1942
+ const o = e === v(n) ? _bridgesdk.BridgeFeeActions.DEPOSIT : _bridgesdk.BridgeFeeActions.WITHDRAW;
1943
1943
  return await r.getFee({
1944
1944
  action: o,
1945
1945
  gasMultiplier: "auto",
@@ -1962,7 +1962,7 @@ async function rr(r, e, t, n) {
1962
1962
  var _dexsdk = require('@imtbl/dex-sdk');
1963
1963
  var _orderbook = require('@imtbl/orderbook');
1964
1964
  var _blockchaindata = require('@imtbl/blockchain-data');
1965
- function Me(r, e, t, n) {
1965
+ function Be(r, e, t, n) {
1966
1966
  const o = t.get(r);
1967
1967
  const a = t.get(e);
1968
1968
  if (!o) {
@@ -1988,7 +1988,7 @@ function Me(r, e, t, n) {
1988
1988
  });
1989
1989
  return new (0, _bridgesdk.TokenBridge)(i);
1990
1990
  }
1991
- async function oe(r, e) {
1991
+ async function ae(r, e) {
1992
1992
  const t = await e.remote.getConfig(
1993
1993
  "dex"
1994
1994
  );
@@ -1997,18 +1997,18 @@ async function oe(r, e) {
1997
1997
  baseConfig: new (0, _config.ImmutableConfiguration)({
1998
1998
  environment: e.environment
1999
1999
  }),
2000
- overrides: _optionalChain([t, 'optionalAccess', _76 => _76.overrides]),
2001
- secondaryFees: _optionalChain([t, 'optionalAccess', _77 => _77.secondaryFees])
2000
+ overrides: _optionalChain([t, 'optionalAccess', _86 => _86.overrides]),
2001
+ secondaryFees: _optionalChain([t, 'optionalAccess', _87 => _87.secondaryFees])
2002
2002
  });
2003
2003
  }
2004
- function ae(r) {
2004
+ function se(r) {
2005
2005
  return new (0, _orderbook.Orderbook)({
2006
2006
  baseConfig: {
2007
2007
  environment: r.environment
2008
2008
  }
2009
2009
  });
2010
2010
  }
2011
- function Be(r) {
2011
+ function xe(r) {
2012
2012
  return new (0, _blockchaindata.BlockchainData)({
2013
2013
  baseConfig: {
2014
2014
  environment: r.environment
@@ -2020,26 +2020,26 @@ function Be(r) {
2020
2020
 
2021
2021
 
2022
2022
 
2023
- function or(r, e, t) {
2023
+ function rr(r, e, t) {
2024
2024
  return new (0, _ethers.Contract)(r, e, t);
2025
2025
  }
2026
2026
 
2027
2027
  // src/gasEstimate/gasEstimator.ts
2028
- var oo = "0x0000000000000000000000000000000000000001";
2029
- var ar = 18;
2030
- async function ao(r, e) {
2031
- const t = N(e);
2028
+ var ao = "0x0000000000000000000000000000000000000001";
2029
+ var nr = 18;
2030
+ async function so(r, e) {
2031
+ const t = v(e);
2032
2032
  const n = A(e);
2033
2033
  const o = r.get(t);
2034
2034
  if (!o) throw new Error(`Missing JsonRpcProvider for chain id: ${t}`);
2035
2035
  try {
2036
- const a = Me(
2036
+ const a = Be(
2037
2037
  t,
2038
2038
  n,
2039
2039
  r,
2040
2040
  e
2041
2041
  );
2042
- const s = await rr(
2042
+ const s = await er(
2043
2043
  a,
2044
2044
  t,
2045
2045
  n,
@@ -2048,7 +2048,7 @@ async function ao(r, e) {
2048
2048
  return {
2049
2049
  gasEstimateType: "BRIDGE_TO_L2",
2050
2050
  fees: s,
2051
- token: _optionalChain([e, 'access', _78 => _78.networkMap, 'access', _79 => _79.get, 'call', _80 => _80(t), 'optionalAccess', _81 => _81.nativeCurrency])
2051
+ token: _optionalChain([e, 'access', _88 => _88.networkMap, 'access', _89 => _89.get, 'call', _90 => _90(t), 'optionalAccess', _91 => _91.nativeCurrency])
2052
2052
  };
2053
2053
  } catch (e2) {
2054
2054
  return {
@@ -2060,23 +2060,23 @@ async function ao(r, e) {
2060
2060
  imtblFee: BigInt(0),
2061
2061
  totalFees: BigInt(0)
2062
2062
  },
2063
- token: _optionalChain([e, 'access', _82 => _82.networkMap, 'access', _83 => _83.get, 'call', _84 => _84(t), 'optionalAccess', _85 => _85.nativeCurrency])
2063
+ token: _optionalChain([e, 'access', _92 => _92.networkMap, 'access', _93 => _93.get, 'call', _94 => _94(t), 'optionalAccess', _95 => _95.nativeCurrency])
2064
2064
  };
2065
2065
  }
2066
2066
  }
2067
- async function so(r) {
2067
+ async function io(r) {
2068
2068
  const e = A(r);
2069
2069
  const t = await r.remote.getConfig(
2070
2070
  "gasEstimateTokens"
2071
2071
  );
2072
2072
  const { inAddress: n, outAddress: o } = t[e].swapAddresses;
2073
2073
  try {
2074
- const a = await oe(e, r);
2074
+ const a = await ae(e, r);
2075
2075
  const { swap: s } = await a.getUnsignedSwapTxFromAmountIn(
2076
- oo,
2076
+ ao,
2077
2077
  n,
2078
2078
  o,
2079
- BigInt(_ethers.parseUnits.call(void 0, "1", ar))
2079
+ BigInt(_ethers.parseUnits.call(void 0, "1", nr))
2080
2080
  );
2081
2081
  if (!s.gasFeeEstimate) {
2082
2082
  return {
@@ -2092,7 +2092,7 @@ async function so(r) {
2092
2092
  address: s.gasFeeEstimate.token.address,
2093
2093
  symbol: _nullishCoalesce(s.gasFeeEstimate.token.symbol, () => ( "")),
2094
2094
  name: _nullishCoalesce(s.gasFeeEstimate.token.name, () => ( "")),
2095
- decimals: _nullishCoalesce(s.gasFeeEstimate.token.decimals, () => ( ar))
2095
+ decimals: _nullishCoalesce(s.gasFeeEstimate.token.decimals, () => ( nr))
2096
2096
  }
2097
2097
  }
2098
2098
  };
@@ -2103,15 +2103,15 @@ async function so(r) {
2103
2103
  };
2104
2104
  }
2105
2105
  }
2106
- async function sr(r, e, t) {
2106
+ async function or(r, e, t) {
2107
2107
  switch (r.gasEstimateType) {
2108
2108
  case "BRIDGE_TO_L2":
2109
- return await ao(
2109
+ return await so(
2110
2110
  e,
2111
2111
  t
2112
2112
  );
2113
2113
  case "SWAP":
2114
- return await so(t);
2114
+ return await io(t);
2115
2115
  default:
2116
2116
  throw new l(
2117
2117
  "Invalid type provided for gasEstimateType",
@@ -2121,9 +2121,9 @@ async function sr(r, e, t) {
2121
2121
  }
2122
2122
 
2123
2123
  // src/gasEstimate/gasPriceInWei.ts
2124
- var io = (r) => !!r.maxFeePerGas && !!r.maxPriorityFeePerGas;
2125
- var Et = (r) => {
2126
- if (io(r)) {
2124
+ var co = (r) => !!r.maxFeePerGas && !!r.maxPriorityFeePerGas;
2125
+ var gt = (r) => {
2126
+ if (co(r)) {
2127
2127
  const { maxFeePerGas: e, maxPriorityFeePerGas: t } = r;
2128
2128
  if (e === null || t === null) return null;
2129
2129
  const n = (e - t) / BigInt(2);
@@ -2137,7 +2137,7 @@ var Et = (r) => {
2137
2137
  var _detectprovider = require('@metamask/detect-provider'); var _detectprovider2 = _interopRequireDefault(_detectprovider);
2138
2138
 
2139
2139
  // src/provider/injected/utils.ts
2140
- function gt(r) {
2140
+ function Rt(r) {
2141
2141
  if (typeof window === "undefined") return;
2142
2142
  const e = (t) => r(t.detail);
2143
2143
  window.addEventListener("eip6963:announceProvider", e);
@@ -2146,10 +2146,10 @@ function gt(r) {
2146
2146
  }
2147
2147
 
2148
2148
  // src/provider/injected/store.ts
2149
- function Rt() {
2149
+ function Ct() {
2150
2150
  const r = /* @__PURE__ */ new Set();
2151
2151
  let e = [];
2152
- const t = () => gt((o) => {
2152
+ const t = () => Rt((o) => {
2153
2153
  if (e.some(
2154
2154
  ({ info: a }) => a.uuid === o.info.uuid
2155
2155
  )) return;
@@ -2169,7 +2169,7 @@ function Rt() {
2169
2169
  destroy() {
2170
2170
  this.clear();
2171
2171
  r.clear();
2172
- _optionalChain([n, 'optionalCall', _86 => _86()]);
2172
+ _optionalChain([n, 'optionalCall', _96 => _96()]);
2173
2173
  },
2174
2174
  findProvider({ rdns: o }) {
2175
2175
  return e.find(
@@ -2181,7 +2181,7 @@ function Rt() {
2181
2181
  },
2182
2182
  reset() {
2183
2183
  this.clear();
2184
- _optionalChain([n, 'optionalCall', _87 => _87()]);
2184
+ _optionalChain([n, 'optionalCall', _97 => _97()]);
2185
2185
  n = t();
2186
2186
  },
2187
2187
  subscribe(o, { emitImmediately: a } = {}) {
@@ -2193,13 +2193,13 @@ function Rt() {
2193
2193
  }
2194
2194
 
2195
2195
  // src/provider/injectedProvidersManager.ts
2196
- var D = (_class5 = class r {
2196
+ var D = (_class4 = class r {
2197
2197
 
2198
2198
 
2199
2199
 
2200
- __init7() {this.isInit = false}
2201
- constructor() {;_class5.prototype.__init7.call(this);
2202
- this.store = Rt();
2200
+ __init4() {this.isInit = false}
2201
+ constructor() {;_class4.prototype.__init4.call(this);
2202
+ this.store = Ct();
2203
2203
  this.store.reset();
2204
2204
  }
2205
2205
  static getInstance() {
@@ -2239,34 +2239,34 @@ var D = (_class5 = class r {
2239
2239
  destroy() {
2240
2240
  this.store.destroy();
2241
2241
  }
2242
- }, _class5);
2242
+ }, _class4);
2243
2243
 
2244
2244
  // src/provider/providerDetail.ts
2245
- var xe = {
2245
+ var be = {
2246
2246
  name: "MetaMask",
2247
2247
  rdns: "io.metamask",
2248
2248
  // eslint-disable-next-line max-len
2249
2249
  icon: "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMzIiB2aWV3Qm94PSIwIDAgMzUgMzMiIHdpZHRoPSIzNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjI1Ij48cGF0aCBkPSJtMzIuOTU4MiAxLTEzLjEzNDEgOS43MTgzIDIuNDQyNC01LjcyNzMxeiIgZmlsbD0iI2UxNzcyNiIgc3Ryb2tlPSIjZTE3NzI2Ii8+PGcgZmlsbD0iI2UyNzYyNSIgc3Ryb2tlPSIjZTI3NjI1Ij48cGF0aCBkPSJtMi42NjI5NiAxIDEzLjAxNzE0IDkuODA5LTIuMzI1NC01LjgxODAyeiIvPjxwYXRoIGQ9Im0yOC4yMjk1IDIzLjUzMzUtMy40OTQ3IDUuMzM4NiA3LjQ4MjkgMi4wNjAzIDIuMTQzNi03LjI4MjN6Ii8+PHBhdGggZD0ibTEuMjcyODEgMjMuNjUwMSAyLjEzMDU1IDcuMjgyMyA3LjQ2OTk0LTIuMDYwMy0zLjQ4MTY2LTUuMzM4NnoiLz48cGF0aCBkPSJtMTAuNDcwNiAxNC41MTQ5LTIuMDc4NiAzLjEzNTggNy40MDUuMzM2OS0uMjQ2OS03Ljk2OXoiLz48cGF0aCBkPSJtMjUuMTUwNSAxNC41MTQ5LTUuMTU3NS00LjU4NzA0LS4xNjg4IDguMDU5NzQgNy40MDQ5LS4zMzY5eiIvPjxwYXRoIGQ9Im0xMC44NzMzIDI4Ljg3MjEgNC40ODE5LTIuMTYzOS0zLjg1ODMtMy4wMDYyeiIvPjxwYXRoIGQ9Im0yMC4yNjU5IDI2LjcwODIgNC40Njg5IDIuMTYzOS0uNjEwNS01LjE3MDF6Ii8+PC9nPjxwYXRoIGQ9Im0yNC43MzQ4IDI4Ljg3MjEtNC40NjktMi4xNjM5LjM2MzggMi45MDI1LS4wMzkgMS4yMzF6IiBmaWxsPSIjZDViZmIyIiBzdHJva2U9IiNkNWJmYjIiLz48cGF0aCBkPSJtMTAuODczMiAyOC44NzIxIDQuMTU3MiAxLjk2OTYtLjAyNi0xLjIzMS4zNTA4LTIuOTAyNXoiIGZpbGw9IiNkNWJmYjIiIHN0cm9rZT0iI2Q1YmZiMiIvPjxwYXRoIGQ9Im0xNS4xMDg0IDIxLjc4NDItMy43MTU1LTEuMDg4NCAyLjYyNDMtMS4yMDUxeiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3Ii8+PHBhdGggZD0ibTIwLjUxMjYgMjEuNzg0MiAxLjA5MTMtMi4yOTM1IDIuNjM3MiAxLjIwNTF6IiBmaWxsPSIjMjMzNDQ3IiBzdHJva2U9IiMyMzM0NDciLz48cGF0aCBkPSJtMTAuODczMyAyOC44NzIxLjY0OTUtNS4zMzg2LTQuMTMxMTcuMTE2N3oiIGZpbGw9IiNjYzYyMjgiIHN0cm9rZT0iI2NjNjIyOCIvPjxwYXRoIGQ9Im0yNC4wOTgyIDIzLjUzMzUuNjM2NiA1LjMzODYgMy40OTQ2LTUuMjIxOXoiIGZpbGw9IiNjYzYyMjgiIHN0cm9rZT0iI2NjNjIyOCIvPjxwYXRoIGQ9Im0yNy4yMjkxIDE3LjY1MDctNy40MDUuMzM2OS42ODg1IDMuNzk2NiAxLjA5MTMtMi4yOTM1IDIuNjM3MiAxLjIwNTF6IiBmaWxsPSIjY2M2MjI4IiBzdHJva2U9IiNjYzYyMjgiLz48cGF0aCBkPSJtMTEuMzkyOSAyMC42OTU4IDIuNjI0Mi0xLjIwNTEgMS4wOTEzIDIuMjkzNS42ODg1LTMuNzk2Ni03LjQwNDk1LS4zMzY5eiIgZmlsbD0iI2NjNjIyOCIgc3Ryb2tlPSIjY2M2MjI4Ii8+PHBhdGggZD0ibTguMzkyIDE3LjY1MDcgMy4xMDQ5IDYuMDUxMy0uMTAzOS0zLjAwNjJ6IiBmaWxsPSIjZTI3NTI1IiBzdHJva2U9IiNlMjc1MjUiLz48cGF0aCBkPSJtMjQuMjQxMiAyMC42OTU4LS4xMTY5IDMuMDA2MiAzLjEwNDktNi4wNTEzeiIgZmlsbD0iI2UyNzUyNSIgc3Ryb2tlPSIjZTI3NTI1Ii8+PHBhdGggZD0ibTE1Ljc5NyAxNy45ODc2LS42ODg2IDMuNzk2Ny44NzA0IDQuNDgzMy4xOTQ5LTUuOTA4N3oiIGZpbGw9IiNlMjc1MjUiIHN0cm9rZT0iI2UyNzUyNSIvPjxwYXRoIGQ9Im0xOS44MjQyIDE3Ljk4NzYtLjM2MzggMi4zNTg0LjE4MTkgNS45MjE2Ljg3MDQtNC40ODMzeiIgZmlsbD0iI2UyNzUyNSIgc3Ryb2tlPSIjZTI3NTI1Ii8+PHBhdGggZD0ibTIwLjUxMjcgMjEuNzg0Mi0uODcwNCA0LjQ4MzQuNjIzNi40NDA2IDMuODU4NC0zLjAwNjIuMTE2OS0zLjAwNjJ6IiBmaWxsPSIjZjU4NDFmIiBzdHJva2U9IiNmNTg0MWYiLz48cGF0aCBkPSJtMTEuMzkyOSAyMC42OTU4LjEwNCAzLjAwNjIgMy44NTgzIDMuMDA2Mi42MjM2LS40NDA2LS44NzA0LTQuNDgzNHoiIGZpbGw9IiNmNTg0MWYiIHN0cm9rZT0iI2Y1ODQxZiIvPjxwYXRoIGQ9Im0yMC41OTA2IDMwLjg0MTcuMDM5LTEuMjMxLS4zMzc4LS4yODUxaC00Ljk2MjZsLS4zMjQ4LjI4NTEuMDI2IDEuMjMxLTQuMTU3Mi0xLjk2OTYgMS40NTUxIDEuMTkyMSAyLjk0ODkgMi4wMzQ0aDUuMDUzNmwyLjk2Mi0yLjAzNDQgMS40NDItMS4xOTIxeiIgZmlsbD0iI2MwYWM5ZCIgc3Ryb2tlPSIjYzBhYzlkIi8+PHBhdGggZD0ibTIwLjI2NTkgMjYuNzA4Mi0uNjIzNi0uNDQwNmgtMy42NjM1bC0uNjIzNi40NDA2LS4zNTA4IDIuOTAyNS4zMjQ4LS4yODUxaDQuOTYyNmwuMzM3OC4yODUxeiIgZmlsbD0iIzE2MTYxNiIgc3Ryb2tlPSIjMTYxNjE2Ii8+PHBhdGggZD0ibTMzLjUxNjggMTEuMzUzMiAxLjEwNDMtNS4zNjQ0Ny0xLjY2MjktNC45ODg3My0xMi42OTIzIDkuMzk0NCA0Ljg4NDYgNC4xMjA1IDYuODk4MyAyLjAwODUgMS41Mi0xLjc3NTItLjY2MjYtLjQ3OTUgMS4wNTIzLS45NTg4LS44MDU0LS42MjIgMS4wNTIzLS44MDM0eiIgZmlsbD0iIzc2M2UxYSIgc3Ryb2tlPSIjNzYzZTFhIi8+PHBhdGggZD0ibTEgNS45ODg3MyAxLjExNzI0IDUuMzY0NDctLjcxNDUxLjUzMTMgMS4wNjUyNy44MDM0LS44MDU0NS42MjIgMS4wNTIyOC45NTg4LS42NjI1NS40Nzk1IDEuNTE5OTcgMS43NzUyIDYuODk4MzUtMi4wMDg1IDQuODg0Ni00LjEyMDUtMTIuNjkyMzMtOS4zOTQ0eiIgZmlsbD0iIzc2M2UxYSIgc3Ryb2tlPSIjNzYzZTFhIi8+PHBhdGggZD0ibTMyLjA0ODkgMTYuNTIzNC02Ljg5ODMtMi4wMDg1IDIuMDc4NiAzLjEzNTgtMy4xMDQ5IDYuMDUxMyA0LjEwNTItLjA1MTloNi4xMzE4eiIgZmlsbD0iI2Y1ODQxZiIgc3Ryb2tlPSIjZjU4NDFmIi8+PHBhdGggZD0ibTEwLjQ3MDUgMTQuNTE0OS02Ljg5ODI4IDIuMDA4NS0yLjI5OTQ0IDcuMTI2N2g2LjExODgzbDQuMTA1MTkuMDUxOS0zLjEwNDg3LTYuMDUxM3oiIGZpbGw9IiNmNTg0MWYiIHN0cm9rZT0iI2Y1ODQxZiIvPjxwYXRoIGQ9Im0xOS44MjQxIDE3Ljk4NzYuNDQxNy03LjU5MzIgMi4wMDA3LTUuNDAzNGgtOC45MTE5bDIuMDAwNiA1LjQwMzQuNDQxNyA3LjU5MzIuMTY4OSAyLjM4NDIuMDEzIDUuODk1OGgzLjY2MzVsLjAxMy01Ljg5NTh6IiBmaWxsPSIjZjU4NDFmIiBzdHJva2U9IiNmNTg0MWYiLz48L2c+PC9zdmc+",
2250
2250
  uuid: "fb8e904e-1a71-454a-af65-dc1ee86311c3"
2251
2251
  };
2252
- var be = {
2252
+ var Le = {
2253
2253
  // eslint-disable-next-line max-len
2254
2254
  icon: 'data:image/svg+xml,<svg viewBox="0 0 48 48" class="SvgIcon undefined Logo Logo--PassportSymbolOutlined css-1dn9atd" xmlns="http://www.w3.org/2000/svg"><g data-testid="undefined__g"><circle cx="24" cy="24" r="22.5" fill="url(%23paint0_radial_6324_83922)"></circle><circle cx="24" cy="24" r="22.5" fill="url(%23paint1_radial_6324_83922)"></circle><path d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM23.0718 9.16608C23.7383 8.83951 24.4406 8.86188 25.087 9.2287C27.3282 10.5059 29.5627 11.7942 31.786 13.096C32.5018 13.5165 32.8686 14.1897 32.8708 15.0173C32.8843 17.9184 32.8798 20.8171 32.8708 23.7182C32.8708 23.8255 32.8015 23.9821 32.7143 24.0335C31.8531 24.548 30.9808 25.0423 30.0347 25.5881V25.1318C30.0347 22.148 30.0257 19.1664 30.0414 16.1827C30.0436 15.6101 29.8468 15.241 29.339 14.9525C26.7377 13.474 24.1499 11.9687 21.5575 10.4723C21.4457 10.4075 21.3361 10.3381 21.1661 10.2352C21.8326 9.85722 22.4321 9.47698 23.0673 9.16608H23.0718ZM22.5953 38.8451C22.45 38.7713 22.3426 38.7198 22.2375 38.6595C18.8041 36.68 15.3752 34.687 11.9307 32.7232C10.9644 32.173 10.5238 31.3879 10.5349 30.2852C10.5551 27.9411 10.5484 25.597 10.5372 23.2507C10.5327 22.1927 10.9622 21.4255 11.8926 20.8977C14.3105 19.5221 16.715 18.1264 19.1195 16.7284C19.3275 16.6076 19.4796 16.5875 19.6965 16.7172C20.5264 17.216 21.3719 17.6924 22.2554 18.2024C22.0876 18.3031 21.9601 18.3791 21.8304 18.4552C19.2268 19.9582 16.6278 21.4658 14.0175 22.9599C13.5903 23.2037 13.3912 23.5213 13.3957 24.0179C13.4091 25.8654 13.4114 27.713 13.3957 29.5605C13.3912 30.0705 13.5948 30.3948 14.0332 30.6453C16.7866 32.2199 19.5288 33.8125 22.28 35.3916C22.5126 35.5258 22.611 35.6645 22.6065 35.9418C22.5864 36.888 22.5998 37.8363 22.5998 38.8473L22.5953 38.8451ZM22.5953 33.553C22.356 33.4166 22.1838 33.3204 22.0116 33.2198C19.8285 31.9605 17.6477 30.6967 15.4602 29.4464C15.2231 29.3122 15.1359 29.1668 15.1381 28.8917C15.1538 27.4714 15.1471 26.0511 15.1426 24.6308C15.1426 24.4384 15.1717 24.3064 15.3618 24.1991C16.167 23.7495 16.9633 23.2798 17.7618 22.8212C17.8199 22.7877 17.8826 22.7631 17.9877 22.7116V24.3064C17.9877 25.1698 18.0011 26.0354 17.9832 26.8988C17.972 27.3909 18.1622 27.7241 18.5916 27.9657C19.8285 28.6636 21.0498 29.3883 22.2867 30.0839C22.5305 30.2203 22.6043 30.3724 22.5998 30.6408C22.5842 31.5847 22.5931 32.5308 22.5931 33.5508L22.5953 33.553ZM20.0746 14.91C19.6116 14.6371 19.2157 14.6393 18.7527 14.91C16.1581 16.4265 13.5523 17.9228 10.9487 19.4259C10.8391 19.4908 10.7251 19.5489 10.5305 19.6541C10.5998 18.6654 10.3873 17.7327 10.7251 16.8291C10.9085 16.3348 11.2529 15.9635 11.7092 15.6995C13.8811 14.4447 16.0507 13.1877 18.227 11.9396C19.0211 11.4833 19.8308 11.4945 20.6248 11.953C23.0964 13.3756 25.5657 14.8026 28.0306 16.2341C28.1357 16.2945 28.2677 16.4309 28.2677 16.5338C28.2856 17.5493 28.2788 18.567 28.2788 19.6563C27.3819 19.1396 26.5543 18.6609 25.7267 18.1823C23.8412 17.093 21.9512 16.0149 20.0746 14.91ZM37.4427 30.8779C37.3778 31.6764 36.9103 32.2423 36.2192 32.6404C33.5732 34.1614 30.9294 35.6913 28.2856 37.2168C27.4557 37.6954 26.6259 38.1741 25.7938 38.6527C25.6932 38.7109 25.5903 38.7601 25.4539 38.8317C25.4449 38.693 25.4337 38.5924 25.4337 38.4917C25.4337 37.6149 25.4382 36.7404 25.4293 35.8636C25.4293 35.6645 25.4762 35.5437 25.6596 35.4386C29.5157 33.2198 33.3696 30.9942 37.2212 28.7709C37.2794 28.7374 37.3443 28.7105 37.4539 28.6591C37.4539 29.4375 37.4986 30.1622 37.4427 30.8779ZM37.4628 25.3577C37.4561 26.2658 36.9663 26.9033 36.1901 27.3506C33.175 29.0841 30.1622 30.8265 27.1493 32.5666C26.5991 32.8842 26.0466 33.1996 25.4561 33.5396C25.4472 33.3897 25.436 33.2913 25.436 33.1907C25.436 32.3273 25.4449 31.4617 25.4293 30.5983C25.4248 30.3523 25.5075 30.2226 25.72 30.0995C28.46 28.5271 31.1911 26.9368 33.9355 25.3733C34.4231 25.096 34.6378 24.7538 34.6334 24.1812C34.6132 21.1974 34.6244 18.2136 34.6244 15.2298V14.7087C35.3402 15.1404 36.0112 15.496 36.624 15.9299C37.1832 16.3258 37.465 16.9253 37.4673 17.6164C37.4762 20.1976 37.4829 22.7788 37.465 25.3599L37.4628 25.3577Z" fill="%230D0D0D"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint2_radial_6324_83922)"></path><path fill-rule="evenodd" d="M24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 0 24 0ZM24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2Z" fill="url(%23paint3_radial_6324_83922)"></path><defs><radialGradient id="paint0_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(13.4442 13.3899) rotate(44.9817) scale(46.7487 99.1435)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint1_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(25.9515 43.7068) rotate(84.265) scale(24.2138 46.3215)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient><radialGradient id="paint2_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(12.7405 12.6825) rotate(44.9817) scale(49.8653 105.753)"><stop stop-color="%23A3EEF8"></stop><stop offset="0.177083" stop-color="%23A4DCF5"></stop><stop offset="0.380208" stop-color="%23A6AEEC"></stop><stop offset="1" stop-color="%23ECBEE1"></stop></radialGradient><radialGradient id="paint3_radial_6324_83922" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(26.0816 45.0206) rotate(84.265) scale(25.828 49.4096)"><stop stop-color="%23FCF5EE"></stop><stop offset="0.715135" stop-color="%23ECBEE1" stop-opacity="0"></stop></radialGradient></defs></g></svg>',
2255
2255
  name: "Immutable Passport",
2256
2256
  rdns: "com.immutable.passport",
2257
2257
  uuid: "b90118be-7234-4c89-b89b-d5d267663eb5"
2258
2258
  };
2259
- var lo = (r) => ({
2260
- info: be,
2259
+ var po = (r) => ({
2260
+ info: Le,
2261
2261
  provider: r
2262
2262
  });
2263
- var po = (r) => ({
2264
- info: xe,
2263
+ var uo = (r) => ({
2264
+ info: be,
2265
2265
  provider: r
2266
2266
  });
2267
2267
 
2268
2268
  // src/provider/provider.ts
2269
- async function mo() {
2269
+ async function fo() {
2270
2270
  const r = await x(
2271
2271
  async () => await _detectprovider2.default.call(void 0, ),
2272
2272
  { type: "METAMASK_PROVIDER_ERROR" }
@@ -2279,12 +2279,12 @@ async function mo() {
2279
2279
  }
2280
2280
  return new b(r);
2281
2281
  }
2282
- async function ir(r, e) {
2282
+ async function ar(r, e) {
2283
2283
  let t = null;
2284
2284
  let n;
2285
2285
  switch (r) {
2286
2286
  case "passport": {
2287
- n = D.getInstance().findProvider({ rdns: be.rdns });
2287
+ n = D.getInstance().findProvider({ rdns: Le.rdns });
2288
2288
  if (!n) {
2289
2289
  if (e) {
2290
2290
  t = new b(
@@ -2303,9 +2303,9 @@ async function ir(r, e) {
2303
2303
  break;
2304
2304
  }
2305
2305
  case "metamask": {
2306
- n = D.getInstance().findProvider({ rdns: xe.rdns });
2306
+ n = D.getInstance().findProvider({ rdns: be.rdns });
2307
2307
  if (!n) {
2308
- t = await mo();
2308
+ t = await fo();
2309
2309
  }
2310
2310
  break;
2311
2311
  }
@@ -2338,7 +2338,7 @@ async function ir(r, e) {
2338
2338
  }
2339
2339
 
2340
2340
  // src/provider/validateProvider.ts
2341
- function cr(r) {
2341
+ function sr(r) {
2342
2342
  return r && "send" in r && typeof r.send === "function";
2343
2343
  }
2344
2344
  async function B(r, e, t) {
@@ -2347,14 +2347,14 @@ async function B(r, e, t) {
2347
2347
  if ("request" in e) {
2348
2348
  return new b(e);
2349
2349
  }
2350
- if (_optionalChain([e, 'access', _88 => _88.ethereumProvider, 'optionalAccess', _89 => _89.isPassport])) {
2350
+ if (_optionalChain([e, 'access', _98 => _98.ethereumProvider, 'optionalAccess', _99 => _99.isPassport])) {
2351
2351
  return e;
2352
2352
  }
2353
2353
  const n = {
2354
- ...Ut,
2354
+ ...Gt,
2355
2355
  ...t
2356
2356
  };
2357
- const o = await Re(e);
2357
+ const o = await Ce(e);
2358
2358
  let a = (await e.getNetwork()).chainId;
2359
2359
  try {
2360
2360
  if (!a) {
@@ -2394,15 +2394,15 @@ async function B(r, e, t) {
2394
2394
 
2395
2395
  // src/readOnlyProviders/readOnlyProvider.ts
2396
2396
 
2397
- async function Le(r, e) {
2398
- if (r.isProduction && _optionalChain([e, 'optionalAccess', _90 => _90.has, 'call', _91 => _91(1)])) return e;
2399
- if (_optionalChain([e, 'optionalAccess', _92 => _92.has, 'call', _93 => _93(11155111)])) return e;
2397
+ async function De(r, e) {
2398
+ if (r.isProduction && _optionalChain([e, 'optionalAccess', _100 => _100.has, 'call', _101 => _101(1)])) return e;
2399
+ if (_optionalChain([e, 'optionalAccess', _102 => _102.has, 'call', _103 => _103(11155111)])) return e;
2400
2400
  const t = /* @__PURE__ */ new Map();
2401
2401
  const n = await Y(r, {
2402
2402
  type: "all"
2403
2403
  });
2404
2404
  n.networks.forEach((o) => {
2405
- const a = _optionalChain([r, 'access', _94 => _94.networkMap, 'access', _95 => _95.get, 'call', _96 => _96(Number(o.chainId)), 'optionalAccess', _97 => _97.rpcUrls, 'access', _98 => _98[0]]);
2405
+ const a = _optionalChain([r, 'access', _104 => _104.networkMap, 'access', _105 => _105.get, 'call', _106 => _106(Number(o.chainId)), 'optionalAccess', _107 => _107.rpcUrls, 'access', _108 => _108[0]]);
2406
2406
  const s = new (0, _ethers.JsonRpcProvider)(a);
2407
2407
  t.set(Number(o.chainId), s);
2408
2408
  });
@@ -2410,7 +2410,7 @@ async function Le(r, e) {
2410
2410
  }
2411
2411
 
2412
2412
  // src/smartCheckout/aggregators/allowanceAggregator.ts
2413
- var dr = (r, e, t) => {
2413
+ var ir = (r, e, t) => {
2414
2414
  const n = [];
2415
2415
  if (!r.sufficient) {
2416
2416
  for (const o of r.allowances) {
@@ -2431,7 +2431,7 @@ var dr = (r, e, t) => {
2431
2431
  };
2432
2432
 
2433
2433
  // src/smartCheckout/aggregators/itemAggregator.ts
2434
- var go = (r) => {
2434
+ var Ro = (r) => {
2435
2435
  const e = /* @__PURE__ */ new Map();
2436
2436
  const t = [];
2437
2437
  r.forEach((n) => {
@@ -2454,7 +2454,7 @@ var go = (r) => {
2454
2454
  });
2455
2455
  return t.concat(Array.from(e.values()));
2456
2456
  };
2457
- var Ro = (r) => {
2457
+ var Co = (r) => {
2458
2458
  const e = /* @__PURE__ */ new Map();
2459
2459
  const t = [];
2460
2460
  r.forEach((n) => {
@@ -2478,7 +2478,7 @@ var Ro = (r) => {
2478
2478
  });
2479
2479
  return t.concat(Array.from(e.values()));
2480
2480
  };
2481
- var Co = (r) => {
2481
+ var To = (r) => {
2482
2482
  const e = /* @__PURE__ */ new Map();
2483
2483
  const t = [];
2484
2484
  r.forEach((n) => {
@@ -2494,7 +2494,7 @@ var Co = (r) => {
2494
2494
  });
2495
2495
  return t.concat(Array.from(e.values()));
2496
2496
  };
2497
- var To = (r) => {
2497
+ var Io = (r) => {
2498
2498
  const e = /* @__PURE__ */ new Map();
2499
2499
  const t = [];
2500
2500
  r.forEach((n) => {
@@ -2519,11 +2519,11 @@ var To = (r) => {
2519
2519
  });
2520
2520
  return t.concat(Array.from(e.values()));
2521
2521
  };
2522
- var Ct = (r) => To(Co(Ro(go(r))));
2522
+ var Tt = (r) => Io(To(Co(Ro(r))));
2523
2523
 
2524
2524
  // src/smartCheckout/allowance/erc20.ts
2525
2525
 
2526
- var Io = async (r, e, t, n) => {
2526
+ var ho = async (r, e, t, n) => {
2527
2527
  try {
2528
2528
  const o = new (0, _ethers.Contract)(
2529
2529
  t,
@@ -2539,7 +2539,7 @@ var Io = async (r, e, t, n) => {
2539
2539
  );
2540
2540
  }
2541
2541
  };
2542
- var ho = async (r, e, t, n, o) => {
2542
+ var Ao = async (r, e, t, n, o) => {
2543
2543
  try {
2544
2544
  const a = new (0, _ethers.Contract)(
2545
2545
  t,
@@ -2557,7 +2557,7 @@ var ho = async (r, e, t, n, o) => {
2557
2557
  );
2558
2558
  }
2559
2559
  };
2560
- var pr = async (r, e, t) => {
2560
+ var dr = async (r, e, t) => {
2561
2561
  let n = true;
2562
2562
  const o = [];
2563
2563
  const a = /* @__PURE__ */ new Map();
@@ -2571,7 +2571,7 @@ var pr = async (r, e, t) => {
2571
2571
  a.set(R, E);
2572
2572
  s.set(
2573
2573
  R,
2574
- Io(r, e, g, f)
2574
+ ho(r, e, g, f)
2575
2575
  );
2576
2576
  }
2577
2577
  const d = await Promise.all(s.values());
@@ -2602,7 +2602,7 @@ var pr = async (r, e, t) => {
2602
2602
  );
2603
2603
  c.set(
2604
2604
  I,
2605
- ho(
2605
+ Ao(
2606
2606
  r,
2607
2607
  e,
2608
2608
  f,
@@ -2624,7 +2624,7 @@ var pr = async (r, e, t) => {
2624
2624
 
2625
2625
  // src/smartCheckout/allowance/erc721.ts
2626
2626
 
2627
- var Ao = async (r, e, t, n) => {
2627
+ var yo = async (r, e, t, n) => {
2628
2628
  try {
2629
2629
  const o = new (0, _ethers.Contract)(
2630
2630
  t,
@@ -2645,7 +2645,7 @@ var Ao = async (r, e, t, n) => {
2645
2645
  );
2646
2646
  }
2647
2647
  };
2648
- var yo = async (r, e, t, n, o) => {
2648
+ var wo = async (r, e, t, n, o) => {
2649
2649
  try {
2650
2650
  const a = new (0, _ethers.Contract)(
2651
2651
  t,
@@ -2669,7 +2669,7 @@ var yo = async (r, e, t, n, o) => {
2669
2669
  );
2670
2670
  }
2671
2671
  };
2672
- var wo = async (r, e, t) => {
2672
+ var So = async (r, e, t) => {
2673
2673
  try {
2674
2674
  const n = new (0, _ethers.Contract)(
2675
2675
  e,
@@ -2689,7 +2689,7 @@ var wo = async (r, e, t) => {
2689
2689
  );
2690
2690
  }
2691
2691
  };
2692
- var ur = (r, e) => {
2692
+ var lr = (r, e) => {
2693
2693
  try {
2694
2694
  if (!r.trim()) {
2695
2695
  throw new l(
@@ -2707,7 +2707,7 @@ var ur = (r, e) => {
2707
2707
  );
2708
2708
  }
2709
2709
  };
2710
- var So = async (r, e, t) => {
2710
+ var Po = async (r, e, t) => {
2711
2711
  const n = /* @__PURE__ */ new Map();
2712
2712
  const o = /* @__PURE__ */ new Map();
2713
2713
  for (const i of e) {
@@ -2716,7 +2716,7 @@ var So = async (r, e, t) => {
2716
2716
  const p = `${c}-${d}`;
2717
2717
  n.set(p, false);
2718
2718
  if (o.has(p)) continue;
2719
- o.set(p, Ao(
2719
+ o.set(p, yo(
2720
2720
  r,
2721
2721
  t,
2722
2722
  c,
@@ -2730,14 +2730,14 @@ var So = async (r, e, t) => {
2730
2730
  });
2731
2731
  return n;
2732
2732
  };
2733
- var mr = async (r, e, t) => {
2733
+ var pr = async (r, e, t) => {
2734
2734
  let n = true;
2735
2735
  const o = [];
2736
2736
  const a = /* @__PURE__ */ new Map();
2737
2737
  const s = /* @__PURE__ */ new Map();
2738
2738
  const i = /* @__PURE__ */ new Map();
2739
2739
  const c = /* @__PURE__ */ new Map();
2740
- const d = await So(
2740
+ const d = await Po(
2741
2741
  r,
2742
2742
  t,
2743
2743
  e
@@ -2755,11 +2755,11 @@ var mr = async (r, e, t) => {
2755
2755
  continue;
2756
2756
  }
2757
2757
  const P = `${f}-${R}`;
2758
- const v = ur(R, f);
2758
+ const N = lr(R, f);
2759
2759
  a.set(P, g);
2760
2760
  s.set(
2761
2761
  P,
2762
- wo(r, f, v)
2762
+ So(r, f, N)
2763
2763
  );
2764
2764
  }
2765
2765
  const p = await Promise.all(s.values());
@@ -2777,7 +2777,7 @@ var mr = async (r, e, t) => {
2777
2777
  n = false;
2778
2778
  const { contractAddress: R, id: I, spenderAddress: C } = f;
2779
2779
  const y = `${R}-${I}`;
2780
- const P = ur(I, R);
2780
+ const P = lr(I, R);
2781
2781
  i.set(
2782
2782
  y,
2783
2783
  {
@@ -2789,7 +2789,7 @@ var mr = async (r, e, t) => {
2789
2789
  );
2790
2790
  c.set(
2791
2791
  y,
2792
- yo(
2792
+ wo(
2793
2793
  r,
2794
2794
  e,
2795
2795
  R,
@@ -2811,11 +2811,11 @@ var mr = async (r, e, t) => {
2811
2811
 
2812
2812
  // src/smartCheckout/allowance/erc1155.ts
2813
2813
 
2814
- var Po = async (r, e, t, n) => {
2814
+ var ko = async (r, e, t, n) => {
2815
2815
  try {
2816
2816
  const o = new (0, _ethers.Contract)(
2817
2817
  t,
2818
- JSON.stringify(rt),
2818
+ JSON.stringify(nt),
2819
2819
  r
2820
2820
  );
2821
2821
  return await o.isApprovedForAll(e, n);
@@ -2832,11 +2832,11 @@ var Po = async (r, e, t, n) => {
2832
2832
  );
2833
2833
  }
2834
2834
  };
2835
- var ko = async (r, e, t, n) => {
2835
+ var vo = async (r, e, t, n) => {
2836
2836
  try {
2837
2837
  const o = new (0, _ethers.Contract)(
2838
2838
  t,
2839
- JSON.stringify(rt),
2839
+ JSON.stringify(nt),
2840
2840
  r
2841
2841
  );
2842
2842
  const a = await o.setApprovalForAll.populateTransaction(n, true);
@@ -2855,13 +2855,13 @@ var ko = async (r, e, t, n) => {
2855
2855
  );
2856
2856
  }
2857
2857
  };
2858
- var Er = async (r, e, t) => {
2858
+ var mr = async (r, e, t) => {
2859
2859
  const n = t.filter(
2860
2860
  (a) => a.type === "ERC1155"
2861
2861
  );
2862
2862
  const o = await Promise.all(
2863
2863
  n.map(async (a) => {
2864
- const s = await Po(
2864
+ const s = await ko(
2865
2865
  r,
2866
2866
  e,
2867
2867
  a.contractAddress,
@@ -2873,7 +2873,7 @@ var Er = async (r, e, t) => {
2873
2873
  itemRequirement: a
2874
2874
  };
2875
2875
  }
2876
- const i = await ko(
2876
+ const i = await vo(
2877
2877
  r,
2878
2878
  e,
2879
2879
  a.contractAddress,
@@ -2897,7 +2897,7 @@ var Er = async (r, e, t) => {
2897
2897
 
2898
2898
 
2899
2899
  // src/smartCheckout/aggregators/balanceAggregator.ts
2900
- var vo = (r) => {
2900
+ var No = (r) => {
2901
2901
  const e = /* @__PURE__ */ new Map();
2902
2902
  const t = [];
2903
2903
  r.forEach((n) => {
@@ -2916,7 +2916,7 @@ var vo = (r) => {
2916
2916
  });
2917
2917
  return t.concat(Array.from(e.values()));
2918
2918
  };
2919
- var No = (r) => {
2919
+ var _o = (r) => {
2920
2920
  const e = /* @__PURE__ */ new Map();
2921
2921
  const t = [];
2922
2922
  r.forEach((n) => {
@@ -2936,7 +2936,7 @@ var No = (r) => {
2936
2936
  });
2937
2937
  return t.concat(Array.from(e.values()));
2938
2938
  };
2939
- var _o = (r) => {
2939
+ var Oo = (r) => {
2940
2940
  const e = /* @__PURE__ */ new Map();
2941
2941
  const t = [];
2942
2942
  r.forEach((n) => {
@@ -2952,11 +2952,11 @@ var _o = (r) => {
2952
2952
  });
2953
2953
  return t.concat(Array.from(e.values()));
2954
2954
  };
2955
- var gr = (r) => _o(No(vo(r)));
2955
+ var fr = (r) => Oo(_o(No(r)));
2956
2956
 
2957
2957
  // src/smartCheckout/balanceCheck/balanceRequirement.ts
2958
2958
 
2959
- var Rr = (r) => r.map((e) => {
2959
+ var Er = (r) => r.map((e) => {
2960
2960
  switch (e.type) {
2961
2961
  case "ERC20":
2962
2962
  return {
@@ -2973,7 +2973,7 @@ var Rr = (r) => r.map((e) => {
2973
2973
  };
2974
2974
  }
2975
2975
  });
2976
- var Cr = (r, e) => {
2976
+ var gr = (r, e) => {
2977
2977
  const t = BigInt(1);
2978
2978
  const n = e.find((i) => {
2979
2979
  const c = i;
@@ -2983,7 +2983,7 @@ var Cr = (r, e) => {
2983
2983
  ) && c.id === r.id;
2984
2984
  });
2985
2985
  const o = t < 0 || t === 0n || n && n.balance >= t;
2986
- const a = t - (_nullishCoalesce(_optionalChain([n, 'optionalAccess', _99 => _99.balance]), () => ( BigInt(0))));
2986
+ const a = t - (_nullishCoalesce(_optionalChain([n, 'optionalAccess', _109 => _109.balance]), () => ( BigInt(0))));
2987
2987
  let s = n;
2988
2988
  if (!s) {
2989
2989
  s = {
@@ -3010,31 +3010,31 @@ var Cr = (r, e) => {
3010
3010
  isFee: false
3011
3011
  };
3012
3012
  };
3013
- var Tr = (r, e) => {
3013
+ var Rr = (r, e) => {
3014
3014
  if (r.type === "ERC20") {
3015
3015
  return e.find((t) => {
3016
3016
  return T(
3017
- _optionalChain([t, 'access', _100 => _100.token, 'optionalAccess', _101 => _101.address]),
3017
+ _optionalChain([t, 'access', _110 => _110.token, 'optionalAccess', _111 => _111.address]),
3018
3018
  r.tokenAddress
3019
3019
  );
3020
3020
  });
3021
3021
  }
3022
3022
  return e.find((t) => {
3023
- return O(_optionalChain([t, 'access', _102 => _102.token, 'optionalAccess', _103 => _103.address]));
3023
+ return O(_optionalChain([t, 'access', _112 => _112.token, 'optionalAccess', _113 => _113.address]));
3024
3024
  });
3025
3025
  };
3026
- var Ir = async (r, e, t) => {
3026
+ var Cr = async (r, e, t) => {
3027
3027
  const n = {};
3028
3028
  for (const o of r) {
3029
3029
  if (o.type === "NATIVE") {
3030
- n[_] = we;
3030
+ n[_] = Se;
3031
3031
  continue;
3032
3032
  }
3033
- const a = Tr(o, e);
3034
- let s = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _104 => _104.token, 'access', _105 => _105.address]), () => ( ""));
3035
- let i = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _106 => _106.token, 'access', _107 => _107.name]), () => ( ""));
3036
- let c = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _108 => _108.token, 'access', _109 => _109.symbol]), () => ( ""));
3037
- let d = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _110 => _110.token, 'access', _111 => _111.decimals]), () => ( G));
3033
+ const a = Rr(o, e);
3034
+ let s = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _114 => _114.token, 'access', _115 => _115.address]), () => ( ""));
3035
+ let i = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _116 => _116.token, 'access', _117 => _117.name]), () => ( ""));
3036
+ let c = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _118 => _118.token, 'access', _119 => _119.symbol]), () => ( ""));
3037
+ let d = _nullishCoalesce(_optionalChain([a, 'optionalAccess', _120 => _120.token, 'access', _121 => _121.decimals]), () => ( G));
3038
3038
  if (!a && o.type === "ERC20") {
3039
3039
  s = o.tokenAddress;
3040
3040
  if (s.toLowerCase() in n) {
@@ -3071,11 +3071,11 @@ var Ir = async (r, e, t) => {
3071
3071
  }
3072
3072
  return n;
3073
3073
  };
3074
- var hr = (r, e, t) => {
3075
- let n = Tr(r, e);
3074
+ var Tr = (r, e, t) => {
3075
+ let n = Rr(r, e);
3076
3076
  const o = r.amount;
3077
- const a = o < 0 || o === 0n || n && _optionalChain([n, 'optionalAccess', _112 => _112.balance]) >= o;
3078
- const s = o - (_nullishCoalesce(_optionalChain([n, 'optionalAccess', _113 => _113.balance]), () => ( BigInt(0))));
3077
+ const a = o < 0 || o === 0n || n && _optionalChain([n, 'optionalAccess', _122 => _122.balance]) >= o;
3078
+ const s = o - (_nullishCoalesce(_optionalChain([n, 'optionalAccess', _123 => _123.balance]), () => ( BigInt(0))));
3079
3079
  if (r.type === "NATIVE") {
3080
3080
  if (!n) {
3081
3081
  n = {
@@ -3137,10 +3137,10 @@ var hr = (r, e, t) => {
3137
3137
  };
3138
3138
 
3139
3139
  // src/smartCheckout/balanceCheck/balanceCheck.ts
3140
- var xo = async (r, e, t, n, o = false) => {
3140
+ var bo = async (r, e, t, n, o = false) => {
3141
3141
  try {
3142
3142
  const a = /* @__PURE__ */ new Map();
3143
- Rr(n).forEach(
3143
+ Er(n).forEach(
3144
3144
  (i) => {
3145
3145
  if (!i.address) return;
3146
3146
  a.set(i.address.toLocaleLowerCase(), i);
@@ -3158,7 +3158,7 @@ var xo = async (r, e, t, n, o = false) => {
3158
3158
  );
3159
3159
  }
3160
3160
  };
3161
- var bo = async (r, e, t) => {
3161
+ var Lo = async (r, e, t) => {
3162
3162
  const n = [];
3163
3163
  const o = /* @__PURE__ */ new Map();
3164
3164
  const a = /* @__PURE__ */ new Map();
@@ -3198,8 +3198,8 @@ var bo = async (r, e, t) => {
3198
3198
  }
3199
3199
  return n;
3200
3200
  };
3201
- var Ar = async (r, e, t, n, o = false) => {
3202
- const a = gr(n);
3201
+ var Ir = async (r, e, t, n, o = false) => {
3202
+ const a = fr(n);
3203
3203
  const s = [];
3204
3204
  const i = [];
3205
3205
  a.forEach((m) => {
@@ -3223,25 +3223,25 @@ var Ar = async (r, e, t, n, o = false) => {
3223
3223
  }
3224
3224
  const c = [];
3225
3225
  if (s.length > 0) {
3226
- c.push(xo(r, e, t, a, o));
3226
+ c.push(bo(r, e, t, a, o));
3227
3227
  }
3228
3228
  if (i.length > 0) {
3229
- c.push(bo(e, t, a));
3229
+ c.push(Lo(e, t, a));
3230
3230
  }
3231
3231
  const d = await Promise.all(c);
3232
3232
  const p = [];
3233
3233
  if (s.length > 0) {
3234
3234
  const m = _nullishCoalesce(d.shift(), () => ( []));
3235
3235
  const E = new Map(m.map((f) => {
3236
- const R = f.type === "NATIVE" ? _ : _optionalChain([f, 'access', _114 => _114.token, 'access', _115 => _115.address, 'optionalAccess', _116 => _116.toLowerCase, 'call', _117 => _117()]);
3236
+ const R = f.type === "NATIVE" ? _ : _optionalChain([f, 'access', _124 => _124.token, 'access', _125 => _125.address, 'optionalAccess', _126 => _126.toLowerCase, 'call', _127 => _127()]);
3237
3237
  return [R, f];
3238
3238
  }));
3239
- const g = await Ir(s, m, e);
3239
+ const g = await Cr(s, m, e);
3240
3240
  s.forEach((f) => {
3241
3241
  const R = (_nullishCoalesce(f.tokenAddress, () => ( _))).toLowerCase();
3242
3242
  const I = g[R];
3243
3243
  const C = E.get(R);
3244
- const y = hr(f, [...E.values()], I);
3244
+ const y = Tr(f, [...E.values()], I);
3245
3245
  p.push(y);
3246
3246
  if (!C) {
3247
3247
  return;
@@ -3257,7 +3257,7 @@ var Ar = async (r, e, t, n, o = false) => {
3257
3257
  if (i.length > 0) {
3258
3258
  const m = _nullishCoalesce(d.shift(), () => ( []));
3259
3259
  i.forEach((E) => {
3260
- p.push(Cr(E, m));
3260
+ p.push(gr(E, m));
3261
3261
  });
3262
3262
  }
3263
3263
  const u = p.find((m) => !m.sufficient) === void 0;
@@ -3268,7 +3268,7 @@ var Ar = async (r, e, t, n, o = false) => {
3268
3268
  };
3269
3269
 
3270
3270
  // src/smartCheckout/gas/gasCalculator.ts
3271
- var yr = async (r, e) => {
3271
+ var hr = async (r, e) => {
3272
3272
  try {
3273
3273
  return await r.estimateGas(e);
3274
3274
  } catch (t) {
@@ -3279,7 +3279,7 @@ var yr = async (r, e) => {
3279
3279
  );
3280
3280
  }
3281
3281
  };
3282
- var Lo = (r, e) => {
3282
+ var Do = (r, e) => {
3283
3283
  if (e.type === "TRANSACTION" || e.gasToken.type === "NATIVE") {
3284
3284
  return {
3285
3285
  type: "NATIVE",
@@ -3295,18 +3295,18 @@ var Lo = (r, e) => {
3295
3295
  isFee: true
3296
3296
  };
3297
3297
  };
3298
- var wr = async (r, e, t) => {
3298
+ var Ar = async (r, e, t) => {
3299
3299
  const n = [];
3300
3300
  let o = BigInt(0);
3301
3301
  for (const s of e) {
3302
3302
  if (s.approvalTransaction === void 0) continue;
3303
- n.push(yr(r, s.approvalTransaction));
3303
+ n.push(hr(r, s.approvalTransaction));
3304
3304
  }
3305
3305
  if (t.type === "TRANSACTION") {
3306
- n.push(yr(r, t.transaction));
3306
+ n.push(hr(r, t.transaction));
3307
3307
  } else {
3308
3308
  const s = await r.getFeeData();
3309
- const i = Et(s);
3309
+ const i = gt(s);
3310
3310
  if (i !== null) {
3311
3311
  const c = i * t.gasToken.limit;
3312
3312
  if (c) o += c;
@@ -3317,13 +3317,13 @@ var wr = async (r, e, t) => {
3317
3317
  o += s;
3318
3318
  });
3319
3319
  if (o === 0n) return null;
3320
- return Lo(o, t);
3320
+ return Do(o, t);
3321
3321
  };
3322
3322
 
3323
3323
  // src/smartCheckout/routing/geoBlocking.ts
3324
- var Sr = async () => true;
3325
- var Pr = async (r) => {
3326
- const e = Pe(r.isDevelopment, r.isProduction);
3324
+ var yr = async () => true;
3325
+ var wr = async (r) => {
3326
+ const e = ke(r.isDevelopment, r.isProduction);
3327
3327
  try {
3328
3328
  return await e.checkDexAvailability();
3329
3329
  } catch (e4) {
@@ -3332,10 +3332,10 @@ var Pr = async (r) => {
3332
3332
  };
3333
3333
 
3334
3334
  // src/smartCheckout/routing/routingOptions.ts
3335
- function It(r) {
3336
- return _optionalChain([r, 'optionalAccess', _118 => _118.ethereumProvider, 'optionalAccess', _119 => _119.isPassport]) === true;
3335
+ function ht(r) {
3336
+ return _optionalChain([r, 'optionalAccess', _128 => _128.ethereumProvider, 'optionalAccess', _129 => _129.isPassport]) === true;
3337
3337
  }
3338
- var kr = async (r, e) => {
3338
+ var Sr = async (r, e) => {
3339
3339
  const t = {
3340
3340
  onRamp: r.isOnRampEnabled,
3341
3341
  swap: r.isSwapEnabled,
@@ -3343,10 +3343,10 @@ var kr = async (r, e) => {
3343
3343
  };
3344
3344
  const n = [];
3345
3345
  if (t.onRamp) {
3346
- n.push({ id: "onRamp", promise: Sr() });
3346
+ n.push({ id: "onRamp", promise: yr() });
3347
3347
  }
3348
3348
  if (t.swap) {
3349
- n.push({ id: "swap", promise: Pr(r) });
3349
+ n.push({ id: "swap", promise: wr(r) });
3350
3350
  }
3351
3351
  if (n.length > 0) {
3352
3352
  const o = n.map((s) => s.promise);
@@ -3356,12 +3356,12 @@ var kr = async (r, e) => {
3356
3356
  t[c] = t[c] && s.status === "fulfilled" && s.value;
3357
3357
  });
3358
3358
  }
3359
- t.bridge = t.bridge && !It(e);
3359
+ t.bridge = t.bridge && !ht(e);
3360
3360
  return t;
3361
3361
  };
3362
3362
 
3363
3363
  // src/smartCheckout/routing/tokenBalances.ts
3364
- var vr = async (r, e, t, n) => {
3364
+ var Pr = async (r, e, t, n) => {
3365
3365
  const o = /* @__PURE__ */ new Map();
3366
3366
  const a = /* @__PURE__ */ new Map();
3367
3367
  if (e.size === 0) {
@@ -3370,12 +3370,12 @@ var vr = async (r, e, t, n) => {
3370
3370
  error: new l("No L1 or L2 provider available", "PROVIDER_ERROR"),
3371
3371
  balances: []
3372
3372
  };
3373
- o.set(N(r), i);
3373
+ o.set(v(r), i);
3374
3374
  o.set(A(r), i);
3375
3375
  return o;
3376
3376
  }
3377
3377
  if (n.bridge) {
3378
- const i = N(r);
3378
+ const i = v(r);
3379
3379
  if (e.has(i)) {
3380
3380
  a.set(i, q(
3381
3381
  r,
@@ -3384,7 +3384,7 @@ var vr = async (r, e, t, n) => {
3384
3384
  i
3385
3385
  ));
3386
3386
  } else {
3387
- o.set(N(r), {
3387
+ o.set(v(r), {
3388
3388
  success: false,
3389
3389
  error: new l(`No L1 provider available for ${i}`, "PROVIDER_ERROR"),
3390
3390
  balances: []
@@ -3432,11 +3432,11 @@ var vr = async (r, e, t, n) => {
3432
3432
 
3433
3433
 
3434
3434
  // src/smartCheckout/routing/swap/quoteFetcher.ts
3435
- var Fe = async (r, e, t, n, o) => {
3435
+ var We = async (r, e, t, n, o) => {
3436
3436
  const a = /* @__PURE__ */ new Map();
3437
3437
  const s = 1;
3438
3438
  try {
3439
- const i = await oe(e, r);
3439
+ const i = await ae(e, r);
3440
3440
  const c = [];
3441
3441
  const d = [];
3442
3442
  for (const u of o) {
@@ -3460,7 +3460,7 @@ var Fe = async (r, e, t, n, o) => {
3460
3460
  const E = d[m];
3461
3461
  a.set(E, {
3462
3462
  quote: u.value.quote,
3463
- approval: _nullishCoalesce(_optionalChain([u, 'access', _120 => _120.value, 'access', _121 => _121.approval, 'optionalAccess', _122 => _122.gasFeeEstimate]), () => ( null)),
3463
+ approval: _nullishCoalesce(_optionalChain([u, 'access', _130 => _130.value, 'access', _131 => _131.approval, 'optionalAccess', _132 => _132.gasFeeEstimate]), () => ( null)),
3464
3464
  swap: u.value.swap.gasFeeEstimate
3465
3465
  });
3466
3466
  });
@@ -3471,7 +3471,7 @@ var Fe = async (r, e, t, n, o) => {
3471
3471
  };
3472
3472
 
3473
3473
  // src/smartCheckout/routing/swap/swapRoute.ts
3474
- var Do = (r, e, t) => {
3474
+ var Fo = (r, e, t) => {
3475
3475
  let n = BigInt(0);
3476
3476
  let o = "0";
3477
3477
  let a;
@@ -3529,7 +3529,7 @@ var Do = (r, e, t) => {
3529
3529
  swapFees: d
3530
3530
  };
3531
3531
  };
3532
- var Fo = (r, e, t, n) => {
3532
+ var Wo = (r, e, t, n) => {
3533
3533
  const o = t.token.address;
3534
3534
  let a = "ERC20";
3535
3535
  if (O(o)) {
@@ -3542,7 +3542,7 @@ var Fo = (r, e, t, n) => {
3542
3542
  type: a,
3543
3543
  fundsRequired: {
3544
3544
  amount: e,
3545
- formattedAmount: Q(_ethers.formatUnits.call(void 0,
3545
+ formattedAmount: K(_ethers.formatUnits.call(void 0,
3546
3546
  e,
3547
3547
  t.token.decimals
3548
3548
  ))
@@ -3556,7 +3556,7 @@ var Fo = (r, e, t, n) => {
3556
3556
  fees: n
3557
3557
  };
3558
3558
  };
3559
- var Wo = (r) => {
3559
+ var Uo = (r) => {
3560
3560
  if (r.type === "ERC20") {
3561
3561
  return !!r.required.token.address;
3562
3562
  }
@@ -3565,7 +3565,7 @@ var Wo = (r) => {
3565
3565
  }
3566
3566
  return false;
3567
3567
  };
3568
- var Uo = (r) => {
3568
+ var Go = (r) => {
3569
3569
  let e = "";
3570
3570
  let t = BigInt(0);
3571
3571
  switch (r.type) {
@@ -3581,7 +3581,7 @@ var Uo = (r) => {
3581
3581
  }
3582
3582
  return { address: e, amount: t };
3583
3583
  };
3584
- var Go = (r, e) => {
3584
+ var qo = (r, e) => {
3585
3585
  if (!e) return { sufficient: true, approvalGasFee: BigInt(0), approvalGasTokenAddress: "" };
3586
3586
  const t = e.value;
3587
3587
  const n = e.token.address;
@@ -3605,7 +3605,7 @@ var Go = (r, e) => {
3605
3605
  }
3606
3606
  return { sufficient: true, approvalGasFee: t, approvalGasTokenAddress: n };
3607
3607
  };
3608
- var qo = (r, e, t, n, o) => {
3608
+ var jo = (r, e, t, n, o) => {
3609
3609
  const a = /* @__PURE__ */ new Map();
3610
3610
  if (e.approvalGasFee > BigInt(0)) {
3611
3611
  a.set(e.approvalGasTokenAddress, e.approvalGasFee);
@@ -3648,7 +3648,7 @@ var qo = (r, e, t, n, o) => {
3648
3648
  }
3649
3649
  return true;
3650
3650
  };
3651
- var jo = (r, e, t, n, o, a) => {
3651
+ var Vo = (r, e, t, n, o, a) => {
3652
3652
  let s = BigInt(0);
3653
3653
  let i = "";
3654
3654
  let c = false;
@@ -3672,18 +3672,18 @@ var jo = (r, e, t, n, o, a) => {
3672
3672
  }
3673
3673
  return s >= n;
3674
3674
  };
3675
- var Ue = async (r, e, t, n, o, a, s) => {
3675
+ var Ge = async (r, e, t, n, o, a, s) => {
3676
3676
  const i = [];
3677
3677
  if (!e.swap) return i;
3678
3678
  if (a.length === 0) return i;
3679
- if (!Wo(n)) return i;
3680
- const c = Uo(n);
3679
+ if (!Uo(n)) return i;
3680
+ const c = Go(n);
3681
3681
  const d = A(r);
3682
3682
  const p = o.get(d);
3683
3683
  if (!p) return i;
3684
3684
  const u = p.balances;
3685
3685
  if (u.length === 0) return i;
3686
- const m = await Fe(
3686
+ const m = await We(
3687
3687
  r,
3688
3688
  A(r),
3689
3689
  t,
@@ -3700,9 +3700,9 @@ var Ue = async (r, e, t, n, o, a, s) => {
3700
3700
  if (!R) continue;
3701
3701
  const I = f.quote.amountWithMaxSlippage;
3702
3702
  if (R.balance < I.value) continue;
3703
- const C = Go(u, f.approval);
3703
+ const C = qo(u, f.approval);
3704
3704
  if (!C.sufficient) continue;
3705
- if (!qo(
3705
+ if (!jo(
3706
3706
  u,
3707
3707
  C,
3708
3708
  f.swap,
@@ -3712,7 +3712,7 @@ var Ue = async (r, e, t, n, o, a, s) => {
3712
3712
  address: g
3713
3713
  }
3714
3714
  )) continue;
3715
- if (!jo(
3715
+ if (!Vo(
3716
3716
  R.balance,
3717
3717
  s,
3718
3718
  g,
@@ -3720,9 +3720,9 @@ var Ue = async (r, e, t, n, o, a, s) => {
3720
3720
  C,
3721
3721
  f.quote.fees
3722
3722
  )) continue;
3723
- const y = Do(f.approval, f.swap, f.quote.fees);
3723
+ const y = Fo(f.approval, f.swap, f.quote.fees);
3724
3724
  i.push(
3725
- Fo(
3725
+ Wo(
3726
3726
  d,
3727
3727
  I.value,
3728
3728
  R,
@@ -3734,7 +3734,7 @@ var Ue = async (r, e, t, n, o, a, s) => {
3734
3734
  };
3735
3735
 
3736
3736
  // src/smartCheckout/allowList/allowListCheck.ts
3737
- var Nr = (r, e) => {
3737
+ var kr = (r, e) => {
3738
3738
  if (e && e.success) {
3739
3739
  return r.filter((t) => {
3740
3740
  if ("address" in t) {
@@ -3747,35 +3747,35 @@ var Nr = (r, e) => {
3747
3747
  }
3748
3748
  return [];
3749
3749
  };
3750
- var ht = async (r, e) => {
3750
+ var At = async (r, e) => {
3751
3751
  if (e.onRamp) {
3752
3752
  const t = await H(r, { type: "onramp" });
3753
3753
  return t.tokens;
3754
3754
  }
3755
3755
  return [];
3756
3756
  };
3757
- var At = async (r, e, t) => {
3757
+ var yt = async (r, e, t) => {
3758
3758
  if (t.bridge) {
3759
- const n = N(r);
3759
+ const n = v(r);
3760
3760
  const o = (await H(r, { type: "bridge", chainId: n })).tokens;
3761
3761
  const a = e.get(n);
3762
- return Nr(o, a);
3762
+ return kr(o, a);
3763
3763
  }
3764
3764
  return [];
3765
3765
  };
3766
- var Vo = async (r, e, t) => {
3766
+ var Ho = async (r, e, t) => {
3767
3767
  if (t.swap) {
3768
3768
  const n = (await H(r, { type: "swap" })).tokens;
3769
3769
  const o = e.get(A(r));
3770
- return Nr(n, o);
3770
+ return kr(n, o);
3771
3771
  }
3772
3772
  return [];
3773
3773
  };
3774
- var _r = async (r, e, t) => {
3774
+ var vr = async (r, e, t) => {
3775
3775
  const n = {};
3776
- n.swap = await Vo(r, e, t);
3777
- n.bridge = await At(r, e, t);
3778
- n.onRamp = await ht(r, t);
3776
+ n.swap = await Ho(r, e, t);
3777
+ n.bridge = await yt(r, e, t);
3778
+ n.onRamp = await At(r, t);
3779
3779
  return n;
3780
3780
  };
3781
3781
 
@@ -3786,7 +3786,7 @@ var _r = async (r, e, t) => {
3786
3786
 
3787
3787
 
3788
3788
  // src/smartCheckout/routing/bridge/getEthBalance.ts
3789
- var Or = (r) => {
3789
+ var Nr = (r) => {
3790
3790
  for (const e of r.balances) {
3791
3791
  if (O(e.token.address)) {
3792
3792
  return e.balance;
@@ -3797,8 +3797,8 @@ var Or = (r) => {
3797
3797
 
3798
3798
  // src/smartCheckout/routing/bridge/getBridgeFeeEstimate.ts
3799
3799
 
3800
- var Mr = async (r, e, t, n) => {
3801
- const o = Me(
3800
+ var _r = async (r, e, t, n) => {
3801
+ const o = Be(
3802
3802
  t,
3803
3803
  n,
3804
3804
  e,
@@ -3828,27 +3828,27 @@ var Mr = async (r, e, t, n) => {
3828
3828
 
3829
3829
  // src/smartCheckout/routing/indexer/fetchL1Representation.ts
3830
3830
  var J = "0x0000000000000000000000000000000000000eee";
3831
- var zo = (r) => {
3831
+ var Ko = (r) => {
3832
3832
  if (r === 13371) return "imtbl-zkevm-mainnet";
3833
3833
  if (r === 13473) return "imtbl-zkevm-testnet";
3834
3834
  if (r === 15003) return "imtbl-zkevm-devnet";
3835
3835
  return "";
3836
3836
  };
3837
- var Ko = async (r, e) => {
3837
+ var Qo = async (r, e) => {
3838
3838
  const t = await e.remote.getConfig(
3839
3839
  "imxAddressMapping"
3840
3840
  );
3841
3841
  return _nullishCoalesce(t[r], () => ( ""));
3842
3842
  };
3843
- var Ge = async (r, e) => {
3843
+ var qe = async (r, e) => {
3844
3844
  if (O(e)) {
3845
3845
  return {
3846
- l1address: await Ko(N(r), r),
3846
+ l1address: await Qo(v(r), r),
3847
3847
  l2address: _
3848
3848
  };
3849
3849
  }
3850
- const t = zo(A(r));
3851
- const n = Be(r);
3850
+ const t = Ko(A(r));
3851
+ const n = xe(r);
3852
3852
  const o = await n.getToken({
3853
3853
  chainName: t,
3854
3854
  contractAddress: e
@@ -3868,12 +3868,12 @@ var Ge = async (r, e) => {
3868
3868
  };
3869
3869
 
3870
3870
  // src/smartCheckout/routing/bridge/bridgeRoute.ts
3871
- var Qo = (r, e) => {
3872
- const t = Or(r);
3871
+ var Zo = (r, e) => {
3872
+ const t = Nr(r);
3873
3873
  return t >= e;
3874
3874
  };
3875
- var Br = (r, e, t, n, o) => {
3876
- const a = _nullishCoalesce(_optionalChain([o, 'optionalAccess', _123 => _123.decimals]), () => ( G));
3875
+ var Or = (r, e, t, n, o) => {
3876
+ const a = _nullishCoalesce(_optionalChain([o, 'optionalAccess', _133 => _133.decimals]), () => ( G));
3877
3877
  const s = [];
3878
3878
  if (e > 0) {
3879
3879
  s.push({
@@ -3907,14 +3907,14 @@ var Br = (r, e, t, n, o) => {
3907
3907
  bridgeFees: s
3908
3908
  };
3909
3909
  };
3910
- var xr = (r, e, t, n, o) => ({
3910
+ var Mr = (r, e, t, n, o) => ({
3911
3911
  type: "BRIDGE",
3912
3912
  chainId: r,
3913
3913
  fundingItem: {
3914
3914
  type: n,
3915
3915
  fundsRequired: {
3916
3916
  amount: t.amount,
3917
- formattedAmount: Q(t.formattedAmount)
3917
+ formattedAmount: K(t.formattedAmount)
3918
3918
  },
3919
3919
  userBalance: {
3920
3920
  balance: e.balance,
@@ -3929,11 +3929,11 @@ var xr = (r, e, t, n, o) => ({
3929
3929
  },
3930
3930
  fees: o
3931
3931
  });
3932
- var je = async (r, e, t, n, o) => {
3932
+ var Ve = async (r, e, t, n, o) => {
3933
3933
  if (!t.bridge) return void 0;
3934
- const a = N(r);
3934
+ const a = v(r);
3935
3935
  const s = A(r);
3936
- const i = _optionalChain([r, 'access', _124 => _124.networkMap, 'access', _125 => _125.get, 'call', _126 => _126(a), 'optionalAccess', _127 => _127.nativeCurrency]);
3936
+ const i = _optionalChain([r, 'access', _134 => _134.networkMap, 'access', _135 => _135.get, 'call', _136 => _136(a), 'optionalAccess', _137 => _137.nativeCurrency]);
3937
3937
  const c = o.get(a);
3938
3938
  const d = e.get(a);
3939
3939
  if (!d) {
@@ -3944,9 +3944,9 @@ var je = async (r, e, t, n, o) => {
3944
3944
  );
3945
3945
  }
3946
3946
  if (c === void 0 || c.success === false) return void 0;
3947
- const p = await At(r, o, t);
3947
+ const p = await yt(r, o, t);
3948
3948
  if (p.length === 0) return void 0;
3949
- const u = await Ge(r, n.l2address);
3949
+ const u = await qe(r, n.l2address);
3950
3950
  if (!u) return void 0;
3951
3951
  const { l1address: m } = u;
3952
3952
  if (O(m)) {
@@ -3954,7 +3954,7 @@ var je = async (r, e, t, n, o) => {
3954
3954
  } else if (!p.find((P) => T(P.address, m))) {
3955
3955
  return void 0;
3956
3956
  }
3957
- const E = await Mr(
3957
+ const E = await _r(
3958
3958
  r,
3959
3959
  e,
3960
3960
  a,
@@ -3967,18 +3967,18 @@ var je = async (r, e, t, n, o) => {
3967
3967
  imtblFee: I,
3968
3968
  totalFees: C
3969
3969
  } = E;
3970
- if (!Qo(c, C)) return void 0;
3970
+ if (!Zo(c, C)) return void 0;
3971
3971
  if (O(m)) {
3972
- const P = c.balances.find((v) => O(v.token.address));
3972
+ const P = c.balances.find((N) => O(N.token.address));
3973
3973
  if (P && P.balance >= n.amount + C) {
3974
- const v = Br(
3974
+ const N = Or(
3975
3975
  g,
3976
3976
  R,
3977
3977
  I,
3978
3978
  f,
3979
3979
  i
3980
3980
  );
3981
- return xr(a, P, n, "NATIVE", v);
3981
+ return Mr(a, P, n, "NATIVE", N);
3982
3982
  }
3983
3983
  return void 0;
3984
3984
  }
@@ -3986,22 +3986,22 @@ var je = async (r, e, t, n, o) => {
3986
3986
  (P) => T(P.token.address, m)
3987
3987
  );
3988
3988
  if (y && y.balance >= n.amount) {
3989
- const P = Br(
3989
+ const P = Or(
3990
3990
  g,
3991
3991
  R,
3992
3992
  I,
3993
3993
  f,
3994
3994
  i
3995
3995
  );
3996
- return xr(a, y, n, "ERC20", P);
3996
+ return Mr(a, y, n, "ERC20", P);
3997
3997
  }
3998
3998
  return void 0;
3999
3999
  };
4000
4000
 
4001
4001
  // src/smartCheckout/routing/bridgeAndSwap/getBalancesByChain.ts
4002
- var br = (r, e) => {
4002
+ var Br = (r, e) => {
4003
4003
  const t = { l1balances: [], l2balances: [] };
4004
- const n = e.get(N(r));
4004
+ const n = e.get(v(r));
4005
4005
  const o = e.get(A(r));
4006
4006
  if (!n) return t;
4007
4007
  if (n.error !== void 0) return t;
@@ -4016,7 +4016,7 @@ var br = (r, e) => {
4016
4016
 
4017
4017
  // src/smartCheckout/routing/bridgeAndSwap/constructBridgeRequirements.ts
4018
4018
 
4019
- var Yo = (r, e) => {
4019
+ var Jo = (r, e) => {
4020
4020
  let t = BigInt(0);
4021
4021
  r.quote.fees.forEach((n) => {
4022
4022
  if (T(n.amount.token.address, e)) {
@@ -4030,7 +4030,7 @@ var Yo = (r, e) => {
4030
4030
  }
4031
4031
  return t;
4032
4032
  };
4033
- var Jo = (r, e) => {
4033
+ var $o = (r, e) => {
4034
4034
  for (const t of r.balanceRequirements) {
4035
4035
  if (t.type === "NATIVE" || t.type === "ERC20") {
4036
4036
  if (T(t.required.token.address, e)) {
@@ -4040,8 +4040,8 @@ var Jo = (r, e) => {
4040
4040
  }
4041
4041
  return BigInt(0);
4042
4042
  };
4043
- var $o = (r, e, t) => {
4044
- const n = _nullishCoalesce(_optionalChain([t, 'optionalAccess', _128 => _128.balance]), () => ( BigInt(0)));
4043
+ var Xo = (r, e, t) => {
4044
+ const n = _nullishCoalesce(_optionalChain([t, 'optionalAccess', _138 => _138.balance]), () => ( BigInt(0)));
4045
4045
  if (n >= r + e) {
4046
4046
  return BigInt(0);
4047
4047
  }
@@ -4054,7 +4054,7 @@ var $o = (r, e, t) => {
4054
4054
  }
4055
4055
  return r + e - n;
4056
4056
  };
4057
- var Lr = (r, e, t, n, o) => {
4057
+ var xr = (r, e, t, n, o) => {
4058
4058
  const a = [];
4059
4059
  for (const [s, i] of r) {
4060
4060
  const c = t.find((C) => T(C.token.address, s));
@@ -4072,13 +4072,13 @@ var Lr = (r, e, t, n, o) => {
4072
4072
  });
4073
4073
  if (!m) continue;
4074
4074
  const E = i.quote.amountWithMaxSlippage.value;
4075
- const g = Yo(i, s);
4075
+ const g = Jo(i, s);
4076
4076
  const f = E + g;
4077
- const R = Jo(
4077
+ const R = $o(
4078
4078
  o,
4079
4079
  s
4080
4080
  );
4081
- const I = $o(f, R, c);
4081
+ const I = Xo(f, R, c);
4082
4082
  if (I <= 0) {
4083
4083
  continue;
4084
4084
  }
@@ -4087,7 +4087,7 @@ var Lr = (r, e, t, n, o) => {
4087
4087
  }
4088
4088
  a.push({
4089
4089
  amount: I,
4090
- formattedAmount: Q(_ethers.formatUnits.call(void 0, I, m.token.decimals)),
4090
+ formattedAmount: K(_ethers.formatUnits.call(void 0, I, m.token.decimals)),
4091
4091
  // L2 address is used for the bridge requirement as the bridge route uses the indexer to find L1 address
4092
4092
  l2address: u
4093
4093
  });
@@ -4096,20 +4096,20 @@ var Lr = (r, e, t, n, o) => {
4096
4096
  };
4097
4097
 
4098
4098
  // src/smartCheckout/routing/bridgeAndSwap/fetchL1ToL2Mappings.ts
4099
- var Dr = async (r, e) => {
4100
- const t = e.map((o) => Ge(r, _nullishCoalesce(o.address, () => ( ""))));
4099
+ var br = async (r, e) => {
4100
+ const t = e.map((o) => qe(r, _nullishCoalesce(o.address, () => ( ""))));
4101
4101
  const n = await Promise.all(t);
4102
4102
  return n.filter((o) => o !== void 0);
4103
4103
  };
4104
4104
 
4105
4105
  // src/smartCheckout/routing/bridgeAndSwap/getDexQuotes.ts
4106
- var Fr = async (r, e, t, n, o) => {
4106
+ var Lr = async (r, e, t, n, o) => {
4107
4107
  const a = [];
4108
4108
  for (const i of o) {
4109
4109
  if (!i.address) continue;
4110
4110
  a.push(i.address);
4111
4111
  }
4112
- const s = await Fe(
4112
+ const s = await We(
4113
4113
  r,
4114
4114
  A(r),
4115
4115
  e,
@@ -4123,7 +4123,7 @@ var Fr = async (r, e, t, n, o) => {
4123
4123
  };
4124
4124
 
4125
4125
  // src/smartCheckout/routing/bridgeAndSwap/bridgeAndSwapRoute.ts
4126
- var ea = (r, e, t, n, o, a) => {
4126
+ var ta = (r, e, t, n, o, a) => {
4127
4127
  if (r.length === 0) return true;
4128
4128
  if (e.length === 0) return true;
4129
4129
  if (t.length === 0) return true;
@@ -4134,7 +4134,7 @@ var ea = (r, e, t, n, o, a) => {
4134
4134
  if (a === "") return true;
4135
4135
  return false;
4136
4136
  };
4137
- var ta = (r, e, t, n) => {
4137
+ var ra = (r, e, t, n) => {
4138
4138
  const o = [];
4139
4139
  for (const a of n) {
4140
4140
  if (!e.includes(a.l1address)) continue;
@@ -4147,7 +4147,7 @@ var ta = (r, e, t, n) => {
4147
4147
  }
4148
4148
  return o;
4149
4149
  };
4150
- var ra = (r, e, t, n, o) => {
4150
+ var na = (r, e, t, n, o) => {
4151
4151
  const a = /* @__PURE__ */ new Map();
4152
4152
  for (const [c, d] of e) {
4153
4153
  a.set(c, {
@@ -4187,7 +4187,7 @@ var ra = (r, e, t, n, o) => {
4187
4187
  );
4188
4188
  return a;
4189
4189
  };
4190
- var na = (r, e) => {
4190
+ var oa = (r, e) => {
4191
4191
  const t = [];
4192
4192
  for (const n of e) {
4193
4193
  const { chainId: o, fundingItem: a } = n;
@@ -4209,7 +4209,7 @@ var na = (r, e) => {
4209
4209
  }
4210
4210
  return t;
4211
4211
  };
4212
- var oa = (r, e, t) => {
4212
+ var aa = (r, e, t) => {
4213
4213
  const n = [];
4214
4214
  for (const o of r) {
4215
4215
  if (!o) continue;
@@ -4236,10 +4236,10 @@ var oa = (r, e, t) => {
4236
4236
  }
4237
4237
  return n;
4238
4238
  };
4239
- var Wr = async (r, e, t, n, o, a, s, i, c) => {
4240
- const { l1balances: d, l2balances: p } = br(r, a);
4239
+ var Dr = async (r, e, t, n, o, a, s, i, c) => {
4240
+ const { l1balances: d, l2balances: p } = Br(r, a);
4241
4241
  const u = n.required.token.address;
4242
- if (ea(
4242
+ if (ta(
4243
4243
  s,
4244
4244
  i,
4245
4245
  d,
@@ -4247,22 +4247,22 @@ var Wr = async (r, e, t, n, o, a, s, i, c) => {
4247
4247
  t,
4248
4248
  u
4249
4249
  )) return [];
4250
- const m = await Dr(r, i);
4251
- const E = ta(
4250
+ const m = await br(r, i);
4251
+ const E = ra(
4252
4252
  u,
4253
4253
  s,
4254
4254
  i,
4255
4255
  m
4256
4256
  );
4257
4257
  if (E.length === 0) return [];
4258
- const g = await Fr(
4258
+ const g = await Lr(
4259
4259
  r,
4260
4260
  o,
4261
4261
  u,
4262
4262
  n,
4263
4263
  E
4264
4264
  );
4265
- const f = Lr(
4265
+ const f = xr(
4266
4266
  g,
4267
4267
  d,
4268
4268
  p,
@@ -4277,7 +4277,7 @@ var Wr = async (r, e, t, n, o, a, s, i, c) => {
4277
4277
  if (!W.l2address) continue;
4278
4278
  R.set(
4279
4279
  W.l2address,
4280
- je(
4280
+ Ve(
4281
4281
  r,
4282
4282
  e,
4283
4283
  t,
@@ -4293,11 +4293,11 @@ var Wr = async (r, e, t, n, o, a, s, i, c) => {
4293
4293
  }
4294
4294
  const y = await Promise.all(R.values());
4295
4295
  const P = Array.from(R.keys());
4296
- const v = [];
4297
- y.forEach((W, Xe) => {
4298
- const j = P[Xe];
4296
+ const N = [];
4297
+ y.forEach((W, et) => {
4298
+ const j = P[et];
4299
4299
  if (W === void 0) return;
4300
- v.push(j);
4300
+ N.push(j);
4301
4301
  const k = I.get(j);
4302
4302
  if (!k) return;
4303
4303
  C.push({
@@ -4306,30 +4306,30 @@ var Wr = async (r, e, t, n, o, a, s, i, c) => {
4306
4306
  l2address: k.l2address
4307
4307
  });
4308
4308
  });
4309
- if (v.length === 0) return [];
4309
+ if (N.length === 0) return [];
4310
4310
  if (C.length === 0) return [];
4311
- const z = ra(
4311
+ const z = na(
4312
4312
  r,
4313
4313
  a,
4314
4314
  p,
4315
4315
  C,
4316
4316
  i
4317
4317
  );
4318
- const ce = await Ue(
4318
+ const de = await Ge(
4319
4319
  r,
4320
4320
  t,
4321
4321
  o,
4322
4322
  n,
4323
4323
  z,
4324
- v,
4324
+ N,
4325
4325
  c
4326
4326
  );
4327
- if (!ce) return [];
4328
- const $ = na(
4327
+ if (!de) return [];
4328
+ const $ = oa(
4329
4329
  a,
4330
- ce
4330
+ de
4331
4331
  );
4332
- return oa(
4332
+ return aa(
4333
4333
  y,
4334
4334
  $,
4335
4335
  m
@@ -4337,11 +4337,11 @@ var Wr = async (r, e, t, n, o, a, s, i, c) => {
4337
4337
  };
4338
4338
 
4339
4339
  // src/smartCheckout/routing/onRamp/onRampRoute.ts
4340
- var Ur = async (r, e, t) => {
4340
+ var Fr = async (r, e, t) => {
4341
4341
  if (!["ERC20", "NATIVE"].includes(t.type)) return void 0;
4342
4342
  const { required: n, current: o, delta: a } = t;
4343
4343
  let s = false;
4344
- const i = await ht(r, e);
4344
+ const i = await At(r, e);
4345
4345
  i.forEach((c) => {
4346
4346
  if (!c.address) return;
4347
4347
  if (!n.token) return;
@@ -4357,7 +4357,7 @@ var Ur = async (r, e, t) => {
4357
4357
  type: O(n.token.address) ? "NATIVE" : "ERC20",
4358
4358
  fundsRequired: {
4359
4359
  amount: a.balance,
4360
- formattedAmount: Q(a.formattedBalance)
4360
+ formattedAmount: K(a.formattedBalance)
4361
4361
  },
4362
4362
  userBalance: {
4363
4363
  balance: o.balance,
@@ -4369,8 +4369,8 @@ var Ur = async (r, e, t) => {
4369
4369
  };
4370
4370
 
4371
4371
  // src/smartCheckout/routing/routingCalculator.ts
4372
- var aa = (r) => r.bridge || r.swap || r.onRamp;
4373
- var sa = (r) => {
4372
+ var sa = (r) => r.bridge || r.swap || r.onRamp;
4373
+ var ia = (r) => {
4374
4374
  let e = 0;
4375
4375
  let t;
4376
4376
  for (const n of r.balanceRequirements) {
@@ -4382,7 +4382,7 @@ var sa = (r) => {
4382
4382
  if (e === 1) return t;
4383
4383
  return void 0;
4384
4384
  };
4385
- var ia = async (r, e, t, n, o) => {
4385
+ var ca = async (r, e, t, n, o) => {
4386
4386
  let a;
4387
4387
  if (n === void 0) return void 0;
4388
4388
  if (n.type !== "NATIVE" && n.type !== "ERC20") {
@@ -4394,7 +4394,7 @@ var ia = async (r, e, t, n, o) => {
4394
4394
  l2address: _nullishCoalesce(n.required.token.address, () => ( ""))
4395
4395
  };
4396
4396
  if (t.bridge && n) {
4397
- a = await je(
4397
+ a = await Ve(
4398
4398
  r,
4399
4399
  e,
4400
4400
  t,
@@ -4404,7 +4404,7 @@ var ia = async (r, e, t, n, o) => {
4404
4404
  }
4405
4405
  return a;
4406
4406
  };
4407
- var ca = async (r, e, t, n, o, a, s) => {
4407
+ var da = async (r, e, t, n, o, a, s) => {
4408
4408
  const i = [];
4409
4409
  if (!e.swap) return i;
4410
4410
  if (t === void 0) return i;
@@ -4415,7 +4415,7 @@ var ca = async (r, e, t, n, o, a, s) => {
4415
4415
  if (a.length === 0) return i;
4416
4416
  const d = a.filter((p) => p.address).map((p) => p.address);
4417
4417
  if (d.length === 0) return i;
4418
- return await Ue(
4418
+ return await Ge(
4419
4419
  r,
4420
4420
  e,
4421
4421
  n,
@@ -4425,24 +4425,24 @@ var ca = async (r, e, t, n, o, a, s) => {
4425
4425
  s
4426
4426
  );
4427
4427
  };
4428
- var da = async (r, e, t, n, o, a, s, i) => {
4428
+ var la = async (r, e, t, n, o, a, s, i) => {
4429
4429
  if (!n) return [];
4430
- const c = a.get(N(r));
4430
+ const c = a.get(v(r));
4431
4431
  const d = a.get(A(r));
4432
4432
  if (!c) return [];
4433
4433
  if (c.error !== void 0 || !c.success) return [];
4434
4434
  if (!d) return [];
4435
4435
  if (d.error !== void 0 || !d.success) return [];
4436
- const p = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _129 => _129.bridge]), () => ( []));
4436
+ const p = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _139 => _139.bridge]), () => ( []));
4437
4437
  const u = p.map((g) => {
4438
4438
  if (g.address === void 0) return J;
4439
4439
  return g.address;
4440
4440
  });
4441
- const m = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _130 => _130.swap]), () => ( []));
4441
+ const m = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _140 => _140.swap]), () => ( []));
4442
4442
  if (n.type !== "NATIVE" && n.type !== "ERC20") {
4443
4443
  return [];
4444
4444
  }
4445
- const E = await Wr(
4445
+ const E = await Dr(
4446
4446
  r,
4447
4447
  e,
4448
4448
  t,
@@ -4455,23 +4455,23 @@ var da = async (r, e, t, n, o, a, s, i) => {
4455
4455
  );
4456
4456
  return E;
4457
4457
  };
4458
- var la = async (r, e, t) => {
4458
+ var pa = async (r, e, t) => {
4459
4459
  if (!e.onRamp) return void 0;
4460
4460
  if (t === void 0) return void 0;
4461
- const n = await Ur(
4461
+ const n = await Fr(
4462
4462
  r,
4463
4463
  e,
4464
4464
  t
4465
4465
  );
4466
4466
  return n;
4467
4467
  };
4468
- var Ve = {
4468
+ var He = {
4469
4469
  swap: 1,
4470
4470
  bridge: 2,
4471
4471
  onRamp: 3,
4472
4472
  bridgeAndSwap: 4
4473
4473
  };
4474
- var He = (r, e, t, n) => {
4474
+ var ze = (r, e, t, n) => {
4475
4475
  if (!r) return;
4476
4476
  let o;
4477
4477
  if ("bridgeFundingStep" in r && "swapFundingStep" in r) {
@@ -4481,10 +4481,10 @@ var He = (r, e, t, n) => {
4481
4481
  }
4482
4482
  const a = { priority: e, steps: o };
4483
4483
  t.push(a);
4484
- _optionalChain([n, 'optionalCall', _131 => _131(a)]);
4484
+ _optionalChain([n, 'optionalCall', _141 => _141(a)]);
4485
4485
  };
4486
- var Gr = async (r, e, t, n, o) => {
4487
- if (!aa(n)) {
4486
+ var Wr = async (r, e, t, n, o) => {
4487
+ if (!sa(n)) {
4488
4488
  return {
4489
4489
  type: "NO_ROUTE_OPTIONS",
4490
4490
  message: "No routing options are available"
@@ -4492,7 +4492,7 @@ var Gr = async (r, e, t, n, o) => {
4492
4492
  }
4493
4493
  let a;
4494
4494
  try {
4495
- a = await Le(r);
4495
+ a = await De(r);
4496
4496
  } catch (u) {
4497
4497
  throw new l(
4498
4498
  "Error occurred while creating read only providers",
@@ -4503,7 +4503,7 @@ var Gr = async (r, e, t, n, o) => {
4503
4503
  const s = await S(
4504
4504
  r,
4505
4505
  "Time to get token balances inside router",
4506
- vr(
4506
+ Pr(
4507
4507
  r,
4508
4508
  a,
4509
4509
  e,
@@ -4513,14 +4513,14 @@ var Gr = async (r, e, t, n, o) => {
4513
4513
  const i = await S(
4514
4514
  r,
4515
4515
  "Time to get routing allowlist",
4516
- _r(r, s, n)
4516
+ vr(r, s, n)
4517
4517
  );
4518
- const c = sa(t);
4518
+ const c = ia(t);
4519
4519
  const d = [];
4520
4520
  const p = [];
4521
4521
  if (n.swap) {
4522
4522
  d.push(
4523
- ca(
4523
+ da(
4524
4524
  r,
4525
4525
  n,
4526
4526
  c,
@@ -4530,9 +4530,9 @@ var Gr = async (r, e, t, n, o) => {
4530
4530
  t
4531
4531
  ).then((u) => {
4532
4532
  u.forEach((m) => {
4533
- He(
4533
+ ze(
4534
4534
  m,
4535
- Ve.swap,
4535
+ He.swap,
4536
4536
  p,
4537
4537
  o
4538
4538
  );
@@ -4542,16 +4542,16 @@ var Gr = async (r, e, t, n, o) => {
4542
4542
  }
4543
4543
  if (n.bridge) {
4544
4544
  d.push(
4545
- ia(
4545
+ ca(
4546
4546
  r,
4547
4547
  a,
4548
4548
  n,
4549
4549
  c,
4550
4550
  s
4551
4551
  ).then((u) => {
4552
- He(
4552
+ ze(
4553
4553
  u,
4554
- Ve.bridge,
4554
+ He.bridge,
4555
4555
  p,
4556
4556
  o
4557
4557
  );
@@ -4560,14 +4560,14 @@ var Gr = async (r, e, t, n, o) => {
4560
4560
  }
4561
4561
  if (n.onRamp) {
4562
4562
  d.push(
4563
- la(
4563
+ pa(
4564
4564
  r,
4565
4565
  n,
4566
4566
  c
4567
4567
  ).then((u) => {
4568
- He(
4568
+ ze(
4569
4569
  u,
4570
- Ve.onRamp,
4570
+ He.onRamp,
4571
4571
  p,
4572
4572
  o
4573
4573
  );
@@ -4576,7 +4576,7 @@ var Gr = async (r, e, t, n, o) => {
4576
4576
  }
4577
4577
  if (n.swap && n.bridge) {
4578
4578
  d.push(
4579
- da(
4579
+ la(
4580
4580
  r,
4581
4581
  a,
4582
4582
  n,
@@ -4587,9 +4587,9 @@ var Gr = async (r, e, t, n, o) => {
4587
4587
  t
4588
4588
  ).then((u) => {
4589
4589
  u.forEach((m) => {
4590
- He(
4590
+ ze(
4591
4591
  m,
4592
- Ve.bridgeAndSwap,
4592
+ He.bridgeAndSwap,
4593
4593
  p,
4594
4594
  o
4595
4595
  );
@@ -4615,7 +4615,7 @@ var Gr = async (r, e, t, n, o) => {
4615
4615
  };
4616
4616
 
4617
4617
  // src/smartCheckout/smartCheckout.ts
4618
- var pa = (r) => {
4618
+ var ua = (r) => {
4619
4619
  const e = r.balanceRequirements.map(
4620
4620
  (t) => {
4621
4621
  if (t.type === "ERC20" && t.sufficient) {
@@ -4636,12 +4636,12 @@ var pa = (r) => {
4636
4636
  balanceRequirements: e
4637
4637
  };
4638
4638
  };
4639
- var qr = async (r, e, t, n, o, a, s, i, c) => {
4640
- const d = !s || t && i ? pa(a) : a;
4639
+ var Ur = async (r, e, t, n, o, a, s, i, c) => {
4640
+ const d = !s || t && i ? ua(a) : a;
4641
4641
  const p = await S(
4642
4642
  r,
4643
4643
  "Total time to run the routing calculator",
4644
- Gr(
4644
+ Wr(
4645
4645
  r,
4646
4646
  e,
4647
4647
  d,
@@ -4649,7 +4649,7 @@ var qr = async (r, e, t, n, o, a, s, i, c) => {
4649
4649
  c
4650
4650
  )
4651
4651
  );
4652
- _optionalChain([i, 'optionalCall', _132 => _132({
4652
+ _optionalChain([i, 'optionalCall', _142 => _142({
4653
4653
  sufficient: t,
4654
4654
  transactionRequirements: o,
4655
4655
  router: {
@@ -4659,20 +4659,20 @@ var qr = async (r, e, t, n, o, a, s, i, c) => {
4659
4659
  })]);
4660
4660
  return p;
4661
4661
  };
4662
- var ie = async (r, e, t, n, o, a, s, i = false) => {
4662
+ var ce = async (r, e, t, n, o, a, s, i = false) => {
4663
4663
  const c = await (await e.getSigner()).getAddress();
4664
- let d = Ct(t);
4665
- const p = pr(
4664
+ let d = Tt(t);
4665
+ const p = dr(
4666
4666
  e,
4667
4667
  c,
4668
4668
  d
4669
4669
  );
4670
- const u = mr(
4670
+ const u = pr(
4671
4671
  e,
4672
4672
  c,
4673
4673
  d
4674
4674
  );
4675
- const m = Er(
4675
+ const m = mr(
4676
4676
  e,
4677
4677
  c,
4678
4678
  d
@@ -4682,7 +4682,7 @@ var ie = async (r, e, t, n, o, a, s, i = false) => {
4682
4682
  "Time to calculate token allowances",
4683
4683
  Promise.all([p, u, m])
4684
4684
  );
4685
- const g = dr(
4685
+ const g = ir(
4686
4686
  E[0],
4687
4687
  E[1],
4688
4688
  E[2]
@@ -4692,30 +4692,30 @@ var ie = async (r, e, t, n, o, a, s, i = false) => {
4692
4692
  f = await S(
4693
4693
  r,
4694
4694
  "Time to run gas calculator",
4695
- wr(e, g, n)
4695
+ Ar(e, g, n)
4696
4696
  );
4697
4697
  if (f !== null) {
4698
4698
  d.push(f);
4699
- d = Ct(d);
4699
+ d = Tt(d);
4700
4700
  }
4701
4701
  }
4702
4702
  const R = await S(
4703
4703
  r,
4704
4704
  "Time to run balance checks",
4705
- Ar(r, e, c, d, true)
4705
+ Ir(r, e, c, d, true)
4706
4706
  );
4707
4707
  const { sufficient: I } = R;
4708
4708
  const C = R.balanceRequirements;
4709
4709
  const y = await S(
4710
4710
  r,
4711
4711
  "Time to fetch available routing options",
4712
- kr(r, e)
4712
+ Sr(r, e)
4713
4713
  );
4714
- if (_optionalChain([o, 'optionalAccess', _133 => _133.onRamp]) === false) y.onRamp = false;
4715
- if (_optionalChain([o, 'optionalAccess', _134 => _134.swap]) === false) y.swap = false;
4716
- if (_optionalChain([o, 'optionalAccess', _135 => _135.bridge]) === false) y.bridge = false;
4714
+ if (_optionalChain([o, 'optionalAccess', _143 => _143.onRamp]) === false) y.onRamp = false;
4715
+ if (_optionalChain([o, 'optionalAccess', _144 => _144.swap]) === false) y.swap = false;
4716
+ if (_optionalChain([o, 'optionalAccess', _145 => _145.bridge]) === false) y.bridge = false;
4717
4717
  if (a) {
4718
- qr(
4718
+ Ur(
4719
4719
  r,
4720
4720
  c,
4721
4721
  I,
@@ -4737,7 +4737,7 @@ var ie = async (r, e, t, n, o, a, s, i = false) => {
4737
4737
  transactionRequirements: C
4738
4738
  };
4739
4739
  }
4740
- const P = await qr(
4740
+ const P = await Ur(
4741
4741
  r,
4742
4742
  c,
4743
4743
  I,
@@ -4766,26 +4766,26 @@ var ie = async (r, e, t, n, o, a, s, i = false) => {
4766
4766
  var _metrics = require('@imtbl/metrics');
4767
4767
 
4768
4768
  // src/transaction/transaction.ts
4769
- function yt(r) {
4770
- return _optionalChain([r, 'optionalAccess', _136 => _136.ethereumProvider, 'optionalAccess', _137 => _137.isPassport]) === true;
4769
+ function wt(r) {
4770
+ return _optionalChain([r, 'optionalAccess', _146 => _146.ethereumProvider, 'optionalAccess', _147 => _147.isPassport]) === true;
4771
4771
  }
4772
- function ma(r) {
4773
- return yt(r);
4772
+ function fa(r) {
4773
+ return wt(r);
4774
4774
  }
4775
- var fa = async (r, e) => {
4775
+ var Ea = async (r, e) => {
4776
4776
  const t = e;
4777
4777
  const { chainId: n } = await r.getNetwork();
4778
- if (!Qt(Number(n))) return t;
4778
+ if (!zt(Number(n))) return t;
4779
4779
  if (typeof t.gasPrice !== "undefined") return t;
4780
- if (ma(r)) {
4780
+ if (fa(r)) {
4781
4781
  t.gasPrice = BigInt(0);
4782
4782
  } else {
4783
- t.maxFeePerGas = nt.maxFeePerGas;
4784
- t.maxPriorityFeePerGas = nt.maxPriorityFeePerGas;
4783
+ t.maxFeePerGas = ot.maxFeePerGas;
4784
+ t.maxPriorityFeePerGas = ot.maxPriorityFeePerGas;
4785
4785
  }
4786
4786
  return t;
4787
4787
  };
4788
- var wt = (r) => {
4788
+ var St = (r) => {
4789
4789
  if (r.code === "INSUFFICIENT_FUNDS") {
4790
4790
  return new l(
4791
4791
  r.message,
@@ -4809,18 +4809,18 @@ var wt = (r) => {
4809
4809
  var F = async (r, e) => {
4810
4810
  try {
4811
4811
  const t = await r.getSigner();
4812
- const n = await fa(r, e);
4812
+ const n = await Ea(r, e);
4813
4813
  const o = await t.sendTransaction(n);
4814
4814
  return {
4815
4815
  transactionResponse: o
4816
4816
  };
4817
4817
  } catch (t) {
4818
- throw wt(t);
4818
+ throw St(t);
4819
4819
  }
4820
4820
  };
4821
4821
 
4822
4822
  // src/smartCheckout/actions/signActions.ts
4823
- var ze = async (r, e) => {
4823
+ var Ke = async (r, e) => {
4824
4824
  let t = [];
4825
4825
  try {
4826
4826
  const n = await Promise.all(
@@ -4835,7 +4835,7 @@ var ze = async (r, e) => {
4835
4835
  );
4836
4836
  }
4837
4837
  for (const n of t) {
4838
- if (_optionalChain([n, 'optionalAccess', _138 => _138.status]) === 0) {
4838
+ if (_optionalChain([n, 'optionalAccess', _148 => _148.status]) === 0) {
4839
4839
  return {
4840
4840
  type: "FAILED",
4841
4841
  transactionHash: n.hash,
@@ -4847,7 +4847,7 @@ var ze = async (r, e) => {
4847
4847
  type: "SUCCESS"
4848
4848
  };
4849
4849
  };
4850
- var Ke = async (r, e) => {
4850
+ var Qe = async (r, e) => {
4851
4851
  let t = [];
4852
4852
  try {
4853
4853
  const n = await Promise.all(e.map(
@@ -4862,7 +4862,7 @@ var Ke = async (r, e) => {
4862
4862
  );
4863
4863
  }
4864
4864
  for (const n of t) {
4865
- if (_optionalChain([n, 'optionalAccess', _139 => _139.status]) === 0) {
4865
+ if (_optionalChain([n, 'optionalAccess', _149 => _149.status]) === 0) {
4866
4866
  return {
4867
4867
  type: "FAILED",
4868
4868
  transactionHash: n.hash,
@@ -4874,7 +4874,7 @@ var Ke = async (r, e) => {
4874
4874
  type: "SUCCESS"
4875
4875
  };
4876
4876
  };
4877
- var jr = async (r, e) => {
4877
+ var Gr = async (r, e) => {
4878
4878
  try {
4879
4879
  const t = await (await r.getSigner()).signTypedData(
4880
4880
  e.unsignedMessage.domain,
@@ -4901,7 +4901,7 @@ var jr = async (r, e) => {
4901
4901
 
4902
4902
 
4903
4903
 
4904
- var Vr = async (r) => {
4904
+ var qr = async (r) => {
4905
4905
  let e = [];
4906
4906
  let t = [];
4907
4907
  const n = [];
@@ -4922,7 +4922,7 @@ var Vr = async (r) => {
4922
4922
  fulfillmentTransactions: t
4923
4923
  };
4924
4924
  };
4925
- var Hr = async (r) => {
4925
+ var jr = async (r) => {
4926
4926
  let e = [];
4927
4927
  const t = [];
4928
4928
  for (const n of r) {
@@ -4934,7 +4934,7 @@ var Hr = async (r) => {
4934
4934
  e = await Promise.all(t);
4935
4935
  return e;
4936
4936
  };
4937
- var Pt = async (r) => {
4937
+ var kt = async (r) => {
4938
4938
  let e = [];
4939
4939
  const t = [];
4940
4940
  for (const n of r) {
@@ -4946,7 +4946,7 @@ var Pt = async (r) => {
4946
4946
  e = await Promise.all(t);
4947
4947
  return e;
4948
4948
  };
4949
- var zr = (r, e, t) => {
4949
+ var Vr = (r, e, t) => {
4950
4950
  let n;
4951
4951
  for (const o of t) {
4952
4952
  if (o.type !== _orderbook.ActionType.SIGNABLE) continue;
@@ -4968,31 +4968,31 @@ var zr = (r, e, t) => {
4968
4968
 
4969
4969
  // src/smartCheckout/fees/fees.ts
4970
4970
 
4971
- var Kr = 1;
4972
- var Ye = 6;
4973
- var Ca = (r, e, t = BigInt(1)) => {
4971
+ var Hr = 1;
4972
+ var Je = 6;
4973
+ var Ta = (r, e, t = BigInt(1)) => {
4974
4974
  const n = r.amount;
4975
- const o = Math.round(n.percentageDecimal * 10 ** Ye);
4976
- const a = e * BigInt(o) / BigInt(10 ** Ye);
4975
+ const o = Math.round(n.percentageDecimal * 10 ** Je);
4976
+ const a = e * BigInt(o) / BigInt(10 ** Je);
4977
4977
  return a - a % t;
4978
4978
  };
4979
- var Ta = (r, e) => {
4979
+ var Ia = (r, e) => {
4980
4980
  const t = r.amount;
4981
4981
  const n = _ethers.parseUnits.call(void 0, t.token, e);
4982
4982
  return n;
4983
4983
  };
4984
- var Je = (r, e, t = 18, n = BigInt(1)) => {
4984
+ var $e = (r, e, t = 18, n = BigInt(1)) => {
4985
4985
  let o = BigInt(0);
4986
4986
  const a = BigInt(e);
4987
- const s = a * BigInt(Kr * 10 ** Ye) / BigInt(10 ** Ye);
4987
+ const s = a * BigInt(Hr * 10 ** Je) / BigInt(10 ** Je);
4988
4988
  const i = [];
4989
4989
  for (const c of r) {
4990
4990
  let d = BigInt(0);
4991
4991
  if (Object.hasOwn(c.amount, "percentageDecimal")) {
4992
- d = Ca(c, a, n);
4992
+ d = Ta(c, a, n);
4993
4993
  o += d;
4994
4994
  } else if (Object.hasOwn(c.amount, "token")) {
4995
- d = Ta(c, t);
4995
+ d = Ia(c, t);
4996
4996
  o += d;
4997
4997
  } else {
4998
4998
  throw new l(
@@ -5002,7 +5002,7 @@ var Je = (r, e, t = 18, n = BigInt(1)) => {
5002
5002
  }
5003
5003
  if (o > s) {
5004
5004
  throw new l(
5005
- `The combined fees are above the allowed maximum of ${Kr * 100}%`,
5005
+ `The combined fees are above the allowed maximum of ${Hr * 100}%`,
5006
5006
  "ORDER_FEE_ERROR"
5007
5007
  );
5008
5008
  }
@@ -5017,7 +5017,7 @@ var Je = (r, e, t = 18, n = BigInt(1)) => {
5017
5017
  };
5018
5018
 
5019
5019
  // src/smartCheckout/buy/buy.ts
5020
- var ya = (r, e, t, n, o = false) => {
5020
+ var wa = (r, e, t, n, o = false) => {
5021
5021
  switch (r) {
5022
5022
  case "ERC20":
5023
5023
  return {
@@ -5036,7 +5036,7 @@ var ya = (r, e, t, n, o = false) => {
5036
5036
  };
5037
5037
  }
5038
5038
  };
5039
- var wa = (r, e) => {
5039
+ var Sa = (r, e) => {
5040
5040
  if (e.length > 0) {
5041
5041
  return {
5042
5042
  type: "TRANSACTION",
@@ -5051,7 +5051,7 @@ var wa = (r, e) => {
5051
5051
  }
5052
5052
  };
5053
5053
  };
5054
- var Qr = async (r, e, t, n = {
5054
+ var zr = async (r, e, t, n = {
5055
5055
  waitFulfillmentSettlements: true
5056
5056
  }) => {
5057
5057
  _metrics.track.call(void 0, "checkout_sdk", "buy_initiated");
@@ -5065,15 +5065,15 @@ var Qr = async (r, e, t, n = {
5065
5065
  let a = "";
5066
5066
  let s = 18;
5067
5067
  const i = _orderbook.constants.estimatedFulfillmentGasGwei;
5068
- const c = ae(r);
5069
- const d = Be(r);
5068
+ const c = se(r);
5069
+ const d = xe(r);
5070
5070
  const p = await S(
5071
5071
  r,
5072
5072
  "Time to get the address from the provider",
5073
5073
  (await e.getSigner()).getAddress()
5074
5074
  );
5075
- ft();
5076
- q(r, e, p, N(r));
5075
+ Et();
5076
+ q(r, e, p, v(r));
5077
5077
  q(r, e, p, A(r));
5078
5078
  const { id: u, takerFees: m, fillAmount: E } = t[0];
5079
5079
  let g;
@@ -5118,7 +5118,7 @@ var Qr = async (r, e, t, n = {
5118
5118
  let R = [];
5119
5119
  if (m && m.length > 0) {
5120
5120
  const k = o.result.sell[0].type === "ERC721" ? BigInt(1) : BigInt(o.result.sell[0].amount);
5121
- R = Je(m, f.amount, s, k);
5121
+ R = $e(m, f.amount, s, k);
5122
5122
  }
5123
5123
  let I = [];
5124
5124
  let C = [];
@@ -5134,11 +5134,11 @@ var Qr = async (r, e, t, n = {
5134
5134
  I = await S(
5135
5135
  r,
5136
5136
  "Time to construct the unsigned approval transactions",
5137
- Hr(k)
5137
+ jr(k)
5138
5138
  );
5139
5139
  } catch (k) {
5140
5140
  const X = (performance.now() - P) / 1e3;
5141
- ct(r, "Time to call fulfillOrder from the orderbook", X);
5141
+ dt(r, "Time to call fulfillOrder from the orderbook", X);
5142
5142
  if (k.message.includes(_orderbook.OrderStatusName.EXPIRED)) {
5143
5143
  throw new l("Order is expired", "ORDER_EXPIRED_ERROR", { orderId: u });
5144
5144
  }
@@ -5157,13 +5157,13 @@ var Qr = async (r, e, t, n = {
5157
5157
  C = await S(
5158
5158
  r,
5159
5159
  "Time to construct the unsigned fulfillment transactions",
5160
- Pt(y)
5160
+ kt(y)
5161
5161
  );
5162
5162
  } catch (e6) {
5163
5163
  }
5164
- let v = BigInt("0");
5164
+ let N = BigInt("0");
5165
5165
  let z = "NATIVE";
5166
- let ce = "";
5166
+ let de = "";
5167
5167
  const $ = o.result.buy;
5168
5168
  if ($.length > 0) {
5169
5169
  switch ($[0].type) {
@@ -5172,7 +5172,7 @@ var Qr = async (r, e, t, n = {
5172
5172
  break;
5173
5173
  case "ERC20":
5174
5174
  z = "ERC20";
5175
- ce = $[0].contractAddress;
5175
+ de = $[0].contractAddress;
5176
5176
  break;
5177
5177
  default:
5178
5178
  throw new l(
@@ -5186,34 +5186,34 @@ var Qr = async (r, e, t, n = {
5186
5186
  }
5187
5187
  $.forEach((k) => {
5188
5188
  if (k.type !== "ERC721") {
5189
- v += BigInt(k.amount);
5189
+ N += BigInt(k.amount);
5190
5190
  }
5191
5191
  });
5192
5192
  const W = o.result.fees;
5193
5193
  W.forEach((k) => {
5194
- v += BigInt(k.amount);
5194
+ N += BigInt(k.amount);
5195
5195
  });
5196
5196
  if (o.result.sell[0].type === "ERC1155" && E) {
5197
- v = v * BigInt(E) / BigInt(o.result.sell[0].amount);
5197
+ N = N * BigInt(E) / BigInt(o.result.sell[0].amount);
5198
5198
  }
5199
- const Xe = [
5200
- ya(z, ce, v, a)
5199
+ const et = [
5200
+ wa(z, de, N, a)
5201
5201
  ];
5202
5202
  const j = await S(
5203
5203
  r,
5204
5204
  "Total time running smart checkout",
5205
- ie(
5205
+ ce(
5206
5206
  r,
5207
5207
  e,
5208
- Xe,
5209
- wa(
5208
+ et,
5209
+ Sa(
5210
5210
  i,
5211
5211
  C
5212
5212
  )
5213
5213
  )
5214
5214
  );
5215
5215
  if (j.sufficient) {
5216
- const k = await ze(e, I);
5216
+ const k = await Ke(e, I);
5217
5217
  if (k.type === "FAILED") {
5218
5218
  return {
5219
5219
  status: "FAILED",
@@ -5224,7 +5224,7 @@ var Qr = async (r, e, t, n = {
5224
5224
  }
5225
5225
  try {
5226
5226
  if (C.length === 0) {
5227
- C = await Pt(y);
5227
+ C = await kt(y);
5228
5228
  }
5229
5229
  } catch (V) {
5230
5230
  throw new l(
@@ -5234,7 +5234,7 @@ var Qr = async (r, e, t, n = {
5234
5234
  );
5235
5235
  }
5236
5236
  if (n.waitFulfillmentSettlements) {
5237
- const V = await Ke(e, C);
5237
+ const V = await Qe(e, C);
5238
5238
  if (V.type === "FAILED") {
5239
5239
  return {
5240
5240
  status: "FAILED",
@@ -5251,9 +5251,9 @@ var Qr = async (r, e, t, n = {
5251
5251
  let X;
5252
5252
  try {
5253
5253
  const V = await Promise.all(C.map(
5254
- (et) => F(e, et)
5254
+ (tt) => F(e, tt)
5255
5255
  ));
5256
- X = V.map((et) => et.transactionResponse);
5256
+ X = V.map((tt) => tt.transactionResponse);
5257
5257
  } catch (V) {
5258
5258
  throw new l(
5259
5259
  "An error occurred while executing the fulfillment transaction",
@@ -5276,7 +5276,7 @@ var Qr = async (r, e, t, n = {
5276
5276
  };
5277
5277
 
5278
5278
  // src/smartCheckout/cancel/cancel.ts
5279
- var Pa = async (r, e, t, n, o) => {
5279
+ var ka = async (r, e, t, n, o) => {
5280
5280
  let a;
5281
5281
  if (n.length === 0) {
5282
5282
  throw new l(
@@ -5311,7 +5311,7 @@ var Pa = async (r, e, t, n, o) => {
5311
5311
  );
5312
5312
  }
5313
5313
  if (o) {
5314
- const c = await Ke(t, [a]);
5314
+ const c = await Qe(t, [a]);
5315
5315
  if (c.type === "FAILED") {
5316
5316
  return {
5317
5317
  status: "FAILED",
@@ -5343,7 +5343,7 @@ var Pa = async (r, e, t, n, o) => {
5343
5343
  transactions: i
5344
5344
  };
5345
5345
  };
5346
- var ka = async (r, e, t) => {
5346
+ var va = async (r, e, t) => {
5347
5347
  try {
5348
5348
  const n = await e.getSigner();
5349
5349
  const o = await n.getAddress();
@@ -5389,15 +5389,15 @@ var ka = async (r, e, t) => {
5389
5389
  );
5390
5390
  }
5391
5391
  };
5392
- var Zr = async (r, e, t, n = {
5392
+ var Kr = async (r, e, t, n = {
5393
5393
  waitFulfillmentSettlements: true,
5394
5394
  useGaslessCancel: false
5395
5395
  }) => {
5396
- const o = ae(r);
5396
+ const o = se(r);
5397
5397
  if (n.useGaslessCancel) {
5398
- return await ka(o, e, t);
5398
+ return await va(o, e, t);
5399
5399
  }
5400
- return await Pa(
5400
+ return await ka(
5401
5401
  r,
5402
5402
  o,
5403
5403
  e,
@@ -5408,12 +5408,12 @@ var Zr = async (r, e, t, n = {
5408
5408
 
5409
5409
  // src/smartCheckout/itemRequirements/itemRequirements.ts
5410
5410
 
5411
- async function Jr(r, e) {
5411
+ async function Zr(r, e) {
5412
5412
  const t = [];
5413
5413
  e.forEach((a) => {
5414
5414
  if (a.type === "ERC20") {
5415
5415
  const { tokenAddress: s } = a;
5416
- t.push(or(s, L, r).decimals());
5416
+ t.push(rr(s, L, r).decimals());
5417
5417
  }
5418
5418
  });
5419
5419
  const n = await Promise.all(t);
@@ -5441,20 +5441,20 @@ async function Jr(r, e) {
5441
5441
 
5442
5442
 
5443
5443
 
5444
- var Ba = (r, e, t) => ({
5444
+ var xa = (r, e, t) => ({
5445
5445
  type: "ERC721",
5446
5446
  id: r,
5447
5447
  contractAddress: e,
5448
5448
  spenderAddress: t
5449
5449
  });
5450
- var xa = (r, e, t, n) => ({
5450
+ var ba = (r, e, t, n) => ({
5451
5451
  type: "ERC1155",
5452
5452
  id: r,
5453
5453
  contractAddress: e,
5454
5454
  spenderAddress: t,
5455
5455
  amount: BigInt(n)
5456
5456
  });
5457
- var ba = (r, e = 18) => {
5457
+ var La = (r, e = 18) => {
5458
5458
  const t = _ethers.parseUnits.call(void 0, r.amount, e);
5459
5459
  if (r.type === "NATIVE") {
5460
5460
  return {
@@ -5468,7 +5468,7 @@ var ba = (r, e = 18) => {
5468
5468
  contractAddress: r.tokenAddress
5469
5469
  };
5470
5470
  };
5471
- var $r = async (r, e, t) => {
5471
+ var Yr = async (r, e, t) => {
5472
5472
  let n;
5473
5473
  let o;
5474
5474
  let a = "";
@@ -5498,7 +5498,7 @@ var $r = async (r, e, t) => {
5498
5498
  f.decimals()
5499
5499
  );
5500
5500
  }
5501
- const u = ba(s, p);
5501
+ const u = La(s, p);
5502
5502
  const m = "type" in i;
5503
5503
  try {
5504
5504
  const f = await S(
@@ -5506,7 +5506,7 @@ var $r = async (r, e, t) => {
5506
5506
  "Time to get the address from the provider",
5507
5507
  (await e.getSigner()).getAddress()
5508
5508
  );
5509
- n = ae(r);
5509
+ n = se(r);
5510
5510
  const { seaportContractAddress: R } = n.config();
5511
5511
  a = R;
5512
5512
  const I = m && i.type === "ERC1155" ? {
@@ -5542,7 +5542,7 @@ var $r = async (r, e, t) => {
5542
5542
  }
5543
5543
  const E = [];
5544
5544
  if (m && i.type === "ERC1155") {
5545
- const f = xa(
5545
+ const f = ba(
5546
5546
  i.id,
5547
5547
  i.collectionAddress,
5548
5548
  a,
@@ -5550,15 +5550,15 @@ var $r = async (r, e, t) => {
5550
5550
  );
5551
5551
  E.push(f);
5552
5552
  } else {
5553
- const f = Ba(i.id, i.collectionAddress, a);
5553
+ const f = xa(i.id, i.collectionAddress, a);
5554
5554
  E.push(f);
5555
5555
  }
5556
5556
  let g;
5557
- if (!It(e)) {
5557
+ if (!ht(e)) {
5558
5558
  g = await S(
5559
5559
  r,
5560
5560
  "Total time running smart checkout",
5561
- ie(
5561
+ ce(
5562
5562
  r,
5563
5563
  e,
5564
5564
  E,
@@ -5575,8 +5575,8 @@ var $r = async (r, e, t) => {
5575
5575
  g = { sufficient: true, transactionRequirements: [] };
5576
5576
  }
5577
5577
  if (g.sufficient) {
5578
- const f = await Vr(o.actions);
5579
- const R = await ze(e, f.approvalTransactions);
5578
+ const f = await qr(o.actions);
5579
+ const R = await Ke(e, f.approvalTransactions);
5580
5580
  if (R.type === "FAILED") {
5581
5581
  return {
5582
5582
  status: "FAILED",
@@ -5585,7 +5585,7 @@ var $r = async (r, e, t) => {
5585
5585
  smartCheckoutResult: g
5586
5586
  };
5587
5587
  }
5588
- const I = zr(
5588
+ const I = Vr(
5589
5589
  o.orderHash,
5590
5590
  o.orderComponents,
5591
5591
  o.actions
@@ -5600,7 +5600,7 @@ var $r = async (r, e, t) => {
5600
5600
  }
5601
5601
  );
5602
5602
  }
5603
- const C = await jr(
5603
+ const C = await Gr(
5604
5604
  e,
5605
5605
  I
5606
5606
  );
@@ -5612,9 +5612,9 @@ var $r = async (r, e, t) => {
5612
5612
  makerFees: []
5613
5613
  };
5614
5614
  if (c !== void 0) {
5615
- let v = BigInt(1);
5616
- if (m && i.type === "ERC1155") v = BigInt(i.amount);
5617
- const z = Je(c, u.amount, p, v);
5615
+ let N = BigInt(1);
5616
+ if (m && i.type === "ERC1155") N = BigInt(i.amount);
5617
+ const z = $e(c, u.amount, p, N);
5618
5618
  if (z.length !== c.length) {
5619
5619
  throw new l(
5620
5620
  "One of the fees is too small, must be greater than 0.000001",
@@ -5624,14 +5624,14 @@ var $r = async (r, e, t) => {
5624
5624
  P.makerFees = z;
5625
5625
  }
5626
5626
  try {
5627
- const v = await n.createListing(P);
5628
- y = v.result.id;
5629
- } catch (v) {
5627
+ const N = await n.createListing(P);
5628
+ y = N.result.id;
5629
+ } catch (N) {
5630
5630
  throw new l(
5631
5631
  "An error occurred while creating the listing",
5632
5632
  "CREATE_ORDER_LISTING_ERROR",
5633
5633
  {
5634
- error: v,
5634
+ error: N,
5635
5635
  collectionId: i.id,
5636
5636
  collectionAddress: i.collectionAddress
5637
5637
  }
@@ -5651,7 +5651,7 @@ var $r = async (r, e, t) => {
5651
5651
 
5652
5652
  // src/swap/swap.ts
5653
5653
 
5654
- var kt = async (r, e, t, n, o, a, s, i, c) => {
5654
+ var vt = async (r, e, t, n, o, a, s, i, c) => {
5655
5655
  if (!t.address || t.decimals === 0) {
5656
5656
  throw new l(
5657
5657
  "fromToken address or decimals is missing.",
@@ -5677,7 +5677,7 @@ var kt = async (r, e, t, n, o, a, s, i, c) => {
5677
5677
  );
5678
5678
  }
5679
5679
  const d = A(r);
5680
- const p = await oe(d, r);
5680
+ const p = await ae(d, r);
5681
5681
  const u = await (await e.getSigner()).getAddress();
5682
5682
  if (o) {
5683
5683
  return p.getUnsignedSwapTxFromAmountIn(
@@ -5700,8 +5700,8 @@ var kt = async (r, e, t, n, o, a, s, i, c) => {
5700
5700
  c
5701
5701
  );
5702
5702
  };
5703
- var en = async (r, e, t, n, o, a, s, i, c) => {
5704
- const d = await kt(
5703
+ var $r = async (r, e, t, n, o, a, s, i, c) => {
5704
+ const d = await vt(
5705
5705
  r,
5706
5706
  e,
5707
5707
  t,
@@ -5715,7 +5715,7 @@ var en = async (r, e, t, n, o, a, s, i, c) => {
5715
5715
  if (d.approval) {
5716
5716
  const m = await F(e, d.approval.transaction);
5717
5717
  const E = await m.transactionResponse.wait();
5718
- if (_optionalChain([E, 'optionalAccess', _140 => _140.status]) === 0) {
5718
+ if (_optionalChain([E, 'optionalAccess', _150 => _150.status]) === 0) {
5719
5719
  throw new l(
5720
5720
  "Approval transaction failed and was reverted",
5721
5721
  "APPROVAL_TRANSACTION_FAILED"
@@ -5724,7 +5724,7 @@ var en = async (r, e, t, n, o, a, s, i, c) => {
5724
5724
  }
5725
5725
  const p = await F(e, d.swap.transaction);
5726
5726
  const u = await p.transactionResponse.wait();
5727
- if (_optionalChain([u, 'optionalAccess', _141 => _141.status]) === 0) {
5727
+ if (_optionalChain([u, 'optionalAccess', _151 => _151.status]) === 0) {
5728
5728
  throw new l(
5729
5729
  "Swap transaction failed and was reverted",
5730
5730
  "TRANSACTION_FAILED"
@@ -5738,10 +5738,10 @@ var en = async (r, e, t, n, o, a, s, i, c) => {
5738
5738
  };
5739
5739
 
5740
5740
  // src/wallet/wallet.ts
5741
- async function tn(r) {
5741
+ async function Xr(r) {
5742
5742
  const e = [];
5743
- const t = _nullishCoalesce(_optionalChain([r, 'access', _142 => _142.exclude, 'optionalAccess', _143 => _143.map, 'call', _144 => _144((o) => o.walletProviderName)]), () => ( []));
5744
- let n = Object.values(ue);
5743
+ const t = _nullishCoalesce(_optionalChain([r, 'access', _152 => _152.exclude, 'optionalAccess', _153 => _153.map, 'call', _154 => _154((o) => o.walletProviderName)]), () => ( []));
5744
+ let n = Object.values(me);
5745
5745
  if (t.length !== 0) {
5746
5746
  n = n.filter((o) => !t.includes(o));
5747
5747
  }
@@ -5757,16 +5757,16 @@ async function tn(r) {
5757
5757
 
5758
5758
  // src/riskAssessment/riskAssessment.ts
5759
5759
 
5760
- var vt = async (r, e) => {
5760
+ var Nt = async (r, e) => {
5761
5761
  const t = Object.fromEntries(
5762
5762
  r.map((o) => [o.toLowerCase(), { sanctioned: false }])
5763
5763
  );
5764
5764
  const n = await e.remote.getConfig("riskAssessment");
5765
- if (!_optionalChain([n, 'optionalAccess', _145 => _145.enabled])) {
5765
+ if (!_optionalChain([n, 'optionalAccess', _155 => _155.enabled])) {
5766
5766
  return t;
5767
5767
  }
5768
5768
  try {
5769
- const o = _nullishCoalesce(_optionalChain([n, 'optionalAccess', _146 => _146.levels, 'access', _147 => _147.map, 'call', _148 => _148((s) => s.toLowerCase())]), () => ( []));
5769
+ const o = _nullishCoalesce(_optionalChain([n, 'optionalAccess', _156 => _156.levels, 'access', _157 => _157.map, 'call', _158 => _158((s) => s.toLowerCase())]), () => ( []));
5770
5770
  const a = await _axios2.default.post(
5771
5771
  `${U[e.environment]}/v1/sanctions/check`,
5772
5772
  {
@@ -5784,7 +5784,7 @@ var vt = async (r, e) => {
5784
5784
  return t;
5785
5785
  }
5786
5786
  };
5787
- var Nt = (r, e) => {
5787
+ var _t = (r, e) => {
5788
5788
  if (e) {
5789
5789
  return r[e.toLowerCase()].sanctioned;
5790
5790
  }
@@ -5792,13 +5792,13 @@ var Nt = (r, e) => {
5792
5792
  };
5793
5793
 
5794
5794
  // src/sdk.ts
5795
- var Ga = {
5795
+ var qa = {
5796
5796
  baseConfig: {
5797
5797
  environment: _config.Environment.SANDBOX
5798
5798
  },
5799
5799
  passport: void 0
5800
5800
  };
5801
- var _t = class {
5801
+ var Ot = class {
5802
5802
 
5803
5803
 
5804
5804
 
@@ -5809,12 +5809,12 @@ var _t = class {
5809
5809
  * Constructs a new instance of the CheckoutModule class.
5810
5810
  * @param {CheckoutModuleConfiguration} [config=SANDBOX_CONFIGURATION] - The configuration object for the CheckoutModule.
5811
5811
  */
5812
- constructor(e = Ga) {
5813
- this.httpClient = new de(e);
5814
- this.config = new Te(e, this.httpClient);
5815
- this.fiatRampService = new Oe(this.config);
5812
+ constructor(e = qa) {
5813
+ this.httpClient = new le(e);
5814
+ this.config = new Ie(e, this.httpClient);
5815
+ this.fiatRampService = new Me(this.config);
5816
5816
  this.readOnlyProviders = /* @__PURE__ */ new Map();
5817
- this.availability = Pe(
5817
+ this.availability = ke(
5818
5818
  this.config.isDevelopment,
5819
5819
  this.config.isProduction
5820
5820
  );
@@ -5830,9 +5830,9 @@ var _t = class {
5830
5830
  */
5831
5831
  async widgets(e) {
5832
5832
  const t = this;
5833
- const n = le();
5833
+ const n = pe();
5834
5834
  try {
5835
- const o = `https://cdn.jsdelivr.net/npm/@imtbl/checkout-widgets@${le()}/dist/browser/index.js`;
5835
+ const o = `https://cdn.jsdelivr.net/npm/@imtbl/checkout-widgets@${pe()}/dist/browser/index.js`;
5836
5836
  const a = await Promise.resolve().then(() => _interopRequireWildcard(require(
5837
5837
  /* webpackIgnore: true */
5838
5838
  o
@@ -5855,7 +5855,7 @@ var _t = class {
5855
5855
  * @returns {Promise<CreateProviderResult>} A promise that resolves to the created provider.
5856
5856
  */
5857
5857
  async createProvider(e) {
5858
- return await ir(
5858
+ return await ar(
5859
5859
  e.walletProviderName,
5860
5860
  this.passport
5861
5861
  );
@@ -5904,7 +5904,7 @@ var _t = class {
5904
5904
  allowUnsupportedProvider: true
5905
5905
  }
5906
5906
  );
5907
- return $t(t);
5907
+ return Yt(t);
5908
5908
  }
5909
5909
  /**
5910
5910
  * Fetches the risk assessment for the given addresses.
@@ -5912,7 +5912,7 @@ var _t = class {
5912
5912
  * @returns {Promise<AssessmentResult>} - A promise that resolves to the risk assessment result.
5913
5913
  */
5914
5914
  async getRiskAssessment(e) {
5915
- return await vt(e, this.config);
5915
+ return await Nt(e, this.config);
5916
5916
  }
5917
5917
  /**
5918
5918
  * Helper method that checks if given risk assessment results contain sanctioned addresses.
@@ -5921,7 +5921,7 @@ var _t = class {
5921
5921
  * @returns {boolean} - Result of the check.
5922
5922
  */
5923
5923
  checkIsAddressSanctioned(e, t) {
5924
- return Nt(e, t);
5924
+ return _t(e, t);
5925
5925
  }
5926
5926
  /**
5927
5927
  * Connects to a blockchain network using the specified provider.
@@ -5938,10 +5938,10 @@ var _t = class {
5938
5938
  allowMistmatchedChainId: true
5939
5939
  }
5940
5940
  );
5941
- if (e.requestWalletPermissions && !yt(t)) {
5942
- await er(t);
5941
+ if (e.requestWalletPermissions && !wt(t)) {
5942
+ await $t(t);
5943
5943
  } else {
5944
- await Xt(t);
5944
+ await Jt(t);
5945
5945
  }
5946
5946
  return t;
5947
5947
  }
@@ -5960,7 +5960,7 @@ var _t = class {
5960
5960
  allowMistmatchedChainId: true
5961
5961
  }
5962
5962
  );
5963
- const n = await st(
5963
+ const n = await it(
5964
5964
  this.config.networkMap,
5965
5965
  t,
5966
5966
  e.chainId
@@ -5981,7 +5981,7 @@ var _t = class {
5981
5981
  allowMistmatchedChainId: true
5982
5982
  }
5983
5983
  );
5984
- const n = await jt(
5984
+ const n = await Vt(
5985
5985
  this.config,
5986
5986
  t,
5987
5987
  e.chainId
@@ -5995,7 +5995,7 @@ var _t = class {
5995
5995
  * @returns {Promise<TokenInfo>} - A promise that resolves to the token info request.
5996
5996
  */
5997
5997
  async getTokenInfo(e) {
5998
- return await _e(e.provider, e.tokenAddress);
5998
+ return await Oe(e.provider, e.tokenAddress);
5999
5999
  }
6000
6000
  /**
6001
6001
  * Retrieves the balance of a wallet address.
@@ -6008,13 +6008,13 @@ var _t = class {
6008
6008
  e.provider
6009
6009
  );
6010
6010
  if (!e.tokenAddress || e.tokenAddress === "") {
6011
- return await ut(
6011
+ return await mt(
6012
6012
  this.config,
6013
6013
  t,
6014
6014
  e.walletAddress
6015
6015
  );
6016
6016
  }
6017
- return await mt(
6017
+ return await ft(
6018
6018
  t,
6019
6019
  e.walletAddress,
6020
6020
  e.tokenAddress
@@ -6056,7 +6056,7 @@ var _t = class {
6056
6056
  * @returns {Promise<GetWalletAllowListResult>} - A promise that resolves to the wallet allow list result.
6057
6057
  */
6058
6058
  async getWalletAllowList(e) {
6059
- return await tn(e);
6059
+ return await Xr(e);
6060
6060
  }
6061
6061
  /**
6062
6062
  * Sends a transaction using the specified provider and transaction parameters.
@@ -6092,7 +6092,7 @@ var _t = class {
6092
6092
  try {
6093
6093
  return await t(n);
6094
6094
  } catch (o) {
6095
- throw wt(o);
6095
+ throw St(o);
6096
6096
  }
6097
6097
  }
6098
6098
  /**
@@ -6109,7 +6109,7 @@ var _t = class {
6109
6109
  allowMistmatchedChainId: true
6110
6110
  }
6111
6111
  );
6112
- return await Ce(this.config, t);
6112
+ return await Te(this.config, t);
6113
6113
  }
6114
6114
  /**
6115
6115
  * Determines the requirements for performing a buy.
@@ -6128,7 +6128,7 @@ var _t = class {
6128
6128
  this.config,
6129
6129
  e.provider
6130
6130
  );
6131
- return await Qr(
6131
+ return await zr(
6132
6132
  this.config,
6133
6133
  t,
6134
6134
  e.orders,
@@ -6154,7 +6154,7 @@ var _t = class {
6154
6154
  this.config,
6155
6155
  e.provider
6156
6156
  );
6157
- return await $r(this.config, t, e.orders);
6157
+ return await Yr(this.config, t, e.orders);
6158
6158
  }
6159
6159
  /**
6160
6160
  * Cancels a sell.
@@ -6170,7 +6170,7 @@ var _t = class {
6170
6170
  this.config,
6171
6171
  e.provider
6172
6172
  );
6173
- return await Zr(
6173
+ return await Kr(
6174
6174
  this.config,
6175
6175
  t,
6176
6176
  e.orderIds,
@@ -6196,7 +6196,7 @@ var _t = class {
6196
6196
  );
6197
6197
  let n = [];
6198
6198
  try {
6199
- n = await Jr(
6199
+ n = await Zr(
6200
6200
  t,
6201
6201
  e.itemRequirements
6202
6202
  );
@@ -6207,7 +6207,7 @@ var _t = class {
6207
6207
  { error: o }
6208
6208
  );
6209
6209
  }
6210
- return await ie(
6210
+ return await ce(
6211
6211
  this.config,
6212
6212
  t,
6213
6213
  n,
@@ -6224,7 +6224,7 @@ var _t = class {
6224
6224
  * @returns {boolean} - True if the object is a WrappedBrowserProvider, false otherwise.
6225
6225
  */
6226
6226
  static isWrappedBrowserProvider(e) {
6227
- return cr(e);
6227
+ return sr(e);
6228
6228
  }
6229
6229
  /**
6230
6230
  * Estimates the gas required for a swap or bridge transaction.
@@ -6232,11 +6232,11 @@ var _t = class {
6232
6232
  * @returns {Promise<GasEstimateSwapResult | GasEstimateBridgeToL2Result>} - A promise that resolves to the gas estimation result.
6233
6233
  */
6234
6234
  async gasEstimate(e) {
6235
- this.readOnlyProviders = await Le(
6235
+ this.readOnlyProviders = await De(
6236
6236
  this.config,
6237
6237
  this.readOnlyProviders
6238
6238
  );
6239
- return await sr(
6239
+ return await or(
6240
6240
  e,
6241
6241
  this.readOnlyProviders,
6242
6242
  this.config
@@ -6253,20 +6253,20 @@ var _t = class {
6253
6253
  let o;
6254
6254
  const a = "request" in e.browserProvider ? new b(e.browserProvider) : e.browserProvider;
6255
6255
  const s = await (await a.getSigner()).getAddress();
6256
- const i = _optionalChain([a, 'access', _149 => _149.ethereumProvider, 'optionalAccess', _150 => _150.isPassport]) || false;
6256
+ const i = _optionalChain([a, 'access', _159 => _159.ethereumProvider, 'optionalAccess', _160 => _160.isPassport]) || false;
6257
6257
  if (i && e.passport) {
6258
6258
  const u = await e.passport.getUserInfo();
6259
- o = _optionalChain([u, 'optionalAccess', _151 => _151.email]);
6259
+ o = _optionalChain([u, 'optionalAccess', _161 => _161.email]);
6260
6260
  }
6261
6261
  const c = await H(this.config, {
6262
6262
  type: "onramp"
6263
6263
  });
6264
- const d = _optionalChain([c, 'access', _152 => _152.tokens, 'optionalAccess', _153 => _153.find, 'call', _154 => _154((u) => T(u.address, e.tokenAddress))]);
6264
+ const d = _optionalChain([c, 'access', _162 => _162.tokens, 'optionalAccess', _163 => _163.find, 'call', _164 => _164((u) => T(u.address, e.tokenAddress))]);
6265
6265
  if (d) {
6266
6266
  t = e.tokenAmount;
6267
6267
  n = d.symbol;
6268
6268
  }
6269
- const p = _optionalChain([c, 'optionalAccess', _155 => _155.tokens, 'optionalAccess', _156 => _156.filter, 'call', _157 => _157((u) => u.symbol), 'access', _158 => _158.map, 'call', _159 => _159((u) => u.symbol)]);
6269
+ const p = _optionalChain([c, 'optionalAccess', _165 => _165.tokens, 'optionalAccess', _166 => _166.filter, 'call', _167 => _167((u) => u.symbol), 'access', _168 => _168.map, 'call', _169 => _169((u) => u.symbol)]);
6270
6270
  return await this.fiatRampService.createWidgetUrl({
6271
6271
  exchangeType: e.exchangeType,
6272
6272
  isPassport: i,
@@ -6301,7 +6301,7 @@ var _t = class {
6301
6301
  this.config,
6302
6302
  e.provider
6303
6303
  );
6304
- return en(
6304
+ return $r(
6305
6305
  this.config,
6306
6306
  t,
6307
6307
  e.fromToken,
@@ -6323,7 +6323,7 @@ var _t = class {
6323
6323
  this.config,
6324
6324
  e.provider
6325
6325
  );
6326
- return kt(
6326
+ return vt(
6327
6327
  this.config,
6328
6328
  t,
6329
6329
  e.fromToken,
@@ -6338,7 +6338,7 @@ var _t = class {
6338
6338
  };
6339
6339
 
6340
6340
  // src/blockExplorer/blockExplorer.ts
6341
- var $e = class {
6341
+ var Xe = class {
6342
6342
  /**
6343
6343
  * Returns the link to the transaction on Blockscout.
6344
6344
  * @param {ChainId} chainId - The chain ID of the network
@@ -6346,7 +6346,7 @@ var $e = class {
6346
6346
  * @returns {string | undefined} The URL to view the transaction on Blockscout, or undefined if the chain ID or hash is invalid
6347
6347
  */
6348
6348
  static getTransactionLink(e, t) {
6349
- const n = _optionalChain([te, 'optionalAccess', _160 => _160[e], 'optionalAccess', _161 => _161.url]);
6349
+ const n = _optionalChain([te, 'optionalAccess', _170 => _170[e], 'optionalAccess', _171 => _171.url]);
6350
6350
  if (!n || !t) return void 0;
6351
6351
  return `${n}/tx/${t}`;
6352
6352
  }
@@ -6407,4 +6407,4 @@ var $e = class {
6407
6407
 
6408
6408
 
6409
6409
 
6410
- exports.AddTokensEventType = Rn; exports.BlockExplorerService = $e; exports.BridgeEventType = ln; exports.ChainId = Z; exports.ChainName = tt; exports.ChainSlug = he; exports.Checkout = _t; exports.CheckoutConfiguration = Te; exports.CheckoutError = l; exports.CheckoutErrorType = w; exports.CheckoutStatus = me; exports.CommerceEventType = mn; exports.CommerceFailureEventType = En; exports.CommerceFlowType = yn; exports.CommerceSuccessEventType = fn; exports.CommerceUserActionEventType = gn; exports.ConnectEventType = on; exports.ConnectTargetLayer = hn; exports.ExchangeType = Gt; exports.FeeType = ke; exports.FundingStepType = ge; exports.GasEstimateType = ot; exports.GasTokenType = Ee; exports.IMMUTABLE_API_BASE_URL = U; exports.IMTBLWidgetEvents = rn; exports.ItemType = M; exports.NetworkFilterTypes = pe; exports.OnRampEventType = un; exports.OrchestrationEventType = pn; exports.ProviderEventType = nn; exports.PurchaseEventType = Cn; exports.RoutingOutcomeType = at; exports.SaleEventType = cn; exports.SalePaymentTypes = dn; exports.SwapDirection = An; exports.SwapEventType = sn; exports.TokenFilterTypes = ne; exports.TransactionOrGasType = fe; exports.TransferEventType = Tn; exports.WalletEventType = an; exports.WalletFilterTypes = Ft; exports.WalletProviderName = ue; exports.WalletProviderRdns = Wt; exports.WidgetTheme = wn; exports.WidgetType = In; exports.WrappedBrowserProvider = b; exports.fetchRiskAssessment = vt; exports.getGasPriceInWei = Et; exports.getMetaMaskProviderDetail = po; exports.getPassportProviderDetail = lo; exports.getUnderlyingChainId = Re; exports.isAddressSanctioned = Nt; exports.metaMaskProviderInfo = xe; exports.passportProviderInfo = be; exports.validateProvider = B;
6410
+ exports.AddTokensEventType = En; exports.BlockExplorerService = Xe; exports.BridgeEventType = cn; exports.ChainId = Q; exports.ChainName = rt; exports.ChainSlug = Ae; exports.Checkout = Ot; exports.CheckoutConfiguration = Ie; exports.CheckoutError = l; exports.CheckoutErrorType = w; exports.CheckoutStatus = fe; exports.CommerceEventType = pn; exports.CommerceFailureEventType = mn; exports.CommerceFlowType = hn; exports.CommerceSuccessEventType = un; exports.CommerceUserActionEventType = fn; exports.ConnectEventType = rn; exports.ConnectTargetLayer = Tn; exports.ExchangeType = qt; exports.FeeType = ve; exports.FundingStepType = Re; exports.GasEstimateType = at; exports.GasTokenType = ge; exports.IMMUTABLE_API_BASE_URL = U; exports.IMTBLWidgetEvents = en; exports.ItemType = M; exports.NetworkFilterTypes = ue; exports.OnRampEventType = ln; exports.OrchestrationEventType = dn; exports.ProviderEventType = tn; exports.PurchaseEventType = gn; exports.RoutingOutcomeType = st; exports.SaleEventType = an; exports.SalePaymentTypes = sn; exports.SwapDirection = In; exports.SwapEventType = on; exports.TokenFilterTypes = ne; exports.TransactionOrGasType = Ee; exports.TransferEventType = Rn; exports.WalletEventType = nn; exports.WalletFilterTypes = Wt; exports.WalletProviderName = me; exports.WalletProviderRdns = Ut; exports.WidgetTheme = An; exports.WidgetType = Cn; exports.WrappedBrowserProvider = b; exports.fetchRiskAssessment = Nt; exports.getGasPriceInWei = gt; exports.getMetaMaskProviderDetail = uo; exports.getPassportProviderDetail = po; exports.getUnderlyingChainId = Ce; exports.isAddressSanctioned = _t; exports.metaMaskProviderInfo = be; exports.passportProviderInfo = Le; exports.validateProvider = B;