@imtbl/sdk 0.1.5-alpha → 0.1.6

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,626 +0,0 @@
1
- import { utils, Contract } from 'ethers';
2
- import $7v2Z6$metamaskdetectprovider from '@metamask/detect-provider';
3
- import { Web3Provider } from '@ethersproject/providers';
4
-
5
- function $parcel$interopDefault(a) {
6
- return a && a.__esModule ? a.default : a;
7
- }
8
-
9
- const $762782b6c862d954$export$db5daa1b5156ccfe = [
10
- {
11
- constant: true,
12
- inputs: [],
13
- name: "name",
14
- outputs: [
15
- {
16
- name: "",
17
- type: "string"
18
- }
19
- ],
20
- payable: false,
21
- type: "function"
22
- },
23
- {
24
- constant: true,
25
- inputs: [],
26
- name: "decimals",
27
- outputs: [
28
- {
29
- name: "",
30
- type: "uint8"
31
- }
32
- ],
33
- payable: false,
34
- type: "function"
35
- },
36
- {
37
- constant: true,
38
- inputs: [
39
- {
40
- name: "_owner",
41
- type: "address"
42
- }
43
- ],
44
- name: "balanceOf",
45
- outputs: [
46
- {
47
- name: "balance",
48
- type: "uint256"
49
- }
50
- ],
51
- payable: false,
52
- type: "function"
53
- },
54
- {
55
- constant: true,
56
- inputs: [],
57
- name: "symbol",
58
- outputs: [
59
- {
60
- name: "",
61
- type: "string"
62
- }
63
- ],
64
- payable: false,
65
- type: "function"
66
- }
67
- ];
68
-
69
-
70
- let $d176a05e966364ba$export$3bfad4d03ada24c4;
71
- (function(ConnectionProviders) {
72
- ConnectionProviders["METAMASK"] = "metamask";
73
- })($d176a05e966364ba$export$3bfad4d03ada24c4 || ($d176a05e966364ba$export$3bfad4d03ada24c4 = {}));
74
-
75
-
76
- let $a47e48dd2c04791b$export$c06e1e7429de6283;
77
- (function(ChainId) {
78
- ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
79
- ChainId[ChainId["GOERLI"] = 5] = "GOERLI";
80
- ChainId[ChainId["POLYGON"] = 137] = "POLYGON";
81
- })($a47e48dd2c04791b$export$c06e1e7429de6283 || ($a47e48dd2c04791b$export$c06e1e7429de6283 = {}));
82
- const $a47e48dd2c04791b$export$f61f4aaec62f6be9 = {
83
- [$a47e48dd2c04791b$export$c06e1e7429de6283.ETHEREUM]: {
84
- chainIdHex: "0x1",
85
- chainName: "Ethereum",
86
- rpcUrls: [
87
- "https://mainnet.infura.io/v3/"
88
- ],
89
- nativeCurrency: {
90
- name: "Ethereum",
91
- symbol: "ETH",
92
- decimals: 18
93
- },
94
- blockExplorerUrls: [
95
- "https://etherscan.io/"
96
- ]
97
- },
98
- [$a47e48dd2c04791b$export$c06e1e7429de6283.GOERLI]: {
99
- chainIdHex: "0x5",
100
- chainName: "Goerli",
101
- rpcUrls: [
102
- "https://goerli.infura.io/v3/"
103
- ],
104
- nativeCurrency: {
105
- name: "Goerli Eth",
106
- symbol: "ETH",
107
- decimals: 18
108
- },
109
- blockExplorerUrls: [
110
- "https://goerli.etherscan.io/"
111
- ]
112
- },
113
- [$a47e48dd2c04791b$export$c06e1e7429de6283.POLYGON]: {
114
- chainIdHex: "0x89",
115
- chainName: "Polygon",
116
- rpcUrls: [
117
- "https://polygon-rpc.com"
118
- ],
119
- nativeCurrency: {
120
- name: "MATIC",
121
- symbol: "MATIC",
122
- decimals: 18
123
- },
124
- blockExplorerUrls: [
125
- "https://polygonscan.com/"
126
- ]
127
- }
128
- };
129
- let $a47e48dd2c04791b$export$1f05a55fe0680cc7;
130
- (function(NetworkFilterTypes) {
131
- NetworkFilterTypes["ALL"] = "all";
132
- })($a47e48dd2c04791b$export$1f05a55fe0680cc7 || ($a47e48dd2c04791b$export$1f05a55fe0680cc7 = {}));
133
-
134
-
135
- let $08d5ddc39acd6833$export$fd9b17d87f4121d2;
136
- (function(TokenFilterTypes) {
137
- TokenFilterTypes["SWAP"] = "swap";
138
- TokenFilterTypes["BRIDGE"] = "bridge";
139
- TokenFilterTypes["ALL"] = "all";
140
- })($08d5ddc39acd6833$export$fd9b17d87f4121d2 || ($08d5ddc39acd6833$export$fd9b17d87f4121d2 = {}));
141
-
142
-
143
-
144
-
145
- const $4f91c5f280efe242$export$a130407f3423b97d = {
146
- CHECK_CONNECTION: "eth_accounts",
147
- CONNECT: "eth_requestAccounts",
148
- ADD_NETWORK: "wallet_addEthereumChain",
149
- SWITCH_NETWORK: "wallet_switchEthereumChain"
150
- };
151
- let $4f91c5f280efe242$export$a75605c67ea83a5a;
152
- (function(WalletFilterTypes) {
153
- WalletFilterTypes["ALL"] = "all";
154
- WalletFilterTypes["DESKTOP"] = "desktop";
155
- WalletFilterTypes["MOBILE"] = "mobile";
156
- })($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
157
-
158
-
159
- let $090d3502d165f17d$export$c5ab8fbcabac8c11;
160
- (function(SupportedFiatCurrencies) {
161
- SupportedFiatCurrencies["USD"] = "USD";
162
- })($090d3502d165f17d$export$c5ab8fbcabac8c11 || ($090d3502d165f17d$export$c5ab8fbcabac8c11 = {}));
163
-
164
-
165
-
166
-
167
- /**
168
- * The different types of errors that can be returned by the checkout process.
169
- */ let $a8bc256d81a5e2c1$export$e3dc0620abde7f5a;
170
- (function(CheckoutErrorType) {
171
- CheckoutErrorType["PROVIDER_PREFERENCE_ERROR"] = "PROVIDER_PREFERENCE_ERROR";
172
- CheckoutErrorType["CONNECT_PROVIDER_ERROR"] = "CONNECT_PROVIDER_ERROR";
173
- CheckoutErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
174
- CheckoutErrorType["GET_ERC20_BALANCE_ERROR"] = "GET_ERC20_BALANCE_ERROR";
175
- CheckoutErrorType["GET_NETWORK_INFO_ERROR"] = "GET_NETWORK_INFO_ERROR";
176
- CheckoutErrorType["METAMASK_PROVIDER_ERROR"] = "METAMASK_PROVIDER_ERROR";
177
- CheckoutErrorType["CHAIN_NOT_SUPPORTED_ERROR"] = "CHAIN_NOT_SUPPORTED_ERROR";
178
- CheckoutErrorType["PROVIDER_REQUEST_MISSING_ERROR"] = "PROVIDER_REQUEST_MISSING_ERROR";
179
- CheckoutErrorType["PROVIDER_REQUEST_FAILED_ERROR"] = "PROVIDER_REQUEST_FAILED_ERROR";
180
- CheckoutErrorType["USER_REJECTED_REQUEST_ERROR"] = "USER_REJECTED_REQUEST_ERROR";
181
- CheckoutErrorType["TRANSACTION_ERROR"] = "TRANSACTION_ERROR";
182
- CheckoutErrorType["FIAT_CONVERSION_ERROR"] = "FIAT_CONVERSION_ERROR";
183
- CheckoutErrorType["TOKEN_NOT_SUPPORTED_ERROR"] = "TOKEN_NOT_SUPPORTED_ERROR";
184
- CheckoutErrorType["FIAT_CURRENCY_NOT_SUPPORTED_ERROR"] = "FIAT_CURRENCY_NOT_SUPPORTED_ERROR";
185
- })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
186
- class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
187
- constructor(message, type, data){
188
- super(message);
189
- this.message = message;
190
- this.type = type;
191
- this.data = data;
192
- }
193
- }
194
- let $a8bc256d81a5e2c1$export$a22d4e0719ee6def;
195
- (function(CheckoutInternalErrorType) {
196
- CheckoutInternalErrorType["REJECTED_SWITCH_AFTER_ADDING_NETWORK"] = "REJECTED_SWITCH_AFTER_ADDING_NETWORK";
197
- })($a8bc256d81a5e2c1$export$a22d4e0719ee6def || ($a8bc256d81a5e2c1$export$a22d4e0719ee6def = {}));
198
- const $a8bc256d81a5e2c1$export$bacc563de539c6c3 = async (fn, customError)=>{
199
- try {
200
- return await fn();
201
- } catch (error) {
202
- const cause = `${error.message}` || "UnknownError";
203
- const errorMessage = customError.message ? `[${customError.type}]:${customError.message}. Cause:${cause}` : `[${customError.type}] Cause:${cause}`;
204
- if (error instanceof $a8bc256d81a5e2c1$export$b722478a3cbfa3bc) throw new $a8bc256d81a5e2c1$export$b722478a3cbfa3bc(errorMessage, customError.type, {
205
- ...customError.data,
206
- innerErrorType: error.type,
207
- ...error.data
208
- });
209
- throw new $a8bc256d81a5e2c1$export$b722478a3cbfa3bc(errorMessage, customError.type, {
210
- ...customError.data
211
- });
212
- }
213
- };
214
-
215
-
216
-
217
-
218
- /* eslint-disable @typescript-eslint/no-explicit-any */
219
-
220
- /* eslint-disable @typescript-eslint/no-explicit-any */
221
-
222
-
223
-
224
- async function $c99672cf2294e839$export$2d040992269b4717(providerPreference) {
225
- const provider = await $c99672cf2294e839$var$getWalletProviderForPreference(providerPreference);
226
- if (!provider.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Incompatible provider", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR, {
227
- details: `Unsupported provider for ${providerPreference}`
228
- });
229
- let accounts = [];
230
- try {
231
- accounts = await provider.provider.request({
232
- method: (0, $4f91c5f280efe242$export$a130407f3423b97d).CHECK_CONNECTION,
233
- params: []
234
- });
235
- } catch (err) {
236
- throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Check wallet connection request failed`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_FAILED_ERROR, {
237
- rpcMethod: ($4f91c5f280efe242$export$a130407f3423b97d).CHECK_CONNECTION
238
- });
239
- }
240
- // accounts[0] will have the active account if connected.
241
- return {
242
- isConnected: accounts && accounts.length > 0,
243
- walletAddress: accounts[0] ?? ""
244
- };
245
- }
246
- async function $c99672cf2294e839$export$fba2f6c3656e07c1(params) {
247
- const web3Provider = await $c99672cf2294e839$var$getWalletProviderForPreference(params.providerPreference);
248
- await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
249
- if (!web3Provider || !web3Provider?.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Incompatible provider", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR, {
250
- details: `Unsupported provider for ${params.providerPreference}`
251
- });
252
- // this makes the request to the wallet to connect i.e request eth accounts ('eth_requestAccounts')
253
- await web3Provider.provider.request({
254
- method: ($4f91c5f280efe242$export$a130407f3423b97d).CONNECT,
255
- params: []
256
- });
257
- }, {
258
- type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR
259
- });
260
- return web3Provider;
261
- }
262
- async function $c99672cf2294e839$var$getWalletProviderForPreference(providerPreference) {
263
- let web3Provider = null;
264
- switch(providerPreference){
265
- case ($d176a05e966364ba$export$3bfad4d03ada24c4).METAMASK:
266
- web3Provider = await $c99672cf2294e839$var$getMetaMaskProvider();
267
- break;
268
- default:
269
- throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Provider preference is not supported", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_PREFERENCE_ERROR);
270
- }
271
- return web3Provider;
272
- }
273
- async function $c99672cf2294e839$var$getMetaMaskProvider() {
274
- const provider = await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
275
- return await ($7v2Z6$metamaskdetectprovider)();
276
- }, {
277
- type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).METAMASK_PROVIDER_ERROR
278
- });
279
- if (!provider || !provider.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("No MetaMask provider installed.", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).METAMASK_PROVIDER_ERROR);
280
- return new (Web3Provider)(provider);
281
- }
282
-
283
-
284
- var $497c134ecbc8a50f$exports = {};
285
- $497c134ecbc8a50f$exports = JSON.parse('[{"chainId":1},{"chainId":137}]');
286
-
287
-
288
- const $de192de6ef100f9f$var$UNRECOGNISED_CHAIN_ERROR_CODE = 4902; // error code (MetaMask)
289
- async function $de192de6ef100f9f$export$79f13b4cfaaf0d09(provider) {
290
- return ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
291
- const network = await provider.getNetwork();
292
- if (!Object.values(($a47e48dd2c04791b$export$c06e1e7429de6283)).includes(network.chainId)) // return empty details
293
- return {
294
- chainId: network.chainId,
295
- name: network.name,
296
- isSupported: false
297
- };
298
- const chainIdNetworkInfo = ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[network.chainId];
299
- return {
300
- name: chainIdNetworkInfo.chainName,
301
- chainId: parseInt(chainIdNetworkInfo.chainIdHex, 16),
302
- nativeCurrency: chainIdNetworkInfo.nativeCurrency,
303
- isSupported: true
304
- };
305
- }, {
306
- type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_NETWORK_INFO_ERROR
307
- });
308
- }
309
- async function $de192de6ef100f9f$export$b827d9418aeb5dbd(providerPreference, provider, chainId) {
310
- let currentProvider = provider;
311
- if (!Object.values(($a47e48dd2c04791b$export$c06e1e7429de6283)).includes(chainId)) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${chainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR);
312
- if (!currentProvider || !currentProvider.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Incompatible provider", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR, {
313
- details: `Unsupported provider`
314
- });
315
- // WT-1146 - Refer to the README in this folder for explantion on the switch network flow
316
- try {
317
- await $de192de6ef100f9f$var$switchNetworkInWallet(currentProvider, chainId);
318
- } catch (err) {
319
- if (err.code === $de192de6ef100f9f$var$UNRECOGNISED_CHAIN_ERROR_CODE) try {
320
- await $de192de6ef100f9f$var$addNetworkToWallet(currentProvider, chainId);
321
- } catch (err) {
322
- throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("User cancelled add network request", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
323
- }
324
- else throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("User cancelled switch network request", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
325
- }
326
- currentProvider = await ($c99672cf2294e839$export$fba2f6c3656e07c1)({
327
- providerPreference: providerPreference
328
- });
329
- if ((await currentProvider.getNetwork()).chainId !== chainId) // user didn't actually switch
330
- throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("User cancelled switch network request", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).USER_REJECTED_REQUEST_ERROR);
331
- // we can assume that if the above succeeds then user has successfully
332
- // switched to the network specified
333
- const newNetwork = ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId];
334
- return {
335
- network: {
336
- name: newNetwork.chainName,
337
- chainId: parseInt(newNetwork.chainIdHex, 16),
338
- nativeCurrency: newNetwork.nativeCurrency
339
- },
340
- provider: currentProvider
341
- };
342
- }
343
- async function $de192de6ef100f9f$export$3043f6442a9ef563({ type: type = ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL , exclude: exclude }) {
344
- const list = ((/*@__PURE__*/$parcel$interopDefault($497c134ecbc8a50f$exports))).filter((network)=>{
345
- const allowAllTokens = type === ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL;
346
- const networkNotExcluded = !(exclude || []).map((exc)=>exc.chainId).includes(network.chainId);
347
- return allowAllTokens && networkNotExcluded;
348
- });
349
- const allowedNetworks = [];
350
- list.forEach((element)=>{
351
- const newNetwork = ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[element.chainId];
352
- allowedNetworks.push({
353
- name: newNetwork.chainName,
354
- chainId: parseInt(newNetwork.chainIdHex, 16),
355
- nativeCurrency: newNetwork.nativeCurrency,
356
- isSupported: true
357
- });
358
- });
359
- return {
360
- networks: allowedNetworks
361
- };
362
- }
363
- // these functions should not be exported. These functions should be used as part of an exported function e.g switchWalletNetwork() above.
364
- // make sure to check if(provider.provider?.request) in the exported function and throw an error
365
- async function $de192de6ef100f9f$var$switchNetworkInWallet(provider, chainId) {
366
- if (provider.provider?.request) return await provider.provider.request({
367
- method: ($4f91c5f280efe242$export$a130407f3423b97d).SWITCH_NETWORK,
368
- params: [
369
- {
370
- chainId: ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId].chainIdHex
371
- }
372
- ]
373
- });
374
- }
375
- async function $de192de6ef100f9f$var$addNetworkToWallet(provider, chainId) {
376
- if (provider.provider?.request) {
377
- const addNetwork = {
378
- chainId: ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId].chainIdHex,
379
- chainName: ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId].chainName,
380
- rpcUrls: ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId].rpcUrls,
381
- nativeCurrency: ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId].nativeCurrency,
382
- blockExplorerUrls: ($a47e48dd2c04791b$export$f61f4aaec62f6be9)[chainId].blockExplorerUrls
383
- };
384
- return await provider.provider.request({
385
- method: ($4f91c5f280efe242$export$a130407f3423b97d).ADD_NETWORK,
386
- params: [
387
- addNetwork
388
- ]
389
- });
390
- }
391
- }
392
-
393
-
394
-
395
-
396
-
397
- var $cda6003506e4182e$exports = {};
398
- $cda6003506e4182e$exports = 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\"]}]");
399
-
400
-
401
- const $efe60cea83bfc4e8$var$filterTokenList = function({ type: type , chainId: chainId , exclude: exclude }) {
402
- return ((/*@__PURE__*/$parcel$interopDefault($cda6003506e4182e$exports))).filter((token)=>{
403
- const skipChainIdCheck = !chainId;
404
- const chainIdMatches = token.chainId == chainId;
405
- const tokenNotExcluded = !exclude?.map((excludeToken)=>excludeToken.address).includes(token.address || "");
406
- const allowAllTokens = type === ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL;
407
- const tokenAllowedForType = token.tokenFeatures.includes(type);
408
- return (skipChainIdCheck || chainIdMatches) && tokenNotExcluded && (allowAllTokens || tokenAllowedForType);
409
- });
410
- };
411
- const $efe60cea83bfc4e8$export$473cec51305fdae8 = async function({ type: type = ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL , chainId: chainId , exclude: exclude }) {
412
- // todo:For API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
413
- const filteredTokenList = $efe60cea83bfc4e8$var$filterTokenList({
414
- type: type,
415
- chainId: chainId,
416
- exclude: exclude
417
- }).map((token)=>{
418
- const { chainId: chainId , tokenFeatures: tokenFeatures , ...tokenInfo } = token;
419
- return tokenInfo;
420
- });
421
- return {
422
- tokens: filteredTokenList
423
- };
424
- };
425
-
426
-
427
-
428
-
429
- const $1564e43dde50bb61$export$df96cd8d56be0ab1 = async (provider, walletAddress)=>{
430
- return await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
431
- const networkInfo = await ($de192de6ef100f9f$export$79f13b4cfaaf0d09)(provider);
432
- if (!networkInfo.isSupported) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${networkInfo.chainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR, {
433
- chainName: networkInfo.name
434
- });
435
- const balance = await provider.getBalance(walletAddress);
436
- return {
437
- balance: balance,
438
- formattedBalance: (utils).formatUnits(balance, networkInfo.nativeCurrency.decimals),
439
- token: networkInfo.nativeCurrency
440
- };
441
- }, {
442
- type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_BALANCE_ERROR
443
- });
444
- };
445
- async function $1564e43dde50bb61$export$60e0fe116a0e6ed0(provider, walletAddress, contractAddress) {
446
- return await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
447
- const contract = new (Contract)(contractAddress, JSON.stringify(($762782b6c862d954$export$db5daa1b5156ccfe)), provider);
448
- const name = await contract.name();
449
- const symbol = await contract.symbol();
450
- const balance = await contract.balanceOf(walletAddress);
451
- const decimals = await contract.decimals();
452
- const formattedBalance = (utils).formatUnits(balance, decimals);
453
- return {
454
- balance: balance,
455
- formattedBalance: formattedBalance,
456
- token: {
457
- name: name,
458
- symbol: symbol,
459
- decimals: decimals,
460
- address: contractAddress
461
- }
462
- };
463
- }, {
464
- type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC20_BALANCE_ERROR
465
- });
466
- }
467
- const $1564e43dde50bb61$export$fee49741664a4d7e = async (provider, walletAddress, chainId)=>{
468
- if (!Object.values(($a47e48dd2c04791b$export$c06e1e7429de6283)).includes(chainId)) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`ChainId ${chainId} is not supported`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR);
469
- if (!provider.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("provider object is missing request function", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR);
470
- const tokenList = await ($efe60cea83bfc4e8$export$473cec51305fdae8)({
471
- type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
472
- chainId: chainId
473
- });
474
- const allBalancePromises = [];
475
- allBalancePromises.push($1564e43dde50bb61$export$df96cd8d56be0ab1(provider, walletAddress));
476
- tokenList.tokens.filter((token)=>token.address).forEach((token)=>allBalancePromises.push($1564e43dde50bb61$export$60e0fe116a0e6ed0(provider, walletAddress, token.address ?? "")));
477
- const balanceResults = await Promise.allSettled(allBalancePromises);
478
- const getBalanceResults = balanceResults.filter((result)=>result.status === "fulfilled").map((fulfilledResult)=>fulfilledResult.value);
479
- return {
480
- balances: getBalanceResults
481
- };
482
- };
483
-
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
- var $6f3c55a615003cbf$exports = {};
493
- $6f3c55a615003cbf$exports = 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"]}]');
494
-
495
-
496
- async function $5cdde2ffe6360fec$export$a822caa90d7eef09({ type: type = ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL , exclude: exclude }) {
497
- // todo:For async API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
498
- const filteredWalletsList = ((/*@__PURE__*/$parcel$interopDefault($6f3c55a615003cbf$exports))).filter((wallet)=>{
499
- const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.connectionProvider).includes(wallet.connectionProvider);
500
- const allowAllWallets = type === ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL;
501
- const walletsAllowedForType = wallet.platform.includes(type);
502
- return walletNotExcluded && (allowAllWallets || walletsAllowedForType);
503
- }).map((wallet)=>{
504
- const { platform: platform , ...walletInfo } = wallet;
505
- return walletInfo;
506
- });
507
- return {
508
- wallets: filteredWalletsList
509
- };
510
- }
511
-
512
-
513
-
514
-
515
-
516
-
517
- const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (params)=>{
518
- const { provider: provider , transaction: transaction } = params;
519
- return await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
520
- const transactionResponse = await provider.getSigner().sendTransaction(transaction);
521
- return {
522
- transactionResponse: transactionResponse
523
- };
524
- }, {
525
- type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).TRANSACTION_ERROR
526
- });
527
- };
528
-
529
-
530
-
531
-
532
-
533
- class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
534
- /**
535
- * Check if a wallet is connected to the current application without requesting permission from the wallet and hence triggering a connect popup.
536
- * @param {CheckConnectionParams} params - The necessary data required to verify a wallet connection status.
537
- * @returns Wallet connection status details.
538
- * @throws {@link ErrorType}
539
- */ async checkIsWalletConnected(params) {
540
- return $c99672cf2294e839$export$2d040992269b4717(params.providerPreference);
541
- }
542
- /**
543
- * Establish a connection with a wallet provider such as MetaMask and returns the provider object and the current network details.
544
- * @param {ConnectParams} params - The necessary data required to establish a connection with a wallet provider.
545
- * @returns Wallet provider and current network information.
546
- * @throws {@link ErrorType}
547
- */ async connect(params) {
548
- this.providerPreference = params.providerPreference;
549
- const provider = await $c99672cf2294e839$export$fba2f6c3656e07c1(params);
550
- const networkInfo = await $de192de6ef100f9f$export$79f13b4cfaaf0d09(provider);
551
- return {
552
- provider: provider,
553
- network: networkInfo
554
- };
555
- }
556
- /**
557
- * Switch the currently connected wallet to a new network.
558
- * @param {SwitchNetworkParams} params - The necessary data required to switch network.
559
- * @returns The new network information.
560
- * @throws {@link ErrorType}
561
- */ async switchNetwork(params) {
562
- if (!this.providerPreference) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`connect should be called before switchNetwork to set the provider preference`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_PREFERENCE_ERROR);
563
- return await $de192de6ef100f9f$export$b827d9418aeb5dbd(this.providerPreference, params.provider, params.chainId);
564
- }
565
- /**
566
- * Fetch the balance of the native token of the current connected network or, if a contract address is provided, it will return the balance of that ERC20 token. For example, if the wallet is connected to the Ethereum Mainnet then the function gets the wallet ETH L1 balance.
567
- * @param {GetBalanceParams} params - The necessary data required to fetch the wallet balance.
568
- * @returns Native token balance for the given wallet.
569
- * @throws {@link ErrorType}
570
- */ async getBalance(params) {
571
- if (!params.contractAddress || params.contractAddress === "") return await $1564e43dde50bb61$export$df96cd8d56be0ab1(params.provider, params.walletAddress);
572
- return await $1564e43dde50bb61$export$60e0fe116a0e6ed0(params.provider, params.walletAddress, params.contractAddress);
573
- }
574
- /**
575
- * Fetch all available balances (ERC20 & Native) of the current connected network of the given wallet. It will loop through the list of allowed tokens and check for balance on each one.
576
- * @param {GetAllBalancesParams} params - The necessary data required to fetch all the wallet balances.
577
- * @returns List of tokens balance for the given wallet.
578
- * @throws {@link ErrorType}
579
- */ async getAllBalances(params) {
580
- return $1564e43dde50bb61$export$fee49741664a4d7e(params.provider, params.walletAddress, params.chainId);
581
- }
582
- /**
583
- * Fetch the list of available networks that a wallet can add or/and switch to.
584
- * @param {GetNetworkAllowListParams} params - The necessary data required to fetch the list of available networks.
585
- * @returns List of networks.
586
- * @throws {@link ErrorType}
587
- */ async getNetworkAllowList(params) {
588
- return await $de192de6ef100f9f$export$3043f6442a9ef563(params);
589
- }
590
- /**
591
- * Get the list of tokens which are allowed to be used with the product.
592
- * @param {GetTokenAllowListParams} params - The necessary data required to fetch the list of allowed tokens.
593
- * @returns List of allowed tokens.
594
- * @throws {@link ErrorType}
595
- */ async getTokenAllowList(params) {
596
- return await $efe60cea83bfc4e8$export$473cec51305fdae8(params);
597
- }
598
- /**
599
- * Fetch the list of wallets which are available to connect with.
600
- * @param {GetWalletAllowListParams} params - The necessary data required to fetch the list of allowed wallets.
601
- * @returns List of allowed wallets.
602
- * @throws {@link ErrorType}
603
- */ async getWalletAllowList(params) {
604
- return await $5cdde2ffe6360fec$export$a822caa90d7eef09(params);
605
- }
606
- /**
607
- * Send a generic transaction to the provider.
608
- * @param {SendTransactionParams} params - The necessary data required to send a transaction.
609
- * @returns Transaction response.
610
- * @throws {@link ErrorType}
611
- * @remarks
612
- * Further documenation can be found at [MetaMask | Sending Transactions](https://docs.metamask.io/guide/sending-transactions.html).
613
- */ async sendTransaction(params) {
614
- return await $dbe95599a4661140$export$8e0e7ffc78696d30(params);
615
- }
616
- /**
617
- * Get network information about the currently selected network.
618
- * @param {GetNetworkParams} params - The necessary data required to get the current network information.
619
- * @returns Network details.
620
- * @throws {@link ErrorType}
621
- */ async getNetworkInfo(params) {
622
- return await $de192de6ef100f9f$export$79f13b4cfaaf0d09(params.provider);
623
- }
624
- }
625
-
626
- export { $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $090d3502d165f17d$export$c5ab8fbcabac8c11 as SupportedFiatCurrencies, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes };