@imtbl/sdk 0.1.9-alpha.1 → 0.1.9-alpha.2

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.cjs CHANGED
@@ -18,7 +18,7 @@ var ethers$1 = require('ethers/lib/ethers');
18
18
  var bridgeSdk = require('@imtbl/bridge-sdk');
19
19
  var dexSdk = require('@imtbl/dex-sdk');
20
20
  var jsxRuntime = require('react/jsx-runtime');
21
- require('react');
21
+ var react = require('react');
22
22
 
23
23
  function _interopNamespaceDefault(e) {
24
24
  var n = Object.create(null);
@@ -737,292 +737,6 @@ class CollectionsApi extends BaseAPI$1 {
737
737
  }
738
738
  }
739
739
 
740
- /* tslint:disable */
741
- /* eslint-disable */
742
- /**
743
- * Immutable X API
744
- * Immutable Multi Rollup API
745
- *
746
- * The version of the OpenAPI document: 1.0.0
747
- * Contact: support@immutable.com
748
- *
749
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
750
- * https://openapi-generator.tech
751
- * Do not edit the class manually.
752
- */
753
- /**
754
- * ListingsApi - axios parameter creator
755
- * @export
756
- */
757
- const ListingsApiAxiosParamCreator = function (configuration) {
758
- return {
759
- /**
760
- * Create a listing
761
- * @summary Create a listing
762
- * @param {string} chainName
763
- * @param {CreateListingRequestBody} createListingRequestBody
764
- * @param {*} [options] Override http request option.
765
- * @throws {RequiredError}
766
- */
767
- createListing: async (chainName, createListingRequestBody, options = {}) => {
768
- // verify required parameter 'chainName' is not null or undefined
769
- assertParamExists$1('createListing', 'chainName', chainName);
770
- // verify required parameter 'createListingRequestBody' is not null or undefined
771
- assertParamExists$1('createListing', 'createListingRequestBody', createListingRequestBody);
772
- const localVarPath = `/v1/chains/{chain_name}/listings`
773
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
774
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
775
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
776
- let baseOptions;
777
- if (configuration) {
778
- baseOptions = configuration.baseOptions;
779
- }
780
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
781
- const localVarHeaderParameter = {};
782
- const localVarQueryParameter = {};
783
- localVarHeaderParameter['Content-Type'] = 'application/json';
784
- setSearchParams$1(localVarUrlObj, localVarQueryParameter);
785
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
786
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
787
- localVarRequestOptions.data = serializeDataIfNeeded(createListingRequestBody, localVarRequestOptions, configuration);
788
- return {
789
- url: toPathString$1(localVarUrlObj),
790
- options: localVarRequestOptions,
791
- };
792
- },
793
- /**
794
- * Get a single listing by ID
795
- * @summary Get a single listing by ID
796
- * @param {string} chainName
797
- * @param {string} listingId Global Order identifier
798
- * @param {*} [options] Override http request option.
799
- * @throws {RequiredError}
800
- */
801
- getListing: async (chainName, listingId, options = {}) => {
802
- // verify required parameter 'chainName' is not null or undefined
803
- assertParamExists$1('getListing', 'chainName', chainName);
804
- // verify required parameter 'listingId' is not null or undefined
805
- assertParamExists$1('getListing', 'listingId', listingId);
806
- const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
807
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
808
- .replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
809
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
810
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
811
- let baseOptions;
812
- if (configuration) {
813
- baseOptions = configuration.baseOptions;
814
- }
815
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
816
- const localVarHeaderParameter = {};
817
- const localVarQueryParameter = {};
818
- setSearchParams$1(localVarUrlObj, localVarQueryParameter);
819
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
820
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
821
- return {
822
- url: toPathString$1(localVarUrlObj),
823
- options: localVarRequestOptions,
824
- };
825
- },
826
- /**
827
- * List all listings
828
- * @summary List all listings
829
- * @param {string} chainName
830
- * @param {OrderStatus} [status] Order status to filter by
831
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
832
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
833
- * @param {number} [pageSize] Maximum number of orders to return per page
834
- * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
835
- * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
836
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
837
- * @param {*} [options] Override http request option.
838
- * @throws {RequiredError}
839
- */
840
- listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
841
- // verify required parameter 'chainName' is not null or undefined
842
- assertParamExists$1('listListings', 'chainName', chainName);
843
- const localVarPath = `/v1/chains/{chain_name}/listings`
844
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
845
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
846
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
847
- let baseOptions;
848
- if (configuration) {
849
- baseOptions = configuration.baseOptions;
850
- }
851
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
852
- const localVarHeaderParameter = {};
853
- const localVarQueryParameter = {};
854
- if (status !== undefined) {
855
- localVarQueryParameter['status'] = status;
856
- }
857
- if (sellItemContractAddress !== undefined) {
858
- localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
859
- }
860
- if (sellItemTokenId !== undefined) {
861
- localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
862
- }
863
- if (pageSize !== undefined) {
864
- localVarQueryParameter['page_size'] = pageSize;
865
- }
866
- if (sortBy !== undefined) {
867
- localVarQueryParameter['sort_by'] = sortBy;
868
- }
869
- if (sortDirection !== undefined) {
870
- localVarQueryParameter['sort_direction'] = sortDirection;
871
- }
872
- if (pageCursor !== undefined) {
873
- localVarQueryParameter['page_cursor'] = pageCursor;
874
- }
875
- setSearchParams$1(localVarUrlObj, localVarQueryParameter);
876
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
877
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
878
- return {
879
- url: toPathString$1(localVarUrlObj),
880
- options: localVarRequestOptions,
881
- };
882
- },
883
- };
884
- };
885
- /**
886
- * ListingsApi - functional programming interface
887
- * @export
888
- */
889
- const ListingsApiFp = function (configuration) {
890
- const localVarAxiosParamCreator = ListingsApiAxiosParamCreator(configuration);
891
- return {
892
- /**
893
- * Create a listing
894
- * @summary Create a listing
895
- * @param {string} chainName
896
- * @param {CreateListingRequestBody} createListingRequestBody
897
- * @param {*} [options] Override http request option.
898
- * @throws {RequiredError}
899
- */
900
- async createListing(chainName, createListingRequestBody, options) {
901
- const localVarAxiosArgs = await localVarAxiosParamCreator.createListing(chainName, createListingRequestBody, options);
902
- return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
903
- },
904
- /**
905
- * Get a single listing by ID
906
- * @summary Get a single listing by ID
907
- * @param {string} chainName
908
- * @param {string} listingId Global Order identifier
909
- * @param {*} [options] Override http request option.
910
- * @throws {RequiredError}
911
- */
912
- async getListing(chainName, listingId, options) {
913
- const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
914
- return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
915
- },
916
- /**
917
- * List all listings
918
- * @summary List all listings
919
- * @param {string} chainName
920
- * @param {OrderStatus} [status] Order status to filter by
921
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
922
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
923
- * @param {number} [pageSize] Maximum number of orders to return per page
924
- * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
925
- * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
926
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
927
- * @param {*} [options] Override http request option.
928
- * @throws {RequiredError}
929
- */
930
- async listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
931
- const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
932
- return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
933
- },
934
- };
935
- };
936
- /**
937
- * ListingsApi - factory interface
938
- * @export
939
- */
940
- const ListingsApiFactory = function (configuration, basePath, axios) {
941
- const localVarFp = ListingsApiFp(configuration);
942
- return {
943
- /**
944
- * Create a listing
945
- * @summary Create a listing
946
- * @param {string} chainName
947
- * @param {CreateListingRequestBody} createListingRequestBody
948
- * @param {*} [options] Override http request option.
949
- * @throws {RequiredError}
950
- */
951
- createListing(chainName, createListingRequestBody, options) {
952
- return localVarFp.createListing(chainName, createListingRequestBody, options).then((request) => request(axios, basePath));
953
- },
954
- /**
955
- * Get a single listing by ID
956
- * @summary Get a single listing by ID
957
- * @param {string} chainName
958
- * @param {string} listingId Global Order identifier
959
- * @param {*} [options] Override http request option.
960
- * @throws {RequiredError}
961
- */
962
- getListing(chainName, listingId, options) {
963
- return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
964
- },
965
- /**
966
- * List all listings
967
- * @summary List all listings
968
- * @param {string} chainName
969
- * @param {OrderStatus} [status] Order status to filter by
970
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
971
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
972
- * @param {number} [pageSize] Maximum number of orders to return per page
973
- * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
974
- * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
975
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
976
- * @param {*} [options] Override http request option.
977
- * @throws {RequiredError}
978
- */
979
- listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
980
- return localVarFp.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
981
- },
982
- };
983
- };
984
- /**
985
- * ListingsApi - object-oriented interface
986
- * @export
987
- * @class ListingsApi
988
- * @extends {BaseAPI}
989
- */
990
- class ListingsApi extends BaseAPI$1 {
991
- /**
992
- * Create a listing
993
- * @summary Create a listing
994
- * @param {ListingsApiCreateListingRequest} requestParameters Request parameters.
995
- * @param {*} [options] Override http request option.
996
- * @throws {RequiredError}
997
- * @memberof ListingsApi
998
- */
999
- createListing(requestParameters, options) {
1000
- return ListingsApiFp(this.configuration).createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(this.axios, this.basePath));
1001
- }
1002
- /**
1003
- * Get a single listing by ID
1004
- * @summary Get a single listing by ID
1005
- * @param {ListingsApiGetListingRequest} requestParameters Request parameters.
1006
- * @param {*} [options] Override http request option.
1007
- * @throws {RequiredError}
1008
- * @memberof ListingsApi
1009
- */
1010
- getListing(requestParameters, options) {
1011
- return ListingsApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
1012
- }
1013
- /**
1014
- * List all listings
1015
- * @summary List all listings
1016
- * @param {ListingsApiListListingsRequest} requestParameters Request parameters.
1017
- * @param {*} [options] Override http request option.
1018
- * @throws {RequiredError}
1019
- * @memberof ListingsApi
1020
- */
1021
- listListings(requestParameters, options) {
1022
- return ListingsApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1023
- }
1024
- }
1025
-
1026
740
  /* tslint:disable */
