@imtbl/sdk 0.1.4-alpha → 0.1.6-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10,6 +10,8 @@ import { parseUnits } from '@ethersproject/units';
10
10
  import { BigNumber } from '@ethersproject/bignumber';
11
11
  import detectEthereumProvider from '@metamask/detect-provider';
12
12
  import { Web3Provider } from '@ethersproject/providers';
13
+ import { jsx } from 'react/jsx-runtime';
14
+ import 'react';
13
15
 
14
16
  var Environment;
15
17
  (function (Environment) {
@@ -25,26 +27,26 @@ class ImmutableConfiguration {
25
27
  }
26
28
  }
27
29
 
28
- // Set `sdkVersion` on config
29
- const PRODUCTION = () => {
30
- return Config.createConfig({
31
- basePath: 'https://api.x.immutable.com',
32
- chainID: 1,
33
- coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
34
- registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
35
- sdkVersion: 'ts-immutable-sdk-0.1.4-alpha',
36
- });
37
- };
38
- // Set `sdkVersion` on config
39
- const SANDBOX = () => {
40
- return Config.createConfig({
41
- basePath: 'https://api.sandbox.x.immutable.com',
42
- chainID: 5,
43
- coreContractAddress: '0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623',
44
- registrationContractAddress: '0x1C97Ada273C9A52253f463042f29117090Cd7D83',
45
- sdkVersion: 'ts-immutable-sdk-0.1.4-alpha',
46
- });
47
- };
30
+ /**
31
+ * Set `sdkVersion` on config
32
+ */
33
+ const production = () => Config.createConfig({
34
+ basePath: 'https://api.x.immutable.com',
35
+ chainID: 1,
36
+ coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
37
+ registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
38
+ sdkVersion: 'ts-immutable-sdk-0.1.6-alpha',
39
+ });
40
+ /**
41
+ * Set `sdkVersion` on config
42
+ */
43
+ const sandbox = () => Config.createConfig({
44
+ basePath: 'https://api.sandbox.x.immutable.com',
45
+ chainID: 5,
46
+ coreContractAddress: '0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623',
47
+ registrationContractAddress: '0x1C97Ada273C9A52253f463042f29117090Cd7D83',
48
+ sdkVersion: 'ts-immutable-sdk-0.1.6-alpha',
49
+ });
48
50
  class ImxConfiguration {
49
51
  immutableXConfig;
50
52
  baseConfig;
@@ -56,13 +58,16 @@ class ImxConfiguration {
56
58
  else {
57
59
  switch (baseConfig.environment) {
58
60
  case Environment.SANDBOX: {
59
- this.immutableXConfig = SANDBOX();
61
+ this.immutableXConfig = sandbox();
60
62
  break;
61
63
  }
62
64
  case Environment.PRODUCTION: {
63
- this.immutableXConfig = PRODUCTION();
65
+ this.immutableXConfig = production();
64
66
  break;
65
67
  }
68
+ default: {
69
+ this.immutableXConfig = sandbox();
70
+ }
66
71
  }
67
72
  }
68
73
  }
@@ -117,7 +122,7 @@ class ImmutableXClient {
117
122
  }
118
123
  /**
119
124
  * Get a list of Deposits
120
- * @param request - optional request object containing the parameters to be provided in the API request
125
+ * @param request - optional object containing the parameters to be provided in the API request
121
126
  * @returns a promise that resolves with the requested list of Deposits
122
127
  * @throws {@link index.IMXError}
123
128
  */
@@ -144,7 +149,7 @@ class ImmutableXClient {
144
149
  }
145
150
  /**
146
151
  * Get a list of Assets
147
- * @param request - optional request object containing the parameters to be provided in the API request
152
+ * @param request - optional object containing the parameters to be provided in the API request
148
153
  * @returns a promise that resolves with the requested list of Assets
149
154
  * @throws {@link index.IMXError}
150
155
  */
@@ -181,7 +186,7 @@ class ImmutableXClient {
181
186
  }
182
187
  /**
183
188
  * Get a list of Collections
184
- * @param request - optional request object containing the parameters to be provided in the API request
189
+ * @param request - optional object containing the parameters to be provided in the API request
185
190
  * @returns a promise that resolves with the requested list of Collections
186
191
  * @throws {@link index.IMXError}
187
192
  */
@@ -337,7 +342,7 @@ class ImmutableXClient {
337
342
  }
338
343
  /**
339
344
  * Get a list of Mints
340
- * @param request optional request object containing the parameters to be provided in the API request
345
+ * @param request optional object containing the parameters to be provided in the API request
341
346
  * @returns a promise that resolves with the requested list of Mints
342
347
  * @throws {@link index.IMXError}
343
348
  */
@@ -356,7 +361,7 @@ class ImmutableXClient {
356
361
  }
357
362
  /**
358
363
  * Get a list of Withdrawals
359
- * @param request - optional request object containing the parameters to be provided in the API request
364
+ * @param request - optional object containing the parameters to be provided in the API request
360
365
  * @returns a promise that resolves with the requested list of Withdrawals
361
366
  * @throws {@link index.IMXError}
362
367
  */
@@ -383,7 +388,7 @@ class ImmutableXClient {
383
388
  }
384
389
  /**
385
390
  * Get a list of Orders
386
- * @param request - optional request object containing the parameters to be provided in the API request
391
+ * @param request - optional object containing the parameters to be provided in the API request
387
392
  * @returns a promise that resolves with the requested list of Orders
388
393
  * @throws {@link index.IMXError}
389
394
  */
@@ -401,7 +406,7 @@ class ImmutableXClient {
401
406
  }
402
407
  /**
403
408
  * Get a list of Trades
404
- * @param request - optional request object containing the parameters to be provided in the API request
409
+ * @param request - optional object containing the parameters to be provided in the API request
405
410
  * @returns a promise that resolves with the requested list of Trades
406
411
  * @throws {@link index.IMXError}
407
412
  */
@@ -419,7 +424,7 @@ class ImmutableXClient {
419
424
  }
420
425
  /**
421
426
  * Get a list of Tokens
422
- * @param request - optional request object containing the parameters to be provided in the API request
427
+ * @param request - optional object containing the parameters to be provided in the API request
423
428
  * @returns a promise that resolves with the requested list of Tokens
424
429
  * @throws {@link index.IMXError}
425
430
  */
@@ -437,7 +442,7 @@ class ImmutableXClient {
437
442
  }
438
443
  /**
439
444
  * Get a list of Transfers
440
- * @param request - optional request object containing the parameters to be provided in the API request
445
+ * @param request - optional object containing the parameters to be provided in the API request
441
446
  * @returns a promise that resolves with the requested list of Transfers
442
447
  * @throws {@link index.IMXError}
443
448
  */
@@ -658,9 +663,9 @@ const getAuthConfiguration = ({ oidcConfiguration, authenticationDomain, }) => {
658
663
  authorization_endpoint: `${authenticationDomain}/authorize`,
659
664
  token_endpoint: `${authenticationDomain}/oauth/token`,
660
665
  userinfo_endpoint: `${authenticationDomain}/userinfo`,
661
- end_session_endpoint: `${authenticationDomain}/v2/logout` +
662
- `?returnTo=${encodeURIComponent(oidcConfiguration.logoutRedirectUri)}` +
663
- `&client_id=${oidcConfiguration.clientId}`,
666
+ end_session_endpoint: `${authenticationDomain}/v2/logout`
667
+ + `?returnTo=${encodeURIComponent(oidcConfiguration.logoutRedirectUri)}`
668
+ + `&client_id=${oidcConfiguration.clientId}`,
664
669
  },
665
670
  mergeClaims: true,
666
671
  loadUserInfo: true,
@@ -680,7 +685,7 @@ class AuthManager {
680
685
  this.config = config;
681
686
  this.userManager = new UserManager(getAuthConfiguration(config));
682
687
  }
683
- mapOidcUserToDomainModel = (oidcUser) => {
688
+ static mapOidcUserToDomainModel = (oidcUser) => {
684
689
  const passport = oidcUser.profile?.passport;
685
690
  return {
686
691
  expired: oidcUser.expired,
@@ -701,7 +706,7 @@ class AuthManager {
701
706
  const oidcUser = await this.userManager.signinPopup({
702
707
  popupWindowFeatures,
703
708
  });
704
- return this.mapOidcUserToDomainModel(oidcUser);
709
+ return AuthManager.mapOidcUserToDomainModel(oidcUser);
705
710
  }, PassportErrorType.AUTHENTICATION_ERROR);
706
711
  }
707
712
  async loginCallback() {
@@ -720,7 +725,7 @@ class AuthManager {
720
725
  if (!oidcUser) {
721
726
  return null;
722
727
  }
723
- return this.mapOidcUserToDomainModel(oidcUser);
728
+ return AuthManager.mapOidcUserToDomainModel(oidcUser);
724
729
  }, PassportErrorType.SILENT_LOGIN_ERROR);
725
730
  }
726
731
  async getUser() {
@@ -729,7 +734,7 @@ class AuthManager {
729
734
  if (!oidcUser) {
730
735
  return null;
731
736
  }
732
- return this.mapOidcUserToDomainModel(oidcUser);
737
+ return AuthManager.mapOidcUserToDomainModel(oidcUser);
733
738
  }, PassportErrorType.NOT_LOGGED_IN_ERROR);
734
739
  }
735
740
  async requestRefreshTokenAfterRegistration() {
@@ -737,18 +742,18 @@ class AuthManager {
737
742
  const updatedUser = await retryWithDelay(async () => {
738
743
  const user = await this.userManager.signinSilent();
739
744
  const passportMetadata = user?.profile?.passport;
740
- const metadataExists = !!passportMetadata?.ether_key &&
741
- !!passportMetadata?.stark_key &&
742
- !!passportMetadata?.user_admin_key;
745
+ const metadataExists = !!passportMetadata?.ether_key
746
+ && !!passportMetadata?.stark_key
747
+ && !!passportMetadata?.user_admin_key;
743
748
  if (metadataExists) {
744
749
  return user;
745
750
  }
746
- return Promise.reject('user wallet addresses not exist');
751
+ return Promise.reject(new Error('user wallet addresses not exist'));
747
752
  });
748
753
  if (!updatedUser) {
749
754
  return null;
750
755
  }
751
- return this.mapOidcUserToDomainModel(updatedUser);
756
+ return AuthManager.mapOidcUserToDomainModel(updatedUser);
752
757
  }, PassportErrorType.REFRESH_TOKEN_ERROR);
753
758
  }
