@imtbl/sdk 0.0.1-alpha → 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.
- package/dist/base.d.ts +119 -14
- package/dist/base.js +20 -8
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +1 -33
- package/dist/checkout_sdk.js +63 -66
- package/dist/checkout_widgets.d.ts +1 -3
- package/dist/checkout_widgets.js +11 -16
- package/dist/index.cjs +216 -226
- package/dist/index.d.ts +39 -96
- package/dist/index.js +216 -227
- package/dist/passport.d.ts +14 -40
- package/dist/passport.js +91 -95
- package/dist/provider.d.ts +20 -36
- package/dist/provider.js +55 -66
- package/dist/starkex.d.ts +40 -6
- package/dist/starkex.js +1 -1
- package/package.json +2 -11
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config as Config$1, ImmutableX, TransfersApi, OrdersApi, UsersApi, Contracts, TradesApi, ExchangesApi, WithdrawalsApi, MintsApi, DepositsApi, EncodingApi, TokensApi, Configuration as Configuration$1, generateLegacyStarkPrivateKey, createStarkSigner } from '@imtbl/core-sdk';
|
|
2
2
|
import BN from 'bn.js';
|
|
3
3
|
import * as encUtils from 'enc-utils';
|
|
4
4
|
import { parseUnits } from '@ethersproject/units';
|
|
@@ -12,21 +12,31 @@ import { Web3Provider } from '@ethersproject/providers';
|
|
|
12
12
|
|
|
13
13
|
var Environment;
|
|
14
14
|
(function (Environment) {
|
|
15
|
-
Environment["
|
|
15
|
+
Environment["DEVELOPMENT"] = "development";
|
|
16
16
|
Environment["SANDBOX"] = "sandbox";
|
|
17
|
+
Environment["PRODUCTION"] = "production";
|
|
17
18
|
})(Environment || (Environment = {}));
|
|
18
|
-
class
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
class Configuration {
|
|
20
|
+
starkExConfig;
|
|
21
|
+
constructor(config) {
|
|
22
|
+
this.starkExConfig = config;
|
|
23
|
+
}
|
|
24
|
+
getStarkExConfig() {
|
|
25
|
+
return this.starkExConfig;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
28
|
+
const PRODUCTION = {
|
|
29
|
+
...Config$1.PRODUCTION,
|
|
30
|
+
env: Environment.PRODUCTION,
|
|
31
|
+
};
|
|
32
|
+
const SANDBOX = {
|
|
33
|
+
...Config$1.SANDBOX,
|
|
34
|
+
env: Environment.SANDBOX,
|
|
35
|
+
};
|
|
26
36
|
|
|
27
37
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
28
38
|
const StarkExAPIFactory = (config) => {
|
|
29
|
-
const imtblClient = new ImmutableX(config.
|
|
39
|
+
const imtblClient = new ImmutableX(config.getStarkExConfig());
|
|
30
40
|
const { deposit, registerOffchain, isRegisteredOnchain, prepareWithdrawal, completeWithdrawal, createOrder, cancelOrder, createTrade, transfer, batchNftTransfer, ...StarkEx } = imtblClient;
|
|
31
41
|
return { ...StarkEx };
|
|
32
42
|
};
|
|
@@ -111,9 +121,9 @@ async function validateChain(signer, config) {
|
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
async function transfer$1({ signers: { ethSigner, starkExSigner }, request, config, }) {
|
|
114
|
-
await validateChain(ethSigner, config.
|
|
124
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
115
125
|
const ethAddress = await ethSigner.getAddress();
|
|
116
|
-
const transfersApi = new TransfersApi(config.
|
|
126
|
+
const transfersApi = new TransfersApi(config.getStarkExConfig().apiConfiguration);
|
|
117
127
|
const transferAmount = request.type === 'ERC721' ? '1' : request.amount;
|
|
118
128
|
const signableResult = await transfersApi.getSignableTransferV1({
|
|
119
129
|
getSignableTransferRequest: {
|
|
@@ -151,9 +161,9 @@ async function transfer$1({ signers: { ethSigner, starkExSigner }, request, conf
|
|
|
151
161
|
};
|
|
152
162
|
}
|
|
153
163
|
async function batchTransfer({ signers: { ethSigner, starkExSigner }, request, config, }) {
|
|
154
|
-
await validateChain(ethSigner, config.
|
|
164
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
155
165
|
const ethAddress = await ethSigner.getAddress();
|
|
156
|
-
const transfersApi = new TransfersApi(config.
|
|
166
|
+
const transfersApi = new TransfersApi(config.getStarkExConfig().apiConfiguration);
|
|
157
167
|
const signableRequests = request.map((nftTransfer) => {
|
|
158
168
|
return {
|
|
159
169
|
amount: '1',
|
|
@@ -207,9 +217,9 @@ async function batchTransfer({ signers: { ethSigner, starkExSigner }, request, c
|
|
|
207
217
|
}
|
|
208
218
|
|
|
209
219
|
async function createOrder$1({ signers, request, config, }) {
|
|
210
|
-
await validateChain(signers.ethSigner, config.
|
|
220
|
+
await validateChain(signers.ethSigner, config.getStarkExConfig());
|
|
211
221
|
const ethAddress = await signers.ethSigner.getAddress();
|
|
212
|
-
const ordersApi = new OrdersApi(config.
|
|
222
|
+
const ordersApi = new OrdersApi(config.getStarkExConfig().apiConfiguration);
|
|
213
223
|
const amountSell = request.sell.type === 'ERC721' ? '1' : request.sell.amount;
|
|
214
224
|
const amountBuy = request.buy.type === 'ERC721' ? '1' : request.buy.amount;
|
|
215
225
|
const getSignableOrderRequest = {
|
|
@@ -252,7 +262,7 @@ async function createOrder$1({ signers, request, config, }) {
|
|
|
252
262
|
};
|
|
253
263
|
}
|
|
254
264
|
async function cancelOrder$1({ signers, request, config, }) {
|
|
255
|
-
const ordersApi = new OrdersApi(config.
|
|
265
|
+
const ordersApi = new OrdersApi(config.getStarkExConfig().apiConfiguration);
|
|
256
266
|
const getSignableCancelOrderResponse = await ordersApi.getSignableCancelOrder({
|
|
257
267
|
getSignableCancelOrderRequest: {
|
|
258
268
|
order_id: request.order_id,
|
|
@@ -278,8 +288,8 @@ async function cancelOrder$1({ signers, request, config, }) {
|
|
|
278
288
|
}
|
|
279
289
|
|
|
280
290
|
async function registerOffchain(signers, config) {
|
|
281
|
-
await validateChain(signers.ethSigner, config.
|
|
282
|
-
const usersApi = new UsersApi(config.
|
|
291
|
+
await validateChain(signers.ethSigner, config.getStarkExConfig());
|
|
292
|
+
const usersApi = new UsersApi(config.getStarkExConfig().apiConfiguration);
|
|
283
293
|
const userAddress = await signers.ethSigner.getAddress();
|
|
284
294
|
const starkPublicKey = await signers.starkExSigner.getAddress();
|
|
285
295
|
const signableResult = await usersApi.getSignableRegistrationOffchain({
|
|
@@ -302,8 +312,8 @@ async function registerOffchain(signers, config) {
|
|
|
302
312
|
return registeredUser.data;
|
|
303
313
|
}
|
|
304
314
|
async function isRegisteredOnChain(starkPublicKey, ethSigner, config) {
|
|
305
|
-
await validateChain(ethSigner, config.
|
|
306
|
-
const registrationContract = Contracts.Registration.connect(config.
|
|
315
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
316
|
+
const registrationContract = Contracts.Registration.connect(config.getStarkExConfig().ethConfiguration.registrationContractAddress, ethSigner);
|
|
307
317
|
try {
|
|
308
318
|
return await registrationContract.isRegistered(starkPublicKey);
|
|
309
319
|
}
|
|
@@ -378,10 +388,10 @@ async function getEncodeAssetInfo(assetType, tokenType, config, tokenData) {
|
|
|
378
388
|
|
|
379
389
|
async function executeRegisterAndWithdrawERC20({ ethSigner, assetType, starkPublicKey, config, }) {
|
|
380
390
|
const etherKey = await ethSigner.getAddress();
|
|
381
|
-
const starkExConfig = config.
|
|
391
|
+
const starkExConfig = config.getStarkExConfig();
|
|
382
392
|
const usersApi = new UsersApi(starkExConfig.apiConfiguration);
|
|
383
393
|
const signableResult = await getSignableRegistrationOnchain(etherKey, starkPublicKey, usersApi);
|
|
384
|
-
const contract = Contracts.Registration.connect(config.
|
|
394
|
+
const contract = Contracts.Registration.connect(config.getStarkExConfig().ethConfiguration.registrationContractAddress, ethSigner);
|
|
385
395
|
const populatedTransaction = await contract.populateTransaction.registerAndWithdraw(etherKey, starkPublicKey, signableResult.operator_signature, assetType);
|
|
386
396
|
return ethSigner.sendTransaction(populatedTransaction);
|
|
387
397
|
}
|
|
@@ -391,8 +401,8 @@ async function executeWithdrawERC20(ethSigner, assetType, starkPublicKey, config
|
|
|
391
401
|
return ethSigner.sendTransaction(populatedTransaction);
|
|
392
402
|
}
|
|
393
403
|
async function completeERC20WithdrawalAction({ ethSigner, starkPublicKey, token, config, }) {
|
|
394
|
-
await validateChain(ethSigner, config.
|
|
395
|
-
const starkExConfig = config.
|
|
404
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
405
|
+
const starkExConfig = config.getStarkExConfig();
|
|
396
406
|
const assetType = await getEncodeAssetInfo('asset', 'ERC20', starkExConfig, {
|
|
397
407
|
token_address: token.tokenAddress,
|
|
398
408
|
});
|
|
@@ -429,7 +439,7 @@ function getMintingBlob(token) {
|
|
|
429
439
|
return encUtils.sanitizeHex(encUtils.utf8ToHex(`{${id}}:{${blueprint}}`));
|
|
430
440
|
}
|
|
431
441
|
async function completeMintableERC721Withdrawal(ethSigner, starkPublicKey, token, config) {
|
|
432
|
-
const starkExConfig = config.
|
|
442
|
+
const starkExConfig = config.getStarkExConfig();
|
|
433
443
|
const assetType = await getEncodeAssetInfo('mintable-asset', 'ERC721', starkExConfig, {
|
|
434
444
|
id: token.data.id,
|
|
435
445
|
token_address: token.data.tokenAddress,
|
|
@@ -458,7 +468,7 @@ async function executeWithdrawERC721(ethSigner, assetType, starkPublicKey, token
|
|
|
458
468
|
return ethSigner.sendTransaction(populatedTransaction);
|
|
459
469
|
}
|
|
460
470
|
async function completeERC721Withdrawal(ethSigner, starkPublicKey, token, config) {
|
|
461
|
-
const starkExConfig = config.
|
|
471
|
+
const starkExConfig = config.getStarkExConfig();
|
|
462
472
|
const assetType = await getEncodeAssetInfo('asset', 'ERC721', starkExConfig, {
|
|
463
473
|
token_id: token.tokenId,
|
|
464
474
|
token_address: token.tokenAddress,
|
|
@@ -472,10 +482,10 @@ async function completeERC721Withdrawal(ethSigner, starkPublicKey, token, config
|
|
|
472
482
|
}
|
|
473
483
|
}
|
|
474
484
|
async function completeERC721WithdrawalAction({ ethSigner, starkPublicKey, token, config, }) {
|
|
475
|
-
await validateChain(ethSigner, config.
|
|
485
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
476
486
|
const tokenAddress = token.tokenAddress;
|
|
477
487
|
const tokenId = token.tokenId;
|
|
478
|
-
const starkExConfig = config.
|
|
488
|
+
const starkExConfig = config.getStarkExConfig();
|
|
479
489
|
const mintsApi = new MintsApi(starkExConfig.apiConfiguration);
|
|
480
490
|
return await mintsApi
|
|
481
491
|
.getMintableTokenDetailsByClientTokenId({
|
|
@@ -513,8 +523,8 @@ async function executeWithdrawEth(ethSigner, assetType, starkPublicKey, config)
|
|
|
513
523
|
return ethSigner.sendTransaction(populatedTransaction);
|
|
514
524
|
}
|
|
515
525
|
async function completeEthWithdrawalAction({ ethSigner, starkPublicKey, config, }) {
|
|
516
|
-
await validateChain(ethSigner, config.
|
|
517
|
-
const starkExConfig = config.
|
|
526
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
527
|
+
const starkExConfig = config.getStarkExConfig();
|
|
518
528
|
const assetType = await getEncodeAssetInfo('asset', 'ETH', starkExConfig);
|
|
519
529
|
const isRegistered = await isRegisteredOnChain(starkPublicKey, ethSigner, config);
|
|
520
530
|
if (!isRegistered) {
|
|
@@ -526,9 +536,10 @@ async function completeEthWithdrawalAction({ ethSigner, starkPublicKey, config,
|
|
|
526
536
|
}
|
|
527
537
|
|
|
528
538
|
async function prepareWithdrawal({ signers, withdrawal, config, }) {
|
|
539
|
+
const starkExConfig = config.getStarkExConfig();
|
|
529
540
|
return prepareWithdrawalAction({
|
|
530
541
|
signers,
|
|
531
|
-
config:
|
|
542
|
+
config: starkExConfig,
|
|
532
543
|
...withdrawal,
|
|
533
544
|
});
|
|
534
545
|
}
|
|
@@ -554,9 +565,9 @@ async function completeWithdrawal({ signers: { ethSigner }, starkPublicKey, toke
|
|
|
554
565
|
}
|
|
555
566
|
|
|
556
567
|
async function createTrade$1({ signers: { ethSigner, starkExSigner }, request, config, }) {
|
|
557
|
-
await validateChain(ethSigner, config.
|
|
568
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
558
569
|
const ethAddress = await ethSigner.getAddress();
|
|
559
|
-
const tradesApi = new TradesApi(config.
|
|
570
|
+
const tradesApi = new TradesApi(config.getStarkExConfig().apiConfiguration);
|
|
560
571
|
const signableResult = await tradesApi.getSignableTrade({
|
|
561
572
|
getSignableTradeRequest: {
|
|
562
573
|
user: ethAddress,
|
|
@@ -591,13 +602,13 @@ async function createTrade$1({ signers: { ethSigner, starkExSigner }, request, c
|
|
|
591
602
|
}
|
|
592
603
|
|
|
593
604
|
async function depositEth({ signers: { ethSigner }, deposit, config, }) {
|
|
594
|
-
await validateChain(ethSigner, config.
|
|
605
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
595
606
|
const user = await ethSigner.getAddress();
|
|
596
607
|
const data = {
|
|
597
608
|
decimals: 18,
|
|
598
609
|
};
|
|
599
610
|
const amount = parseUnits(deposit.amount, 'wei');
|
|
600
|
-
const starkExConfig = config.
|
|
611
|
+
const starkExConfig = config.getStarkExConfig();
|
|
601
612
|
const depositsApi = new DepositsApi(starkExConfig.apiConfiguration);
|
|
602
613
|
const encodingApi = new EncodingApi(starkExConfig.apiConfiguration);
|
|
603
614
|
const usersApi = new UsersApi(starkExConfig.apiConfiguration);
|
|
@@ -645,8 +656,8 @@ async function executeDepositEth(ethSigner, amount, assetType, starkPublicKey, v
|
|
|
645
656
|
}
|
|
646
657
|
|
|
647
658
|
async function depositERC20({ signers: { ethSigner }, deposit, config, }) {
|
|
648
|
-
await validateChain(ethSigner, config.
|
|
649
|
-
const { apiConfiguration, ethConfiguration } = config.
|
|
659
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
660
|
+
const { apiConfiguration, ethConfiguration } = config.getStarkExConfig();
|
|
650
661
|
const user = await ethSigner.getAddress();
|
|
651
662
|
const tokensApi = new TokensApi(apiConfiguration);
|
|
652
663
|
const depositsApi = new DepositsApi(apiConfiguration);
|
|
@@ -713,12 +724,12 @@ async function executeRegisterAndDepositERC20(ethSigner, quantizedAmount, assetT
|
|
|
713
724
|
}
|
|
714
725
|
|
|
715
726
|
async function depositERC721({ signers: { ethSigner }, deposit, config, }) {
|
|
716
|
-
await validateChain(ethSigner, config.
|
|
727
|
+
await validateChain(ethSigner, config.getStarkExConfig());
|
|
717
728
|
const user = await ethSigner.getAddress();
|
|
718
|
-
const
|
|
719
|
-
const depositsApi = new DepositsApi(
|
|
720
|
-
const encodingApi = new EncodingApi(
|
|
721
|
-
const usersApi = new UsersApi(
|
|
729
|
+
const starkExConfig = config.getStarkExConfig();
|
|
730
|
+
const depositsApi = new DepositsApi(starkExConfig.apiConfiguration);
|
|
731
|
+
const encodingApi = new EncodingApi(starkExConfig.apiConfiguration);
|
|
732
|
+
const usersApi = new UsersApi(starkExConfig.apiConfiguration);
|
|
722
733
|
const data = {
|
|
723
734
|
token_address: deposit.tokenAddress,
|
|
724
735
|
token_id: deposit.tokenId,
|
|
@@ -754,18 +765,18 @@ async function depositERC721({ signers: { ethSigner }, deposit, config, }) {
|
|
|
754
765
|
const isRegistered = await isRegisteredOnChain(starkPublicKey, ethSigner, config);
|
|
755
766
|
// Approve whether an amount of token from an account can be spent by a third-party account
|
|
756
767
|
const tokenContract = Contracts.IERC721.connect(deposit.tokenAddress, ethSigner);
|
|
757
|
-
const operator =
|
|
768
|
+
const operator = starkExConfig.ethConfiguration.coreContractAddress;
|
|
758
769
|
const isApprovedForAll = await tokenContract.isApprovedForAll(user, operator);
|
|
759
770
|
if (!isApprovedForAll) {
|
|
760
771
|
await tokenContract.setApprovalForAll(operator, true);
|
|
761
772
|
}
|
|
762
773
|
if (!isRegistered) {
|
|
763
774
|
const signableResult = await getSignableRegistrationOnchain(user, starkPublicKey, usersApi);
|
|
764
|
-
const coreContract = Contracts.Core.connect(
|
|
775
|
+
const coreContract = Contracts.Core.connect(starkExConfig.ethConfiguration.coreContractAddress, ethSigner);
|
|
765
776
|
// Note: proxy registration contract registerAndDepositNft method is not used as it currently fails erc721 transfer ownership check
|
|
766
777
|
await coreContract.registerUser(user, starkPublicKey, signableResult.operator_signature);
|
|
767
778
|
}
|
|
768
|
-
return executeDepositERC721(ethSigner, deposit.tokenId, assetType, starkPublicKey, vaultId,
|
|
779
|
+
return executeDepositERC721(ethSigner, deposit.tokenId, assetType, starkPublicKey, vaultId, starkExConfig);
|
|
769
780
|
}
|
|
770
781
|
async function executeDepositERC721(ethSigner, tokenId, assetType, starkPublicKey, vaultId, config) {
|
|
771
782
|
const coreContract = Contracts.Core.connect(config.ethConfiguration.coreContractAddress, ethSigner);
|
|
@@ -785,8 +796,8 @@ async function deposit({ signers, deposit, config }) {
|
|
|
785
796
|
}
|
|
786
797
|
|
|
787
798
|
async function exchangeTransfer$1({ signers, request, config, }) {
|
|
788
|
-
await validateChain(signers.ethSigner, config.
|
|
789
|
-
const exchangeApi = new ExchangesApi(config.
|
|
799
|
+
await validateChain(signers.ethSigner, config.getStarkExConfig());
|
|
800
|
+
const exchangeApi = new ExchangesApi(config.getStarkExConfig().apiConfiguration);
|
|
790
801
|
const ethAddress = await signers.ethSigner.getAddress();
|
|
791
802
|
const transferAmount = request.amount;
|
|
792
803
|
const signableResult = await exchangeApi.getExchangeSignableTransfer({
|
|
@@ -1009,6 +1020,7 @@ class ImxSigner {
|
|
|
1009
1020
|
|
|
1010
1021
|
const IMX_WALLET_IFRAME_ID = 'imx-wallet-app';
|
|
1011
1022
|
const IMX_WALLET_IFRAME_HOSTS = {
|
|
1023
|
+
[Environment.DEVELOPMENT]: 'http://localhost:8080',
|
|
1012
1024
|
[Environment.SANDBOX]: 'https://wallets.sandbox.immutable.com',
|
|
1013
1025
|
[Environment.PRODUCTION]: 'https://wallets.immutable.com',
|
|
1014
1026
|
};
|
|
@@ -1106,11 +1118,12 @@ class MetaMaskIMXProvider extends GenericIMXProvider {
|
|
|
1106
1118
|
super(config, ethSigner, starkExSigner);
|
|
1107
1119
|
}
|
|
1108
1120
|
static async connect(config) {
|
|
1121
|
+
const starkExConfig = config.getStarkExConfig();
|
|
1109
1122
|
return await withProviderError(async () => {
|
|
1110
1123
|
const metaMaskProvider = await connect$1({
|
|
1111
|
-
chainID:
|
|
1124
|
+
chainID: starkExConfig.ethConfiguration.chainID,
|
|
1112
1125
|
});
|
|
1113
|
-
this.imxSigner = await connect(metaMaskProvider,
|
|
1126
|
+
this.imxSigner = await connect(metaMaskProvider, starkExConfig.env);
|
|
1114
1127
|
return new MetaMaskIMXProvider(config, metaMaskProvider.getSigner(), this.imxSigner);
|
|
1115
1128
|
}, { type: ProviderErrorType.WALLET_CONNECTION_ERROR });
|
|
1116
1129
|
}
|
|
@@ -1132,29 +1145,6 @@ class MetaMaskIMXProvider extends GenericIMXProvider {
|
|
|
1132
1145
|
}
|
|
1133
1146
|
}
|
|
1134
1147
|
|
|
1135
|
-
class ProviderConfiguration {
|
|
1136
|
-
immutableXConfig;
|
|
1137
|
-
baseConfig;
|
|
1138
|
-
constructor({ baseConfig, overrides }) {
|
|
1139
|
-
this.baseConfig = baseConfig;
|
|
1140
|
-
if (overrides) {
|
|
1141
|
-
this.immutableXConfig = overrides.immutableXConfig;
|
|
1142
|
-
}
|
|
1143
|
-
else {
|
|
1144
|
-
switch (baseConfig.environment) {
|
|
1145
|
-
case Environment.SANDBOX: {
|
|
1146
|
-
this.immutableXConfig = Config.SANDBOX;
|
|
1147
|
-
break;
|
|
1148
|
-
}
|
|
1149
|
-
case Environment.PRODUCTION: {
|
|
1150
|
-
this.immutableXConfig = Config.PRODUCTION;
|
|
1151
|
-
break;
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
1148
|
var PassportErrorType;
|
|
1159
1149
|
(function (PassportErrorType) {
|
|
1160
1150
|
PassportErrorType["AUTHENTICATION_ERROR"] = "AUTHENTICATION_ERROR";
|
|
@@ -1207,17 +1197,17 @@ const retryWithDelay = async (fn, options) => {
|
|
|
1207
1197
|
}
|
|
1208
1198
|
};
|
|
1209
1199
|
|
|
1210
|
-
const getAuthConfiguration = ({ oidcConfiguration,
|
|
1200
|
+
const getAuthConfiguration = ({ oidcConfiguration, }) => {
|
|
1211
1201
|
const baseConfiguration = {
|
|
1212
|
-
authority: authenticationDomain,
|
|
1202
|
+
authority: oidcConfiguration.authenticationDomain,
|
|
1213
1203
|
redirect_uri: oidcConfiguration.redirectUri,
|
|
1214
1204
|
popup_redirect_uri: oidcConfiguration.redirectUri,
|
|
1215
1205
|
client_id: oidcConfiguration.clientId,
|
|
1216
1206
|
metadata: {
|
|
1217
|
-
authorization_endpoint: `${authenticationDomain}/authorize`,
|
|
1218
|
-
token_endpoint: `${authenticationDomain}/oauth/token`,
|
|
1219
|
-
userinfo_endpoint: `${authenticationDomain}/userinfo`,
|
|
1220
|
-
end_session_endpoint: `${authenticationDomain}/v2/logout` +
|
|
1207
|
+
authorization_endpoint: `${oidcConfiguration.authenticationDomain}/authorize`,
|
|
1208
|
+
token_endpoint: `${oidcConfiguration.authenticationDomain}/oauth/token`,
|
|
1209
|
+
userinfo_endpoint: `${oidcConfiguration.authenticationDomain}/userinfo`,
|
|
1210
|
+
end_session_endpoint: `${oidcConfiguration.authenticationDomain}/v2/logout` +
|
|
1221
1211
|
`?returnTo=${encodeURIComponent(oidcConfiguration.logoutRedirectUri)}` +
|
|
1222
1212
|
`&client_id=${oidcConfiguration.clientId}`,
|
|
1223
1213
|
},
|
|
@@ -1255,10 +1245,7 @@ class AuthManager {
|
|
|
1255
1245
|
};
|
|
1256
1246
|
async login() {
|
|
1257
1247
|
return withPassportError(async () => {
|
|
1258
|
-
const
|
|
1259
|
-
const oidcUser = await this.userManager.signinPopup({
|
|
1260
|
-
popupWindowFeatures,
|
|
1261
|
-
});
|
|
1248
|
+
const oidcUser = await this.userManager.signinPopup();
|
|
1262
1249
|
return this.mapOidcUserToDomainModel(oidcUser);
|
|
1263
1250
|
}, PassportErrorType.AUTHENTICATION_ERROR);
|
|
1264
1251
|
}
|
|
@@ -1341,12 +1328,26 @@ var TransactionTypes;
|
|
|
1341
1328
|
const PassportEventType = 'imx_passport_confirmation';
|
|
1342
1329
|
|
|
1343
1330
|
const openPopupCenter = ({ url, title, width, height, }) => {
|
|
1344
|
-
|
|
1345
|
-
const
|
|
1331
|
+
// Fixes dual-screen position Most browsers Firefox
|
|
1332
|
+
const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
|
|
1333
|
+
const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
|
|
1334
|
+
const windowWidth = window.innerWidth
|
|
1335
|
+
? window.innerWidth
|
|
1336
|
+
: document.documentElement.clientWidth
|
|
1337
|
+
? document.documentElement.clientWidth
|
|
1338
|
+
: screen.width;
|
|
1339
|
+
const windowHeight = window.innerHeight
|
|
1340
|
+
? window.innerHeight
|
|
1341
|
+
: document.documentElement.clientHeight
|
|
1342
|
+
? document.documentElement.clientHeight
|
|
1343
|
+
: screen.height;
|
|
1344
|
+
const systemZoom = windowWidth / window.screen.availWidth;
|
|
1345
|
+
const left = (windowWidth - width) / 2 / systemZoom + dualScreenLeft;
|
|
1346
|
+
const top = (windowHeight - height) / 2 / systemZoom + dualScreenTop;
|
|
1346
1347
|
const newWindow = window.open(url, title, `
|
|
1347
1348
|
scrollbars=yes,
|
|
1348
|
-
width=${width},
|
|
1349
|
-
height=${height},
|
|
1349
|
+
width=${width / systemZoom},
|
|
1350
|
+
height=${height / systemZoom},
|
|
1350
1351
|
top=${top},
|
|
1351
1352
|
left=${left}
|
|
1352
1353
|
`);
|
|
@@ -1358,8 +1359,8 @@ const openPopupCenter = ({ url, title, width, height, }) => {
|
|
|
1358
1359
|
};
|
|
1359
1360
|
|
|
1360
1361
|
const ConfirmationWindowTitle = 'Confirm this transaction';
|
|
1361
|
-
const ConfirmationWindowHeight =
|
|
1362
|
-
const ConfirmationWindowWidth =
|
|
1362
|
+
const ConfirmationWindowHeight = 600;
|
|
1363
|
+
const ConfirmationWindowWidth = 600;
|
|
1363
1364
|
const ConfirmationWindowClosedPollingDuration = 1000;
|
|
1364
1365
|
class ConfirmationScreen {
|
|
1365
1366
|
config;
|
|
@@ -1373,7 +1374,7 @@ class ConfirmationScreen {
|
|
|
1373
1374
|
...message,
|
|
1374
1375
|
}, this.config.passportDomain);
|
|
1375
1376
|
}
|
|
1376
|
-
startTransaction(accessToken, transaction
|
|
1377
|
+
startTransaction(accessToken, transaction) {
|
|
1377
1378
|
return new Promise((resolve, reject) => {
|
|
1378
1379
|
const messageHandler = ({ data, origin }) => {
|
|
1379
1380
|
if (origin != this.config.passportDomain ||
|
|
@@ -1404,8 +1405,8 @@ class ConfirmationScreen {
|
|
|
1404
1405
|
const confirmationWindow = openPopupCenter({
|
|
1405
1406
|
url: `${this.config.passportDomain}/transaction-confirmation`,
|
|
1406
1407
|
title: ConfirmationWindowTitle,
|
|
1407
|
-
width:
|
|
1408
|
-
height:
|
|
1408
|
+
width: ConfirmationWindowWidth,
|
|
1409
|
+
height: ConfirmationWindowHeight,
|
|
1409
1410
|
});
|
|
1410
1411
|
// https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
|
|
1411
1412
|
const timer = setInterval(function () {
|
|
@@ -1492,11 +1493,10 @@ async function batchNftTransfer({ user, starkSigner, request, transfersApi, pass
|
|
|
1492
1493
|
getSignableTransferRequestV2,
|
|
1493
1494
|
});
|
|
1494
1495
|
const confirmationScreen = new ConfirmationScreen(passportConfig);
|
|
1495
|
-
const popupWindowSize = { width: 480, height: 784 };
|
|
1496
1496
|
const confirmationResult = await confirmationScreen.startTransaction(user.accessToken, {
|
|
1497
1497
|
transactionType: TransactionTypes.CreateBatchTransfer,
|
|
1498
1498
|
transactionData: getSignableTransferRequestV2,
|
|
1499
|
-
}
|
|
1499
|
+
});
|
|
1500
1500
|
if (!confirmationResult.confirmed) {
|
|
1501
1501
|
throw new Error('Transaction rejected by user');
|
|
1502
1502
|
}
|
|
@@ -1724,8 +1724,8 @@ class PassportImxProvider {
|
|
|
1724
1724
|
this.user = user;
|
|
1725
1725
|
this.starkSigner = starkSigner;
|
|
1726
1726
|
this.passportConfig = passportConfig;
|
|
1727
|
-
const apiConfig = new Configuration({
|
|
1728
|
-
basePath: passportConfig.
|
|
1727
|
+
const apiConfig = new Configuration$1({
|
|
1728
|
+
basePath: passportConfig.imxAPIConfiguration.basePath,
|
|
1729
1729
|
});
|
|
1730
1730
|
this.transfersApi = new TransfersApi(apiConfig);
|
|
1731
1731
|
this.ordersApi = new OrdersApi(apiConfig);
|
|
@@ -1817,75 +1817,67 @@ var Networks;
|
|
|
1817
1817
|
Networks["SANDBOX"] = "goerli";
|
|
1818
1818
|
})(Networks || (Networks = {}));
|
|
1819
1819
|
|
|
1820
|
-
const
|
|
1820
|
+
const Config = {
|
|
1821
|
+
PRODUCTION: {
|
|
1822
|
+
network: Networks.PRODUCTION,
|
|
1823
|
+
authenticationDomain: 'https://auth.immutable.com',
|
|
1824
|
+
magicPublishableApiKey: 'pk_live_10F423798A540ED7',
|
|
1825
|
+
magicProviderId: 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=',
|
|
1826
|
+
baseIMXApiPath: 'https://api.x.immutable.com',
|
|
1827
|
+
passportDomain: 'https://passport.immutable.com',
|
|
1828
|
+
},
|
|
1829
|
+
SANDBOX: {
|
|
1830
|
+
network: Networks.SANDBOX,
|
|
1831
|
+
authenticationDomain: 'https://auth.immutable.com',
|
|
1832
|
+
magicPublishableApiKey: 'pk_live_10F423798A540ED7',
|
|
1833
|
+
magicProviderId: 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=',
|
|
1834
|
+
baseIMXApiPath: 'https://api.sandbox.x.immutable.com',
|
|
1835
|
+
passportDomain: 'https://passport.sandbox.immutable.com',
|
|
1836
|
+
},
|
|
1837
|
+
};
|
|
1838
|
+
const validateConfiguration = (configurationName, configuration, requiredKeys) => {
|
|
1839
|
+
if (!configuration) {
|
|
1840
|
+
throw new PassportError(`${configurationName} cannot be null`, PassportErrorType.INVALID_CONFIGURATION);
|
|
1841
|
+
}
|
|
1821
1842
|
const missingKeys = requiredKeys
|
|
1822
1843
|
.map((key) => !configuration[key] && key)
|
|
1823
1844
|
.filter((n) => n)
|
|
1824
1845
|
.join(', ');
|
|
1825
1846
|
if (missingKeys !== '') {
|
|
1826
|
-
|
|
1827
|
-
? `${prefix} - ${missingKeys} cannot be null`
|
|
1828
|
-
: `${missingKeys} cannot be null`;
|
|
1829
|
-
throw new PassportError(errorMessage, PassportErrorType.INVALID_CONFIGURATION);
|
|
1847
|
+
throw new PassportError(`${configurationName} - ${missingKeys} cannot be null`, PassportErrorType.INVALID_CONFIGURATION);
|
|
1830
1848
|
}
|
|
1831
1849
|
};
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
this.imxApiBasePath = overrides.imxApiBasePath;
|
|
1864
|
-
}
|
|
1865
|
-
else {
|
|
1866
|
-
switch (baseConfig.environment) {
|
|
1867
|
-
case Environment.SANDBOX: {
|
|
1868
|
-
this.network = Networks.SANDBOX;
|
|
1869
|
-
this.authenticationDomain = 'https://auth.immutable.com';
|
|
1870
|
-
this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
|
|
1871
|
-
this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
|
|
1872
|
-
this.passportDomain = 'https://passport.immutable.com';
|
|
1873
|
-
this.imxApiBasePath = 'https://api.x.immutable.com';
|
|
1874
|
-
break;
|
|
1875
|
-
}
|
|
1876
|
-
case Environment.PRODUCTION: {
|
|
1877
|
-
this.network = Networks.PRODUCTION;
|
|
1878
|
-
this.authenticationDomain = 'https://auth.immutable.com';
|
|
1879
|
-
this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
|
|
1880
|
-
this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
|
|
1881
|
-
this.passportDomain = 'https://passport.sandbox.immutable.com';
|
|
1882
|
-
this.imxApiBasePath = 'https://api.sandbox.x.immutable.com';
|
|
1883
|
-
break;
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1850
|
+
const getPassportConfiguration = (environmentConfiguration, oidcConfiguration) => {
|
|
1851
|
+
validateConfiguration('EnvironmentConfiguration', environmentConfiguration, [
|
|
1852
|
+
'network',
|
|
1853
|
+
'authenticationDomain',
|
|
1854
|
+
'magicPublishableApiKey',
|
|
1855
|
+
'magicProviderId',
|
|
1856
|
+
'passportDomain',
|
|
1857
|
+
]);
|
|
1858
|
+
validateConfiguration('OidcConfiguration', oidcConfiguration, [
|
|
1859
|
+
'clientId',
|
|
1860
|
+
'logoutRedirectUri',
|
|
1861
|
+
'redirectUri',
|
|
1862
|
+
]);
|
|
1863
|
+
return {
|
|
1864
|
+
network: environmentConfiguration.network,
|
|
1865
|
+
oidcConfiguration: {
|
|
1866
|
+
authenticationDomain: environmentConfiguration.authenticationDomain,
|
|
1867
|
+
clientId: oidcConfiguration.clientId,
|
|
1868
|
+
logoutRedirectUri: oidcConfiguration.logoutRedirectUri,
|
|
1869
|
+
redirectUri: oidcConfiguration.redirectUri,
|
|
1870
|
+
scope: oidcConfiguration.scope,
|
|
1871
|
+
audience: oidcConfiguration.audience,
|
|
1872
|
+
},
|
|
1873
|
+
imxAPIConfiguration: {
|
|
1874
|
+
basePath: environmentConfiguration.baseIMXApiPath,
|
|
1875
|
+
},
|
|
1876
|
+
passportDomain: environmentConfiguration.passportDomain,
|
|
1877
|
+
magicPublishableApiKey: environmentConfiguration.magicPublishableApiKey,
|
|
1878
|
+
magicProviderId: environmentConfiguration.magicProviderId,
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1889
1881
|
|
|
1890
1882
|
const getStarkSigner = async (signer) => {
|
|
1891
1883
|
return withPassportError(async () => {
|
|
@@ -1924,8 +1916,8 @@ class Passport {
|
|
|
1924
1916
|
authManager;
|
|
1925
1917
|
magicAdapter;
|
|
1926
1918
|
config;
|
|
1927
|
-
constructor(
|
|
1928
|
-
const passportConfiguration =
|
|
1919
|
+
constructor(environmentConfiguration, oidcConfiguration) {
|
|
1920
|
+
const passportConfiguration = getPassportConfiguration(environmentConfiguration, oidcConfiguration);
|
|
1929
1921
|
this.config = passportConfiguration;
|
|
1930
1922
|
this.authManager = new AuthManager(this.config);
|
|
1931
1923
|
this.magicAdapter = new MagicAdapter(this.config);
|
|
@@ -1972,8 +1964,8 @@ class Passport {
|
|
|
1972
1964
|
return user.accessToken;
|
|
1973
1965
|
}
|
|
1974
1966
|
async registerUser(userAdminKeySigner, starkSigner, jwt) {
|
|
1975
|
-
const configuration = new Configuration({
|
|
1976
|
-
basePath: this.config.
|
|
1967
|
+
const configuration = new Configuration$1({
|
|
1968
|
+
basePath: this.config.imxAPIConfiguration.basePath,
|
|
1977
1969
|
});
|
|
1978
1970
|
const usersApi = new UsersApi(configuration);
|
|
1979
1971
|
await registerPassport({
|
|
@@ -1989,10 +1981,6 @@ class Passport {
|
|
|
1989
1981
|
}
|
|
1990
1982
|
}
|
|
1991
1983
|
|
|
1992
|
-
function $parcel$interopDefault(a) {
|
|
1993
|
-
return a && a.__esModule ? a.default : a;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
1984
|
const $762782b6c862d954$export$db5daa1b5156ccfe = [
|
|
1997
1985
|
{
|
|
1998
1986
|
constant: true,
|
|
@@ -2115,12 +2103,6 @@ const $a47e48dd2c04791b$export$f61f4aaec62f6be9 = {
|
|
|
2115
2103
|
};
|
|
2116
2104
|
|
|
2117
2105
|
|
|
2118
|
-
let $08d5ddc39acd6833$export$fd9b17d87f4121d2;
|
|
2119
|
-
(function(TokenFilterTypes) {
|
|
2120
|
-
TokenFilterTypes["SWAP"] = "swap";
|
|
2121
|
-
TokenFilterTypes["BRIDGE"] = "bridge";
|
|
2122
|
-
TokenFilterTypes["ALL"] = "all";
|
|
2123
|
-
})($08d5ddc39acd6833$export$fd9b17d87f4121d2 || ($08d5ddc39acd6833$export$fd9b17d87f4121d2 = {}));
|
|
2124
2106
|
|
|
2125
2107
|
|
|
2126
2108
|
|
|
@@ -2131,12 +2113,6 @@ const $4f91c5f280efe242$export$a130407f3423b97d = {
|
|
|
2131
2113
|
ADD_NETWORK: "wallet_addEthereumChain",
|
|
2132
2114
|
SWITCH_NETWORK: "wallet_switchEthereumChain"
|
|
2133
2115
|
};
|
|
2134
|
-
let $4f91c5f280efe242$export$a75605c67ea83a5a;
|
|
2135
|
-
(function(WalletFilterTypes) {
|
|
2136
|
-
WalletFilterTypes["ALL"] = "all";
|
|
2137
|
-
WalletFilterTypes["DESKTOP"] = "desktop";
|
|
2138
|
-
WalletFilterTypes["MOBILE"] = "mobile";
|
|
2139
|
-
})($4f91c5f280efe242$export$a75605c67ea83a5a || ($4f91c5f280efe242$export$a75605c67ea83a5a = {}));
|
|
2140
2116
|
|
|
2141
2117
|
|
|
2142
2118
|
|
|
@@ -2246,24 +2222,67 @@ async function $de192de6ef100f9f$var$addNetworkToWallet(provider, chainId) {
|
|
|
2246
2222
|
|
|
2247
2223
|
|
|
2248
2224
|
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2225
|
+
let $efe60cea83bfc4e8$export$f04a61298a47a40f;
|
|
2226
|
+
(function(Icon) {
|
|
2227
|
+
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";
|
|
2228
|
+
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";
|
|
2229
|
+
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";
|
|
2230
|
+
})($efe60cea83bfc4e8$export$f04a61298a47a40f || ($efe60cea83bfc4e8$export$f04a61298a47a40f = {}));
|
|
2231
|
+
const $efe60cea83bfc4e8$export$3dbcce43073f40c7 = [
|
|
2232
|
+
{
|
|
2233
|
+
name: "Ethereum",
|
|
2234
|
+
symbol: "ETH",
|
|
2235
|
+
decimals: 18,
|
|
2236
|
+
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"
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
name: "Matic",
|
|
2240
|
+
symbol: "MATIC",
|
|
2241
|
+
address: "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",
|
|
2242
|
+
decimals: 18,
|
|
2243
|
+
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"
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
name: "Immutable X",
|
|
2247
|
+
symbol: "IMX",
|
|
2248
|
+
address: "0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF",
|
|
2249
|
+
decimals: 18,
|
|
2250
|
+
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"
|
|
2251
|
+
}
|
|
2252
|
+
];
|
|
2253
|
+
const $efe60cea83bfc4e8$var$goerliTokensList = [
|
|
2254
|
+
{
|
|
2255
|
+
name: "Ethereum",
|
|
2256
|
+
symbol: "ETH",
|
|
2257
|
+
decimals: 18,
|
|
2258
|
+
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"
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
name: "Immutable X",
|
|
2262
|
+
symbol: "IMX",
|
|
2263
|
+
address: "0x1facdd0165489f373255a90304650e15481b2c85",
|
|
2264
|
+
decimals: 18,
|
|
2265
|
+
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"
|
|
2266
|
+
}
|
|
2267
|
+
];
|
|
2268
|
+
const $efe60cea83bfc4e8$var$polygonTokensList = [];
|
|
2269
|
+
const $efe60cea83bfc4e8$export$473cec51305fdae8 = (chainId)=>{
|
|
2270
|
+
let tokenList = [];
|
|
2271
|
+
switch(chainId){
|
|
2272
|
+
case ($a47e48dd2c04791b$export$c06e1e7429de6283).ETHEREUM:
|
|
2273
|
+
tokenList = $efe60cea83bfc4e8$export$3dbcce43073f40c7;
|
|
2274
|
+
break;
|
|
2275
|
+
case ($a47e48dd2c04791b$export$c06e1e7429de6283).GOERLI:
|
|
2276
|
+
tokenList = $efe60cea83bfc4e8$var$goerliTokensList;
|
|
2277
|
+
break;
|
|
2278
|
+
case ($a47e48dd2c04791b$export$c06e1e7429de6283).POLYGON:
|
|
2279
|
+
tokenList = $efe60cea83bfc4e8$var$polygonTokensList;
|
|
2280
|
+
break;
|
|
2281
|
+
default:
|
|
2282
|
+
tokenList = $efe60cea83bfc4e8$export$3dbcce43073f40c7;
|
|
2283
|
+
}
|
|
2265
2284
|
return {
|
|
2266
|
-
tokens:
|
|
2285
|
+
tokens: tokenList
|
|
2267
2286
|
};
|
|
2268
2287
|
};
|
|
2269
2288
|
|
|
@@ -2308,10 +2327,7 @@ async function $1564e43dde50bb61$export$60e0fe116a0e6ed0(provider, walletAddress
|
|
|
2308
2327
|
const $1564e43dde50bb61$export$fee49741664a4d7e = async (provider, walletAddress, chainId)=>{
|
|
2309
2328
|
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);
|
|
2310
2329
|
if (!provider.provider?.request) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("provider object is missing request function", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_REQUEST_MISSING_ERROR);
|
|
2311
|
-
const tokenList = ($efe60cea83bfc4e8$export$473cec51305fdae8)(
|
|
2312
|
-
type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
|
|
2313
|
-
chainId: chainId
|
|
2314
|
-
});
|
|
2330
|
+
const tokenList = ($efe60cea83bfc4e8$export$473cec51305fdae8)(chainId);
|
|
2315
2331
|
const allBalancePromises = [];
|
|
2316
2332
|
allBalancePromises.push($1564e43dde50bb61$export$df96cd8d56be0ab1(provider, walletAddress));
|
|
2317
2333
|
tokenList.tokens.filter((token)=>token.address).forEach((token)=>allBalancePromises.push($1564e43dde50bb61$export$60e0fe116a0e6ed0(provider, walletAddress, token.address ?? "")));
|
|
@@ -2382,30 +2398,6 @@ async function $c99672cf2294e839$var$getMetaMaskProvider() {
|
|
|
2382
2398
|
|
|
2383
2399
|
|
|
2384
2400
|
|
|
2385
|
-
var $6f3c55a615003cbf$exports = {};
|
|
2386
|
-
$6f3c55a615003cbf$exports = JSON.parse('[{"connectionProvider":"metamask","icon":"some-icon-url","name":"MetaMask","description":"complete web3 wallet solution","platform":["mobile","desktop"]},{"connectionProvider":"passport","icon":"pp-icon","name":"Passport","description":"Web3 with your email!","platform":["mobile"]},{"connectionProvider":"gamestop","icon":"gme-icon","name":"GameStop","description":"Never stopping the game!","platform":["desktop"]}]');
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
async function $5cdde2ffe6360fec$export$a822caa90d7eef09({ type: type = ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL , exclude: exclude }) {
|
|
2390
|
-
// todo:For async API call, use the CheckoutError with errorType:API_CALL_ERROR?? or any other
|
|
2391
|
-
const filteredWalletsList = ((/*@__PURE__*/$parcel$interopDefault($6f3c55a615003cbf$exports))).filter((wallet)=>{
|
|
2392
|
-
const walletNotExcluded = !exclude?.map((excludeWallet)=>excludeWallet.connectionProvider).includes(wallet.connectionProvider);
|
|
2393
|
-
const allowAllWallets = type === ($4f91c5f280efe242$export$a75605c67ea83a5a).ALL;
|
|
2394
|
-
const walletsAllowedForType = wallet.platform.includes(type);
|
|
2395
|
-
return walletNotExcluded && (allowAllWallets || walletsAllowedForType);
|
|
2396
|
-
}).map((wallet)=>{
|
|
2397
|
-
const { platform: platform , ...walletInfo } = wallet;
|
|
2398
|
-
return walletInfo;
|
|
2399
|
-
});
|
|
2400
|
-
return {
|
|
2401
|
-
allowedWallets: filteredWalletsList
|
|
2402
|
-
};
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
2401
|
|
|
2410
2402
|
const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (params)=>{
|
|
2411
2403
|
const { provider: provider , transaction: transaction } = params;
|
|
@@ -2445,10 +2437,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
|
|
|
2445
2437
|
return $1564e43dde50bb61$export$fee49741664a4d7e(params.provider, params.walletAddress, params.chainId);
|
|
2446
2438
|
}
|
|
2447
2439
|
getTokenAllowList(params) {
|
|
2448
|
-
return $efe60cea83bfc4e8$export$473cec51305fdae8(params);
|
|
2449
|
-
}
|
|
2450
|
-
async getWalletsAllowList(params) {
|
|
2451
|
-
return await $5cdde2ffe6360fec$export$a822caa90d7eef09(params);
|
|
2440
|
+
return $efe60cea83bfc4e8$export$473cec51305fdae8(params.chainId);
|
|
2452
2441
|
}
|
|
2453
2442
|
async sendTransaction(params) {
|
|
2454
2443
|
return await $dbe95599a4661140$export$8e0e7ffc78696d30(params);
|
|
@@ -2544,4 +2533,4 @@ let $9234b4c577442a97$export$c88931fdc51854eb;
|
|
|
2544
2533
|
WidgetTheme["CUSTOM"] = "custom";
|
|
2545
2534
|
})($9234b4c577442a97$export$c88931fdc51854eb || ($9234b4c577442a97$export$c88931fdc51854eb = {}));
|
|
2546
2535
|
|
|
2547
|
-
export { $28a5fdc2f5e6c742$export$d1bfa21f7c76447a as BridgeEventType, $ede253beebe0de4a$export$90db5fe1be5993c1 as BuyEventType, $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $d71a87afc3136184$export$e72e7f9969a47dd3 as ConnectEventType, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, Environment, GenericIMXProvider, $88e4c575901cd68c$export$5a0ace85cae72d45 as IMTBLWidgetEvents,
|
|
2536
|
+
export { $28a5fdc2f5e6c742$export$d1bfa21f7c76447a as BridgeEventType, $ede253beebe0de4a$export$90db5fe1be5993c1 as BuyEventType, $a47e48dd2c04791b$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, Config, Configuration, $d71a87afc3136184$export$e72e7f9969a47dd3 as ConnectEventType, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, Environment, GenericIMXProvider, $88e4c575901cd68c$export$5a0ace85cae72d45 as IMTBLWidgetEvents, MetaMaskIMXProvider, $9234b4c577442a97$export$95be4ae94445245a as Network, PRODUCTION, Passport, PassportError, SANDBOX, StarkExAPIFactory, $5d497088f13bb116$export$140a49745ab55563 as SwapEventType, $9d0f1783d4d36e8a$export$d9be06b70b28c742 as WalletEventType, $9234b4c577442a97$export$c88931fdc51854eb as WidgetTheme };
|