1027
741
  /* eslint-disable */
1028
742
  /**
@@ -1473,7 +1187,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1473
1187
  assertParamExists$1('createListing', 'chainName', chainName);
1474
1188
  // verify required parameter 'createListingRequestBody' is not null or undefined
1475
1189
  assertParamExists$1('createListing', 'createListingRequestBody', createListingRequestBody);
1476
- const localVarPath = `/v1/chains/{chain_name}/listings`
1190
+ const localVarPath = `/v1/chains/{chain_name}/orders/listings`
1477
1191
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1478
1192
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1479
1193
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
@@ -1507,7 +1221,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1507
1221
  assertParamExists$1('getListing', 'chainName', chainName);
1508
1222
  // verify required parameter 'listingId' is not null or undefined
1509
1223
  assertParamExists$1('getListing', 'listingId', listingId);
1510
- const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
1224
+ const localVarPath = `/v1/chains/{chain_name}/orders/listings/{listing_id}`
1511
1225
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
1512
1226
  .replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
1513
1227
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -1533,6 +1247,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1533
1247
  * @param {string} chainName
1534
1248
  * @param {OrderStatus} [status] Order status to filter by
1535
1249
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1250
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1536
1251
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
1537
1252
  * @param {number} [pageSize] Maximum number of orders to return per page
1538
1253
  * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
@@ -1541,10 +1256,10 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1541
1256
  * @param {*} [options] Override http request option.
1542
1257
  * @throws {RequiredError}
1543
1258
  */
1544
- listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1259
+ listListings: async (chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1545
1260
  // verify required parameter 'chainName' is not null or undefined
1546
1261
  assertParamExists$1('listListings', 'chainName', chainName);
1547
- const localVarPath = `/v1/chains/{chain_name}/listings`
1262
+ const localVarPath = `/v1/chains/{chain_name}/orders/listings`
1548
1263
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1549
1264
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1550
1265
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
@@ -1561,6 +1276,9 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1561
1276
  if (sellItemContractAddress !== undefined) {
1562
1277
  localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
1563
1278
  }
1279
+ if (buyItemContractAddress !== undefined) {
1280
+ localVarQueryParameter['buy_item_contract_address'] = buyItemContractAddress;
1281
+ }
1564
1282
  if (sellItemTokenId !== undefined) {
1565
1283
  localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
1566
1284
  }
@@ -1623,6 +1341,7 @@ const OrdersApiFp = function (configuration) {
1623
1341
  * @param {string} chainName
1624
1342
  * @param {OrderStatus} [status] Order status to filter by
1625
1343
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1344
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1626
1345
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
1627
1346
  * @param {number} [pageSize] Maximum number of orders to return per page
1628
1347
  * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
@@ -1631,8 +1350,8 @@ const OrdersApiFp = function (configuration) {
1631
1350
  * @param {*} [options] Override http request option.
1632
1351
  * @throws {RequiredError}
1633
1352
  */
1634
- async listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1635
- const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
1353
+ async listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
1636
1355
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1637
1356
  },
1638
1357
  };
@@ -1672,6 +1391,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1672
1391
  * @param {string} chainName
1673
1392
  * @param {OrderStatus} [status] Order status to filter by
1674
1393
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1394
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1675
1395
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
1676
1396
  * @param {number} [pageSize] Maximum number of orders to return per page
1677
1397
  * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
@@ -1680,8 +1400,8 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1680
1400
  * @param {*} [options] Override http request option.
1681
1401
  * @throws {RequiredError}
1682
1402
  */
1683
- listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1684
- return localVarFp.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1403
+ listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1404
+ return localVarFp.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1685
1405
  },
1686
1406
  };
1687
1407
  };
@@ -1723,7 +1443,7 @@ class OrdersApi extends BaseAPI$1 {
1723
1443
  * @memberof OrdersApi
1724
1444
  */
1725
1445
  listListings(requestParameters, options) {
1726
- return OrdersApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1446
+ return OrdersApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.buyItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1727
1447
  }
1728
1448
  }
1729
1449
 