754
759
  }
@@ -787,12 +792,24 @@ var SendMessage;
787
792
  })(SendMessage || (SendMessage = {}));
788
793
  var TransactionTypes;
789
794
  (function (TransactionTypes) {
795
+ // TODO: remove this once the naming has been fixed
796
+ // eslint-disable-next-line @typescript-eslint/naming-convention
790
797
  TransactionTypes["CancelOrder"] = "delete:v1/orders";
798
+ // TODO: remove this once the naming has been fixed
799
+ // eslint-disable-next-line @typescript-eslint/naming-convention
791
800
  TransactionTypes["CreateOrder"] = "post:v1/orders";
801
+ // TODO: remove this once the naming has been fixed
802
+ // eslint-disable-next-line @typescript-eslint/naming-convention
792
803
  TransactionTypes["CreateTrade"] = "post:v1/trades";
804
+ // TODO: remove this once the naming has been fixed
805
+ // eslint-disable-next-line @typescript-eslint/naming-convention
793
806
  TransactionTypes["CreateTransfer"] = "post:v1/transfers";
807
+ // TODO: remove this once the naming has been fixed
808
+ // eslint-disable-next-line @typescript-eslint/naming-convention
794
809
  TransactionTypes["CreateBatchTransfer"] = "post:v2/transfers";
795
810
  })(TransactionTypes || (TransactionTypes = {}));
811
+ // TODO: remove this once the naming has been fixed
812
+ // eslint-disable-next-line @typescript-eslint/naming-convention
796
813
  const PassportEventType = 'imx_passport_confirmation';
797
814
 
