@imtbl/sdk 0.1.9-alpha → 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.js CHANGED
@@ -17,7 +17,7 @@ import { BigNumber as BigNumber$2, utils as utils$2 } from 'ethers/lib/ethers';
17
17
  import { BridgeConfiguration, ETH_MAINNET_TO_ZKEVM_MAINNET, ETH_SEPOLIA_TO_ZKEVM_DEVNET, TokenBridge } from '@imtbl/bridge-sdk';
18
18
  import { Exchange, ExchangeConfiguration } from '@imtbl/dex-sdk';
19
19
  import { jsx } from 'react/jsx-runtime';
20
- import 'react';
20
+ import { useEffect } from 'react';
21
21
 
22
22
  var Environment;
23
23
  (function (Environment) {
@@ -717,292 +717,6 @@ class CollectionsApi extends BaseAPI$1 {
717
717
  }
718
718
  }
719
719
 
720
- /* tslint:disable */
721
- /* eslint-disable */
722
- /**
723
- * Immutable X API
724
- * Immutable Multi Rollup API
725
- *
726
- * The version of the OpenAPI document: 1.0.0
727
- * Contact: support@immutable.com
728
- *
729
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
730
- * https://openapi-generator.tech
731
- * Do not edit the class manually.
732
- */
733
- /**
734
- * ListingsApi - axios parameter creator
735
- * @export
736
- */
737
- const ListingsApiAxiosParamCreator = function (configuration) {
738
- return {
739
- /**
740
- * Create a listing
741
- * @summary Create a listing
742
- * @param {string} chainName
743
- * @param {CreateListingRequestBody} createListingRequestBody
744
- * @param {*} [options] Override http request option.
745
- * @throws {RequiredError}
746
- */
747
- createListing: async (chainName, createListingRequestBody, options = {}) => {
748
- // verify required parameter 'chainName' is not null or undefined
749
- assertParamExists$1('createListing', 'chainName', chainName);
750
- // verify required parameter 'createListingRequestBody' is not null or undefined
751
- assertParamExists$1('createListing', 'createListingRequestBody', createListingRequestBody);
752
- const localVarPath = `/v1/chains/{chain_name}/listings`
753
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
754
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
755
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
756
- let baseOptions;
757
- if (configuration) {
758
- baseOptions = configuration.baseOptions;
759
- }
760
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
761
- const localVarHeaderParameter = {};
762
- const localVarQueryParameter = {};
763
- localVarHeaderParameter['Content-Type'] = 'application/json';
764
- setSearchParams$1(localVarUrlObj, localVarQueryParameter);
765
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
766
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
767
- localVarRequestOptions.data = serializeDataIfNeeded(createListingRequestBody, localVarRequestOptions, configuration);
768
- return {
769
- url: toPathString$1(localVarUrlObj),
770
- options: localVarRequestOptions,
771
- };
772
- },
773
- /**
774
- * Get a single listing by ID
775
- * @summary Get a single listing by ID
776
- * @param {string} chainName
777
- * @param {string} listingId Global Order identifier
778
- * @param {*} [options] Override http request option.
779
- * @throws {RequiredError}
780
- */
781
- getListing: async (chainName, listingId, options = {}) => {
782
- // verify required parameter 'chainName' is not null or undefined
783
- assertParamExists$1('getListing', 'chainName', chainName);
784
- // verify required parameter 'listingId' is not null or undefined
785
- assertParamExists$1('getListing', 'listingId', listingId);
786
- const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
787
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
788
- .replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
789
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
790
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
791
- let baseOptions;
792
- if (configuration) {
793
- baseOptions = configuration.baseOptions;
794
- }
795
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
796
- const localVarHeaderParameter = {};
797
- const localVarQueryParameter = {};
798
- setSearchParams$1(localVarUrlObj, localVarQueryParameter);
799
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
800
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
801
- return {
802
- url: toPathString$1(localVarUrlObj),
803
- options: localVarRequestOptions,
804
- };
805
- },
806
- /**
807
- * List all listings
808
- * @summary List all listings
809
- * @param {string} chainName
810
- * @param {OrderStatus} [status] Order status to filter by
811
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
812
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
813
- * @param {number} [pageSize] Maximum number of orders to return per page
814
- * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
815
- * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
816
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
817
- * @param {*} [options] Override http request option.
818
- * @throws {RequiredError}
819
- */
820
- listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
821
- // verify required parameter 'chainName' is not null or undefined
822
- assertParamExists$1('listListings', 'chainName', chainName);
823
- const localVarPath = `/v1/chains/{chain_name}/listings`
824
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
825
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
826
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
827
- let baseOptions;
828
- if (configuration) {
829
- baseOptions = configuration.baseOptions;
830
- }
831
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
832
- const localVarHeaderParameter = {};
833
- const localVarQueryParameter = {};
834
- if (status !== undefined) {
835
- localVarQueryParameter['status'] = status;
836
- }
837
- if (sellItemContractAddress !== undefined) {
838
- localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
839
- }
840
- if (sellItemTokenId !== undefined) {
841
- localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
842
- }
843
- if (pageSize !== undefined) {
844
- localVarQueryParameter['page_size'] = pageSize;
845
- }
846
- if (sortBy !== undefined) {
847
- localVarQueryParameter['sort_by'] = sortBy;
848
- }
849
- if (sortDirection !== undefined) {
850
- localVarQueryParameter['sort_direction'] = sortDirection;
851
- }
852
- if (pageCursor !== undefined) {
853
- localVarQueryParameter['page_cursor'] = pageCursor;
854
- }
855
- setSearchParams$1(localVarUrlObj, localVarQueryParameter);
856
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
857
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
858
- return {
859
- url: toPathString$1(localVarUrlObj),
860
- options: localVarRequestOptions,
861
- };
862
- },
863
- };
864
- };
865
- /**
866
- * ListingsApi - functional programming interface
867
- * @export
868
- */
869
- const ListingsApiFp = function (configuration) {
870
- const localVarAxiosParamCreator = ListingsApiAxiosParamCreator(configuration);
871
- return {
872
- /**
873
- * Create a listing
874
- * @summary Create a listing
875
- * @param {string} chainName
876
- * @param {CreateListingRequestBody} createListingRequestBody
877
- * @param {*} [options] Override http request option.
878
- * @throws {RequiredError}
879
- */
880
- async createListing(chainName, createListingRequestBody, options) {
881
- const localVarAxiosArgs = await localVarAxiosParamCreator.createListing(chainName, createListingRequestBody, options);
882
- return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
883
- },
884
- /**
885
- * Get a single listing by ID
886
- * @summary Get a single listing by ID
887
- * @param {string} chainName
888
- * @param {string} listingId Global Order identifier
889
- * @param {*} [options] Override http request option.
890
- * @throws {RequiredError}
891
- */
892
- async getListing(chainName, listingId, options) {
893
- const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
894
- return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
895
- },
896
- /**
897
- * List all listings
898
- * @summary List all listings
899
- * @param {string} chainName
900
- * @param {OrderStatus} [status] Order status to filter by
901
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
902
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
903
- * @param {number} [pageSize] Maximum number of orders to return per page
904
- * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
905
- * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
906
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
907
- * @param {*} [options] Override http request option.
908
- * @throws {RequiredError}
909
- */
910
- async listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
911
- const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
912
- return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
913
- },
914
- };
915
- };
916
- /**
917
- * ListingsApi - factory interface
918
- * @export
919
- */
920
- const ListingsApiFactory = function (configuration, basePath, axios) {
921
- const localVarFp = ListingsApiFp(configuration);
922
- return {
923
- /**
924
- * Create a listing
925
- * @summary Create a listing
926
- * @param {string} chainName
927
- * @param {CreateListingRequestBody} createListingRequestBody
928
- * @param {*} [options] Override http request option.
929
- * @throws {RequiredError}
930
- */
931
- createListing(chainName, createListingRequestBody, options) {
932
- return localVarFp.createListing(chainName, createListingRequestBody, options).then((request) => request(axios, basePath));
933
- },
934
- /**
935
- * Get a single listing by ID
936
- * @summary Get a single listing by ID
937
- * @param {string} chainName
938
- * @param {string} listingId Global Order identifier
939
- * @param {*} [options] Override http request option.
940
- * @throws {RequiredError}
941
- */
942
- getListing(chainName, listingId, options) {
943
- return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
944
- },
945
- /**
946
- * List all listings
947
- * @summary List all listings
948
- * @param {string} chainName
949
- * @param {OrderStatus} [status] Order status to filter by
950
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
951
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
952
- * @param {number} [pageSize] Maximum number of orders to return per page
953
- * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
954
- * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
955
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
956
- * @param {*} [options] Override http request option.
957
- * @throws {RequiredError}
958
- */
959
- listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
960
- return localVarFp.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
961
- },
962
- };
963
- };
964
- /**
965
- * ListingsApi - object-oriented interface
966
- * @export
967
- * @class ListingsApi
968
- * @extends {BaseAPI}
969
- */
970
- class ListingsApi extends BaseAPI$1 {
971
- /**
972
- * Create a listing
973
- * @summary Create a listing
974
- * @param {ListingsApiCreateListingRequest} requestParameters Request parameters.
975
- * @param {*} [options] Override http request option.
976
- * @throws {RequiredError}
977
- * @memberof ListingsApi
978
- */
979
- createListing(requestParameters, options) {
980
- return ListingsApiFp(this.configuration).createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(this.axios, this.basePath));
981
- }
982
- /**
983
- * Get a single listing by ID
984
- * @summary Get a single listing by ID
985
- * @param {ListingsApiGetListingRequest} requestParameters Request parameters.
986
- * @param {*} [options] Override http request option.
987
- * @throws {RequiredError}
988
- * @memberof ListingsApi
989
- */
990
- getListing(requestParameters, options) {
991
- return ListingsApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
992
- }
993
- /**
994
- * List all listings
995
- * @summary List all listings
996
- * @param {ListingsApiListListingsRequest} requestParameters Request parameters.
997
- * @param {*} [options] Override http request option.
998
- * @throws {RequiredError}
999
- * @memberof ListingsApi
1000
- */
1001
- listListings(requestParameters, options) {
1002
- 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));
1003
- }
1004
- }
1005
-
1006
720
  /* tslint:disable */
