@imtbl/sdk 0.1.4-alpha → 0.1.5-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,200 +1,251 @@
1
- import 'ethers';
2
- import '@metamask/detect-provider';
3
- import '@ethersproject/providers';
4
-
5
- let $d176a05e966364ba$export$3bfad4d03ada24c4;
6
- (function(ConnectionProviders) {
7
- ConnectionProviders["METAMASK"] = "metamask";
8
- })($d176a05e966364ba$export$3bfad4d03ada24c4 || ($d176a05e966364ba$export$3bfad4d03ada24c4 = {}));
9
-
10
-
11
- let $a47e48dd2c04791b$export$c06e1e7429de6283;
12
- (function(ChainId) {
13
- ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
14
- ChainId[ChainId["GOERLI"] = 5] = "GOERLI";
15
- ChainId[ChainId["POLYGON"] = 137] = "POLYGON";
16
- })($a47e48dd2c04791b$export$c06e1e7429de6283 || ($a47e48dd2c04791b$export$c06e1e7429de6283 = {}));
17
- ({
18
- [$a47e48dd2c04791b$export$c06e1e7429de6283.ETHEREUM]: {
19
- chainIdHex: "0x1",
20
- chainName: "Ethereum",
21
- rpcUrls: [
22
- "https://mainnet.infura.io/v3/"
23
- ],
24
- nativeCurrency: {
25
- name: "Ethereum",
26
- symbol: "ETH",
27
- decimals: 18
28
- },
29
- blockExplorerUrls: [
30
- "https://etherscan.io/"
31
- ]
32
- },
33
- [$a47e48dd2c04791b$export$c06e1e7429de6283.GOERLI]: {
34
- chainIdHex: "0x5",
35
- chainName: "Goerli",
36
- rpcUrls: [
37
- "https://goerli.infura.io/v3/"
38
- ],
39
- nativeCurrency: {
40
- name: "Goerli Eth",
41
- symbol: "ETH",
42
- decimals: 18
43
- },
44
- blockExplorerUrls: [
45
- "https://goerli.etherscan.io/"
46
- ]
47
- },
48
- [$a47e48dd2c04791b$export$c06e1e7429de6283.POLYGON]: {
49
- chainIdHex: "0x89",
50
- chainName: "Polygon",
51
- rpcUrls: [
52
- "https://polygon-rpc.com"
53
- ],
54
- nativeCurrency: {
55
- name: "MATIC",
56
- symbol: "MATIC",
57
- decimals: 18
58
- },
59
- blockExplorerUrls: [
60
- "https://polygonscan.com/"
61
- ]
62
- }
63
- });
64
- let $a47e48dd2c04791b$export$1f05a55fe0680cc7;
65
- (function(NetworkFilterTypes) {
66
- NetworkFilterTypes["ALL"] = "all";
67
- })($a47e48dd2c04791b$export$1f05a55fe0680cc7 || ($a47e48dd2c04791b$export$1f05a55fe0680cc7 = {}));
68
-
69
-
70
- let $08d5ddc39acd6833$export$fd9b17d87f4121d2;
71
- (function(TokenFilterTypes) {
72
- TokenFilterTypes["SWAP"] = "swap";
73
- TokenFilterTypes["BRIDGE"] = "bridge";
74
- TokenFilterTypes["ALL"] = "all";
75
- })($08d5ddc39acd6833$export$fd9b17d87f4121d2 || ($08d5ddc39acd6833$export$fd9b17d87f4121d2 = {}));
76
- let $4f91c5f280efe242$export$a75605c67ea83a5a;
77
- (function(WalletFilterTypes) {
78
- WalletFilterTypes["ALL"] = "all";
79
- WalletFilterTypes["DESKTOP"] = "desktop";
80
- WalletFilterTypes["MOBILE"] = "mobile";
81
- })($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
82
-
83
-
84
-
85
-
86
- /**
87
- * The different types of errors that can be returned by the checkout process.
88
- */ let $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
89
- (function(CheckoutErrorType) {
90
- CheckoutErrorType["PROVIDER_PREFERENCE_ERROR"] = "PROVIDER_PREFERENCE_ERROR";
91
- CheckoutErrorType["CONNECT_PROVIDER_ERROR"] = "CONNECT_PROVIDER_ERROR";
92
- CheckoutErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
93
- CheckoutErrorType["GET_ERC20_BALANCE_ERROR"] = "GET_ERC20_BALANCE_ERROR";
94
- CheckoutErrorType["GET_NETWORK_INFO_ERROR"] = "GET_NETWORK_INFO_ERROR";
95
- CheckoutErrorType["METAMASK_PROVIDER_ERROR"] = "METAMASK_PROVIDER_ERROR";
96
- CheckoutErrorType["CHAIN_NOT_SUPPORTED_ERROR"] = "CHAIN_NOT_SUPPORTED_ERROR";
97
- CheckoutErrorType["PROVIDER_REQUEST_MISSING_ERROR"] = "PROVIDER_REQUEST_MISSING_ERROR";
98
- CheckoutErrorType["PROVIDER_REQUEST_FAILED_ERROR"] = "PROVIDER_REQUEST_FAILED_ERROR";
99
- CheckoutErrorType["USER_REJECTED_REQUEST_ERROR"] = "USER_REJECTED_REQUEST_ERROR";
100
- CheckoutErrorType["TRANSACTION_ERROR"] = "TRANSACTION_ERROR";
101
- })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
102
- let $a8bc256d81a5e2c1$export$a22d4e0719ee6def;
103
- (function(CheckoutInternalErrorType) {
104
- CheckoutInternalErrorType["REJECTED_SWITCH_AFTER_ADDING_NETWORK"] = "REJECTED_SWITCH_AFTER_ADDING_NETWORK";
105
- })($a8bc256d81a5e2c1$export$a22d4e0719ee6def || ($a8bc256d81a5e2c1$export$a22d4e0719ee6def = {}));
106
- JSON.parse('[{"chainId":1},{"chainId":137}]');
107
- JSON.parse("[{\"address\":\"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0\",\"chainId\":137,\"name\":\"Matic\",\"symbol\":\"MATIC\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"name\":\"Ethereum\",\"symbol\":\"ETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"chainId\":1,\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF\",\"chainId\":1,\"name\":\"Immutable X\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0\",\"chainId\":1,\"name\":\"Matic\",\"symbol\":\"MATIC\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 38.4 33.5' style='enable-background:new 0 0 38.4 33.5;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%238247E5;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l5.5-3.2l3.8-2.2l5.5-3.2c0.7-0.4,1.6-0.4,2.4,0l4.3,2.5c0.7,0.4,1.2,1.2,1.2,2.1v5c0,0.8-0.4,1.6-1.2,2.1 L29,28.8c-0.7,0.4-1.6,0.4-2.4,0l-4.3-2.5c-0.7-0.4-1.2-1.2-1.2-2.1V21l-3.8,2.2v3.3c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 c0.7,0.4,1.6,0.4,2.4,0l8.1-4.7c0.7-0.4,1.2-1.2,1.2-2.1V17c0-0.8-0.4-1.6-1.2-2.1L29,10.2z'/%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"name\":\"Ethereum\",\"symbol\":\"ETH\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' width='100%25' height='100%25' version='1.1' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='evenodd' clip-rule='evenodd'%0AviewBox='0 0 784.37 1277.39' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xodm='http://www.corel.com/coreldraw/odm/2003'%3E%3Cg id='Layer_x0020_1'%3E%3Cmetadata id='CorelCorpID_0Corel-Layer'/%3E%3Cg id='_1421394342400'%3E%3Cg%3E%3Cpolygon fill='%23343434' fill-rule='nonzero' points='392.07,0 383.5,29.11 383.5,873.74 392.07,882.29 784.13,650.54 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,0 -0,650.54 392.07,882.29 392.07,472.33 '/%3E%3Cpolygon fill='%233C3C3B' fill-rule='nonzero' points='392.07,956.52 387.24,962.41 387.24,1263.28 392.07,1277.38 784.37,724.89 '/%3E%3Cpolygon fill='%238C8C8C' fill-rule='nonzero' points='392.07,1277.38 392.07,956.52 -0,724.89 '/%3E%3Cpolygon fill='%23141414' fill-rule='nonzero' points='392.07,882.29 784.13,650.54 392.07,472.33 '/%3E%3Cpolygon fill='%23393939' fill-rule='nonzero' points='0,650.54 392.07,882.29 392.07,472.33 '/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"chainId\":5,\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x1facdd0165489f373255a90304650e15481b2c85\",\"chainId\":5,\"name\":\"Immutable X\",\"symbol\":\"IMX\",\"decimals\":18,\"icon\":\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 139 113' style='enable-background:new 0 0 139 113;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bclip-path:url(%23SVGID_00000053504646934646330740000009134454895836103350_);%7D .st1%7Bfill:%2317B5CB;%7D%0A%3C/style%3E%3Cg%3E%3Cdefs%3E%3Crect id='SVGID_1_' width='139' height='113'/%3E%3C/defs%3E%3CclipPath id='SVGID_00000035518931339590433170000002358037249938198420_'%3E%3Cuse xlink:href='%23SVGID_1_' style='overflow:visible;'/%3E%3C/clipPath%3E%3Cg style='clip-path:url(%23SVGID_00000035518931339590433170000002358037249938198420_);'%3E%3Cpath class='st1' d='M124.1,0h14.6L79.5,67.6c-1.5,1.7-1.6,4.3-0.1,6.1l34.1,39.7H98.3L66.8,76.6l-1.6-2c-1.5-1.7-1.4-4.4,0.1-6.1 L124.1,0z'/%3E%3Cpath class='st1' d='M91.2,73.7c-1-1.1-1.3-2.7-1-4.1c0.3-0.8,0.8-1.6,1.4-2.2l3.9-4.3l43.5,50.3h-13.8 C125.2,113.4,99.7,83.6,91.2,73.7z'/%3E%3Cpath class='st1' d='M15.2,113.4H0l46.6-53.9c1.5-1.7,1.5-4.3,0-6L0.4,0H15l46.5,53.9c1.2,1.6,1.4,3.9,0.1,5.4 C49.4,73.4,15.2,113.4,15.2,113.4z'/%3E%3Cpath class='st1' d='M40.6,0h-14l43.1,49.9c0,0,0.1-0.1,4.9-5.8c1.3-1.5,1.6-3.4,0.1-4.9C65.7,30,40.6,0,40.6,0z'/%3E%3Cpath class='st1' d='M82.6,34.8L112.5,0H98.3L82.7,18.2l-4.5,5.3c-1.5,1.7-1.6,4.3-0.1,6.1C79.2,30.9,82.6,34.8,82.6,34.8z'/%3E%3Cpath class='st1' d='M56.6,78.6l-29.9,34.8h14.1l15.6-18.2l4.5-5.3c1.5-1.7,1.6-4.3,0.1-6.1C59.9,82.5,56.6,78.6,56.6,78.6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\",\"tokenFeatures\":[\"swap\",\"bridge\"]},{\"address\":\"0x123456789\",\"chainId\":5,\"name\":\"Swap Coin\",\"symbol\":\"SWC\",\"decimals\":18,\"tokenFeatures\":[\"swap\",\"fakeFeature\"]},{\"address\":\"0x123456789\",\"chainId\":5,\"name\":\"Bridge Coin\",\"symbol\":\"BDC\",\"decimals\":18,\"tokenFeatures\":[\"bridge\",\"fakeFeature\"]}]");
108
- JSON.parse('[{"connectionProvider":"metamask","icon":"some-icon-url","name":"MetaMask","description":"complete web3 wallet solution","platform":["desktop"]},{"connectionProvider":"passport","icon":"pp-icon","name":"Passport","description":"Web3 with your email!","platform":["mobile","desktop"]},{"connectionProvider":"gamestop","icon":"gme-icon","name":"GameStop","description":"Never stopping the game!","platform":["mobile"]}]');
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import 'react';
109
3
 
110
4
  function $parcel$export(e, n, v, s) {
111
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
112
6
  }
113
- var $88e4c575901cd68c$exports = {};
7
+ var $207ed853f11d19d5$exports = {};
114
8
 
115
- $parcel$export($88e4c575901cd68c$exports, "IMTBLWidgetEvents", () => $88e4c575901cd68c$export$5a0ace85cae72d45);
116
- let $88e4c575901cd68c$export$5a0ace85cae72d45;
9
+ $parcel$export($207ed853f11d19d5$exports, "IMTBLWidgetEvents", () => $207ed853f11d19d5$export$5a0ace85cae72d45);
10
+ let $207ed853f11d19d5$export$5a0ace85cae72d45;
117
11
  (function(IMTBLWidgetEvents) {
118
12
  IMTBLWidgetEvents["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
119
13
  IMTBLWidgetEvents["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
120
14
  IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
121
15
  IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
122
16
  IMTBLWidgetEvents["IMTBL_BUY_WIDGET_EVENT"] = "imtbl-buy-widget";
123
- })($88e4c575901cd68c$export$5a0ace85cae72d45 || ($88e4c575901cd68c$export$5a0ace85cae72d45 = {}));
17
+ })($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
124
18
 
125
19
 
126
- var $d71a87afc3136184$exports = {};
20
+ var $a85ecdbd885c58ad$exports = {};
127
21
 
128
- $parcel$export($d71a87afc3136184$exports, "ConnectEventType", () => $d71a87afc3136184$export$e72e7f9969a47dd3);
129
- let $d71a87afc3136184$export$e72e7f9969a47dd3;
22
+ $parcel$export($a85ecdbd885c58ad$exports, "ConnectEventType", () => $a85ecdbd885c58ad$export$e72e7f9969a47dd3);
23
+ let $a85ecdbd885c58ad$export$e72e7f9969a47dd3;
130
24
  (function(ConnectEventType) {
131
25
  ConnectEventType["SUCCESS"] = "success";
132
26
  ConnectEventType["FAILURE"] = "failure";
133
27
  ConnectEventType["CLOSE_WIDGET"] = "close-widget";
134
- })($d71a87afc3136184$export$e72e7f9969a47dd3 || ($d71a87afc3136184$export$e72e7f9969a47dd3 = {}));
28
+ })($a85ecdbd885c58ad$export$e72e7f9969a47dd3 || ($a85ecdbd885c58ad$export$e72e7f9969a47dd3 = {}));
135
29
 
