@imtbl/sdk 0.1.9-alpha.1 → 0.1.9-alpha.3
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/blockchain-data.d.ts +46 -51
- package/dist/blockchain-data.js +63 -330
- package/dist/browser/checkout.js +2 -2
- package/dist/erc721-permissioned-mintable.d.ts +4 -4
- package/dist/erc721-permissioned-mintable.js +4 -4
- package/dist/immutablex_client.js +1 -1
- package/dist/index.cjs +166 -1738
- package/dist/index.d.ts +55 -15637
- package/dist/index.js +165 -1728
- package/dist/orderbook.d.ts +2 -2
- package/dist/orderbook.js +8 -8
- package/dist/passport.d.ts +1 -1
- package/dist/passport.js +27 -16
- package/package.json +1 -9
- package/dist/checkout_sdk.d.ts +0 -1062
- package/dist/checkout_sdk.js +0 -1107
- package/dist/checkout_widgets.d.ts +0 -15335
- package/dist/checkout_widgets.js +0 -221
package/dist/index.js
CHANGED
|
@@ -13,11 +13,6 @@ import { Seaport as Seaport$1 } from '@opensea/seaport-js';
|
|
|
13
13
|
import { parseUnits } from '@ethersproject/units';
|
|
14
14
|
import { BigNumber as BigNumber$1 } from '@ethersproject/bignumber';
|
|
15
15
|
import detectEthereumProvider from '@metamask/detect-provider';
|
|
16
|
-
import { BigNumber as BigNumber$2, utils as utils$2 } from 'ethers/lib/ethers';
|
|
17
|
-
import { BridgeConfiguration, ETH_MAINNET_TO_ZKEVM_MAINNET, ETH_SEPOLIA_TO_ZKEVM_DEVNET, TokenBridge } from '@imtbl/bridge-sdk';
|
|
18
|
-
import { Exchange, ExchangeConfiguration } from '@imtbl/dex-sdk';
|
|
19
|
-
import { jsx } from 'react/jsx-runtime';
|
|
20
|
-
import 'react';
|
|
21
16
|
|
|
22
17
|
var Environment;
|
|
23
18
|
(function (Environment) {
|
|
@@ -48,7 +43,7 @@ class ImmutableConfiguration {
|
|
|
48
43
|
*/
|
|
49
44
|
// Some imports not used depending on template conditions
|
|
50
45
|
// @ts-ignore
|
|
51
|
-
const BASE_PATH$1 = "https://indexer-mr.
|
|
46
|
+
const BASE_PATH$1 = "https://indexer-mr.sandbox.imtbl.com".replace(/\/+$/, "");
|
|
52
47
|
/**
|
|
53
48
|
*
|
|
54
49
|
* @export
|
|
@@ -731,96 +726,32 @@ class CollectionsApi extends BaseAPI$1 {
|
|
|
731
726
|
* Do not edit the class manually.
|
|
732
727
|
*/
|
|
733
728
|
/**
|
|
734
|
-
*
|
|
729
|
+
* NftOwnersApi - axios parameter creator
|
|
735
730
|
* @export
|
|
736
731
|
*/
|
|
737
|
-
const
|
|
732
|
+
const NftOwnersApiAxiosParamCreator = function (configuration) {
|
|
738
733
|
return {
|
|
739
734
|
/**
|
|
740
|
-
*
|
|
741
|
-
* @summary
|
|
742
|
-
* @param {string}
|
|
743
|
-
* @param {
|
|
744
|
-
* @param {
|
|
745
|
-
* @
|
|
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.
|
|
735
|
+
* List NFT owners by token ID
|
|
736
|
+
* @summary List NFT owners by token ID
|
|
737
|
+
* @param {string} contractAddress The address of contract
|
|
738
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
739
|
+
* @param {string} chainName The name of chain
|
|
740
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
741
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
817
742
|
* @param {*} [options] Override http request option.
|
|
818
743
|
* @throws {RequiredError}
|
|
819
744
|
*/
|
|
820
|
-
|
|
745
|
+
listNFTOwners: async (contractAddress, tokenId, chainName, pageCursor, pageSize, options = {}) => {
|
|
746
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
747
|
+
assertParamExists$1('listNFTOwners', 'contractAddress', contractAddress);
|
|
748
|
+
// verify required parameter 'tokenId' is not null or undefined
|
|
749
|
+
assertParamExists$1('listNFTOwners', 'tokenId', tokenId);
|
|
821
750
|
// verify required parameter 'chainName' is not null or undefined
|
|
822
|
-
assertParamExists$1('
|
|
823
|
-
const localVarPath = `/v1/chains/{chain_name}/
|
|
751
|
+
assertParamExists$1('listNFTOwners', 'chainName', chainName);
|
|
752
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}/owners`
|
|
753
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
754
|
+
.replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
|
|
824
755
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
825
756
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
826
757
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
@@ -831,27 +762,12 @@ const ListingsApiAxiosParamCreator = function (configuration) {
|
|
|
831
762
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
832
763
|
const localVarHeaderParameter = {};
|
|
833
764
|
const localVarQueryParameter = {};
|
|
834
|
-
if (
|
|
835
|
-
localVarQueryParameter['
|
|
836
|
-
}
|
|
837
|
-
if (sellItemContractAddress !== undefined) {
|
|
838
|
-
localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
|
|
839
|
-
}
|
|
840
|
-
if (sellItemTokenId !== undefined) {
|
|
841
|
-
localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
|
|
765
|
+
if (pageCursor !== undefined) {
|
|
766
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
842
767
|
}
|
|
843
768
|
if (pageSize !== undefined) {
|
|
844
769
|
localVarQueryParameter['page_size'] = pageSize;
|
|
845
770
|
}
|
|
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
771
|
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
856
772
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
857
773
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -863,143 +779,69 @@ const ListingsApiAxiosParamCreator = function (configuration) {
|
|
|
863
779
|
};
|
|
864
780
|
};
|
|
865
781
|
/**
|
|
866
|
-
*
|
|
782
|
+
* NftOwnersApi - functional programming interface
|
|
867
783
|
* @export
|
|
868
784
|
*/
|
|
869
|
-
const
|
|
870
|
-
const localVarAxiosParamCreator =
|
|
785
|
+
const NftOwnersApiFp = function (configuration) {
|
|
786
|
+
const localVarAxiosParamCreator = NftOwnersApiAxiosParamCreator(configuration);
|
|
871
787
|
return {
|
|
872
788
|
/**
|
|
873
|
-
*
|
|
874
|
-
* @summary
|
|
875
|
-
* @param {string}
|
|
876
|
-
* @param {
|
|
877
|
-
* @param {
|
|
878
|
-
* @
|
|
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.
|
|
789
|
+
* List NFT owners by token ID
|
|
790
|
+
* @summary List NFT owners by token ID
|
|
791
|
+
* @param {string} contractAddress The address of contract
|
|
792
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
793
|
+
* @param {string} chainName The name of chain
|
|
794
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
795
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
907
796
|
* @param {*} [options] Override http request option.
|
|
908
797
|
* @throws {RequiredError}
|
|
909
798
|
*/
|
|
910
|
-
async
|
|
911
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
799
|
+
async listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
800
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
|
|
912
801
|
return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
|
|
913
802
|
},
|
|
914
803
|
};
|
|
915
804
|
};
|
|
916
805
|
/**
|
|
917
|
-
*
|
|
806
|
+
* NftOwnersApi - factory interface
|
|
918
807
|
* @export
|
|
919
808
|
*/
|
|
920
|
-
const
|
|
921
|
-
const localVarFp =
|
|
809
|
+
const NftOwnersApiFactory = function (configuration, basePath, axios) {
|
|
810
|
+
const localVarFp = NftOwnersApiFp(configuration);
|
|
922
811
|
return {
|
|
923
812
|
/**
|
|
924
|
-
*
|
|
925
|
-
* @summary
|
|
926
|
-
* @param {string}
|
|
927
|
-
* @param {
|
|
928
|
-
* @param {
|
|
929
|
-
* @
|
|
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.
|
|
813
|
+
* List NFT owners by token ID
|
|
814
|
+
* @summary List NFT owners by token ID
|
|
815
|
+
* @param {string} contractAddress The address of contract
|
|
816
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
817
|
+
* @param {string} chainName The name of chain
|
|
818
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
819
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
956
820
|
* @param {*} [options] Override http request option.
|
|
957
821
|
* @throws {RequiredError}
|
|
958
822
|
*/
|
|
959
|
-
|
|
960
|
-
return localVarFp.
|
|
823
|
+
listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
824
|
+
return localVarFp.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
961
825
|
},
|
|
962
826
|
};
|
|
963
827
|
};
|
|
964
828
|
/**
|
|
965
|
-
*
|
|
829
|
+
* NftOwnersApi - object-oriented interface
|
|
966
830
|
* @export
|
|
967
|
-
* @class
|
|
831
|
+
* @class NftOwnersApi
|
|
968
832
|
* @extends {BaseAPI}
|
|
969
833
|
*/
|
|
970
|
-
class
|
|
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
|
-
}
|
|
834
|
+
class NftOwnersApi extends BaseAPI$1 {
|
|
993
835
|
/**
|
|
994
|
-
* List
|
|
995
|
-
* @summary List
|
|
996
|
-
* @param {
|
|
836
|
+
* List NFT owners by token ID
|
|
837
|
+
* @summary List NFT owners by token ID
|
|
838
|
+
* @param {NftOwnersApiListNFTOwnersRequest} requestParameters Request parameters.
|
|
997
839
|
* @param {*} [options] Override http request option.
|
|
998
840
|
* @throws {RequiredError}
|
|
999
|
-
* @memberof
|
|
841
|
+
* @memberof NftOwnersApi
|
|
1000
842
|
*/
|
|
1001
|
-
|
|
1002
|
-
return
|
|
843
|
+
listNFTOwners(requestParameters, options) {
|
|
844
|
+
return NftOwnersApiFp(this.configuration).listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1003
845
|
}
|
|
1004
846
|
}
|
|
1005
847
|
|
|
@@ -1017,161 +859,28 @@ class ListingsApi extends BaseAPI$1 {
|
|
|
1017
859
|
* Do not edit the class manually.
|
|
1018
860
|
*/
|
|
1019
861
|
/**
|
|
1020
|
-
*
|
|
862
|
+
* NftsApi - axios parameter creator
|
|
1021
863
|
* @export
|
|
1022
864
|
*/
|
|
1023
|
-
const
|
|
865
|
+
const NftsApiAxiosParamCreator = function (configuration) {
|
|
1024
866
|
return {
|
|
1025
867
|
/**
|
|
1026
|
-
*
|
|
1027
|
-
* @summary
|
|
1028
|
-
* @param {string} contractAddress The address of contract
|
|
868
|
+
* Get NFT by token ID
|
|
869
|
+
* @summary Get NFT by token ID
|
|
870
|
+
* @param {string} contractAddress The address of NFT contract
|
|
1029
871
|
* @param {string} tokenId An `uint256` token id as string
|
|
1030
872
|
* @param {string} chainName The name of chain
|
|
1031
|
-
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1032
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
1033
873
|
* @param {*} [options] Override http request option.
|
|
1034
874
|
* @throws {RequiredError}
|
|
1035
875
|
*/
|
|
1036
|
-
|
|
876
|
+
getNFT: async (contractAddress, tokenId, chainName, options = {}) => {
|
|
1037
877
|
// verify required parameter 'contractAddress' is not null or undefined
|
|
1038
|
-
assertParamExists$1('
|
|
878
|
+
assertParamExists$1('getNFT', 'contractAddress', contractAddress);
|
|
1039
879
|
// verify required parameter 'tokenId' is not null or undefined
|
|
1040
|
-
assertParamExists$1('
|
|
880
|
+
assertParamExists$1('getNFT', 'tokenId', tokenId);
|
|
1041
881
|
// verify required parameter 'chainName' is not null or undefined
|
|
1042
|
-
assertParamExists$1('
|
|
1043
|
-
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}
|
|
1044
|
-
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
1045
|
-
.replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
|
|
1046
|
-
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1047
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1048
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
1049
|
-
let baseOptions;
|
|
1050
|
-
if (configuration) {
|
|
1051
|
-
baseOptions = configuration.baseOptions;
|
|
1052
|
-
}
|
|
1053
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1054
|
-
const localVarHeaderParameter = {};
|
|
1055
|
-
const localVarQueryParameter = {};
|
|
1056
|
-
if (pageCursor !== undefined) {
|
|
1057
|
-
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
1058
|
-
}
|
|
1059
|
-
if (pageSize !== undefined) {
|
|
1060
|
-
localVarQueryParameter['page_size'] = pageSize;
|
|
1061
|
-
}
|
|
1062
|
-
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
1063
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1064
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1065
|
-
return {
|
|
1066
|
-
url: toPathString$1(localVarUrlObj),
|
|
1067
|
-
options: localVarRequestOptions,
|
|
1068
|
-
};
|
|
1069
|
-
},
|
|
1070
|
-
};
|
|
1071
|
-
};
|
|
1072
|
-
/**
|
|
1073
|
-
* NftOwnersApi - functional programming interface
|
|
1074
|
-
* @export
|
|
1075
|
-
*/
|
|
1076
|
-
const NftOwnersApiFp = function (configuration) {
|
|
1077
|
-
const localVarAxiosParamCreator = NftOwnersApiAxiosParamCreator(configuration);
|
|
1078
|
-
return {
|
|
1079
|
-
/**
|
|
1080
|
-
* List NFT owners by token ID
|
|
1081
|
-
* @summary List NFT owners by token ID
|
|
1082
|
-
* @param {string} contractAddress The address of contract
|
|
1083
|
-
* @param {string} tokenId An `uint256` token id as string
|
|
1084
|
-
* @param {string} chainName The name of chain
|
|
1085
|
-
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1086
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
1087
|
-
* @param {*} [options] Override http request option.
|
|
1088
|
-
* @throws {RequiredError}
|
|
1089
|
-
*/
|
|
1090
|
-
async listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
1091
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
|
|
1092
|
-
return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
|
|
1093
|
-
},
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
/**
|
|
1097
|
-
* NftOwnersApi - factory interface
|
|
1098
|
-
* @export
|
|
1099
|
-
*/
|
|
1100
|
-
const NftOwnersApiFactory = function (configuration, basePath, axios) {
|
|
1101
|
-
const localVarFp = NftOwnersApiFp(configuration);
|
|
1102
|
-
return {
|
|
1103
|
-
/**
|
|
1104
|
-
* List NFT owners by token ID
|
|
1105
|
-
* @summary List NFT owners by token ID
|
|
1106
|
-
* @param {string} contractAddress The address of contract
|
|
1107
|
-
* @param {string} tokenId An `uint256` token id as string
|
|
1108
|
-
* @param {string} chainName The name of chain
|
|
1109
|
-
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1110
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
1111
|
-
* @param {*} [options] Override http request option.
|
|
1112
|
-
* @throws {RequiredError}
|
|
1113
|
-
*/
|
|
1114
|
-
listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
1115
|
-
return localVarFp.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
1116
|
-
},
|
|
1117
|
-
};
|
|
1118
|
-
};
|
|
1119
|
-
/**
|
|
1120
|
-
* NftOwnersApi - object-oriented interface
|
|
1121
|
-
* @export
|
|
1122
|
-
* @class NftOwnersApi
|
|
1123
|
-
* @extends {BaseAPI}
|
|
1124
|
-
*/
|
|
1125
|
-
class NftOwnersApi extends BaseAPI$1 {
|
|
1126
|
-
/**
|
|
1127
|
-
* List NFT owners by token ID
|
|
1128
|
-
* @summary List NFT owners by token ID
|
|
1129
|
-
* @param {NftOwnersApiListNFTOwnersRequest} requestParameters Request parameters.
|
|
1130
|
-
* @param {*} [options] Override http request option.
|
|
1131
|
-
* @throws {RequiredError}
|
|
1132
|
-
* @memberof NftOwnersApi
|
|
1133
|
-
*/
|
|
1134
|
-
listNFTOwners(requestParameters, options) {
|
|
1135
|
-
return NftOwnersApiFp(this.configuration).listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
/* tslint:disable */
|
|
1140
|
-
/* eslint-disable */
|
|
1141
|
-
/**
|
|
1142
|
-
* Immutable X API
|
|
1143
|
-
* Immutable Multi Rollup API
|
|
1144
|
-
*
|
|
1145
|
-
* The version of the OpenAPI document: 1.0.0
|
|
1146
|
-
* Contact: support@immutable.com
|
|
1147
|
-
*
|
|
1148
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1149
|
-
* https://openapi-generator.tech
|
|
1150
|
-
* Do not edit the class manually.
|
|
1151
|
-
*/
|
|
1152
|
-
/**
|
|
1153
|
-
* NftsApi - axios parameter creator
|
|
1154
|
-
* @export
|
|
1155
|
-
*/
|
|
1156
|
-
const NftsApiAxiosParamCreator = function (configuration) {
|
|
1157
|
-
return {
|
|
1158
|
-
/**
|
|
1159
|
-
* Get NFT by token ID
|
|
1160
|
-
* @summary Get NFT by token ID
|
|
1161
|
-
* @param {string} contractAddress The address of NFT contract
|
|
1162
|
-
* @param {string} tokenId An `uint256` token id as string
|
|
1163
|
-
* @param {string} chainName The name of chain
|
|
1164
|
-
* @param {*} [options] Override http request option.
|
|
1165
|
-
* @throws {RequiredError}
|
|
1166
|
-
*/
|
|
1167
|
-
getNFT: async (contractAddress, tokenId, chainName, options = {}) => {
|
|
1168
|
-
// verify required parameter 'contractAddress' is not null or undefined
|
|
1169
|
-
assertParamExists$1('getNFT', 'contractAddress', contractAddress);
|
|
1170
|
-
// verify required parameter 'tokenId' is not null or undefined
|
|
1171
|
-
assertParamExists$1('getNFT', 'tokenId', tokenId);
|
|
1172
|
-
// verify required parameter 'chainName' is not null or undefined
|
|
1173
|
-
assertParamExists$1('getNFT', 'chainName', chainName);
|
|
1174
|
-
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}`
|
|
882
|
+
assertParamExists$1('getNFT', 'chainName', chainName);
|
|
883
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}`
|
|
1175
884
|
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
1176
885
|
.replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
|
|
1177
886
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
@@ -1453,7 +1162,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1453
1162
|
assertParamExists$1('createListing', 'chainName', chainName);
|
|
1454
1163
|
// verify required parameter 'createListingRequestBody' is not null or undefined
|
|
1455
1164
|
assertParamExists$1('createListing', 'createListingRequestBody', createListingRequestBody);
|
|
1456
|
-
const localVarPath = `/v1/chains/{chain_name}/listings`
|
|
1165
|
+
const localVarPath = `/v1/chains/{chain_name}/orders/listings`
|
|
1457
1166
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1458
1167
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1459
1168
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
@@ -1487,7 +1196,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1487
1196
|
assertParamExists$1('getListing', 'chainName', chainName);
|
|
1488
1197
|
// verify required parameter 'listingId' is not null or undefined
|
|
1489
1198
|
assertParamExists$1('getListing', 'listingId', listingId);
|
|
1490
|
-
const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
|
|
1199
|
+
const localVarPath = `/v1/chains/{chain_name}/orders/listings/{listing_id}`
|
|
1491
1200
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
|
|
1492
1201
|
.replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
|
|
1493
1202
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -1513,6 +1222,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1513
1222
|
* @param {string} chainName
|
|
1514
1223
|
* @param {OrderStatus} [status] Order status to filter by
|
|
1515
1224
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1225
|
+
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
1516
1226
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1517
1227
|
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1518
1228
|
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
@@ -1521,10 +1231,10 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1521
1231
|
* @param {*} [options] Override http request option.
|
|
1522
1232
|
* @throws {RequiredError}
|
|
1523
1233
|
*/
|
|
1524
|
-
listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
|
|
1234
|
+
listListings: async (chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
|
|
1525
1235
|
// verify required parameter 'chainName' is not null or undefined
|
|
1526
1236
|
assertParamExists$1('listListings', 'chainName', chainName);
|
|
1527
|
-
const localVarPath = `/v1/chains/{chain_name}/listings`
|
|
1237
|
+
const localVarPath = `/v1/chains/{chain_name}/orders/listings`
|
|
1528
1238
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1529
1239
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1530
1240
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
@@ -1541,6 +1251,9 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1541
1251
|
if (sellItemContractAddress !== undefined) {
|
|
1542
1252
|
localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
|
|
1543
1253
|
}
|
|
1254
|
+
if (buyItemContractAddress !== undefined) {
|
|
1255
|
+
localVarQueryParameter['buy_item_contract_address'] = buyItemContractAddress;
|
|
1256
|
+
}
|
|
1544
1257
|
if (sellItemTokenId !== undefined) {
|
|
1545
1258
|
localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
|
|
1546
1259
|
}
|
|
@@ -1603,6 +1316,7 @@ const OrdersApiFp = function (configuration) {
|
|
|
1603
1316
|
* @param {string} chainName
|
|
1604
1317
|
* @param {OrderStatus} [status] Order status to filter by
|
|
1605
1318
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1319
|
+
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
1606
1320
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1607
1321
|
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1608
1322
|
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
@@ -1611,8 +1325,8 @@ const OrdersApiFp = function (configuration) {
|
|
|
1611
1325
|
* @param {*} [options] Override http request option.
|
|
1612
1326
|
* @throws {RequiredError}
|
|
1613
1327
|
*/
|
|
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);
|
|
1328
|
+
async listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
|
|
1329
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
|
|
1616
1330
|
return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
|
|
1617
1331
|
},
|
|
1618
1332
|
};
|
|
@@ -1652,6 +1366,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
1652
1366
|
* @param {string} chainName
|
|
1653
1367
|
* @param {OrderStatus} [status] Order status to filter by
|
|
1654
1368
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1369
|
+
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
1655
1370
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1656
1371
|
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1657
1372
|
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
@@ -1660,8 +1375,8 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
1660
1375
|
* @param {*} [options] Override http request option.
|
|
1661
1376
|
* @throws {RequiredError}
|
|
1662
1377
|
*/
|
|
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));
|
|
1378
|
+
listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
|
|
1379
|
+
return localVarFp.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
|
|
1665
1380
|
},
|
|
1666
1381
|
};
|
|
1667
1382
|
};
|
|
@@ -1703,7 +1418,7 @@ class OrdersApi extends BaseAPI$1 {
|
|
|
1703
1418
|
* @memberof OrdersApi
|
|
1704
1419
|
*/
|
|
1705
1420
|
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));
|
|
1421
|
+
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
1422
|
}
|
|
1708
1423
|
}
|
|
1709
1424
|
|
|
@@ -1736,7 +1451,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
|
|
|
1736
1451
|
createCounterfactualAddress: async (createCounterfactualAddressRequest, options = {}) => {
|
|
1737
1452
|
// verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
|
|
1738
1453
|
assertParamExists$1('createCounterfactualAddress', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
|
|
1739
|
-
const localVarPath = `/v1/counterfactual-address`;
|
|
1454
|
+
const localVarPath = `/passport-mr/v1/counterfactual-address`;
|
|
1740
1455
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1741
1456
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
1742
1457
|
let baseOptions;
|
|
@@ -2236,9 +1951,13 @@ const ActivityType = {
|
|
|
2236
1951
|
* https://openapi-generator.tech
|
|
2237
1952
|
* Do not edit the class manually.
|
|
2238
1953
|
*/
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
1954
|
+
/**
|
|
1955
|
+
* The collection contract type
|
|
1956
|
+
* @export
|
|
1957
|
+
* @enum {string}
|
|
1958
|
+
*/
|
|
1959
|
+
const CollectionContractType = {
|
|
1960
|
+
Erc721: 'ERC721'
|
|
2242
1961
|
};
|
|
2243
1962
|
|
|
2244
1963
|
/* tslint:disable */
|
|
@@ -2254,13 +1973,25 @@ const BuyItemItemTypeEnum = {
|
|
|
2254
1973
|
* https://openapi-generator.tech
|
|
2255
1974
|
* Do not edit the class manually.
|
|
2256
1975
|
*/
|
|
1976
|
+
const CreateOrderProtocolDataOrderTypeEnum = {
|
|
1977
|
+
FullRestricted: 'FULL_RESTRICTED'
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1980
|
+
/* tslint:disable */
|
|
1981
|
+
/* eslint-disable */
|
|
2257
1982
|
/**
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2260
|
-
*
|
|
1983
|
+
* Immutable X API
|
|
1984
|
+
* Immutable Multi Rollup API
|
|
1985
|
+
*
|
|
1986
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1987
|
+
* Contact: support@immutable.com
|
|
1988
|
+
*
|
|
1989
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1990
|
+
* https://openapi-generator.tech
|
|
1991
|
+
* Do not edit the class manually.
|
|
2261
1992
|
*/
|
|
2262
|
-
const
|
|
2263
|
-
|
|
1993
|
+
const ERC20ItemItemTypeEnum = {
|
|
1994
|
+
Erc20: 'ERC20'
|
|
2264
1995
|
};
|
|
2265
1996
|
|
|
2266
1997
|
/* tslint:disable */
|
|
@@ -2276,8 +2007,8 @@ const CollectionContractType = {
|
|
|
2276
2007
|
* https://openapi-generator.tech
|
|
2277
2008
|
* Do not edit the class manually.
|
|
2278
2009
|
*/
|
|
2279
|
-
const
|
|
2280
|
-
|
|
2010
|
+
const ERC721ItemItemTypeEnum = {
|
|
2011
|
+
Erc721: 'ERC721'
|
|
2281
2012
|
};
|
|
2282
2013
|
|
|
2283
2014
|
/* tslint:disable */
|
|
@@ -2332,18 +2063,8 @@ const NFTContractType = {
|
|
|
2332
2063
|
* https://openapi-generator.tech
|
|
2333
2064
|
* Do not edit the class manually.
|
|
2334
2065
|
*/
|
|
2335
|
-
|
|
2336
|
-
|
|
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'
|
|
2066
|
+
const NativeItemItemTypeEnum = {
|
|
2067
|
+
Native: 'NATIVE'
|
|
2347
2068
|
};
|
|
2348
2069
|
|
|
2349
2070
|
/* tslint:disable */
|
|
@@ -2359,8 +2080,18 @@ const OrderStatus$1 = {
|
|
|
2359
2080
|
* https://openapi-generator.tech
|
|
2360
2081
|
* Do not edit the class manually.
|
|
2361
2082
|
*/
|
|
2362
|
-
|
|
2363
|
-
|
|
2083
|
+
/**
|
|
2084
|
+
* The Order status
|
|
2085
|
+
* @export
|
|
2086
|
+
* @enum {string}
|
|
2087
|
+
*/
|
|
2088
|
+
const OrderStatus$1 = {
|
|
2089
|
+
Pending: 'PENDING',
|
|
2090
|
+
Active: 'ACTIVE',
|
|
2091
|
+
Inactive: 'INACTIVE',
|
|
2092
|
+
Filled: 'FILLED',
|
|
2093
|
+
Cancelled: 'CANCELLED',
|
|
2094
|
+
Expired: 'EXPIRED'
|
|
2364
2095
|
};
|
|
2365
2096
|
|
|
2366
2097
|
/* tslint:disable */
|
|
@@ -2376,8 +2107,8 @@ const SaleFeeTypeEnum = {
|
|
|
2376
2107
|
* https://openapi-generator.tech
|
|
2377
2108
|
* Do not edit the class manually.
|
|
2378
2109
|
*/
|
|
2379
|
-
const
|
|
2380
|
-
|
|
2110
|
+
const SaleFeeTypeEnum = {
|
|
2111
|
+
Royalty: 'ROYALTY'
|
|
2381
2112
|
};
|
|
2382
2113
|
|
|
2383
2114
|
/* tslint:disable */
|
|
@@ -2429,7 +2160,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
2429
2160
|
ActivitiesApiFactory: ActivitiesApiFactory,
|
|
2430
2161
|
ActivitiesApiFp: ActivitiesApiFp,
|
|
2431
2162
|
ActivityType: ActivityType,
|
|
2432
|
-
BuyItemItemTypeEnum: BuyItemItemTypeEnum,
|
|
2433
2163
|
ChainsApi: ChainsApi,
|
|
2434
2164
|
ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
|
|
2435
2165
|
ChainsApiFactory: ChainsApiFactory,
|
|
@@ -2441,12 +2171,11 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
2441
2171
|
CollectionsApiFp: CollectionsApiFp,
|
|
2442
2172
|
Configuration: Configuration$1,
|
|
2443
2173
|
CreateOrderProtocolDataOrderTypeEnum: CreateOrderProtocolDataOrderTypeEnum,
|
|
2174
|
+
ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
|
|
2175
|
+
ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
|
|
2444
2176
|
FeeFeeTypeEnum: FeeFeeTypeEnum,
|
|
2445
|
-
ListingsApi: ListingsApi,
|
|
2446
|
-
ListingsApiAxiosParamCreator: ListingsApiAxiosParamCreator,
|
|
2447
|
-
ListingsApiFactory: ListingsApiFactory,
|
|
2448
|
-
ListingsApiFp: ListingsApiFp,
|
|
2449
2177
|
NFTContractType: NFTContractType,
|
|
2178
|
+
NativeItemItemTypeEnum: NativeItemItemTypeEnum,
|
|
2450
2179
|
NftOwnersApi: NftOwnersApi,
|
|
2451
2180
|
NftOwnersApiAxiosParamCreator: NftOwnersApiAxiosParamCreator,
|
|
2452
2181
|
NftOwnersApiFactory: NftOwnersApiFactory,
|
|
@@ -2465,7 +2194,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
2465
2194
|
PassportApiFactory: PassportApiFactory,
|
|
2466
2195
|
PassportApiFp: PassportApiFp,
|
|
2467
2196
|
SaleFeeTypeEnum: SaleFeeTypeEnum,
|
|
2468
|
-
SellItemItemTypeEnum: SellItemItemTypeEnum,
|
|
2469
2197
|
TokenContractType: TokenContractType,
|
|
2470
2198
|
TokensApi: TokensApi,
|
|
2471
2199
|
TokensApiAxiosParamCreator: TokensApiAxiosParamCreator,
|
|
@@ -2492,7 +2220,7 @@ class APIError extends Error {
|
|
|
2492
2220
|
|
|
2493
2221
|
/* eslint-disable implicit-arrow-linebreak */
|
|
2494
2222
|
const defaultHeaders = {
|
|
2495
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.9-alpha.
|
|
2223
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.9-alpha.3',
|
|
2496
2224
|
};
|
|
2497
2225
|
/**
|
|
2498
2226
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -2758,7 +2486,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
2758
2486
|
chainID,
|
|
2759
2487
|
coreContractAddress,
|
|
2760
2488
|
registrationContractAddress,
|
|
2761
|
-
sdkVersion: 'ts-immutable-sdk-0.1.9-alpha.
|
|
2489
|
+
sdkVersion: 'ts-immutable-sdk-0.1.9-alpha.3',
|
|
2762
2490
|
});
|
|
2763
2491
|
/**
|
|
2764
2492
|
* Sets `sdkVersion` at the time of build
|
|
@@ -7029,7 +6757,7 @@ class AuthManager {
|
|
|
7029
6757
|
}
|
|
7030
6758
|
static mapOidcUserToDomainModel = (oidcUser) => {
|
|
7031
6759
|
const passport = oidcUser.profile?.passport;
|
|
7032
|
-
|
|
6760
|
+
const user = {
|
|
7033
6761
|
expired: oidcUser.expired,
|
|
7034
6762
|
idToken: oidcUser.id_token,
|
|
7035
6763
|
accessToken: oidcUser.access_token,
|
|
@@ -7039,10 +6767,21 @@ class AuthManager {
|
|
|
7039
6767
|
email: oidcUser.profile.email,
|
|
7040
6768
|
nickname: oidcUser.profile.nickname,
|
|
7041
6769
|
},
|
|
7042
|
-
etherKey: passport?.ether_key || '',
|
|
7043
|
-
starkKey: passport?.stark_key || '',
|
|
7044
|
-
userAdminKey: passport?.user_admin_key || '',
|
|
7045
6770
|
};
|
|
6771
|
+
if (passport?.imx_eth_address) {
|
|
6772
|
+
user.imx = {
|
|
6773
|
+
ethAddress: passport?.imx_eth_address,
|
|
6774
|
+
starkAddress: passport?.imx_stark_address,
|
|
6775
|
+
userAdminAddress: passport?.imx_user_admin_address,
|
|
6776
|
+
};
|
|
6777
|
+
}
|
|
6778
|
+
if (passport?.zkevm_eth_address) {
|
|
6779
|
+
user.zkEvm = {
|
|
6780
|
+
ethAddress: passport?.zkevm_eth_address,
|
|
6781
|
+
userAdminAddress: passport?.zkevm_user_admin_address,
|
|
6782
|
+
};
|
|
6783
|
+
}
|
|
6784
|
+
return user;
|
|
7046
6785
|
};
|
|
7047
6786
|
async login() {
|
|
7048
6787
|
return withPassportError(async () => {
|
|
@@ -7110,7 +6849,7 @@ const getStarkSigner = async (signer) => withPassportError(async () => {
|
|
|
7110
6849
|
|
|
7111
6850
|
async function exchangeTransfer$1({ user, starkSigner, request, exchangesApi, }) {
|
|
7112
6851
|
return withPassportError(async () => {
|
|
7113
|
-
const ethAddress = user.
|
|
6852
|
+
const { ethAddress } = user.imx;
|
|
7114
6853
|
const transferAmount = request.amount;
|
|
7115
6854
|
const signableResult = await exchangesApi.getExchangeSignableTransfer({
|
|
7116
6855
|
id: request.transactionID,
|
|
@@ -7308,7 +7047,7 @@ class ConfirmationScreen {
|
|
|
7308
7047
|
const ERC721$1 = 'ERC721';
|
|
7309
7048
|
async function createOrder$1({ starkSigner, user, request, ordersApi, confirmationScreen, }) {
|
|
7310
7049
|
return withPassportError(async () => {
|
|
7311
|
-
const ethAddress = user.
|
|
7050
|
+
const { ethAddress } = user.imx;
|
|
7312
7051
|
const amountSell = request.sell.type === ERC721$1 ? '1' : request.sell.amount;
|
|
7313
7052
|
const amountBuy = request.buy.type === ERC721$1 ? '1' : request.buy.amount;
|
|
7314
7053
|
const getSignableOrderRequestV3 = {
|
|
@@ -7424,7 +7163,7 @@ async function registerPassport({ ethSigner, starkSigner, usersApi }, authorizat
|
|
|
7424
7163
|
|
|
7425
7164
|
async function createTrade$1({ request, tradesApi, user, starkSigner, confirmationScreen, }) {
|
|
7426
7165
|
return withPassportError(async () => {
|
|
7427
|
-
const ethAddress = user.
|
|
7166
|
+
const { ethAddress } = user.imx;
|
|
7428
7167
|
const getSignableTradeRequest = {
|
|
7429
7168
|
expiration_timestamp: request.expiration_timestamp,
|
|
7430
7169
|
fees: request.fees,
|
|
@@ -7534,7 +7273,7 @@ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicA
|
|
|
7534
7273
|
return withPassportError(async () => {
|
|
7535
7274
|
const transferAmount = request.type === ERC721$2 ? '1' : request.amount;
|
|
7536
7275
|
const getSignableTransferRequest = {
|
|
7537
|
-
sender: user.
|
|
7276
|
+
sender: user.imx.ethAddress,
|
|
7538
7277
|
token: convertToSignableToken(request),
|
|
7539
7278
|
amount: transferAmount,
|
|
7540
7279
|
receiver: request.receiver,
|
|
@@ -7580,7 +7319,7 @@ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicA
|
|
|
7580
7319
|
}
|
|
7581
7320
|
async function batchNftTransfer({ user, starkSigner, request, transfersApi, confirmationScreen, }) {
|
|
7582
7321
|
return withPassportError(async () => {
|
|
7583
|
-
const ethAddress = user.
|
|
7322
|
+
const { ethAddress } = user.imx;
|
|
7584
7323
|
const signableRequests = request.map((nftTransfer) => ({
|
|
7585
7324
|
amount: '1',
|
|
7586
7325
|
token: convertToSignableToken({
|
|
@@ -7732,7 +7471,7 @@ class PassportImxProvider {
|
|
|
7732
7471
|
throw new PassportError('Operation not supported', PassportErrorType.OPERATION_NOT_SUPPORTED_ERROR);
|
|
7733
7472
|
}
|
|
7734
7473
|
getAddress() {
|
|
7735
|
-
return Promise.resolve(this.user.
|
|
7474
|
+
return Promise.resolve(this.user.imx.ethAddress);
|
|
7736
7475
|
}
|
|
7737
7476
|
}
|
|
7738
7477
|
|
|
@@ -7768,10 +7507,10 @@ class PassportImxProviderFactory {
|
|
|
7768
7507
|
const web3Provider = new Web3Provider(magicRpcProvider);
|
|
7769
7508
|
const ethSigner = web3Provider.getSigner();
|
|
7770
7509
|
const starkSigner = await getStarkSigner(ethSigner);
|
|
7771
|
-
if (!user.
|
|
7772
|
-
const
|
|
7510
|
+
if (!user.imx?.ethAddress) {
|
|
7511
|
+
const userImx = await this.registerStarkEx(ethSigner, starkSigner, user.accessToken);
|
|
7773
7512
|
return new PassportImxProvider({
|
|
7774
|
-
user:
|
|
7513
|
+
user: userImx,
|
|
7775
7514
|
starkSigner,
|
|
7776
7515
|
immutableXClient: this.immutableXClient,
|
|
7777
7516
|
imxPublicApiDomain: this.config.imxPublicApiDomain,
|
|
@@ -7796,7 +7535,7 @@ class PassportImxProviderFactory {
|
|
|
7796
7535
|
// User metadata is updated asynchronously. Poll userinfo endpoint until it is updated.
|
|
7797
7536
|
const updatedUser = await retryWithDelay(async () => {
|
|
7798
7537
|
const user = await this.authManager.loginSilent();
|
|
7799
|
-
const metadataExists = !!user?.
|
|
7538
|
+
const metadataExists = !!user?.imx;
|
|
7800
7539
|
if (metadataExists) {
|
|
7801
7540
|
return user;
|
|
7802
7541
|
}
|
|
@@ -8843,7 +8582,7 @@ class ImmutableApiClient {
|
|
|
8843
8582
|
...listOrderParams,
|
|
8844
8583
|
});
|
|
8845
8584
|
}
|
|
8846
|
-
async createListing({ orderHash, orderComponents,
|
|
8585
|
+
async createListing({ orderHash, orderComponents, orderSignature, }) {
|
|
8847
8586
|
if (orderComponents.offer.length !== 1) {
|
|
8848
8587
|
throw new Error('Only one item can be listed at a time');
|
|
8849
8588
|
}
|
|
@@ -8861,7 +8600,7 @@ class ImmutableApiClient {
|
|
|
8861
8600
|
chainName: this.chainName,
|
|
8862
8601
|
requestBody: {
|
|
8863
8602
|
order_hash: orderHash,
|
|
8864
|
-
account_address: offerer,
|
|
8603
|
+
account_address: orderComponents.offerer,
|
|
8865
8604
|
buy: [
|
|
8866
8605
|
{
|
|
8867
8606
|
item_type: Number(orderComponents.consideration[0].itemType)
|
|
@@ -9892,10 +9631,10 @@ class Orderbook {
|
|
|
9892
9631
|
* the unsigned approval transaction, the typed order message for signing and
|
|
9893
9632
|
* the order components that can be submitted to `createListing` with a signature.
|
|
9894
9633
|
*/
|
|
9895
|
-
async prepareListing({
|
|
9896
|
-
const erc721 = new ERC721Factory(
|
|
9897
|
-
const royaltyInfo = await erc721.royaltyInfo(
|
|
9898
|
-
return this.seaport.prepareSeaportOrder(
|
|
9634
|
+
async prepareListing({ makerAddress, sell, buy, orderExpiry, }) {
|
|
9635
|
+
const erc721 = new ERC721Factory(sell.contractAddress, this.config.provider).create();
|
|
9636
|
+
const royaltyInfo = await erc721.royaltyInfo(sell.tokenId, buy.amount);
|
|
9637
|
+
return this.seaport.prepareSeaportOrder(makerAddress, sell, buy, royaltyInfo,
|
|
9899
9638
|
// Default order start to now
|
|
9900
9639
|
new Date(),
|
|
9901
9640
|
// Default order expiry to 2 years from now
|
|
@@ -9917,12 +9656,12 @@ class Orderbook {
|
|
|
9917
9656
|
* @param {string} fulfillerAddress - The address of the account fulfilling the order.
|
|
9918
9657
|
* @return {FulfillOrderResponse} Approval and fulfilment transactions.
|
|
9919
9658
|
*/
|
|
9920
|
-
async fulfillOrder(listingId,
|
|
9659
|
+
async fulfillOrder(listingId, takerAddress) {
|
|
9921
9660
|
const orderResult = await this.apiClient.getListing(listingId);
|
|
9922
9661
|
if (orderResult.result.status !== OrderStatus.ACTIVE) {
|
|
9923
9662
|
throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.result.status}`);
|
|
9924
9663
|
}
|
|
9925
|
-
return this.seaport.fulfilOrder(orderResult.result,
|
|
9664
|
+
return this.seaport.fulfilOrder(orderResult.result, takerAddress);
|
|
9926
9665
|
}
|
|
9927
9666
|
/**
|
|
9928
9667
|
* Get an unsigned cancel order transaction. Orders can only be cancelled by
|
|
@@ -11004,1308 +10743,6 @@ class ProviderConfiguration {
|
|
|
11004
10743
|
}
|
|
11005
10744
|
}
|
|
11006
10745
|
|
|
11007
|
-
function $parcel$interopDefault(a) {
|
|
11008
|
-
return a && a.__esModule ? a.default : a;
|
|
11009
|
-
}
|
|
11010
|
-
/* eslint-disable class-methods-use-this */
|
|
11011
|
-
const $762782b6c862d954$export$db5daa1b5156ccfe = [
|
|
11012
|
-
{
|
|
11013
|
-
constant: true,
|
|
11014
|
-
inputs: [],
|
|
11015
|
-
name: "name",
|
|
11016
|
-
outputs: [
|
|
11017
|
-
{
|
|
11018
|
-
name: "",
|
|
11019
|
-
type: "string"
|
|
11020
|
-
}
|
|
11021
|
-
],
|
|
11022
|
-
payable: false,
|
|
11023
|
-
type: "function"
|
|
11024
|
-
},
|
|
11025
|
-
{
|
|
11026
|
-
constant: true,
|
|
11027
|
-
inputs: [],
|
|
11028
|
-
name: "decimals",
|
|
11029
|
-
outputs: [
|
|
11030
|
-
{
|
|
11031
|
-
name: "",
|
|
11032
|
-
type: "uint8"
|
|
11033
|
-
}
|
|
11034
|
-
],
|
|
11035
|
-
payable: false,
|
|
11036
|
-
type: "function"
|
|
11037
|
-
},
|
|
11038
|
-
{
|
|
11039
|
-
constant: true,
|
|
11040
|
-
inputs: [
|
|
11041
|
-
{
|
|
11042
|
-
name: "_owner",
|
|
11043
|
-
type: "address"
|
|
11044
|
-
}
|
|
11045
|
-
],
|
|
11046
|
-
name: "balanceOf",
|
|
11047
|
-
outputs: [
|
|
11048
|
-
{
|
|
11049
|
-
name: "balance",
|
|
11050
|
-
type: "uint256"
|
|
11051
|
-
}
|
|
11052
|
-
],
|
|
11053
|
-
payable: false,
|
|
11054
|
-
type: "function"
|
|
11055
|
-
},
|
|
11056
|
-
{
|
|
11057
|
-
constant: true,
|
|
11058
|
-
inputs: [],
|
|
11059
|
-
name: "symbol",
|
|
11060
|
-
outputs: [
|
|
11061
|
-
{
|
|
11062
|
-
name: "",
|
|
11063
|
-
type: "string"
|
|
11064
|
-
}
|
|
11065
|
-
],
|
|
11066
|
-
payable: false,
|
|
11067
|
-
type: "function"
|
|
11068
|
-
}
|
|
11069
|
-
];
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
/**
|
|
11073
|
-
* Enum representing the supported chains with their corresponding IDs.
|
|
11074
|
-
*/ var $baec09ddc3013323$export$c06e1e7429de6283;
|
|
11075
|
-
(function(ChainId) {
|
|
11076
|
-
ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
|
|
11077
|
-
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13372] = "IMTBL_ZKEVM_TESTNET";
|
|
11078
|
-
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
|
|
11079
|
-
ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13383] = "IMTBL_ZKEVM_DEVNET";
|
|
11080
|
-
})($baec09ddc3013323$export$c06e1e7429de6283 || ($baec09ddc3013323$export$c06e1e7429de6283 = {}));
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
const $bc2bfebf768286d3$export$6a2ba3c3bd042990 = {
|
|
11085
|
-
baseConfig: {
|
|
11086
|
-
environment: (Environment).SANDBOX
|
|
11087
|
-
}
|
|
11088
|
-
};
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
var $d176a05e966364ba$export$3bfad4d03ada24c4;
|
|
11092
|
-
(function(ConnectionProviders) {
|
|
11093
|
-
ConnectionProviders["METAMASK"] = "metamask";
|
|
11094
|
-
})($d176a05e966364ba$export$3bfad4d03ada24c4 || ($d176a05e966364ba$export$3bfad4d03ada24c4 = {}));
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
var $de275b98d2b651c3$export$788b1fd17f3dad84;
|
|
11098
|
-
(function(GasEstimateType) {
|
|
11099
|
-
GasEstimateType["BRIDGE_TO_L2"] = "BRIDGE_TO_L2";
|
|
11100
|
-
GasEstimateType["SWAP"] = "SWAP";
|
|
11101
|
-
})($de275b98d2b651c3$export$788b1fd17f3dad84 || ($de275b98d2b651c3$export$788b1fd17f3dad84 = {}));
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
const $a47e48dd2c04791b$export$345c852d0dc8f1df = new Map([
|
|
11106
|
-
[
|
|
11107
|
-
($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM,
|
|
11108
|
-
"https://checkout-api.dev.immutable.com/v1/rpc/eth-mainnet"
|
|
11109
|
-
],
|
|
11110
|
-
[
|
|
11111
|
-
($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET,
|
|
11112
|
-
"https://zkevm-rpc.sandbox.x.immutable.com"
|
|
11113
|
-
],
|
|
11114
|
-
[
|
|
11115
|
-
($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA,
|
|
11116
|
-
"https://checkout-api.dev.immutable.com/v1/rpc/eth-sepolia"
|
|
11117
|
-
],
|
|
11118
|
-
[
|
|
11119
|
-
($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_DEVNET,
|
|
11120
|
-
"https://zkevm-rpc.dev.x.immutable.com"
|
|
11121
|
-
]
|
|
11122
|
-
]);
|
|
11123
|
-
const $a47e48dd2c04791b$export$6f24f3cef7d501c4 = new Map([
|
|
11124
|
-
[
|
|
11125
|
-
($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM,
|
|
11126
|
-
{
|
|
11127
|
-
chainIdHex: "0x1",
|
|
11128
|
-
chainName: "Ethereum",
|
|
11129
|
-
rpcUrls: [
|
|
11130
|
-
$a47e48dd2c04791b$export$345c852d0dc8f1df.get(($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM)
|
|
11131
|
-
],
|
|
11132
|
-
nativeCurrency: {
|
|
11133
|
-
name: "Ethereum",
|
|
11134
|
-
symbol: "ETH",
|
|
11135
|
-
decimals: 18
|
|
11136
|
-
},
|
|
11137
|
-
blockExplorerUrls: [
|
|
11138
|
-
"https://etherscan.io/"
|
|
11139
|
-
]
|
|
11140
|
-
}
|
|
11141
|
-
],
|
|
11142
|
-
[
|
|
11143
|
-
($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET,
|
|
11144
|
-
{
|
|
11145
|
-
chainIdHex: "0x343C",
|
|
11146
|
-
chainName: "Immutable zkEVM Testnet",
|
|
11147
|
-
rpcUrls: [
|
|
11148
|
-
$a47e48dd2c04791b$export$345c852d0dc8f1df.get(($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET)
|
|
11149
|
-
],
|
|
11150
|
-
nativeCurrency: {
|
|
11151
|
-
name: "IMX",
|
|
11152
|
-
symbol: "IMX",
|
|
11153
|
-
decimals: 18
|
|
11154
|
-
}
|
|
11155
|
-
}
|
|
11156
|
-
]
|
|
11157
|
-
]);
|
|
11158
|
-
const $a47e48dd2c04791b$export$3e81fc0987227f10 = new Map([
|
|
11159
|
-
[
|
|
11160
|
-
($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA,
|
|
11161
|
-
{
|
|
11162
|
-
chainIdHex: "0xaa36a7",
|
|
11163
|
-
chainName: "Sepolia",
|
|
11164
|
-
rpcUrls: [
|
|
11165
|
-
$a47e48dd2c04791b$export$345c852d0dc8f1df.get(($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA)
|
|
11166
|
-
],
|
|
11167
|
-
nativeCurrency: {
|
|
11168
|
-
name: "Sep Eth",
|
|
11169
|
-
symbol: "ETH",
|
|
11170
|
-
decimals: 18
|
|
11171
|
-
},
|
|
11172
|
-
blockExplorerUrls: [
|
|
11173
|
-
"https://sepolia.etherscan.io/"
|
|
11174
|
-
]
|
|
11175
|
-
}
|
|
11176
|
-
],
|
|
11177
|
-
[
|
|
11178
|
-
($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_DEVNET,
|
|
11179
|
-
{
|
|
11180
|
-
chainIdHex: "0x3447",
|
|
11181
|
-
chainName: "Immutable zkEVM Devnet",
|
|
11182
|
-
rpcUrls: [
|
|
11183
|
-
$a47e48dd2c04791b$export$345c852d0dc8f1df.get(($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_DEVNET)
|
|
11184
|
-
],
|
|
11185
|
-
nativeCurrency: {
|
|
11186
|
-
name: "IMX",
|
|
11187
|
-
symbol: "IMX",
|
|
11188
|
-
decimals: 18
|
|
11189
|
-
}
|
|
11190
|
-
}
|
|
11191
|
-
]
|
|
11192
|
-
]);
|
|
11193
|
-
var $a47e48dd2c04791b$export$1f05a55fe0680cc7;
|
|
11194
|
-
(function(NetworkFilterTypes) {
|
|
11195
|
-
NetworkFilterTypes["ALL"] = "all";
|
|
11196
|
-
})($a47e48dd2c04791b$export$1f05a55fe0680cc7 || ($a47e48dd2c04791b$export$1f05a55fe0680cc7 = {}));
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
var $08d5ddc39acd6833$export$fd9b17d87f4121d2;
|
|
11202
|
-
(function(TokenFilterTypes) {
|
|
11203
|
-
TokenFilterTypes["SWAP"] = "swap";
|
|
11204
|
-
TokenFilterTypes["BRIDGE"] = "bridge";
|
|
11205
|
-
TokenFilterTypes["ALL"] = "all";
|
|
11206
|
-
})($08d5ddc39acd6833$export$fd9b17d87f4121d2 || ($08d5ddc39acd6833$export$fd9b17d87f4121d2 = {}));
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
/**
|
|
11210
|
-
* Interface representing token information.
|
|
11211
|
-
* @property {string} name - The token name.
|
|
11212
|
-
* @property {string} symbol - The token symbol.
|
|
11213
|
-
* @property {number} decimals - The token decimals.
|
|
11214
|
-
* @property {string} [address] - The token contract address.
|
|
11215
|
-
* @property {string} [icon] - The token icon URL/data:image.
|
|
11216
|
-
*/
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
var $4f91c5f280efe242$export$35b06f0d33f57e26;
|
|
11221
|
-
(function(WalletAction) {
|
|
11222
|
-
WalletAction["CHECK_CONNECTION"] = "eth_accounts";
|
|
11223
|
-
WalletAction["CONNECT"] = "eth_requestAccounts";
|
|
11224
|
-
WalletAction["ADD_NETWORK"] = "wallet_addEthereumChain";
|
|
11225
|
-
WalletAction["SWITCH_NETWORK"] = "wallet_switchEthereumChain";
|
|
11226
|
-
WalletAction["GET_CHAINID"] = "eth_chainId";
|
|
11227
|
-
})($4f91c5f280efe242$export$35b06f0d33f57e26 || ($4f91c5f280efe242$export$35b06f0d33f57e26 = {}));
|
|
11228
|
-
var $4f91c5f280efe242$export$a75605c67ea83a5a;
|
|
11229
|
-
(function(WalletFilterTypes) {
|
|
11230
|
-
WalletFilterTypes["ALL"] = "all";
|
|
11231
|
-
WalletFilterTypes["DESKTOP"] = "desktop";
|
|
11232
|
-
WalletFilterTypes["MOBILE"] = "mobile";
|
|
11233
|
-
})($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
var $e768639828688ca3$export$2d7a51a18d87e21d;
|
|
11237
|
-
(function(WalletProviderName) {
|
|
11238
|
-
WalletProviderName["METAMASK"] = "metamask";
|
|
11239
|
-
})($e768639828688ca3$export$2d7a51a18d87e21d || ($e768639828688ca3$export$2d7a51a18d87e21d = {}));
|
|
11240
|
-
const $e768639828688ca3$export$44dde05038008549 = {
|
|
11241
|
-
allowMistmatchedChainId: false,
|
|
11242
|
-
allowUnsupportedProvider: false
|
|
11243
|
-
};
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
/**
|
|
11249
|
-
* The different types of errors that can be returned by the checkout process.
|
|
11250
|
-
*/ var $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
|
|
11251
|
-
(function(CheckoutErrorType) {
|
|
11252
|
-
CheckoutErrorType["WEB3_PROVIDER_ERROR"] = "WEB3_PROVIDER_ERROR";
|
|
11253
|
-
CheckoutErrorType["PROVIDER_ERROR"] = "PROVIDER_ERROR";
|
|
11254
|
-
CheckoutErrorType["DEFAULT_PROVIDER_ERROR"] = "DEFAULT_PROVIDER_ERROR";
|
|
11255
|
-
CheckoutErrorType["CONNECT_PROVIDER_ERROR"] = "CONNECT_PROVIDER_ERROR";
|
|
11256
|
-
CheckoutErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
|
|
11257
|
-
CheckoutErrorType["GET_ERC20_BALANCE_ERROR"] = "GET_ERC20_BALANCE_ERROR";
|
|
11258
|
-
CheckoutErrorType["GET_NETWORK_INFO_ERROR"] = "GET_NETWORK_INFO_ERROR";
|
|
11259
|
-
CheckoutErrorType["METAMASK_PROVIDER_ERROR"] = "METAMASK_PROVIDER_ERROR";
|
|
11260
|
-
CheckoutErrorType["CHAIN_NOT_SUPPORTED_ERROR"] = "CHAIN_NOT_SUPPORTED_ERROR";
|
|
11261
|
-
CheckoutErrorType["PROVIDER_REQUEST_MISSING_ERROR"] = "PROVIDER_REQUEST_MISSING_ERROR";
|
|
11262
|
-
CheckoutErrorType["PROVIDER_REQUEST_FAILED_ERROR"] = "PROVIDER_REQUEST_FAILED_ERROR";
|
|
11263
|
-
CheckoutErrorType["USER_REJECTED_REQUEST_ERROR"] = "USER_REJECTED_REQUEST_ERROR";
|
|
11264
|
-
CheckoutErrorType["TRANSACTION_FAILED"] = "TRANSACTION_FAILED";
|
|
11265
|
-
CheckoutErrorType["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
|
|
11266
|
-
CheckoutErrorType["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT";
|
|
11267
|
-
CheckoutErrorType["INVALID_GAS_ESTIMATE_TYPE"] = "INVALID_GAS_ESTIMATE_TYPE";
|
|
11268
|
-
})($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
|
|
11269
|
-
class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
|
|
11270
|
-
message;
|
|
11271
|
-
type;
|
|
11272
|
-
data;
|
|
11273
|
-
constructor(message, type, data){
|
|
11274
|
-
super(message);
|
|
11275
|
-
this.message = message;
|
|
11276
|
-
this.type = type;
|
|
11277
|
-
this.data = data;
|
|
11278
|
-
}
|
|
11279
|
-
}
|
|
11280
|
-
var $a8bc256d81a5e2c1$export$a22d4e0719ee6def;
|
|
11281
|
-
(function(CheckoutInternalErrorType) {
|
|
11282
|
-
CheckoutInternalErrorType["REJECTED_SWITCH_AFTER_ADDING_NETWORK"] = "REJECTED_SWITCH_AFTER_ADDING_NETWORK";
|
|
11283
|
-
})($a8bc256d81a5e2c1$export$a22d4e0719ee6def || ($a8bc256d81a5e2c1$export$a22d4e0719ee6def = {}));
|
|
11284
|
-
const $a8bc256d81a5e2c1$export$bacc563de539c6c3 = async (fn, customError)=>{
|
|
11285
|
-
try {
|
|
11286
|
-
return await fn();
|
|
11287
|
-
} catch (error) {
|
|
11288
|
-
const cause = `${error.message}` || "UnknownError";
|
|
11289
|
-
const errorMessage = customError.message ? `[${customError.type}]:${customError.message}. Cause:${cause}` : `[${customError.type}] Cause:${cause}`;
|
|
11290
|
-
if (error instanceof $a8bc256d81a5e2c1$export$b722478a3cbfa3bc) throw new $a8bc256d81a5e2c1$export$b722478a3cbfa3bc(errorMessage, customError.type, {
|
|
11291
|
-
...customError.data,
|
|
11292
|
-
innerErrorType: error.type,
|
|
11293
|
-
...error.data
|
|
11294
|
-
});
|
|
11295
|
-
throw new $a8bc256d81a5e2c1$export$b722478a3cbfa3bc(errorMessage, customError.type, {
|
|
11296
|
-
...customError.data
|
|
11297
|
-
});
|
|
11298
|
-
}
|
|
11299
|
-
};
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
var $497c134ecbc8a50f$exports = {};
|
|
11308
|
-
$497c134ecbc8a50f$exports = JSON.parse('[{"chainId":1},{"chainId":11155111},{"chainId":13372},{"chainId":13383}]');
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
// this function needs to be in a separate file to prevent circular dependencies with ./network
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
async function $a1555a1d2c8d059b$export$c3ba3e93a9fee972(web3Provider) {
|
|
11315
|
-
if (!web3Provider.provider.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Parsed provider is not a valid Web3Provider", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).WEB3_PROVIDER_ERROR);
|
|
11316
|
-
const chainId = await web3Provider.provider.request({
|
|
11317
|
-
method: ($4f91c5f280efe242$export$35b06f0d33f57e26).GET_CHAINID,
|
|
11318
|
-
params: []
|
|
11319
|
-
});
|
|
11320
|
-
return parseInt(chainId, 16);
|
|
11321
|
-
}
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
const $de192de6ef100f9f$var$UNRECOGNISED_CHAIN_ERROR_CODE = 4902; // error code (MetaMask)
|
|
11325
|
-
// these functions should not be exported. These functions should be used as part of an exported function e.g switchWalletNetwork() above.
|
|
11326
|
-
// make sure to check if(provider.provider?.request) in the exported function and throw an error
|
|
11327
|
-
// eslint-disable-next-line consistent-return
|
|
11328
|
-
async function $de192de6ef100f9f$var$switchNetworkInWallet(networkMap, web3Provider, chainId) {
|
|
11329
|
-
if (web3Provider.provider?.request) return await web3Provider.provider.request({
|
|
11330
|
-
method: ($4f91c5f280efe242$export$35b06f0d33f57e26).SWITCH_NETWORK,
|
|
11331
|
-
params: [
|
|
11332
|
-
{
|
|
11333
|
-
chainId: networkMap.get(chainId)?.chainIdHex
|
|
11334
|
-
}
|
|
11335
|
-
]
|
|
11336
|
-
});
|
|
11337
|
-
}
|
|
11338
|
-
// TODO: Should these functions always return something?
|
|
11339
|
-
// eslint-disable-next-line consistent-return
|
|
11340
|
-
async function $de192de6ef100f9f$var$addNetworkToWallet(networkMap, web3Provider, chainId) {
|
|
11341
|
-
if (web3Provider.provider?.request) {
|
|
11342
|
-
const networkDetails = networkMap.get(chainId);
|
|
11343
|
-
const addNetwork = {
|
|
11344
|
-
chainId: networkDetails?.chainIdHex,
|
|
11345
|
-
chainName: networkDetails?.chainName,
|
|
11346
|
-
rpcUrls: networkDetails?.rpcUrls,
|
|
11347
|
-
nativeCurrency: networkDetails?.nativeCurrency,
|
|
11348
|
-
blockExplorerUrls: networkDetails?.blockExplorerUrls
|
|
11349
|
-
};
|
|
11350
|
-
return await web3Provider.provider.request({
|
|
11351
|
-
method: ($4f91c5f280efe242$export$35b06f0d33f57e26).ADD_NETWORK,
|
|
11352
|
-
params: [
|
|
11353
|
-
addNetwork
|
|
11354
|
-
]
|
|
11355
|
-
});
|
|
11356
|
-
}
|
|
11357
|
-
}
|
|
11358
|
-
async function $de192de6ef100f9f$export$3043f6442a9ef563(config, { type: type = ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL , exclude: exclude }) {
|
|
11359
|
-
const { networkMap: networkMap } = config;
|
|
11360
|
-
const list = ((/*@__PURE__*/$parcel$interopDefault($497c134ecbc8a50f$exports))).filter((network)=>{
|
|
11361
|
-
const allowAllTokens = type === ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL;
|
|
11362
|
-
const networkNotExcluded = !(exclude || []).map((exc)=>exc.chainId).includes(network.chainId);
|
|
11363
|
-
return allowAllTokens && networkNotExcluded;
|
|
11364
|
-
});
|
|
11365
|
-
const allowedNetworks = [];
|
|
11366
|
-
list.forEach((element)=>{
|
|
11367
|
-
const newNetwork = networkMap.get(element.chainId);
|
|
11368
|
-
if (newNetwork) allowedNetworks.push({
|
|
11369
|
-
name: newNetwork.chainName,
|
|
11370
|
-
chainId: parseInt(newNetwork.chainIdHex, 16),
|
|
11371
|
-
nativeCurrency: newNetwork.nativeCurrency,
|
|
11372
|
-
isSupported: true
|
|
11373
|
-
});
|
|
11374
|
-
});
|
|
11375
|
-
return {
|
|
11376
|
-
networks: allowedNetworks
|
|
11377
|
-
};
|
|
11378
|
-
}
|
|
11379
|
-
async function $de192de6ef100f9f$export$79f13b4cfaaf0d09(config, web3Provider) {
|
|
11380
|
-
const { networkMap: networkMap } = config;
|
|
11381
|
-
return ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
|
|
11382
|
-
try {
|
|
11383
|
-
const network = await web3Provider.getNetwork();
|
|
11384
|
-
if (Array.from(networkMap.keys()).includes(network.chainId)) {
|
|
11385
|
-
const chainIdNetworkInfo = networkMap.get(network.chainId);
|
|
11386
|
-
return {
|
|
11387
|
-
name: chainIdNetworkInfo.chainName,
|
|
11388
|
-
chainId: parseInt(chainIdNetworkInfo.chainIdHex, 16),
|
|
11389
|
-
nativeCurrency: chainIdNetworkInfo.nativeCurrency,
|
|
11390
|
-
isSupported: true
|
|
11391
|
-
};
|
|
11392
|
-
}
|
|
11393
|
-
return {
|
|
11394
|
-
chainId: network.chainId,
|
|
11395
|
-
name: network.name,
|
|
11396
|
-
isSupported: false
|
|
11397
|
-
};
|
|
11398
|
-
} catch (err) {
|
|
11399
|
-
const chainId = await ($a1555a1d2c8d059b$export$c3ba3e93a9fee972)(web3Provider);
|
|
11400
|
-
const isSupported = Array.from(networkMap.keys()).includes(chainId);
|
|
11401
|
-
return {
|
|
11402
|
-
chainId: chainId,
|
|
11403
|
-
isSupported: isSupported
|
|
11404
|
-
};
|
|
11405
|
-
}
|
|
11406
|
-
}, {
|
|
11407
|
-
type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_NETWORK_INFO_ERROR
|
|
11408
|
-
});
|
|
11409
|
-
}
|
|
11410
|
-
async function $de192de6ef100f9f$export$b827d9418aeb5dbd(config, web3Provider, chainId) {
|
|
11411
|
-
const { networkMap: networkMap } = config;
|
|
11412
|
-
const allowedNetworks = await $de192de6ef100f9f$export$3043f6442a9ef563(config, {
|
|
11413
|
-
type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
|
|
11414
|
-
});
|
|
11415
|
-
if (!allowedNetworks.networks.some((network)=>network.chainId === chainId)) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${chainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR);
|
|
11416
|
-
// WT-1146 - Refer to the README in this folder for explantion on the switch network flow
|
|
11417
|
-
try {
|
|
11418
|
-
await $de192de6ef100f9f$var$switchNetworkInWallet(networkMap, web3Provider, chainId);
|
|
11419
|
-
} catch (err) {
|
|
11420
|
-
if (err.code === $de192de6ef100f9f$var$UNRECOGNISED_CHAIN_ERROR_CODE) try {
|
|
11421
|
-
await $de192de6ef100f9f$var$addNetworkToWallet(networkMap, web3Provider, chainId);
|
|
11422
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
11423
|
-
} catch (err) {
|
|
11424
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("User cancelled add network request", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
|
|
11425
|
-
}
|
|
11426
|
-
else throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("User cancelled switch network request", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
|
|
11427
|
-
}
|
|
11428
|
-
const newProvider = new (Web3Provider)(web3Provider.provider);
|
|
11429
|
-
const newProviderNetwork = await newProvider.getNetwork();
|
|
11430
|
-
if (newProviderNetwork.chainId !== chainId) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("User cancelled switch network request", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
|
|
11431
|
-
const networkInfo = await $de192de6ef100f9f$export$79f13b4cfaaf0d09(config, newProvider);
|
|
11432
|
-
return {
|
|
11433
|
-
network: networkInfo,
|
|
11434
|
-
provider: newProvider
|
|
11435
|
-
};
|
|
11436
|
-
}
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
var $cda6003506e4182e$exports = {};
|
|
11443
|
-
$cda6003506e4182e$exports = JSON.parse("[{\"chainId\":13383,\"name\":\"IMX\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":13383,\"name\":\"FUN token\",\"address\":\"0xFEa9FF93DC0C6DC73F8Be009Fe7a22Bb9dcE8A2d\",\"symbol\":\"FUN\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":13383,\"name\":\"USDC\",\"address\":\"0x5893A5c7bc615Dfd36D7383366d00FFFca5f7178\",\"symbol\":\"USDC\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":13383,\"name\":\"WETH\",\"address\":\"0xD6d9321DCC42377C1fa8cFec665182c463b2392C\",\"symbol\":\"WETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":1,\"name\":\"Ethereum\",\"symbol\":\"ETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF\",\"chainId\":1,\"name\":\"Immutable X\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":11155111,\"name\":\"Sep Eth\",\"symbol\":\"ETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\"]},{\"chainId\":11155111,\"name\":\"Immutable Test token\",\"address\":\"0xd1da7e9b2Ce1a4024DaD52b3D37F4c5c91a525C1\",\"symbol\":\"TEST\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":11155111,\"name\":\"FUN token\",\"address\":\"0x741185AEFC3E539c1F42c1d6eeE8bFf1c89D70FE\",\"symbol\":\"FUN\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":11155111,\"name\":\"US Dollar Coin\",\"address\":\"0x1836E16b2036088490C2CFe4d11970Fc8e5884C4\",\"symbol\":\"USDC\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":13383,\"name\":\"DEX\",\"address\":\"0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e\",\"symbol\":\"DEX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":11155111,\"name\":\"DEX\",\"address\":\"0xaC953a0d7B67Fae17c87abf79f09D0f818AC66A2\",\"symbol\":\"DEX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"chainId\":1442,\"name\":\"WETH\",\"address\":\"0x4F062A3EAeC3730560aB89b5CE5aC0ab2C5517aE\",\"symbol\":\"WETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x72958b06abdF2701AcE6ceb3cE0B8B1CE11E0851\",\"chainId\":1442,\"name\":\"Immutable X\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]}]");
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
const $efe60cea83bfc4e8$var$filterTokenList = ({ type: type , chainId: chainId , exclude: exclude })=>((/*@__PURE__*/$parcel$interopDefault($cda6003506e4182e$exports))).filter((token)=>{
|
|
11447
|
-
const skipChainIdCheck = !chainId;
|
|
11448
|
-
const chainIdMatches = token.chainId === chainId;
|
|
11449
|
-
const tokenNotExcluded = !exclude?.map((excludeToken)=>excludeToken.address).includes(token.address || "");
|
|
11450
|
-
const allowAllTokens = type === ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL;
|
|
11451
|
-
const tokenAllowedForType = token.tokenFeatures.includes(type);
|
|
11452
|
-
return (skipChainIdCheck || chainIdMatches) && tokenNotExcluded && (allowAllTokens || tokenAllowedForType);
|
|
11453
|
-
});
|
|
11454
|
-
const $efe60cea83bfc4e8$export$473cec51305fdae8 = async ({ type: type = ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL , chainId: chainId , exclude: exclude })=>{
|
|
11455
|
-
const filteredTokenList = $efe60cea83bfc4e8$var$filterTokenList({
|
|
11456
|
-
type: type,
|
|
11457
|
-
chainId: chainId,
|
|
11458
|
-
exclude: exclude
|
|
11459
|
-
}).map((token)=>({
|
|
11460
|
-
name: token.name,
|
|
11461
|
-
symbol: token.symbol,
|
|
11462
|
-
decimals: token.decimals,
|
|
11463
|
-
address: token.address,
|
|
11464
|
-
icon: token.icon
|
|
11465
|
-
}));
|
|
11466
|
-
return {
|
|
11467
|
-
tokens: filteredTokenList
|
|
11468
|
-
};
|
|
11469
|
-
};
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
const $1564e43dde50bb61$export$df96cd8d56be0ab1 = async (config, web3Provider, walletAddress)=>await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
|
|
11475
|
-
const networkInfo = await ($de192de6ef100f9f$export$79f13b4cfaaf0d09)(config, web3Provider);
|
|
11476
|
-
if (!networkInfo.isSupported) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${networkInfo.chainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR, {
|
|
11477
|
-
chainName: networkInfo.name
|
|
11478
|
-
});
|
|
11479
|
-
const balance = await web3Provider.getBalance(walletAddress);
|
|
11480
|
-
return {
|
|
11481
|
-
balance: balance,
|
|
11482
|
-
formattedBalance: (utils$1).formatUnits(balance, networkInfo.nativeCurrency.decimals),
|
|
11483
|
-
token: networkInfo.nativeCurrency
|
|
11484
|
-
};
|
|
11485
|
-
}, {
|
|
11486
|
-
type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_BALANCE_ERROR
|
|
11487
|
-
});
|
|
11488
|
-
async function $1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, walletAddress, contractAddress) {
|
|
11489
|
-
return await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
|
|
11490
|
-
const contract = new (Contract)(contractAddress, JSON.stringify(($762782b6c862d954$export$db5daa1b5156ccfe)), web3Provider);
|
|
11491
|
-
const name = await contract.name();
|
|
11492
|
-
const symbol = await contract.symbol();
|
|
11493
|
-
const balance = await contract.balanceOf(walletAddress);
|
|
11494
|
-
const decimals = await contract.decimals();
|
|
11495
|
-
const formattedBalance = (utils$1).formatUnits(balance, decimals);
|
|
11496
|
-
return {
|
|
11497
|
-
balance: balance,
|
|
11498
|
-
formattedBalance: formattedBalance,
|
|
11499
|
-
token: {
|
|
11500
|
-
name: name,
|
|
11501
|
-
symbol: symbol,
|
|
11502
|
-
decimals: decimals,
|
|
11503
|
-
address: contractAddress
|
|
11504
|
-
}
|
|
11505
|
-
};
|
|
11506
|
-
}, {
|
|
11507
|
-
type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC20_BALANCE_ERROR
|
|
11508
|
-
});
|
|
11509
|
-
}
|
|
11510
|
-
const $1564e43dde50bb61$export$fee49741664a4d7e = async (config, web3Provider, walletAddress, chainId)=>{
|
|
11511
|
-
const tokenList = await ($efe60cea83bfc4e8$export$473cec51305fdae8)({
|
|
11512
|
-
type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
|
|
11513
|
-
chainId: chainId
|
|
11514
|
-
});
|
|
11515
|
-
const allBalancePromises = [];
|
|
11516
|
-
allBalancePromises.push($1564e43dde50bb61$export$df96cd8d56be0ab1(config, web3Provider, walletAddress));
|
|
11517
|
-
tokenList.tokens.filter((token)=>token.address).forEach((token)=>allBalancePromises.push($1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, walletAddress, token.address ?? "")));
|
|
11518
|
-
const balanceResults = await Promise.allSettled(allBalancePromises);
|
|
11519
|
-
const getBalanceResults = balanceResults.filter((result)=>result.status === "fulfilled").map((fulfilledResult)=>fulfilledResult.value);
|
|
11520
|
-
return {
|
|
11521
|
-
balances: getBalanceResults
|
|
11522
|
-
};
|
|
11523
|
-
};
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11530
|
-
|
|
11531
|
-
async function $c99672cf2294e839$export$2d040992269b4717(web3Provider) {
|
|
11532
|
-
if (!web3Provider?.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Check wallet connection request failed", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_FAILED_ERROR, {
|
|
11533
|
-
rpcMethod: ($4f91c5f280efe242$export$35b06f0d33f57e26).CHECK_CONNECTION
|
|
11534
|
-
});
|
|
11535
|
-
let accounts = [];
|
|
11536
|
-
try {
|
|
11537
|
-
accounts = await web3Provider.provider.request({
|
|
11538
|
-
method: (0, $4f91c5f280efe242$export$35b06f0d33f57e26).CHECK_CONNECTION,
|
|
11539
|
-
params: []
|
|
11540
|
-
});
|
|
11541
|
-
} catch (err) {
|
|
11542
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Check wallet connection request failed", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_FAILED_ERROR, {
|
|
11543
|
-
rpcMethod: ($4f91c5f280efe242$export$35b06f0d33f57e26).CHECK_CONNECTION
|
|
11544
|
-
});
|
|
11545
|
-
}
|
|
11546
|
-
// accounts[0] will have the active account if connected.
|
|
11547
|
-
return {
|
|
11548
|
-
isConnected: accounts && accounts.length > 0,
|
|
11549
|
-
walletAddress: accounts[0] ?? ""
|
|
11550
|
-
};
|
|
11551
|
-
}
|
|
11552
|
-
async function $c99672cf2294e839$export$43f7168eb392a88c(web3Provider) {
|
|
11553
|
-
await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
|
|
11554
|
-
if (!web3Provider || !web3Provider?.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Incompatible provider", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR, {
|
|
11555
|
-
details: "Attempting to connect with an incompatible provider"
|
|
11556
|
-
});
|
|
11557
|
-
// this makes the request to the wallet to connect i.e request eth accounts ('eth_requestAccounts')
|
|
11558
|
-
await web3Provider.provider.request({
|
|
11559
|
-
method: ($4f91c5f280efe242$export$35b06f0d33f57e26).CONNECT,
|
|
11560
|
-
params: []
|
|
11561
|
-
});
|
|
11562
|
-
}, {
|
|
11563
|
-
type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR
|
|
11564
|
-
});
|
|
11565
|
-
return web3Provider;
|
|
11566
|
-
}
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
async function $5c763be0b0b81038$var$getMetaMaskProvider() {
|
|
11576
|
-
const provider = await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>await (detectEthereumProvider)(), {
|
|
11577
|
-
type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).METAMASK_PROVIDER_ERROR
|
|
11578
|
-
});
|
|
11579
|
-
if (!provider || !provider.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No MetaMask provider installed.", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).METAMASK_PROVIDER_ERROR);
|
|
11580
|
-
return new (Web3Provider)(provider);
|
|
11581
|
-
}
|
|
11582
|
-
async function $5c763be0b0b81038$export$500fbc0cd14cdbaa(defaultProvider) {
|
|
11583
|
-
let web3Provider = null;
|
|
11584
|
-
switch(defaultProvider){
|
|
11585
|
-
case ($e768639828688ca3$export$2d7a51a18d87e21d).METAMASK:
|
|
11586
|
-
web3Provider = await $5c763be0b0b81038$var$getMetaMaskProvider();
|
|
11587
|
-
break;
|
|
11588
|
-
default:
|
|
11589
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Provider not supported", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).DEFAULT_PROVIDER_ERROR);
|
|
11590
|
-
}
|
|
11591
|
-
return web3Provider;
|
|
11592
|
-
}
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
// this function needs to be in a separate file to prevent circular dependencies with ./network
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
function $bb88265fe45a0393$export$ebe4804963e71f98(web3Provider) {
|
|
11602
|
-
if (web3Provider && web3Provider instanceof (Web3Provider) && web3Provider.provider?.request) return true;
|
|
11603
|
-
return false;
|
|
11604
|
-
}
|
|
11605
|
-
async function $bb88265fe45a0393$export$9e1fd9cc88c637a0(config, web3Provider, validateProviderOptions) {
|
|
11606
|
-
return ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
|
|
11607
|
-
if (!$bb88265fe45a0393$export$ebe4804963e71f98(web3Provider)) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Parsed provider is not a valid Web3Provider", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).WEB3_PROVIDER_ERROR);
|
|
11608
|
-
// this sets the default options and overrides them with any parsed options
|
|
11609
|
-
const options = {
|
|
11610
|
-
...($e768639828688ca3$export$44dde05038008549),
|
|
11611
|
-
...validateProviderOptions
|
|
11612
|
-
};
|
|
11613
|
-
const underlyingChainId = await ($a1555a1d2c8d059b$export$c3ba3e93a9fee972)(web3Provider);
|
|
11614
|
-
let web3ChainId = web3Provider.network?.chainId;
|
|
11615
|
-
try {
|
|
11616
|
-
web3ChainId = web3Provider.network?.chainId;
|
|
11617
|
-
if (!web3ChainId) web3ChainId = (await web3Provider.getNetwork()).chainId;
|
|
11618
|
-
} catch (err) {
|
|
11619
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Unable to detect the web3Provider network", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).WEB3_PROVIDER_ERROR);
|
|
11620
|
-
}
|
|
11621
|
-
if (web3ChainId !== underlyingChainId && !options.allowMistmatchedChainId) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Your wallet has changed network, please switch to a supported network", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).WEB3_PROVIDER_ERROR);
|
|
11622
|
-
const allowedNetworks = await ($de192de6ef100f9f$export$3043f6442a9ef563)(config, {
|
|
11623
|
-
type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
|
|
11624
|
-
});
|
|
11625
|
-
const isAllowed = allowedNetworks.networks.some((network)=>network.chainId === underlyingChainId);
|
|
11626
|
-
if (!isAllowed && !options.allowUnsupportedProvider) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Your wallet is connected to an unsupported network, please switch to a supported network", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).WEB3_PROVIDER_ERROR);
|
|
11627
|
-
return web3Provider;
|
|
11628
|
-
}, {
|
|
11629
|
-
type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).WEB3_PROVIDER_ERROR
|
|
11630
|
-
});
|
|
11631
|
-
}
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
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"]}]');
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
async function $5cdde2ffe6360fec$export$a822caa90d7eef09({ type: type = ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL , exclude: exclude }) {
|
|
11642
|
-
// todo:For async API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
|
|
11643
|
-
const filteredWalletsList = ((/*@__PURE__*/$parcel$interopDefault($6f3c55a615003cbf$exports))).filter((wallet)=>{
|
|
11644
|
-
const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.providerName).includes(wallet.providerName);
|
|
11645
|
-
const allowAllWallets = type === ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL;
|
|
11646
|
-
const walletsAllowedForType = wallet.platform.includes(type);
|
|
11647
|
-
return walletNotExcluded && (allowAllWallets || walletsAllowedForType);
|
|
11648
|
-
}).map((wallet)=>{
|
|
11649
|
-
const { platform: platform , ...walletInfo } = wallet;
|
|
11650
|
-
return walletInfo;
|
|
11651
|
-
});
|
|
11652
|
-
return {
|
|
11653
|
-
wallets: filteredWalletsList
|
|
11654
|
-
};
|
|
11655
|
-
}
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (web3Provider, transaction)=>{
|
|
11664
|
-
try {
|
|
11665
|
-
const transactionResponse = await web3Provider.getSigner().sendTransaction(transaction);
|
|
11666
|
-
return {
|
|
11667
|
-
transactionResponse: transactionResponse
|
|
11668
|
-
};
|
|
11669
|
-
} catch (err) {
|
|
11670
|
-
if (err.code === (ethers).errors.INSUFFICIENT_FUNDS) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).INSUFFICIENT_FUNDS);
|
|
11671
|
-
if (err.code === (ethers).errors.ACTION_REJECTED) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
|
|
11672
|
-
if (err.code === (ethers).errors.UNPREDICTABLE_GAS_LIMIT) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).UNPREDICTABLE_GAS_LIMIT);
|
|
11673
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).TRANSACTION_FAILED);
|
|
11674
|
-
}
|
|
11675
|
-
};
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
const $570856c68db0bd36$var$GAS_LIMIT = 140000;
|
|
11688
|
-
async function $570856c68db0bd36$var$getTokenInfoByAddress(tokenAddress, chainId) {
|
|
11689
|
-
return (await $efe60cea83bfc4e8$export$473cec51305fdae8({
|
|
11690
|
-
type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
|
|
11691
|
-
chainId: chainId
|
|
11692
|
-
})).tokens.find((token)=>(token.address || "NATIVE") === tokenAddress);
|
|
11693
|
-
}
|
|
11694
|
-
const $570856c68db0bd36$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
11695
|
-
const $570856c68db0bd36$var$getGasPriceInWei = (feeData)=>$570856c68db0bd36$var$doesChainSupportEIP1559(feeData) ? (BigNumber).from(feeData.maxFeePerGas).add((BigNumber).from(feeData.maxPriorityFeePerGas)) : feeData.gasPrice && (BigNumber).from(feeData.gasPrice);
|
|
11696
|
-
const $570856c68db0bd36$var$getGasEstimates = async (provider)=>{
|
|
11697
|
-
const txnGasLimitInWei = $570856c68db0bd36$var$GAS_LIMIT; // todo: fetch gasLimit from bridgeSDK when they add new fn
|
|
11698
|
-
const feeData = await provider.getFeeData();
|
|
11699
|
-
const gasPriceInWei = $570856c68db0bd36$var$getGasPriceInWei(feeData);
|
|
11700
|
-
if (!gasPriceInWei) return undefined;
|
|
11701
|
-
return gasPriceInWei.mul(txnGasLimitInWei);
|
|
11702
|
-
};
|
|
11703
|
-
async function $570856c68db0bd36$export$51010590edbe56a6(provider, chainId, isApproveTxnRequired, gasTokenAddress) {
|
|
11704
|
-
const token = await $570856c68db0bd36$var$getTokenInfoByAddress(gasTokenAddress || "NATIVE", chainId);
|
|
11705
|
-
let estimatedAmount = await $570856c68db0bd36$var$getGasEstimates(provider);
|
|
11706
|
-
if (!estimatedAmount) return {
|
|
11707
|
-
estimatedAmount: undefined,
|
|
11708
|
-
token: token
|
|
11709
|
-
};
|
|
11710
|
-
if (isApproveTxnRequired) estimatedAmount = estimatedAmount.add(estimatedAmount);
|
|
11711
|
-
const result = {
|
|
11712
|
-
estimatedAmount: estimatedAmount,
|
|
11713
|
-
token: token
|
|
11714
|
-
};
|
|
11715
|
-
return result;
|
|
11716
|
-
}
|
|
11717
|
-
async function $570856c68db0bd36$export$9e73e22953cebcfc(tokenBridge, tokenAddress, destinationChainId) {
|
|
11718
|
-
const bridgeFeeReq = {
|
|
11719
|
-
token: tokenAddress
|
|
11720
|
-
};
|
|
11721
|
-
const bridgeFeeResponse = await tokenBridge.getFee(bridgeFeeReq);
|
|
11722
|
-
const tokenInfo = await $570856c68db0bd36$var$getTokenInfoByAddress(tokenAddress, destinationChainId);
|
|
11723
|
-
return {
|
|
11724
|
-
bridgeFee: {
|
|
11725
|
-
estimatedAmount: bridgeFeeResponse.feeAmount,
|
|
11726
|
-
token: tokenInfo
|
|
11727
|
-
},
|
|
11728
|
-
bridgeable: bridgeFeeResponse.bridgeable
|
|
11729
|
-
};
|
|
11730
|
-
}
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
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
|
-
async function $67fc622a2b913d5f$export$989eefe1274a439c(fromChainId, toChainId, readOnlyProviders, environment) {
|
|
11785
|
-
const rootChainProvider = readOnlyProviders.get(fromChainId);
|
|
11786
|
-
const childChainProvider = readOnlyProviders.get(toChainId);
|
|
11787
|
-
if (!rootChainProvider) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${fromChainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR);
|
|
11788
|
-
if (!childChainProvider) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${toChainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR);
|
|
11789
|
-
const bridgeConfig = new (BridgeConfiguration)({
|
|
11790
|
-
baseConfig: new (ImmutableConfiguration)({
|
|
11791
|
-
environment: environment
|
|
11792
|
-
}),
|
|
11793
|
-
bridgeInstance: environment === (Environment).PRODUCTION ? (ETH_MAINNET_TO_ZKEVM_MAINNET) : (ETH_SEPOLIA_TO_ZKEVM_DEVNET),
|
|
11794
|
-
rootProvider: rootChainProvider,
|
|
11795
|
-
childProvider: childChainProvider
|
|
11796
|
-
});
|
|
11797
|
-
return new (TokenBridge)(bridgeConfig);
|
|
11798
|
-
}
|
|
11799
|
-
async function $67fc622a2b913d5f$export$7cf6178417769841(chainId, environment) {
|
|
11800
|
-
const exchange = new (Exchange)(new (ExchangeConfiguration)({
|
|
11801
|
-
chainId: chainId,
|
|
11802
|
-
baseConfig: new (ImmutableConfiguration)({
|
|
11803
|
-
environment: environment
|
|
11804
|
-
}),
|
|
11805
|
-
overrides: ($be6f32539b5e2cc9$export$3e9a43ac784794d5)()
|
|
11806
|
-
}));
|
|
11807
|
-
return exchange;
|
|
11808
|
-
}
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
var $d7b15ec974df6f92$exports = {};
|
|
11814
|
-
$d7b15ec974df6f92$exports = JSON.parse('{"11155111":{"bridgeToL2Addresses":{"gasTokenAddress":"NATIVE","fromAddress":"0xd1da7e9b2Ce1a4024DaD52b3D37F4c5c91a525C1"},"swapAddresses":{"inAddress":"0xFEa9FF93DC0C6DC73F8Be009Fe7a22Bb9dcE8A2d","outAddress":"0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e"}}}');
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
const $2e7bf45a7c9a9570$var$DUMMY_WALLET_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
11818
|
-
const $2e7bf45a7c9a9570$var$DEFAULT_TOKEN_DECIMALS = 18;
|
|
11819
|
-
const $2e7bf45a7c9a9570$var$getL1ChainId = (environment)=>{
|
|
11820
|
-
if (environment === (Environment).PRODUCTION) return ($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA;
|
|
11821
|
-
return ($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA;
|
|
11822
|
-
};
|
|
11823
|
-
const $2e7bf45a7c9a9570$var$getL2ChainId = (environment)=>{
|
|
11824
|
-
if (environment === (Environment).PRODUCTION) return ($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET;
|
|
11825
|
-
return ($baec09ddc3013323$export$c06e1e7429de6283).IMTBL_ZKEVM_DEVNET;
|
|
11826
|
-
};
|
|
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;
|
|
11832
|
-
const provider = readOnlyProviders.get(fromChainId);
|
|
11833
|
-
try {
|
|
11834
|
-
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);
|
|
11836
|
-
const { bridgeFee: bridgeFee , bridgeable: bridgeable } = await (0, $570856c68db0bd36$export$9e73e22953cebcfc)(tokenBridge, fromAddress, toChainId);
|
|
11837
|
-
return {
|
|
11838
|
-
gasEstimateType: (0, $de275b98d2b651c3$export$788b1fd17f3dad84).BRIDGE_TO_L2,
|
|
11839
|
-
gasFee: {
|
|
11840
|
-
estimatedAmount: estimatedAmount,
|
|
11841
|
-
token: token
|
|
11842
|
-
},
|
|
11843
|
-
bridgeFee: {
|
|
11844
|
-
estimatedAmount: bridgeFee?.estimatedAmount,
|
|
11845
|
-
token: bridgeFee?.token
|
|
11846
|
-
},
|
|
11847
|
-
bridgeable: bridgeable
|
|
11848
|
-
};
|
|
11849
|
-
} catch {
|
|
11850
|
-
// In the case of an error, just return an empty gas & bridge fee estimate
|
|
11851
|
-
return {
|
|
11852
|
-
gasEstimateType: ($de275b98d2b651c3$export$788b1fd17f3dad84).BRIDGE_TO_L2,
|
|
11853
|
-
gasFee: {},
|
|
11854
|
-
bridgeFee: {},
|
|
11855
|
-
bridgeable: false
|
|
11856
|
-
};
|
|
11857
|
-
}
|
|
11858
|
-
}
|
|
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);
|
|
11863
|
-
try {
|
|
11864
|
-
const exchange = await $67fc622a2b913d5f$export$7cf6178417769841(chainId, environment);
|
|
11865
|
-
// Create a fake transaction to get the gas from the quote
|
|
11866
|
-
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
|
-
if (info.gasFeeEstimate === null) return {
|
|
11868
|
-
gasEstimateType: (0, $de275b98d2b651c3$export$788b1fd17f3dad84).SWAP,
|
|
11869
|
-
gasFee: {}
|
|
11870
|
-
};
|
|
11871
|
-
let estimatedAmount;
|
|
11872
|
-
if (info.gasFeeEstimate.amount) estimatedAmount = (0, BigNumber$2).from(info.gasFeeEstimate.amount);
|
|
11873
|
-
return {
|
|
11874
|
-
gasEstimateType: (0, $de275b98d2b651c3$export$788b1fd17f3dad84).SWAP,
|
|
11875
|
-
gasFee: {
|
|
11876
|
-
estimatedAmount: estimatedAmount,
|
|
11877
|
-
token: {
|
|
11878
|
-
address: info.gasFeeEstimate?.token.address,
|
|
11879
|
-
symbol: info.gasFeeEstimate?.token.symbol ?? "",
|
|
11880
|
-
name: info.gasFeeEstimate?.token.name ?? "",
|
|
11881
|
-
decimals: info.gasFeeEstimate?.token.decimals ?? $2e7bf45a7c9a9570$var$DEFAULT_TOKEN_DECIMALS
|
|
11882
|
-
}
|
|
11883
|
-
}
|
|
11884
|
-
};
|
|
11885
|
-
} catch {
|
|
11886
|
-
// In the case of an error, just return an empty gas fee estimate
|
|
11887
|
-
return {
|
|
11888
|
-
gasEstimateType: ($de275b98d2b651c3$export$788b1fd17f3dad84).SWAP,
|
|
11889
|
-
gasFee: {}
|
|
11890
|
-
};
|
|
11891
|
-
}
|
|
11892
|
-
}
|
|
11893
|
-
async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProviders, environment) {
|
|
11894
|
-
switch(params.gasEstimateType){
|
|
11895
|
-
case ($de275b98d2b651c3$export$788b1fd17f3dad84).BRIDGE_TO_L2:
|
|
11896
|
-
return await $2e7bf45a7c9a9570$var$bridgeToL2GasEstimator(readOnlyProviders, environment, params.isSpendingCapApprovalRequired, params.tokenAddress);
|
|
11897
|
-
case ($de275b98d2b651c3$export$788b1fd17f3dad84).SWAP:
|
|
11898
|
-
return await $2e7bf45a7c9a9570$var$swapGasEstimator(environment);
|
|
11899
|
-
default:
|
|
11900
|
-
throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Invalid type provided for gasEstimateType", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).INVALID_GAS_ESTIMATE_TYPE);
|
|
11901
|
-
}
|
|
11902
|
-
}
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
class $4013c5c91bb535f6$export$47a4ed4a38b9eecf extends Error {
|
|
11912
|
-
message;
|
|
11913
|
-
constructor(message){
|
|
11914
|
-
super(message);
|
|
11915
|
-
this.message = message;
|
|
11916
|
-
}
|
|
11917
|
-
}
|
|
11918
|
-
class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
|
|
11919
|
-
environment;
|
|
11920
|
-
networkMap;
|
|
11921
|
-
constructor(config){
|
|
11922
|
-
// validate input
|
|
11923
|
-
if (!Object.values((Environment)).includes(config.baseConfig.environment)) throw new $4013c5c91bb535f6$export$47a4ed4a38b9eecf("Invalid checkout configuration of environment");
|
|
11924
|
-
this.environment = config.baseConfig.environment;
|
|
11925
|
-
this.networkMap = config.baseConfig.environment === (Environment).PRODUCTION ? ($a47e48dd2c04791b$export$6f24f3cef7d501c4) : ($a47e48dd2c04791b$export$3e81fc0987227f10);
|
|
11926
|
-
}
|
|
11927
|
-
}
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
async function $0e0060cb42e136d2$export$339cb2be73677b30(config, existingReadOnlyProviders) {
|
|
11937
|
-
if (config.environment === (Environment).PRODUCTION && existingReadOnlyProviders?.has(($baec09ddc3013323$export$c06e1e7429de6283).ETHEREUM) || config.environment === (Environment).SANDBOX && existingReadOnlyProviders?.has(($baec09ddc3013323$export$c06e1e7429de6283).SEPOLIA)) return existingReadOnlyProviders;
|
|
11938
|
-
const readOnlyProviders = new Map();
|
|
11939
|
-
const allowedNetworks = await $de192de6ef100f9f$export$3043f6442a9ef563(config, {
|
|
11940
|
-
type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
|
|
11941
|
-
});
|
|
11942
|
-
allowedNetworks.networks.forEach((networkInfo)=>{
|
|
11943
|
-
const rpcUrl = config.networkMap.get(networkInfo.chainId)?.rpcUrls[0];
|
|
11944
|
-
const provider = new (ethers).providers.JsonRpcProvider(rpcUrl);
|
|
11945
|
-
readOnlyProviders.set(networkInfo.chainId, provider);
|
|
11946
|
-
});
|
|
11947
|
-
return readOnlyProviders;
|
|
11948
|
-
}
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
11952
|
-
config;
|
|
11953
|
-
readOnlyProviders;
|
|
11954
|
-
constructor(config = ($bc2bfebf768286d3$export$6a2ba3c3bd042990)){
|
|
11955
|
-
this.config = new ($4013c5c91bb535f6$export$4823433c4a67bbc6)(config);
|
|
11956
|
-
this.readOnlyProviders = new Map();
|
|
11957
|
-
}
|
|
11958
|
-
/**
|
|
11959
|
-
* Create a provider object which can be used within the Checkout class methods.
|
|
11960
|
-
* @param {CreateProviderParams} params The data required to create a provider
|
|
11961
|
-
* @returns A new provider object
|
|
11962
|
-
* @throws {@link ErrorType}
|
|
11963
|
-
*/ async createProvider(params) {
|
|
11964
|
-
const web3Provider = await $5c763be0b0b81038$export$500fbc0cd14cdbaa(params.walletProvider);
|
|
11965
|
-
return {
|
|
11966
|
-
provider: web3Provider
|
|
11967
|
-
};
|
|
11968
|
-
}
|
|
11969
|
-
/**
|
|
11970
|
-
* Check if a wallet is connected to the current application
|
|
11971
|
-
* without requesting permission from the wallet and hence triggering a connect popup.
|
|
11972
|
-
* @param {CheckConnectionParams} params - The necessary data required to verify a wallet connection status.
|
|
11973
|
-
* @returns Wallet connection status details.
|
|
11974
|
-
* @throws {@link ErrorType}
|
|
11975
|
-
*/ async checkIsWalletConnected(params) {
|
|
11976
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider, {
|
|
11977
|
-
allowUnsupportedProvider: true
|
|
11978
|
-
});
|
|
11979
|
-
return $c99672cf2294e839$export$2d040992269b4717(web3Provider);
|
|
11980
|
-
}
|
|
11981
|
-
/**
|
|
11982
|
-
* Establish a connection with a wallet provider such as MetaMask and returns the provider object and the current network details.
|
|
11983
|
-
* @param {ConnectParams} params - The necessary data required to establish a connection with a wallet provider.
|
|
11984
|
-
* @returns Wallet provider and current network information.
|
|
11985
|
-
* @throws {@link ErrorType}
|
|
11986
|
-
*/ async connect(params) {
|
|
11987
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider, {
|
|
11988
|
-
allowUnsupportedProvider: true
|
|
11989
|
-
});
|
|
11990
|
-
await $c99672cf2294e839$export$43f7168eb392a88c(web3Provider);
|
|
11991
|
-
const networkInfo = await $de192de6ef100f9f$export$79f13b4cfaaf0d09(this.config, web3Provider);
|
|
11992
|
-
return {
|
|
11993
|
-
provider: web3Provider,
|
|
11994
|
-
network: networkInfo
|
|
11995
|
-
};
|
|
11996
|
-
}
|
|
11997
|
-
/**
|
|
11998
|
-
* Switch the currently connected wallet to a new network.
|
|
11999
|
-
* @param {SwitchNetworkParams} params - The necessary data required to switch network.
|
|
12000
|
-
* @returns The new network information.
|
|
12001
|
-
* @throws {@link ErrorType}
|
|
12002
|
-
*/ async switchNetwork(params) {
|
|
12003
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider, {
|
|
12004
|
-
allowUnsupportedProvider: true,
|
|
12005
|
-
allowMistmatchedChainId: true
|
|
12006
|
-
});
|
|
12007
|
-
const switchNetworkRes = await $de192de6ef100f9f$export$b827d9418aeb5dbd(this.config, web3Provider, params.chainId);
|
|
12008
|
-
return switchNetworkRes;
|
|
12009
|
-
}
|
|
12010
|
-
/**
|
|
12011
|
-
* Fetch the balance of the native token of the current connected network or,
|
|
12012
|
-
* if a contract address is provided, it will return the balance of that ERC20 token. For example,
|
|
12013
|
-
* if the wallet is connected to the Ethereum Mainnet then the function gets the wallet ETH L1 balance.
|
|
12014
|
-
* @param {GetBalanceParams} params - The necessary data required to fetch the wallet balance.
|
|
12015
|
-
* @returns Native token balance for the given wallet.
|
|
12016
|
-
* @throws {@link ErrorType}
|
|
12017
|
-
*/ async getBalance(params) {
|
|
12018
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
12019
|
-
if (!params.contractAddress || params.contractAddress === "") return await $1564e43dde50bb61$export$df96cd8d56be0ab1(this.config, web3Provider, params.walletAddress);
|
|
12020
|
-
return await $1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, params.walletAddress, params.contractAddress);
|
|
12021
|
-
}
|
|
12022
|
-
/**
|
|
12023
|
-
* Fetch all available balances (ERC20 & Native) of the current connected network of the given wallet.
|
|
12024
|
-
* It will loop through the list of allowed tokens and check for balance on each one.
|
|
12025
|
-
* @param {GetAllBalancesParams} params - The necessary data required to fetch all the wallet balances.
|
|
12026
|
-
* @returns List of tokens balance for the given wallet.
|
|
12027
|
-
* @throws {@link ErrorType}
|
|
12028
|
-
*/ async getAllBalances(params) {
|
|
12029
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
12030
|
-
return $1564e43dde50bb61$export$fee49741664a4d7e(this.config, web3Provider, params.walletAddress, params.chainId);
|
|
12031
|
-
}
|
|
12032
|
-
/**
|
|
12033
|
-
* Fetch the list of available networks that a wallet can add or/and switch to.
|
|
12034
|
-
* @param {GetNetworkAllowListParams} params - The necessary data required to fetch the list of available networks.
|
|
12035
|
-
* @returns List of networks.
|
|
12036
|
-
* @throws {@link ErrorType}
|
|
12037
|
-
*/ async getNetworkAllowList(params) {
|
|
12038
|
-
return await $de192de6ef100f9f$export$3043f6442a9ef563(this.config, params);
|
|
12039
|
-
}
|
|
12040
|
-
/**
|
|
12041
|
-
* Get the list of tokens which are allowed to be used with the product.
|
|
12042
|
-
* @param {GetTokenAllowListParams} params - The necessary data required to fetch the list of allowed tokens.
|
|
12043
|
-
* @returns List of allowed tokens.
|
|
12044
|
-
* @throws {@link ErrorType}
|
|
12045
|
-
*/ async getTokenAllowList(params) {
|
|
12046
|
-
return await $efe60cea83bfc4e8$export$473cec51305fdae8(params);
|
|
12047
|
-
}
|
|
12048
|
-
/**
|
|
12049
|
-
* Fetch the list of wallets which are available to connect with.
|
|
12050
|
-
* @param {GetWalletAllowListParams} params - The necessary data required to fetch the list of allowed wallets.
|
|
12051
|
-
* @returns List of allowed wallets.
|
|
12052
|
-
* @throws {@link ErrorType}
|
|
12053
|
-
*/ async getWalletAllowList(params) {
|
|
12054
|
-
return await $5cdde2ffe6360fec$export$a822caa90d7eef09(params);
|
|
12055
|
-
}
|
|
12056
|
-
/**
|
|
12057
|
-
* Send a generic transaction to the provider.
|
|
12058
|
-
* @param {SendTransactionParams} params - The necessary data required to send a transaction.
|
|
12059
|
-
* @returns Transaction response.
|
|
12060
|
-
* @throws {@link ErrorType}
|
|
12061
|
-
* @remarks
|
|
12062
|
-
* Further documenation can be found at [MetaMask | Sending Transactions](https://docs.metamask.io/guide/sending-transactions.html).
|
|
12063
|
-
*/ async sendTransaction(params) {
|
|
12064
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
|
|
12065
|
-
return await $dbe95599a4661140$export$8e0e7ffc78696d30(web3Provider, params.transaction);
|
|
12066
|
-
}
|
|
12067
|
-
/**
|
|
12068
|
-
* Get network information about the currently selected network.
|
|
12069
|
-
* @param {GetNetworkParams} params - The necessary data required to get the current network information.
|
|
12070
|
-
* @returns Network details.
|
|
12071
|
-
* @throws {@link ErrorType}
|
|
12072
|
-
*/ async getNetworkInfo(params) {
|
|
12073
|
-
const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider, {
|
|
12074
|
-
allowUnsupportedProvider: true,
|
|
12075
|
-
allowMistmatchedChainId: true
|
|
12076
|
-
});
|
|
12077
|
-
return await $de192de6ef100f9f$export$79f13b4cfaaf0d09(this.config, web3Provider);
|
|
12078
|
-
}
|
|
12079
|
-
static isWeb3Provider(web3Provider) {
|
|
12080
|
-
return $bb88265fe45a0393$export$ebe4804963e71f98(web3Provider);
|
|
12081
|
-
}
|
|
12082
|
-
/**
|
|
12083
|
-
* Estimates the gas to perform an action.
|
|
12084
|
-
* @param {GasEstimateParams} params - The params required to calculate a gas estimate
|
|
12085
|
-
* @returns The gas estimate for the given action.
|
|
12086
|
-
*/ async gasEstimate(params) {
|
|
12087
|
-
this.readOnlyProviders = await ($0e0060cb42e136d2$export$339cb2be73677b30)(this.config, this.readOnlyProviders);
|
|
12088
|
-
return await $2e7bf45a7c9a9570$export$942c8de7174809fc(params, this.readOnlyProviders, this.config.environment);
|
|
12089
|
-
}
|
|
12090
|
-
}
|
|
12091
|
-
|
|
12092
|
-
function $parcel$export(e, n, v, s) {
|
|
12093
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12094
|
-
}
|
|
12095
|
-
// Definitions | Events
|
|
12096
|
-
var $207ed853f11d19d5$exports = {};
|
|
12097
|
-
|
|
12098
|
-
$parcel$export($207ed853f11d19d5$exports, "IMTBLWidgetEvents", () => $207ed853f11d19d5$export$5a0ace85cae72d45);
|
|
12099
|
-
var $207ed853f11d19d5$export$5a0ace85cae72d45;
|
|
12100
|
-
(function(IMTBLWidgetEvents) {
|
|
12101
|
-
IMTBLWidgetEvents["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
|
|
12102
|
-
IMTBLWidgetEvents["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
|
|
12103
|
-
IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
|
|
12104
|
-
IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
|
|
12105
|
-
})($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
var $a85ecdbd885c58ad$exports = {};
|
|
12109
|
-
|
|
12110
|
-
$parcel$export($a85ecdbd885c58ad$exports, "ConnectEventType", () => $a85ecdbd885c58ad$export$e72e7f9969a47dd3);
|
|
12111
|
-
var $a85ecdbd885c58ad$export$e72e7f9969a47dd3;
|
|
12112
|
-
(function(ConnectEventType) {
|
|
12113
|
-
ConnectEventType["CLOSE_WIDGET"] = "close-widget";
|
|
12114
|
-
ConnectEventType["SUCCESS"] = "success";
|
|
12115
|
-
ConnectEventType["FAILURE"] = "failure";
|
|
12116
|
-
})($a85ecdbd885c58ad$export$e72e7f9969a47dd3 || ($a85ecdbd885c58ad$export$e72e7f9969a47dd3 = {}));
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
var $77b6aac5c353d4a9$exports = {};
|
|
12120
|
-
|
|
12121
|
-
$parcel$export($77b6aac5c353d4a9$exports, "WalletEventType", () => $77b6aac5c353d4a9$export$d9be06b70b28c742);
|
|
12122
|
-
var $77b6aac5c353d4a9$export$d9be06b70b28c742;
|
|
12123
|
-
(function(WalletEventType) {
|
|
12124
|
-
WalletEventType["CLOSE_WIDGET"] = "close-widget";
|
|
12125
|
-
WalletEventType["NETWORK_SWITCH"] = "network-switch";
|
|
12126
|
-
WalletEventType["DISCONNECT_WALLET"] = "disconnect-wallet";
|
|
12127
|
-
})($77b6aac5c353d4a9$export$d9be06b70b28c742 || ($77b6aac5c353d4a9$export$d9be06b70b28c742 = {}));
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
var $53d219e7f6bf0cd6$exports = {};
|
|
12131
|
-
|
|
12132
|
-
$parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0cd6$export$140a49745ab55563);
|
|
12133
|
-
/**
|
|
12134
|
-
* Enum representing possible Swap Widget event types.
|
|
12135
|
-
*/ var $53d219e7f6bf0cd6$export$140a49745ab55563;
|
|
12136
|
-
(function(SwapEventType) {
|
|
12137
|
-
SwapEventType["CLOSE_WIDGET"] = "close-widget";
|
|
12138
|
-
SwapEventType["SUCCESS"] = "success";
|
|
12139
|
-
SwapEventType["FAILURE"] = "failure";
|
|
12140
|
-
SwapEventType["REJECTED"] = "rejected";
|
|
12141
|
-
})($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
var $15cc9e120aa6f3bf$exports = {};
|
|
12145
|
-
|
|
12146
|
-
$parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
|
|
12147
|
-
/**
|
|
12148
|
-
* Enum of possible Bridge Widget event types.
|
|
12149
|
-
*/ var $15cc9e120aa6f3bf$export$d1bfa21f7c76447a;
|
|
12150
|
-
(function(BridgeEventType) {
|
|
12151
|
-
BridgeEventType["CLOSE_WIDGET"] = "close-widget";
|
|
12152
|
-
BridgeEventType["SUCCESS"] = "success";
|
|
12153
|
-
BridgeEventType["FAILURE"] = "failure";
|
|
12154
|
-
})($15cc9e120aa6f3bf$export$d1bfa21f7c76447a || ($15cc9e120aa6f3bf$export$d1bfa21f7c76447a = {}));
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
var $ad06b030b1a3ba34$exports = {};
|
|
12158
|
-
|
|
12159
|
-
$parcel$export($ad06b030b1a3ba34$exports, "OrchestrationEventType", () => $ad06b030b1a3ba34$export$b80d2daf830437b9);
|
|
12160
|
-
var $ad06b030b1a3ba34$export$b80d2daf830437b9;
|
|
12161
|
-
(function(OrchestrationEventType) {
|
|
12162
|
-
OrchestrationEventType["REQUEST_CONNECT"] = "request-connect";
|
|
12163
|
-
OrchestrationEventType["REQUEST_WALLET"] = "request-wallet";
|
|
12164
|
-
OrchestrationEventType["REQUEST_SWAP"] = "request-swap";
|
|
12165
|
-
OrchestrationEventType["REQUEST_BRIDGE"] = "request-bridge";
|
|
12166
|
-
OrchestrationEventType["REQUEST_ONRAMP"] = "request-onramp";
|
|
12167
|
-
})($ad06b030b1a3ba34$export$b80d2daf830437b9 || ($ad06b030b1a3ba34$export$b80d2daf830437b9 = {}));
|
|
12168
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12169
|
-
|
|
12170
|
-
var $045213b18e9f1f94$exports = {};
|
|
12171
|
-
|
|
12172
|
-
$parcel$export($045213b18e9f1f94$exports, "Network", () => $045213b18e9f1f94$export$95be4ae94445245a);
|
|
12173
|
-
$parcel$export($045213b18e9f1f94$exports, "WidgetTheme", () => $045213b18e9f1f94$export$c88931fdc51854eb);
|
|
12174
|
-
$parcel$export($045213b18e9f1f94$exports, "CheckoutWidgetTagNames", () => $045213b18e9f1f94$export$75be0f6af9650f2c);
|
|
12175
|
-
/**
|
|
12176
|
-
* Enum representing the networks supported by Checkout.
|
|
12177
|
-
*/ var $045213b18e9f1f94$export$95be4ae94445245a;
|
|
12178
|
-
(function(Network) {
|
|
12179
|
-
Network["ETHEREUM"] = "Ethereum";
|
|
12180
|
-
Network["SEPOLIA"] = "Sepolia";
|
|
12181
|
-
Network["IMTBL_ZKEVM_TESTNET"] = "Immutable zkEVM Testnet";
|
|
12182
|
-
Network["IMTBL_ZKEVM_DEVNET"] = "Immutable zkEVM Devnet";
|
|
12183
|
-
Network["POLYGON_ZKEVM_TESTNET"] = "Polygon zkEVM Testnet";
|
|
12184
|
-
Network["POLYGON_ZKEVM"] = "Polygon zkEVM";
|
|
12185
|
-
})($045213b18e9f1f94$export$95be4ae94445245a || ($045213b18e9f1f94$export$95be4ae94445245a = {}));
|
|
12186
|
-
var $045213b18e9f1f94$export$c88931fdc51854eb;
|
|
12187
|
-
(function(WidgetTheme) {
|
|
12188
|
-
WidgetTheme["LIGHT"] = "light";
|
|
12189
|
-
WidgetTheme["DARK"] = "dark";
|
|
12190
|
-
WidgetTheme["CUSTOM"] = "custom";
|
|
12191
|
-
})($045213b18e9f1f94$export$c88931fdc51854eb || ($045213b18e9f1f94$export$c88931fdc51854eb = {}));
|
|
12192
|
-
var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
12193
|
-
(function(CheckoutWidgetTagNames) {
|
|
12194
|
-
CheckoutWidgetTagNames["CONNECT"] = "imtbl-connect";
|
|
12195
|
-
CheckoutWidgetTagNames["WALLET"] = "imtbl-wallet";
|
|
12196
|
-
CheckoutWidgetTagNames["SWAP"] = "imtbl-swap";
|
|
12197
|
-
CheckoutWidgetTagNames["BRIDGE"] = "imtbl-bridge";
|
|
12198
|
-
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
var $1f969328e5988c99$exports = {};
|
|
12202
|
-
|
|
12203
|
-
$parcel$export($1f969328e5988c99$exports, "BridgeReact", () => $1f969328e5988c99$export$30f61ebf204c69f6);
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
|
|
12207
|
-
const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
|
|
12208
|
-
const config = window.ImtblCheckoutWidgetConfig;
|
|
12209
|
-
return /*#__PURE__*/ (jsx)("imtbl-bridge", {
|
|
12210
|
-
widgetConfig: config,
|
|
12211
|
-
walletProvider: walletProvider,
|
|
12212
|
-
fromContractAddress: fromContractAddress ?? "",
|
|
12213
|
-
fromNetwork: fromNetwork ?? "",
|
|
12214
|
-
amount: amount ?? ""
|
|
12215
|
-
});
|
|
12216
|
-
}
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
var $f2083cd30e2f5c56$exports = {};
|
|
12220
|
-
|
|
12221
|
-
$parcel$export($f2083cd30e2f5c56$exports, "ConnectReact", () => $f2083cd30e2f5c56$export$49d62957f420a1e2);
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
function $f2083cd30e2f5c56$export$49d62957f420a1e2(props) {
|
|
12225
|
-
const { walletProvider: walletProvider } = props;
|
|
12226
|
-
const config = window.ImtblCheckoutWidgetConfig;
|
|
12227
|
-
return /*#__PURE__*/ (jsx)("imtbl-connect", {
|
|
12228
|
-
widgetConfig: config,
|
|
12229
|
-
walletProvider: walletProvider
|
|
12230
|
-
});
|
|
12231
|
-
}
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
var $a4fbb8e3a6aeff58$exports = {};
|
|
12235
|
-
|
|
12236
|
-
$parcel$export($a4fbb8e3a6aeff58$exports, "SwapReact", () => $a4fbb8e3a6aeff58$export$971e031379577f4);
|
|
12237
|
-
/* eslint-disable max-len */
|
|
12238
|
-
|
|
12239
|
-
function $a4fbb8e3a6aeff58$export$971e031379577f4(props) {
|
|
12240
|
-
const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress } = props;
|
|
12241
|
-
const config = window.ImtblCheckoutWidgetConfig;
|
|
12242
|
-
return /*#__PURE__*/ (jsx)("imtbl-swap", {
|
|
12243
|
-
widgetConfig: config,
|
|
12244
|
-
walletProvider: walletProvider,
|
|
12245
|
-
fromContractAddress: fromContractAddress ?? "",
|
|
12246
|
-
toContractAddress: toContractAddress ?? "",
|
|
12247
|
-
amount: amount ?? ""
|
|
12248
|
-
});
|
|
12249
|
-
}
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
var $89d55ace0f8f1c07$exports = {};
|
|
12253
|
-
|
|
12254
|
-
$parcel$export($89d55ace0f8f1c07$exports, "WalletReact", () => $89d55ace0f8f1c07$export$ceaac94f34dba154);
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
|
|
12258
|
-
const { walletProvider: walletProvider } = props;
|
|
12259
|
-
const config = window.ImtblCheckoutWidgetConfig;
|
|
12260
|
-
return /*#__PURE__*/ (jsx)("imtbl-wallet", {
|
|
12261
|
-
widgetConfig: config,
|
|
12262
|
-
walletProvider: walletProvider
|
|
12263
|
-
});
|
|
12264
|
-
}
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
var $430e3eda76fa4d5f$exports = {};
|
|
12268
|
-
|
|
12269
|
-
$parcel$export($430e3eda76fa4d5f$exports, "CheckoutWidgets", () => $430e3eda76fa4d5f$export$af210a0808087845);
|
|
12270
|
-
$parcel$export($430e3eda76fa4d5f$exports, "UpdateConfig", () => $430e3eda76fa4d5f$export$bf1548ba7e61c17f);
|
|
12271
|
-
$parcel$export($430e3eda76fa4d5f$exports, "SetProvider", () => $430e3eda76fa4d5f$export$931068bc678f0d73);
|
|
12272
|
-
function $430e3eda76fa4d5f$export$af210a0808087845(config) {
|
|
12273
|
-
const checkoutWidgetJS = document.createElement("script");
|
|
12274
|
-
checkoutWidgetJS.setAttribute("src", "http://localhost:3000/lib/js/imtbl-checkout.js");
|
|
12275
|
-
document.head.appendChild(checkoutWidgetJS);
|
|
12276
|
-
window.ImtblCheckoutWidgetConfig = JSON.stringify(config);
|
|
12277
|
-
}
|
|
12278
|
-
function $430e3eda76fa4d5f$export$bf1548ba7e61c17f(config) {
|
|
12279
|
-
window.ImtblCheckoutWidgetConfig = JSON.stringify(config);
|
|
12280
|
-
}
|
|
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
|
-
|
|
12309
10746
|
/* Autogenerated file. Do not edit manually. */
|
|
12310
10747
|
/* tslint:disable */
|
|
12311
10748
|
/* eslint-disable */
|
|
@@ -13813,27 +12250,27 @@ class ERC721PermissionedMintable {
|
|
|
13813
12250
|
/**
|
|
13814
12251
|
* @returns a populated transaction for the setApprovalForAll contract function
|
|
13815
12252
|
*/
|
|
13816
|
-
async
|
|
12253
|
+
async populateSetApprovalForAll(operator, approved, overrides = {}) {
|
|
13817
12254
|
return await this.contract.populateTransaction.setApprovalForAll(operator, approved, overrides);
|
|
13818
12255
|
}
|
|
13819
12256
|
/**
|
|
13820
12257
|
* @returns a populated transaction for the setBaseURI contract function
|
|
13821
12258
|
*/
|
|
13822
|
-
async
|
|
12259
|
+
async populateSetBaseURI(baseURI_, overrides = {}) {
|
|
13823
12260
|
return await this.contract.populateTransaction.setBaseURI(baseURI_, overrides);
|
|
13824
12261
|
}
|
|
13825
12262
|
/**
|
|
13826
12263
|
* @returns a populated transaction for the setContractURI contract function
|
|
13827
12264
|
*/
|
|
13828
|
-
async
|
|
12265
|
+
async populateSetContractURI(_contractURI, overrides = {}) {
|
|
13829
12266
|
return await this.contract.populateTransaction.setContractURI(_contractURI, overrides);
|
|
13830
12267
|
}
|
|
13831
12268
|
/**
|
|
13832
12269
|
* @returns a populated transaction for the setRoyaltyAllowlistRegistry contract function
|
|
13833
12270
|
*/
|
|
13834
|
-
async
|
|
12271
|
+
async populateSetRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides = {}) {
|
|
13835
12272
|
return await this.contract.populateTransaction.setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides);
|
|
13836
12273
|
}
|
|
13837
12274
|
}
|
|
13838
12275
|
|
|
13839
|
-
export { APIError, BlockchainData,
|
|
12276
|
+
export { APIError, BlockchainData, ERC20, ERC721PermissionedMintable, Environment, GenericIMXProvider, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, Networks, Orderbook, Passport, PassportError, ProviderConfiguration, module };
|