@@ -1756,7 +1476,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
1756
1476
  createCounterfactualAddress: async (createCounterfactualAddressRequest, options = {}) => {
1757
1477
  // verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
1758
1478
  assertParamExists$1('createCounterfactualAddress', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
1759
- const localVarPath = `/v1/counterfactual-address`;
1479
+ const localVarPath = `/passport-mr/v1/counterfactual-address`;
1760
1480
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1761
1481
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1762
1482
  let baseOptions;
@@ -2256,9 +1976,13 @@ const ActivityType = {
2256
1976
  * https://openapi-generator.tech
2257
1977
  * Do not edit the class manually.
2258
1978
  */
2259
- const BuyItemItemTypeEnum = {
2260
- Native: 'NATIVE',
2261
- Erc20: 'ERC20'
1979
+ /**
1980
+ * The collection contract type
1981
+ * @export
1982
+ * @enum {string}
1983
+ */
1984
+ const CollectionContractType = {
1985
+ Erc721: 'ERC721'
2262
1986
  };
2263
1987
 
2264
1988
  /* tslint:disable */
@@ -2274,13 +1998,25 @@ const BuyItemItemTypeEnum = {
2274
1998
  * https://openapi-generator.tech
2275
1999
  * Do not edit the class manually.
2276
2000
  */
2001
+ const CreateOrderProtocolDataOrderTypeEnum = {
2002
+ FullRestricted: 'FULL_RESTRICTED'
2003
+ };
2004
+
2005
+ /* tslint:disable */
2006
+ /* eslint-disable */
2277
2007
  /**
2278
- * The collection contract type
2279
- * @export
2280
- * @enum {string}
2008
+ * Immutable X API
2009
+ * Immutable Multi Rollup API
2010
+ *
2011
+ * The version of the OpenAPI document: 1.0.0
2012
+ * Contact: support@immutable.com
2013
+ *
2014
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2015
+ * https://openapi-generator.tech
2016
+ * Do not edit the class manually.
2281
2017
  */
2282
- const CollectionContractType = {
2283
- Erc721: 'ERC721'
2018
+ const ERC20ItemItemTypeEnum = {
2019
+ Erc20: 'ERC20'
2284
2020
  };
2285
2021
 
2286
2022
  /* tslint:disable */
@@ -2296,8 +2032,8 @@ const CollectionContractType = {
2296
2032
  * https://openapi-generator.tech
2297
2033
  * Do not edit the class manually.
2298
2034
  */
2299
- const CreateOrderProtocolDataOrderTypeEnum = {
2300
- FullRestricted: 'FULL_RESTRICTED'
2035
+ const ERC721ItemItemTypeEnum = {
2036
+ Erc721: 'ERC721'
2301
2037
  };
2302
2038
 
2303
2039
  /* tslint:disable */
@@ -2352,18 +2088,8 @@ const NFTContractType = {
2352
2088
  * https://openapi-generator.tech
2353
2089
  * Do not edit the class manually.
2354
2090
  */
2355
- /**
2356
- * The Order status
2357
- * @export
2358
- * @enum {string}
2359
- */
2360
- const OrderStatus$1 = {
2361
- Pending: 'PENDING',
2362
- Active: 'ACTIVE',
2363
- Inactive: 'INACTIVE',
2364
- Filled: 'FILLED',
2365
- Cancelled: 'CANCELLED',
2366
- Expired: 'EXPIRED'
2091
+ const NativeItemItemTypeEnum = {
2092
+ Native: 'NATIVE'
2367
2093
  };
2368
2094
 
2369
2095
  /* tslint:disable */
@@ -2379,8 +2105,18 @@ const OrderStatus$1 = {
2379
2105
  * https://openapi-generator.tech
2380
2106
  * Do not edit the class manually.
2381
2107
  */
2382
- const SaleFeeTypeEnum = {
2383
- Royalty: 'ROYALTY'
2108
+ /**
2109
+ * The Order status
2110
+ * @export
2111
+ * @enum {string}
2112
+ */
2113
+ const OrderStatus$1 = {
2114
+ Pending: 'PENDING',
2115
+ Active: 'ACTIVE',
2116
+ Inactive: 'INACTIVE',
2117
+ Filled: 'FILLED',
2118
+ Cancelled: 'CANCELLED',
2119
+ Expired: 'EXPIRED'
2384
2120
  };
2385
2121
 
2386
2122
  /* tslint:disable */
@@ -2396,8 +2132,8 @@ const SaleFeeTypeEnum = {
2396
2132
  * https://openapi-generator.tech
2397
2133
  * Do not edit the class manually.
2398
2134
  */
2399
- const SellItemItemTypeEnum = {
2400
- Erc721: 'ERC721'
2135
+ const SaleFeeTypeEnum = {
2136
+ Royalty: 'ROYALTY'
2401
2137
  };
2402
2138
 
2403
2139
  /* tslint:disable */
@@ -2449,7 +2185,6 @@ var index = /*#__PURE__*/Object.freeze({
2449
2185
  ActivitiesApiFactory: ActivitiesApiFactory,
2450
2186
  ActivitiesApiFp: ActivitiesApiFp,
2451
2187
  ActivityType: ActivityType,
2452
- BuyItemItemTypeEnum: BuyItemItemTypeEnum,
2453
2188
  ChainsApi: ChainsApi,
2454
2189
  ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
2455
2190
  ChainsApiFactory: ChainsApiFactory,
@@ -2461,12 +2196,11 @@ var index = /*#__PURE__*/Object.freeze({
2461
2196
  CollectionsApiFp: CollectionsApiFp,
2462
2197
  Configuration: Configuration$1,
2463
2198
  CreateOrderProtocolDataOrderTypeEnum: CreateOrderProtocolDataOrderTypeEnum,
2199
+ ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
2200
+ ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
2464
2201
  FeeFeeTypeEnum: FeeFeeTypeEnum,
2465
- ListingsApi: ListingsApi,
2466
- ListingsApiAxiosParamCreator: ListingsApiAxiosParamCreator,
2467
- ListingsApiFactory: ListingsApiFactory,
2468
- ListingsApiFp: ListingsApiFp,
2469
2202
  NFTContractType: NFTContractType,
2203
+ NativeItemItemTypeEnum: NativeItemItemTypeEnum,
2470
2204
  NftOwnersApi: NftOwnersApi,
2471
2205
  NftOwnersApiAxiosParamCreator: NftOwnersApiAxiosParamCreator,
2472
2206
  NftOwnersApiFactory: NftOwnersApiFactory,
@@ -2485,7 +2219,6 @@ var index = /*#__PURE__*/Object.freeze({
2485
2219
  PassportApiFactory: PassportApiFactory,
2486
2220
  PassportApiFp: PassportApiFp,
2487
2221
  SaleFeeTypeEnum: SaleFeeTypeEnum,
2488
- SellItemItemTypeEnum: SellItemItemTypeEnum,
2489
2222
  TokenContractType: TokenContractType,
2490
2223
  TokensApi: TokensApi,
2491
2224
  TokensApiAxiosParamCreator: TokensApiAxiosParamCreator,
@@ -7049,7 +6782,7 @@ class AuthManager {
7049
6782
  }
7050
6783
  static mapOidcUserToDomainModel = (oidcUser) => {
7051
6784
  const passport = oidcUser.profile?.passport;
7052
- return {
6785
+ const user = {
7053
6786
  expired: oidcUser.expired,
7054
6787
  idToken: oidcUser.id_token,
7055
6788
  accessToken: oidcUser.access_token,
@@ -7059,10 +6792,21 @@ class AuthManager {
7059
6792
  email: oidcUser.profile.email,
7060
6793
  nickname: oidcUser.profile.nickname,
7061
6794
  },
7062
- etherKey: passport?.ether_key || '',
7063
- starkKey: passport?.stark_key || '',
7064
- userAdminKey: passport?.user_admin_key || '',
7065
6795
  };
6796
+ if (passport?.imx_eth_address) {
6797
+ user.imx = {
6798
+ ethAddress: passport?.imx_eth_address,
6799
+ starkAddress: passport?.imx_stark_address,
6800
+ userAdminAddress: passport?.imx_user_admin_address,
6801
+ };
6802
+ }
6803
+ if (passport?.zkevm_eth_address) {
6804
+ user.zkEvm = {
6805
+ ethAddress: passport?.zkevm_eth_address,
6806
+ userAdminAddress: passport?.zkevm_user_admin_address,
6807
+ };
6808
+ }
6809
+ return user;
7066
6810
  };
7067
6811
  async login() {
7068
6812
  return withPassportError(async () => {
@@ -7130,7 +6874,7 @@ const getStarkSigner = async (signer) => withPassportError(async () => {
7130
6874
 
7131
6875
  async function exchangeTransfer$1({ user, starkSigner, request, exchangesApi, }) {
7132
6876
  return withPassportError(async () => {
7133
- const ethAddress = user.etherKey;
6877
+ const { ethAddress } = user.imx;
7134
6878
  const transferAmount = request.amount;
7135
6879
  const signableResult = await exchangesApi.getExchangeSignableTransfer({
7136
6880
  id: request.transactionID,
@@ -7328,7 +7072,7 @@ class ConfirmationScreen {
7328
7072
  const ERC721$1 = 'ERC721';
7329
7073
  async function createOrder$1({ starkSigner, user, request, ordersApi, confirmationScreen, }) {
7330
7074
  return withPassportError(async () => {
7331
- const ethAddress = user.etherKey;
7075
+ const { ethAddress } = user.imx;
7332
7076
  const amountSell = request.sell.type === ERC721$1 ? '1' : request.sell.amount;
7333
7077
  const amountBuy = request.buy.type === ERC721$1 ? '1' : request.buy.amount;
7334
7078
  const getSignableOrderRequestV3 = {
@@ -7444,7 +7188,7 @@ async function registerPassport({ ethSigner, starkSigner, usersApi }, authorizat
7444
7188
 
7445
7189
  async function createTrade$1({ request, tradesApi, user, starkSigner, confirmationScreen, }) {
7446
7190
  return withPassportError(async () => {
7447
- const ethAddress = user.etherKey;
7191
+ const { ethAddress } = user.imx;
7448
7192
  const getSignableTradeRequest = {
7449
7193
  expiration_timestamp: request.expiration_timestamp,
7450
7194
  fees: request.fees,
@@ -7554,7 +7298,7 @@ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicA
7554
7298
  return withPassportError(async () => {
7555
7299
  const transferAmount = request.type === ERC721$2 ? '1' : request.amount;
7556
7300
  const getSignableTransferRequest = {
7557
- sender: user.etherKey,
7301
+ sender: user.imx.ethAddress,
7558
7302
  token: convertToSignableToken(request),
7559
7303
  amount: transferAmount,
7560
7304
  receiver: request.receiver,
@@ -7600,7 +7344,7 @@ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicA
7600
7344
  }
7601
7345
  async function batchNftTransfer({ user, starkSigner, request, transfersApi, confirmationScreen, }) {
7602
7346
  return withPassportError(async () => {
7603
- const ethAddress = user.etherKey;
7347
+ const { ethAddress } = user.imx;
7604
7348
  const signableRequests = request.map((nftTransfer) => ({
7605
7349
  amount: '1',
7606
7350
  token: convertToSignableToken({
@@ -7752,7 +7496,7 @@ class PassportImxProvider {
7752
7496
  throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
7753
7497
  }
7754
7498
  getAddress() {
7755
- return Promise.resolve(this.user.etherKey);
7499
+ return Promise.resolve(this.user.imx.ethAddress);
7756
7500
  }
7757
7501
  }
7758
7502
 
@@ -7788,10 +7532,10 @@ class PassportImxProviderFactory {
7788
7532
  const web3Provider = new providers.Web3Provider(magicRpcProvider);
7789
7533
  const ethSigner = web3Provider.getSigner();
7790
7534
  const starkSigner = await getStarkSigner(ethSigner);
7791
- if (!user.etherKey) {
7792
- const userWithEtherKey = await this.registerStarkEx(ethSigner, starkSigner, user.accessToken);
7535
+ if (!user.imx?.ethAddress) {
7536
+ const userImx = await this.registerStarkEx(ethSigner, starkSigner, user.accessToken);
7793
7537
  return new PassportImxProvider({
7794
- user: userWithEtherKey,
7538
+ user: userImx,
7795
7539
  starkSigner,
7796
7540
  immutableXClient: this.immutableXClient,
7797
7541
  imxPublicApiDomain: this.config.imxPublicApiDomain,
@@ -7816,7 +7560,7 @@ class PassportImxProviderFactory {
7816
7560
  // User metadata is updated asynchronously. Poll userinfo endpoint until it is updated.
7817
7561
  const updatedUser = await retryWithDelay(async () => {
7818
7562
  const user = await this.authManager.loginSilent();
7819
- const metadataExists = !!user?.etherKey && !!user?.starkKey && !!user?.userAdminKey;
7563
+ const metadataExists = !!user?.imx;
7820
7564
  if (metadataExists) {
7821
7565
  return user;
7822
7566
  }
@@ -7827,11 +7571,11 @@ class PassportImxProviderFactory {
7827
7571
  }
7828
7572
  }
7829
7573
 
7830
- var Networks;
7574
+ exports.Networks = void 0;
7831
7575
  (function (Networks) {
7832
7576
  Networks["PRODUCTION"] = "mainnet";
7833
7577
  Networks["SANDBOX"] = "goerli";
7834
- })(Networks || (Networks = {}));
7578
+ })(exports.Networks || (exports.Networks = {}));
7835
7579
 
7836
7580
  const validateConfiguration = (configuration, requiredKeys, prefix) => {
7837
7581
  const missingKeys = requiredKeys
@@ -7881,7 +7625,7 @@ class PassportConfiguration {
7881
7625
  else {
7882
7626
  switch (baseConfig.environment) {
7883
7627
  case exports.Environment.PRODUCTION: {
7884
- this.network = Networks.PRODUCTION;
7628
+ this.network = exports.Networks.PRODUCTION;
7885
7629
  this.authenticationDomain = 'https://auth.immutable.com';
7886
7630
  this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
7887
7631
  this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
@@ -7891,7 +7635,7 @@ class PassportConfiguration {
7891
7635
  }
7892
7636
  case exports.Environment.SANDBOX:
7893
7637
  default: {
7894
- this.network = Networks.SANDBOX;
7638
+ this.network = exports.Networks.SANDBOX;
7895
7639
  this.authenticationDomain = 'https://auth.immutable.com';
7896
7640
  this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
7897
7641
  this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
@@ -8863,7 +8607,7 @@ class ImmutableApiClient {
8863
8607
  ...listOrderParams,
8864
8608
  });
8865
8609
  }
8866
- async createListing({ orderHash, orderComponents, offerer, orderSignature, }) {
8610
+ async createListing({ orderHash, orderComponents, orderSignature, }) {
8867
8611
  if (orderComponents.offer.length !== 1) {
8868
8612
  throw new Error('Only one item can be listed at a time');
8869
8613
  }
@@ -8881,7 +8625,7 @@ class ImmutableApiClient {
8881
8625
  chainName: this.chainName,
8882
8626
  requestBody: {
8883
8627
  order_hash: orderHash,
8884
- account_address: offerer,
8628
+ account_address: orderComponents.offerer,
8885
8629
  buy: [
8886
8630
  {
8887
8631
  item_type: Number(orderComponents.consideration[0].itemType)
@@ -9912,10 +9656,10 @@ class Orderbook {
9912
9656
  * the unsigned approval transaction, the typed order message for signing and
9913
9657
  * the order components that can be submitted to `createListing` with a signature.
9914
9658
  */
9915
- async prepareListing({ offerer, listingItem, considerationItem, orderExpiry, }) {
9916
- const erc721 = new ERC721Factory(listingItem.contractAddress, this.config.provider).create();
9917
- const royaltyInfo = await erc721.royaltyInfo(listingItem.tokenId, considerationItem.amount);
9918
- return this.seaport.prepareSeaportOrder(offerer, listingItem, considerationItem, royaltyInfo,
9659
+ async prepareListing({ makerAddress, sell, buy, orderExpiry, }) {
9660
+ const erc721 = new ERC721Factory(sell.contractAddress, this.config.provider).create();
9661
+ const royaltyInfo = await erc721.royaltyInfo(sell.tokenId, buy.amount);
9662
+ return this.seaport.prepareSeaportOrder(makerAddress, sell, buy, royaltyInfo,
9919
9663
  // Default order start to now
9920
9664
  new Date(),
9921
9665
  // Default order expiry to 2 years from now
@@ -9937,12 +9681,12 @@ class Orderbook {
9937
9681
  * @param {string} fulfillerAddress - The address of the account fulfilling the order.
9938
9682
  * @return {FulfillOrderResponse} Approval and fulfilment transactions.
9939
9683
  */
9940
- async fulfillOrder(listingId, fulfillerAddress) {
9684
+ async fulfillOrder(listingId, takerAddress) {
9941
9685
  const orderResult = await this.apiClient.getListing(listingId);
9942
9686
  if (orderResult.result.status !== OrderStatus.ACTIVE) {
9943
9687
  throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.result.status}`);
9944
9688
  }
9945
- return this.seaport.fulfilOrder(orderResult.result, fulfillerAddress);
9689
+ return this.seaport.fulfilOrder(orderResult.result, takerAddress);
9946
9690
  }
9947
9691
  /**
9948
9692
  * Get an unsigned cancel order transaction. Orders can only be cancelled by
@@ -11108,10 +10852,6 @@ const $bc2bfebf768286d3$export$6a2ba3c3bd042990 = {
11108
10852
  };
11109
10853
 
11110
10854
 
11111
- exports.ConnectionProviders = void 0;
11112
- (function(ConnectionProviders) {
11113
- ConnectionProviders["METAMASK"] = "metamask";
11114
- })(exports.ConnectionProviders || (exports.ConnectionProviders = {}));
11115
10855
 
11116
10856
 
11117
10857
  exports.GasEstimateType = void 0;
@@ -11122,10 +10862,23 @@ exports.GasEstimateType = void 0;
11122
10862
 
11123
10863
 
11124
10864
 
10865
+
10866
+
10867
+
10868
+ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
10869
+ [(exports.Environment).SANDBOX]: "https://checkout-api.dev.immutable.com",
10870
+ [(exports.Environment).PRODUCTION]: "https://checkout-api.sandbox.immutable.com"
10871
+ };
10872
+ const $d85ad1457a3f1a83$export$720c0def10d6df2d = {
10873
+ [(exports.ChainId).ETHEREUM]: "/v1/rpc/eth-mainnet",
10874
+ [(exports.ChainId).SEPOLIA]: "/v1/rpc/eth-sepolia"
10875
+ };
10876
+
10877
+
11125
10878
  const $a47e48dd2c04791b$export$345c852d0dc8f1df = new Map([
11126
10879
  [
11127
10880
  (exports.ChainId).ETHEREUM,
11128
- "https://checkout-api.dev.immutable.com/v1/rpc/eth-mainnet"
10881
+ `${($d85ad1457a3f1a83$export$161d4a74df65fc08)[(exports.Environment).PRODUCTION]}${($d85ad1457a3f1a83$export$720c0def10d6df2d)[(exports.ChainId).ETHEREUM]}`
11129
10882
  ],
11130
10883
  [
11131
10884
  (exports.ChainId).IMTBL_ZKEVM_TESTNET,
@@ -11133,7 +10886,7 @@ const $a47e48dd2c04791b$export$345c852d0dc8f1df = new Map([
11133
10886
  ],
11134
10887
  [
11135
10888
  (exports.ChainId).SEPOLIA,
11136
- "https://checkout-api.dev.immutable.com/v1/rpc/eth-sepolia"
10889
+ `${($d85ad1457a3f1a83$export$161d4a74df65fc08)[(exports.Environment).PRODUCTION]}${($d85ad1457a3f1a83$export$720c0def10d6df2d)[(exports.ChainId).SEPOLIA]}`
11137
10890
  ],
11138
10891
  [
11139
10892
  (exports.ChainId).IMTBL_ZKEVM_DEVNET,
@@ -11265,6 +11018,7 @@ const $e768639828688ca3$export$44dde05038008549 = {
11265
11018
 
11266
11019
 
11267
11020
 
11021
+
11268
11022
  /**
11269
11023
  * The different types of errors that can be returned by the checkout process.
11270
11024
  */ exports.CheckoutErrorType = void 0;
@@ -11324,10 +11078,6 @@ const $a8bc256d81a5e2c1$export$bacc563de539c6c3 = async (fn, customError)=>{
11324
11078
  /* eslint-disable @typescript-eslint/no-explicit-any */
11325
11079
 
11326
11080
 
11327
- var $497c134ecbc8a50f$exports = {};
11328
- $497c134ecbc8a50f$exports = JSON.parse('[{"chainId":1},{"chainId":11155111},{"chainId":13372},{"chainId":13383}]');
11329
-
11330
-
11331
11081
  // this function needs to be in a separate file to prevent circular dependencies with ./network
11332
11082
 
11333
11083
 
@@ -11377,7 +11127,8 @@ async function $de192de6ef100f9f$var$addNetworkToWallet(networkMap, web3Provider
11377
11127
  }
11378
11128
  async function $de192de6ef100f9f$export$3043f6442a9ef563(config, { type: type = (exports.NetworkFilterTypes).ALL , exclude: exclude }) {
11379
11129
  const { networkMap: networkMap } = config;
11380
- const list = ((/*@__PURE__*/$parcel$interopDefault($497c134ecbc8a50f$exports))).filter((network)=>{
11130
+ const allowedNetworkConfig = await config.remoteConfigFetcher.get("allowedNetworks");
11131
+ const list = allowedNetworkConfig.filter((network)=>{
11381
11132
  const allowAllTokens = type === (exports.NetworkFilterTypes).ALL;
11382
11133
  const networkNotExcluded = !(exclude || []).map((exc)=>exc.chainId).includes(network.chainId);
11383
11134
  return allowAllTokens && networkNotExcluded;
@@ -11655,13 +11406,13 @@ async function $bb88265fe45a0393$export$9e1fd9cc88c637a0(config, web3Provider, v
11655
11406
 
11656
11407
 
11657
11408
  var $6f3c55a615003cbf$exports = {};
11658
- $6f3c55a615003cbf$exports = JSON.parse('[{"providerName":"metamask","icon":"some-icon-url","name":"MetaMask","description":"complete web3 wallet solution","platform":["desktop"]},{"providerName":"passport","icon":"pp-icon","name":"Passport","description":"Web3 with your email!","platform":["mobile","desktop"]},{"providerName":"gamestop","icon":"gme-icon","name":"GameStop","description":"Never stopping the game!","platform":["mobile"]}]');
11409
+ $6f3c55a615003cbf$exports = JSON.parse('[{"walletProvider":"metamask","icon":"some-icon-url","name":"MetaMask","description":"complete web3 wallet solution","platform":["desktop"]},{"walletProvider":"passport","icon":"pp-icon","name":"Passport","description":"Web3 with your email!","platform":["mobile","desktop"]},{"walletProvider":"gamestop","icon":"gme-icon","name":"GameStop","description":"Never stopping the game!","platform":["mobile"]}]');
11659
11410
 
11660
11411
 
11661
11412
  async function $5cdde2ffe6360fec$export$a822caa90d7eef09({ type: type = (exports.WalletFilterTypes).ALL , exclude: exclude }) {
11662
11413
  // todo:For async API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
11663
11414
  const filteredWalletsList = ((/*@__PURE__*/$parcel$interopDefault($6f3c55a615003cbf$exports))).filter((wallet)=>{
11664
- const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.providerName).includes(wallet.providerName);
11415
+ const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.walletProvider).includes(wallet.walletProvider);
11665
11416
  const allowAllWallets = type === (exports.WalletFilterTypes).ALL;
11666
11417
  const walletsAllowedForType = wallet.platform.includes(type);
11667
11418
  return walletNotExcluded && (allowAllWallets || walletsAllowedForType);
@@ -11754,53 +11505,6 @@ async function $570856c68db0bd36$export$9e73e22953cebcfc(tokenBridge, tokenAddre
11754
11505
 
11755
11506
 
11756
11507
 
11757
- const $be6f32539b5e2cc9$var$chainId = 13383;
11758
- const $be6f32539b5e2cc9$var$commonRoutingTokens = [
11759
- {
11760
- chainId: $be6f32539b5e2cc9$var$chainId,
11761
- address: "0xFEa9FF93DC0C6DC73F8Be009Fe7a22Bb9dcE8A2d",
11762
- decimals: 18,
11763
- symbol: "FUN",
11764
- name: "The Fungibles Token"
11765
- },
11766
- {
11767
- chainId: $be6f32539b5e2cc9$var$chainId,
11768
- address: "0x12739A8f1A8035F439092D016DAE19A2874F30d2",
11769
- decimals: 18,
11770
- symbol: "USDC",
11771
- name: "US Dollar Coin"
11772
- },
11773
- {
11774
- chainId: $be6f32539b5e2cc9$var$chainId,
11775
- address: "0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e",
11776
- decimals: 18,
11777
- symbol: "DEX",
11778
- name: "Dex"
11779
- }
11780
- ];
11781
- const $be6f32539b5e2cc9$var$contractOverrides = {
11782
- multicall: "0x7b19942581c9462D54155801fCA4a17edf3fD135",
11783
- coreFactory: "0xD17c98b38bA28c7eA1080317EB9AB2b9663BEd92",
11784
- quoterV2: "0x786ec643F231960D4C1A4E336990F8E7bF8f1277",
11785
- peripheryRouter: "0x0d44bB14Cc1dD999255aBB1576b4964D0439C63D",
11786
- migrator: "0x0Afe6F5f4DC34461A801420634239FFaD50A2e44",
11787
- nonfungiblePositionManager: "0xF674847fBcca5C80315e3AE37043Dce99F6CC529",
11788
- tickLens: "0x38034F18D38b74bdE496bdF60CCdBcb25B879e8d"
11789
- };
11790
- const $be6f32539b5e2cc9$export$3e9a43ac784794d5 = ()=>({
11791
- rpcURL: "https://zkevm-rpc.dev.x.immutable.com",
11792
- exchangeContracts: $be6f32539b5e2cc9$var$contractOverrides,
11793
- commonRoutingTokens: $be6f32539b5e2cc9$var$commonRoutingTokens,
11794
- nativeToken: {
11795
- chainId: $be6f32539b5e2cc9$var$chainId,
11796
- address: "",
11797
- decimals: 18,
11798
- symbol: "IMX",
11799
- name: "Immutable X Token"
11800
- }
11801
- });
11802
-
11803
-
11804
11508
  async function $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, environment) {
11805
11509
  const rootChainProvider = readOnlyProviders.get(fromChainId);
11806
11510
  const childChainProvider = readOnlyProviders.get(toChainId);
@@ -11816,24 +11520,20 @@ async function $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId,
11816
11520
  });
11817
11521
  return new (bridgeSdk.TokenBridge)(bridgeConfig);
11818
11522
  }
11819
- async function $67fc622a2b913d5f$export$7cf6178417769841(chainId, environment) {
11820
- const exchange = new (dexSdk.Exchange)(new (dexSdk.ExchangeConfiguration)({
11523
+ async function $67fc622a2b913d5f$export$7cf6178417769841(chainId, config) {
11524
+ const dexConfig = await config.remoteConfigFetcher.get("dex");
11525
+ return new (dexSdk.Exchange)(new (dexSdk.ExchangeConfiguration)({
11821
11526
  chainId: chainId,
11822
11527
  baseConfig: new (ImmutableConfiguration)({
11823
- environment: environment
11528
+ environment: config.environment
11824
11529
  }),
11825
- overrides: ($be6f32539b5e2cc9$export$3e9a43ac784794d5)()
11530
+ overrides: dexConfig?.overrides
11826
11531
  }));
11827
- return exchange;
11828
11532
  }
11829
11533
 
11830
11534
 
11831
11535
 
11832
11536
 
11833
- var $d7b15ec974df6f92$exports = {};
11834
- $d7b15ec974df6f92$exports = JSON.parse('{"11155111":{"bridgeToL2Addresses":{"gasTokenAddress":"NATIVE","fromAddress":"0xd1da7e9b2Ce1a4024DaD52b3D37F4c5c91a525C1"},"swapAddresses":{"inAddress":"0xFEa9FF93DC0C6DC73F8Be009Fe7a22Bb9dcE8A2d","outAddress":"0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e"}}}');
11835
-
11836
-
11837
11537
  const $2e7bf45a7c9a9570$var$DUMMY_WALLET_ADDRESS = "0x0000000000000000000000000000000000000000";
11838
11538
  const $2e7bf45a7c9a9570$var$DEFAULT_TOKEN_DECIMALS = 18;
11839
11539
  const $2e7bf45a7c9a9570$var$getL1ChainId = (environment)=>{
@@ -11844,15 +11544,15 @@ const $2e7bf45a7c9a9570$var$getL2ChainId = (environment)=>{
11844
11544
  if (environment === (exports.Environment).PRODUCTION) return (exports.ChainId).IMTBL_ZKEVM_TESTNET;
11845
11545
  return (exports.ChainId).IMTBL_ZKEVM_DEVNET;
11846
11546
  };
11847
- async function $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, environment, isSpendingCapApprovalRequired, tokenAddress) {
11848
- const fromChainId = $2e7bf45a7c9a9570$var$getL1ChainId(environment);
11849
- const toChainId = $2e7bf45a7c9a9570$var$getL2ChainId(environment);
11850
- const tokenAddresses = environment === (exports.Environment).PRODUCTION ? ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[(exports.ChainId).SEPOLIA] : ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[(exports.ChainId).SEPOLIA];
11851
- const { gasTokenAddress: gasTokenAddress , fromAddress: fromAddress } = tokenAddresses.bridgeToL2Addresses;
11547
+ async function $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, config, isSpendingCapApprovalRequired, tokenAddress) {
11548
+ const fromChainId = $2e7bf45a7c9a9570$var$getL1ChainId(config.environment);
11549
+ const toChainId = $2e7bf45a7c9a9570$var$getL2ChainId(config.environment);
11550
+ const gasEstimateTokensConfig = await config.remoteConfigFetcher.get("gasEstimateTokens");
11551
+ const { gasTokenAddress: gasTokenAddress , fromAddress: fromAddress } = gasEstimateTokensConfig[fromChainId.toString()].bridgeToL2Addresses;
11852
11552
  const provider = readOnlyProviders.get(fromChainId);
11853
11553
  try {
11854
11554
  const { estimatedAmount: estimatedAmount , token: token } = await (0, $570856c68db0bd36$export$51010590edbe56a6)(provider, fromChainId, isSpendingCapApprovalRequired, tokenAddress ?? gasTokenAddress);
11855
- const tokenBridge = await $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, environment);
11555
+ const tokenBridge = await $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, config.environment);
11856
11556
  const { bridgeFee: bridgeFee , bridgeable: bridgeable } = await (0, $570856c68db0bd36$export$9e73e22953cebcfc)(tokenBridge, fromAddress, toChainId);
11857
11557
  return {
11858
11558
  gasEstimateType: (0, exports.GasEstimateType).BRIDGE_TO_L2,
@@ -11876,12 +11576,12 @@ async function $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, e
11876
11576
  };
11877
11577
  }
11878
11578
  }
11879
- async function $2e7bf45a7c9a9570$var$swapGasEstimator(environment) {
11880
- const tokenAddresses = environment === (exports.Environment).PRODUCTION ? ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[(exports.ChainId).SEPOLIA] : ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[(exports.ChainId).SEPOLIA];
11881
- const { inAddress: inAddress , outAddress: outAddress } = tokenAddresses.swapAddresses;
11882
- const chainId = $2e7bf45a7c9a9570$var$getL2ChainId(environment);
11579
+ async function $2e7bf45a7c9a9570$var$swapGasEstimator(config) {
11580
+ const chainId = $2e7bf45a7c9a9570$var$getL2ChainId(config.environment);
11581
+ const gasEstimateTokensConfig = await config.remoteConfigFetcher.get("gasEstimateTokens");
11582
+ const { inAddress: inAddress , outAddress: outAddress } = gasEstimateTokensConfig[chainId].swapAddresses;
11883
11583
  try {
11884
- const exchange = await $67fc622a2b913d5f$export$7cf6178417769841(chainId, environment);
11584
+ const exchange = await $67fc622a2b913d5f$export$7cf6178417769841(chainId, config);
11885
11585
  // Create a fake transaction to get the gas from the quote
11886
11586
  const { info: info } = await exchange.getUnsignedSwapTxFromAmountIn($2e7bf45a7c9a9570$var$DUMMY_WALLET_ADDRESS, inAddress, outAddress, (0, ethers$1.BigNumber).from((0, ethers$1.utils).parseUnits("1", $2e7bf45a7c9a9570$var$DEFAULT_TOKEN_DECIMALS)));
11887
11587
  if (info.gasFeeEstimate === null) return {
@@ -11910,12 +11610,12 @@ async function $2e7bf45a7c9a9570$var$swapGasEstimator(environment) {
11910
11610
  };
11911
11611
  }
11912
11612
  }
11913
- async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProviders, environment) {
11613
+ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProviders, config) {
11914
11614
  switch(params.gasEstimateType){
11915
11615
  case (exports.GasEstimateType).BRIDGE_TO_L2:
11916
- return await $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, environment, params.isSpendingCapApprovalRequired, params.tokenAddress);
11616
+ return await $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, config, params.isSpendingCapApprovalRequired, params.tokenAddress);
11917
11617
  case (exports.GasEstimateType).SWAP:
11918
- return await $2e7bf45a7c9a9570$var$swapGasEstimator(environment);
11618
+ return await $2e7bf45a7c9a9570$var$swapGasEstimator(config);
11919
11619
  default:
11920
11620
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Invalid type provided for gasEstimateType", (exports.CheckoutErrorType).INVALID_GAS_ESTIMATE_TYPE);
11921
11621
  }
@@ -11928,7 +11628,35 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
11928
11628
 
11929
11629
 
11930
11630
 
11931
- class $4013c5c91bb535f6$export$47a4ed4a38b9eecf extends Error {
11631
+
11632
+
11633
+ class $a492ee374ae7b613$export$d902b56530cd5f87 {
11634
+ cache;
11635
+ environment;
11636
+ constructor(params){
11637
+ this.environment = params.environment;
11638
+ }
11639
+ async load() {
11640
+ if (this.cache) return this.cache;
11641
+ let response;
11642
+ try {
11643
+ response = await (0, globalAxios$1).get(`${(0, $d85ad1457a3f1a83$export$161d4a74df65fc08)[this.environment]}/v1/config`);
11644
+ } catch (error) {
11645
+ throw new Error(`Error fetching config: ${error.message}`);
11646
+ }
11647
+ if (response.status !== 200) throw new Error(`Error fetching config: ${response.status} ${response.statusText}`);
11648
+ this.cache = response.data;
11649
+ return this.cache;
11650
+ }
11651
+ async get(key) {
11652
+ const config = await this.load();
11653
+ if (config && key) return config[key];
11654
+ return config;
11655
+ }
11656
+ }
11657
+
11658
+
11659
+ class $4013c5c91bb535f6$export$6ad73ea7e1b6f37f extends Error {
11932
11660
  message;
11933
11661
  constructor(message){
11934
11662
  super(message);
@@ -11938,11 +11666,15 @@ class $4013c5c91bb535f6$export$47a4ed4a38b9eecf extends Error {
11938
11666
  class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
11939
11667
  environment;
11940
11668
  networkMap;
11669
+ remoteConfigFetcher;
11941
11670
  constructor(config){
11942
11671
  // validate input
11943
- if (!Object.values((exports.Environment)).includes(config.baseConfig.environment)) throw new $4013c5c91bb535f6$export$47a4ed4a38b9eecf("Invalid checkout configuration of environment");
11672
+ if (!Object.values((exports.Environment)).includes(config.baseConfig.environment)) throw new $4013c5c91bb535f6$export$6ad73ea7e1b6f37f("Invalid checkout configuration of environment");
11944
11673
  this.environment = config.baseConfig.environment;
11945
11674
  this.networkMap = config.baseConfig.environment === (exports.Environment).PRODUCTION ? ($a47e48dd2c04791b$export$6f24f3cef7d501c4) : ($a47e48dd2c04791b$export$3e81fc0987227f10);
11675
+ this.remoteConfigFetcher = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
11676
+ environment: config.baseConfig.environment
11677
+ });
11946
11678
  }
11947
11679
  }
11948
11680
 
@@ -12105,7 +11837,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
12105
11837
  * @returns The gas estimate for the given action.
12106
11838
  */ async gasEstimate(params) {
12107
11839
  this.readOnlyProviders = await ($0e0060cb42e136d2$export$339cb2be73677b30)(this.config, this.readOnlyProviders);
12108
- return await $2e7bf45a7c9a9570$export$942c8de7174809fc(params, this.readOnlyProviders, this.config.environment);
11840
+ return await $2e7bf45a7c9a9570$export$942c8de7174809fc(params, this.readOnlyProviders, this.config);
12109
11841
  }
12110
11842
  }
12111
11843
 
@@ -12200,8 +11932,6 @@ $parcel$export($045213b18e9f1f94$exports, "CheckoutWidgetTagNames", () => export
12200
11932
  Network["SEPOLIA"] = "Sepolia";
12201
11933
  Network["IMTBL_ZKEVM_TESTNET"] = "Immutable zkEVM Testnet";
12202
11934
  Network["IMTBL_ZKEVM_DEVNET"] = "Immutable zkEVM Devnet";
12203
- Network["POLYGON_ZKEVM_TESTNET"] = "Polygon zkEVM Testnet";
12204
- Network["POLYGON_ZKEVM"] = "Polygon zkEVM";
12205
11935
  })(exports.Network || (exports.Network = {}));
12206
11936
  exports.WidgetTheme = void 0;
12207
11937
  (function(WidgetTheme) {
@@ -12223,14 +11953,48 @@ var $1f969328e5988c99$exports = {};
12223
11953
  $parcel$export($1f969328e5988c99$exports, "BridgeReact", () => $1f969328e5988c99$export$30f61ebf204c69f6);
12224
11954
 
12225
11955
 
11956
+ function $77ec335383336bdd$export$931068bc678f0d73(tagName, provider) {
11957
+ if (!provider) {
11958
+ // eslint-disable-next-line no-console
11959
+ console.error("no provider parsed");
11960
+ return;
11961
+ }
11962
+ let attempts = 0;
11963
+ const maxAttempts = 10;
11964
+ let timer;
11965
+ const attemptToSetProvider = ()=>{
11966
+ try {
11967
+ const elements = document.getElementsByTagName(tagName);
11968
+ const widget = elements[0];
11969
+ widget.setProvider(provider);
11970
+ window.clearInterval(timer);
11971
+ } catch (err) {
11972
+ attempts++;
11973
+ if (attempts >= maxAttempts) {
11974
+ window.clearInterval(timer);
11975
+ // eslint-disable-next-line no-console
11976
+ console.error("failed to set the provider");
11977
+ }
11978
+ }
11979
+ };
11980
+ timer = window.setInterval(attemptToSetProvider, 10);
11981
+ attemptToSetProvider();
11982
+ }
11983
+
11984
+
11985
+
12226
11986
  function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
12227
- const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
11987
+ const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , provider: provider } = props;
11988
+ (react.useEffect)(()=>{
11989
+ if (provider) ($77ec335383336bdd$export$931068bc678f0d73)((exports.CheckoutWidgetTagNames).BRIDGE, provider);
11990
+ }, [
11991
+ provider
11992
+ ]);
12228
11993
  const config = window.ImtblCheckoutWidgetConfig;
12229
11994
  return /*#__PURE__*/ (jsxRuntime.jsx)("imtbl-bridge", {
12230
11995
  widgetConfig: config,
12231
11996
  walletProvider: walletProvider,
12232
11997
  fromContractAddress: fromContractAddress ?? "",
12233
- fromNetwork: fromNetwork ?? "",
12234
11998
  amount: amount ?? ""
12235
11999
  });
12236
12000
  }
@@ -12241,12 +12005,10 @@ var $f2083cd30e2f5c56$exports = {};
12241
12005
  $parcel$export($f2083cd30e2f5c56$exports, "ConnectReact", () => $f2083cd30e2f5c56$export$49d62957f420a1e2);
12242
12006
 
12243
12007
 
12244
- function $f2083cd30e2f5c56$export$49d62957f420a1e2(props) {
12245
- const { walletProvider: walletProvider } = props;
12008
+ function $f2083cd30e2f5c56$export$49d62957f420a1e2() {
12246
12009
  const config = window.ImtblCheckoutWidgetConfig;
12247
12010
  return /*#__PURE__*/ (jsxRuntime.jsx)("imtbl-connect", {
12248
- widgetConfig: config,
12249
- walletProvider: walletProvider
12011
+ widgetConfig: config
12250
12012
  });
12251
12013
  }
12252
12014
 
@@ -12256,8 +12018,15 @@ var $a4fbb8e3a6aeff58$exports = {};
12256
12018
  $parcel$export($a4fbb8e3a6aeff58$exports, "SwapReact", () => $a4fbb8e3a6aeff58$export$971e031379577f4);
12257
12019
  /* eslint-disable max-len */
12258
12020
 
12021
+
12022
+
12259
12023
  function $a4fbb8e3a6aeff58$export$971e031379577f4(props) {
12260
- const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress } = props;
12024
+ const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress , provider: provider } = props;
12025
+ (react.useEffect)(()=>{
12026
+ if (provider) ($77ec335383336bdd$export$931068bc678f0d73)((exports.CheckoutWidgetTagNames).SWAP, provider);
12027
+ }, [
12028
+ provider
12029
+ ]);
12261
12030
  const config = window.ImtblCheckoutWidgetConfig;
12262
12031
  return /*#__PURE__*/ (jsxRuntime.jsx)("imtbl-swap", {
12263
12032
  widgetConfig: config,
@@ -12274,8 +12043,15 @@ var $89d55ace0f8f1c07$exports = {};
12274
12043
  $parcel$export($89d55ace0f8f1c07$exports, "WalletReact", () => $89d55ace0f8f1c07$export$ceaac94f34dba154);
12275
12044
 
12276
12045
 
12046
+
12047
+
12277
12048
  function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
12278
- const { walletProvider: walletProvider } = props;
12049
+ const { walletProvider: walletProvider , provider: provider } = props;
12050
+ (react.useEffect)(()=>{
12051
+ if (provider) ($77ec335383336bdd$export$931068bc678f0d73)((exports.CheckoutWidgetTagNames).WALLET, provider);
12052
+ }, [
12053
+ provider
12054
+ ]);
12279
12055
  const config = window.ImtblCheckoutWidgetConfig;
12280
12056
  return /*#__PURE__*/ (jsxRuntime.jsx)("imtbl-wallet", {
12281
12057
  widgetConfig: config,
@@ -12286,45 +12062,41 @@ function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
12286
12062
 
12287
12063
  var $430e3eda76fa4d5f$exports = {};
12288
12064
 
12065
+ $parcel$export($430e3eda76fa4d5f$exports, "DEFAULT_CHECKOUT_VERSION", () => $430e3eda76fa4d5f$export$391f2d917401f2bb);
12066
+ $parcel$export($430e3eda76fa4d5f$exports, "validateAndBuildVersion", () => $430e3eda76fa4d5f$export$46b1ae20f762ad4c);
12289
12067
  $parcel$export($430e3eda76fa4d5f$exports, "CheckoutWidgets", () => $430e3eda76fa4d5f$export$af210a0808087845);
12290
12068
  $parcel$export($430e3eda76fa4d5f$exports, "UpdateConfig", () => $430e3eda76fa4d5f$export$bf1548ba7e61c17f);
12291
- $parcel$export($430e3eda76fa4d5f$exports, "SetProvider", () => $430e3eda76fa4d5f$export$931068bc678f0d73);
12069
+ const $430e3eda76fa4d5f$export$391f2d917401f2bb = "0.1.9-alpha";
12070
+ function $430e3eda76fa4d5f$export$46b1ae20f762ad4c(version) {
12071
+ if (!version || version?.major === undefined || version.major < 0) return $430e3eda76fa4d5f$export$391f2d917401f2bb;
12072
+ if (version.major === 0 && version.minor === 0 && version.patch === 0) return $430e3eda76fa4d5f$export$391f2d917401f2bb;
12073
+ let validatedVersion = $430e3eda76fa4d5f$export$391f2d917401f2bb;
12074
+ if (!Number.isNaN(version.major) && version.major >= 0) validatedVersion = version.major.toString();
12075
+ if (version.minor !== undefined && !Number.isNaN(version.minor) && version.minor >= 0) validatedVersion += `.${version.minor.toString()}`;
12076
+ if (version.patch !== undefined && !Number.isNaN(version.patch) && version.patch >= 0) {
12077
+ if (version.minor === undefined) validatedVersion += `.0.${version.patch.toString()}`;
12078
+ else validatedVersion += `.${version.patch.toString()}`;
12079
+ }
12080
+ // TODO: at the moment all of the releases that include
12081
+ // the checkout widgets script have '-alpha' appended
12082
+ // Change this when we go to testnet. ticket WT-1432
12083
+ validatedVersion += "-alpha";
12084
+ if (version.build !== undefined) validatedVersion += `.${version.build}`;
12085
+ return validatedVersion;
12086
+ }
12292
12087
  function $430e3eda76fa4d5f$export$af210a0808087845(config) {
12293
12088
  const checkoutWidgetJS = document.createElement("script");
12294
- checkoutWidgetJS.setAttribute("src", "http://localhost:3000/lib/js/imtbl-checkout.js");
12089
+ const validVersion = $430e3eda76fa4d5f$export$46b1ae20f762ad4c(config?.version);
12090
+ {
12091
+ const cdnUrl = `https://cdn.jsdelivr.net/npm/@imtbl/sdk@${validVersion}/dist/browser/checkout.js`;
12092
+ checkoutWidgetJS.setAttribute("src", cdnUrl);
12093
+ }
12295
12094
  document.head.appendChild(checkoutWidgetJS);
12296
12095
  window.ImtblCheckoutWidgetConfig = JSON.stringify(config);
12297
12096
  }
12298
12097
  function $430e3eda76fa4d5f$export$bf1548ba7e61c17f(config) {
12299
12098
  window.ImtblCheckoutWidgetConfig = JSON.stringify(config);
12300
12099
  }
12301
- function $430e3eda76fa4d5f$export$931068bc678f0d73(tagName, provider) {
12302
- if (!provider) {
12303
- // eslint-disable-next-line no-console
12304
- console.error("no provider parsed");
12305
- return;
12306
- }
12307
- let attempts = 0;
12308
- const maxAttempts = 10;
12309
- let timer;
12310
- const attemptToSetProvider = ()=>{
12311
- try {
12312
- const elements = document.getElementsByTagName(tagName);
12313
- const widget = elements[0];
12314
- widget.setProvider(provider);
12315
- window.clearInterval(timer);
12316
- } catch (err) {
12317
- attempts++;
12318
- if (attempts >= maxAttempts) {
12319
- window.clearInterval(timer);
12320
- // eslint-disable-next-line no-console
12321
- console.error("failed to set the provider");
12322
- }
12323
- }
12324
- };
12325
- timer = window.setInterval(attemptToSetProvider, 10);
12326
- attemptToSetProvider();
12327
- }
12328
12100
 
12329
12101
  /* Autogenerated file. Do not edit manually. */
12330
12102
  /* tslint:disable */
@@ -13833,25 +13605,25 @@ class ERC721PermissionedMintable {
13833
13605
  /**
13834
13606
  * @returns a populated transaction for the setApprovalForAll contract function
13835
13607
  */
13836
- async setApprovalForAll(operator, approved, overrides = {}) {
13608
+ async populateSetApprovalForAll(operator, approved, overrides = {}) {
13837
13609
  return await this.contract.populateTransaction.setApprovalForAll(operator, approved, overrides);
13838
13610
  }
13839
13611
  /**
13840
13612
  * @returns a populated transaction for the setBaseURI contract function
13841
13613
  */
13842
- async setBaseURI(baseURI_, overrides = {}) {
13614
+ async populateSetBaseURI(baseURI_, overrides = {}) {
13843
13615
  return await this.contract.populateTransaction.setBaseURI(baseURI_, overrides);
13844
13616
  }
13845
13617
  /**
13846
13618
  * @returns a populated transaction for the setContractURI contract function
13847
13619
  */
13848
- async setContractURI(_contractURI, overrides = {}) {
13620
+ async populateSetContractURI(_contractURI, overrides = {}) {
13849
13621
  return await this.contract.populateTransaction.setContractURI(_contractURI, overrides);
13850
13622
  }
13851
13623
  /**
13852
13624
  * @returns a populated transaction for the setRoyaltyAllowlistRegistry contract function
13853
13625
  */
13854
- async setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides = {}) {
13626
+ async populateSetRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides = {}) {
13855
13627
  return await this.contract.populateTransaction.setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides);
13856
13628
  }
13857
13629
  }
@@ -13867,9 +13639,11 @@ Object.defineProperty(exports, 'imxClientGenerateLegacyStarkPrivateKey', {
13867
13639
  exports.APIError = APIError;
13868
13640
  exports.BlockchainData = BlockchainData;
13869
13641
  exports.BridgeReact = $1f969328e5988c99$export$30f61ebf204c69f6;
13642
+ exports.CHECKOUT_API_BASE_URL = $d85ad1457a3f1a83$export$161d4a74df65fc08;
13870
13643
  exports.Checkout = $a8cb37a3fc8eb863$export$1f60ba4ec72508a0;
13871
13644
  exports.CheckoutWidgets = $430e3eda76fa4d5f$export$af210a0808087845;
13872
13645
  exports.ConnectReact = $f2083cd30e2f5c56$export$49d62957f420a1e2;
13646
+ exports.DEFAULT_CHECKOUT_VERSION = $430e3eda76fa4d5f$export$391f2d917401f2bb;
13873
13647
  exports.ERC20 = ERC20;
13874
13648
  exports.ERC721PermissionedMintable = ERC721PermissionedMintable;
13875
13649
  exports.GenericIMXProvider = GenericIMXProvider;
@@ -13881,8 +13655,8 @@ exports.Passport = Passport;
13881
13655
  exports.PassportError = PassportError;
13882
13656
  exports.ProviderConfiguration = ProviderConfiguration;
13883
13657
  exports.RPC_URL_MAP = $a47e48dd2c04791b$export$345c852d0dc8f1df;
13884
- exports.SetProvider = $430e3eda76fa4d5f$export$931068bc678f0d73;
13885
13658
  exports.SwapReact = $a4fbb8e3a6aeff58$export$971e031379577f4;
13886
13659
  exports.UpdateConfig = $430e3eda76fa4d5f$export$bf1548ba7e61c17f;
13887
13660
  exports.WalletReact = $89d55ace0f8f1c07$export$ceaac94f34dba154;
13888
13661
  exports.module = module$1;
13662
+ exports.validateAndBuildVersion = $430e3eda76fa4d5f$export$46b1ae20f762ad4c;