136
30
 
137
- var $9d0f1783d4d36e8a$exports = {};
31
+ var $77b6aac5c353d4a9$exports = {};
138
32
 
139
- $parcel$export($9d0f1783d4d36e8a$exports, "WalletEventType", () => $9d0f1783d4d36e8a$export$d9be06b70b28c742);
33
+ $parcel$export($77b6aac5c353d4a9$exports, "WalletEventType", () => $77b6aac5c353d4a9$export$d9be06b70b28c742);
140
34
  //wallet widget events
141
- let $9d0f1783d4d36e8a$export$d9be06b70b28c742;
35
+ let $77b6aac5c353d4a9$export$d9be06b70b28c742;
142
36
  (function(WalletEventType) {
143
37
  WalletEventType["CLOSE_WIDGET"] = "close-widget";
144
38
  WalletEventType["NETWORK_SWITCH"] = "network-switch";
145
- })($9d0f1783d4d36e8a$export$d9be06b70b28c742 || ($9d0f1783d4d36e8a$export$d9be06b70b28c742 = {}));
39
+ })($77b6aac5c353d4a9$export$d9be06b70b28c742 || ($77b6aac5c353d4a9$export$d9be06b70b28c742 = {}));
146
40
 
147
41
 
148
- var $5d497088f13bb116$exports = {};
42
+ var $53d219e7f6bf0cd6$exports = {};
149
43
 
