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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,180 @@
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
+
65
+
66
+
67
+
68
+ let $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
69
+ (function(CheckoutErrorType) {
70
+ CheckoutErrorType["CONNECT_PROVIDER_ERROR"] = "CONNECT_PROVIDER_ERROR";
71
+ CheckoutErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
72
+ CheckoutErrorType["GET_ERC20_BALANCE_ERROR"] = "GET_ERC20_BALANCE_ERROR";
73
+ CheckoutErrorType["METAMASK_PROVIDER_ERROR"] = "METAMASK_PROVIDER_ERROR";
74
+ CheckoutErrorType["CHAIN_NOT_SUPPORTED_ERROR"] = "CHAIN_NOT_SUPPORTED_ERROR";
75
+ CheckoutErrorType["PROVIDER_REQUEST_MISSING_ERROR"] = "PROVIDER_REQUEST_MISSING_ERROR";
76
+ CheckoutErrorType["USER_REJECTED_REQUEST_ERROR"] = "USER_REJECTED_REQUEST_ERROR";
77
+ CheckoutErrorType["TRANSACTION_ERROR"] = "TRANSACTION_ERROR";
78
+ })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
79
+
80
+
81
+
82
+
83
+
84
+ let $efe60cea83bfc4e8$export$f04a61298a47a40f;
85
+ (function(Icon) {
86
+ Icon["ETH"] = "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";
87
+ Icon["MATIC"] = "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";
88
+ Icon["IMX"] = "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";
89
+ })($efe60cea83bfc4e8$export$f04a61298a47a40f || ($efe60cea83bfc4e8$export$f04a61298a47a40f = {}));
90
+
91
+ function $parcel$export(e, n, v, s) {
92
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
93
+ }
94
+ var $88e4c575901cd68c$exports = {};
95
+
96
+ $parcel$export($88e4c575901cd68c$exports, "IMTBLWidgetEvents", () => $88e4c575901cd68c$export$5a0ace85cae72d45);
97
+ let $88e4c575901cd68c$export$5a0ace85cae72d45;
98
+ (function(IMTBLWidgetEvents) {
99
+ IMTBLWidgetEvents["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
100
+ IMTBLWidgetEvents["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
101
+ IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
102
+ IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
103
+ IMTBLWidgetEvents["IMTBL_BUY_WIDGET_EVENT"] = "imtbl-buy-widget";
104
+ })($88e4c575901cd68c$export$5a0ace85cae72d45 || ($88e4c575901cd68c$export$5a0ace85cae72d45 = {}));
105
+
106
+
107
+ var $d71a87afc3136184$exports = {};
108
+
109
+ $parcel$export($d71a87afc3136184$exports, "ConnectEventType", () => $d71a87afc3136184$export$e72e7f9969a47dd3);
110
+ let $d71a87afc3136184$export$e72e7f9969a47dd3;
111
+ (function(ConnectEventType) {
112
+ ConnectEventType["SUCCESS"] = "success";
113
+ ConnectEventType["FAILURE"] = "failure";
114
+ })($d71a87afc3136184$export$e72e7f9969a47dd3 || ($d71a87afc3136184$export$e72e7f9969a47dd3 = {}));
115
+
116
+
117
+ var $9d0f1783d4d36e8a$exports = {};
118
+
119
+ $parcel$export($9d0f1783d4d36e8a$exports, "WalletEventType", () => $9d0f1783d4d36e8a$export$d9be06b70b28c742);
120
+ //wallet widget events
121
+ let $9d0f1783d4d36e8a$export$d9be06b70b28c742;
122
+ (function(WalletEventType) {
123
+ WalletEventType["CLOSE_WIDGET"] = "close-widget";
124
+ WalletEventType["NETWORK_SWITCH"] = "network-switch";
125
+ })($9d0f1783d4d36e8a$export$d9be06b70b28c742 || ($9d0f1783d4d36e8a$export$d9be06b70b28c742 = {}));
126
+
127
+
128
+ var $5d497088f13bb116$exports = {};
129
+
130
+ $parcel$export($5d497088f13bb116$exports, "SwapEventType", () => $5d497088f13bb116$export$140a49745ab55563);
131
+ let $5d497088f13bb116$export$140a49745ab55563;
132
+ (function(SwapEventType) {
133
+ SwapEventType["SUCCESS"] = "success";
134
+ SwapEventType["FAILURE"] = "failure";
135
+ })($5d497088f13bb116$export$140a49745ab55563 || ($5d497088f13bb116$export$140a49745ab55563 = {}));
136
+
137
+
138
+ var $28a5fdc2f5e6c742$exports = {};
139
+
140
+ $parcel$export($28a5fdc2f5e6c742$exports, "BridgeEventType", () => $28a5fdc2f5e6c742$export$d1bfa21f7c76447a);
141
+ let $28a5fdc2f5e6c742$export$d1bfa21f7c76447a;
142
+ (function(BridgeEventType) {
143
+ BridgeEventType["CLOSE_WIDGET"] = "close-widget";
144
+ BridgeEventType["SUCCESS"] = "success";
145
+ BridgeEventType["FAILURE"] = "failure";
146
+ })($28a5fdc2f5e6c742$export$d1bfa21f7c76447a || ($28a5fdc2f5e6c742$export$d1bfa21f7c76447a = {}));
147
+
148
+
149
+ var $ede253beebe0de4a$exports = {};
150
+
151
+ $parcel$export($ede253beebe0de4a$exports, "BuyEventType", () => $ede253beebe0de4a$export$90db5fe1be5993c1);
152
+ let $ede253beebe0de4a$export$90db5fe1be5993c1;
153
+ (function(BuyEventType) {
154
+ BuyEventType["SUCCESS"] = "success";
155
+ BuyEventType["FAILURE"] = "failure";
156
+ BuyEventType["NOT_CONNECTED"] = "not_connected";
157
+ BuyEventType["CLOSE"] = "close";
158
+ })($ede253beebe0de4a$export$90db5fe1be5993c1 || ($ede253beebe0de4a$export$90db5fe1be5993c1 = {}));
159
+
160
+
161
+ var $9234b4c577442a97$exports = {};
162
+
163
+ $parcel$export($9234b4c577442a97$exports, "Network", () => $9234b4c577442a97$export$95be4ae94445245a);
164
+ $parcel$export($9234b4c577442a97$exports, "WidgetTheme", () => $9234b4c577442a97$export$c88931fdc51854eb);
165
+ $parcel$export($9234b4c577442a97$exports, "ConnectionProviders", () => $d176a05e966364ba$export$3bfad4d03ada24c4);
166
+
167
+ let $9234b4c577442a97$export$95be4ae94445245a;
168
+ (function(Network) {
169
+ Network["ETHEREUM"] = "Ethereum";
170
+ Network["GOERLI"] = "Goerli";
171
+ Network["POLYGON"] = "Polygon";
172
+ })($9234b4c577442a97$export$95be4ae94445245a || ($9234b4c577442a97$export$95be4ae94445245a = {}));
173
+ let $9234b4c577442a97$export$c88931fdc51854eb;
174
+ (function(WidgetTheme) {
175
+ WidgetTheme["LIGHT"] = "light";
176
+ WidgetTheme["DARK"] = "dark";
177
+ WidgetTheme["CUSTOM"] = "custom";
178
+ })($9234b4c577442a97$export$c88931fdc51854eb || ($9234b4c577442a97$export$c88931fdc51854eb = {}));
179
+
180
+ 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 };