@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
1
  // src/widgets/definitions/events/widgets.ts
2
- var no = /* @__PURE__ */ ((g) => {
2
+ var ro = /* @__PURE__ */ ((g) => {
3
3
  g["IMTBL_WIDGETS_PROVIDER"] = "imtbl-widgets-provider";
4
4
  g["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
5
5
  g["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
@@ -12,43 +12,43 @@ var no = /* @__PURE__ */ ((g) => {
12
12
  g["IMTBL_PURCHASE_WIDGET_EVENT"] = "imtbl-purchase-widget";
13
13
  g["IMTBL_TRANSFER_WIDGET_EVENT"] = "imtbl-transfer-widget";
14
14
  return g;
15
- })(no || {});
16
- var ao = /* @__PURE__ */ ((e) => {
15
+ })(ro || {});
16
+ var oo = /* @__PURE__ */ ((e) => {
17
17
  e["PROVIDER_UPDATED"] = "PROVIDER_UPDATED";
18
18
  return e;
19
- })(ao || {});
19
+ })(oo || {});
20
20
 
21
21
  // src/widgets/definitions/events/connect.ts
22
- var io = /* @__PURE__ */ ((a) => {
22
+ var no = /* @__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
- })(io || {});
29
+ })(no || {});
30
30
 
31
31
  // src/widgets/definitions/events/wallet.ts
32
- var so = /* @__PURE__ */ ((n) => {
32
+ var ao = /* @__PURE__ */ ((n) => {
33
33
  n["CLOSE_WIDGET"] = "close-widget";
34
34
  n["NETWORK_SWITCH"] = "network-switch";
35
35
  n["DISCONNECT_WALLET"] = "disconnect-wallet";
36
36
  n["LANGUAGE_CHANGED"] = "language-changed";
37
37
  return n;
38
- })(so || {});
38
+ })(ao || {});
39
39
 
40
40
  // src/widgets/definitions/events/swap.ts
41
- var co = /* @__PURE__ */ ((a) => {
41
+ var io = /* @__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
- })(co || {});
48
+ })(io || {});
49
49
 
50
50
  // src/widgets/definitions/events/sale.ts
51
- var lo = /* @__PURE__ */ ((g) => {
51
+ var so = /* @__PURE__ */ ((g) => {
52
52
  g["CLOSE_WIDGET"] = "close-widget";
53
53
  g["SUCCESS"] = "success";
54
54
  g["FAILURE"] = "failure";
@@ -61,16 +61,16 @@ var lo = /* @__PURE__ */ ((g) => {
61
61
  g["REQUEST_SWAP"] = "request-swap";
62
62
  g["PAYMENT_TOKEN"] = "payment-token";
63
63
  return g;
64
- })(lo || {});
65
- var po = /* @__PURE__ */ ((o) => {
64
+ })(so || {});
65
+ var co = /* @__PURE__ */ ((o) => {
66
66
  o["CRYPTO"] = "crypto";
67
67
  o["DEBIT"] = "debit";
68
68
  o["CREDIT"] = "credit";
69
69
  return o;
70
- })(po || {});
70
+ })(co || {});
71
71
 
72
72
  // src/widgets/definitions/events/bridge.ts
73
- var uo = /* @__PURE__ */ ((i) => {
73
+ var lo = /* @__PURE__ */ ((i) => {
74
74
  i["CLOSE_WIDGET"] = "close-widget";
75
75
  i["FAILURE"] = "failure";
76
76
  i["TRANSACTION_SENT"] = "transaction-sent";
@@ -78,10 +78,10 @@ var uo = /* @__PURE__ */ ((i) => {
78
78
  i["CLAIM_WITHDRAWAL_SUCCESS"] = "claim-withdrawal-success";
79
79
  i["CLAIM_WITHDRAWAL_FAILURE"] = "claim-withdrawal-failure";
80
80
  return i;
81
- })(uo || {});
81
+ })(lo || {});
82
82
 
83
83
  // src/widgets/definitions/events/orchestration.ts
84
- var mo = /* @__PURE__ */ ((c) => {
84
+ var po = /* @__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 mo = /* @__PURE__ */ ((c) => {
91
91
  c["REQUEST_PURCHASE"] = "request-purchase";
92
92
  c["REQUEST_GO_BACK"] = "request-go-back";
93
93
  return c;
94
- })(mo || {});
94
+ })(po || {});
95
95
 
96
96
  // src/widgets/definitions/events/onramp.ts
97
- var go = /* @__PURE__ */ ((n) => {
97
+ var uo = /* @__PURE__ */ ((n) => {
98
98
  n["CLOSE_WIDGET"] = "close-widget";
99
99
  n["SUCCESS"] = "success";
100
100
  n["FAILURE"] = "failure";
101
101
  n["LANGUAGE_CHANGED"] = "language-changed";
102
102
  return n;
103
- })(go || {});
103
+ })(uo || {});
104
104
 
105
105
  // src/widgets/definitions/events/commerce.ts
106
- var fo = /* @__PURE__ */ ((s) => {
106
+ var mo = /* @__PURE__ */ ((s) => {
107
107
  s["INITIALISED"] = "INITIALISED";
108
108
  s["PROVIDER_UPDATED"] = "PROVIDER_UPDATED";
109
109
  s["CLOSE"] = "CLOSE";
@@ -112,8 +112,8 @@ var fo = /* @__PURE__ */ ((s) => {
112
112
  s["DISCONNECTED"] = "DISCONNECTED";
113
113
  s["USER_ACTION"] = "USER_ACTION";
114
114
  return s;
115
- })(fo || {});
116
- var Eo = /* @__PURE__ */ ((p) => {
115
+ })(mo || {});
116
+ var go = /* @__PURE__ */ ((p) => {
117
117
  p["SWAP_SUCCESS"] = "SWAP_SUCCESS";
118
118
  p["ONRAMP_SUCCESS"] = "ONRAMP_SUCCESS";
119
119
  p["CONNECT_SUCCESS"] = "CONNECT_SUCCESS";
@@ -124,8 +124,8 @@ var Eo = /* @__PURE__ */ ((p) => {
124
124
  p["ADD_TOKENS_SUCCESS"] = "ADD_TOKENS_SUCCESS";
125
125
  p["ADD_TOKENS_CONNECT_SUCCESS"] = "ADD_TOKENS_CONNECT_SUCCESS";
126
126
  return p;
127
- })(Eo || {});
128
- var Ro = /* @__PURE__ */ ((c) => {
127
+ })(go || {});
128
+ var fo = /* @__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 Ro = /* @__PURE__ */ ((c) => {
135
135
  c["ONRAMP_FAILED"] = "ONRAMP_FAILED";
136
136
  c["ADD_TOKENS_FAILED"] = "ADD_TOKENS_FAILED";
137
137
  return c;
138
- })(Ro || {});
139
- var Co = /* @__PURE__ */ ((o) => {
138
+ })(fo || {});
139
+ var Eo = /* @__PURE__ */ ((o) => {
140
140
  o["PAYMENT_METHOD_SELECTED"] = "PAYMENT_METHOD_SELECTED";
141
141
  o["PAYMENT_TOKEN_SELECTED"] = "PAYMENT_TOKEN_SELECTED";
142
142
  o["NETWORK_SWITCH"] = "NETWORK_SWITCH";
143
143
  return o;
144
- })(Co || {});
144
+ })(Eo || {});
145
145
 
146
146
  // src/widgets/definitions/events/addTokens.ts
147
- var To = /* @__PURE__ */ ((a) => {
147
+ var Ro = /* @__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
- })(To || {});
154
+ })(Ro || {});
155
155
 
156
156
  // src/widgets/definitions/events/purchase.ts
157
- var Io = /* @__PURE__ */ ((n) => {
157
+ var Co = /* @__PURE__ */ ((n) => {
158
158
  n["CLOSE_WIDGET"] = "close-widget";
159
159
  n["CONNECT_SUCCESS"] = "connect-success";
160
160
  n["SUCCESS"] = "success";
161
161
  n["FAILURE"] = "failure";
162
162
  return n;
163
- })(Io || {});
163
+ })(Co || {});
164
164
 
165
165
  // src/widgets/definitions/events/transfer.ts
166
- var ho = /* @__PURE__ */ ((n) => {
166
+ var To = /* @__PURE__ */ ((n) => {
167
167
  n["CLOSE_WIDGET"] = "close-widget";
168
168
  n["REJECTED"] = "rejected";
169
169
  n["SUCCESS"] = "success";
170
170
  n["FAILURE"] = "failure";
171
171
  return n;
172
- })(ho || {});
172
+ })(To || {});
173
173
 
174
174
  // src/widgets/definitions/types.ts
175
- var yo = /* @__PURE__ */ ((m) => {
175
+ var Io = /* @__PURE__ */ ((m) => {
176
176
  m["CONNECT"] = "connect";
177
177
  m["WALLET"] = "wallet";
178
178
  m["SWAP"] = "swap";
@@ -184,24 +184,24 @@ var yo = /* @__PURE__ */ ((m) => {
184
184
  m["PURCHASE"] = "purchase";
185
185
  m["TRANSFER"] = "transfer";
186
186
  return m;
187
- })(yo || {});
187
+ })(Io || {});
188
188
 
189
189
  // src/widgets/definitions/parameters/connect.ts
190
- var Ao = /* @__PURE__ */ ((t) => {
190
+ var ho = /* @__PURE__ */ ((t) => {
191
191
  t["LAYER1"] = "LAYER1";
192
192
  t["LAYER2"] = "LAYER2";
193
193
  return t;
194
- })(Ao || {});
194
+ })(ho || {});
195
195
 
196
196
  // src/widgets/definitions/parameters/swap.ts
197
- var Po = /* @__PURE__ */ ((t) => {
197
+ var yo = /* @__PURE__ */ ((t) => {
198
198
  t["FROM"] = "FROM";
199
199
  t["TO"] = "TO";
200
200
  return t;
201
- })(Po || {});
201
+ })(yo || {});
202
202
 
203
203
  // src/widgets/definitions/parameters/commerce.ts
204
- var wo = /* @__PURE__ */ ((p) => {
204
+ var Ao = /* @__PURE__ */ ((p) => {
205
205
  p["CONNECT"] = "CONNECT";
206
206
  p["WALLET"] = "WALLET";
207
207
  p["SALE"] = "SALE";
@@ -212,44 +212,44 @@ var wo = /* @__PURE__ */ ((p) => {
212
212
  p["PURCHASE"] = "PURCHASE";
213
213
  p["TRANSFER"] = "TRANSFER";
214
214
  return p;
215
- })(wo || {});
215
+ })(Ao || {});
216
216
 
217
217
  // src/widgets/definitions/configurations/theme.ts
218
- var So = /* @__PURE__ */ ((t) => {
218
+ var wo = /* @__PURE__ */ ((t) => {
219
219
  t["LIGHT"] = "light";
220
220
  t["DARK"] = "dark";
221
221
  return t;
222
- })(So || {});
222
+ })(wo || {});
223
223
 
224
224
  // src/sdk.ts
225
- import { Environment as qa } from "@imtbl/config";
225
+ import { Environment as ja } from "@imtbl/config";
226
226
 
227
227
  // src/api/http/httpClient.ts
228
- import ko from "axios";
229
- var vo = "pk_imapik-";
230
- var No = [
228
+ import Po from "axios";
229
+ var So = "pk_imapik-";
230
+ var ko = [
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 pe = class {
235
+ var ue = class {
236
236
  config;
237
237
  axiosInstance;
238
238
  constructor(e) {
239
239
  this.config = e;
240
- this.axiosInstance = ko.create();
240
+ this.axiosInstance = Po.create();
241
241
  this.setupInterceptors();
242
242
  }
243
243
  // eslint-disable-next-line class-methods-use-this
244
244
  shouldAddPublishableKey(e) {
245
- return No.some((t) => e.startsWith(t));
245
+ return ko.some((t) => e.startsWith(t));
246
246
  }
247
247
  setupInterceptors() {
248
248
  this.axiosInstance.interceptors.request.use(
249
249
  (e) => {
250
250
  const t = this.config?.baseConfig?.publishableKey;
251
251
  if (t && this.shouldAddPublishableKey(e.url || "")) {
252
- if (!t.startsWith(vo)) {
252
+ if (!t.startsWith(So)) {
253
253
  throw new Error(
254
254
  "Invalid Publishable key. Create your Publishable key in Immutable developer hub. https://hub.immutable.com"
255
255
  );
@@ -298,8 +298,8 @@ var pe = class {
298
298
  };
299
299
 
300
300
  // src/availability/availability.ts
301
- import { Environment as Ft } from "@imtbl/config";
302
- import xo from "axios";
301
+ import { Environment as Ut } from "@imtbl/config";
302
+ import _o from "axios";
303
303
 
304
304
  // src/errors/checkoutError.ts
305
305
  var S = /* @__PURE__ */ ((A) => {
@@ -380,62 +380,62 @@ var L = async (r, e) => {
380
380
  import { Environment as re } from "@imtbl/config";
381
381
 
382
382
  // src/types/chains.ts
383
- var Y = /* @__PURE__ */ ((a) => {
383
+ var J = /* @__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
- })(Y || {});
391
- var ot = /* @__PURE__ */ ((a) => {
390
+ })(J || {});
391
+ var nt = /* @__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
- })(ot || {});
399
- var Ae = /* @__PURE__ */ ((a) => {
398
+ })(nt || {});
399
+ var we = /* @__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
- })(Ae || {});
406
+ })(we || {});
407
407
 
408
408
  // src/env/constants.ts
409
- var Z = "development";
409
+ var Y = "development";
410
410
  var j = 18;
411
- var Bt = 6;
411
+ var Mt = 6;
412
412
  var x = "native";
413
- var Se = {
413
+ var ke = {
414
414
  name: "IMX",
415
415
  symbol: "IMX",
416
416
  decimals: j,
417
417
  address: x
418
418
  };
419
- var _o = {
419
+ var vo = {
420
420
  name: "tIMX",
421
421
  symbol: "tIMX",
422
422
  decimals: j,
423
423
  address: x
424
424
  };
425
425
  var q = {
426
- [Z]: "https://api.dev.immutable.com",
426
+ [Y]: "https://api.dev.immutable.com",
427
427
  [re.SANDBOX]: "https://api.sandbox.immutable.com",
428
428
  [re.PRODUCTION]: "https://api.immutable.com"
429
429
  };
430
- var ke = {
431
- [Z]: "https://checkout-api.dev.immutable.com",
430
+ var ve = {
431
+ [Y]: "https://checkout-api.dev.immutable.com",
432
432
  [re.SANDBOX]: "https://checkout-api.sandbox.immutable.com",
433
433
  [re.PRODUCTION]: "https://checkout-api.immutable.com"
434
434
  };
435
- var Mt = true;
436
435
  var bt = true;
437
436
  var Lt = true;
438
- var Dt = {
437
+ var Dt = true;
438
+ var Wt = {
439
439
  [re.SANDBOX]: "https://global-stg.transak.com",
440
440
  [re.PRODUCTION]: "https://global.transak.com/"
441
441
  };
@@ -460,11 +460,11 @@ var Pe = /* @__PURE__ */ new Map([
460
460
  chainIdHex: `0x${13371 .toString(16)}`,
461
461
  chainName: "Immutable zkEVM",
462
462
  rpcUrls: ["https://rpc.immutable.com"],
463
- nativeCurrency: Se
463
+ nativeCurrency: ke
464
464
  }
465
465
  ]
466
466
  ]);
467
- var we = /* @__PURE__ */ new Map([
467
+ var Se = /* @__PURE__ */ new Map([
468
468
  [
469
469
  11155111,
470
470
  {
@@ -487,11 +487,11 @@ var we = /* @__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: _o
490
+ nativeCurrency: vo
491
491
  }
492
492
  ]
493
493
  ]);
494
- var Wt = /* @__PURE__ */ new Map([
494
+ var Ft = /* @__PURE__ */ new Map([
495
495
  [
496
496
  11155111,
497
497
  {
@@ -512,14 +512,14 @@ var Wt = /* @__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: Se
515
+ nativeCurrency: ke
516
516
  }
517
517
  ]
518
518
  ]);
519
519
  var oe = {
520
520
  [13473]: {
521
521
  url: "https://explorer.testnet.immutable.com",
522
- nativeToken: we.get(13473).nativeCurrency
522
+ nativeToken: Se.get(13473).nativeCurrency
523
523
  },
524
524
  [13371]: {
525
525
  url: "https://explorer.immutable.com",
@@ -527,7 +527,7 @@ var oe = {
527
527
  },
528
528
  [11155111]: {
529
529
  url: "https://eth-sepolia.blockscout.com",
530
- nativeToken: we.get(11155111).nativeCurrency
530
+ nativeToken: Se.get(11155111).nativeCurrency
531
531
  },
532
532
  [1]: {
533
533
  url: "https://eth.blockscout.com/",
@@ -727,7 +727,7 @@ var ne = [
727
727
  type: "function"
728
728
  }
729
729
  ];
730
- var nt = [
730
+ var at = [
731
731
  {
732
732
  inputs: [
733
733
  {
@@ -795,26 +795,26 @@ var nt = [
795
795
  type: "function"
796
796
  }
797
797
  ];
798
- var at = {
798
+ var it = {
799
799
  maxFeePerGas: BigInt(15e9),
800
800
  maxPriorityFeePerGas: BigInt(1e10)
801
801
  };
802
802
 
803
803
  // src/env/env.ts
804
- var Oo = "2.2.0";
805
- var ue = () => Oo;
804
+ var No = "2.2.1-alpha.0";
805
+ var me = () => No;
806
806
 
807
807
  // src/availability/availability.ts
808
- var ve = (r, e) => {
808
+ var Ne = (r, e) => {
809
809
  const t = () => {
810
- if (r) return q[Z];
811
- if (e) return q[Ft.PRODUCTION];
812
- return q[Ft.SANDBOX];
810
+ if (r) return q[Y];
811
+ if (e) return q[Ut.PRODUCTION];
812
+ return q[Ut.SANDBOX];
813
813
  };
814
814
  const o = async () => {
815
815
  let n;
816
816
  try {
817
- n = await xo.post(`${t()}/v1/availability/checkout/swap`);
817
+ n = await _o.post(`${t()}/v1/availability/checkout/swap`);
818
818
  } catch (a) {
819
819
  n = a.response;
820
820
  if (n.status === 403) return false;
@@ -832,21 +832,21 @@ var ve = (r, e) => {
832
832
  };
833
833
 
834
834
  // src/balances/balances.ts
835
- import { HttpStatusCode as pt } from "axios";
836
- import { Contract as Ko, formatUnits as mt } from "ethers";
835
+ import { HttpStatusCode as ut } from "axios";
836
+ import { Contract as Ho, formatUnits as gt } from "ethers";
837
837
 
838
838
  // src/types/gasEstimate.ts
839
- var it = /* @__PURE__ */ ((t) => {
839
+ var st = /* @__PURE__ */ ((t) => {
840
840
  t["BRIDGE_TO_L2"] = "BRIDGE_TO_L2";
841
841
  t["SWAP"] = "SWAP";
842
842
  return t;
843
- })(it || {});
843
+ })(st || {});
844
844
 
845
845
  // src/types/network.ts
846
- var me = /* @__PURE__ */ ((e) => {
846
+ var ge = /* @__PURE__ */ ((e) => {
847
847
  e["ALL"] = "all";
848
848
  return e;
849
- })(me || {});
849
+ })(ge || {});
850
850
 
851
851
  // src/types/token.ts
852
852
  var ae = /* @__PURE__ */ ((n) => {
@@ -858,32 +858,32 @@ var ae = /* @__PURE__ */ ((n) => {
858
858
  })(ae || {});
859
859
 
860
860
  // src/types/wallet.ts
861
- var Ut = /* @__PURE__ */ ((e) => {
861
+ var Gt = /* @__PURE__ */ ((e) => {
862
862
  e["ALL"] = "all";
863
863
  return e;
864
- })(Ut || {});
864
+ })(Gt || {});
865
865
 
866
866
  // src/types/provider.ts
867
867
  import {
868
- BrowserProvider as Bo
868
+ BrowserProvider as Oo
869
869
  } from "ethers";
870
- var ge = /* @__PURE__ */ ((o) => {
870
+ var fe = /* @__PURE__ */ ((o) => {
871
871
  o["PASSPORT"] = "passport";
872
872
  o["METAMASK"] = "metamask";
873
873
  o["WALLETCONNECT"] = "walletconnect";
874
874
  return o;
875
- })(ge || {});
876
- var Gt = /* @__PURE__ */ ((o) => {
875
+ })(fe || {});
876
+ var qt = /* @__PURE__ */ ((o) => {
877
877
  o["PASSPORT"] = "com.immutable.passport";
878
878
  o["METAMASK"] = "io.metamask";
879
879
  o["WALLETCONNECT"] = "walletconnect";
880
880
  return o;
881
- })(Gt || {});
882
- var qt = {
881
+ })(qt || {});
882
+ var jt = {
883
883
  allowMistmatchedChainId: false,
884
884
  allowUnsupportedProvider: false
885
885
  };
886
- var D = class extends Bo {
886
+ var D = class extends Oo {
887
887
  ethereumProvider;
888
888
  // eslint-disable-next-line max-len
889
889
  constructor(e, t, o) {
@@ -899,13 +899,13 @@ var D = class extends Bo {
899
899
  };
900
900
 
901
901
  // src/types/smartCheckout.ts
902
- var fe = /* @__PURE__ */ ((n) => {
902
+ var Ee = /* @__PURE__ */ ((n) => {
903
903
  n["SUCCESS"] = "SUCCESS";
904
904
  n["FAILED"] = "FAILED";
905
905
  n["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
906
906
  n["FULFILLMENTS_UNSETTLED"] = "FULFILLMENTS_UNSETTLED";
907
907
  return n;
908
- })(fe || {});
908
+ })(Ee || {});
909
909
  var M = /* @__PURE__ */ ((n) => {
910
910
  n["NATIVE"] = "NATIVE";
911
911
  n["ERC20"] = "ERC20";
@@ -913,44 +913,44 @@ var M = /* @__PURE__ */ ((n) => {
913
913
  n["ERC1155"] = "ERC1155";
914
914
  return n;
915
915
  })(M || {});
916
- var Ee = /* @__PURE__ */ ((t) => {
916
+ var Re = /* @__PURE__ */ ((t) => {
917
917
  t["TRANSACTION"] = "TRANSACTION";
918
918
  t["GAS"] = "GAS";
919
919
  return t;
920
- })(Ee || {});
921
- var Re = /* @__PURE__ */ ((t) => {
920
+ })(Re || {});
921
+ var Ce = /* @__PURE__ */ ((t) => {
922
922
  t["NATIVE"] = "NATIVE";
923
923
  t["ERC20"] = "ERC20";
924
924
  return t;
925
- })(Re || {});
926
- var st = /* @__PURE__ */ ((o) => {
925
+ })(Ce || {});
926
+ var ct = /* @__PURE__ */ ((o) => {
927
927
  o["ROUTES_FOUND"] = "ROUTES_FOUND";
928
928
  o["NO_ROUTES_FOUND"] = "NO_ROUTES_FOUND";
929
929
  o["NO_ROUTE_OPTIONS"] = "NO_ROUTE_OPTIONS";
930
930
  return o;
931
- })(st || {});
932
- var Ne = /* @__PURE__ */ ((n) => {
931
+ })(ct || {});
932
+ var _e = /* @__PURE__ */ ((n) => {
933
933
  n["GAS"] = "GAS";
934
934
  n["BRIDGE_FEE"] = "BRIDGE_FEE";
935
935
  n["SWAP_FEE"] = "SWAP_FEE";
936
936
  n["IMMUTABLE_FEE"] = "IMMUTABLE_FEE";
937
937
  return n;
938
- })(Ne || {});
939
- var Ce = /* @__PURE__ */ ((o) => {
938
+ })(_e || {});
939
+ var Te = /* @__PURE__ */ ((o) => {
940
940
  o["BRIDGE"] = "BRIDGE";
941
941
  o["SWAP"] = "SWAP";
942
942
  o["ONRAMP"] = "ONRAMP";
943
943
  return o;
944
- })(Ce || {});
944
+ })(Te || {});
945
945
 
946
946
  // src/types/fiatRamp.ts
947
- var jt = /* @__PURE__ */ ((e) => {
947
+ var Vt = /* @__PURE__ */ ((e) => {
948
948
  e["ONRAMP"] = "onramp";
949
949
  return e;
950
- })(jt || {});
950
+ })(Vt || {});
951
951
 
952
952
  // src/provider/getUnderlyingProvider.ts
953
- async function Mo(r) {
953
+ async function xo(r) {
954
954
  if (!r.send) {
955
955
  throw new u(
956
956
  "Parsed provider is not a valid WrappedBrowserProvider",
@@ -963,22 +963,22 @@ async function Mo(r) {
963
963
  }
964
964
  return e;
965
965
  }
966
- async function Te(r) {
966
+ async function Ie(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 Mo(r);
971
+ return xo(r);
972
972
  }
973
973
 
974
974
  // src/network/network.ts
975
- var bo = 4902;
976
- async function Lo(r, e, t) {
975
+ var Bo = 4902;
976
+ async function Mo(r, e, t) {
977
977
  return await e.send("wallet_switchEthereumChain", [
978
978
  { chainId: r.get(t)?.chainIdHex }
979
979
  ]);
980
980
  }
981
- async function ct(r, e, t) {
981
+ async function dt(r, e, t) {
982
982
  if (e.send) {
983
983
  const o = r.get(t);
984
984
  const n = {
@@ -1021,7 +1021,7 @@ async function $(r, { type: e = "all", exclude: t }) {
1021
1021
  networks: i
1022
1022
  };
1023
1023
  }
1024
- async function Ie(r, e) {
1024
+ async function he(r, e) {
1025
1025
  const { networkMap: t } = r;
1026
1026
  return L(
1027
1027
  async () => {
@@ -1042,7 +1042,7 @@ async function Ie(r, e) {
1042
1042
  isSupported: false
1043
1043
  };
1044
1044
  } catch (o) {
1045
- const n = await Te(e);
1045
+ const n = await Ie(e);
1046
1046
  const a = Array.from(t.keys()).includes(Number(n));
1047
1047
  return {
1048
1048
  chainId: Number(n),
@@ -1055,7 +1055,7 @@ async function Ie(r, e) {
1055
1055
  }
1056
1056
  );
1057
1057
  }
1058
- async function Kt(r, e, t) {
1058
+ async function Ht(r, e, t) {
1059
1059
  const { networkMap: o } = r;
1060
1060
  const n = await $(r, {
1061
1061
  type: "all"
@@ -1074,7 +1074,7 @@ async function Kt(r, e, t) {
1074
1074
  }
1075
1075
  try {
1076
1076
  if (e && "ethereumProvider" in e) {
1077
- await Lo(o, e, t);
1077
+ await Mo(o, e, t);
1078
1078
  } else {
1079
1079
  throw new u(
1080
1080
  "Incorrect provider type",
@@ -1083,10 +1083,10 @@ async function Kt(r, e, t) {
1083
1083
  }
1084
1084
  } catch (c) {
1085
1085
  console.error(c);
1086
- if (c.code === bo) {
1086
+ if (c.code === Bo) {
1087
1087
  try {
1088
1088
  if ("ethereumProvider" in e) {
1089
- await ct(o, e, t);
1089
+ await dt(o, e, t);
1090
1090
  } else {
1091
1091
  throw new u(
1092
1092
  "Incorrect provider type",
@@ -1115,7 +1115,7 @@ async function Kt(r, e, t) {
1115
1115
  "USER_REJECTED_REQUEST_ERROR"
1116
1116
  );
1117
1117
  }
1118
- const s = await Ie(r, a);
1118
+ const s = await he(r, a);
1119
1119
  return {
1120
1120
  network: s,
1121
1121
  provider: a
@@ -1123,29 +1123,21 @@ async function Kt(r, e, t) {
1123
1123
  }
1124
1124
 
1125
1125
  // src/tokens/tokens.ts
1126
- import { Contract as Go } from "ethers";
1126
+ import { Contract as qo } from "ethers";
1127
1127
 
1128
1128
  // src/config/config.ts
1129
- import { Environment as Zt } from "@imtbl/config";
1129
+ import { Environment as ie } from "@imtbl/config";
1130
1130
 
1131
1131
  // src/config/remoteConfigFetcher.ts
1132
- import { Environment as zt } from "@imtbl/config";
1133
- var _e = class {
1132
+ var Oe = class {
1134
1133
  httpClient;
1135
- isDevelopment;
1136
- isProduction;
1134
+ endpoint;
1137
1135
  configCache;
1138
1136
  version = "v1";
1139
1137
  constructor(e, t) {
1140
- this.isDevelopment = t.isDevelopment;
1141
- this.isProduction = t.isProduction;
1138
+ this.endpoint = t.remoteConfigEndpoint;
1142
1139
  this.httpClient = e;
1143
1140
  }
1144
- getEndpoint = () => {
1145
- if (this.isDevelopment) return ke[Z];
1146
- if (this.isProduction) return ke[zt.PRODUCTION];
1147
- return ke[zt.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 _e = 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 u(
@@ -1189,30 +1181,19 @@ var _e = class {
1189
1181
  };
1190
1182
 
1191
1183
  // src/config/tokensFetcher.ts
1192
- import { Environment as Qt } from "@imtbl/config";
1193
- var Do = "0x0000000000000000000000000000000000000eee";
1194
- var Oe = class {
1184
+ var bo = "0x0000000000000000000000000000000000000eee";
1185
+ var xe = class {
1195
1186
  httpClient;
1196
1187
  remoteConfig;
1197
- isDevelopment;
1198
- isProduction;
1188
+ baseUrl;
1189
+ chainSlug;
1199
1190
  tokensCache;
1200
1191
  constructor(e, t, o) {
1201
- this.isDevelopment = o.isDevelopment;
1202
- this.isProduction = o.isProduction;
1192
+ this.baseUrl = o.baseUrl;
1193
+ this.chainSlug = o.chainSlug;
1203
1194
  this.httpClient = e;
1204
1195
  this.remoteConfig = t;
1205
1196
  }
1206
- getBaseUrl = () => {
1207
- if (this.isDevelopment) return q[Z];
1208
- if (this.isProduction) return q[Qt.PRODUCTION];
1209
- return q[Qt.SANDBOX];
1210
- };
1211
- 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 Oe = 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 (o) {
1226
1207
  throw new u(
@@ -1287,7 +1268,7 @@ var Oe = class {
1287
1268
  if (!t[s]) {
1288
1269
  t[s] = [];
1289
1270
  }
1290
- if (c === Do) {
1271
+ if (c === bo) {
1291
1272
  c = "native";
1292
1273
  }
1293
1274
  t[s]?.push({
@@ -1322,28 +1303,43 @@ var Oe = class {
1322
1303
  };
1323
1304
 
1324
1305
  // src/config/config.ts
1325
- var dt = class extends Error {
1306
+ var lt = class extends Error {
1326
1307
  message;
1327
1308
  constructor(e) {
1328
1309
  super(e);
1329
1310
  this.message = e;
1330
1311
  }
1331
1312
  };
1332
- var Wo = (r, e) => {
1333
- if (e) return Wt;
1313
+ var Lo = (r, e) => {
1314
+ if (e) return Ft;
1334
1315
  if (r) return Pe;
1335
- return we;
1316
+ return Se;
1317
+ };
1318
+ var Do = (r, e) => {
1319
+ if (e) return q[Y];
1320
+ if (r) return q[ie.PRODUCTION];
1321
+ return q[ie.SANDBOX];
1322
+ };
1323
+ var Wo = (r, e) => {
1324
+ if (e) return "imtbl-zkevm-devnet";
1325
+ if (r) return "imtbl-zkevm-mainnet";
1326
+ return "imtbl-zkevm-testnet";
1336
1327
  };
1337
- var O = (r) => {
1328
+ var _ = (r) => {
1338
1329
  if (!r.isProduction) return 11155111;
1339
1330
  return 1;
1340
1331
  };
1341
- var P = (r) => {
1332
+ var w = (r) => {
1342
1333
  if (r.isDevelopment) return 15003;
1343
1334
  if (r.isProduction) return 13371;
1344
1335
  return 13473;
1345
1336
  };
1346
- var he = class {
1337
+ var Fo = (r, e) => {
1338
+ if (e) return ve[Y];
1339
+ if (r) return ve[ie.PRODUCTION];
1340
+ return ve[ie.SANDBOX];
1341
+ };
1342
+ var ye = 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
@@ -1358,40 +1354,44 @@ var he = class {
1358
1354
  environment;
1359
1355
  networkMap;
1360
1356
  publishableKey;
1357
+ l1ChainId;
1358
+ l2ChainId;
1361
1359
  overrides;
1362
1360
  constructor(e, t) {
1363
- if (!Object.values(Zt).includes(e.baseConfig.environment)) {
1364
- throw new dt(
1361
+ if (!Object.values(ie).includes(e.baseConfig.environment)) {
1362
+ throw new lt(
1365
1363
  "Invalid checkout configuration of environment"
1366
1364
  );
1367
1365
  }
1368
1366
  this.environment = e.baseConfig.environment;
1369
- this.isProduction = !this.isDevelopment && this.environment === Zt.PRODUCTION;
1370
- this.isOnRampEnabled = e.onRamp?.enable ?? Mt;
1371
- this.isSwapEnabled = e.swap?.enable ?? bt;
1372
- this.isBridgeEnabled = e.bridge?.enable ?? Lt;
1367
+ this.isProduction = !this.isDevelopment && this.environment === ie.PRODUCTION;
1368
+ this.isOnRampEnabled = e.onRamp?.enable ?? bt;
1369
+ this.isSwapEnabled = e.swap?.enable ?? Lt;
1370
+ this.isBridgeEnabled = e.bridge?.enable ?? Dt;
1373
1371
  this.publishableKey = e.publishableKey ?? "<no-publishable-key>";
1374
- this.networkMap = Wo(this.isProduction, this.isDevelopment);
1375
- this.remote = new _e(t, {
1376
- isDevelopment: this.isDevelopment,
1377
- isProduction: this.isProduction
1372
+ this.networkMap = e.overrides?.networkMap ?? Lo(this.isProduction, this.isDevelopment);
1373
+ const o = e.overrides?.remoteConfigEndpoint ?? Fo(this.isProduction, this.isDevelopment);
1374
+ this.remote = new Oe(t, {
1375
+ remoteConfigEndpoint: o
1378
1376
  });
1379
- this.tokens = new Oe(t, this.remote, {
1380
- isDevelopment: this.isDevelopment,
1381
- isProduction: this.isProduction
1377
+ this.tokens = new xe(t, this.remote, {
1378
+ baseUrl: e.overrides?.baseUrl ?? Do(this.isProduction, this.isDevelopment),
1379
+ chainSlug: e.overrides?.chainSlug ?? Wo(this.isProduction, this.isDevelopment)
1382
1380
  });
1381
+ this.l1ChainId = _(this);
1382
+ this.l2ChainId = e.overrides?.l2ChainId ?? w(this);
1383
1383
  this.overrides = e.overrides ?? {};
1384
1384
  }
1385
1385
  // eslint-disable-next-line class-methods-use-this
1386
1386
  get sdkVersion() {
1387
- return ue();
1387
+ return me();
1388
1388
  }
1389
1389
  };
1390
1390
 
1391
1391
  // src/utils/utils.ts
1392
1392
  var h = (r = "", e = "") => r.toLowerCase() === e.toLowerCase();
1393
- var Jt = (r) => r === 15003 || r === 13473 || r === 13371;
1394
- var Fo = (r, e) => {
1393
+ var Qt = (r) => r === 15003 || r === 13473 || r === 13371;
1394
+ var Uo = (r, e) => {
1395
1395
  const t = r.indexOf(".");
1396
1396
  const o = r.substring(t + e + 1);
1397
1397
  if (o && parseFloat(o) >= 1) {
@@ -1401,15 +1401,15 @@ var Fo = (r, e) => {
1401
1401
  }
1402
1402
  return parseFloat(r.substring(0, t + e + 1)).toString();
1403
1403
  };
1404
- var J = (r, e = Bt) => {
1404
+ var Z = (r, e = Mt) => {
1405
1405
  const t = r.indexOf(".");
1406
1406
  if (t === -1) return r;
1407
- const o = Fo(r, e);
1407
+ const o = Uo(r, e);
1408
1408
  return o;
1409
1409
  };
1410
1410
 
1411
1411
  // src/tokens/tokens.ts
1412
- var qo = "native";
1412
+ var jo = "native";
1413
1413
  var z = async (r, {
1414
1414
  type: e = "all",
1415
1415
  chainId: t,
@@ -1418,8 +1418,8 @@ var z = async (r, {
1418
1418
  let n = [];
1419
1419
  let a;
1420
1420
  let i;
1421
- const s = t ?? O(r);
1422
- const c = P(r);
1421
+ const s = t ?? _(r);
1422
+ const c = w(r);
1423
1423
  switch (e) {
1424
1424
  case "swap":
1425
1425
  n = await r.tokens.getTokensConfig(c);
@@ -1432,7 +1432,7 @@ var z = async (r, {
1432
1432
  n = a["201811419111"]?.tokens || [];
1433
1433
  break;
1434
1434
  case "bridge":
1435
- n = (await r.tokens.getTokensConfig(s)).filter((p) => p.bridge === qo);
1435
+ n = (await r.tokens.getTokensConfig(s)).filter((p) => p.bridge === jo);
1436
1436
  break;
1437
1437
  case "all":
1438
1438
  default:
@@ -1444,10 +1444,10 @@ var z = async (r, {
1444
1444
  };
1445
1445
  };
1446
1446
  var B = (r) => !r || h(r, x);
1447
- async function xe(r, e) {
1447
+ async function Be(r, e) {
1448
1448
  return await L(
1449
1449
  async () => {
1450
- const t = new Go(e, JSON.stringify(W), r);
1450
+ const t = new qo(e, JSON.stringify(W), r);
1451
1451
  const [o, n, a] = await Promise.all([
1452
1452
  t.name(),
1453
1453
  t.symbol(),
@@ -1465,11 +1465,11 @@ async function xe(r, e) {
1465
1465
  }
1466
1466
 
1467
1467
  // src/api/blockscout/blockscout.ts
1468
- import Yt, {
1469
- HttpStatusCode as $t
1468
+ import Zt, {
1469
+ HttpStatusCode as Jt
1470
1470
  } from "axios";
1471
- var Vo = 5;
1472
- var ye = class {
1471
+ var Ko = 5;
1472
+ var Ae = class {
1473
1473
  url;
1474
1474
  nativeToken;
1475
1475
  ttl;
@@ -1502,7 +1502,7 @@ var ye = class {
1502
1502
  symbol: n.symbol
1503
1503
  };
1504
1504
  this.cacheMap = {};
1505
- this.ttl = o !== void 0 ? o : Vo;
1505
+ this.ttl = o !== void 0 ? o : Ko;
1506
1506
  }
1507
1507
  /**
1508
1508
  * isChainSupported verifies if the chain is supported by Blockscout
@@ -1538,9 +1538,9 @@ var ye = class {
1538
1538
  this.setCache(t, a);
1539
1539
  return Promise.resolve(a);
1540
1540
  } catch (t) {
1541
- let o = $t.InternalServerError;
1541
+ let o = Jt.InternalServerError;
1542
1542
  let n = "InternalServerError";
1543
- if (Yt.isAxiosError(t)) {
1543
+ if (Zt.isAxiosError(t)) {
1544
1544
  o = t.response?.status || o;
1545
1545
  n = t.message;
1546
1546
  }
@@ -1565,9 +1565,9 @@ var ye = class {
1565
1565
  this.setCache(t, a);
1566
1566
  return Promise.resolve(a);
1567
1567
  } catch (t) {
1568
- let o = $t.InternalServerError;
1568
+ let o = Jt.InternalServerError;
1569
1569
  let n = "InternalServerError";
1570
- if (Yt.isAxiosError(t)) {
1570
+ if (Zt.isAxiosError(t)) {
1571
1571
  o = t.response?.status || o;
1572
1572
  n = t.message;
1573
1573
  }
@@ -1577,7 +1577,7 @@ var ye = class {
1577
1577
  };
1578
1578
 
1579
1579
  // src/logger/debugLogger.ts
1580
- var lt = (r, e, t) => {
1580
+ var pt = (r, e, t) => {
1581
1581
  if (!r.isProduction) console.info(e, t);
1582
1582
  };
1583
1583
  var k = async (r, e, t) => {
@@ -1585,14 +1585,14 @@ var k = async (r, e, t) => {
1585
1585
  const n = await t;
1586
1586
  const a = performance.now();
1587
1587
  const i = (a - o) / 1e3;
1588
- lt(r, e, i);
1588
+ pt(r, e, i);
1589
1589
  return n;
1590
1590
  };
1591
1591
 
1592
1592
  // src/balances/balances.ts
1593
- var gt = async (r, e, t) => await L(
1593
+ var ft = async (r, e, t) => await L(
1594
1594
  async () => {
1595
- const o = await Ie(r, e);
1595
+ const o = await he(r, e);
1596
1596
  if (!o.isSupported) {
1597
1597
  throw new u(
1598
1598
  `Chain:${o.chainId} is not a supported chain`,
@@ -1603,7 +1603,7 @@ var gt = async (r, e, t) => await L(
1603
1603
  const n = await e.getBalance(t);
1604
1604
  return {
1605
1605
  balance: n,
1606
- formattedBalance: mt(
1606
+ formattedBalance: gt(
1607
1607
  n,
1608
1608
  o.nativeCurrency.decimals
1609
1609
  ),
@@ -1612,19 +1612,19 @@ var gt = async (r, e, t) => await L(
1612
1612
  },
1613
1613
  { type: "GET_BALANCE_ERROR" }
1614
1614
  );
1615
- async function ft(r, e, t) {
1615
+ async function Et(r, e, t) {
1616
1616
  return await L(
1617
1617
  async () => {
1618
- const o = new Ko(
1618
+ const o = new Ho(
1619
1619
  t,
1620
1620
  JSON.stringify(W),
1621
1621
  r
1622
1622
  );
1623
1623
  return Promise.all([
1624
- xe(r, t),
1624
+ Be(r, t),
1625
1625
  o.balanceOf(e)
1626
1626
  ]).then(([n, a]) => {
1627
- const i = mt(a, n.decimals);
1627
+ const i = gt(a, n.decimals);
1628
1628
  return {
1629
1629
  balance: a,
1630
1630
  formattedBalance: i,
@@ -1640,19 +1640,19 @@ async function ft(r, e, t) {
1640
1640
  { type: "GET_ERC20_BALANCE_ERROR" }
1641
1641
  );
1642
1642
  }
1643
- var ut = /* @__PURE__ */ new Map();
1644
- var Et = () => ut.clear();
1645
- var Ho = async (r, e, t, o) => {
1643
+ var mt = /* @__PURE__ */ new Map();
1644
+ var Rt = () => mt.clear();
1645
+ var zo = async (r, e, t, o) => {
1646
1646
  const n = o !== void 0;
1647
1647
  const a = Object.assign(
1648
1648
  {},
1649
1649
  ...(o ?? []).map((f) => ({ [f.address?.toLowerCase() || x]: f }))
1650
1650
  );
1651
- let i = ut.get(t);
1651
+ let i = mt.get(t);
1652
1652
  if (!i) {
1653
1653
  const f = r.remote.getHttpClient();
1654
- i = new ye(f, t);
1655
- ut.set(t, i);
1654
+ i = new Ae(f, t);
1655
+ mt.set(t, i);
1656
1656
  }
1657
1657
  const s = [];
1658
1658
  const c = "ERC-20";
@@ -1668,7 +1668,7 @@ var Ho = async (r, e, t, o) => {
1668
1668
  s.push(...R.items);
1669
1669
  } while (R.next_page_params);
1670
1670
  } catch (C) {
1671
- if (C?.code !== pt.NotFound) {
1671
+ if (C?.code !== ut.NotFound) {
1672
1672
  throw new u(
1673
1673
  C.message || "InternalServerError | getTokensByWalletAddress",
1674
1674
  "GET_INDEXER_BALANCE_ERROR",
@@ -1683,7 +1683,7 @@ var Ho = async (r, e, t, o) => {
1683
1683
  R.token.address ||= x;
1684
1684
  s.push(R);
1685
1685
  } catch (R) {
1686
- if (R?.code !== pt.NotFound) {
1686
+ if (R?.code !== ut.NotFound) {
1687
1687
  throw new u(
1688
1688
  R.message || "InternalServerError | getNativeTokenByWalletAddress",
1689
1689
  "GET_INDEXER_BALANCE_ERROR",
@@ -1711,36 +1711,36 @@ var Ho = async (r, e, t, o) => {
1711
1711
  decimals: T,
1712
1712
  icon: y
1713
1713
  };
1714
- const w = mt(f.value, I.decimals);
1715
- g.push({ balance: E, formattedBalance: w, token: I });
1714
+ const P = gt(f.value, I.decimals);
1715
+ g.push({ balance: E, formattedBalance: P, token: I });
1716
1716
  });
1717
1717
  return { balances: g };
1718
1718
  };
1719
- var zo = async (r, e, t, o) => {
1719
+ var Qo = async (r, e, t, o) => {
1720
1720
  const n = [];
1721
- o.forEach((s) => {
1722
- if (!s.address || h(s.address, x)) {
1721
+ o.forEach((i) => {
1722
+ if (!i.address || h(i.address, x)) {
1723
1723
  n.push(
1724
- gt(r, e, t)
1724
+ ft(r, e, t)
1725
1725
  );
1726
1726
  } else {
1727
1727
  n.push(
1728
- ft(e, t, s.address)
1728
+ Et(e, t, i.address)
1729
1729
  );
1730
1730
  }
1731
1731
  });
1732
1732
  const a = await Promise.allSettled(n);
1733
- const i = a.filter(
1734
- (s) => s.status === "fulfilled"
1735
- ).map((s) => {
1736
- const c = s;
1737
- const { token: p } = c.value;
1738
- if (!p.address || h(p.address, x)) c.value.token.address = x;
1739
- return c.value;
1740
- });
1741
- return { balances: i };
1733
+ return a.reduce((i, s) => {
1734
+ if (s.status !== "fulfilled" || s.value.balance === 0n) return i;
1735
+ const { value: c } = s;
1736
+ if (!c.token.address || h(c.token.address, x)) {
1737
+ c.token.address = x;
1738
+ }
1739
+ i.balances.push(c);
1740
+ return i;
1741
+ }, { balances: new Array() });
1742
1742
  };
1743
- var Xt = async (r, e, t, o, n) => {
1743
+ var Yt = async (r, e, t, o, n) => {
1744
1744
  if (!e) {
1745
1745
  throw new u(
1746
1746
  "indexer is disabled for this chain, you must provide a provider.",
@@ -1752,7 +1752,7 @@ var Xt = async (r, e, t, o, n) => {
1752
1752
  return await k(
1753
1753
  r,
1754
1754
  `Time to fetch balances using RPC for ${o}`,
1755
- zo(r, e, a, n)
1755
+ Qo(r, e, a, n)
1756
1756
  );
1757
1757
  };
1758
1758
  var V = async (r, e, t, o, n = false) => {
@@ -1776,28 +1776,28 @@ var V = async (r, e, t, o, n = false) => {
1776
1776
  }
1777
1777
  );
1778
1778
  if (n) {
1779
- Et();
1779
+ Rt();
1780
1780
  }
1781
- if (ye.isChainSupported(o)) {
1781
+ if (Ae.isChainSupported(o)) {
1782
1782
  const i = t ?? await (await e?.getSigner())?.getAddress();
1783
1783
  try {
1784
1784
  return await k(
1785
1785
  r,
1786
1786
  `Time to fetch balances using blockscout for ${o}`,
1787
- Ho(r, i, o, a)
1787
+ zo(r, i, o, a)
1788
1788
  );
1789
1789
  } catch (s) {
1790
- if (s.type === "GET_INDEXER_BALANCE_ERROR" && s.data?.error?.code === pt.TooManyRequests) {
1791
- return Xt(r, e, t, o, a);
1790
+ if (s.type === "GET_INDEXER_BALANCE_ERROR" && s.data?.error?.code === ut.TooManyRequests) {
1791
+ return Yt(r, e, t, o, a);
1792
1792
  }
1793
1793
  throw s;
1794
1794
  }
1795
1795
  }
1796
- return Xt(r, e, t, o, a);
1796
+ return Yt(r, e, t, o, a);
1797
1797
  };
1798
1798
 
1799
1799
  // src/connect/connect.ts
1800
- async function er(r) {
1800
+ async function $t(r) {
1801
1801
  if (!r?.send) {
1802
1802
  throw new u(
1803
1803
  "Check wallet connection request failed",
@@ -1825,7 +1825,7 @@ async function er(r) {
1825
1825
  walletAddress: e[0] ?? ""
1826
1826
  };
1827
1827
  }
1828
- async function tr(r) {
1828
+ async function Xt(r) {
1829
1829
  if (!r || !r.send) {
1830
1830
  throw new u(
1831
1831
  "Incompatible provider",
@@ -1842,7 +1842,7 @@ async function tr(r) {
1842
1842
  );
1843
1843
  return r;
1844
1844
  }
1845
- async function rr(r) {
1845
+ async function er(r) {
1846
1846
  if (!r || !r.send) {
1847
1847
  throw new u(
1848
1848
  "Incompatible provider",
@@ -1861,7 +1861,7 @@ async function rr(r) {
1861
1861
  }
1862
1862
 
1863
1863
  // src/fiatRamp/fiatRamp.ts
1864
- var Be = class {
1864
+ var Me = class {
1865
1865
  config;
1866
1866
  /**
1867
1867
  * Constructs a new instance of the FiatRampService class.
@@ -1883,7 +1883,7 @@ var Be = class {
1883
1883
  const t = await this.config.remote.getConfig(
1884
1884
  "onramp"
1885
1885
  );
1886
- const o = Dt[this.config.environment];
1886
+ const o = Wt[this.config.environment];
1887
1887
  let n = {
1888
1888
  apiKey: t["201811419111"].publishableApiKey,
1889
1889
  network: "immutablezkevm",
@@ -1932,14 +1932,14 @@ var Be = class {
1932
1932
  };
1933
1933
 
1934
1934
  // src/gasEstimate/gasEstimator.ts
1935
- import { parseUnits as an } from "ethers";
1935
+ import { parseUnits as sn } from "ethers";
1936
1936
 
1937
1937
  // src/gasEstimate/bridgeGasEstimate.ts
1938
1938
  import {
1939
- BridgeFeeActions as or
1939
+ BridgeFeeActions as tr
1940
1940
  } from "@imtbl/bridge-sdk";
1941
- async function nr(r, e, t, o) {
1942
- const n = e === O(o) ? or.DEPOSIT : or.WITHDRAW;
1941
+ async function rr(r, e, t, o) {
1942
+ const n = e === _(o) ? tr.DEPOSIT : tr.WITHDRAW;
1943
1943
  return await r.getFee({
1944
1944
  action: n,
1945
1945
  gasMultiplier: "auto",
@@ -1952,17 +1952,17 @@ async function nr(r, e, t, o) {
1952
1952
 
1953
1953
  // src/instance/instance.ts
1954
1954
  import {
1955
- BridgeConfiguration as Jo,
1956
- ETH_MAINNET_TO_ZKEVM_MAINNET as Yo,
1957
- ETH_SEPOLIA_TO_ZKEVM_DEVNET as $o,
1958
- ETH_SEPOLIA_TO_ZKEVM_TESTNET as Xo,
1959
- TokenBridge as en
1955
+ BridgeConfiguration as Yo,
1956
+ ETH_MAINNET_TO_ZKEVM_MAINNET as $o,
1957
+ ETH_SEPOLIA_TO_ZKEVM_DEVNET as Xo,
1958
+ ETH_SEPOLIA_TO_ZKEVM_TESTNET as en,
1959
+ TokenBridge as tn
1960
1960
  } from "@imtbl/bridge-sdk";
1961
- import { ImmutableConfiguration as ar } from "@imtbl/config";
1962
- import { Exchange as tn } from "@imtbl/dex-sdk";
1963
- import { Orderbook as rn } from "@imtbl/orderbook";
1964
- import { BlockchainData as on } from "@imtbl/blockchain-data";
1965
- function Me(r, e, t, o) {
1961
+ import { ImmutableConfiguration as or } from "@imtbl/config";
1962
+ import { Exchange as rn } from "@imtbl/dex-sdk";
1963
+ import { Orderbook as on } from "@imtbl/orderbook";
1964
+ import { BlockchainData as nn } from "@imtbl/blockchain-data";
1965
+ function be(r, e, t, o) {
1966
1966
  const n = t.get(r);
1967
1967
  const a = t.get(e);
1968
1968
  if (!n) {
@@ -1977,39 +1977,39 @@ function Me(r, e, t, o) {
1977
1977
  "CHAIN_NOT_SUPPORTED_ERROR"
1978
1978
  );
1979
1979
  }
1980
- let i = Xo;
1981
- if (o.isDevelopment) i = $o;
1982
- if (o.isProduction) i = Yo;
1983
- const s = new Jo({
1984
- baseConfig: new ar({ environment: o.environment }),
1980
+ let i = en;
1981
+ if (o.isDevelopment) i = Xo;
1982
+ if (o.isProduction) i = $o;
1983
+ const s = new Yo({
1984
+ baseConfig: new or({ environment: o.environment }),
1985
1985
  bridgeInstance: i,
1986
1986
  rootProvider: n,
1987
1987
  childProvider: a
1988
1988
  });
1989
- return new en(s);
1989
+ return new tn(s);
1990
1990
  }
1991
- async function ie(r, e) {
1991
+ async function se(r, e) {
1992
1992
  const t = await e.remote.getConfig(
1993
1993
  "dex"
1994
1994
  );
1995
- return new tn({
1995
+ return new rn({
1996
1996
  chainId: r,
1997
- baseConfig: new ar({
1997
+ baseConfig: new or({
1998
1998
  environment: e.environment
1999
1999
  }),
2000
2000
  overrides: t?.overrides,
2001
2001
  secondaryFees: t?.secondaryFees
2002
2002
  });
2003
2003
  }
2004
- function se(r) {
2005
- return new rn({
2004
+ function ce(r) {
2005
+ return new on({
2006
2006
  baseConfig: {
2007
2007
  environment: r.environment
2008
2008
  }
2009
2009
  });
2010
2010
  }
2011
- function be(r) {
2012
- return new on({
2011
+ function Le(r) {
2012
+ return new nn({
2013
2013
  baseConfig: {
2014
2014
  environment: r.environment
2015
2015
  }
@@ -2018,28 +2018,28 @@ function be(r) {
2018
2018
 
2019
2019
  // src/instance/contract.ts
2020
2020
  import {
2021
- Contract as nn
2021
+ Contract as an
2022
2022
  } from "ethers";
2023
- function ir(r, e, t) {
2024
- return new nn(r, e, t);
2023
+ function nr(r, e, t) {
2024
+ return new an(r, e, t);
2025
2025
  }
2026
2026
 
2027
2027
  // src/gasEstimate/gasEstimator.ts
2028
- var sn = "0x0000000000000000000000000000000000000001";
2029
- var sr = 18;
2030
- async function cn(r, e) {
2031
- const t = O(e);
2032
- const o = P(e);
2028
+ var cn = "0x0000000000000000000000000000000000000001";
2029
+ var ar = 18;
2030
+ async function dn(r, e) {
2031
+ const t = _(e);
2032
+ const o = w(e);
2033
2033
  const n = r.get(t);
2034
2034
  if (!n) 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
  o,
2039
2039
  r,
2040
2040
  e
2041
2041
  );
2042
- const i = await nr(
2042
+ const i = await rr(
2043
2043
  a,
2044
2044
  t,
2045
2045
  o,
@@ -2064,19 +2064,19 @@ async function cn(r, e) {
2064
2064
  };
2065
2065
  }
2066
2066
  }
2067
- async function dn(r) {
2068
- const e = P(r);
2067
+ async function ln(r) {
2068
+ const e = w(r);
2069
2069
  const t = await r.remote.getConfig(
2070
2070
  "gasEstimateTokens"
2071
2071
  );
2072
2072
  const { inAddress: o, outAddress: n } = t[e].swapAddresses;
2073
2073
  try {
2074
- const a = await ie(e, r);
2074
+ const a = await se(e, r);
2075
2075
  const { swap: i } = await a.getUnsignedSwapTxFromAmountIn(
2076
- sn,
2076
+ cn,
2077
2077
  o,
2078
2078
  n,
2079
- BigInt(an("1", sr))
2079
+ BigInt(sn("1", ar))
2080
2080
  );
2081
2081
  if (!i.gasFeeEstimate) {
2082
2082
  return {
@@ -2092,7 +2092,7 @@ async function dn(r) {
2092
2092
  address: i.gasFeeEstimate.token.address,
2093
2093
  symbol: i.gasFeeEstimate.token.symbol ?? "",
2094
2094
  name: i.gasFeeEstimate.token.name ?? "",
2095
- decimals: i.gasFeeEstimate.token.decimals ?? sr
2095
+ decimals: i.gasFeeEstimate.token.decimals ?? ar
2096
2096
  }
2097
2097
  }
2098
2098
  };
@@ -2103,15 +2103,15 @@ async function dn(r) {
2103
2103
  };
2104
2104
  }
2105
2105
  }
2106
- async function cr(r, e, t) {
2106
+ async function ir(r, e, t) {
2107
2107
  switch (r.gasEstimateType) {
2108
2108
  case "BRIDGE_TO_L2":
2109
- return await cn(
2109
+ return await dn(
2110
2110
  e,
2111
2111
  t
2112
2112
  );
2113
2113
  case "SWAP":
2114
- return await dn(t);
2114
+ return await ln(t);
2115
2115
  default:
2116
2116
  throw new u(
2117
2117
  "Invalid type provided for gasEstimateType",
@@ -2121,9 +2121,9 @@ async function cr(r, e, t) {
2121
2121
  }
2122
2122
 
2123
2123
  // src/gasEstimate/gasPriceInWei.ts
2124
- var ln = (r) => !!r.maxFeePerGas && !!r.maxPriorityFeePerGas;
2125
- var Rt = (r) => {
2126
- if (ln(r)) {
2124
+ var pn = (r) => !!r.maxFeePerGas && !!r.maxPriorityFeePerGas;
2125
+ var Ct = (r) => {
2126
+ if (pn(r)) {
2127
2127
  const { maxFeePerGas: e, maxPriorityFeePerGas: t } = r;
2128
2128
  if (e === null || t === null) return null;
2129
2129
  const o = (e - t) / BigInt(2);
@@ -2134,10 +2134,10 @@ var Rt = (r) => {
2134
2134
  };
2135
2135
 
2136
2136
  // src/provider/provider.ts
2137
- import gn from "@metamask/detect-provider";
2137
+ import fn from "@metamask/detect-provider";
2138
2138
 
2139
2139
  // src/provider/injected/utils.ts
2140
- function Ct(r) {
2140
+ function Tt(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 Ct(r) {
2146
2146
  }
2147
2147
 
2148
2148
  // src/provider/injected/store.ts
2149
- function Tt() {
2149
+ function It() {
2150
2150
  const r = /* @__PURE__ */ new Set();
2151
2151
  let e = [];
2152
- const t = () => Ct((n) => {
2152
+ const t = () => Tt((n) => {
2153
2153
  if (e.some(
2154
2154
  ({ info: a }) => a.uuid === n.info.uuid
2155
2155
  )) return;
@@ -2199,7 +2199,7 @@ var F = class r {
2199
2199
  resetTimeout;
2200
2200
  isInit = false;
2201
2201
  constructor() {
2202
- this.store = Tt();
2202
+ this.store = It();
2203
2203
  this.store.reset();
2204
2204
  }
2205
2205
  static getInstance() {
@@ -2242,33 +2242,33 @@ var F = class r {
2242
2242
  };
2243
2243
 
2244
2244
  // src/provider/providerDetail.ts
2245
- var Le = {
2245
+ var De = {
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 De = {
2252
+ var We = {
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 un = (r) => ({
2260
- info: De,
2259
+ var mn = (r) => ({
2260
+ info: We,
2261
2261
  provider: r
2262
2262
  });
2263
- var mn = (r) => ({
2264
- info: Le,
2263
+ var gn = (r) => ({
2264
+ info: De,
2265
2265
  provider: r
2266
2266
  });
2267
2267
 
2268
2268
  // src/provider/provider.ts
2269
- async function fn() {
2269
+ async function En() {
2270
2270
  const r = await L(
2271
- async () => await gn(),
2271
+ async () => await fn(),
2272
2272
  { type: "METAMASK_PROVIDER_ERROR" }
2273
2273
  );
2274
2274
  if (!r || !r.request) {
@@ -2279,12 +2279,12 @@ async function fn() {
2279
2279
  }
2280
2280
  return new D(r);
2281
2281
  }
2282
- async function dr(r, e) {
2282
+ async function sr(r, e) {
2283
2283
  let t = null;
2284
2284
  let o;
2285
2285
  switch (r) {
2286
2286
  case "passport": {
2287
- o = F.getInstance().findProvider({ rdns: De.rdns });
2287
+ o = F.getInstance().findProvider({ rdns: We.rdns });
2288
2288
  if (!o) {
2289
2289
  if (e) {
2290
2290
  t = new D(
@@ -2303,9 +2303,9 @@ async function dr(r, e) {
2303
2303
  break;
2304
2304
  }
2305
2305
  case "metamask": {
2306
- o = F.getInstance().findProvider({ rdns: Le.rdns });
2306
+ o = F.getInstance().findProvider({ rdns: De.rdns });
2307
2307
  if (!o) {
2308
- t = await fn();
2308
+ t = await En();
2309
2309
  }
2310
2310
  break;
2311
2311
  }
@@ -2338,7 +2338,7 @@ async function dr(r, e) {
2338
2338
  }
2339
2339
 
2340
2340
  // src/provider/validateProvider.ts
2341
- function lr(r) {
2341
+ function cr(r) {
2342
2342
  return r && "send" in r && typeof r.send === "function";
2343
2343
  }
2344
2344
  async function b(r, e, t) {
@@ -2351,10 +2351,10 @@ async function b(r, e, t) {
2351
2351
  return e;
2352
2352
  }
2353
2353
  const o = {
2354
- ...qt,
2354
+ ...jt,
2355
2355
  ...t
2356
2356
  };
2357
- const n = await Te(e);
2357
+ const n = await Ie(e);
2358
2358
  let a = (await e.getNetwork()).chainId;
2359
2359
  try {
2360
2360
  if (!a) {
@@ -2393,8 +2393,8 @@ async function b(r, e, t) {
2393
2393
  }
2394
2394
 
2395
2395
  // src/readOnlyProviders/readOnlyProvider.ts
2396
- import { JsonRpcProvider as Rn } from "ethers";
2397
- async function We(r, e) {
2396
+ import { JsonRpcProvider as Cn } from "ethers";
2397
+ async function Fe(r, e) {
2398
2398
  if (r.isProduction && e?.has(1)) return e;
2399
2399
  if (e?.has(11155111)) return e;
2400
2400
  const t = /* @__PURE__ */ new Map();
@@ -2403,14 +2403,14 @@ async function We(r, e) {
2403
2403
  });
2404
2404
  o.networks.forEach((n) => {
2405
2405
  const a = r.networkMap.get(Number(n.chainId))?.rpcUrls[0];
2406
- const i = new Rn(a);
2406
+ const i = new Cn(a);
2407
2407
  t.set(Number(n.chainId), i);
2408
2408
  });
2409
2409
  return t;
2410
2410
  }
2411
2411
 
2412
2412
  // src/smartCheckout/aggregators/allowanceAggregator.ts
2413
- var pr = (r, e, t) => {
2413
+ var dr = (r, e, t) => {
2414
2414
  const o = [];
2415
2415
  if (!r.sufficient) {
2416
2416
  for (const n of r.allowances) {
@@ -2431,7 +2431,7 @@ var pr = (r, e, t) => {
2431
2431
  };
2432
2432
 
2433
2433
  // src/smartCheckout/aggregators/itemAggregator.ts
2434
- var Cn = (r) => {
2434
+ var Tn = (r) => {
2435
2435
  const e = /* @__PURE__ */ new Map();
2436
2436
  const t = [];
2437
2437
  r.forEach((o) => {
@@ -2454,7 +2454,7 @@ var Cn = (r) => {
2454
2454
  });
2455
2455
  return t.concat(Array.from(e.values()));
2456
2456
  };
2457
- var Tn = (r) => {
2457
+ var In = (r) => {
2458
2458
  const e = /* @__PURE__ */ new Map();
2459
2459
  const t = [];
2460
2460
  r.forEach((o) => {
@@ -2478,7 +2478,7 @@ var Tn = (r) => {
2478
2478
  });
2479
2479
  return t.concat(Array.from(e.values()));
2480
2480
  };
2481
- var In = (r) => {
2481
+ var hn = (r) => {
2482
2482
  const e = /* @__PURE__ */ new Map();
2483
2483
  const t = [];
2484
2484
  r.forEach((o) => {
@@ -2494,7 +2494,7 @@ var In = (r) => {
2494
2494
  });
2495
2495
  return t.concat(Array.from(e.values()));
2496
2496
  };
2497
- var hn = (r) => {
2497
+ var yn = (r) => {
2498
2498
  const e = /* @__PURE__ */ new Map();
2499
2499
  const t = [];
2500
2500
  r.forEach((o) => {
@@ -2519,13 +2519,13 @@ var hn = (r) => {
2519
2519
  });
2520
2520
  return t.concat(Array.from(e.values()));
2521
2521
  };
2522
- var It = (r) => hn(In(Tn(Cn(r))));
2522
+ var ht = (r) => yn(hn(In(Tn(r))));
2523
2523
 
2524
2524
  // src/smartCheckout/allowance/erc20.ts
2525
- import { Contract as ur } from "ethers";
2526
- var yn = async (r, e, t, o) => {
2525
+ import { Contract as lr } from "ethers";
2526
+ var An = async (r, e, t, o) => {
2527
2527
  try {
2528
- const n = new ur(
2528
+ const n = new lr(
2529
2529
  t,
2530
2530
  JSON.stringify(W),
2531
2531
  r
@@ -2539,9 +2539,9 @@ var yn = async (r, e, t, o) => {
2539
2539
  );
2540
2540
  }
2541
2541
  };
2542
- var An = async (r, e, t, o, n) => {
2542
+ var wn = async (r, e, t, o, n) => {
2543
2543
  try {
2544
- const a = new ur(
2544
+ const a = new lr(
2545
2545
  t,
2546
2546
  JSON.stringify(W),
2547
2547
  r
@@ -2557,7 +2557,7 @@ var An = async (r, e, t, o, n) => {
2557
2557
  );
2558
2558
  }
2559
2559
  };
2560
- var mr = async (r, e, t) => {
2560
+ var pr = async (r, e, t) => {
2561
2561
  let o = true;
2562
2562
  const n = [];
2563
2563
  const a = /* @__PURE__ */ new Map();
@@ -2571,7 +2571,7 @@ var mr = async (r, e, t) => {
2571
2571
  a.set(T, R);
2572
2572
  i.set(
2573
2573
  T,
2574
- yn(r, e, C, E)
2574
+ An(r, e, C, E)
2575
2575
  );
2576
2576
  }
2577
2577
  const p = await Promise.all(i.values());
@@ -2602,7 +2602,7 @@ var mr = async (r, e, t) => {
2602
2602
  );
2603
2603
  c.set(
2604
2604
  y,
2605
- An(
2605
+ wn(
2606
2606
  r,
2607
2607
  e,
2608
2608
  E,
@@ -2623,10 +2623,10 @@ var mr = async (r, e, t) => {
2623
2623
  };
2624
2624
 
2625
2625
  // src/smartCheckout/allowance/erc721.ts
2626
- import { Contract as ht } from "ethers";
2626
+ import { Contract as yt } from "ethers";
2627
2627
  var Pn = async (r, e, t, o) => {
2628
2628
  try {
2629
- const n = new ht(
2629
+ const n = new yt(
2630
2630
  t,
2631
2631
  JSON.stringify(ne),
2632
2632
  r
@@ -2645,9 +2645,9 @@ var Pn = async (r, e, t, o) => {
2645
2645
  );
2646
2646
  }
2647
2647
  };
2648
- var wn = async (r, e, t, o, n) => {
2648
+ var Sn = async (r, e, t, o, n) => {
2649
2649
  try {
2650
- const a = new ht(
2650
+ const a = new yt(
2651
2651
  t,
2652
2652
  JSON.stringify(ne),
2653
2653
  r
@@ -2669,9 +2669,9 @@ var wn = async (r, e, t, o, n) => {
2669
2669
  );
2670
2670
  }
2671
2671
  };
2672
- var Sn = async (r, e, t) => {
2672
+ var kn = async (r, e, t) => {
2673
2673
  try {
2674
- const o = new ht(
2674
+ const o = new yt(
2675
2675
  e,
2676
2676
  JSON.stringify(ne),
2677
2677
  r
@@ -2689,7 +2689,7 @@ var Sn = async (r, e, t) => {
2689
2689
  );
2690
2690
  }
2691
2691
  };
2692
- var gr = (r, e) => {
2692
+ var ur = (r, e) => {
2693
2693
  try {
2694
2694
  if (!r.trim()) {
2695
2695
  throw new u(
@@ -2707,7 +2707,7 @@ var gr = (r, e) => {
2707
2707
  );
2708
2708
  }
2709
2709
  };
2710
- var kn = async (r, e, t) => {
2710
+ var vn = async (r, e, t) => {
2711
2711
  const o = /* @__PURE__ */ new Map();
2712
2712
  const n = /* @__PURE__ */ new Map();
2713
2713
  for (const s of e) {
@@ -2730,14 +2730,14 @@ var kn = async (r, e, t) => {
2730
2730
  });
2731
2731
  return o;
2732
2732
  };
2733
- var fr = async (r, e, t) => {
2733
+ var mr = async (r, e, t) => {
2734
2734
  let o = true;
2735
2735
  const n = [];
2736
2736
  const a = /* @__PURE__ */ new Map();
2737
2737
  const i = /* @__PURE__ */ new Map();
2738
2738
  const s = /* @__PURE__ */ new Map();
2739
2739
  const c = /* @__PURE__ */ new Map();
2740
- const p = await kn(
2740
+ const p = await vn(
2741
2741
  r,
2742
2742
  t,
2743
2743
  e
@@ -2746,8 +2746,8 @@ var fr = async (r, e, t) => {
2746
2746
  if (C.type !== "ERC721") continue;
2747
2747
  const { contractAddress: E, id: T, spenderAddress: y } = C;
2748
2748
  const I = `${E}-${y}`;
2749
- const w = p.get(I);
2750
- if (w) {
2749
+ const P = p.get(I);
2750
+ if (P) {
2751
2751
  n.push({
2752
2752
  sufficient: true,
2753
2753
  itemRequirement: C
@@ -2755,11 +2755,11 @@ var fr = async (r, e, t) => {
2755
2755
  continue;
2756
2756
  }
2757
2757
  const v = `${E}-${T}`;
2758
- const _ = gr(T, E);
2758
+ const O = ur(T, E);
2759
2759
  a.set(v, C);
2760
2760
  i.set(
2761
2761
  v,
2762
- Sn(r, E, _)
2762
+ kn(r, E, O)
2763
2763
  );
2764
2764
  }
2765
2765
  const m = await Promise.all(i.values());
@@ -2776,10 +2776,10 @@ var fr = async (r, e, t) => {
2776
2776
  }
2777
2777
  o = false;
2778
2778
  const { contractAddress: T, id: y, spenderAddress: I } = E;
2779
- const w = `${T}-${y}`;
2780
- const v = gr(y, T);
2779
+ const P = `${T}-${y}`;
2780
+ const v = ur(y, T);
2781
2781
  s.set(
2782
- w,
2782
+ P,
2783
2783
  {
2784
2784
  type: "ERC721",
2785
2785
  sufficient: false,
@@ -2788,8 +2788,8 @@ var fr = async (r, e, t) => {
2788
2788
  }
2789
2789
  );
2790
2790
  c.set(
2791
- w,
2792
- wn(
2791
+ P,
2792
+ Sn(
2793
2793
  r,
2794
2794
  e,
2795
2795
  T,
@@ -2810,12 +2810,12 @@ var fr = async (r, e, t) => {
2810
2810
  };
2811
2811
 
2812
2812
  // src/smartCheckout/allowance/erc1155.ts
2813
- import { Contract as Er } from "ethers";
2814
- var vn = async (r, e, t, o) => {
2813
+ import { Contract as gr } from "ethers";
2814
+ var Nn = async (r, e, t, o) => {
2815
2815
  try {
2816
- const n = new Er(
2816
+ const n = new gr(
2817
2817
  t,
2818
- JSON.stringify(nt),
2818
+ JSON.stringify(at),
2819
2819
  r
2820
2820
  );
2821
2821
  return await n.isApprovedForAll(e, o);
@@ -2832,11 +2832,11 @@ var vn = async (r, e, t, o) => {
2832
2832
  );
2833
2833
  }
2834
2834
  };
2835
- var Nn = async (r, e, t, o) => {
2835
+ var _n = async (r, e, t, o) => {
2836
2836
  try {
2837
- const n = new Er(
2837
+ const n = new gr(
2838
2838
  t,
2839
- JSON.stringify(nt),
2839
+ JSON.stringify(at),
2840
2840
  r
2841
2841
  );
2842
2842
  const a = await n.setApprovalForAll.populateTransaction(o, true);
@@ -2855,13 +2855,13 @@ var Nn = async (r, e, t, o) => {
2855
2855
  );
2856
2856
  }
2857
2857
  };
2858
- var Rr = async (r, e, t) => {
2858
+ var fr = async (r, e, t) => {
2859
2859
  const o = t.filter(
2860
2860
  (a) => a.type === "ERC1155"
2861
2861
  );
2862
2862
  const n = await Promise.all(
2863
2863
  o.map(async (a) => {
2864
- const i = await vn(
2864
+ const i = await Nn(
2865
2865
  r,
2866
2866
  e,
2867
2867
  a.contractAddress,
@@ -2873,7 +2873,7 @@ var Rr = async (r, e, t) => {
2873
2873
  itemRequirement: a
2874
2874
  };
2875
2875
  }
2876
- const s = await Nn(
2876
+ const s = await _n(
2877
2877
  r,
2878
2878
  e,
2879
2879
  a.contractAddress,
@@ -2894,10 +2894,10 @@ var Rr = async (r, e, t) => {
2894
2894
  };
2895
2895
 
2896
2896
  // src/smartCheckout/balanceCheck/balanceCheck.ts
2897
- import { Contract as Mn, formatUnits as bn } from "ethers";
2897
+ import { Contract as bn, formatUnits as Ln } from "ethers";
2898
2898
 
2899
2899
  // src/smartCheckout/aggregators/balanceAggregator.ts
2900
- var _n = (r) => {
2900
+ var On = (r) => {
2901
2901
  const e = /* @__PURE__ */ new Map();
2902
2902
  const t = [];
2903
2903
  r.forEach((o) => {
@@ -2916,7 +2916,7 @@ var _n = (r) => {
2916
2916
  });
2917
2917
  return t.concat(Array.from(e.values()));
2918
2918
  };
2919
- var On = (r) => {
2919
+ var xn = (r) => {
2920
2920
  const e = /* @__PURE__ */ new Map();
2921
2921
  const t = [];
2922
2922
  r.forEach((o) => {
@@ -2936,7 +2936,7 @@ var On = (r) => {
2936
2936
  });
2937
2937
  return t.concat(Array.from(e.values()));
2938
2938
  };
2939
- var xn = (r) => {
2939
+ var Bn = (r) => {
2940
2940
  const e = /* @__PURE__ */ new Map();
2941
2941
  const t = [];
2942
2942
  r.forEach((o) => {
@@ -2952,11 +2952,11 @@ var xn = (r) => {
2952
2952
  });
2953
2953
  return t.concat(Array.from(e.values()));
2954
2954
  };
2955
- var Cr = (r) => xn(On(_n(r)));
2955
+ var Er = (r) => Bn(xn(On(r)));
2956
2956
 
2957
2957
  // src/smartCheckout/balanceCheck/balanceRequirement.ts
2958
- import { Contract as Bn, formatUnits as Fe } from "ethers";
2959
- var Tr = (r) => r.map((e) => {
2958
+ import { Contract as Mn, formatUnits as Ue } from "ethers";
2959
+ var Rr = (r) => r.map((e) => {
2960
2960
  switch (e.type) {
2961
2961
  case "ERC20":
2962
2962
  return {
@@ -2973,7 +2973,7 @@ var Tr = (r) => r.map((e) => {
2973
2973
  };
2974
2974
  }
2975
2975
  });
2976
- var Ir = (r, e) => {
2976
+ var Cr = (r, e) => {
2977
2977
  const t = BigInt(1);
2978
2978
  const o = e.find((s) => {
2979
2979
  const c = s;
@@ -3010,7 +3010,7 @@ var Ir = (r, e) => {
3010
3010
  isFee: false
3011
3011
  };
3012
3012
  };
3013
- var hr = (r, e) => {
3013
+ var Tr = (r, e) => {
3014
3014
  if (r.type === "ERC20") {
3015
3015
  return e.find((t) => {
3016
3016
  return h(
@@ -3023,14 +3023,14 @@ var hr = (r, e) => {
3023
3023
  return B(t.token?.address);
3024
3024
  });
3025
3025
  };
3026
- var yr = async (r, e, t) => {
3026
+ var Ir = async (r, e, t) => {
3027
3027
  const o = {};
3028
3028
  for (const n of r) {
3029
3029
  if (n.type === "NATIVE") {
3030
- o[x] = Se;
3030
+ o[x] = ke;
3031
3031
  continue;
3032
3032
  }
3033
- const a = hr(n, e);
3033
+ const a = Tr(n, e);
3034
3034
  let i = a?.token.address ?? "";
3035
3035
  let s = a?.token.name ?? "";
3036
3036
  let c = a?.token.symbol ?? "";
@@ -3041,7 +3041,7 @@ var yr = async (r, e, t) => {
3041
3041
  continue;
3042
3042
  }
3043
3043
  try {
3044
- const m = new Bn(
3044
+ const m = new Mn(
3045
3045
  n.tokenAddress,
3046
3046
  JSON.stringify(W),
3047
3047
  t
@@ -3071,8 +3071,8 @@ var yr = async (r, e, t) => {
3071
3071
  }
3072
3072
  return o;
3073
3073
  };
3074
- var Ar = (r, e, t) => {
3075
- let o = hr(r, e);
3074
+ var hr = (r, e, t) => {
3075
+ let o = Tr(r, e);
3076
3076
  const n = r.amount;
3077
3077
  const a = n < 0 || n === 0n || o && o?.balance >= n;
3078
3078
  const i = n - (o?.balance ?? BigInt(0));
@@ -3090,7 +3090,7 @@ var Ar = (r, e, t) => {
3090
3090
  type: "NATIVE",
3091
3091
  delta: {
3092
3092
  balance: i,
3093
- formattedBalance: Fe(i, t.decimals)
3093
+ formattedBalance: Ue(i, t.decimals)
3094
3094
  },
3095
3095
  current: {
3096
3096
  ...o,
@@ -3101,7 +3101,7 @@ var Ar = (r, e, t) => {
3101
3101
  ...o,
3102
3102
  type: "NATIVE",
3103
3103
  balance: BigInt(r.amount),
3104
- formattedBalance: Fe(r.amount, t.decimals),
3104
+ formattedBalance: Ue(r.amount, t.decimals),
3105
3105
  token: t
3106
3106
  },
3107
3107
  isFee: r.isFee
@@ -3120,7 +3120,7 @@ var Ar = (r, e, t) => {
3120
3120
  type: "ERC20",
3121
3121
  delta: {
3122
3122
  balance: i,
3123
- formattedBalance: Fe(i, t.decimals)
3123
+ formattedBalance: Ue(i, t.decimals)
3124
3124
  },
3125
3125
  current: {
3126
3126
  ...o,
@@ -3130,23 +3130,23 @@ var Ar = (r, e, t) => {
3130
3130
  ...o,
3131
3131
  token: t,
3132
3132
  balance: BigInt(r.amount),
3133
- formattedBalance: Fe(r.amount, t.decimals)
3133
+ formattedBalance: Ue(r.amount, t.decimals)
3134
3134
  },
3135
3135
  isFee: r.isFee
3136
3136
  };
3137
3137
  };
3138
3138
 
3139
3139
  // src/smartCheckout/balanceCheck/balanceCheck.ts
3140
- var Ln = async (r, e, t, o, n = false) => {
3140
+ var Dn = async (r, e, t, o, n = false) => {
3141
3141
  try {
3142
3142
  const a = /* @__PURE__ */ new Map();
3143
- Tr(o).forEach(
3143
+ Rr(o).forEach(
3144
3144
  (s) => {
3145
3145
  if (!s.address) return;
3146
3146
  a.set(s.address.toLocaleLowerCase(), s);
3147
3147
  }
3148
3148
  );
3149
- const { balances: i } = await V(r, e, t, P(r), n);
3149
+ const { balances: i } = await V(r, e, t, w(r), n);
3150
3150
  return i.filter(
3151
3151
  (s) => a.get((s.token.address || x).toLocaleLowerCase())
3152
3152
  );
@@ -3158,13 +3158,13 @@ var Ln = async (r, e, t, o, n = false) => {
3158
3158
  );
3159
3159
  }
3160
3160
  };
3161
- var Dn = async (r, e, t) => {
3161
+ var Wn = async (r, e, t) => {
3162
3162
  const o = [];
3163
3163
  const n = /* @__PURE__ */ new Map();
3164
3164
  const a = /* @__PURE__ */ new Map();
3165
3165
  t.forEach((i) => {
3166
3166
  if (i.type !== "ERC721") return;
3167
- const s = new Mn(
3167
+ const s = new bn(
3168
3168
  i.contractAddress,
3169
3169
  JSON.stringify(ne),
3170
3170
  r
@@ -3198,8 +3198,8 @@ var Dn = async (r, e, t) => {
3198
3198
  }
3199
3199
  return o;
3200
3200
  };
3201
- var Pr = async (r, e, t, o, n = false) => {
3202
- const a = Cr(o);
3201
+ var yr = async (r, e, t, o, n = false) => {
3202
+ const a = Er(o);
3203
3203
  const i = [];
3204
3204
  const s = [];
3205
3205
  a.forEach((f) => {
@@ -3223,10 +3223,10 @@ var Pr = async (r, e, t, o, n = false) => {
3223
3223
  }
3224
3224
  const c = [];
3225
3225
  if (i.length > 0) {
3226
- c.push(Ln(r, e, t, a, n));
3226
+ c.push(Dn(r, e, t, a, n));
3227
3227
  }
3228
3228
  if (s.length > 0) {
3229
- c.push(Dn(e, t, a));
3229
+ c.push(Wn(e, t, a));
3230
3230
  }
3231
3231
  const p = await Promise.all(c);
3232
3232
  const m = [];
@@ -3236,28 +3236,28 @@ var Pr = async (r, e, t, o, n = false) => {
3236
3236
  const T = E.type === "NATIVE" ? x : E.token.address?.toLowerCase();
3237
3237
  return [T, E];
3238
3238
  }));
3239
- const C = await yr(i, f, e);
3239
+ const C = await Ir(i, f, e);
3240
3240
  i.forEach((E) => {
3241
3241
  const T = (E.tokenAddress ?? x).toLowerCase();
3242
3242
  const y = C[T];
3243
3243
  const I = R.get(T);
3244
- const w = Ar(E, [...R.values()], y);
3245
- m.push(w);
3244
+ const P = hr(E, [...R.values()], y);
3245
+ m.push(P);
3246
3246
  if (!I) {
3247
3247
  return;
3248
3248
  }
3249
- const v = I.balance - w.required.balance;
3249
+ const v = I.balance - P.required.balance;
3250
3250
  R.set(T, {
3251
3251
  ...I,
3252
3252
  balance: v,
3253
- formattedBalance: bn(v, w.required.token.decimals)
3253
+ formattedBalance: Ln(v, P.required.token.decimals)
3254
3254
  });
3255
3255
  });
3256
3256
  }
3257
3257
  if (s.length > 0) {
3258
3258
  const f = p.shift() ?? [];
3259
3259
  s.forEach((R) => {
3260
- m.push(Ir(R, f));
3260
+ m.push(Cr(R, f));
3261
3261
  });
3262
3262
  }
3263
3263
  const g = m.find((f) => !f.sufficient) === void 0;
@@ -3268,7 +3268,7 @@ var Pr = async (r, e, t, o, n = false) => {
3268
3268
  };
3269
3269
 
3270
3270
  // src/smartCheckout/gas/gasCalculator.ts
3271
- var wr = async (r, e) => {
3271
+ var Ar = async (r, e) => {
3272
3272
  try {
3273
3273
  return await r.estimateGas(e);
3274
3274
  } catch (t) {
@@ -3279,7 +3279,7 @@ var wr = async (r, e) => {
3279
3279
  );
3280
3280
  }
3281
3281
  };
3282
- var Wn = (r, e) => {
3282
+ var Fn = (r, e) => {
3283
3283
  if (e.type === "TRANSACTION" || e.gasToken.type === "NATIVE") {
3284
3284
  return {
3285
3285
  type: "NATIVE",
@@ -3295,18 +3295,18 @@ var Wn = (r, e) => {
3295
3295
  isFee: true
3296
3296
  };
3297
3297
  };
3298
- var Sr = async (r, e, t) => {
3298
+ var wr = async (r, e, t) => {
3299
3299
  const o = [];
3300
3300
  let n = BigInt(0);
3301
3301
  for (const i of e) {
3302
3302
  if (i.approvalTransaction === void 0) continue;
3303
- o.push(wr(r, i.approvalTransaction));
3303
+ o.push(Ar(r, i.approvalTransaction));
3304
3304
  }
3305
3305
  if (t.type === "TRANSACTION") {
3306
- o.push(wr(r, t.transaction));
3306
+ o.push(Ar(r, t.transaction));
3307
3307
  } else {
3308
3308
  const i = await r.getFeeData();
3309
- const s = Rt(i);
3309
+ const s = Ct(i);
3310
3310
  if (s !== null) {
3311
3311
  const c = s * t.gasToken.limit;
3312
3312
  if (c) n += c;
@@ -3317,13 +3317,13 @@ var Sr = async (r, e, t) => {
3317
3317
  n += i;
3318
3318
  });
3319
3319
  if (n === 0n) return null;
3320
- return Wn(n, t);
3320
+ return Fn(n, t);
3321
3321
  };
3322
3322
 
3323
3323
  // src/smartCheckout/routing/geoBlocking.ts
3324
- var kr = async () => true;
3325
- var vr = async (r) => {
3326
- const e = ve(r.isDevelopment, r.isProduction);
3324
+ var Pr = async () => true;
3325
+ var Sr = async (r) => {
3326
+ const e = Ne(r.isDevelopment, r.isProduction);
3327
3327
  try {
3328
3328
  return await e.checkDexAvailability();
3329
3329
  } catch {
@@ -3332,10 +3332,10 @@ var vr = async (r) => {
3332
3332
  };
3333
3333
 
3334
3334
  // src/smartCheckout/routing/routingOptions.ts
3335
- function yt(r) {
3335
+ function At(r) {
3336
3336
  return r?.ethereumProvider?.isPassport === true;
3337
3337
  }
3338
- var Nr = async (r, e) => {
3338
+ var kr = async (r, e) => {
3339
3339
  const t = {
3340
3340
  onRamp: r.isOnRampEnabled,
3341
3341
  swap: r.isSwapEnabled,
@@ -3343,10 +3343,10 @@ var Nr = async (r, e) => {
3343
3343
  };
3344
3344
  const o = [];
3345
3345
  if (t.onRamp) {
3346
- o.push({ id: "onRamp", promise: kr() });
3346
+ o.push({ id: "onRamp", promise: Pr() });
3347
3347
  }
3348
3348
  if (t.swap) {
3349
- o.push({ id: "swap", promise: vr(r) });
3349
+ o.push({ id: "swap", promise: Sr(r) });
3350
3350
  }
3351
3351
  if (o.length > 0) {
3352
3352
  const n = o.map((i) => i.promise);
@@ -3356,12 +3356,12 @@ var Nr = async (r, e) => {
3356
3356
  t[c] = t[c] && i.status === "fulfilled" && i.value;
3357
3357
  });
3358
3358
  }
3359
- t.bridge = t.bridge && !yt(e);
3359
+ t.bridge = t.bridge && !At(e);
3360
3360
  return t;
3361
3361
  };
3362
3362
 
3363
3363
  // src/smartCheckout/routing/tokenBalances.ts
3364
- var _r = async (r, e, t, o) => {
3364
+ var vr = async (r, e, t, o) => {
3365
3365
  const n = /* @__PURE__ */ new Map();
3366
3366
  const a = /* @__PURE__ */ new Map();
3367
3367
  if (e.size === 0) {
@@ -3370,12 +3370,12 @@ var _r = async (r, e, t, o) => {
3370
3370
  error: new u("No L1 or L2 provider available", "PROVIDER_ERROR"),
3371
3371
  balances: []
3372
3372
  };
3373
- n.set(O(r), s);
3374
- n.set(P(r), s);
3373
+ n.set(_(r), s);
3374
+ n.set(w(r), s);
3375
3375
  return n;
3376
3376
  }
3377
3377
  if (o.bridge) {
3378
- const s = O(r);
3378
+ const s = _(r);
3379
3379
  if (e.has(s)) {
3380
3380
  a.set(s, V(
3381
3381
  r,
@@ -3384,14 +3384,14 @@ var _r = async (r, e, t, o) => {
3384
3384
  s
3385
3385
  ));
3386
3386
  } else {
3387
- n.set(O(r), {
3387
+ n.set(_(r), {
3388
3388
  success: false,
3389
3389
  error: new u(`No L1 provider available for ${s}`, "PROVIDER_ERROR"),
3390
3390
  balances: []
3391
3391
  });
3392
3392
  }
3393
3393
  }
3394
- const i = P(r);
3394
+ const i = w(r);
3395
3395
  if (e.has(i)) {
3396
3396
  a.set(i, V(
3397
3397
  r,
@@ -3400,7 +3400,7 @@ var _r = async (r, e, t, o) => {
3400
3400
  i
3401
3401
  ));
3402
3402
  } else {
3403
- n.set(P(r), {
3403
+ n.set(w(r), {
3404
3404
  success: false,
3405
3405
  error: new u(`No L2 provider available for ${i}`, "PROVIDER_ERROR"),
3406
3406
  balances: []
@@ -3429,14 +3429,14 @@ var _r = async (r, e, t, o) => {
3429
3429
  };
3430
3430
 
3431
3431
  // src/smartCheckout/routing/swap/swapRoute.ts
3432
- import { formatUnits as Ge } from "ethers";
3432
+ import { formatUnits as qe } from "ethers";
3433
3433
 
3434
3434
  // src/smartCheckout/routing/swap/quoteFetcher.ts
3435
- var Ue = async (r, e, t, o, n) => {
3435
+ var Ge = async (r, e, t, o, n) => {
3436
3436
  const a = /* @__PURE__ */ new Map();
3437
3437
  const i = 1;
3438
3438
  try {
3439
- const s = await ie(e, r);
3439
+ const s = await se(e, r);
3440
3440
  const c = [];
3441
3441
  const p = [];
3442
3442
  for (const g of n) {
@@ -3471,13 +3471,13 @@ var Ue = async (r, e, t, o, n) => {
3471
3471
  };
3472
3472
 
3473
3473
  // src/smartCheckout/routing/swap/swapRoute.ts
3474
- var Fn = (r, e, t) => {
3474
+ var Un = (r, e, t) => {
3475
3475
  let o = BigInt(0);
3476
3476
  let n = "0";
3477
3477
  let a;
3478
3478
  if (r) {
3479
3479
  o = r.value;
3480
- n = Ge(r.value, r.token.decimals);
3480
+ n = qe(r.value, r.token.decimals);
3481
3481
  a = {
3482
3482
  name: r.token.name ?? "",
3483
3483
  symbol: r.token.symbol ?? "",
@@ -3490,7 +3490,7 @@ var Fn = (r, e, t) => {
3490
3490
  let c;
3491
3491
  if (e) {
3492
3492
  i = e.value;
3493
- s = Ge(e.value, e.token.decimals);
3493
+ s = qe(e.value, e.token.decimals);
3494
3494
  c = {
3495
3495
  name: e.token.name ?? "",
3496
3496
  symbol: e.token.symbol ?? "",
@@ -3503,7 +3503,7 @@ var Fn = (r, e, t) => {
3503
3503
  p.push({
3504
3504
  type: "SWAP_FEE",
3505
3505
  amount: m.amount.value,
3506
- formattedAmount: Ge(m.amount.value, m.amount.token.decimals),
3506
+ formattedAmount: qe(m.amount.value, m.amount.token.decimals),
3507
3507
  basisPoints: m.basisPoints,
3508
3508
  token: {
3509
3509
  name: m.amount.token.name ?? "",
@@ -3529,7 +3529,7 @@ var Fn = (r, e, t) => {
3529
3529
  swapFees: p
3530
3530
  };
3531
3531
  };
3532
- var Un = (r, e, t, o) => {
3532
+ var Gn = (r, e, t, o) => {
3533
3533
  const n = t.token.address;
3534
3534
  let a = "ERC20";
3535
3535
  if (B(n)) {
@@ -3542,7 +3542,7 @@ var Un = (r, e, t, o) => {
3542
3542
  type: a,
3543
3543
  fundsRequired: {
3544
3544
  amount: e,
3545
- formattedAmount: J(Ge(
3545
+ formattedAmount: Z(qe(
3546
3546
  e,
3547
3547
  t.token.decimals
3548
3548
  ))
@@ -3556,7 +3556,7 @@ var Un = (r, e, t, o) => {
3556
3556
  fees: o
3557
3557
  };
3558
3558
  };
3559
- var Gn = (r) => {
3559
+ var qn = (r) => {
3560
3560
  if (r.type === "ERC20") {
3561
3561
  return !!r.required.token.address;
3562
3562
  }
@@ -3565,7 +3565,7 @@ var Gn = (r) => {
3565
3565
  }
3566
3566
  return false;
3567
3567
  };
3568
- var qn = (r) => {
3568
+ var jn = (r) => {
3569
3569
  let e = "";
3570
3570
  let t = BigInt(0);
3571
3571
  switch (r.type) {
@@ -3581,7 +3581,7 @@ var qn = (r) => {
3581
3581
  }
3582
3582
  return { address: e, amount: t };
3583
3583
  };
3584
- var jn = (r, e) => {
3584
+ var Vn = (r, e) => {
3585
3585
  if (!e) return { sufficient: true, approvalGasFee: BigInt(0), approvalGasTokenAddress: "" };
3586
3586
  const t = e.value;
3587
3587
  const o = e.token.address;
@@ -3605,7 +3605,7 @@ var jn = (r, e) => {
3605
3605
  }
3606
3606
  return { sufficient: true, approvalGasFee: t, approvalGasTokenAddress: o };
3607
3607
  };
3608
- var Vn = (r, e, t, o, n) => {
3608
+ var Kn = (r, e, t, o, n) => {
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 Vn = (r, e, t, o, n) => {
3648
3648
  }
3649
3649
  return true;
3650
3650
  };
3651
- var Kn = (r, e, t, o, n, a) => {
3651
+ var Hn = (r, e, t, o, n, a) => {
3652
3652
  let i = BigInt(0);
3653
3653
  let s = "";
3654
3654
  let c = false;
@@ -3672,20 +3672,20 @@ var Kn = (r, e, t, o, n, a) => {
3672
3672
  }
3673
3673
  return i >= o;
3674
3674
  };
3675
- var qe = async (r, e, t, o, n, a, i) => {
3675
+ var je = async (r, e, t, o, n, a, i) => {
3676
3676
  const s = [];
3677
3677
  if (!e.swap) return s;
3678
3678
  if (a.length === 0) return s;
3679
- if (!Gn(o)) return s;
3680
- const c = qn(o);
3681
- const p = P(r);
3679
+ if (!qn(o)) return s;
3680
+ const c = jn(o);
3681
+ const p = w(r);
3682
3682
  const m = n.get(p);
3683
3683
  if (!m) return s;
3684
3684
  const g = m.balances;
3685
3685
  if (g.length === 0) return s;
3686
- const f = await Ue(
3686
+ const f = await Ge(
3687
3687
  r,
3688
- P(r),
3688
+ w(r),
3689
3689
  t,
3690
3690
  c,
3691
3691
  a
@@ -3700,9 +3700,9 @@ var qe = async (r, e, t, o, n, a, i) => {
3700
3700
  if (!T) continue;
3701
3701
  const y = E.quote.amountWithMaxSlippage;
3702
3702
  if (T.balance < y.value) continue;
3703
- const I = jn(g, E.approval);
3703
+ const I = Vn(g, E.approval);
3704
3704
  if (!I.sufficient) continue;
3705
- if (!Vn(
3705
+ if (!Kn(
3706
3706
  g,
3707
3707
  I,
3708
3708
  E.swap,
@@ -3712,7 +3712,7 @@ var qe = async (r, e, t, o, n, a, i) => {
3712
3712
  address: C
3713
3713
  }
3714
3714
  )) continue;
3715
- if (!Kn(
3715
+ if (!Hn(
3716
3716
  T.balance,
3717
3717
  i,
3718
3718
  C,
@@ -3720,13 +3720,13 @@ var qe = async (r, e, t, o, n, a, i) => {
3720
3720
  I,
3721
3721
  E.quote.fees
3722
3722
  )) continue;
3723
- const w = Fn(E.approval, E.swap, E.quote.fees);
3723
+ const P = Un(E.approval, E.swap, E.quote.fees);
3724
3724
  s.push(
3725
- Un(
3725
+ Gn(
3726
3726
  p,
3727
3727
  y.value,
3728
3728
  T,
3729
- w
3729
+ P
3730
3730
  )
3731
3731
  );
3732
3732
  }
@@ -3734,7 +3734,7 @@ var qe = async (r, e, t, o, n, a, i) => {
3734
3734
  };
3735
3735
 
3736
3736
  // src/smartCheckout/allowList/allowListCheck.ts
3737
- var Or = (r, e) => {
3737
+ var Nr = (r, e) => {
3738
3738
  if (e && e.success) {
3739
3739
  return r.filter((t) => {
3740
3740
  if ("address" in t) {
@@ -3747,7 +3747,7 @@ var Or = (r, e) => {
3747
3747
  }
3748
3748
  return [];
3749
3749
  };
3750
- var At = async (r, e) => {
3750
+ var wt = async (r, e) => {
3751
3751
  if (e.onRamp) {
3752
3752
  const t = await z(r, { type: "onramp" });
3753
3753
  return t.tokens;
@@ -3756,37 +3756,37 @@ var At = async (r, e) => {
3756
3756
  };
3757
3757
  var Pt = async (r, e, t) => {
3758
3758
  if (t.bridge) {
3759
- const o = O(r);
3759
+ const o = _(r);
3760
3760
  const n = (await z(r, { type: "bridge", chainId: o })).tokens;
3761
3761
  const a = e.get(o);
3762
- return Or(n, a);
3762
+ return Nr(n, a);
3763
3763
  }
3764
3764
  return [];
3765
3765
  };
3766
- var Hn = async (r, e, t) => {
3766
+ var zn = async (r, e, t) => {
3767
3767
  if (t.swap) {
3768
3768
  const o = (await z(r, { type: "swap" })).tokens;
3769
- const n = e.get(P(r));
3770
- return Or(o, n);
3769
+ const n = e.get(w(r));
3770
+ return Nr(o, n);
3771
3771
  }
3772
3772
  return [];
3773
3773
  };
3774
- var xr = async (r, e, t) => {
3774
+ var _r = async (r, e, t) => {
3775
3775
  const o = {};
3776
- o.swap = await Hn(r, e, t);
3776
+ o.swap = await zn(r, e, t);
3777
3777
  o.bridge = await Pt(r, e, t);
3778
- o.onRamp = await At(r, t);
3778
+ o.onRamp = await wt(r, t);
3779
3779
  return o;
3780
3780
  };
3781
3781
 
3782
3782
  // src/smartCheckout/routing/bridgeAndSwap/bridgeAndSwapRoute.ts
3783
- import { formatUnits as ta } from "ethers";
3783
+ import { formatUnits as ra } from "ethers";
3784
3784
 
3785
3785
  // src/smartCheckout/routing/bridge/bridgeRoute.ts
3786
- import { formatUnits as Ve } from "ethers";
3786
+ import { formatUnits as Ke } from "ethers";
3787
3787
 
3788
3788
  // src/smartCheckout/routing/bridge/getEthBalance.ts
3789
- var Br = (r) => {
3789
+ var Or = (r) => {
3790
3790
  for (const e of r.balances) {
3791
3791
  if (B(e.token.address)) {
3792
3792
  return e.balance;
@@ -3796,9 +3796,9 @@ var Br = (r) => {
3796
3796
  };
3797
3797
 
3798
3798
  // src/smartCheckout/routing/bridge/getBridgeFeeEstimate.ts
3799
- import { BridgeFeeActions as zn } from "@imtbl/bridge-sdk";
3800
- var Mr = async (r, e, t, o) => {
3801
- const n = Me(
3799
+ import { BridgeFeeActions as Qn } from "@imtbl/bridge-sdk";
3800
+ var xr = async (r, e, t, o) => {
3801
+ const n = be(
3802
3802
  t,
3803
3803
  o,
3804
3804
  e,
@@ -3807,7 +3807,7 @@ var Mr = async (r, e, t, o) => {
3807
3807
  try {
3808
3808
  const a = await n.getFee(
3809
3809
  {
3810
- action: zn.DEPOSIT,
3810
+ action: Qn.DEPOSIT,
3811
3811
  gasMultiplier: "auto",
3812
3812
  sourceChainId: t.toString(),
3813
3813
  destinationChainId: o.toString()
@@ -3828,27 +3828,27 @@ var Mr = async (r, e, t, o) => {
3828
3828
 
3829
3829
  // src/smartCheckout/routing/indexer/fetchL1Representation.ts
3830
3830
  var X = "0x0000000000000000000000000000000000000eee";
3831
- var Qn = (r) => {
3831
+ var Zn = (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 Zn = async (r, e) => {
3837
+ var Jn = async (r, e) => {
3838
3838
  const t = await e.remote.getConfig(
3839
3839
  "imxAddressMapping"
3840
3840
  );
3841
3841
  return t[r] ?? "";
3842
3842
  };
3843
- var je = async (r, e) => {
3843
+ var Ve = async (r, e) => {
3844
3844
  if (B(e)) {
3845
3845
  return {
3846
- l1address: await Zn(O(r), r),
3846
+ l1address: await Jn(_(r), r),
3847
3847
  l2address: x
3848
3848
  };
3849
3849
  }
3850
- const t = Qn(P(r));
3851
- const o = be(r);
3850
+ const t = Zn(w(r));
3851
+ const o = Le(r);
3852
3852
  const n = await o.getToken({
3853
3853
  chainName: t,
3854
3854
  contractAddress: e
@@ -3868,18 +3868,18 @@ var je = async (r, e) => {
3868
3868
  };
3869
3869
 
3870
3870
  // src/smartCheckout/routing/bridge/bridgeRoute.ts
3871
- var Jn = (r, e) => {
3872
- const t = Br(r);
3871
+ var Yn = (r, e) => {
3872
+ const t = Or(r);
3873
3873
  return t >= e;
3874
3874
  };
3875
- var br = (r, e, t, o, n) => {
3875
+ var Br = (r, e, t, o, n) => {
3876
3876
  const a = n?.decimals ?? j;
3877
3877
  const i = [];
3878
3878
  if (e > 0) {
3879
3879
  i.push({
3880
3880
  type: "BRIDGE_FEE",
3881
3881
  amount: e,
3882
- formattedAmount: Ve(e, a),
3882
+ formattedAmount: Ke(e, a),
3883
3883
  token: n
3884
3884
  });
3885
3885
  }
@@ -3887,7 +3887,7 @@ var br = (r, e, t, o, n) => {
3887
3887
  i.push({
3888
3888
  type: "IMMUTABLE_FEE",
3889
3889
  amount: t,
3890
- formattedAmount: Ve(t, a),
3890
+ formattedAmount: Ke(t, a),
3891
3891
  token: n
3892
3892
  });
3893
3893
  }
@@ -3895,26 +3895,26 @@ var br = (r, e, t, o, n) => {
3895
3895
  approvalGasFee: {
3896
3896
  type: "GAS",
3897
3897
  amount: o,
3898
- formattedAmount: Ve(o, j),
3898
+ formattedAmount: Ke(o, j),
3899
3899
  token: n
3900
3900
  },
3901
3901
  bridgeGasFee: {
3902
3902
  type: "GAS",
3903
3903
  amount: r,
3904
- formattedAmount: Ve(r, j),
3904
+ formattedAmount: Ke(r, j),
3905
3905
  token: n
3906
3906
  },
3907
3907
  bridgeFees: i
3908
3908
  };
3909
3909
  };
3910
- var Lr = (r, e, t, o, n) => ({
3910
+ var Mr = (r, e, t, o, n) => ({
3911
3911
  type: "BRIDGE",
3912
3912
  chainId: r,
3913
3913
  fundingItem: {
3914
3914
  type: o,
3915
3915
  fundsRequired: {
3916
3916
  amount: t.amount,
3917
- formattedAmount: J(t.formattedAmount)
3917
+ formattedAmount: Z(t.formattedAmount)
3918
3918
  },
3919
3919
  userBalance: {
3920
3920
  balance: e.balance,
@@ -3929,10 +3929,10 @@ var Lr = (r, e, t, o, n) => ({
3929
3929
  },
3930
3930
  fees: n
3931
3931
  });
3932
- var Ke = async (r, e, t, o, n) => {
3932
+ var He = async (r, e, t, o, n) => {
3933
3933
  if (!t.bridge) return void 0;
3934
- const a = O(r);
3935
- const i = P(r);
3934
+ const a = _(r);
3935
+ const i = w(r);
3936
3936
  const s = r.networkMap.get(a)?.nativeCurrency;
3937
3937
  const c = n.get(a);
3938
3938
  const p = e.get(a);
@@ -3946,7 +3946,7 @@ var Ke = async (r, e, t, o, n) => {
3946
3946
  if (c === void 0 || c.success === false) return void 0;
3947
3947
  const m = await Pt(r, n, t);
3948
3948
  if (m.length === 0) return void 0;
3949
- const g = await je(r, o.l2address);
3949
+ const g = await Ve(r, o.l2address);
3950
3950
  if (!g) return void 0;
3951
3951
  const { l1address: f } = g;
3952
3952
  if (B(f)) {
@@ -3954,7 +3954,7 @@ var Ke = async (r, e, t, o, n) => {
3954
3954
  } else if (!m.find((v) => h(v.address, f))) {
3955
3955
  return void 0;
3956
3956
  }
3957
- const R = await Mr(
3957
+ const R = await xr(
3958
3958
  r,
3959
3959
  e,
3960
3960
  a,
@@ -3967,42 +3967,42 @@ var Ke = async (r, e, t, o, n) => {
3967
3967
  imtblFee: y,
3968
3968
  totalFees: I
3969
3969
  } = R;
3970
- if (!Jn(c, I)) return void 0;
3970
+ if (!Yn(c, I)) return void 0;
3971
3971
  if (B(f)) {
3972
- const v = c.balances.find((_) => B(_.token.address));
3972
+ const v = c.balances.find((O) => B(O.token.address));
3973
3973
  if (v && v.balance >= o.amount + I) {
3974
- const _ = br(
3974
+ const O = Br(
3975
3975
  C,
3976
3976
  T,
3977
3977
  y,
3978
3978
  E,
3979
3979
  s
3980
3980
  );
3981
- return Lr(a, v, o, "NATIVE", _);
3981
+ return Mr(a, v, o, "NATIVE", O);
3982
3982
  }
3983
3983
  return void 0;
3984
3984
  }
3985
- const w = c.balances.find(
3985
+ const P = c.balances.find(
3986
3986
  (v) => h(v.token.address, f)
3987
3987
  );
3988
- if (w && w.balance >= o.amount) {
3989
- const v = br(
3988
+ if (P && P.balance >= o.amount) {
3989
+ const v = Br(
3990
3990
  C,
3991
3991
  T,
3992
3992
  y,
3993
3993
  E,
3994
3994
  s
3995
3995
  );
3996
- return Lr(a, w, o, "ERC20", v);
3996
+ return Mr(a, P, o, "ERC20", v);
3997
3997
  }
3998
3998
  return void 0;
3999
3999
  };
4000
4000
 
4001
4001
  // src/smartCheckout/routing/bridgeAndSwap/getBalancesByChain.ts
4002
- var Dr = (r, e) => {
4002
+ var br = (r, e) => {
4003
4003
  const t = { l1balances: [], l2balances: [] };
4004
- const o = e.get(O(r));
4005
- const n = e.get(P(r));
4004
+ const o = e.get(_(r));
4005
+ const n = e.get(w(r));
4006
4006
  if (!o) return t;
4007
4007
  if (o.error !== void 0) return t;
4008
4008
  if (!o.success) return t;
@@ -4015,8 +4015,8 @@ var Dr = (r, e) => {
4015
4015
  };
4016
4016
 
4017
4017
  // src/smartCheckout/routing/bridgeAndSwap/constructBridgeRequirements.ts
4018
- import { formatUnits as Yn } from "ethers";
4019
- var $n = (r, e) => {
4018
+ import { formatUnits as $n } from "ethers";
4019
+ var Xn = (r, e) => {
4020
4020
  let t = BigInt(0);
4021
4021
  r.quote.fees.forEach((o) => {
4022
4022
  if (h(o.amount.token.address, e)) {
@@ -4030,7 +4030,7 @@ var $n = (r, e) => {
4030
4030
  }
4031
4031
  return t;
4032
4032
  };
4033
- var Xn = (r, e) => {
4033
+ var ea = (r, e) => {
4034
4034
  for (const t of r.balanceRequirements) {
4035
4035
  if (t.type === "NATIVE" || t.type === "ERC20") {
4036
4036
  if (h(t.required.token.address, e)) {
@@ -4040,7 +4040,7 @@ var Xn = (r, e) => {
4040
4040
  }
4041
4041
  return BigInt(0);
4042
4042
  };
4043
- var ea = (r, e, t) => {
4043
+ var ta = (r, e, t) => {
4044
4044
  const o = t?.balance ?? BigInt(0);
4045
4045
  if (o >= r + e) {
4046
4046
  return BigInt(0);
@@ -4054,7 +4054,7 @@ var ea = (r, e, t) => {
4054
4054
  }
4055
4055
  return r + e - o;
4056
4056
  };
4057
- var Wr = (r, e, t, o, n) => {
4057
+ var Lr = (r, e, t, o, n) => {
4058
4058
  const a = [];
4059
4059
  for (const [i, s] of r) {
4060
4060
  const c = t.find((I) => h(I.token.address, i));
@@ -4072,13 +4072,13 @@ var Wr = (r, e, t, o, n) => {
4072
4072
  });
4073
4073
  if (!f) continue;
4074
4074
  const R = s.quote.amountWithMaxSlippage.value;
4075
- const C = $n(s, i);
4075
+ const C = Xn(s, i);
4076
4076
  const E = R + C;
4077
- const T = Xn(
4077
+ const T = ea(
4078
4078
  n,
4079
4079
  i
4080
4080
  );
4081
- const y = ea(E, T, c);
4081
+ const y = ta(E, T, c);
4082
4082
  if (y <= 0) {
4083
4083
  continue;
4084
4084
  }
@@ -4087,7 +4087,7 @@ var Wr = (r, e, t, o, n) => {
4087
4087
  }
4088
4088
  a.push({
4089
4089
  amount: y,
4090
- formattedAmount: J(Yn(y, f.token.decimals)),
4090
+ formattedAmount: Z($n(y, f.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: g
4093
4093
  });
@@ -4096,22 +4096,22 @@ var Wr = (r, e, t, o, n) => {
4096
4096
  };
4097
4097
 
4098
4098
  // src/smartCheckout/routing/bridgeAndSwap/fetchL1ToL2Mappings.ts
4099
- var Fr = async (r, e) => {
4100
- const t = e.map((n) => je(r, n.address ?? ""));
4099
+ var Dr = async (r, e) => {
4100
+ const t = e.map((n) => Ve(r, n.address ?? ""));
4101
4101
  const o = await Promise.all(t);
4102
4102
  return o.filter((n) => n !== void 0);
4103
4103
  };
4104
4104
 
4105
4105
  // src/smartCheckout/routing/bridgeAndSwap/getDexQuotes.ts
4106
- var Ur = async (r, e, t, o, n) => {
4106
+ var Wr = async (r, e, t, o, n) => {
4107
4107
  const a = [];
4108
4108
  for (const s of n) {
4109
4109
  if (!s.address) continue;
4110
4110
  a.push(s.address);
4111
4111
  }
4112
- const i = await Ue(
4112
+ const i = await Ge(
4113
4113
  r,
4114
- P(r),
4114
+ w(r),
4115
4115
  e,
4116
4116
  {
4117
4117
  address: t,
@@ -4123,7 +4123,7 @@ var Ur = async (r, e, t, o, n) => {
4123
4123
  };
4124
4124
 
4125
4125
  // src/smartCheckout/routing/bridgeAndSwap/bridgeAndSwapRoute.ts
4126
- var ra = (r, e, t, o, n, a) => {
4126
+ var oa = (r, e, t, o, n, 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 ra = (r, e, t, o, n, a) => {
4134
4134
  if (a === "") return true;
4135
4135
  return false;
4136
4136
  };
4137
- var oa = (r, e, t, o) => {
4137
+ var na = (r, e, t, o) => {
4138
4138
  const n = [];
4139
4139
  for (const a of o) {
4140
4140
  if (!e.includes(a.l1address)) continue;
@@ -4147,7 +4147,7 @@ var oa = (r, e, t, o) => {
4147
4147
  }
4148
4148
  return n;
4149
4149
  };
4150
- var na = (r, e, t, o, n) => {
4150
+ var aa = (r, e, t, o, n) => {
4151
4151
  const a = /* @__PURE__ */ new Map();
4152
4152
  for (const [c, p] of e) {
4153
4153
  a.set(c, {
@@ -4170,7 +4170,7 @@ var na = (r, e, t, o, n) => {
4170
4170
  const C = n.find((E) => h(E.address, m));
4171
4171
  i.set(m, {
4172
4172
  balance: R,
4173
- formattedBalance: ta(
4173
+ formattedBalance: ra(
4174
4174
  R,
4175
4175
  C.decimals
4176
4176
  ),
@@ -4179,7 +4179,7 @@ var na = (r, e, t, o, n) => {
4179
4179
  }
4180
4180
  const s = Array.from(i.values());
4181
4181
  a.set(
4182
- P(r),
4182
+ w(r),
4183
4183
  {
4184
4184
  success: true,
4185
4185
  balances: s
@@ -4187,7 +4187,7 @@ var na = (r, e, t, o, n) => {
4187
4187
  );
4188
4188
  return a;
4189
4189
  };
4190
- var aa = (r, e) => {
4190
+ var ia = (r, e) => {
4191
4191
  const t = [];
4192
4192
  for (const o of e) {
4193
4193
  const { chainId: n, fundingItem: a } = o;
@@ -4209,7 +4209,7 @@ var aa = (r, e) => {
4209
4209
  }
4210
4210
  return t;
4211
4211
  };
4212
- var ia = (r, e, t) => {
4212
+ var sa = (r, e, t) => {
4213
4213
  const o = [];
4214
4214
  for (const n of r) {
4215
4215
  if (!n) continue;
@@ -4236,10 +4236,10 @@ var ia = (r, e, t) => {
4236
4236
  }
4237
4237
  return o;
4238
4238
  };
4239
- var Gr = async (r, e, t, o, n, a, i, s, c) => {
4240
- const { l1balances: p, l2balances: m } = Dr(r, a);
4239
+ var Fr = async (r, e, t, o, n, a, i, s, c) => {
4240
+ const { l1balances: p, l2balances: m } = br(r, a);
4241
4241
  const g = o.required.token.address;
4242
- if (ra(
4242
+ if (oa(
4243
4243
  i,
4244
4244
  s,
4245
4245
  p,
@@ -4247,22 +4247,22 @@ var Gr = async (r, e, t, o, n, a, i, s, c) => {
4247
4247
  t,
4248
4248
  g
4249
4249
  )) return [];
4250
- const f = await Fr(r, s);
4251
- const R = oa(
4250
+ const f = await Dr(r, s);
4251
+ const R = na(
4252
4252
  g,
4253
4253
  i,
4254
4254
  s,
4255
4255
  f
4256
4256
  );
4257
4257
  if (R.length === 0) return [];
4258
- const C = await Ur(
4258
+ const C = await Wr(
4259
4259
  r,
4260
4260
  n,
4261
4261
  g,
4262
4262
  o,
4263
4263
  R
4264
4264
  );
4265
- const E = Wr(
4265
+ const E = Lr(
4266
4266
  C,
4267
4267
  p,
4268
4268
  m,
@@ -4277,7 +4277,7 @@ var Gr = async (r, e, t, o, n, a, i, s, c) => {
4277
4277
  if (!G.l2address) continue;
4278
4278
  T.set(
4279
4279
  G.l2address,
4280
- Ke(
4280
+ He(
4281
4281
  r,
4282
4282
  e,
4283
4283
  t,
@@ -4291,13 +4291,13 @@ var Gr = async (r, e, t, o, n, a, i, s, c) => {
4291
4291
  l2address: G.l2address
4292
4292
  });
4293
4293
  }
4294
- const w = await Promise.all(T.values());
4294
+ const P = await Promise.all(T.values());
4295
4295
  const v = Array.from(T.keys());
4296
- const _ = [];
4297
- w.forEach((G, tt) => {
4298
- const K = v[tt];
4296
+ const O = [];
4297
+ P.forEach((G, rt) => {
4298
+ const K = v[rt];
4299
4299
  if (G === void 0) return;
4300
- _.push(K);
4300
+ O.push(K);
4301
4301
  const N = y.get(K);
4302
4302
  if (!N) return;
4303
4303
  I.push({
@@ -4306,42 +4306,42 @@ var Gr = async (r, e, t, o, n, a, i, s, c) => {
4306
4306
  l2address: N.l2address
4307
4307
  });
4308
4308
  });
4309
- if (_.length === 0) return [];
4309
+ if (O.length === 0) return [];
4310
4310
  if (I.length === 0) return [];
4311
- const Q = na(
4311
+ const Q = aa(
4312
4312
  r,
4313
4313
  a,
4314
4314
  m,
4315
4315
  I,
4316
4316
  s
4317
4317
  );
4318
- const le = await qe(
4318
+ const pe = await je(
4319
4319
  r,
4320
4320
  t,
4321
4321
  n,
4322
4322
  o,
4323
4323
  Q,
4324
- _,
4324
+ O,
4325
4325
  c
4326
4326
  );
4327
- if (!le) return [];
4328
- const ee = aa(
4327
+ if (!pe) return [];
4328
+ const ee = ia(
4329
4329
  a,
4330
- le
4330
+ pe
4331
4331
  );
4332
- return ia(
4333
- w,
4332
+ return sa(
4333
+ P,
4334
4334
  ee,
4335
4335
  f
4336
4336
  );
4337
4337
  };
4338
4338
 
4339
4339
  // src/smartCheckout/routing/onRamp/onRampRoute.ts
4340
- var qr = async (r, e, t) => {
4340
+ var Ur = async (r, e, t) => {
4341
4341
  if (!["ERC20", "NATIVE"].includes(t.type)) return void 0;
4342
4342
  const { required: o, current: n, delta: a } = t;
4343
4343
  let i = false;
4344
- const s = await At(r, e);
4344
+ const s = await wt(r, e);
4345
4345
  s.forEach((c) => {
4346
4346
  if (!c.address) return;
4347
4347
  if (!o.token) return;
@@ -4352,12 +4352,12 @@ var qr = async (r, e, t) => {
4352
4352
  if (!i) return void 0;
4353
4353
  return {
4354
4354
  type: "ONRAMP",
4355
- chainId: P(r),
4355
+ chainId: w(r),
4356
4356
  fundingItem: {
4357
4357
  type: B(o.token.address) ? "NATIVE" : "ERC20",
4358
4358
  fundsRequired: {
4359
4359
  amount: a.balance,
4360
- formattedAmount: J(a.formattedBalance)
4360
+ formattedAmount: Z(a.formattedBalance)
4361
4361
  },
4362
4362
  userBalance: {
4363
4363
  balance: n.balance,
@@ -4369,8 +4369,8 @@ var qr = async (r, e, t) => {
4369
4369
  };
4370
4370
 
4371
4371
  // src/smartCheckout/routing/routingCalculator.ts
4372
- var sa = (r) => r.bridge || r.swap || r.onRamp;
4373
- var ca = (r) => {
4372
+ var ca = (r) => r.bridge || r.swap || r.onRamp;
4373
+ var da = (r) => {
4374
4374
  let e = 0;
4375
4375
  let t;
4376
4376
  for (const o of r.balanceRequirements) {
@@ -4382,7 +4382,7 @@ var ca = (r) => {
4382
4382
  if (e === 1) return t;
4383
4383
  return void 0;
4384
4384
  };
4385
- var da = async (r, e, t, o, n) => {
4385
+ var la = async (r, e, t, o, n) => {
4386
4386
  let a;
4387
4387
  if (o === void 0) return void 0;
4388
4388
  if (o.type !== "NATIVE" && o.type !== "ERC20") {
@@ -4394,7 +4394,7 @@ var da = async (r, e, t, o, n) => {
4394
4394
  l2address: o.required.token.address ?? ""
4395
4395
  };
4396
4396
  if (t.bridge && o) {
4397
- a = await Ke(
4397
+ a = await He(
4398
4398
  r,
4399
4399
  e,
4400
4400
  t,
@@ -4404,18 +4404,18 @@ var da = async (r, e, t, o, n) => {
4404
4404
  }
4405
4405
  return a;
4406
4406
  };
4407
- var la = async (r, e, t, o, n, a, i) => {
4407
+ var pa = async (r, e, t, o, n, a, i) => {
4408
4408
  const s = [];
4409
4409
  if (!e.swap) return s;
4410
4410
  if (t === void 0) return s;
4411
4411
  if (a === void 0) return s;
4412
- const c = n.get(P(r));
4412
+ const c = n.get(w(r));
4413
4413
  if (!c) return s;
4414
4414
  if (c.error !== void 0 || !c.success) return s;
4415
4415
  if (a.length === 0) return s;
4416
4416
  const p = a.filter((m) => m.address).map((m) => m.address);
4417
4417
  if (p.length === 0) return s;
4418
- return await qe(
4418
+ return await je(
4419
4419
  r,
4420
4420
  e,
4421
4421
  o,
@@ -4425,10 +4425,10 @@ var la = async (r, e, t, o, n, a, i) => {
4425
4425
  i
4426
4426
  );
4427
4427
  };
4428
- var pa = async (r, e, t, o, n, a, i, s) => {
4428
+ var ua = async (r, e, t, o, n, a, i, s) => {
4429
4429
  if (!o) return [];
4430
- const c = a.get(O(r));
4431
- const p = a.get(P(r));
4430
+ const c = a.get(_(r));
4431
+ const p = a.get(w(r));
4432
4432
  if (!c) return [];
4433
4433
  if (c.error !== void 0 || !c.success) return [];
4434
4434
  if (!p) return [];
@@ -4442,7 +4442,7 @@ var pa = async (r, e, t, o, n, a, i, s) => {
4442
4442
  if (o.type !== "NATIVE" && o.type !== "ERC20") {
4443
4443
  return [];
4444
4444
  }
4445
- const R = await Gr(
4445
+ const R = await Fr(
4446
4446
  r,
4447
4447
  e,
4448
4448
  t,
@@ -4455,23 +4455,23 @@ var pa = async (r, e, t, o, n, a, i, s) => {
4455
4455
  );
4456
4456
  return R;
4457
4457
  };
4458
- var ua = async (r, e, t) => {
4458
+ var ma = async (r, e, t) => {
4459
4459
  if (!e.onRamp) return void 0;
4460
4460
  if (t === void 0) return void 0;
4461
- const o = await qr(
4461
+ const o = await Ur(
4462
4462
  r,
4463
4463
  e,
4464
4464
  t
4465
4465
  );
4466
4466
  return o;
4467
4467
  };
4468
- var He = {
4468
+ var ze = {
4469
4469
  swap: 1,
4470
4470
  bridge: 2,
4471
4471
  onRamp: 3,
4472
4472
  bridgeAndSwap: 4
4473
4473
  };
4474
- var ze = (r, e, t, o) => {
4474
+ var Qe = (r, e, t, o) => {
4475
4475
  if (!r) return;
4476
4476
  let n;
4477
4477
  if ("bridgeFundingStep" in r && "swapFundingStep" in r) {
@@ -4483,8 +4483,8 @@ var ze = (r, e, t, o) => {
4483
4483
  t.push(a);
4484
4484
  o?.(a);
4485
4485
  };
4486
- var jr = async (r, e, t, o, n) => {
4487
- if (!sa(o)) {
4486
+ var Gr = async (r, e, t, o, n) => {
4487
+ if (!ca(o)) {
4488
4488
  return {
4489
4489
  type: "NO_ROUTE_OPTIONS",
4490
4490
  message: "No routing options are available"
@@ -4492,7 +4492,7 @@ var jr = async (r, e, t, o, n) => {
4492
4492
  }
4493
4493
  let a;
4494
4494
  try {
4495
- a = await We(r);
4495
+ a = await Fe(r);
4496
4496
  } catch (g) {
4497
4497
  throw new u(
4498
4498
  "Error occurred while creating read only providers",
@@ -4503,7 +4503,7 @@ var jr = async (r, e, t, o, n) => {
4503
4503
  const i = await k(
4504
4504
  r,
4505
4505
  "Time to get token balances inside router",
4506
- _r(
4506
+ vr(
4507
4507
  r,
4508
4508
  a,
4509
4509
  e,
@@ -4513,14 +4513,14 @@ var jr = async (r, e, t, o, n) => {
4513
4513
  const s = await k(
4514
4514
  r,
4515
4515
  "Time to get routing allowlist",
4516
- xr(r, i, o)
4516
+ _r(r, i, o)
4517
4517
  );
4518
- const c = ca(t);
4518
+ const c = da(t);
4519
4519
  const p = [];
4520
4520
  const m = [];
4521
4521
  if (o.swap) {
4522
4522
  p.push(
4523
- la(
4523
+ pa(
4524
4524
  r,
4525
4525
  o,
4526
4526
  c,
@@ -4530,9 +4530,9 @@ var jr = async (r, e, t, o, n) => {
4530
4530
  t
4531
4531
  ).then((g) => {
4532
4532
  g.forEach((f) => {
4533
- ze(
4533
+ Qe(
4534
4534
  f,
4535
- He.swap,
4535
+ ze.swap,
4536
4536
  m,
4537
4537
  n
4538
4538
  );
@@ -4542,16 +4542,16 @@ var jr = async (r, e, t, o, n) => {
4542
4542
  }
4543
4543
  if (o.bridge) {
4544
4544
  p.push(
4545
- da(
4545
+ la(
4546
4546
  r,
4547
4547
  a,
4548
4548
  o,
4549
4549
  c,
4550
4550
  i
4551
4551
  ).then((g) => {
4552
- ze(
4552
+ Qe(
4553
4553
  g,
4554
- He.bridge,
4554
+ ze.bridge,
4555
4555
  m,
4556
4556
  n
4557
4557
  );
@@ -4560,14 +4560,14 @@ var jr = async (r, e, t, o, n) => {
4560
4560
  }
4561
4561
  if (o.onRamp) {
4562
4562
  p.push(
4563
- ua(
4563
+ ma(
4564
4564
  r,
4565
4565
  o,
4566
4566
  c
4567
4567
  ).then((g) => {
4568
- ze(
4568
+ Qe(
4569
4569
  g,
4570
- He.onRamp,
4570
+ ze.onRamp,
4571
4571
  m,
4572
4572
  n
4573
4573
  );
@@ -4576,7 +4576,7 @@ var jr = async (r, e, t, o, n) => {
4576
4576
  }
4577
4577
  if (o.swap && o.bridge) {
4578
4578
  p.push(
4579
- pa(
4579
+ ua(
4580
4580
  r,
4581
4581
  a,
4582
4582
  o,
@@ -4587,9 +4587,9 @@ var jr = async (r, e, t, o, n) => {
4587
4587
  t
4588
4588
  ).then((g) => {
4589
4589
  g.forEach((f) => {
4590
- ze(
4590
+ Qe(
4591
4591
  f,
4592
- He.bridgeAndSwap,
4592
+ ze.bridgeAndSwap,
4593
4593
  m,
4594
4594
  n
4595
4595
  );
@@ -4615,7 +4615,7 @@ var jr = async (r, e, t, o, n) => {
4615
4615
  };
4616
4616
 
4617
4617
  // src/smartCheckout/smartCheckout.ts
4618
- var ma = (r) => {
4618
+ var ga = (r) => {
4619
4619
  const e = r.balanceRequirements.map(
4620
4620
  (t) => {
4621
4621
  if (t.type === "ERC20" && t.sufficient) {
@@ -4636,12 +4636,12 @@ var ma = (r) => {
4636
4636
  balanceRequirements: e
4637
4637
  };
4638
4638
  };
4639
- var Vr = async (r, e, t, o, n, a, i, s, c) => {
4640
- const p = !i || t && s ? ma(a) : a;
4639
+ var qr = async (r, e, t, o, n, a, i, s, c) => {
4640
+ const p = !i || t && s ? ga(a) : a;
4641
4641
  const m = await k(
4642
4642
  r,
4643
4643
  "Total time to run the routing calculator",
4644
- jr(
4644
+ Gr(
4645
4645
  r,
4646
4646
  e,
4647
4647
  p,
@@ -4659,20 +4659,20 @@ var Vr = async (r, e, t, o, n, a, i, s, c) => {
4659
4659
  });
4660
4660
  return m;
4661
4661
  };
4662
- var de = async (r, e, t, o, n, a, i, s = false) => {
4662
+ var le = async (r, e, t, o, n, a, i, s = false) => {
4663
4663
  const c = await (await e.getSigner()).getAddress();
4664
- let p = It(t);
4665
- const m = mr(
4664
+ let p = ht(t);
4665
+ const m = pr(
4666
4666
  e,
4667
4667
  c,
4668
4668
  p
4669
4669
  );
4670
- const g = fr(
4670
+ const g = mr(
4671
4671
  e,
4672
4672
  c,
4673
4673
  p
4674
4674
  );
4675
- const f = Rr(
4675
+ const f = fr(
4676
4676
  e,
4677
4677
  c,
4678
4678
  p
@@ -4682,7 +4682,7 @@ var de = async (r, e, t, o, n, a, i, s = false) => {
4682
4682
  "Time to calculate token allowances",
4683
4683
  Promise.all([m, g, f])
4684
4684
  );
4685
- const C = pr(
4685
+ const C = dr(
4686
4686
  R[0],
4687
4687
  R[1],
4688
4688
  R[2]
@@ -4692,34 +4692,34 @@ var de = async (r, e, t, o, n, a, i, s = false) => {
4692
4692
  E = await k(
4693
4693
  r,
4694
4694
  "Time to run gas calculator",
4695
- Sr(e, C, o)
4695
+ wr(e, C, o)
4696
4696
  );
4697
4697
  if (E !== null) {
4698
4698
  p.push(E);
4699
- p = It(p);
4699
+ p = ht(p);
4700
4700
  }
4701
4701
  }
4702
4702
  const T = await k(
4703
4703
  r,
4704
4704
  "Time to run balance checks",
4705
- Pr(r, e, c, p, true)
4705
+ yr(r, e, c, p, true)
4706
4706
  );
4707
4707
  const { sufficient: y } = T;
4708
4708
  const I = T.balanceRequirements;
4709
- const w = await k(
4709
+ const P = await k(
4710
4710
  r,
4711
4711
  "Time to fetch available routing options",
4712
- Nr(r, e)
4712
+ kr(r, e)
4713
4713
  );
4714
- if (n?.onRamp === false) w.onRamp = false;
4715
- if (n?.swap === false) w.swap = false;
4716
- if (n?.bridge === false) w.bridge = false;
4714
+ if (n?.onRamp === false) P.onRamp = false;
4715
+ if (n?.swap === false) P.swap = false;
4716
+ if (n?.bridge === false) P.bridge = false;
4717
4717
  if (a) {
4718
- Vr(
4718
+ qr(
4719
4719
  r,
4720
4720
  c,
4721
4721
  y,
4722
- w,
4722
+ P,
4723
4723
  I,
4724
4724
  T,
4725
4725
  s,
@@ -4737,11 +4737,11 @@ var de = async (r, e, t, o, n, a, i, s = false) => {
4737
4737
  transactionRequirements: I
4738
4738
  };
4739
4739
  }
4740
- const v = await Vr(
4740
+ const v = await qr(
4741
4741
  r,
4742
4742
  c,
4743
4743
  y,
4744
- w,
4744
+ P,
4745
4745
  I,
4746
4746
  T,
4747
4747
  s,
@@ -4752,7 +4752,7 @@ var de = async (r, e, t, o, n, a, i, s = false) => {
4752
4752
  sufficient: y,
4753
4753
  transactionRequirements: I,
4754
4754
  router: {
4755
- availableRoutingOptions: w,
4755
+ availableRoutingOptions: P,
4756
4756
  routingOutcome: v
4757
4757
  }
4758
4758
  };
@@ -4760,32 +4760,32 @@ var de = async (r, e, t, o, n, a, i, s = false) => {
4760
4760
 
4761
4761
  // src/smartCheckout/buy/buy.ts
4762
4762
  import {
4763
- constants as ya,
4764
- OrderStatusName as Aa
4763
+ constants as Aa,
4764
+ OrderStatusName as wa
4765
4765
  } from "@imtbl/orderbook";
4766
4766
  import { track as Pa } from "@imtbl/metrics";
4767
4767
 
4768
4768
  // src/transaction/transaction.ts
4769
- function wt(r) {
4769
+ function St(r) {
4770
4770
  return r?.ethereumProvider?.isPassport === true;
4771
4771
  }
4772
- function fa(r) {
4773
- return wt(r);
4772
+ function Ea(r) {
4773
+ return St(r);
4774
4774
  }
4775
- var Ea = async (r, e) => {
4775
+ var Ra = async (r, e) => {
4776
4776
  const t = e;
4777
4777
  const { chainId: o } = await r.getNetwork();
4778
- if (!Jt(Number(o))) return t;
4778
+ if (!Qt(Number(o))) return t;
4779
4779
  if (typeof t.gasPrice !== "undefined") return t;
4780
- if (fa(r)) {
4780
+ if (Ea(r)) {
4781
4781
  t.gasPrice = BigInt(0);
4782
4782
  } else {
4783
- t.maxFeePerGas = at.maxFeePerGas;
4784
- t.maxPriorityFeePerGas = at.maxPriorityFeePerGas;
4783
+ t.maxFeePerGas = it.maxFeePerGas;
4784
+ t.maxPriorityFeePerGas = it.maxPriorityFeePerGas;
4785
4785
  }
4786
4786
  return t;
4787
4787
  };
4788
- var St = (r) => {
4788
+ var kt = (r) => {
4789
4789
  if (r.code === "INSUFFICIENT_FUNDS") {
4790
4790
  return new u(
4791
4791
  r.message,
@@ -4809,18 +4809,18 @@ var St = (r) => {
4809
4809
  var U = async (r, e) => {
4810
4810
  try {
4811
4811
  const t = await r.getSigner();
4812
- const o = await Ea(r, e);
4812
+ const o = await Ra(r, e);
4813
4813
  const n = await t.sendTransaction(o);
4814
4814
  return {
4815
4815
  transactionResponse: n
4816
4816
  };
4817
4817
  } catch (t) {
4818
- throw St(t);
4818
+ throw kt(t);
4819
4819
  }
4820
4820
  };
4821
4821
 
4822
4822
  // src/smartCheckout/actions/signActions.ts
4823
- var Qe = async (r, e) => {
4823
+ var Ze = async (r, e) => {
4824
4824
  let t = [];
4825
4825
  try {
4826
4826
  const o = await Promise.all(
@@ -4847,7 +4847,7 @@ var Qe = async (r, e) => {
4847
4847
  type: "SUCCESS"
4848
4848
  };
4849
4849
  };
4850
- var Ze = async (r, e) => {
4850
+ var Je = async (r, e) => {
4851
4851
  let t = [];
4852
4852
  try {
4853
4853
  const o = await Promise.all(e.map(
@@ -4874,7 +4874,7 @@ var Ze = async (r, e) => {
4874
4874
  type: "SUCCESS"
4875
4875
  };
4876
4876
  };
4877
- var Kr = async (r, e) => {
4877
+ var jr = async (r, e) => {
4878
4878
  try {
4879
4879
  const t = await (await r.getSigner()).signTypedData(
4880
4880
  e.unsignedMessage.domain,
@@ -4897,21 +4897,21 @@ var Kr = async (r, e) => {
4897
4897
 
4898
4898
  // src/smartCheckout/actions/getUnsignedActions.ts
4899
4899
  import {
4900
- TransactionPurpose as Je,
4901
- ActionType as Ye,
4902
- SignablePurpose as Ca
4900
+ TransactionPurpose as Ye,
4901
+ ActionType as $e,
4902
+ SignablePurpose as Ta
4903
4903
  } from "@imtbl/orderbook";
4904
- var Hr = async (r) => {
4904
+ var Vr = async (r) => {
4905
4905
  let e = [];
4906
4906
  let t = [];
4907
4907
  const o = [];
4908
4908
  const n = [];
4909
4909
  for (const a of r) {
4910
- if (a.type !== Ye.TRANSACTION) continue;
4911
- if (a.purpose === Je.APPROVAL) {
4910
+ if (a.type !== $e.TRANSACTION) continue;
4911
+ if (a.purpose === Ye.APPROVAL) {
4912
4912
  o.push(a.buildTransaction());
4913
4913
  }
4914
- if (a.purpose === Je.FULFILL_ORDER) {
4914
+ if (a.purpose === Ye.FULFILL_ORDER) {
4915
4915
  n.push(a.buildTransaction());
4916
4916
  }
4917
4917
  }
@@ -4922,35 +4922,35 @@ var Hr = async (r) => {
4922
4922
  fulfillmentTransactions: t
4923
4923
  };
4924
4924
  };
4925
- var zr = async (r) => {
4925
+ var Kr = async (r) => {
4926
4926
  let e = [];
4927
4927
  const t = [];
4928
4928
  for (const o of r) {
4929
- if (o.type !== Ye.TRANSACTION) continue;
4930
- if (o.purpose === Je.APPROVAL) {
4929
+ if (o.type !== $e.TRANSACTION) continue;
4930
+ if (o.purpose === Ye.APPROVAL) {
4931
4931
  t.push(o.buildTransaction());
4932
4932
  }
4933
4933
  }
4934
4934
  e = await Promise.all(t);
4935
4935
  return e;
4936
4936
  };
4937
- var vt = async (r) => {
4937
+ var Nt = async (r) => {
4938
4938
  let e = [];
4939
4939
  const t = [];
4940
4940
  for (const o of r) {
4941
- if (o.type !== Ye.TRANSACTION) continue;
4942
- if (o.purpose === Je.FULFILL_ORDER) {
4941
+ if (o.type !== $e.TRANSACTION) continue;
4942
+ if (o.purpose === Ye.FULFILL_ORDER) {
4943
4943
  t.push(o.buildTransaction());
4944
4944
  }
4945
4945
  }
4946
4946
  e = await Promise.all(t);
4947
4947
  return e;
4948
4948
  };
4949
- var Qr = (r, e, t) => {
4949
+ var Hr = (r, e, t) => {
4950
4950
  let o;
4951
4951
  for (const n of t) {
4952
- if (n.type !== Ye.SIGNABLE) continue;
4953
- if (n.purpose === Ca.CREATE_LISTING) {
4952
+ if (n.type !== $e.SIGNABLE) continue;
4953
+ if (n.purpose === Ta.CREATE_LISTING) {
4954
4954
  o = {
4955
4955
  domain: n.message.domain,
4956
4956
  types: n.message.types,
@@ -4967,32 +4967,32 @@ var Qr = (r, e, t) => {
4967
4967
  };
4968
4968
 
4969
4969
  // src/smartCheckout/fees/fees.ts
4970
- import { parseUnits as Ta } from "ethers";
4971
- var Zr = 1;
4972
- var $e = 6;
4973
- var Ia = (r, e, t = BigInt(1)) => {
4970
+ import { parseUnits as Ia } from "ethers";
4971
+ var zr = 1;
4972
+ var Xe = 6;
4973
+ var ha = (r, e, t = BigInt(1)) => {
4974
4974
  const o = r.amount;
4975
- const n = Math.round(o.percentageDecimal * 10 ** $e);
4976
- const a = e * BigInt(n) / BigInt(10 ** $e);
4975
+ const n = Math.round(o.percentageDecimal * 10 ** Xe);
4976
+ const a = e * BigInt(n) / BigInt(10 ** Xe);
4977
4977
  return a - a % t;
4978
4978
  };
4979
- var ha = (r, e) => {
4979
+ var ya = (r, e) => {
4980
4980
  const t = r.amount;
4981
- const o = Ta(t.token, e);
4981
+ const o = Ia(t.token, e);
4982
4982
  return o;
4983
4983
  };
4984
- var Xe = (r, e, t = 18, o = BigInt(1)) => {
4984
+ var et = (r, e, t = 18, o = BigInt(1)) => {
4985
4985
  let n = BigInt(0);
4986
4986
  const a = BigInt(e);
4987
- const i = a * BigInt(Zr * 10 ** $e) / BigInt(10 ** $e);
4987
+ const i = a * BigInt(zr * 10 ** Xe) / BigInt(10 ** Xe);
4988
4988
  const s = [];
4989
4989
  for (const c of r) {
4990
4990
  let p = BigInt(0);
4991
4991
  if (Object.hasOwn(c.amount, "percentageDecimal")) {
4992
- p = Ia(c, a, o);
4992
+ p = ha(c, a, o);
4993
4993
  n += p;
4994
4994
  } else if (Object.hasOwn(c.amount, "token")) {
4995
- p = ha(c, t);
4995
+ p = ya(c, t);
4996
4996
  n += p;
4997
4997
  } else {
4998
4998
  throw new u(
@@ -5002,7 +5002,7 @@ var Xe = (r, e, t = 18, o = BigInt(1)) => {
5002
5002
  }
5003
5003
  if (n > i) {
5004
5004
  throw new u(
5005
- `The combined fees are above the allowed maximum of ${Zr * 100}%`,
5005
+ `The combined fees are above the allowed maximum of ${zr * 100}%`,
5006
5006
  "ORDER_FEE_ERROR"
5007
5007
  );
5008
5008
  }
@@ -5017,7 +5017,7 @@ var Xe = (r, e, t = 18, o = BigInt(1)) => {
5017
5017
  };
5018
5018
 
5019
5019
  // src/smartCheckout/buy/buy.ts
5020
- var wa = (r, e, t, o, n = false) => {
5020
+ var Sa = (r, e, t, o, n = false) => {
5021
5021
  switch (r) {
5022
5022
  case "ERC20":
5023
5023
  return {
@@ -5036,7 +5036,7 @@ var wa = (r, e, t, o, n = false) => {
5036
5036
  };
5037
5037
  }
5038
5038
  };
5039
- var Sa = (r, e) => {
5039
+ var ka = (r, e) => {
5040
5040
  if (e.length > 0) {
5041
5041
  return {
5042
5042
  type: "TRANSACTION",
@@ -5051,7 +5051,7 @@ var Sa = (r, e) => {
5051
5051
  }
5052
5052
  };
5053
5053
  };
5054
- var Jr = async (r, e, t, o = {
5054
+ var Qr = async (r, e, t, o = {
5055
5055
  waitFulfillmentSettlements: true
5056
5056
  }) => {
5057
5057
  Pa("checkout_sdk", "buy_initiated");
@@ -5064,17 +5064,17 @@ var Jr = async (r, e, t, o = {
5064
5064
  let n;
5065
5065
  let a = "";
5066
5066
  let i = 18;
5067
- const s = ya.estimatedFulfillmentGasGwei;
5068
- const c = se(r);
5069
- const p = be(r);
5067
+ const s = Aa.estimatedFulfillmentGasGwei;
5068
+ const c = ce(r);
5069
+ const p = Le(r);
5070
5070
  const m = await k(
5071
5071
  r,
5072
5072
  "Time to get the address from the provider",
5073
5073
  (await e.getSigner()).getAddress()
5074
5074
  );
5075
- Et();
5076
- V(r, e, m, O(r));
5077
- V(r, e, m, P(r));
5075
+ Rt();
5076
+ V(r, e, m, _(r));
5077
+ V(r, e, m, w(r));
5078
5078
  const { id: g, takerFees: f, fillAmount: R } = t[0];
5079
5079
  let C;
5080
5080
  try {
@@ -5118,11 +5118,11 @@ var Jr = async (r, e, t, o = {
5118
5118
  let T = [];
5119
5119
  if (f && f.length > 0) {
5120
5120
  const N = n.result.sell[0].type === "ERC721" ? BigInt(1) : BigInt(n.result.sell[0].amount);
5121
- T = Xe(f, E.amount, i, N);
5121
+ T = et(f, E.amount, i, N);
5122
5122
  }
5123
5123
  let y = [];
5124
5124
  let I = [];
5125
- let w = [];
5125
+ let P = [];
5126
5126
  const v = performance.now();
5127
5127
  try {
5128
5128
  const { actions: N } = await k(
@@ -5130,16 +5130,16 @@ var Jr = async (r, e, t, o = {
5130
5130
  "Time to call fulfillOrder from the orderbook",
5131
5131
  c.fulfillOrder(g, m, T, R)
5132
5132
  );
5133
- w = N;
5133
+ P = N;
5134
5134
  y = await k(
5135
5135
  r,
5136
5136
  "Time to construct the unsigned approval transactions",
5137
- zr(N)
5137
+ Kr(N)
5138
5138
  );
5139
5139
  } catch (N) {
5140
5140
  const te = (performance.now() - v) / 1e3;
5141
- lt(r, "Time to call fulfillOrder from the orderbook", te);
5142
- if (N.message.includes(Aa.EXPIRED)) {
5141
+ pt(r, "Time to call fulfillOrder from the orderbook", te);
5142
+ if (N.message.includes(wa.EXPIRED)) {
5143
5143
  throw new u("Order is expired", "ORDER_EXPIRED_ERROR", { orderId: g });
5144
5144
  }
5145
5145
  if (!N.message.includes("The fulfiller does not have the balances needed to fulfill")) {
@@ -5157,13 +5157,13 @@ var Jr = async (r, e, t, o = {
5157
5157
  I = await k(
5158
5158
  r,
5159
5159
  "Time to construct the unsigned fulfillment transactions",
5160
- vt(w)
5160
+ Nt(P)
5161
5161
  );
5162
5162
  } catch {
5163
5163
  }
5164
- let _ = BigInt("0");
5164
+ let O = BigInt("0");
5165
5165
  let Q = "NATIVE";
5166
- let le = "";
5166
+ let pe = "";
5167
5167
  const ee = n.result.buy;
5168
5168
  if (ee.length > 0) {
5169
5169
  switch (ee[0].type) {
@@ -5172,7 +5172,7 @@ var Jr = async (r, e, t, o = {
5172
5172
  break;
5173
5173
  case "ERC20":
5174
5174
  Q = "ERC20";
5175
- le = ee[0].contractAddress;
5175
+ pe = ee[0].contractAddress;
5176
5176
  break;
5177
5177
  default:
5178
5178
  throw new u(
@@ -5186,34 +5186,34 @@ var Jr = async (r, e, t, o = {
5186
5186
  }
5187
5187
  ee.forEach((N) => {
5188
5188
  if (N.type !== "ERC721") {
5189
- _ += BigInt(N.amount);
5189
+ O += BigInt(N.amount);
5190
5190
  }
5191
5191
  });
5192
5192
  const G = n.result.fees;
5193
5193
  G.forEach((N) => {
5194
- _ += BigInt(N.amount);
5194
+ O += BigInt(N.amount);
5195
5195
  });
5196
5196
  if (n.result.sell[0].type === "ERC1155" && R) {
5197
- _ = _ * BigInt(R) / BigInt(n.result.sell[0].amount);
5197
+ O = O * BigInt(R) / BigInt(n.result.sell[0].amount);
5198
5198
  }
5199
- const tt = [
5200
- wa(Q, le, _, a)
5199
+ const rt = [
5200
+ Sa(Q, pe, O, a)
5201
5201
  ];
5202
5202
  const K = await k(
5203
5203
  r,
5204
5204
  "Total time running smart checkout",
5205
- de(
5205
+ le(
5206
5206
  r,
5207
5207
  e,
5208
- tt,
5209
- Sa(
5208
+ rt,
5209
+ ka(
5210
5210
  s,
5211
5211
  I
5212
5212
  )
5213
5213
  )
5214
5214
  );
5215
5215
  if (K.sufficient) {
5216
- const N = await Qe(e, y);
5216
+ const N = await Ze(e, y);
5217
5217
  if (N.type === "FAILED") {
5218
5218
  return {
5219
5219
  status: "FAILED",
@@ -5224,7 +5224,7 @@ var Jr = async (r, e, t, o = {
5224
5224
  }
5225
5225
  try {
5226
5226
  if (I.length === 0) {
5227
- I = await vt(w);
5227
+ I = await Nt(P);
5228
5228
  }
5229
5229
  } catch (H) {
5230
5230
  throw new u(
@@ -5234,7 +5234,7 @@ var Jr = async (r, e, t, o = {
5234
5234
  );
5235
5235
  }
5236
5236
  if (o.waitFulfillmentSettlements) {
5237
- const H = await Ze(e, I);
5237
+ const H = await Je(e, I);
5238
5238
  if (H.type === "FAILED") {
5239
5239
  return {
5240
5240
  status: "FAILED",
@@ -5251,9 +5251,9 @@ var Jr = async (r, e, t, o = {
5251
5251
  let te;
5252
5252
  try {
5253
5253
  const H = await Promise.all(I.map(
5254
- (rt) => U(e, rt)
5254
+ (ot) => U(e, ot)
5255
5255
  ));
5256
- te = H.map((rt) => rt.transactionResponse);
5256
+ te = H.map((ot) => ot.transactionResponse);
5257
5257
  } catch (H) {
5258
5258
  throw new u(
5259
5259
  "An error occurred while executing the fulfillment transaction",
@@ -5276,7 +5276,7 @@ var Jr = async (r, e, t, o = {
5276
5276
  };
5277
5277
 
5278
5278
  // src/smartCheckout/cancel/cancel.ts
5279
- var va = async (r, e, t, o, n) => {
5279
+ var Na = async (r, e, t, o, n) => {
5280
5280
  let a;
5281
5281
  if (o.length === 0) {
5282
5282
  throw new u(
@@ -5311,7 +5311,7 @@ var va = async (r, e, t, o, n) => {
5311
5311
  );
5312
5312
  }
5313
5313
  if (n) {
5314
- const c = await Ze(t, [a]);
5314
+ const c = await Je(t, [a]);
5315
5315
  if (c.type === "FAILED") {
5316
5316
  return {
5317
5317
  status: "FAILED",
@@ -5343,7 +5343,7 @@ var va = async (r, e, t, o, n) => {
5343
5343
  transactions: s
5344
5344
  };
5345
5345
  };
5346
- var Na = async (r, e, t) => {
5346
+ var _a = async (r, e, t) => {
5347
5347
  try {
5348
5348
  const o = await e.getSigner();
5349
5349
  const n = await o.getAddress();
@@ -5389,15 +5389,15 @@ var Na = async (r, e, t) => {
5389
5389
  );
5390
5390
  }
5391
5391
  };
5392
- var Yr = async (r, e, t, o = {
5392
+ var Zr = async (r, e, t, o = {
5393
5393
  waitFulfillmentSettlements: true,
5394
5394
  useGaslessCancel: false
5395
5395
  }) => {
5396
- const n = se(r);
5396
+ const n = ce(r);
5397
5397
  if (o.useGaslessCancel) {
5398
- return await Na(n, e, t);
5398
+ return await _a(n, e, t);
5399
5399
  }
5400
- return await va(
5400
+ return await Na(
5401
5401
  r,
5402
5402
  n,
5403
5403
  e,
@@ -5407,13 +5407,13 @@ var Yr = async (r, e, t, o = {
5407
5407
  };
5408
5408
 
5409
5409
  // src/smartCheckout/itemRequirements/itemRequirements.ts
5410
- import { parseUnits as $r } from "ethers";
5411
- async function Xr(r, e) {
5410
+ import { parseUnits as Jr } from "ethers";
5411
+ async function Yr(r, e) {
5412
5412
  const t = [];
5413
5413
  e.forEach((a) => {
5414
5414
  if (a.type === "ERC20") {
5415
5415
  const { tokenAddress: i } = a;
5416
- t.push(ir(i, W, r).decimals());
5416
+ t.push(nr(i, W, r).decimals());
5417
5417
  }
5418
5418
  });
5419
5419
  const o = await Promise.all(t);
@@ -5421,13 +5421,13 @@ async function Xr(r, e) {
5421
5421
  if (a.type === "NATIVE") {
5422
5422
  return {
5423
5423
  ...a,
5424
- amount: $r(a.amount, 18)
5424
+ amount: Jr(a.amount, 18)
5425
5425
  };
5426
5426
  }
5427
5427
  if (a.type === "ERC20") {
5428
5428
  return {
5429
5429
  ...a,
5430
- amount: $r(a.amount, o[i])
5430
+ amount: Jr(a.amount, o[i])
5431
5431
  };
5432
5432
  }
5433
5433
  return a;
@@ -5436,26 +5436,26 @@ async function Xr(r, e) {
5436
5436
  }
5437
5437
 
5438
5438
  // src/smartCheckout/sell/sell.ts
5439
- import { Contract as Oa, parseUnits as xa } from "ethers";
5439
+ import { Contract as xa, parseUnits as Ba } from "ethers";
5440
5440
  import {
5441
- constants as Ba
5441
+ constants as Ma
5442
5442
  } from "@imtbl/orderbook";
5443
- import { track as Ma } from "@imtbl/metrics";
5444
- var ba = (r, e, t) => ({
5443
+ import { track as ba } from "@imtbl/metrics";
5444
+ var La = (r, e, t) => ({
5445
5445
  type: "ERC721",
5446
5446
  id: r,
5447
5447
  contractAddress: e,
5448
5448
  spenderAddress: t
5449
5449
  });
5450
- var La = (r, e, t, o) => ({
5450
+ var Da = (r, e, t, o) => ({
5451
5451
  type: "ERC1155",
5452
5452
  id: r,
5453
5453
  contractAddress: e,
5454
5454
  spenderAddress: t,
5455
5455
  amount: BigInt(o)
5456
5456
  });
5457
- var Da = (r, e = 18) => {
5458
- const t = xa(r.amount, e);
5457
+ var Wa = (r, e = 18) => {
5458
+ const t = Ba(r.amount, e);
5459
5459
  if (r.type === "NATIVE") {
5460
5460
  return {
5461
5461
  type: "NATIVE",
@@ -5468,11 +5468,11 @@ var Da = (r, e = 18) => {
5468
5468
  contractAddress: r.tokenAddress
5469
5469
  };
5470
5470
  };
5471
- var eo = async (r, e, t) => {
5471
+ var $r = async (r, e, t) => {
5472
5472
  let o;
5473
5473
  let n;
5474
5474
  let a = "";
5475
- Ma("checkout_sdk", "sell_initiated");
5475
+ ba("checkout_sdk", "sell_initiated");
5476
5476
  if (t.length === 0) {
5477
5477
  throw new u(
5478
5478
  "No orders were provided to the orders array. Please provide at least one order.",
@@ -5487,7 +5487,7 @@ var eo = async (r, e, t) => {
5487
5487
  } = t[0];
5488
5488
  let m = 18;
5489
5489
  if (i.type === "ERC20") {
5490
- const E = new Oa(
5490
+ const E = new xa(
5491
5491
  i.tokenAddress,
5492
5492
  JSON.stringify(W),
5493
5493
  e
@@ -5498,7 +5498,7 @@ var eo = async (r, e, t) => {
5498
5498
  E.decimals()
5499
5499
  );
5500
5500
  }
5501
- const g = Da(i, m);
5501
+ const g = Wa(i, m);
5502
5502
  const f = "type" in s;
5503
5503
  try {
5504
5504
  const E = await k(
@@ -5506,7 +5506,7 @@ var eo = async (r, e, t) => {
5506
5506
  "Time to get the address from the provider",
5507
5507
  (await e.getSigner()).getAddress()
5508
5508
  );
5509
- o = se(r);
5509
+ o = ce(r);
5510
5510
  const { seaportContractAddress: T } = o.config();
5511
5511
  a = T;
5512
5512
  const y = f && s.type === "ERC1155" ? {
@@ -5542,7 +5542,7 @@ var eo = async (r, e, t) => {
5542
5542
  }
5543
5543
  const R = [];
5544
5544
  if (f && s.type === "ERC1155") {
5545
- const E = La(
5545
+ const E = Da(
5546
5546
  s.id,
5547
5547
  s.collectionAddress,
5548
5548
  a,
@@ -5550,15 +5550,15 @@ var eo = async (r, e, t) => {
5550
5550
  );
5551
5551
  R.push(E);
5552
5552
  } else {
5553
- const E = ba(s.id, s.collectionAddress, a);
5553
+ const E = La(s.id, s.collectionAddress, a);
5554
5554
  R.push(E);
5555
5555
  }
5556
5556
  let C;
5557
- if (!yt(e)) {
5557
+ if (!At(e)) {
5558
5558
  C = await k(
5559
5559
  r,
5560
5560
  "Total time running smart checkout",
5561
- de(
5561
+ le(
5562
5562
  r,
5563
5563
  e,
5564
5564
  R,
@@ -5566,7 +5566,7 @@ var eo = async (r, e, t) => {
5566
5566
  type: "GAS",
5567
5567
  gasToken: {
5568
5568
  type: "NATIVE",
5569
- limit: BigInt(Ba.estimatedFulfillmentGasGwei)
5569
+ limit: BigInt(Ma.estimatedFulfillmentGasGwei)
5570
5570
  }
5571
5571
  }
5572
5572
  )
@@ -5575,8 +5575,8 @@ var eo = async (r, e, t) => {
5575
5575
  C = { sufficient: true, transactionRequirements: [] };
5576
5576
  }
5577
5577
  if (C.sufficient) {
5578
- const E = await Hr(n.actions);
5579
- const T = await Qe(e, E.approvalTransactions);
5578
+ const E = await Vr(n.actions);
5579
+ const T = await Ze(e, E.approvalTransactions);
5580
5580
  if (T.type === "FAILED") {
5581
5581
  return {
5582
5582
  status: "FAILED",
@@ -5585,7 +5585,7 @@ var eo = async (r, e, t) => {
5585
5585
  smartCheckoutResult: C
5586
5586
  };
5587
5587
  }
5588
- const y = Qr(
5588
+ const y = Hr(
5589
5589
  n.orderHash,
5590
5590
  n.orderComponents,
5591
5591
  n.actions
@@ -5600,11 +5600,11 @@ var eo = async (r, e, t) => {
5600
5600
  }
5601
5601
  );
5602
5602
  }
5603
- const I = await Kr(
5603
+ const I = await jr(
5604
5604
  e,
5605
5605
  y
5606
5606
  );
5607
- let w = "";
5607
+ let P = "";
5608
5608
  const v = {
5609
5609
  orderComponents: I.orderComponents,
5610
5610
  orderHash: I.orderHash,
@@ -5612,9 +5612,9 @@ var eo = async (r, e, t) => {
5612
5612
  makerFees: []
5613
5613
  };
5614
5614
  if (c !== void 0) {
5615
- let _ = BigInt(1);
5616
- if (f && s.type === "ERC1155") _ = BigInt(s.amount);
5617
- const Q = Xe(c, g.amount, m, _);
5615
+ let O = BigInt(1);
5616
+ if (f && s.type === "ERC1155") O = BigInt(s.amount);
5617
+ const Q = et(c, g.amount, m, O);
5618
5618
  if (Q.length !== c.length) {
5619
5619
  throw new u(
5620
5620
  "One of the fees is too small, must be greater than 0.000001",
@@ -5624,14 +5624,14 @@ var eo = async (r, e, t) => {
5624
5624
  v.makerFees = Q;
5625
5625
  }
5626
5626
  try {
5627
- const _ = await o.createListing(v);
5628
- w = _.result.id;
5629
- } catch (_) {
5627
+ const O = await o.createListing(v);
5628
+ P = O.result.id;
5629
+ } catch (O) {
5630
5630
  throw new u(
5631
5631
  "An error occurred while creating the listing",
5632
5632
  "CREATE_ORDER_LISTING_ERROR",
5633
5633
  {
5634
- error: _,
5634
+ error: O,
5635
5635
  collectionId: s.id,
5636
5636
  collectionAddress: s.collectionAddress
5637
5637
  }
@@ -5639,7 +5639,7 @@ var eo = async (r, e, t) => {
5639
5639
  }
5640
5640
  return {
5641
5641
  status: "SUCCESS",
5642
- orderIds: [w],
5642
+ orderIds: [P],
5643
5643
  smartCheckoutResult: C
5644
5644
  };
5645
5645
  }
@@ -5650,8 +5650,8 @@ var eo = async (r, e, t) => {
5650
5650
  };
5651
5651
 
5652
5652
  // src/swap/swap.ts
5653
- import { parseUnits as to } from "ethers";
5654
- var Nt = async (r, e, t, o, n, a, i, s, c) => {
5653
+ import { parseUnits as Xr } from "ethers";
5654
+ var _t = async (r, e, t, o, n, a, i, s, c) => {
5655
5655
  if (!t.address || t.decimals === 0) {
5656
5656
  throw new u(
5657
5657
  "fromToken address or decimals is missing.",
@@ -5676,15 +5676,15 @@ var Nt = async (r, e, t, o, n, a, i, s, c) => {
5676
5676
  "MISSING_PARAMS"
5677
5677
  );
5678
5678
  }
5679
- const p = P(r);
5680
- const m = await ie(p, r);
5679
+ const p = w(r);
5680
+ const m = await se(p, r);
5681
5681
  const g = await (await e.getSigner()).getAddress();
5682
5682
  if (n) {
5683
5683
  return m.getUnsignedSwapTxFromAmountIn(
5684
5684
  g,
5685
5685
  t.address,
5686
5686
  o.address,
5687
- BigInt(to(n, t.decimals)),
5687
+ BigInt(Xr(n, t.decimals)),
5688
5688
  i,
5689
5689
  s,
5690
5690
  c
@@ -5694,14 +5694,14 @@ var Nt = async (r, e, t, o, n, a, i, s, c) => {
5694
5694
  g,
5695
5695
  t.address,
5696
5696
  o.address,
5697
- BigInt(to(a, o.decimals)),
5697
+ BigInt(Xr(a, o.decimals)),
5698
5698
  i,
5699
5699
  s,
5700
5700
  c
5701
5701
  );
5702
5702
  };
5703
- var ro = async (r, e, t, o, n, a, i, s, c) => {
5704
- const p = await Nt(
5703
+ var eo = async (r, e, t, o, n, a, i, s, c) => {
5704
+ const p = await _t(
5705
5705
  r,
5706
5706
  e,
5707
5707
  t,
@@ -5738,10 +5738,10 @@ var ro = async (r, e, t, o, n, a, i, s, c) => {
5738
5738
  };
5739
5739
 
5740
5740
  // src/wallet/wallet.ts
5741
- async function oo(r) {
5741
+ async function to(r) {
5742
5742
  const e = [];
5743
5743
  const t = r.exclude?.map((n) => n.walletProviderName) ?? [];
5744
- let o = Object.values(ge);
5744
+ let o = Object.values(fe);
5745
5745
  if (t.length !== 0) {
5746
5746
  o = o.filter((n) => !t.includes(n));
5747
5747
  }
@@ -5756,8 +5756,8 @@ async function oo(r) {
5756
5756
  }
5757
5757
 
5758
5758
  // src/riskAssessment/riskAssessment.ts
5759
- import Ga from "axios";
5760
- var _t = async (r, e) => {
5759
+ import qa from "axios";
5760
+ var Ot = async (r, e) => {
5761
5761
  const t = Object.fromEntries(
5762
5762
  r.map((n) => [n.toLowerCase(), { sanctioned: false }])
5763
5763
  );
@@ -5767,7 +5767,7 @@ var _t = async (r, e) => {
5767
5767
  }
5768
5768
  try {
5769
5769
  const n = o?.levels.map((i) => i.toLowerCase()) ?? [];
5770
- const a = await Ga.post(
5770
+ const a = await qa.post(
5771
5771
  `${q[e.environment]}/v1/sanctions/check`,
5772
5772
  {
5773
5773
  addresses: r
@@ -5784,7 +5784,7 @@ var _t = async (r, e) => {
5784
5784
  return t;
5785
5785
  }
5786
5786
  };
5787
- var Ot = (r, e) => {
5787
+ var xt = (r, e) => {
5788
5788
  if (e) {
5789
5789
  return r[e.toLowerCase()].sanctioned;
5790
5790
  }
@@ -5792,13 +5792,13 @@ var Ot = (r, e) => {
5792
5792
  };
5793
5793
 
5794
5794
  // src/sdk.ts
5795
- var ja = {
5795
+ var Va = {
5796
5796
  baseConfig: {
5797
- environment: qa.SANDBOX
5797
+ environment: ja.SANDBOX
5798
5798
  },
5799
5799
  passport: void 0
5800
5800
  };
5801
- var xt = class {
5801
+ var Bt = class {
5802
5802
  readOnlyProviders;
5803
5803
  httpClient;
5804
5804
  config;
@@ -5809,12 +5809,12 @@ var xt = 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 = ja) {
5813
- this.httpClient = new pe(e);
5814
- this.config = new he(e, this.httpClient);
5815
- this.fiatRampService = new Be(this.config);
5812
+ constructor(e = Va) {
5813
+ this.httpClient = new ue(e);
5814
+ this.config = new ye(e, this.httpClient);
5815
+ this.fiatRampService = new Me(this.config);
5816
5816
  this.readOnlyProviders = /* @__PURE__ */ new Map();
5817
- this.availability = ve(
5817
+ this.availability = Ne(
5818
5818
  this.config.isDevelopment,
5819
5819
  this.config.isProduction
5820
5820
  );
@@ -5830,9 +5830,9 @@ var xt = class {
5830
5830
  */
5831
5831
  async widgets(e) {
5832
5832
  const t = this;
5833
- const o = ue();
5833
+ const o = me();
5834
5834
  try {
5835
- const n = `https://cdn.jsdelivr.net/npm/@imtbl/checkout-widgets@${ue()}/dist/browser/index.js`;
5835
+ const n = `https://cdn.jsdelivr.net/npm/@imtbl/checkout-widgets@${me()}/dist/browser/index.js`;
5836
5836
  const a = await import(
5837
5837
  /* webpackIgnore: true */
5838
5838
  n
@@ -5855,7 +5855,7 @@ var xt = class {
5855
5855
  * @returns {Promise<CreateProviderResult>} A promise that resolves to the created provider.
5856
5856
  */
5857
5857
  async createProvider(e) {
5858
- return await dr(
5858
+ return await sr(
5859
5859
  e.walletProviderName,
5860
5860
  this.passport
5861
5861
  );
@@ -5904,7 +5904,7 @@ var xt = class {
5904
5904
  allowUnsupportedProvider: true
5905
5905
  }
5906
5906
  );
5907
- return er(t);
5907
+ return $t(t);
5908
5908
  }
5909
5909
  /**
5910
5910
  * Fetches the risk assessment for the given addresses.
@@ -5912,7 +5912,7 @@ var xt = 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 _t(e, this.config);
5915
+ return await Ot(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 xt = class {
5921
5921
  * @returns {boolean} - Result of the check.
5922
5922
  */
5923
5923
  checkIsAddressSanctioned(e, t) {
5924
- return Ot(e, t);
5924
+ return xt(e, t);
5925
5925
  }
5926
5926
  /**
5927
5927
  * Connects to a blockchain network using the specified provider.
@@ -5938,10 +5938,10 @@ var xt = class {
5938
5938
  allowMistmatchedChainId: true
5939
5939
  }
5940
5940
  );
5941
- if (e.requestWalletPermissions && !wt(t)) {
5942
- await rr(t);
5941
+ if (e.requestWalletPermissions && !St(t)) {
5942
+ await er(t);
5943
5943
  } else {
5944
- await tr(t);
5944
+ await Xt(t);
5945
5945
  }
5946
5946
  return t;
5947
5947
  }
@@ -5960,7 +5960,7 @@ var xt = class {
5960
5960
  allowMistmatchedChainId: true
5961
5961
  }
5962
5962
  );
5963
- const o = await ct(
5963
+ const o = await dt(
5964
5964
  this.config.networkMap,
5965
5965
  t,
5966
5966
  e.chainId
@@ -5981,7 +5981,7 @@ var xt = class {
5981
5981
  allowMistmatchedChainId: true
5982
5982
  }
5983
5983
  );
5984
- const o = await Kt(
5984
+ const o = await Ht(
5985
5985
  this.config,
5986
5986
  t,
5987
5987
  e.chainId
@@ -5995,7 +5995,7 @@ var xt = 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 xe(e.provider, e.tokenAddress);
5998
+ return await Be(e.provider, e.tokenAddress);
5999
5999
  }
6000
6000
  /**
6001
6001
  * Retrieves the balance of a wallet address.
@@ -6008,13 +6008,13 @@ var xt = class {
6008
6008
  e.provider
6009
6009
  );
6010
6010
  if (!e.tokenAddress || e.tokenAddress === "") {
6011
- return await gt(
6011
+ return await ft(
6012
6012
  this.config,
6013
6013
  t,
6014
6014
  e.walletAddress
6015
6015
  );
6016
6016
  }
6017
- return await ft(
6017
+ return await Et(
6018
6018
  t,
6019
6019
  e.walletAddress,
6020
6020
  e.tokenAddress
@@ -6056,7 +6056,7 @@ var xt = 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 oo(e);
6059
+ return await to(e);
6060
6060
  }
6061
6061
  /**
6062
6062
  * Sends a transaction using the specified provider and transaction parameters.
@@ -6092,7 +6092,7 @@ var xt = class {
6092
6092
  try {
6093
6093
  return await t(o);
6094
6094
  } catch (n) {
6095
- throw St(n);
6095
+ throw kt(n);
6096
6096
  }
6097
6097
  }
6098
6098
  /**
@@ -6109,7 +6109,7 @@ var xt = class {
6109
6109
  allowMistmatchedChainId: true
6110
6110
  }
6111
6111
  );
6112
- return await Ie(this.config, t);
6112
+ return await he(this.config, t);
6113
6113
  }
6114
6114
  /**
6115
6115
  * Determines the requirements for performing a buy.
@@ -6128,7 +6128,7 @@ var xt = class {
6128
6128
  this.config,
6129
6129
  e.provider
6130
6130
  );
6131
- return await Jr(
6131
+ return await Qr(
6132
6132
  this.config,
6133
6133
  t,
6134
6134
  e.orders,
@@ -6154,7 +6154,7 @@ var xt = class {
6154
6154
  this.config,
6155
6155
  e.provider
6156
6156
  );
6157
- return await eo(this.config, t, e.orders);
6157
+ return await $r(this.config, t, e.orders);
6158
6158
  }
6159
6159
  /**
6160
6160
  * Cancels a sell.
@@ -6170,7 +6170,7 @@ var xt = class {
6170
6170
  this.config,
6171
6171
  e.provider
6172
6172
  );
6173
- return await Yr(
6173
+ return await Zr(
6174
6174
  this.config,
6175
6175
  t,
6176
6176
  e.orderIds,
@@ -6196,7 +6196,7 @@ var xt = class {
6196
6196
  );
6197
6197
  let o = [];
6198
6198
  try {
6199
- o = await Xr(
6199
+ o = await Yr(
6200
6200
  t,
6201
6201
  e.itemRequirements
6202
6202
  );
@@ -6207,7 +6207,7 @@ var xt = class {
6207
6207
  { error: n }
6208
6208
  );
6209
6209
  }
6210
- return await de(
6210
+ return await le(
6211
6211
  this.config,
6212
6212
  t,
6213
6213
  o,
@@ -6224,7 +6224,7 @@ var xt = class {
6224
6224
  * @returns {boolean} - True if the object is a WrappedBrowserProvider, false otherwise.
6225
6225
  */
6226
6226
  static isWrappedBrowserProvider(e) {
6227
- return lr(e);
6227
+ return cr(e);
6228
6228
  }
6229
6229
  /**
6230
6230
  * Estimates the gas required for a swap or bridge transaction.
@@ -6232,11 +6232,11 @@ var xt = 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 We(
6235
+ this.readOnlyProviders = await Fe(
6236
6236
  this.config,
6237
6237
  this.readOnlyProviders
6238
6238
  );
6239
- return await cr(
6239
+ return await ir(
6240
6240
  e,
6241
6241
  this.readOnlyProviders,
6242
6242
  this.config
@@ -6301,7 +6301,7 @@ var xt = class {
6301
6301
  this.config,
6302
6302
  e.provider
6303
6303
  );
6304
- return ro(
6304
+ return eo(
6305
6305
  this.config,
6306
6306
  t,
6307
6307
  e.fromToken,
@@ -6323,7 +6323,7 @@ var xt = class {
6323
6323
  this.config,
6324
6324
  e.provider
6325
6325
  );
6326
- return Nt(
6326
+ return _t(
6327
6327
  this.config,
6328
6328
  t,
6329
6329
  e.fromToken,
@@ -6338,7 +6338,7 @@ var xt = class {
6338
6338
  };
6339
6339
 
6340
6340
  // src/blockExplorer/blockExplorer.ts
6341
- var et = class {
6341
+ var tt = class {
6342
6342
  /**
6343
6343
  * Returns the link to the transaction on Blockscout.
6344
6344
  * @param {ChainId} chainId - The chain ID of the network
@@ -6352,59 +6352,59 @@ var et = class {
6352
6352
  }
6353
6353
  };
6354
6354
  export {
6355
- To as AddTokensEventType,
6356
- et as BlockExplorerService,
6357
- uo as BridgeEventType,
6358
- Y as ChainId,
6359
- ot as ChainName,
6360
- Ae as ChainSlug,
6361
- xt as Checkout,
6362
- he as CheckoutConfiguration,
6355
+ Ro as AddTokensEventType,
6356
+ tt as BlockExplorerService,
6357
+ lo as BridgeEventType,
6358
+ J as ChainId,
6359
+ nt as ChainName,
6360
+ we as ChainSlug,
6361
+ Bt as Checkout,
6362
+ ye as CheckoutConfiguration,
6363
6363
  u as CheckoutError,
6364
6364
  S as CheckoutErrorType,
6365
- fe as CheckoutStatus,
6366
- fo as CommerceEventType,
6367
- Ro as CommerceFailureEventType,
6368
- wo as CommerceFlowType,
6369
- Eo as CommerceSuccessEventType,
6370
- Co as CommerceUserActionEventType,
6371
- io as ConnectEventType,
6372
- Ao as ConnectTargetLayer,
6373
- jt as ExchangeType,
6374
- Ne as FeeType,
6375
- Ce as FundingStepType,
6376
- it as GasEstimateType,
6377
- Re as GasTokenType,
6365
+ Ee as CheckoutStatus,
6366
+ mo as CommerceEventType,
6367
+ fo as CommerceFailureEventType,
6368
+ Ao as CommerceFlowType,
6369
+ go as CommerceSuccessEventType,
6370
+ Eo as CommerceUserActionEventType,
6371
+ no as ConnectEventType,
6372
+ ho as ConnectTargetLayer,
6373
+ Vt as ExchangeType,
6374
+ _e as FeeType,
6375
+ Te as FundingStepType,
6376
+ st as GasEstimateType,
6377
+ Ce as GasTokenType,
6378
6378
  q as IMMUTABLE_API_BASE_URL,
6379
- no as IMTBLWidgetEvents,
6379
+ ro as IMTBLWidgetEvents,
6380
6380
  M as ItemType,
6381
- me as NetworkFilterTypes,
6382
- go as OnRampEventType,
6383
- mo as OrchestrationEventType,
6384
- ao as ProviderEventType,
6385
- Io as PurchaseEventType,
6386
- st as RoutingOutcomeType,
6387
- lo as SaleEventType,
6388
- po as SalePaymentTypes,
6389
- Po as SwapDirection,
6390
- co as SwapEventType,
6381
+ ge as NetworkFilterTypes,
6382
+ uo as OnRampEventType,
6383
+ po as OrchestrationEventType,
6384
+ oo as ProviderEventType,
6385
+ Co as PurchaseEventType,
6386
+ ct as RoutingOutcomeType,
6387
+ so as SaleEventType,
6388
+ co as SalePaymentTypes,
6389
+ yo as SwapDirection,
6390
+ io as SwapEventType,
6391
6391
  ae as TokenFilterTypes,
6392
- Ee as TransactionOrGasType,
6393
- ho as TransferEventType,
6394
- so as WalletEventType,
6395
- Ut as WalletFilterTypes,
6396
- ge as WalletProviderName,
6397
- Gt as WalletProviderRdns,
6398
- So as WidgetTheme,
6399
- yo as WidgetType,
6392
+ Re as TransactionOrGasType,
6393
+ To as TransferEventType,
6394
+ ao as WalletEventType,
6395
+ Gt as WalletFilterTypes,
6396
+ fe as WalletProviderName,
6397
+ qt as WalletProviderRdns,
6398
+ wo as WidgetTheme,
6399
+ Io as WidgetType,
6400
6400
  D as WrappedBrowserProvider,
6401
- _t as fetchRiskAssessment,
6402
- Rt as getGasPriceInWei,
6403
- mn as getMetaMaskProviderDetail,
6404
- un as getPassportProviderDetail,
6405
- Te as getUnderlyingChainId,
6406
- Ot as isAddressSanctioned,
6407
- Le as metaMaskProviderInfo,
6408
- De as passportProviderInfo,
6401
+ Ot as fetchRiskAssessment,
6402
+ Ct as getGasPriceInWei,
6403
+ gn as getMetaMaskProviderDetail,
6404
+ mn as getPassportProviderDetail,
6405
+ Ie as getUnderlyingChainId,
6406
+ xt as isAddressSanctioned,
6407
+ De as metaMaskProviderInfo,
6408
+ We as passportProviderInfo,
6409
6409
  b as validateProvider
6410
6410
  };