150
- $parcel$export($5d497088f13bb116$exports, "SwapEventType", () => $5d497088f13bb116$export$140a49745ab55563);
151
- let $5d497088f13bb116$export$140a49745ab55563;
44
+ $parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0cd6$export$140a49745ab55563);
45
+ let $53d219e7f6bf0cd6$export$140a49745ab55563;
152
46
  (function(SwapEventType) {
153
47
  SwapEventType["SUCCESS"] = "success";
154
48
  SwapEventType["FAILURE"] = "failure";
155
- })($5d497088f13bb116$export$140a49745ab55563 || ($5d497088f13bb116$export$140a49745ab55563 = {}));
49
+ })($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
156
50
 
157
51
 
158
- var $28a5fdc2f5e6c742$exports = {};
52
+ var $15cc9e120aa6f3bf$exports = {};
159
53
 
160
- $parcel$export($28a5fdc2f5e6c742$exports, "BridgeEventType", () => $28a5fdc2f5e6c742$export$d1bfa21f7c76447a);
161
- let $28a5fdc2f5e6c742$export$d1bfa21f7c76447a;
54
+ $parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
55
+ let $15cc9e120aa6f3bf$export$d1bfa21f7c76447a;
162
56
  (function(BridgeEventType) {
163
57
  BridgeEventType["CLOSE_WIDGET"] = "close-widget";
164
58
  BridgeEventType["SUCCESS"] = "success";
165
59
  BridgeEventType["FAILURE"] = "failure";
166
- })($28a5fdc2f5e6c742$export$d1bfa21f7c76447a || ($28a5fdc2f5e6c742$export$d1bfa21f7c76447a = {}));
60
+ })($15cc9e120aa6f3bf$export$d1bfa21f7c76447a || ($15cc9e120aa6f3bf$export$d1bfa21f7c76447a = {}));
167
61
 