1007
721
  /* eslint-disable */
1008
722
  /**
@@ -1453,7 +1167,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1453
1167
  assertParamExists$1('createListing', 'chainName', chainName);
1454
1168
  // verify required parameter 'createListingRequestBody' is not null or undefined
1455
1169
  assertParamExists$1('createListing', 'createListingRequestBody', createListingRequestBody);
1456
- const localVarPath = `/v1/chains/{chain_name}/listings`
1170
+ const localVarPath = `/v1/chains/{chain_name}/orders/listings`
1457
1171
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1458
1172
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1459
1173
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
@@ -1487,7 +1201,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1487
1201
  assertParamExists$1('getListing', 'chainName', chainName);
1488
1202
  // verify required parameter 'listingId' is not null or undefined
1489
1203
  assertParamExists$1('getListing', 'listingId', listingId);
1490
- const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
1204
+ const localVarPath = `/v1/chains/{chain_name}/orders/listings/{listing_id}`
1491
1205
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
1492
1206
  .replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
1493
1207
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -1513,6 +1227,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1513
1227
  * @param {string} chainName
1514
1228
  * @param {OrderStatus} [status] Order status to filter by
1515
1229
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1230
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1516
1231
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
1517
1232
  * @param {number} [pageSize] Maximum number of orders to return per page
1518
1233
  * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
@@ -1521,10 +1236,10 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1521
1236
  * @param {*} [options] Override http request option.
1522
1237
  * @throws {RequiredError}
1523
1238
  */
1524
- listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1239
+ listListings: async (chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1525
1240
  // verify required parameter 'chainName' is not null or undefined
1526
1241
  assertParamExists$1('listListings', 'chainName', chainName);
1527
- const localVarPath = `/v1/chains/{chain_name}/listings`
1242
+ const localVarPath = `/v1/chains/{chain_name}/orders/listings`
1528
1243
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1529
1244
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1530
1245
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
@@ -1541,6 +1256,9 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1541
1256
  if (sellItemContractAddress !== undefined) {
1542
1257
  localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
1543
1258
  }
1259
+ if (buyItemContractAddress !== undefined) {
1260
+ localVarQueryParameter['buy_item_contract_address'] = buyItemContractAddress;
1261
+ }
1544
1262
  if (sellItemTokenId !== undefined) {
1545
1263
  localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
1546
1264
  }
@@ -1603,6 +1321,7 @@ const OrdersApiFp = function (configuration) {
1603
1321
  * @param {string} chainName
1604
1322
  * @param {OrderStatus} [status] Order status to filter by
1605
1323
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1324
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1606
1325
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
1607
1326
  * @param {number} [pageSize] Maximum number of orders to return per page
1608
1327
  * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
@@ -1611,8 +1330,8 @@ const OrdersApiFp = function (configuration) {
1611
1330
  * @param {*} [options] Override http request option.
1612
1331
  * @throws {RequiredError}
1613
1332
  */
1614
- async listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1615
- const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
1333
+ async listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1334
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
1616
1335
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1617
1336
  },
1618
1337
  };
@@ -1652,6 +1371,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1652
1371
  * @param {string} chainName
1653
1372
  * @param {OrderStatus} [status] Order status to filter by
1654
1373
  * @param {string} [sellItemContractAddress] Sell item contract address to filter by
1374
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
1655
1375
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
1656
1376
  * @param {number} [pageSize] Maximum number of orders to return per page
1657
1377
  * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
@@ -1660,8 +1380,8 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1660
1380
  * @param {*} [options] Override http request option.
1661
1381
  * @throws {RequiredError}
1662
1382
  */
1663
- listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1664
- return localVarFp.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1383
+ listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1384
+ return localVarFp.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1665
1385
  },
1666
1386
  };
1667
1387
  };
@@ -1703,7 +1423,7 @@ class OrdersApi extends BaseAPI$1 {
1703
1423
  * @memberof OrdersApi
1704
1424
  */
1705
1425
  listListings(requestParameters, options) {
1706
- 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));
1426
+ 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));
1707
1427
  }
1708
1428
  }
1709
1429
 