798
815
  const openPopupCenter = ({ url, title, width, height, }) => {
@@ -812,10 +829,10 @@ const openPopupCenter = ({ url, title, width, height, }) => {
812
829
  return newWindow;
813
830
  };
814
831
 
815
- const ConfirmationWindowTitle = 'Confirm this transaction';
816
- const ConfirmationWindowHeight = 380;
817
- const ConfirmationWindowWidth = 480;
818
- const ConfirmationWindowClosedPollingDuration = 1000;
832
+ const CONFIRMATION_WINDOW_TITLE = 'Confirm this transaction';
833
+ const CONFIRMATION_WINDOW_HEIGHT = 380;
834
+ const CONFIRMATION_WINDOW_WIDTH = 480;
835
+ const CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION = 1000;
819
836
  class ConfirmationScreen {
820
837
  config;
821
838
  constructor(config) {
@@ -831,12 +848,14 @@ class ConfirmationScreen {
831
848
  startTransaction(accessToken, transaction, popupOptions) {
832
849
  return new Promise((resolve, reject) => {
833
850
  const messageHandler = ({ data, origin }) => {
834
- if (origin != this.config.passportDomain ||
835
- data.eventType != PassportEventType) {
851
+ if (origin !== this.config.passportDomain
852
+ || data.eventType !== PassportEventType) {
836
853
  return;
837
854
  }
838
855
  switch (data.messageType) {
839
856
  case ReceiveMessage.CONFIRMATION_WINDOW_READY: {
857
+ // TODO: remove once fixed
858
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
840
859
  this.postMessage(confirmationWindow, accessToken, {
841
860
  messageType: SendMessage.TRANSACTION_START,
842
861
  messageData: transaction,
@@ -858,87 +877,87 @@ class ConfirmationScreen {
858
877
  window.addEventListener('message', messageHandler);
859
878
  const confirmationWindow = openPopupCenter({
860
879
  url: `${this.config.passportDomain}/transaction-confirmation`,
861
- title: ConfirmationWindowTitle,
862
- width: popupOptions?.width || ConfirmationWindowWidth,
863
- height: popupOptions?.height || ConfirmationWindowHeight,
880
+ title: CONFIRMATION_WINDOW_TITLE,
881
+ width: popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
882
+ height: popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
864
883
  });
865
884
  // https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
866
- const timer = setInterval(function () {
885
+ const timer = setInterval(() => {
867
886
  if (confirmationWindow.closed) {
868
887
  clearInterval(timer);
869
888
  window.removeEventListener('message', messageHandler);
870
889
  resolve({ confirmed: false });
871
890
  }
872
- }, ConfirmationWindowClosedPollingDuration);
891
+ }, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
873
892
  });
874
893
  }
875
894
  }
876
895
 
877
896
  const ERC721$1 = 'ERC721';
878
- const transfer$1 = ({ request, transfersApi, starkSigner, user, passportConfig, }) => {
879
- return withPassportError(async () => {
880
- const transferAmount = request.type === ERC721$1 ? '1' : request.amount;
881
- const getSignableTransferRequest = {
882
- sender: user.etherKey,
883
- token: convertToSignableToken(request),
884
- amount: transferAmount,
885
- receiver: request.receiver,
886
- };
887
- const signableResult = await transfersApi.getSignableTransferV1({
888
- getSignableTransferRequest,
889
- });
890
- const confirmationScreen = new ConfirmationScreen(passportConfig);
891
- const confirmationResult = await confirmationScreen.startTransaction(user.accessToken, {
892
- transactionType: TransactionTypes.CreateTransfer,
893
- transactionData: getSignableTransferRequest,
894
- });
895
- if (!confirmationResult.confirmed) {
896
- throw new Error('Transaction rejected by user');
897
- }
898
- const signableResultData = signableResult.data;
899
- const { payload_hash: payloadHash } = signableResultData;
900
- const starkSignature = await starkSigner.signMessage(payloadHash);
901
- const senderStarkKey = await starkSigner.getAddress();
902
- const transferSigningParams = {
903
- sender_stark_key: signableResultData.sender_stark_key || senderStarkKey,
904
- sender_vault_id: signableResultData.sender_vault_id,
905
- receiver_stark_key: signableResultData.receiver_stark_key,
906
- receiver_vault_id: signableResultData.receiver_vault_id,
907
- asset_id: signableResultData.asset_id,
908
- amount: signableResultData.amount,
909
- nonce: signableResultData.nonce,
910
- expiration_timestamp: signableResultData.expiration_timestamp,
911
- stark_signature: starkSignature,
912
- };
913
- const createTransferRequest = {
914
- createTransferRequest: transferSigningParams,
915
- };
916
- const headers = {
917
- Authorization: 'Bearer ' + user.accessToken,
918
- };
919
- const { data: responseData } = await transfersApi.createTransferV1(createTransferRequest, { headers });
920
- return {
921
- sent_signature: responseData.sent_signature,
922
- status: responseData.status?.toString(),
923
- time: responseData.time,
924
- transfer_id: responseData.transfer_id,
925
- };
926
- }, PassportErrorType.TRANSFER_ERROR);
927
- };
897
+ const transfer$1 = ({ request, transfersApi, starkSigner, user, passportConfig,
898
+ // TODO: remove this eslint disable once we have a better solution
899
+ // eslint-disable-next-line max-len
900
+ }) => withPassportError(async () => {
901
+ const transferAmount = request.type === ERC721$1 ? '1' : request.amount;
902
+ const getSignableTransferRequest = {
903
+ sender: user.etherKey,
904
+ token: convertToSignableToken(request),
905
+ amount: transferAmount,
906
+ receiver: request.receiver,
907
+ };
908
+ const signableResult = await transfersApi.getSignableTransferV1({
909
+ getSignableTransferRequest,
910
+ });
911
+ const confirmationScreen = new ConfirmationScreen(passportConfig);
912
+ const confirmationResult = await confirmationScreen.startTransaction(user.accessToken, {
913
+ transactionType: TransactionTypes.CreateTransfer,
914
+ transactionData: getSignableTransferRequest,
915
+ });
916
+ if (!confirmationResult.confirmed) {
917
+ throw new Error('Transaction rejected by user');
918
+ }
919
+ const signableResultData = signableResult.data;
920
+ const { payload_hash: payloadHash } = signableResultData;
921
+ const starkSignature = await starkSigner.signMessage(payloadHash);
922
+ const senderStarkKey = await starkSigner.getAddress();
923
+ const transferSigningParams = {
924
+ sender_stark_key: signableResultData.sender_stark_key || senderStarkKey,
925
+ sender_vault_id: signableResultData.sender_vault_id,
926
+ receiver_stark_key: signableResultData.receiver_stark_key,
927
+ receiver_vault_id: signableResultData.receiver_vault_id,
928
+ asset_id: signableResultData.asset_id,
929
+ amount: signableResultData.amount,
930
+ nonce: signableResultData.nonce,
931
+ expiration_timestamp: signableResultData.expiration_timestamp,
932
+ stark_signature: starkSignature,
933
+ };
934
+ const createTransferRequest = {
935
+ createTransferRequest: transferSigningParams,
936
+ };
937
+ const headers = {
938
+ // eslint-disable-next-line @typescript-eslint/naming-convention
939
+ Authorization: `Bearer ${user.accessToken}`,
940
+ };
941
+ const { data: responseData } = await transfersApi.createTransferV1(createTransferRequest, { headers });
942
+ return {
943
+ sent_signature: responseData.sent_signature,
944
+ status: responseData.status?.toString(),
945
+ time: responseData.time,
946
+ transfer_id: responseData.transfer_id,
947
+ };
948
+ }, PassportErrorType.TRANSFER_ERROR);
928
949
  async function batchNftTransfer({ user, starkSigner, request, transfersApi, passportConfig, }) {
929
950
  return withPassportError(async () => {
930
951
  const ethAddress = user.etherKey;
931
- const signableRequests = request.map((nftTransfer) => {
932
- return {
933
- amount: '1',
934
- token: convertToSignableToken({
935
- type: ERC721$1,
936
- tokenId: nftTransfer.tokenId,
937
- tokenAddress: nftTransfer.tokenAddress,
938
- }),
939
- receiver: nftTransfer.receiver,
940
- };
941
- });
952
+ const signableRequests = request.map((nftTransfer) => ({
953
+ amount: '1',
954
+ token: convertToSignableToken({
955
+ type: ERC721$1,
956
+ tokenId: nftTransfer.tokenId,
957
+ tokenAddress: nftTransfer.tokenAddress,
958
+ }),
959
+ receiver: nftTransfer.receiver,
960
+ }));
942
961
  const getSignableTransferRequestV2 = {
943
962
  sender_ether_key: ethAddress,
944
963
  signable_requests: signableRequests,
@@ -973,7 +992,8 @@ async function batchNftTransfer({ user, starkSigner, request, transfersApi, pass
973
992
  requests,
974
993
  };
975
994
  const headers = {
976
- Authorization: 'Bearer ' + user.accessToken,
995
+ // eslint-disable-next-line @typescript-eslint/naming-convention
996
+ Authorization: `Bearer ${user.accessToken}`,
977
997
  };
978
998
  const response = await transfersApi.createTransfer({
979
999
  createTransferRequestV2: transferSigningParams,
@@ -1030,7 +1050,8 @@ async function createOrder$1({ starkSigner, user, request, ordersApi, passportCo
1030
1050
  },
1031
1051
  };
1032
1052
  const headers = {
1033
- Authorization: 'Bearer ' + user.accessToken,
1053
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1054
+ Authorization: `Bearer ${user.accessToken}`,
1034
1055
  };
1035
1056
  const createOrderResponse = await ordersApi.createOrder(orderParams, {
1036
1057
  headers,
@@ -1059,7 +1080,8 @@ async function cancelOrder$1({ user, starkSigner, request, ordersApi, passportCo
1059
1080
  const { payload_hash: payloadHash } = getSignableCancelOrderResponse.data;
1060
1081
  const starkSignature = await starkSigner.signMessage(payloadHash);
1061
1082
  const headers = {
1062
- Authorization: 'Bearer ' + user.accessToken,
1083
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1084
+ Authorization: `Bearer ${user.accessToken}`,
1063
1085
  };
1064
1086
  const cancelOrderResponse = await ordersApi.cancelOrder({
1065
1087
  id: request.order_id.toString(),
@@ -1103,7 +1125,8 @@ async function exchangeTransfer$1({ user, starkSigner, request, exchangesApi, })
1103
1125
  stark_signature: starkSignature,
1104
1126
  };
1105
1127
  const headers = {
1106
- Authorization: 'Bearer ' + user.accessToken,
1128
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1129
+ Authorization: `Bearer ${user.accessToken}`,
1107
1130
  };
1108
1131
  const response = await exchangesApi.createExchangeTransfer({
1109
1132
  id: request.transactionID,
@@ -1159,7 +1182,8 @@ async function createTrade$1({ request, tradesApi, user, starkSigner, passportCo
1159
1182
  vault_id_sell: signableResultData.vault_id_sell,
1160
1183
  },
1161
1184
  };
1162
- const headers = { Authorization: 'Bearer ' + user.accessToken };
1185
+ // eslint-disable-next-line @typescript-eslint/naming-convention
1186
+ const headers = { Authorization: `Bearer ${user.accessToken}` };
1163
1187
  const { data: createTradeResponse } = await tradesApi.createTradeV3(tradeParams, {
1164
1188
  headers,
1165
1189
  });
@@ -1187,9 +1211,13 @@ class PassportImxProvider {
1187
1211
  passportConfig: this.passportConfig,
1188
1212
  });
1189
1213
  }
1214
+ // TODO: Remove once implemented
1215
+ // eslint-disable-next-line class-methods-use-this
1190
1216
  registerOffchain() {
1191
1217
  throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
1192
1218
  }
1219
+ // TODO: Remove once implemented
1220
+ // eslint-disable-next-line class-methods-use-this
1193
1221
  isRegisteredOnchain() {
1194
1222
  throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
1195
1223
  }
@@ -1237,14 +1265,18 @@ class PassportImxProvider {
1237
1265
  exchangesApi: this.immutableXClient.exchangeApi,
1238
1266
  });
1239
1267
  }
1240
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1268
+ // TODO: Remove once implemented
1269
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
1241
1270
  deposit(deposit) {
1242
1271
  throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
1243
1272
  }
1244
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1273
+ // TODO: Remove once implemented
1274
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
1245
1275
  prepareWithdrawal(request) {
1246
1276
  throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
1247
1277
  }
1278
+ // TODO: Remove once implemented
1279
+ // eslint-disable-next-line class-methods-use-this
1248
1280
  completeWithdrawal(
1249
1281
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1250
1282
  starkPublicKey,
@@ -1307,20 +1339,21 @@ class PassportConfiguration {
1307
1339
  }
1308
1340
  else {
1309
1341
  switch (baseConfig.environment) {
1310
- case Environment.SANDBOX: {
1311
- this.network = Networks.SANDBOX;
1342
+ case Environment.PRODUCTION: {
1343
+ this.network = Networks.PRODUCTION;
1312
1344
  this.authenticationDomain = 'https://auth.immutable.com';
1313
1345
  this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
1314
1346
  this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
1315
- this.passportDomain = 'https://passport.sandbox.immutable.com';
1347
+ this.passportDomain = 'https://passport.immutable.com';
1316
1348
  break;
1317
1349
  }
1318
- case Environment.PRODUCTION: {
1319
- this.network = Networks.PRODUCTION;
1350
+ case Environment.SANDBOX:
1351
+ default: {
1352
+ this.network = Networks.SANDBOX;
1320
1353
  this.authenticationDomain = 'https://auth.immutable.com';
1321
1354
  this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
1322
1355
  this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
1323
- this.passportDomain = 'https://passport.immutable.com';
1356
+ this.passportDomain = 'https://passport.sandbox.immutable.com';
1324
1357
  break;
1325
1358
  }
1326
1359
  }
@@ -1328,12 +1361,12 @@ class PassportConfiguration {
1328
1361
  }
1329
1362
  }
1330
1363
 
1331
- const getStarkSigner = async (signer) => {
1332
- return withPassportError(async () => {
1333
- const privateKey = await generateLegacyStarkPrivateKey(signer);
1334
- return createStarkSigner(privateKey);
1335
- }, PassportErrorType.WALLET_CONNECTION_ERROR);
1336
- };
1364
+ // TODO: remove this eslint disable once we have a better solution
1365
+ // eslint-disable-next-line max-len
1366
+ const getStarkSigner = async (signer) => withPassportError(async () => {
1367
+ const privateKey = await generateLegacyStarkPrivateKey(signer);
1368
+ return createStarkSigner(privateKey);
1369
+ }, PassportErrorType.WALLET_CONNECTION_ERROR);
1337
1370
 
1338
1371
  async function registerPassport({ ethSigner, starkSigner, usersApi }, authorization) {
1339
1372
  return withPassportError(async () => {
@@ -1349,7 +1382,7 @@ async function registerPassport({ ethSigner, starkSigner, usersApi }, authorizat
1349
1382
  const ethSignature = await signRaw(signableMessage, ethSigner);
1350
1383
  const starkSignature = await starkSigner.signMessage(payloadHash);
1351
1384
  const response = await usersApi.registerPassportUser({
1352
- authorization: `Bearer ` + authorization,
1385
+ authorization: `Bearer ${authorization}`,
1353
1386
  registerPassportUserRequest: {
1354
1387
  eth_signature: ethSignature,
1355
1388
  ether_key: userAddress,
@@ -1361,6 +1394,7 @@ async function registerPassport({ ethSigner, starkSigner, usersApi }, authorizat
1361
1394
  }, PassportErrorType.USER_REGISTRATION_ERROR);
1362
1395
  }
1363
1396
 
1397
+ // TODO: Remove this once the dependency has been added
1364
1398
  class Passport {
1365
1399
  authManager;
1366
1400
  magicAdapter;
@@ -1370,11 +1404,10 @@ class Passport {
1370
1404
  this.config = new PassportConfiguration(passportModuleConfiguration);
1371
1405
  this.authManager = new AuthManager(this.config);
1372
1406
  this.magicAdapter = new MagicAdapter(this.config);
1373
- this.immutableXClient =
1374
- passportModuleConfiguration.overrides?.immutableXClient ||
1375
- new ImmutableXClient({
1376
- baseConfig: passportModuleConfiguration.baseConfig,
1377
- });
1407
+ this.immutableXClient = passportModuleConfiguration.overrides?.immutableXClient
1408
+ || new ImmutableXClient({
1409
+ baseConfig: passportModuleConfiguration.baseConfig,
1410
+ });
1378
1411
  }
1379
1412
  async getImxProvider(user) {
1380
1413
  if (!user || !user.idToken) {
@@ -2651,6 +2684,12 @@ let $4f91c5f280efe242$export$a75605c67ea83a5a;
2651
2684
  })($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
2652
2685
 
2653
2686
 
2687
+ let $090d3502d165f17d$export$c5ab8fbcabac8c11;
2688
+ (function(SupportedFiatCurrencies) {
2689
+ SupportedFiatCurrencies["USD"] = "USD";
2690
+ })($090d3502d165f17d$export$c5ab8fbcabac8c11 || ($090d3502d165f17d$export$c5ab8fbcabac8c11 = {}));
2691
+
2692
+
2654
2693
 
2655
2694
 
2656
2695
  /**
@@ -2668,6 +2707,9 @@ let $4f91c5f280efe242$export$a75605c67ea83a5a;
2668
2707
  CheckoutErrorType["PROVIDER_REQUEST_FAILED_ERROR"] = "PROVIDER_REQUEST_FAILED_ERROR";
2669
2708
  CheckoutErrorType["USER_REJECTED_REQUEST_ERROR"] = "USER_REJECTED_REQUEST_ERROR";
2670
2709
  CheckoutErrorType["TRANSACTION_ERROR"] = "TRANSACTION_ERROR";
2710
+ CheckoutErrorType["FIAT_CONVERSION_ERROR"] = "FIAT_CONVERSION_ERROR";
2711
+ CheckoutErrorType["TOKEN_NOT_SUPPORTED_ERROR"] = "TOKEN_NOT_SUPPORTED_ERROR";
2712
+ CheckoutErrorType["FIAT_CURRENCY_NOT_SUPPORTED_ERROR"] = "FIAT_CURRENCY_NOT_SUPPORTED_ERROR";
2671
2713
  })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
2672
2714
  class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
2673
2715
  constructor(message, type, data){
@@ -2884,14 +2926,22 @@ var $cda6003506e4182e$exports = {};
2884
2926
  $cda6003506e4182e$exports = JSON.parse("[{\"address\":\"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0\",\"chainId\":137,\"name\":\"Matic\",\"symbol\":\"MATIC\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"name\":\"Ethereum\",\"symbol\":\"ETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"chainId\":1,\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF\",\"chainId\":1,\"name\":\"Immutable X\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0\",\"chainId\":1,\"name\":\"Matic\",\"symbol\":\"MATIC\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"name\":\"Ethereum\",\"symbol\":\"ETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"chainId\":5,\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x1facdd0165489f373255a90304650e15481b2c85\",\"chainId\":5,\"name\":\"Immutable X\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x123456789\",\"chainId\":5,\"name\":\"Swap Coin\",\"symbol\":\"SWC\",\"decimals\":18,\"tokenFeatures\":[\"swap\",\"fakeFeature\"]},{\"address\":\"0x123456789\",\"chainId\":5,\"name\":\"Bridge Coin\",\"symbol\":\"BDC\",\"decimals\":18,\"tokenFeatures\":[\"bridge\",\"fakeFeature\"]}]");
2885
2927
 
2886
2928
 
2887
- const $efe60cea83bfc4e8$export$473cec51305fdae8 = async function({ type: type = ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL , chainId: chainId , exclude: exclude }) {
2888
- // todo:For API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
2889
- const filteredTokenList = ((/*@__PURE__*/$parcel$interopDefault($cda6003506e4182e$exports))).filter((token)=>{
2929
+ const $efe60cea83bfc4e8$var$filterTokenList = function({ type: type , chainId: chainId , exclude: exclude }) {
2930
+ return ((/*@__PURE__*/$parcel$interopDefault($cda6003506e4182e$exports))).filter((token)=>{
2931
+ const skipChainIdCheck = !chainId;
2890
2932
  const chainIdMatches = token.chainId == chainId;
2891
2933
  const tokenNotExcluded = !exclude?.map((excludeToken)=>excludeToken.address).includes(token.address || "");
2892
2934
  const allowAllTokens = type === ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL;
2893
2935
  const tokenAllowedForType = token.tokenFeatures.includes(type);
2894
- return chainIdMatches && tokenNotExcluded && (allowAllTokens || tokenAllowedForType);
2936
+ return (skipChainIdCheck || chainIdMatches) && tokenNotExcluded && (allowAllTokens || tokenAllowedForType);
2937
+ });
2938
+ };
2939
+ const $efe60cea83bfc4e8$export$473cec51305fdae8 = async function({ type: type = ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL , chainId: chainId , exclude: exclude }) {
2940
+ // todo:For API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
2941
+ const filteredTokenList = $efe60cea83bfc4e8$var$filterTokenList({
2942
+ type: type,
2943
+ chainId: chainId,
2944
+ exclude: exclude
2895
2945
  }).map((token)=>{
2896
2946
  const { chainId: chainId , tokenFeatures: tokenFeatures , ...tokenInfo } = token;
2897
2947
  return tokenInfo;
@@ -3104,91 +3154,280 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
3104
3154
  function $parcel$export(e, n, v, s) {
3105
3155
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
3106
3156
  }
3107
- var $88e4c575901cd68c$exports = {};
3157
+ var $207ed853f11d19d5$exports = {};
3108
3158
 
3109
- $parcel$export($88e4c575901cd68c$exports, "IMTBLWidgetEvents", () => $88e4c575901cd68c$export$5a0ace85cae72d45);
3110
- let $88e4c575901cd68c$export$5a0ace85cae72d45;
3159
+ $parcel$export($207ed853f11d19d5$exports, "IMTBLWidgetEvents", () => $207ed853f11d19d5$export$5a0ace85cae72d45);
3160
+ /**
3161
+ * Enum representing the events emitted by the widgets.
3162
+ */ let $207ed853f11d19d5$export$5a0ace85cae72d45;
3111
3163
  (function(IMTBLWidgetEvents) {
3112
3164
  IMTBLWidgetEvents["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
3113
3165
  IMTBLWidgetEvents["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
3114
3166
  IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
3115
3167
  IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
3116
3168
  IMTBLWidgetEvents["IMTBL_BUY_WIDGET_EVENT"] = "imtbl-buy-widget";
3117
- })($88e4c575901cd68c$export$5a0ace85cae72d45 || ($88e4c575901cd68c$export$5a0ace85cae72d45 = {}));
3169
+ IMTBLWidgetEvents["IMTBL_ONRAMP_WIDGET_EVENT"] = "imtbl-onramp-widget";
3170
+ })($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
3118
3171
 
3119
3172
 
3120
- var $d71a87afc3136184$exports = {};
3173
+ var $a85ecdbd885c58ad$exports = {};
3121
3174
 
3122
- $parcel$export($d71a87afc3136184$exports, "ConnectEventType", () => $d71a87afc3136184$export$e72e7f9969a47dd3);
3123
- let $d71a87afc3136184$export$e72e7f9969a47dd3;
3175
+ $parcel$export($a85ecdbd885c58ad$exports, "ConnectEventType", () => $a85ecdbd885c58ad$export$e72e7f9969a47dd3);
3176
+ let $a85ecdbd885c58ad$export$e72e7f9969a47dd3;
3124
3177
  (function(ConnectEventType) {
3125
3178
  ConnectEventType["SUCCESS"] = "success";
3126
3179
  ConnectEventType["FAILURE"] = "failure";
3127
3180
  ConnectEventType["CLOSE_WIDGET"] = "close-widget";
3128
- })($d71a87afc3136184$export$e72e7f9969a47dd3 || ($d71a87afc3136184$export$e72e7f9969a47dd3 = {}));
3181
+ })($a85ecdbd885c58ad$export$e72e7f9969a47dd3 || ($a85ecdbd885c58ad$export$e72e7f9969a47dd3 = {}));
3129
3182
 
3130
3183
 
3131
- var $9d0f1783d4d36e8a$exports = {};
3184
+ var $77b6aac5c353d4a9$exports = {};
3132
3185
 
3133
- $parcel$export($9d0f1783d4d36e8a$exports, "WalletEventType", () => $9d0f1783d4d36e8a$export$d9be06b70b28c742);
3134
- //wallet widget events
3135
- let $9d0f1783d4d36e8a$export$d9be06b70b28c742;
3186
+ $parcel$export($77b6aac5c353d4a9$exports, "WalletEventType", () => $77b6aac5c353d4a9$export$d9be06b70b28c742);
3187
+ let $77b6aac5c353d4a9$export$d9be06b70b28c742;
3136
3188
  (function(WalletEventType) {
3137
3189
  WalletEventType["CLOSE_WIDGET"] = "close-widget";
3138
3190
  WalletEventType["NETWORK_SWITCH"] = "network-switch";
3139
- })($9d0f1783d4d36e8a$export$d9be06b70b28c742 || ($9d0f1783d4d36e8a$export$d9be06b70b28c742 = {}));
3191
+ WalletEventType["ADD_COINS"] = "add-coins";
3192
+ WalletEventType["REQUEST_SWAP"] = "request-swap";
3193
+ WalletEventType["REQUEST_BRIDGE"] = "request-bridge";
3194
+ WalletEventType["REQUEST_ONRAMP"] = "request-onramp";
3195
+ })($77b6aac5c353d4a9$export$d9be06b70b28c742 || ($77b6aac5c353d4a9$export$d9be06b70b28c742 = {}));
3140
3196
 
3141
3197
 
3142
- var $5d497088f13bb116$exports = {};
3198
+ var $53d219e7f6bf0cd6$exports = {};
3143
3199
 
3144
- $parcel$export($5d497088f13bb116$exports, "SwapEventType", () => $5d497088f13bb116$export$140a49745ab55563);
3145
- let $5d497088f13bb116$export$140a49745ab55563;
3200
+ $parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0cd6$export$140a49745ab55563);
3201
+ /**
3202
+ * Represents an event object emitted by the Swap Widget.
3203
+ * @property {SwapEventType} type - The type of the event.
3204
+ * @property {T} data - The data contained in the event.
3205
+ */ let $53d219e7f6bf0cd6$export$140a49745ab55563;
3146
3206
  (function(SwapEventType) {
3147
3207
  SwapEventType["SUCCESS"] = "success";
3148
3208
  SwapEventType["FAILURE"] = "failure";
3149
- })($5d497088f13bb116$export$140a49745ab55563 || ($5d497088f13bb116$export$140a49745ab55563 = {}));
3209
+ })($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
3150
3210
 
3151
3211
 
3152
- var $28a5fdc2f5e6c742$exports = {};
3212
+ var $15cc9e120aa6f3bf$exports = {};
3153
3213
 
3154
- $parcel$export($28a5fdc2f5e6c742$exports, "BridgeEventType", () => $28a5fdc2f5e6c742$export$d1bfa21f7c76447a);
3155
- let $28a5fdc2f5e6c742$export$d1bfa21f7c76447a;
3214
+ $parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
3215
+ /**
3216
+ * Represents an event object emitted by the Bridge Widget.
3217
+ * @property {BridgeEventType} type - The type of the event.
3218
+ * @property {T} data - The data associated with the event.
3219
+ */ let $15cc9e120aa6f3bf$export$d1bfa21f7c76447a;
3156
3220
  (function(BridgeEventType) {
3157
3221
  BridgeEventType["CLOSE_WIDGET"] = "close-widget";
3158
3222
  BridgeEventType["SUCCESS"] = "success";
3159
3223
  BridgeEventType["FAILURE"] = "failure";
3160
- })($28a5fdc2f5e6c742$export$d1bfa21f7c76447a || ($28a5fdc2f5e6c742$export$d1bfa21f7c76447a = {}));
3224
+ })($15cc9e120aa6f3bf$export$d1bfa21f7c76447a || ($15cc9e120aa6f3bf$export$d1bfa21f7c76447a = {}));
3161
3225
 
3162
3226
 
3163
- var $ede253beebe0de4a$exports = {};
3227
+ var $98cbcca465beec95$exports = {};
3164
3228
 
3165
- $parcel$export($ede253beebe0de4a$exports, "BuyEventType", () => $ede253beebe0de4a$export$90db5fe1be5993c1);
3166
- let $ede253beebe0de4a$export$90db5fe1be5993c1;
3229
+ $parcel$export($98cbcca465beec95$exports, "BuyEventType", () => $98cbcca465beec95$export$90db5fe1be5993c1);
3230
+ /**
3231
+ * Represents an event object emitted by the Buy Widget.
3232
+ * @property {BuyEventType} type - The type of the event.
3233
+ * @property {T} data - The data contained in the event.
3234
+ */ let $98cbcca465beec95$export$90db5fe1be5993c1;
3167
3235
  (function(BuyEventType) {
3168
3236
  BuyEventType["SUCCESS"] = "success";
3169
3237
  BuyEventType["FAILURE"] = "failure";
3170
3238
  BuyEventType["NOT_CONNECTED"] = "not_connected";
3171
3239
  BuyEventType["CLOSE"] = "close";
3172
- })($ede253beebe0de4a$export$90db5fe1be5993c1 || ($ede253beebe0de4a$export$90db5fe1be5993c1 = {}));
3240
+ })($98cbcca465beec95$export$90db5fe1be5993c1 || ($98cbcca465beec95$export$90db5fe1be5993c1 = {}));
3241
+
3173
3242
 
3243
+ var $66ceef112c0ee49e$exports = {};
3174
3244
 
3175
- var $9234b4c577442a97$exports = {};
3245
+ $parcel$export($66ceef112c0ee49e$exports, "OnRampEventType", () => $66ceef112c0ee49e$export$66ec39c0924078d8);
3246
+ let $66ceef112c0ee49e$export$66ec39c0924078d8;
3247
+ $66ceef112c0ee49e$export$66ec39c0924078d8 || ($66ceef112c0ee49e$export$66ec39c0924078d8 = {});
3176
3248
 
3177
- $parcel$export($9234b4c577442a97$exports, "Network", () => $9234b4c577442a97$export$95be4ae94445245a);
3178
- $parcel$export($9234b4c577442a97$exports, "WidgetTheme", () => $9234b4c577442a97$export$c88931fdc51854eb);
3179
- $parcel$export($9234b4c577442a97$exports, "ConnectionProviders", () => $d176a05e966364ba$export$3bfad4d03ada24c4);
3180
3249
 
3181
- let $9234b4c577442a97$export$95be4ae94445245a;
3250
+ var $14d7a2bbb79e0dae$exports = {};
3251
+
3252
+ $parcel$export($14d7a2bbb79e0dae$exports, "Network", () => $14d7a2bbb79e0dae$export$95be4ae94445245a);
3253
+ $parcel$export($14d7a2bbb79e0dae$exports, "WidgetTheme", () => $14d7a2bbb79e0dae$export$c88931fdc51854eb);
3254
+ $parcel$export($14d7a2bbb79e0dae$exports, "WidgetConnectionProviders", () => $14d7a2bbb79e0dae$export$2f61dde3bdc320cb);
3255
+ $parcel$export($14d7a2bbb79e0dae$exports, "CheckoutWidgetTagNames", () => $14d7a2bbb79e0dae$export$75be0f6af9650f2c);
3256
+ /**
3257
+ * Enum representing the networks supported by Checkout.
3258
+ */ let $14d7a2bbb79e0dae$export$95be4ae94445245a;
3182
3259
  (function(Network) {
3183
3260
  Network["ETHEREUM"] = "Ethereum";
3184
3261
  Network["GOERLI"] = "Goerli";
3185
3262
  Network["POLYGON"] = "Polygon";
3186
- })($9234b4c577442a97$export$95be4ae94445245a || ($9234b4c577442a97$export$95be4ae94445245a = {}));
3187
- let $9234b4c577442a97$export$c88931fdc51854eb;
3263
+ })($14d7a2bbb79e0dae$export$95be4ae94445245a || ($14d7a2bbb79e0dae$export$95be4ae94445245a = {}));
3264
+ let $14d7a2bbb79e0dae$export$c88931fdc51854eb;
3188
3265
  (function(WidgetTheme) {
3189
3266
  WidgetTheme["LIGHT"] = "light";
3190
3267
  WidgetTheme["DARK"] = "dark";
3191
3268
  WidgetTheme["CUSTOM"] = "custom";
3192
- })($9234b4c577442a97$export$c88931fdc51854eb || ($9234b4c577442a97$export$c88931fdc51854eb = {}));
3269
+ })($14d7a2bbb79e0dae$export$c88931fdc51854eb || ($14d7a2bbb79e0dae$export$c88931fdc51854eb = {}));
3270
+ let $14d7a2bbb79e0dae$export$2f61dde3bdc320cb;
3271
+ (function(WidgetConnectionProviders) {
3272
+ WidgetConnectionProviders["METAMASK"] = "metamask";
3273
+ })($14d7a2bbb79e0dae$export$2f61dde3bdc320cb || ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb = {}));
3274
+ let $14d7a2bbb79e0dae$export$75be0f6af9650f2c;
3275
+ (function(CheckoutWidgetTagNames) {
3276
+ CheckoutWidgetTagNames["CONNECT"] = "imtbl-connect";
3277
+ CheckoutWidgetTagNames["WALLET"] = "imtbl-wallet";
3278
+ CheckoutWidgetTagNames["SWAP"] = "imtbl-swap";
3279
+ CheckoutWidgetTagNames["BUY"] = "imtbl-buy";
3280
+ CheckoutWidgetTagNames["BRIDGE"] = "imtbl-bridge";
3281
+ CheckoutWidgetTagNames["EXAMPLE"] = "imtbl-example";
3282
+ })($14d7a2bbb79e0dae$export$75be0f6af9650f2c || ($14d7a2bbb79e0dae$export$75be0f6af9650f2c = {}));
3283
+
3284
+
3285
+ var $1f969328e5988c99$exports = {};
3286
+
3287
+ $parcel$export($1f969328e5988c99$exports, "BridgeReact", () => $1f969328e5988c99$export$30f61ebf204c69f6);
3288
+
3289
+
3290
+
3291
+ function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
3292
+ const { providerPreference: providerPreference , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
3293
+ const config = window.ImtblCheckoutWidgetConfig;
3294
+ return /*#__PURE__*/ (jsx)("imtbl-bridge", {
3295
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
3296
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
3297
+ fromContractAddress: fromContractAddress ?? "",
3298
+ fromNetwork: fromNetwork ?? "",
3299
+ amount: amount ?? ""
3300
+ });
3301
+ }
3302
+
3303
+
3304
+ var $f22931ca9e2f35b6$exports = {};
3305
+
3306
+ $parcel$export($f22931ca9e2f35b6$exports, "BuyReact", () => $f22931ca9e2f35b6$export$d13582032b79b401);
3307
+
3308
+
3309
+
3310
+ function $f22931ca9e2f35b6$export$d13582032b79b401(props) {
3311
+ const { providerPreference: providerPreference , orderId: orderId } = props;
3312
+ const config = window.ImtblCheckoutWidgetConfig;
3313
+ return /*#__PURE__*/ (jsx)("imtbl-buy", {
3314
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
3315
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
3316
+ orderId: orderId
3317
+ });
3318
+ }
3319
+
3320
+
3321
+ var $f2083cd30e2f5c56$exports = {};
3322
+
3323
+ $parcel$export($f2083cd30e2f5c56$exports, "ConnectReact", () => $f2083cd30e2f5c56$export$49d62957f420a1e2);
3324
+
3325
+
3326
+
3327
+ function $f2083cd30e2f5c56$export$49d62957f420a1e2(props) {
3328
+ const { providerPreference: providerPreference } = props;
3329
+ const config = window.ImtblCheckoutWidgetConfig;
3330
+ return /*#__PURE__*/ (jsx)("imtbl-connect", {
3331
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
3332
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK
3333
+ });
3334
+ }
3335
+
3336
+
3337
+ var $a4fbb8e3a6aeff58$exports = {};
3338
+
3339
+ $parcel$export($a4fbb8e3a6aeff58$exports, "SwapReact", () => $a4fbb8e3a6aeff58$export$971e031379577f4);
3340
+
3341
+
3342
+
3343
+ function $a4fbb8e3a6aeff58$export$971e031379577f4(props) {
3344
+ const { providerPreference: providerPreference , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress } = props;
3345
+ const config = window.ImtblCheckoutWidgetConfig;
3346
+ return /*#__PURE__*/ (jsx)("imtbl-swap", {
3347
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
3348
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
3349
+ fromContractAddress: fromContractAddress ?? "",
3350
+ toContractAddress: toContractAddress ?? "",
3351
+ amount: amount ?? ""
3352
+ });
3353
+ }
3354
+
3355
+
3356
+ var $89d55ace0f8f1c07$exports = {};
3357
+
3358
+ $parcel$export($89d55ace0f8f1c07$exports, "WalletReact", () => $89d55ace0f8f1c07$export$ceaac94f34dba154);
3359
+
3360
+
3361
+
3362
+ function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
3363
+ const { providerPreference: providerPreference , isBridgeEnabled: isBridgeEnabled , isOnRampEnabled: isOnRampEnabled , isSwapEnabled: isSwapEnabled } = props;
3364
+ const config = window.ImtblCheckoutWidgetConfig;
3365
+ // isOnRampEnabled, isBridgeEnabled, isSwapEnabled is a boolean type for better devExp
3366
+ // converting them to string for compatible webComponent properties
3367
+ return /*#__PURE__*/ (jsx)("imtbl-wallet", {
3368
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
3369
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
3370
+ isBridgeEnabled: isBridgeEnabled?.toString(),
3371
+ isSwapEnabled: isSwapEnabled?.toString(),
3372
+ isOnRampEnabled: isOnRampEnabled?.toString()
3373
+ });
3374
+ }
3375
+
3376
+
3377
+ var $d087956fd1002f80$exports = {};
3378
+
3379
+ $parcel$export($d087956fd1002f80$exports, "ExampleReact", () => $d087956fd1002f80$export$fa517eee6594d26c);
3380
+
3381
+
3382
+
3383
+ function $d087956fd1002f80$export$fa517eee6594d26c(props) {
3384
+ const { providerPreference: providerPreference , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
3385
+ const config = window.ImtblCheckoutWidgetConfig;
3386
+ return /*#__PURE__*/ (jsx)("imtbl-example", {
3387
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
3388
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK
3389
+ });
3390
+ }
3391
+
3392
+
3393
+ var $fa90757d8d7a0962$exports = {};
3394
+
3395
+ $parcel$export($fa90757d8d7a0962$exports, "CheckoutWidgets", () => $fa90757d8d7a0962$export$af210a0808087845);
3396
+ $parcel$export($fa90757d8d7a0962$exports, "UpdateConfig", () => $fa90757d8d7a0962$export$bf1548ba7e61c17f);
3397
+ $parcel$export($fa90757d8d7a0962$exports, "SetProvider", () => $fa90757d8d7a0962$export$931068bc678f0d73);
3398
+ function $fa90757d8d7a0962$export$af210a0808087845(config) {
3399
+ var checkoutWidgetJS = document.createElement("script");
3400
+ checkoutWidgetJS.setAttribute("src", "http://localhost:3000/lib/js/imtbl-checkout.js");
3401
+ document.head.appendChild(checkoutWidgetJS);
3402
+ window.ImtblCheckoutWidgetConfig = config;
3403
+ }
3404
+ function $fa90757d8d7a0962$export$bf1548ba7e61c17f(config) {
3405
+ window.ImtblCheckoutWidgetConfig = config;
3406
+ }
3407
+ function $fa90757d8d7a0962$export$931068bc678f0d73(tagName, provider) {
3408
+ if (!provider) {
3409
+ console.error("no provider parsed");
3410
+ return;
3411
+ }
3412
+ const elements = document.getElementsByTagName(tagName);
3413
+ const widget = elements[0];
3414
+ let attempts = 0;
3415
+ const maxAttempts = 10;
3416
+ let timer;
3417
+ const attemptToSetProvider = ()=>{
3418
+ try {
3419
+ widget.setProvider(provider);
3420
+ window.clearInterval(timer);
3421
+ } catch (err) {
3422
+ attempts++;
3423
+ if (attempts >= maxAttempts) {
3424
+ window.clearInterval(timer);
3425
+ console.error("failed to set the provider");
3426
+ }
3427
+ }
3428
+ };
3429
+ timer = window.setInterval(attemptToSetProvider, 10);
3430
+ attemptToSetProvider();
3431
+ }
3193
3432
 
3194
- export { $28a5fdc2f5e6c742$export$d1bfa21f7c76447a as BridgeEventType, $ede253beebe0de4a$export$90db5fe1be5993c1 as BuyEventType, $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $d71a87afc3136184$export$e72e7f9969a47dd3 as ConnectEventType, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, Environment, GenericIMXProvider, $88e4c575901cd68c$export$5a0ace85cae72d45 as IMTBLWidgetEvents, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, $9234b4c577442a97$export$95be4ae94445245a as Network, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, Passport, PassportError, ProviderConfiguration, $5d497088f13bb116$export$140a49745ab55563 as SwapEventType, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $9d0f1783d4d36e8a$export$d9be06b70b28c742 as WalletEventType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $9234b4c577442a97$export$c88931fdc51854eb as WidgetTheme };
3433
+ export { $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $98cbcca465beec95$export$90db5fe1be5993c1 as BuyEventType, $f22931ca9e2f35b6$export$d13582032b79b401 as BuyReact, $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $14d7a2bbb79e0dae$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $fa90757d8d7a0962$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, Environment, $d087956fd1002f80$export$fa517eee6594d26c as ExampleReact, GenericIMXProvider, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, $14d7a2bbb79e0dae$export$95be4ae94445245a as Network, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $66ceef112c0ee49e$export$66ec39c0924078d8 as OnRampEventType, Passport, PassportError, ProviderConfiguration, $fa90757d8d7a0962$export$931068bc678f0d73 as SetProvider, $090d3502d165f17d$export$c5ab8fbcabac8c11 as SupportedFiatCurrencies, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $fa90757d8d7a0962$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $14d7a2bbb79e0dae$export$2f61dde3bdc320cb as WidgetConnectionProviders, $14d7a2bbb79e0dae$export$c88931fdc51854eb as WidgetTheme };