168
62
 
169
- var $ede253beebe0de4a$exports = {};
63
+ var $98cbcca465beec95$exports = {};
170
64
 
171
- $parcel$export($ede253beebe0de4a$exports, "BuyEventType", () => $ede253beebe0de4a$export$90db5fe1be5993c1);
172
- let $ede253beebe0de4a$export$90db5fe1be5993c1;
65
+ $parcel$export($98cbcca465beec95$exports, "BuyEventType", () => $98cbcca465beec95$export$90db5fe1be5993c1);
66
+ let $98cbcca465beec95$export$90db5fe1be5993c1;
173
67
  (function(BuyEventType) {
174
68
  BuyEventType["SUCCESS"] = "success";
175
69
  BuyEventType["FAILURE"] = "failure";
176
70
  BuyEventType["NOT_CONNECTED"] = "not_connected";
177
71
  BuyEventType["CLOSE"] = "close";
178
- })($ede253beebe0de4a$export$90db5fe1be5993c1 || ($ede253beebe0de4a$export$90db5fe1be5993c1 = {}));
179
-
72
+ })($98cbcca465beec95$export$90db5fe1be5993c1 || ($98cbcca465beec95$export$90db5fe1be5993c1 = {}));
180
73
 
181
- var $9234b4c577442a97$exports = {};
182
74
 
183
- $parcel$export($9234b4c577442a97$exports, "Network", () => $9234b4c577442a97$export$95be4ae94445245a);
184
- $parcel$export($9234b4c577442a97$exports, "WidgetTheme", () => $9234b4c577442a97$export$c88931fdc51854eb);
185
- $parcel$export($9234b4c577442a97$exports, "ConnectionProviders", () => $d176a05e966364ba$export$3bfad4d03ada24c4);
75
+ var $14d7a2bbb79e0dae$exports = {};
186
76
 