@@ -1736,7 +1456,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
1736
1456
  createCounterfactualAddress: async (createCounterfactualAddressRequest, options = {}) => {
1737
1457
  // verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
1738
1458
  assertParamExists$1('createCounterfactualAddress', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
1739
- const localVarPath = `/v1/counterfactual-address`;
1459
+ const localVarPath = `/passport-mr/v1/counterfactual-address`;
1740
1460
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1741
1461
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1742
1462
  let baseOptions;
@@ -2236,9 +1956,13 @@ const ActivityType = {
2236
1956
  * https://openapi-generator.tech
2237
1957
  * Do not edit the class manually.
2238
1958
  */
2239
- const BuyItemItemTypeEnum = {
2240
- Native: 'NATIVE',
2241
- Erc20: 'ERC20'
1959
+ /**
1960
+ * The collection contract type
1961
+ * @export
1962
+ * @enum {string}
1963
+ */
1964
+ const CollectionContractType = {
1965
+ Erc721: 'ERC721'
2242
1966
  };
2243
1967
 
2244
1968
  /* tslint:disable */
@@ -2254,13 +1978,25 @@ const BuyItemItemTypeEnum = {
2254
1978
  * https://openapi-generator.tech
2255
1979
  * Do not edit the class manually.
2256
1980
  */
1981
+ const CreateOrderProtocolDataOrderTypeEnum = {
1982
+ FullRestricted: 'FULL_RESTRICTED'
1983
+ };
1984
+
1985
+ /* tslint:disable */
1986
+ /* eslint-disable */
2257
1987
  /**
2258
- * The collection contract type
2259
- * @export
2260
- * @enum {string}
1988
+ * Immutable X API
1989
+ * Immutable Multi Rollup API
1990
+ *
1991
+ * The version of the OpenAPI document: 1.0.0
1992
+ * Contact: support@immutable.com
1993
+ *
1994
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1995
+ * https://openapi-generator.tech
1996
+ * Do not edit the class manually.
2261
1997
  */
2262
- const CollectionContractType = {
2263
- Erc721: 'ERC721'
1998
+ const ERC20ItemItemTypeEnum = {
1999
+ Erc20: 'ERC20'
2264
2000
  };
2265
2001
 
2266
2002
  /* tslint:disable */
@@ -2276,8 +2012,8 @@ const CollectionContractType = {
2276
2012
  * https://openapi-generator.tech
2277
2013
  * Do not edit the class manually.
2278
2014
  */
2279
- const CreateOrderProtocolDataOrderTypeEnum = {
2280
- FullRestricted: 'FULL_RESTRICTED'
2015
+ const ERC721ItemItemTypeEnum = {
2016
+ Erc721: 'ERC721'
2281
2017
  };
2282
2018
 
2283
2019
  /* tslint:disable */
@@ -2332,18 +2068,8 @@ const NFTContractType = {
2332
2068
  * https://openapi-generator.tech
2333
2069
  * Do not edit the class manually.
2334
2070
  */
2335
- /**
2336
- * The Order status
2337
- * @export
2338
- * @enum {string}
2339
- */
2340
- const OrderStatus$1 = {
2341
- Pending: 'PENDING',
2342
- Active: 'ACTIVE',
2343
- Inactive: 'INACTIVE',
2344
- Filled: 'FILLED',
2345
- Cancelled: 'CANCELLED',
2346
- Expired: 'EXPIRED'
2071
+ const NativeItemItemTypeEnum = {
2072
+ Native: 'NATIVE'
2347
2073
  };
2348
2074
 
2349
2075
  /* tslint:disable */
@@ -2359,8 +2085,18 @@ const OrderStatus$1 = {
2359
2085
  * https://openapi-generator.tech
2360
2086
  * Do not edit the class manually.
2361
2087
  */
2362
- const SaleFeeTypeEnum = {
2363
- Royalty: 'ROYALTY'
2088
+ /**
2089
+ * The Order status
2090
+ * @export
2091
+ * @enum {string}
2092
+ */
2093
+ const OrderStatus$1 = {
2094
+ Pending: 'PENDING',
2095
+ Active: 'ACTIVE',
2096
+ Inactive: 'INACTIVE',
2097
+ Filled: 'FILLED',
2098
+ Cancelled: 'CANCELLED',
2099
+ Expired: 'EXPIRED'
2364
2100
  };
2365
2101
 
2366
2102
  /* tslint:disable */
@@ -2376,8 +2112,8 @@ const SaleFeeTypeEnum = {
2376
2112
  * https://openapi-generator.tech
2377
2113
  * Do not edit the class manually.
2378
2114
  */
2379
- const SellItemItemTypeEnum = {
2380
- Erc721: 'ERC721'
2115
+ const SaleFeeTypeEnum = {
2116
+ Royalty: 'ROYALTY'
2381
2117
  };
2382
2118
 
2383
2119
  /* tslint:disable */
@@ -2429,7 +2165,6 @@ var index = /*#__PURE__*/Object.freeze({
2429
2165
  ActivitiesApiFactory: ActivitiesApiFactory,
2430
2166
  ActivitiesApiFp: ActivitiesApiFp,
2431
2167
  ActivityType: ActivityType,
2432
- BuyItemItemTypeEnum: BuyItemItemTypeEnum,
2433
2168
  ChainsApi: ChainsApi,
2434
2169
  ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
2435
2170
  ChainsApiFactory: ChainsApiFactory,
@@ -2441,12 +2176,11 @@ var index = /*#__PURE__*/Object.freeze({
2441
2176
  CollectionsApiFp: CollectionsApiFp,
2442
2177
  Configuration: Configuration$1,
2443
2178
  CreateOrderProtocolDataOrderTypeEnum: CreateOrderProtocolDataOrderTypeEnum,
2179
+ ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
2180
+ ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
2444
2181
  FeeFeeTypeEnum: FeeFeeTypeEnum,
2445
- ListingsApi: ListingsApi,
2446
- ListingsApiAxiosParamCreator: ListingsApiAxiosParamCreator,
2447
- ListingsApiFactory: ListingsApiFactory,
2448
- ListingsApiFp: ListingsApiFp,
2449
2182
  NFTContractType: NFTContractType,
2183
+ NativeItemItemTypeEnum: NativeItemItemTypeEnum,
2450
2184
  NftOwnersApi: NftOwnersApi,
2451
2185
  NftOwnersApiAxiosParamCreator: NftOwnersApiAxiosParamCreator,
2452
2186
  NftOwnersApiFactory: NftOwnersApiFactory,
@@ -2465,7 +2199,6 @@ var index = /*#__PURE__*/Object.freeze({
2465
2199
  PassportApiFactory: PassportApiFactory,
2466
2200
  PassportApiFp: PassportApiFp,
2467
2201
  SaleFeeTypeEnum: SaleFeeTypeEnum,
2468
- SellItemItemTypeEnum: SellItemItemTypeEnum,
2469
2202
  TokenContractType: TokenContractType,
2470
2203
  TokensApi: TokensApi,
2471
2204
  TokensApiAxiosParamCreator: TokensApiAxiosParamCreator,
@@ -2492,7 +2225,7 @@ class APIError extends Error {
2492
2225
 
2493
2226
  /* eslint-disable implicit-arrow-linebreak */
2494
2227
  const defaultHeaders = {
2495
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.9-alpha',
2228
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.9-alpha.2',
2496
2229
  };
2497
2230
  /**
2498
2231
  * createAPIConfiguration to create a custom Configuration
@@ -2758,7 +2491,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2758
2491
  chainID,
2759
2492
  coreContractAddress,
2760
2493
  registrationContractAddress,
2761
- sdkVersion: 'ts-immutable-sdk-0.1.9-alpha',
2494
+ sdkVersion: 'ts-immutable-sdk-0.1.9-alpha.2',
2762
2495
  });
2763
2496
  /**
2764
2497
  * Sets `sdkVersion` at the time of build
@@ -7029,7 +6762,7 @@ class AuthManager {
7029
6762
  }
7030
6763
  static mapOidcUserToDomainModel = (oidcUser) => {
7031
6764
  const passport = oidcUser.profile?.passport;
7032
- return {
6765
+ const user = {
7033
6766
  expired: oidcUser.expired,
7034
6767
  idToken: oidcUser.id_token,
7035
6768
  accessToken: oidcUser.access_token,
@@ -7039,10 +6772,21 @@ class AuthManager {
7039
6772
  email: oidcUser.profile.email,
7040
6773
  nickname: oidcUser.profile.nickname,
7041
6774
  },
7042
- etherKey: passport?.ether_key || '',
7043
- starkKey: passport?.stark_key || '',
7044
- userAdminKey: passport?.user_admin_key || '',
7045
6775
  };
6776
+ if (passport?.imx_eth_address) {
6777
+ user.imx = {
6778
+ ethAddress: passport?.imx_eth_address,
6779
+ starkAddress: passport?.imx_stark_address,
6780
+ userAdminAddress: passport?.imx_user_admin_address,
6781
+ };
6782
+ }
6783
+ if (passport?.zkevm_eth_address) {
6784
+ user.zkEvm = {
6785
+ ethAddress: passport?.zkevm_eth_address,
6786
+ userAdminAddress: passport?.zkevm_user_admin_address,
6787
+ };
6788
+ }
6789
+ return user;
7046
6790
  };
7047
6791
  async login() {
7048
6792
  return withPassportError(async () => {
@@ -7110,7 +6854,7 @@ const getStarkSigner = async (signer) => withPassportError(async () => {
7110
6854
 
7111
6855
  async function exchangeTransfer$1({ user, starkSigner, request, exchangesApi, }) {
7112
6856
  return withPassportError(async () => {
7113
- const ethAddress = user.etherKey;
6857
+ const { ethAddress } = user.imx;
7114
6858
  const transferAmount = request.amount;
7115
6859
  const signableResult = await exchangesApi.getExchangeSignableTransfer({
7116
6860
  id: request.transactionID,
@@ -7308,7 +7052,7 @@ class ConfirmationScreen {
7308
7052
  const ERC721$1 = 'ERC721';
7309
7053
  async function createOrder$1({ starkSigner, user, request, ordersApi, confirmationScreen, }) {
7310
7054
  return withPassportError(async () => {
7311
- const ethAddress = user.etherKey;
7055
+ const { ethAddress } = user.imx;
7312
7056
  const amountSell = request.sell.type === ERC721$1 ? '1' : request.sell.amount;
7313
7057
  const amountBuy = request.buy.type === ERC721$1 ? '1' : request.buy.amount;
7314
7058
  const getSignableOrderRequestV3 = {
@@ -7424,7 +7168,7 @@ async function registerPassport({ ethSigner, starkSigner, usersApi }, authorizat
7424
7168
 
7425
7169
  async function createTrade$1({ request, tradesApi, user, starkSigner, confirmationScreen, }) {
7426
7170
  return withPassportError(async () => {
7427
- const ethAddress = user.etherKey;
7171
+ const { ethAddress } = user.imx;
7428
7172
  const getSignableTradeRequest = {
7429
7173
  expiration_timestamp: request.expiration_timestamp,
7430
7174
  fees: request.fees,
@@ -7534,7 +7278,7 @@ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicA
7534
7278
  return withPassportError(async () => {
7535
7279
  const transferAmount = request.type === ERC721$2 ? '1' : request.amount;
7536
7280
  const getSignableTransferRequest = {
7537
- sender: user.etherKey,
7281
+ sender: user.imx.ethAddress,
7538
7282
  token: convertToSignableToken(request),
7539
7283
  amount: transferAmount,
7540
7284
  receiver: request.receiver,
@@ -7580,7 +7324,7 @@ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicA
7580
7324
  }
7581
7325
  async function batchNftTransfer({ user, starkSigner, request, transfersApi, confirmationScreen, }) {
7582
7326
  return withPassportError(async () => {
7583
- const ethAddress = user.etherKey;
7327
+ const { ethAddress } = user.imx;
7584
7328
  const signableRequests = request.map((nftTransfer) => ({
7585
7329
  amount: '1',
7586
7330
  token: convertToSignableToken({
@@ -7732,7 +7476,7 @@ class PassportImxProvider {
7732
7476
  throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
7733
7477
  }
7734
7478
  getAddress() {
7735
- return Promise.resolve(this.user.etherKey);
7479
+ return Promise.resolve(this.user.imx.ethAddress);
7736
7480
  }
7737
7481
  }
7738
7482
 
@@ -7768,10 +7512,10 @@ class PassportImxProviderFactory {
7768
7512
  const web3Provider = new Web3Provider(magicRpcProvider);
7769
7513
  const ethSigner = web3Provider.getSigner();
7770
7514
  const starkSigner = await getStarkSigner(ethSigner);
7771
- if (!user.etherKey) {
7772
- const userWithEtherKey = await this.registerStarkEx(ethSigner, starkSigner, user.accessToken);
7515
+ if (!user.imx?.ethAddress) {
7516
+ const userImx = await this.registerStarkEx(ethSigner, starkSigner, user.accessToken);
7773
7517
  return new PassportImxProvider({
7774
- user: userWithEtherKey,
7518
+ user: userImx,
7775
7519
  starkSigner,
7776
7520
  immutableXClient: this.immutableXClient,
7777
7521
  imxPublicApiDomain: this.config.imxPublicApiDomain,
@@ -7796,7 +7540,7 @@ class PassportImxProviderFactory {
7796
7540
  // User metadata is updated asynchronously. Poll userinfo endpoint until it is updated.
7797
7541
  const updatedUser = await retryWithDelay(async () => {
7798
7542
  const user = await this.authManager.loginSilent();
7799
- const metadataExists = !!user?.etherKey && !!user?.starkKey && !!user?.userAdminKey;
7543
+ const metadataExists = !!user?.imx;
7800
7544
  if (metadataExists) {
7801
7545
  return user;
7802
7546
  }
@@ -8843,7 +8587,7 @@ class ImmutableApiClient {
8843
8587
  ...listOrderParams,
8844
8588
  });
8845
8589
  }
8846
- async createListing({ orderHash, orderComponents, offerer, orderSignature, }) {
8590
+ async createListing({ orderHash, orderComponents, orderSignature, }) {
8847
8591
  if (orderComponents.offer.length !== 1) {
8848
8592
  throw new Error('Only one item can be listed at a time');
8849
8593
  }
@@ -8861,7 +8605,7 @@ class ImmutableApiClient {
8861
8605
  chainName: this.chainName,
8862
8606
  requestBody: {
8863
8607
  order_hash: orderHash,
8864
- account_address: offerer,
8608
+ account_address: orderComponents.offerer,
8865
8609
  buy: [
8866
8610
  {
8867
8611
  item_type: Number(orderComponents.consideration[0].itemType)
@@ -9892,10 +9636,10 @@ class Orderbook {
9892
9636
  * the unsigned approval transaction, the typed order message for signing and
9893
9637
  * the order components that can be submitted to `createListing` with a signature.
9894
9638
  */
9895
- async prepareListing({ offerer, listingItem, considerationItem, orderExpiry, }) {
9896
- const erc721 = new ERC721Factory(listingItem.contractAddress, this.config.provider).create();
9897
- const royaltyInfo = await erc721.royaltyInfo(listingItem.tokenId, considerationItem.amount);
9898
- return this.seaport.prepareSeaportOrder(offerer, listingItem, considerationItem, royaltyInfo,
9639
+ async prepareListing({ makerAddress, sell, buy, orderExpiry, }) {
9640
+ const erc721 = new ERC721Factory(sell.contractAddress, this.config.provider).create();
9641
+ const royaltyInfo = await erc721.royaltyInfo(sell.tokenId, buy.amount);
9642
+ return this.seaport.prepareSeaportOrder(makerAddress, sell, buy, royaltyInfo,
9899
9643
  // Default order start to now
9900
9644
  new Date(),
9901
9645
  // Default order expiry to 2 years from now
@@ -9917,12 +9661,12 @@ class Orderbook {
9917
9661
  * @param {string} fulfillerAddress - The address of the account fulfilling the order.
9918
9662
  * @return {FulfillOrderResponse} Approval and fulfilment transactions.
9919
9663
  */
9920
- async fulfillOrder(listingId, fulfillerAddress) {
9664
+ async fulfillOrder(listingId, takerAddress) {
9921
9665
  const orderResult = await this.apiClient.getListing(listingId);
9922
9666
  if (orderResult.result.status !== OrderStatus.ACTIVE) {
9923
9667
  throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.result.status}`);
9924
9668
  }
9925
- return this.seaport.fulfilOrder(orderResult.result, fulfillerAddress);
9669
+ return this.seaport.fulfilOrder(orderResult.result, takerAddress);
9926
9670
  }
9927
9671
  /**
9928
9672
  * Get an unsigned cancel order transaction. Orders can only be cancelled by
@@ -11088,10 +10832,6 @@ const $bc2bfebf768286d3$export$6a2ba3c3bd042990 = {
11088
10832
  };
11089
10833
 
11090
10834
 
11091
- var $d176a05e966364ba$export$3bfad4d03ada24c4;
11092
- (function(ConnectionProviders) {
11093
- ConnectionProviders["METAMASK"] = "metamask";
11094
- })($d176a05e966364ba$export$3bfad4d03ada24c4 || ($d176a05e966364ba$export$3bfad4d03ada24c4 = {}));
11095
10835
 
11096
10836
 
11097
10837
  var $de275b98d2b651c3$export$788b1fd17f3dad84;
@@ -11102,10 +10842,23 @@ var $de275b98d2b651c3$export$788b1fd17f3dad84;
11102
10842
 
11103
10843
 
11104
10844
 
10845
+
10846
+
10847
+
10848
+ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
10849
+ [(Environment).SANDBOX]: "https://checkout-api.dev.immutable.com",
10850
+ [(Environment).PRODUCTION]: "https://checkout-api.sandbox.immutable.com"
10851
+ };
10852
+ const $d85ad1457a3f1a83$export$720c0def10d6df2d = {
10853
+ [($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM]: "/v1/rpc/eth-mainnet",
10854
+ [($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA]: "/v1/rpc/eth-sepolia"
10855
+ };
10856
+
10857
+
11105
10858
  const $a47e48dd2c04791b$export$345c852d0dc8f1df = new Map([
11106
10859
  [
11107
10860
  ($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM,
11108
- "https://checkout-api.dev.immutable.com/v1/rpc/eth-mainnet"
10861
+ `${($d85ad1457a3f1a83$export$161d4a74df65fc08)[(Environment).PRODUCTION]}${($d85ad1457a3f1a83$export$720c0def10d6df2d)[($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM]}`
11109
10862
  ],
11110
10863
  [
11111
10864
  ($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET,
@@ -11113,7 +10866,7 @@ const $a47e48dd2c04791b$export$345c852d0dc8f1df = new Map([
11113
10866
  ],
11114
10867
  [
11115
10868
  ($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA,
11116
- "https://checkout-api.dev.immutable.com/v1/rpc/eth-sepolia"
10869
+ `${($d85ad1457a3f1a83$export$161d4a74df65fc08)[(Environment).PRODUCTION]}${($d85ad1457a3f1a83$export$720c0def10d6df2d)[($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA]}`
11117
10870
  ],
11118
10871
  [
11119
10872
  ($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_DEVNET,
@@ -11245,6 +10998,7 @@ const $e768639828688ca3$export$44dde05038008549 = {
11245
10998
 
11246
10999
 
11247
11000
 
11001
+
11248
11002
  /**
11249
11003
  * The different types of errors that can be returned by the checkout process.
11250
11004
  */ var $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
@@ -11304,10 +11058,6 @@ const $a8bc256d81a5e2c1$export$bacc563de539c6c3 = async (fn, customError)=>{
11304
11058
  /* eslint-disable @typescript-eslint/no-explicit-any */
11305
11059
 
11306
11060
 
11307
- var $497c134ecbc8a50f$exports = {};
11308
- $497c134ecbc8a50f$exports = JSON.parse('[{"chainId":1},{"chainId":11155111},{"chainId":13372},{"chainId":13383}]');
11309
-
11310
-
11311
11061
  // this function needs to be in a separate file to prevent circular dependencies with ./network
11312
11062
 
11313
11063
 
@@ -11357,7 +11107,8 @@ async function $de192de6ef100f9f$var$addNetworkToWallet(networkMap, web3Provider
11357
11107
  }
11358
11108
  async function $de192de6ef100f9f$export$3043f6442a9ef563(config, { type: type = ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL , exclude: exclude }) {
11359
11109
  const { networkMap: networkMap } = config;
11360
- const list = ((/*@__PURE__*/$parcel$interopDefault($497c134ecbc8a50f$exports))).filter((network)=>{
11110
+ const allowedNetworkConfig = await config.remoteConfigFetcher.get("allowedNetworks");
11111
+ const list = allowedNetworkConfig.filter((network)=>{
11361
11112
  const allowAllTokens = type === ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL;
11362
11113
  const networkNotExcluded = !(exclude || []).map((exc)=>exc.chainId).includes(network.chainId);
11363
11114
  return allowAllTokens && networkNotExcluded;
@@ -11635,13 +11386,13 @@ async function $bb88265fe45a0393$export$9e1fd9cc88c637a0(config, web3Provider, v
11635
11386
 
11636
11387
 
11637
11388
  var $6f3c55a615003cbf$exports = {};
11638
- $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"]}]');
11389
+ $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"]}]');
11639
11390
 
11640
11391
 
11641
11392
  async function $5cdde2ffe6360fec$export$a822caa90d7eef09({ type: type = ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL , exclude: exclude }) {
11642
11393
  // todo:For async API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
11643
11394
  const filteredWalletsList = ((/*@__PURE__*/$parcel$interopDefault($6f3c55a615003cbf$exports))).filter((wallet)=>{
11644
- const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.providerName).includes(wallet.providerName);
11395
+ const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.walletProvider).includes(wallet.walletProvider);
11645
11396
  const allowAllWallets = type === ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL;
11646
11397
  const walletsAllowedForType = wallet.platform.includes(type);
11647
11398
  return walletNotExcluded && (allowAllWallets || walletsAllowedForType);
@@ -11734,53 +11485,6 @@ async function $570856c68db0bd36$export$9e73e22953cebcfc(tokenBridge, tokenAddre
11734
11485
 
11735
11486
 
11736
11487
 
11737
- const $be6f32539b5e2cc9$var$chainId = 13383;
11738
- const $be6f32539b5e2cc9$var$commonRoutingTokens = [
11739
- {
11740
- chainId: $be6f32539b5e2cc9$var$chainId,
11741
- address: "0xFEa9FF93DC0C6DC73F8Be009Fe7a22Bb9dcE8A2d",
11742
- decimals: 18,
11743
- symbol: "FUN",
11744
- name: "The Fungibles Token"
11745
- },
11746
- {
11747
- chainId: $be6f32539b5e2cc9$var$chainId,
11748
- address: "0x12739A8f1A8035F439092D016DAE19A2874F30d2",
11749
- decimals: 18,
11750
- symbol: "USDC",
11751
- name: "US Dollar Coin"
11752
- },
11753
- {
11754
- chainId: $be6f32539b5e2cc9$var$chainId,
11755
- address: "0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e",
11756
- decimals: 18,
11757
- symbol: "DEX",
11758
- name: "Dex"
11759
- }
11760
- ];
11761
- const $be6f32539b5e2cc9$var$contractOverrides = {
11762
- multicall: "0x7b19942581c9462D54155801fCA4a17edf3fD135",
11763
- coreFactory: "0xD17c98b38bA28c7eA1080317EB9AB2b9663BEd92",
11764
- quoterV2: "0x786ec643F231960D4C1A4E336990F8E7bF8f1277",
11765
- peripheryRouter: "0x0d44bB14Cc1dD999255aBB1576b4964D0439C63D",
11766
- migrator: "0x0Afe6F5f4DC34461A801420634239FFaD50A2e44",
11767
- nonfungiblePositionManager: "0xF674847fBcca5C80315e3AE37043Dce99F6CC529",
11768
- tickLens: "0x38034F18D38b74bdE496bdF60CCdBcb25B879e8d"
11769
- };
11770
- const $be6f32539b5e2cc9$export$3e9a43ac784794d5 = ()=>({
11771
- rpcURL: "https://zkevm-rpc.dev.x.immutable.com",
11772
- exchangeContracts: $be6f32539b5e2cc9$var$contractOverrides,
11773
- commonRoutingTokens: $be6f32539b5e2cc9$var$commonRoutingTokens,
11774
- nativeToken: {
11775
- chainId: $be6f32539b5e2cc9$var$chainId,
11776
- address: "",
11777
- decimals: 18,
11778
- symbol: "IMX",
11779
- name: "Immutable X Token"
11780
- }
11781
- });
11782
-
11783
-
11784
11488
  async function $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, environment) {
11785
11489
  const rootChainProvider = readOnlyProviders.get(fromChainId);
11786
11490
  const childChainProvider = readOnlyProviders.get(toChainId);
@@ -11796,24 +11500,20 @@ async function $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId,
11796
11500
  });
11797
11501
  return new (TokenBridge)(bridgeConfig);
11798
11502
  }
11799
- async function $67fc622a2b913d5f$export$7cf6178417769841(chainId, environment) {
11800
- const exchange = new (Exchange)(new (ExchangeConfiguration)({
11503
+ async function $67fc622a2b913d5f$export$7cf6178417769841(chainId, config) {
11504
+ const dexConfig = await config.remoteConfigFetcher.get("dex");
11505
+ return new (Exchange)(new (ExchangeConfiguration)({
11801
11506
  chainId: chainId,
11802
11507
  baseConfig: new (ImmutableConfiguration)({
11803
- environment: environment
11508
+ environment: config.environment
11804
11509
  }),
11805
- overrides: ($be6f32539b5e2cc9$export$3e9a43ac784794d5)()
11510
+ overrides: dexConfig?.overrides
11806
11511
  }));
11807
- return exchange;
11808
11512
  }
11809
11513
 
11810
11514
 
11811
11515
 
11812
11516
 
11813
- var $d7b15ec974df6f92$exports = {};
11814
- $d7b15ec974df6f92$exports = JSON.parse('{"11155111":{"bridgeToL2Addresses":{"gasTokenAddress":"NATIVE","fromAddress":"0xd1da7e9b2Ce1a4024DaD52b3D37F4c5c91a525C1"},"swapAddresses":{"inAddress":"0xFEa9FF93DC0C6DC73F8Be009Fe7a22Bb9dcE8A2d","outAddress":"0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e"}}}');
11815
-
11816
-
11817
11517
  const $2e7bf45a7c9a9570$var$DUMMY_WALLET_ADDRESS = "0x0000000000000000000000000000000000000000";
11818
11518
  const $2e7bf45a7c9a9570$var$DEFAULT_TOKEN_DECIMALS = 18;
11819
11519
  const $2e7bf45a7c9a9570$var$getL1ChainId = (environment)=>{
@@ -11824,15 +11524,15 @@ const $2e7bf45a7c9a9570$var$getL2ChainId = (environment)=>{
11824
11524
  if (environment === (Environment).PRODUCTION) return ($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET;
11825
11525
  return ($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_DEVNET;
11826
11526
  };
11827
- async function $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, environment, isSpendingCapApprovalRequired, tokenAddress) {
11828
- const fromChainId = $2e7bf45a7c9a9570$var$getL1ChainId(environment);
11829
- const toChainId = $2e7bf45a7c9a9570$var$getL2ChainId(environment);
11830
- const tokenAddresses = environment === (Environment).PRODUCTION ? ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA] : ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA];
11831
- const { gasTokenAddress: gasTokenAddress , fromAddress: fromAddress } = tokenAddresses.bridgeToL2Addresses;
11527
+ async function $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, config, isSpendingCapApprovalRequired, tokenAddress) {
11528
+ const fromChainId = $2e7bf45a7c9a9570$var$getL1ChainId(config.environment);
11529
+ const toChainId = $2e7bf45a7c9a9570$var$getL2ChainId(config.environment);
11530
+ const gasEstimateTokensConfig = await config.remoteConfigFetcher.get("gasEstimateTokens");
11531
+ const { gasTokenAddress: gasTokenAddress , fromAddress: fromAddress } = gasEstimateTokensConfig[fromChainId.toString()].bridgeToL2Addresses;
11832
11532
  const provider = readOnlyProviders.get(fromChainId);
11833
11533
  try {
11834
11534
  const { estimatedAmount: estimatedAmount , token: token } = await (0, $570856c68db0bd36$export$51010590edbe56a6)(provider, fromChainId, isSpendingCapApprovalRequired, tokenAddress ?? gasTokenAddress);
11835
- const tokenBridge = await $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, environment);
11535
+ const tokenBridge = await $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, config.environment);
11836
11536
  const { bridgeFee: bridgeFee , bridgeable: bridgeable } = await (0, $570856c68db0bd36$export$9e73e22953cebcfc)(tokenBridge, fromAddress, toChainId);
11837
11537
  return {
11838
11538
  gasEstimateType: (0, $de275b98d2b651c3$export$788b1fd17f3dad84).BRIDGE_TO_L2,
@@ -11856,12 +11556,12 @@ async function $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, e
11856
11556
  };
11857
11557
  }
11858
11558
  }
11859
- async function $2e7bf45a7c9a9570$var$swapGasEstimator(environment) {
11860
- const tokenAddresses = environment === (Environment).PRODUCTION ? ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA] : ((/*@__PURE__*/$parcel$interopDefault($d7b15ec974df6f92$exports)))[($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA];
11861
- const { inAddress: inAddress , outAddress: outAddress } = tokenAddresses.swapAddresses;
11862
- const chainId = $2e7bf45a7c9a9570$var$getL2ChainId(environment);
11559
+ async function $2e7bf45a7c9a9570$var$swapGasEstimator(config) {
11560
+ const chainId = $2e7bf45a7c9a9570$var$getL2ChainId(config.environment);
11561
+ const gasEstimateTokensConfig = await config.remoteConfigFetcher.get("gasEstimateTokens");
11562
+ const { inAddress: inAddress , outAddress: outAddress } = gasEstimateTokensConfig[chainId].swapAddresses;
11863
11563
  try {
11864
- const exchange = await $67fc622a2b913d5f$export$7cf6178417769841(chainId, environment);
11564
+ const exchange = await $67fc622a2b913d5f$export$7cf6178417769841(chainId, config);
11865
11565
  // Create a fake transaction to get the gas from the quote
11866
11566
  const { info: info } = await exchange.getUnsignedSwapTxFromAmountIn($2e7bf45a7c9a9570$var$DUMMY_WALLET_ADDRESS, inAddress, outAddress, (0, BigNumber$2).from((0, utils$2).parseUnits("1", $2e7bf45a7c9a9570$var$DEFAULT_TOKEN_DECIMALS)));
11867
11567
  if (info.gasFeeEstimate === null) return {
@@ -11890,12 +11590,12 @@ async function $2e7bf45a7c9a9570$var$swapGasEstimator(environment) {
11890
11590
  };
11891
11591
  }
11892
11592
  }
11893
- async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProviders, environment) {
11593
+ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProviders, config) {
11894
11594
  switch(params.gasEstimateType){
11895
11595
  case ($de275b98d2b651c3$export$788b1fd17f3dad84).BRIDGE_TO_L2:
11896
- return await $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, environment, params.isSpendingCapApprovalRequired, params.tokenAddress);
11596
+ return await $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, config, params.isSpendingCapApprovalRequired, params.tokenAddress);
11897
11597
  case ($de275b98d2b651c3$export$788b1fd17f3dad84).SWAP:
11898
- return await $2e7bf45a7c9a9570$var$swapGasEstimator(environment);
11598
+ return await $2e7bf45a7c9a9570$var$swapGasEstimator(config);
11899
11599
  default:
11900
11600
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Invalid type provided for gasEstimateType", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).INVALID_GAS_ESTIMATE_TYPE);
11901
11601
  }
@@ -11908,7 +11608,35 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
11908
11608
 
11909
11609
 
11910
11610
 
11911
- class $4013c5c91bb535f6$export$47a4ed4a38b9eecf extends Error {
11611
+
11612
+
11613
+ class $a492ee374ae7b613$export$d902b56530cd5f87 {
11614
+ cache;
11615
+ environment;
11616
+ constructor(params){
11617
+ this.environment = params.environment;
11618
+ }
11619
+ async load() {
11620
+ if (this.cache) return this.cache;
11621
+ let response;
11622
+ try {
11623
+ response = await (0, globalAxios$1).get(`${(0, $d85ad1457a3f1a83$export$161d4a74df65fc08)[this.environment]}/v1/config`);
11624
+ } catch (error) {
11625
+ throw new Error(`Error fetching config: ${error.message}`);
11626
+ }
11627
+ if (response.status !== 200) throw new Error(`Error fetching config: ${response.status} ${response.statusText}`);
11628
+ this.cache = response.data;
11629
+ return this.cache;
11630
+ }
11631
+ async get(key) {
11632
+ const config = await this.load();
11633
+ if (config && key) return config[key];
11634
+ return config;
11635
+ }
11636
+ }
11637
+
11638
+
11639
+ class $4013c5c91bb535f6$export$6ad73ea7e1b6f37f extends Error {
11912
11640
  message;
11913
11641
  constructor(message){
11914
11642
  super(message);
@@ -11918,11 +11646,15 @@ class $4013c5c91bb535f6$export$47a4ed4a38b9eecf extends Error {
11918
11646
  class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
11919
11647
  environment;
11920
11648
  networkMap;
11649
+ remoteConfigFetcher;
11921
11650
  constructor(config){
11922
11651
  // validate input
11923
- if (!Object.values((Environment)).includes(config.baseConfig.environment)) throw new $4013c5c91bb535f6$export$47a4ed4a38b9eecf("Invalid checkout configuration of environment");
11652
+ if (!Object.values((Environment)).includes(config.baseConfig.environment)) throw new $4013c5c91bb535f6$export$6ad73ea7e1b6f37f("Invalid checkout configuration of environment");
11924
11653
  this.environment = config.baseConfig.environment;
11925
11654
  this.networkMap = config.baseConfig.environment === (Environment).PRODUCTION ? ($a47e48dd2c04791b$export$6f24f3cef7d501c4) : ($a47e48dd2c04791b$export$3e81fc0987227f10);
11655
+ this.remoteConfigFetcher = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
11656
+ environment: config.baseConfig.environment
11657
+ });
11926
11658
  }
11927
11659
  }
11928
11660
 
@@ -12085,7 +11817,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
12085
11817
  * @returns The gas estimate for the given action.
12086
11818
  */ async gasEstimate(params) {
12087
11819
  this.readOnlyProviders = await ($0e0060cb42e136d2$export$339cb2be73677b30)(this.config, this.readOnlyProviders);
12088
- return await $2e7bf45a7c9a9570$export$942c8de7174809fc(params, this.readOnlyProviders, this.config.environment);
11820
+ return await $2e7bf45a7c9a9570$export$942c8de7174809fc(params, this.readOnlyProviders, this.config);
12089
11821
  }
12090
11822
  }
12091
11823
 
@@ -12180,8 +11912,6 @@ $parcel$export($045213b18e9f1f94$exports, "CheckoutWidgetTagNames", () => $04521
12180
11912
  Network["SEPOLIA"] = "Sepolia";
12181
11913
  Network["IMTBL_ZKEVM_TESTNET"] = "Immutable zkEVM Testnet";
12182
11914
  Network["IMTBL_ZKEVM_DEVNET"] = "Immutable zkEVM Devnet";
12183
- Network["POLYGON_ZKEVM_TESTNET"] = "Polygon zkEVM Testnet";
12184
- Network["POLYGON_ZKEVM"] = "Polygon zkEVM";
12185
11915
  })($045213b18e9f1f94$export$95be4ae94445245a || ($045213b18e9f1f94$export$95be4ae94445245a = {}));
12186
11916
  var $045213b18e9f1f94$export$c88931fdc51854eb;
12187
11917
  (function(WidgetTheme) {
@@ -12203,14 +11933,48 @@ var $1f969328e5988c99$exports = {};
12203
11933
  $parcel$export($1f969328e5988c99$exports, "BridgeReact", () => $1f969328e5988c99$export$30f61ebf204c69f6);
12204
11934
 
12205
11935
 
11936
+ function $77ec335383336bdd$export$931068bc678f0d73(tagName, provider) {
11937
+ if (!provider) {
11938
+ // eslint-disable-next-line no-console
11939
+ console.error("no provider parsed");
11940
+ return;
11941
+ }
11942
+ let attempts = 0;
11943
+ const maxAttempts = 10;
11944
+ let timer;
11945
+ const attemptToSetProvider = ()=>{
11946
+ try {
11947
+ const elements = document.getElementsByTagName(tagName);
11948
+ const widget = elements[0];
11949
+ widget.setProvider(provider);
11950
+ window.clearInterval(timer);
11951
+ } catch (err) {
11952
+ attempts++;
11953
+ if (attempts >= maxAttempts) {
11954
+ window.clearInterval(timer);
11955
+ // eslint-disable-next-line no-console
11956
+ console.error("failed to set the provider");
11957
+ }
11958
+ }
11959
+ };
11960
+ timer = window.setInterval(attemptToSetProvider, 10);
11961
+ attemptToSetProvider();
11962
+ }
11963
+
11964
+
11965
+
12206
11966
  function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
12207
- const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
11967
+ const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , provider: provider } = props;
11968
+ (useEffect)(()=>{
11969
+ if (provider) ($77ec335383336bdd$export$931068bc678f0d73)(($045213b18e9f1f94$export$75be0f6af9650f2c).BRIDGE, provider);
11970
+ }, [
11971
+ provider
11972
+ ]);
12208
11973
  const config = window.ImtblCheckoutWidgetConfig;
12209
11974
  return /*#__PURE__*/ (jsx)("imtbl-bridge", {
12210
11975
  widgetConfig: config,
12211
11976
  walletProvider: walletProvider,
12212
11977
  fromContractAddress: fromContractAddress ?? "",
12213
- fromNetwork: fromNetwork ?? "",
12214
11978
  amount: amount ?? ""
12215
11979
  });
12216
11980
  }
@@ -12221,12 +11985,10 @@ var $f2083cd30e2f5c56$exports = {};
12221
11985
  $parcel$export($f2083cd30e2f5c56$exports, "ConnectReact", () => $f2083cd30e2f5c56$export$49d62957f420a1e2);
12222
11986
 
12223
11987
 
12224
- function $f2083cd30e2f5c56$export$49d62957f420a1e2(props) {
12225
- const { walletProvider: walletProvider } = props;
11988
+ function $f2083cd30e2f5c56$export$49d62957f420a1e2() {
12226
11989
  const config = window.ImtblCheckoutWidgetConfig;
12227
11990
  return /*#__PURE__*/ (jsx)("imtbl-connect", {
12228
- widgetConfig: config,
12229
- walletProvider: walletProvider
11991
+ widgetConfig: config
12230
11992
  });
12231
11993
  }
12232
11994
 
@@ -12236,8 +11998,15 @@ var $a4fbb8e3a6aeff58$exports = {};
12236
11998
  $parcel$export($a4fbb8e3a6aeff58$exports, "SwapReact", () => $a4fbb8e3a6aeff58$export$971e031379577f4);
12237
11999
  /* eslint-disable max-len */
12238
12000
 
12001
+
12002
+
12239
12003
  function $a4fbb8e3a6aeff58$export$971e031379577f4(props) {
12240
- const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress } = props;
12004
+ const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress , provider: provider } = props;
12005
+ (useEffect)(()=>{
12006
+ if (provider) ($77ec335383336bdd$export$931068bc678f0d73)(($045213b18e9f1f94$export$75be0f6af9650f2c).SWAP, provider);
12007
+ }, [
12008
+ provider
12009
+ ]);
12241
12010
  const config = window.ImtblCheckoutWidgetConfig;
12242
12011
  return /*#__PURE__*/ (jsx)("imtbl-swap", {
12243
12012
  widgetConfig: config,
@@ -12254,8 +12023,15 @@ var $89d55ace0f8f1c07$exports = {};
12254
12023
  $parcel$export($89d55ace0f8f1c07$exports, "WalletReact", () => $89d55ace0f8f1c07$export$ceaac94f34dba154);
12255
12024
 
12256
12025
 
12026
+
12027
+
12257
12028
  function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
12258
- const { walletProvider: walletProvider } = props;
12029
+ const { walletProvider: walletProvider , provider: provider } = props;
12030
+ (useEffect)(()=>{
12031
+ if (provider) ($77ec335383336bdd$export$931068bc678f0d73)(($045213b18e9f1f94$export$75be0f6af9650f2c).WALLET, provider);
12032
+ }, [
12033
+ provider
12034
+ ]);
12259
12035
  const config = window.ImtblCheckoutWidgetConfig;
12260
12036
  return /*#__PURE__*/ (jsx)("imtbl-wallet", {
12261
12037
  widgetConfig: config,
@@ -12266,45 +12042,41 @@ function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
12266
12042
 
12267
12043
  var $430e3eda76fa4d5f$exports = {};
12268
12044
 
12045
+ $parcel$export($430e3eda76fa4d5f$exports, "DEFAULT_CHECKOUT_VERSION", () => $430e3eda76fa4d5f$export$391f2d917401f2bb);
12046
+ $parcel$export($430e3eda76fa4d5f$exports, "validateAndBuildVersion", () => $430e3eda76fa4d5f$export$46b1ae20f762ad4c);
12269
12047
  $parcel$export($430e3eda76fa4d5f$exports, "CheckoutWidgets", () => $430e3eda76fa4d5f$export$af210a0808087845);
12270
12048
  $parcel$export($430e3eda76fa4d5f$exports, "UpdateConfig", () => $430e3eda76fa4d5f$export$bf1548ba7e61c17f);
12271
- $parcel$export($430e3eda76fa4d5f$exports, "SetProvider", () => $430e3eda76fa4d5f$export$931068bc678f0d73);
12049
+ const $430e3eda76fa4d5f$export$391f2d917401f2bb = "0.1.9-alpha";
12050
+ function $430e3eda76fa4d5f$export$46b1ae20f762ad4c(version) {
12051
+ if (!version || version?.major === undefined || version.major < 0) return $430e3eda76fa4d5f$export$391f2d917401f2bb;
12052
+ if (version.major === 0 && version.minor === 0 && version.patch === 0) return $430e3eda76fa4d5f$export$391f2d917401f2bb;
12053
+ let validatedVersion = $430e3eda76fa4d5f$export$391f2d917401f2bb;
12054
+ if (!Number.isNaN(version.major) && version.major >= 0) validatedVersion = version.major.toString();
12055
+ if (version.minor !== undefined && !Number.isNaN(version.minor) && version.minor >= 0) validatedVersion += `.${version.minor.toString()}`;
12056
+ if (version.patch !== undefined && !Number.isNaN(version.patch) && version.patch >= 0) {
12057
+ if (version.minor === undefined) validatedVersion += `.0.${version.patch.toString()}`;
12058
+ else validatedVersion += `.${version.patch.toString()}`;
12059
+ }
12060
+ // TODO: at the moment all of the releases that include
12061
+ // the checkout widgets script have '-alpha' appended
12062
+ // Change this when we go to testnet. ticket WT-1432
12063
+ validatedVersion += "-alpha";
12064
+ if (version.build !== undefined) validatedVersion += `.${version.build}`;
12065
+ return validatedVersion;
12066
+ }
12272
12067
  function $430e3eda76fa4d5f$export$af210a0808087845(config) {
12273
12068
  const checkoutWidgetJS = document.createElement("script");
12274
- checkoutWidgetJS.setAttribute("src", "http://localhost:3000/lib/js/imtbl-checkout.js");
12069
+ const validVersion = $430e3eda76fa4d5f$export$46b1ae20f762ad4c(config?.version);
12070
+ {
12071
+ const cdnUrl = `https://cdn.jsdelivr.net/npm/@imtbl/sdk@${validVersion}/dist/browser/checkout.js`;
12072
+ checkoutWidgetJS.setAttribute("src", cdnUrl);
12073
+ }
12275
12074
  document.head.appendChild(checkoutWidgetJS);
12276
12075
  window.ImtblCheckoutWidgetConfig = JSON.stringify(config);
12277
12076
  }
12278
12077
  function $430e3eda76fa4d5f$export$bf1548ba7e61c17f(config) {
12279
12078
  window.ImtblCheckoutWidgetConfig = JSON.stringify(config);
12280
12079
  }
12281
- function $430e3eda76fa4d5f$export$931068bc678f0d73(tagName, provider) {
12282
- if (!provider) {
12283
- // eslint-disable-next-line no-console
12284
- console.error("no provider parsed");
12285
- return;
12286
- }
12287
- let attempts = 0;
12288
- const maxAttempts = 10;
12289
- let timer;
12290
- const attemptToSetProvider = ()=>{
12291
- try {
12292
- const elements = document.getElementsByTagName(tagName);
12293
- const widget = elements[0];
12294
- widget.setProvider(provider);
12295
- window.clearInterval(timer);
12296
- } catch (err) {
12297
- attempts++;
12298
- if (attempts >= maxAttempts) {
12299
- window.clearInterval(timer);
12300
- // eslint-disable-next-line no-console
12301
- console.error("failed to set the provider");
12302
- }
12303
- }
12304
- };
12305
- timer = window.setInterval(attemptToSetProvider, 10);
12306
- attemptToSetProvider();
12307
- }
12308
12080
 
12309
12081
  /* Autogenerated file. Do not edit manually. */
12310
12082
  /* tslint:disable */
@@ -13813,27 +13585,27 @@ class ERC721PermissionedMintable {
13813
13585
  /**
13814
13586
  * @returns a populated transaction for the setApprovalForAll contract function
13815
13587
  */
13816
- async setApprovalForAll(operator, approved, overrides = {}) {
13588
+ async populateSetApprovalForAll(operator, approved, overrides = {}) {
13817
13589
  return await this.contract.populateTransaction.setApprovalForAll(operator, approved, overrides);
13818
13590
  }
13819
13591
  /**
13820
13592
  * @returns a populated transaction for the setBaseURI contract function
13821
13593
  */
13822
- async setBaseURI(baseURI_, overrides = {}) {
13594
+ async populateSetBaseURI(baseURI_, overrides = {}) {
13823
13595
  return await this.contract.populateTransaction.setBaseURI(baseURI_, overrides);
13824
13596
  }
13825
13597
  /**
13826
13598
  * @returns a populated transaction for the setContractURI contract function
13827
13599
  */
13828
- async setContractURI(_contractURI, overrides = {}) {
13600
+ async populateSetContractURI(_contractURI, overrides = {}) {
13829
13601
  return await this.contract.populateTransaction.setContractURI(_contractURI, overrides);
13830
13602
  }
13831
13603
  /**
13832
13604
  * @returns a populated transaction for the setRoyaltyAllowlistRegistry contract function
13833
13605
  */
13834
- async setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides = {}) {
13606
+ async populateSetRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides = {}) {
13835
13607
  return await this.contract.populateTransaction.setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides);
13836
13608
  }
13837
13609
  }
13838
13610
 
13839
- export { APIError, BlockchainData, $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $baec09ddc3013323$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $045213b18e9f1f94$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $430e3eda76fa4d5f$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, ERC20, ERC721PermissionedMintable, Environment, $de275b98d2b651c3$export$788b1fd17f3dad84 as GasEstimateType, GenericIMXProvider, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, $045213b18e9f1f94$export$95be4ae94445245a as Network, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $ad06b030b1a3ba34$export$b80d2daf830437b9 as OrchestrationEventType, Orderbook, Passport, PassportError, ProviderConfiguration, $a47e48dd2c04791b$export$345c852d0dc8f1df as RPC_URL_MAP, $430e3eda76fa4d5f$export$931068bc678f0d73 as SetProvider, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $430e3eda76fa4d5f$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $e768639828688ca3$export$2d7a51a18d87e21d as WalletProviderName, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $045213b18e9f1f94$export$c88931fdc51854eb as WidgetTheme, module };
13611
+ export { APIError, BlockchainData, $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $d85ad1457a3f1a83$export$161d4a74df65fc08 as CHECKOUT_API_BASE_URL, $baec09ddc3013323$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $045213b18e9f1f94$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $430e3eda76fa4d5f$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $430e3eda76fa4d5f$export$391f2d917401f2bb as DEFAULT_CHECKOUT_VERSION, ERC20, ERC721PermissionedMintable, Environment, $de275b98d2b651c3$export$788b1fd17f3dad84 as GasEstimateType, GenericIMXProvider, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, $045213b18e9f1f94$export$95be4ae94445245a as Network, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, Networks, $ad06b030b1a3ba34$export$b80d2daf830437b9 as OrchestrationEventType, Orderbook, Passport, PassportError, ProviderConfiguration, $a47e48dd2c04791b$export$345c852d0dc8f1df as RPC_URL_MAP, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $430e3eda76fa4d5f$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $e768639828688ca3$export$2d7a51a18d87e21d as WalletProviderName, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $045213b18e9f1f94$export$c88931fdc51854eb as WidgetTheme, module, $430e3eda76fa4d5f$export$46b1ae20f762ad4c as validateAndBuildVersion };