187
- let $9234b4c577442a97$export$95be4ae94445245a;
77
+ $parcel$export($14d7a2bbb79e0dae$exports, "Network", () => $14d7a2bbb79e0dae$export$95be4ae94445245a);
78
+ $parcel$export($14d7a2bbb79e0dae$exports, "WidgetTheme", () => $14d7a2bbb79e0dae$export$c88931fdc51854eb);
79
+ $parcel$export($14d7a2bbb79e0dae$exports, "WidgetConnectionProviders", () => $14d7a2bbb79e0dae$export$2f61dde3bdc320cb);
80
+ $parcel$export($14d7a2bbb79e0dae$exports, "CheckoutWidgetTagNames", () => $14d7a2bbb79e0dae$export$75be0f6af9650f2c);
81
+ let $14d7a2bbb79e0dae$export$95be4ae94445245a;
188
82
  (function(Network) {
189
83
  Network["ETHEREUM"] = "Ethereum";
190
84
  Network["GOERLI"] = "Goerli";
191
85
  Network["POLYGON"] = "Polygon";
192
- })($9234b4c577442a97$export$95be4ae94445245a || ($9234b4c577442a97$export$95be4ae94445245a = {}));
193
- let $9234b4c577442a97$export$c88931fdc51854eb;
86
+ })($14d7a2bbb79e0dae$export$95be4ae94445245a || ($14d7a2bbb79e0dae$export$95be4ae94445245a = {}));
87
+ let $14d7a2bbb79e0dae$export$c88931fdc51854eb;
194
88
  (function(WidgetTheme) {
195
89
  WidgetTheme["LIGHT"] = "light";
196
90
  WidgetTheme["DARK"] = "dark";
197
91
  WidgetTheme["CUSTOM"] = "custom";
198
- })($9234b4c577442a97$export$c88931fdc51854eb || ($9234b4c577442a97$export$c88931fdc51854eb = {}));
92
+ })($14d7a2bbb79e0dae$export$c88931fdc51854eb || ($14d7a2bbb79e0dae$export$c88931fdc51854eb = {}));
93
+ let $14d7a2bbb79e0dae$export$2f61dde3bdc320cb;
94
+ (function(WidgetConnectionProviders) {
95
+ WidgetConnectionProviders["METAMASK"] = "metamask";
96
+ })($14d7a2bbb79e0dae$export$2f61dde3bdc320cb || ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb = {}));
97
+ let $14d7a2bbb79e0dae$export$75be0f6af9650f2c;
98
+ (function(CheckoutWidgetTagNames) {
99
+ CheckoutWidgetTagNames["CONNECT"] = "imtbl-connect";
100
+ CheckoutWidgetTagNames["WALLET"] = "imtbl-wallet";
101
+ CheckoutWidgetTagNames["SWAP"] = "imtbl-swap";
102
+ CheckoutWidgetTagNames["BUY"] = "imtbl-buy";
103
+ CheckoutWidgetTagNames["BRIDGE"] = "imtbl-bridge";
104
+ CheckoutWidgetTagNames["EXAMPLe"] = "imtbl-example";
105
+ })($14d7a2bbb79e0dae$export$75be0f6af9650f2c || ($14d7a2bbb79e0dae$export$75be0f6af9650f2c = {}));
106
+
107
+
108
+ var $1f969328e5988c99$exports = {};
109
+
110
+ $parcel$export($1f969328e5988c99$exports, "BridgeReact", () => $1f969328e5988c99$export$30f61ebf204c69f6);
111
+
112
+
113
+
114
+ function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
115
+ const { providerPreference: providerPreference , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
116
+ const config = window.ImtblCheckoutWidgetConfig;
117
+ return /*#__PURE__*/ (jsx)("imtbl-bridge", {
118
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
119
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
120
+ fromContractAddress: fromContractAddress ?? "",
121
+ fromNetwork: fromNetwork ?? "",
122
+ amount: amount ?? ""
123
+ });
124
+ }
125
+
126
+
127
+ var $f22931ca9e2f35b6$exports = {};
128
+
129
+ $parcel$export($f22931ca9e2f35b6$exports, "BuyReact", () => $f22931ca9e2f35b6$export$d13582032b79b401);
130
+
131
+
132
+
133
+ function $f22931ca9e2f35b6$export$d13582032b79b401(props) {
134
+ const { providerPreference: providerPreference , orderId: orderId } = props;
135
+ const config = window.ImtblCheckoutWidgetConfig;
136
+ return /*#__PURE__*/ (jsx)("imtbl-buy", {
137
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
138
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
139
+ orderId: orderId
140
+ });
141
+ }
142
+
143
+
144
+ var $fa90757d8d7a0962$exports = {};
145
+
146
+ $parcel$export($fa90757d8d7a0962$exports, "CheckoutWidgets", () => $fa90757d8d7a0962$export$af210a0808087845);
147
+ $parcel$export($fa90757d8d7a0962$exports, "UpdateConfig", () => $fa90757d8d7a0962$export$bf1548ba7e61c17f);
148
+ $parcel$export($fa90757d8d7a0962$exports, "SetProvider", () => $fa90757d8d7a0962$export$931068bc678f0d73);
149
+ function $fa90757d8d7a0962$export$af210a0808087845(config) {
150
+ var checkoutWidgetJS = document.createElement("script");
151
+ checkoutWidgetJS.setAttribute("src", "http://localhost:3000/lib/js/imtbl-checkout.js");
152
+ document.head.appendChild(checkoutWidgetJS);
153
+ window.ImtblCheckoutWidgetConfig = config;
154
+ }
155
+ function $fa90757d8d7a0962$export$bf1548ba7e61c17f(config) {
156
+ window.ImtblCheckoutWidgetConfig = config;
157
+ }
158
+ function $fa90757d8d7a0962$export$931068bc678f0d73(tagName, provider) {
159
+ if (!provider) {
160
+ console.error("no provider parsed");
161
+ return;
162
+ }
163
+ const elements = document.getElementsByTagName(tagName);
164
+ const widget = elements[0];
165
+ let attempts = 0;
166
+ const maxAttempts = 10;
167
+ let timer;
168
+ const attemptToSetProvider = ()=>{
169
+ try {
170
+ widget.setProvider(provider);
171
+ window.clearInterval(timer);
172
+ } catch (err) {
173
+ attempts++;
174
+ if (attempts >= maxAttempts) {
175
+ window.clearInterval(timer);
176
+ console.error("failed to set the provider");
177
+ }
178
+ }
179
+ };
180
+ timer = window.setInterval(attemptToSetProvider, 10);
181
+ attemptToSetProvider();
182
+ }
183
+
184
+
185
+ var $f2083cd30e2f5c56$exports = {};
186
+
187
+ $parcel$export($f2083cd30e2f5c56$exports, "ConnectReact", () => $f2083cd30e2f5c56$export$49d62957f420a1e2);
188
+
189
+
190
+
191
+ function $f2083cd30e2f5c56$export$49d62957f420a1e2(props) {
192
+ const { providerPreference: providerPreference } = props;
193
+ const config = window.ImtblCheckoutWidgetConfig;
194
+ return /*#__PURE__*/ (jsx)("imtbl-connect", {
195
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
196
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK
197
+ });
198
+ }
199
+
200
+
201
+ var $a4fbb8e3a6aeff58$exports = {};
202
+
203
+ $parcel$export($a4fbb8e3a6aeff58$exports, "SwapReact", () => $a4fbb8e3a6aeff58$export$971e031379577f4);
204
+
205
+
206
+
207
+ function $a4fbb8e3a6aeff58$export$971e031379577f4(props) {
208
+ const { providerPreference: providerPreference , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress } = props;
209
+ const config = window.ImtblCheckoutWidgetConfig;
210
+ return /*#__PURE__*/ (jsx)("imtbl-swap", {
211
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
212
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK,
213
+ fromContractAddress: fromContractAddress ?? "",
214
+ toContractAddress: toContractAddress ?? "",
215
+ amount: amount ?? ""
216
+ });
217
+ }
218
+
219
+
220
+ var $89d55ace0f8f1c07$exports = {};
221
+
222
+ $parcel$export($89d55ace0f8f1c07$exports, "WalletReact", () => $89d55ace0f8f1c07$export$ceaac94f34dba154);
223
+
224
+
225
+
226
+ function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
227
+ const { providerPreference: providerPreference } = props;
228
+ const config = window.ImtblCheckoutWidgetConfig;
229
+ return /*#__PURE__*/ (jsx)("imtbl-wallet", {
230
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
231
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK
232
+ });
233
+ }
234
+
235
+
236
+ var $d087956fd1002f80$exports = {};
237
+
238
+ $parcel$export($d087956fd1002f80$exports, "ExampleReact", () => $d087956fd1002f80$export$fa517eee6594d26c);
239
+
240
+
241
+
242
+ function $d087956fd1002f80$export$fa517eee6594d26c(props) {
243
+ const { providerPreference: providerPreference , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
244
+ const config = window.ImtblCheckoutWidgetConfig;
245
+ return /*#__PURE__*/ (jsx)("imtbl-example", {
246
+ providerPreference: providerPreference ?? ($14d7a2bbb79e0dae$export$2f61dde3bdc320cb).METAMASK,
247
+ theme: config.theme ?? ($14d7a2bbb79e0dae$export$c88931fdc51854eb).DARK
248
+ });
249
+ }
199
250
 
200
- export { $28a5fdc2f5e6c742$export$d1bfa21f7c76447a as BridgeEventType, $ede253beebe0de4a$export$90db5fe1be5993c1 as BuyEventType, $d71a87afc3136184$export$e72e7f9969a47dd3 as ConnectEventType, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, $88e4c575901cd68c$export$5a0ace85cae72d45 as IMTBLWidgetEvents, $9234b4c577442a97$export$95be4ae94445245a as Network, $5d497088f13bb116$export$140a49745ab55563 as SwapEventType, $9d0f1783d4d36e8a$export$d9be06b70b28c742 as WalletEventType, $9234b4c577442a97$export$c88931fdc51854eb as WidgetTheme };
251
+ export { $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $98cbcca465beec95$export$90db5fe1be5993c1 as BuyEventType, $f22931ca9e2f35b6$export$d13582032b79b401 as BuyReact, $14d7a2bbb79e0dae$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $fa90757d8d7a0962$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $d087956fd1002f80$export$fa517eee6594d26c as ExampleReact, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, $14d7a2bbb79e0dae$export$95be4ae94445245a as Network, $fa90757d8d7a0962$export$931068bc678f0d73 as SetProvider, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $fa90757d8d7a0962$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $14d7a2bbb79e0dae$export$2f61dde3bdc320cb as WidgetConnectionProviders, $14d7a2bbb79e0dae$export$c88931fdc51854eb as WidgetTheme };
@@ -9985,7 +9985,7 @@ declare class ImmutableXClient {
9985
9985
  getDeposit(request: DepositsApiGetDepositRequest): Promise<Deposit>;
9986
9986
  /**
9987
9987
  * Get a list of Deposits
9988
- * @param request - optional request object containing the parameters to be provided in the API request
9988
+ * @param request - optional object containing the parameters to be provided in the API request
9989
9989
  * @returns a promise that resolves with the requested list of Deposits
9990
9990
  * @throws {@link index.IMXError}
9991
9991
  */
@@ -10006,7 +10006,7 @@ declare class ImmutableXClient {
10006
10006
  getAsset(request: AssetsApiGetAssetRequest): Promise<Asset>;
10007
10007
  /**
10008
10008
  * Get a list of Assets
10009
- * @param request - optional request object containing the parameters to be provided in the API request
10009
+ * @param request - optional object containing the parameters to be provided in the API request
10010
10010
  * @returns a promise that resolves with the requested list of Assets
10011
10011
  * @throws {@link index.IMXError}
10012
10012
  */
@@ -10035,7 +10035,7 @@ declare class ImmutableXClient {
10035
10035
  listCollectionFilters(request: CollectionsApiListCollectionFiltersRequest): Promise<CollectionFilter>;
10036
10036
  /**
10037
10037
  * Get a list of Collections
10038
- * @param request - optional request object containing the parameters to be provided in the API request
10038
+ * @param request - optional object containing the parameters to be provided in the API request
10039
10039
  * @returns a promise that resolves with the requested list of Collections
10040
10040
  * @throws {@link index.IMXError}
10041
10041
  */
@@ -10161,7 +10161,7 @@ declare class ImmutableXClient {
10161
10161
  getMint(request: MintsApiGetMintRequest): Promise<Mint[]>;
10162
10162
  /**
10163
10163
  * Get a list of Mints
10164
- * @param request optional request object containing the parameters to be provided in the API request
10164
+ * @param request optional object containing the parameters to be provided in the API request
10165
10165
  * @returns a promise that resolves with the requested list of Mints
10166
10166
  * @throws {@link index.IMXError}
10167
10167
  */
@@ -10176,7 +10176,7 @@ declare class ImmutableXClient {
10176
10176
  mint(ethSigner: Signer, request: UnsignedMintRequest): Promise<MintTokensResponse>;
10177
10177
  /**
10178
10178
  * Get a list of Withdrawals
10179
- * @param request - optional request object containing the parameters to be provided in the API request
10179
+ * @param request - optional object containing the parameters to be provided in the API request
10180
10180
  * @returns a promise that resolves with the requested list of Withdrawals
10181
10181
  * @throws {@link index.IMXError}
10182
10182
  */
@@ -10197,7 +10197,7 @@ declare class ImmutableXClient {
10197
10197
  getOrder(request: OrdersApiGetOrderRequest): Promise<Order>;
10198
10198
  /**
10199
10199
  * Get a list of Orders
10200
- * @param request - optional request object containing the parameters to be provided in the API request
10200
+ * @param request - optional object containing the parameters to be provided in the API request
10201
10201
  * @returns a promise that resolves with the requested list of Orders
10202
10202
  * @throws {@link index.IMXError}
10203
10203
  */
@@ -10211,7 +10211,7 @@ declare class ImmutableXClient {
10211
10211
  getTrade(request: TradesApiGetTradeRequest): Promise<Trade>;
10212
10212
  /**
10213
10213
  * Get a list of Trades
10214
- * @param request - optional request object containing the parameters to be provided in the API request
10214
+ * @param request - optional object containing the parameters to be provided in the API request
10215
10215
  * @returns a promise that resolves with the requested list of Trades
10216
10216
  * @throws {@link index.IMXError}
10217
10217
  */
@@ -10225,7 +10225,7 @@ declare class ImmutableXClient {
10225
10225
  getToken(request: TokensApiGetTokenRequest): Promise<TokenDetails>;
10226
10226
  /**
10227
10227
  * Get a list of Tokens
10228
- * @param request - optional request object containing the parameters to be provided in the API request
10228
+ * @param request - optional object containing the parameters to be provided in the API request
10229
10229
  * @returns a promise that resolves with the requested list of Tokens
10230
10230
  * @throws {@link index.IMXError}
10231
10231
  */
@@ -10239,7 +10239,7 @@ declare class ImmutableXClient {
10239
10239
  getTransfer(request: TransfersApiGetTransferRequest): Promise<Transfer>;
10240
10240
  /**
10241
10241
  * Get a list of Transfers
10242
- * @param request - optional request object containing the parameters to be provided in the API request
10242
+ * @param request - optional object containing the parameters to be provided in the API request
10243
10243
  * @returns a promise that resolves with the requested list of Transfers
10244
10244
  * @throws {@link index.IMXError}
10245
10245
  */
@@ -7,26 +7,26 @@ var Environment;
7
7
  Environment["SANDBOX"] = "sandbox";
8
8
  })(Environment || (Environment = {}));
9
9
 
10
- // Set `sdkVersion` on config
11
- const PRODUCTION = () => {
12
- return Config.createConfig({
13
- basePath: 'https://api.x.immutable.com',
14
- chainID: 1,
15
- coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
16
- registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
17
- sdkVersion: 'ts-immutable-sdk-0.1.4-alpha',
18
- });
19
- };
20
- // Set `sdkVersion` on config
21
- const SANDBOX = () => {
22
- return Config.createConfig({
23
- basePath: 'https://api.sandbox.x.immutable.com',
24
- chainID: 5,
25
- coreContractAddress: '0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623',
26
- registrationContractAddress: '0x1C97Ada273C9A52253f463042f29117090Cd7D83',
27
- sdkVersion: 'ts-immutable-sdk-0.1.4-alpha',
28
- });
29
- };
10
+ /**
11
+ * Set `sdkVersion` on config
12
+ */
13
+ const production = () => Config.createConfig({
14
+ basePath: 'https://api.x.immutable.com',
15
+ chainID: 1,
16
+ coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
17
+ registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
18
+ sdkVersion: 'ts-immutable-sdk-0.1.5-alpha',
19
+ });
20
+ /**
21
+ * Set `sdkVersion` on config
22
+ */
23
+ const sandbox = () => Config.createConfig({
24
+ basePath: 'https://api.sandbox.x.immutable.com',
25
+ chainID: 5,
26
+ coreContractAddress: '0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623',
27
+ registrationContractAddress: '0x1C97Ada273C9A52253f463042f29117090Cd7D83',
28
+ sdkVersion: 'ts-immutable-sdk-0.1.5-alpha',
29
+ });
30
30
  class ImxConfiguration {
31
31
  immutableXConfig;
32
32
  baseConfig;
@@ -38,13 +38,16 @@ class ImxConfiguration {
38
38
  else {
39
39
  switch (baseConfig.environment) {
40
40
  case Environment.SANDBOX: {
41
- this.immutableXConfig = SANDBOX();
41
+ this.immutableXConfig = sandbox();
42
42
  break;
43
43
  }
44
44
  case Environment.PRODUCTION: {
45
- this.immutableXConfig = PRODUCTION();
45
+ this.immutableXConfig = production();
46
46
  break;
47
47
  }
48
+ default: {
49
+ this.immutableXConfig = sandbox();
50
+ }
48
51
  }
49
52
  }
50
53
  }
@@ -99,7 +102,7 @@ class ImmutableXClient {
99
102
  }
100
103
  /**
101
104
  * Get a list of Deposits
102
- * @param request - optional request object containing the parameters to be provided in the API request
105
+ * @param request - optional object containing the parameters to be provided in the API request
103
106
  * @returns a promise that resolves with the requested list of Deposits
104
107
  * @throws {@link index.IMXError}
105
108
  */
@@ -126,7 +129,7 @@ class ImmutableXClient {
126
129
  }
127
130
  /**
128
131
  * Get a list of Assets
129
- * @param request - optional request object containing the parameters to be provided in the API request
132
+ * @param request - optional object containing the parameters to be provided in the API request
130
133
  * @returns a promise that resolves with the requested list of Assets
131
134
  * @throws {@link index.IMXError}
132
135
  */
@@ -163,7 +166,7 @@ class ImmutableXClient {
163
166
  }
164
167
  /**
165
168
  * Get a list of Collections
166
- * @param request - optional request object containing the parameters to be provided in the API request
169
+ * @param request - optional object containing the parameters to be provided in the API request
167
170
  * @returns a promise that resolves with the requested list of Collections
168
171
  * @throws {@link index.IMXError}
169
172
  */
@@ -319,7 +322,7 @@ class ImmutableXClient {
319
322
  }
320
323
  /**
321
324
  * Get a list of Mints
322
- * @param request optional request object containing the parameters to be provided in the API request
325
+ * @param request optional object containing the parameters to be provided in the API request
323
326
  * @returns a promise that resolves with the requested list of Mints
324
327
  * @throws {@link index.IMXError}
325
328
  */
@@ -338,7 +341,7 @@ class ImmutableXClient {
338
341
  }
339
342
  /**
340
343
  * Get a list of Withdrawals
341
- * @param request - optional request object containing the parameters to be provided in the API request
344
+ * @param request - optional object containing the parameters to be provided in the API request
342
345
  * @returns a promise that resolves with the requested list of Withdrawals
343
346
  * @throws {@link index.IMXError}
344
347
  */
@@ -365,7 +368,7 @@ class ImmutableXClient {
365
368
  }
366
369
  /**
367
370
  * Get a list of Orders
368
- * @param request - optional request object containing the parameters to be provided in the API request
371
+ * @param request - optional object containing the parameters to be provided in the API request
369
372
  * @returns a promise that resolves with the requested list of Orders
370
373
  * @throws {@link index.IMXError}
371
374
  */
@@ -383,7 +386,7 @@ class ImmutableXClient {
383
386
  }
384
387
  /**
385
388
  * Get a list of Trades
386
- * @param request - optional request object containing the parameters to be provided in the API request
389
+ * @param request - optional object containing the parameters to be provided in the API request
387
390
  * @returns a promise that resolves with the requested list of Trades
388
391
  * @throws {@link index.IMXError}
389
392
  */
@@ -401,7 +404,7 @@ class ImmutableXClient {
401
404
  }
402
405
  /**
403
406
  * Get a list of Tokens
404
- * @param request - optional request object containing the parameters to be provided in the API request
407
+ * @param request - optional object containing the parameters to be provided in the API request
405
408
  * @returns a promise that resolves with the requested list of Tokens
406
409
  * @throws {@link index.IMXError}
407
410
  */
@@ -419,7 +422,7 @@ class ImmutableXClient {
419
422
  }
420
423
  /**
421
424
  * Get a list of Transfers
422
- * @param request - optional request object containing the parameters to be provided in the API request
425
+ * @param request - optional object containing the parameters to be provided in the API request
423
426
  * @returns a promise that resolves with the requested list of Transfers
424
427
  * @throws {@link index.IMXError}
425
428
  */