@depay/web3-wallets-evm 17.1.0 → 17.2.0
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/esm/index.evm.js +172 -112
- package/dist/esm/index.js +204 -144
- package/dist/esm/index.solana.js +47 -35
- package/dist/umd/index.evm.js +172 -112
- package/dist/umd/index.js +204 -144
- package/dist/umd/index.solana.js +47 -35
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains);
|
|
10
10
|
|
|
11
|
-
function _optionalChain$
|
|
11
|
+
function _optionalChain$A(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
12
12
|
class Transaction {
|
|
13
13
|
|
|
14
14
|
constructor({
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
this.to = (to && to.match('0x')) ? ethers.ethers.utils.getAddress(to) : to;
|
|
34
34
|
|
|
35
35
|
// optional
|
|
36
|
-
this.value = _optionalChain$
|
|
36
|
+
this.value = _optionalChain$A([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
37
37
|
this.api = api;
|
|
38
38
|
this.method = method;
|
|
39
39
|
this.params = params;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
getParamType(param) {
|
|
76
|
-
if(_optionalChain$
|
|
76
|
+
if(_optionalChain$A([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
|
|
77
77
|
return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
|
|
78
78
|
} else {
|
|
79
79
|
return param.type
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
function _optionalChain$
|
|
149
|
+
function _optionalChain$z(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
150
150
|
|
|
151
151
|
const POLL_SPEED = 500; // 0.5 seconds
|
|
152
152
|
const MAX_POLLS = 240; // 120 seconds
|
|
@@ -167,14 +167,14 @@
|
|
|
167
167
|
|
|
168
168
|
const provider = await web3Client.getProvider(transaction.blockchain);
|
|
169
169
|
const { value } = await provider.getSignatureStatus(signature);
|
|
170
|
-
const confirmationStatus = _optionalChain$
|
|
170
|
+
const confirmationStatus = _optionalChain$z([value, 'optionalAccess', _ => _.confirmationStatus]);
|
|
171
171
|
if(confirmationStatus) {
|
|
172
172
|
const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
|
|
173
173
|
if (hasReachedSufficientCommitment) {
|
|
174
174
|
if(value.err) {
|
|
175
175
|
transaction._failed = true;
|
|
176
176
|
const confirmedTransaction = await provider.getConfirmedTransaction(signature);
|
|
177
|
-
const failedReason = _optionalChain$
|
|
177
|
+
const failedReason = _optionalChain$z([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
|
|
178
178
|
if(transaction.failed) transaction.failed(transaction, failedReason);
|
|
179
179
|
} else {
|
|
180
180
|
transaction._succeeded = true;
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base'];
|
|
266
266
|
supported$1.solana = ['solana'];
|
|
267
267
|
|
|
268
|
-
function _optionalChain$
|
|
268
|
+
function _optionalChain$y(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
269
269
|
class WindowSolana {
|
|
270
270
|
|
|
271
271
|
static __initStatic() {this.info = {
|
|
@@ -276,13 +276,13 @@
|
|
|
276
276
|
|
|
277
277
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
278
278
|
return (
|
|
279
|
-
_optionalChain$
|
|
279
|
+
_optionalChain$y([window, 'optionalAccess', _6 => _6.solana]) &&
|
|
280
280
|
// not Phantom
|
|
281
281
|
!(window.phantom && !window.glow && !window.solana.isGlow && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
282
282
|
// not Coin98
|
|
283
283
|
!window.coin98 &&
|
|
284
284
|
// not BitKeep
|
|
285
|
-
!(_optionalChain$
|
|
285
|
+
!(_optionalChain$y([window, 'optionalAccess', _7 => _7.solana]) && _optionalChain$y([window, 'optionalAccess', _8 => _8.solana, 'access', _9 => _9.isBitKeep])) &&
|
|
286
286
|
// not Glow
|
|
287
287
|
!window.solana.isGlow &&
|
|
288
288
|
// not trust
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
// Brave Wallet
|
|
291
291
|
!window.solana.isBraveWallet &&
|
|
292
292
|
// OKX Wallet
|
|
293
|
-
!_optionalChain$
|
|
293
|
+
!_optionalChain$y([window, 'optionalAccess', _10 => _10.okxwallet])
|
|
294
294
|
)
|
|
295
295
|
};}
|
|
296
296
|
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
let internalCallback;
|
|
338
338
|
switch (event) {
|
|
339
339
|
case 'account':
|
|
340
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
340
|
+
internalCallback = (publicKey) => callback(_optionalChain$y([publicKey, 'optionalAccess', _11 => _11.toString, 'call', _12 => _12()]));
|
|
341
341
|
this.getProvider().on('accountChanged', internalCallback);
|
|
342
342
|
break
|
|
343
343
|
}
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
}
|
|
391
391
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
392
392
|
|
|
393
|
-
function _optionalChain$
|
|
393
|
+
function _optionalChain$x(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
394
394
|
|
|
395
395
|
class Backpack extends WindowSolana {
|
|
396
396
|
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
|
|
403
403
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
404
404
|
return (
|
|
405
|
-
_optionalChain$
|
|
405
|
+
_optionalChain$x([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
406
406
|
window.backpack.isBackpack
|
|
407
407
|
)
|
|
408
408
|
};}
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
}
|
|
421
421
|
} Backpack.__initStatic(); Backpack.__initStatic2();
|
|
422
422
|
|
|
423
|
-
function _optionalChain$
|
|
423
|
+
function _optionalChain$w(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
424
424
|
|
|
425
425
|
const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
426
426
|
transaction = new Transaction(transaction);
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
|
|
476
476
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
477
477
|
if(
|
|
478
|
-
(error && _optionalChain$
|
|
478
|
+
(error && _optionalChain$w([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
479
479
|
(error && error.toString().match('undefined'))
|
|
480
480
|
) {
|
|
481
481
|
setTimeout(()=>{
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
});
|
|
490
490
|
} catch(error) {
|
|
491
491
|
if(
|
|
492
|
-
(error && _optionalChain$
|
|
492
|
+
(error && _optionalChain$w([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
493
493
|
(error && error.toString().match('undefined'))
|
|
494
494
|
) {
|
|
495
495
|
setTimeout(()=>{
|
|
@@ -524,12 +524,12 @@
|
|
|
524
524
|
if(contractArguments) {
|
|
525
525
|
return await method(...contractArguments, {
|
|
526
526
|
value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
|
|
527
|
-
gasLimit: _optionalChain$
|
|
527
|
+
gasLimit: _optionalChain$w([gas, 'optionalAccess', _7 => _7.toHexString, 'call', _8 => _8()])
|
|
528
528
|
})
|
|
529
529
|
} else {
|
|
530
530
|
return await method({
|
|
531
531
|
value: Transaction.bigNumberify(transaction.value, transaction.blockchain),
|
|
532
|
-
gasLimit: _optionalChain$
|
|
532
|
+
gasLimit: _optionalChain$w([gas, 'optionalAccess', _9 => _9.toHexString, 'call', _10 => _10()])
|
|
533
533
|
})
|
|
534
534
|
}
|
|
535
535
|
};
|
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
})
|
|
542
542
|
};
|
|
543
543
|
|
|
544
|
-
function _optionalChain$
|
|
544
|
+
function _optionalChain$v(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
545
545
|
|
|
546
546
|
class WindowEthereum {
|
|
547
547
|
|
|
@@ -553,37 +553,39 @@
|
|
|
553
553
|
|
|
554
554
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
555
555
|
return (
|
|
556
|
-
_optionalChain$
|
|
556
|
+
_optionalChain$v([window, 'optionalAccess', _38 => _38.ethereum]) &&
|
|
557
557
|
// not MetaMask
|
|
558
|
-
!(_optionalChain$
|
|
558
|
+
!(_optionalChain$v([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
|
|
559
559
|
// not Coin98
|
|
560
|
-
!_optionalChain$
|
|
560
|
+
!_optionalChain$v([window, 'optionalAccess', _41 => _41.coin98]) &&
|
|
561
561
|
// not Trust Wallet
|
|
562
|
-
!(_optionalChain$
|
|
562
|
+
!(_optionalChain$v([window, 'optionalAccess', _42 => _42.ethereum, 'optionalAccess', _43 => _43.isTrust]) || _optionalChain$v([window, 'optionalAccess', _44 => _44.ethereum, 'optionalAccess', _45 => _45.isTrustWallet])) &&
|
|
563
563
|
// not crypto.com
|
|
564
|
-
!_optionalChain$
|
|
564
|
+
!_optionalChain$v([window, 'optionalAccess', _46 => _46.ethereum, 'optionalAccess', _47 => _47.isDeficonnectProvider]) &&
|
|
565
565
|
// not HyperPay
|
|
566
|
-
!_optionalChain$
|
|
566
|
+
!_optionalChain$v([window, 'optionalAccess', _48 => _48.ethereum, 'optionalAccess', _49 => _49.isHyperPay]) &&
|
|
567
567
|
// not Phantom
|
|
568
|
-
!(window.phantom && !window.glow && !_optionalChain$
|
|
568
|
+
!(window.phantom && !window.glow && !_optionalChain$v([window, 'optionalAccess', _50 => _50.solana, 'optionalAccess', _51 => _51.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
569
569
|
// not Rabby
|
|
570
|
-
!_optionalChain$
|
|
570
|
+
!_optionalChain$v([window, 'optionalAccess', _52 => _52.ethereum, 'optionalAccess', _53 => _53.isRabby]) &&
|
|
571
571
|
// not Backpack
|
|
572
|
-
!_optionalChain$
|
|
572
|
+
!_optionalChain$v([window, 'optionalAccess', _54 => _54.backpack, 'optionalAccess', _55 => _55.isBackpack]) &&
|
|
573
573
|
// not TokenPocket
|
|
574
|
-
!_optionalChain$
|
|
574
|
+
!_optionalChain$v([window, 'optionalAccess', _56 => _56.ethereum, 'optionalAccess', _57 => _57.isTokenPocket]) &&
|
|
575
575
|
// not BitKeep
|
|
576
|
-
!_optionalChain$
|
|
576
|
+
!_optionalChain$v([window, 'optionalAccess', _58 => _58.ethereum, 'optionalAccess', _59 => _59.isBitKeep]) &&
|
|
577
577
|
// not Coinbase
|
|
578
|
-
!(_optionalChain$
|
|
578
|
+
!(_optionalChain$v([window, 'optionalAccess', _60 => _60.ethereum, 'optionalAccess', _61 => _61.isCoinbaseWallet]) || _optionalChain$v([window, 'optionalAccess', _62 => _62.ethereum, 'optionalAccess', _63 => _63.isWalletLink])) &&
|
|
579
579
|
// MetaMask through ProviderMap
|
|
580
|
-
!_optionalChain$
|
|
580
|
+
!_optionalChain$v([window, 'optionalAccess', _64 => _64.ethereum, 'optionalAccess', _65 => _65.providerMap, 'optionalAccess', _66 => _66.has, 'call', _67 => _67('MetaMask')]) &&
|
|
581
581
|
// Brave Wallet
|
|
582
|
-
!_optionalChain$
|
|
582
|
+
!_optionalChain$v([window, 'optionalAccess', _68 => _68.ethereum, 'optionalAccess', _69 => _69.isBraveWallet]) &&
|
|
583
583
|
// Uniswap Wallet
|
|
584
|
-
!_optionalChain$
|
|
584
|
+
!_optionalChain$v([window, 'optionalAccess', _70 => _70.ethereum, 'optionalAccess', _71 => _71.isUniswapWallet]) &&
|
|
585
|
+
// Rainbow
|
|
586
|
+
!_optionalChain$v([window, 'optionalAccess', _72 => _72.ethereum, 'optionalAccess', _73 => _73.isRainbow]) &&
|
|
585
587
|
// OKX Wallet
|
|
586
|
-
!_optionalChain$
|
|
588
|
+
!_optionalChain$v([window, 'optionalAccess', _74 => _74.okxwallet])
|
|
587
589
|
)
|
|
588
590
|
};}
|
|
589
591
|
|
|
@@ -709,7 +711,7 @@
|
|
|
709
711
|
}
|
|
710
712
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
711
713
|
|
|
712
|
-
function _optionalChain$
|
|
714
|
+
function _optionalChain$u(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
713
715
|
class Binance extends WindowEthereum {
|
|
714
716
|
|
|
715
717
|
static __initStatic() {this.info = {
|
|
@@ -719,7 +721,7 @@
|
|
|
719
721
|
};}
|
|
720
722
|
|
|
721
723
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
722
|
-
return _optionalChain$
|
|
724
|
+
return _optionalChain$u([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
723
725
|
!window.coin98 &&
|
|
724
726
|
!window.trustwallet
|
|
725
727
|
};}
|
|
@@ -739,7 +741,7 @@
|
|
|
739
741
|
okx: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMzYuMSAzMzYuMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzM2LjEgMzM2LjE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPHBhdGggZD0iTTMxMy43LDBIMjIuNEMxMCwwLDAsMTAsMCwyMi40djI5MS4zYzAsMTIuNCwxMCwyMi40LDIyLjQsMjIuNGgyOTEuM2MxMi40LDAsMjIuNC0xMCwyMi40LTIyLjRWMjIuNAoJQzMzNi4xLDEwLDMyNi4xLDAsMzEzLjcsMHoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIwNC41LDEzMC43aC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTV2LTY0LjcKCUMyMDkuNSwxMzIuOSwyMDcuMiwxMzAuNywyMDQuNSwxMzAuN3oiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDU2LjFINjUuMWMtMi43LDAtNSwyLjItNSw1djY0LjdjMCwyLjcsMi4yLDUsNSw1aDY0LjdjMi44LDAsNS0yLjIsNS01VjYxCglDMTM0LjgsNTguMywxMzIuNSw1Ni4xLDEyOS44LDU2LjF6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNzkuMSw1Ni4xaC02NC43Yy0yLjcsMC01LDIuMi01LDV2NjQuN2MwLDIuNywyLjIsNSw1LDVoNjQuN2MyLjcsMCw1LTIuMiw1LTVWNjEKCUMyODQuMSw1OC4zLDI4MS45LDU2LjEsMjc5LjEsNTYuMXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEyOS44LDIwNS40SDY1LjFjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuOCwwLDUtMi4yLDUtNXYtNjQuNwoJQzEzNC44LDIwNy42LDEzMi41LDIwNS40LDEyOS44LDIwNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjc5LjEsMjA1LjRoLTY0LjdjLTIuNywwLTUsMi4yLTUsNXY2NC43YzAsMi43LDIuMiw1LDUsNWg2NC43YzIuNywwLDUtMi4yLDUtNXYtNjQuNwoJQzI4NC4xLDIwNy42LDI4MS45LDIwNS40LDI3OS4xLDIwNS40eiIvPgo8L3N2Zz4K",
|
|
740
742
|
};
|
|
741
743
|
|
|
742
|
-
function _optionalChain$
|
|
744
|
+
function _optionalChain$t(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
743
745
|
class BraveEVM extends WindowEthereum {
|
|
744
746
|
|
|
745
747
|
static __initStatic() {this.info = {
|
|
@@ -749,14 +751,14 @@
|
|
|
749
751
|
platform: 'evm',
|
|
750
752
|
};}
|
|
751
753
|
|
|
752
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
754
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$t([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
753
755
|
|
|
754
756
|
getProvider() {
|
|
755
757
|
return window.ethereum
|
|
756
758
|
}
|
|
757
759
|
} BraveEVM.__initStatic(); BraveEVM.__initStatic2();
|
|
758
760
|
|
|
759
|
-
function _optionalChain$
|
|
761
|
+
function _optionalChain$s(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
760
762
|
class BraveSVM extends WindowSolana {
|
|
761
763
|
|
|
762
764
|
static __initStatic() {this.info = {
|
|
@@ -766,14 +768,14 @@
|
|
|
766
768
|
platform: 'svm',
|
|
767
769
|
};}
|
|
768
770
|
|
|
769
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
771
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$s([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
770
772
|
|
|
771
773
|
getProvider() {
|
|
772
774
|
return window.braveSolana
|
|
773
775
|
}
|
|
774
776
|
} BraveSVM.__initStatic(); BraveSVM.__initStatic2();
|
|
775
777
|
|
|
776
|
-
function _optionalChain$
|
|
778
|
+
function _optionalChain$r(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
777
779
|
class Coin98EVM extends WindowEthereum {
|
|
778
780
|
|
|
779
781
|
static __initStatic() {this.info = {
|
|
@@ -783,13 +785,13 @@
|
|
|
783
785
|
platform: 'evm',
|
|
784
786
|
};}
|
|
785
787
|
|
|
786
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
788
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$r([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
787
789
|
|
|
788
790
|
getProvider() { return window.coin98.provider }
|
|
789
791
|
|
|
790
792
|
} Coin98EVM.__initStatic(); Coin98EVM.__initStatic2();
|
|
791
793
|
|
|
792
|
-
function _optionalChain$
|
|
794
|
+
function _optionalChain$q(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
793
795
|
class Coin98SVM extends WindowSolana {
|
|
794
796
|
|
|
795
797
|
static __initStatic() {this.info = {
|
|
@@ -799,13 +801,13 @@
|
|
|
799
801
|
platform: 'svm',
|
|
800
802
|
};}
|
|
801
803
|
|
|
802
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
804
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$q([window, 'optionalAccess', _3 => _3.coin98, 'optionalAccess', _4 => _4.sol]) };}
|
|
803
805
|
|
|
804
806
|
getProvider() { return window.coin98.sol }
|
|
805
807
|
|
|
806
808
|
} Coin98SVM.__initStatic(); Coin98SVM.__initStatic2();
|
|
807
809
|
|
|
808
|
-
function _optionalChain$
|
|
810
|
+
function _optionalChain$p(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
809
811
|
class CoinbaseEVM extends WindowEthereum {
|
|
810
812
|
|
|
811
813
|
static __initStatic() {this.info = {
|
|
@@ -816,8 +818,8 @@
|
|
|
816
818
|
};}
|
|
817
819
|
|
|
818
820
|
getProvider() {
|
|
819
|
-
if(_optionalChain$
|
|
820
|
-
return _optionalChain$
|
|
821
|
+
if(_optionalChain$p([window, 'optionalAccess', _9 => _9.ethereum, 'optionalAccess', _10 => _10.providerMap, 'optionalAccess', _11 => _11.has, 'call', _12 => _12('CoinbaseWallet')])) {
|
|
822
|
+
return _optionalChain$p([window, 'optionalAccess', _13 => _13.ethereum, 'optionalAccess', _14 => _14.providerMap, 'optionalAccess', _15 => _15.get, 'call', _16 => _16('CoinbaseWallet')])
|
|
821
823
|
} else {
|
|
822
824
|
return window.ethereum
|
|
823
825
|
}
|
|
@@ -826,9 +828,9 @@
|
|
|
826
828
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
827
829
|
return(
|
|
828
830
|
(
|
|
829
|
-
_optionalChain$
|
|
831
|
+
_optionalChain$p([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isCoinbaseWallet]) || _optionalChain$p([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isWalletLink])
|
|
830
832
|
) || (
|
|
831
|
-
_optionalChain$
|
|
833
|
+
_optionalChain$p([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.providerMap, 'optionalAccess', _23 => _23.has, 'call', _24 => _24('CoinbaseWallet')])
|
|
832
834
|
)
|
|
833
835
|
)
|
|
834
836
|
};}
|
|
@@ -852,7 +854,7 @@
|
|
|
852
854
|
};}
|
|
853
855
|
} CoinbaseSVM.__initStatic(); CoinbaseSVM.__initStatic2();
|
|
854
856
|
|
|
855
|
-
function _optionalChain$
|
|
857
|
+
function _optionalChain$o(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
856
858
|
class CryptoCom extends WindowEthereum {
|
|
857
859
|
|
|
858
860
|
static __initStatic() {this.info = {
|
|
@@ -861,10 +863,10 @@
|
|
|
861
863
|
blockchains: supported$1.evm
|
|
862
864
|
};}
|
|
863
865
|
|
|
864
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
866
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$o([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
865
867
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
866
868
|
|
|
867
|
-
function _optionalChain$
|
|
869
|
+
function _optionalChain$n(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
868
870
|
class ExodusEVM extends WindowEthereum {
|
|
869
871
|
|
|
870
872
|
static __initStatic() {this.info = {
|
|
@@ -874,10 +876,10 @@
|
|
|
874
876
|
platform: 'evm',
|
|
875
877
|
};}
|
|
876
878
|
|
|
877
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
879
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$n([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isExodus]) };}
|
|
878
880
|
} ExodusEVM.__initStatic(); ExodusEVM.__initStatic2();
|
|
879
881
|
|
|
880
|
-
function _optionalChain$
|
|
882
|
+
function _optionalChain$m(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
881
883
|
class ExodusSVM extends WindowSolana {
|
|
882
884
|
|
|
883
885
|
static __initStatic() {this.info = {
|
|
@@ -887,7 +889,7 @@
|
|
|
887
889
|
platform: 'svm',
|
|
888
890
|
};}
|
|
889
891
|
|
|
890
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
892
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$m([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isExodus]) };}
|
|
891
893
|
} ExodusSVM.__initStatic(); ExodusSVM.__initStatic2();
|
|
892
894
|
|
|
893
895
|
class Glow extends WindowSolana {
|
|
@@ -906,7 +908,7 @@
|
|
|
906
908
|
};}
|
|
907
909
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
908
910
|
|
|
909
|
-
function _optionalChain$
|
|
911
|
+
function _optionalChain$l(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
910
912
|
class HyperPay extends WindowEthereum {
|
|
911
913
|
|
|
912
914
|
static __initStatic() {this.info = {
|
|
@@ -915,10 +917,10 @@
|
|
|
915
917
|
blockchains: supported$1.evm
|
|
916
918
|
};}
|
|
917
919
|
|
|
918
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
920
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$l([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
919
921
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
920
922
|
|
|
921
|
-
function _optionalChain$
|
|
923
|
+
function _optionalChain$k(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
922
924
|
class MagicEdenEVM extends WindowEthereum {
|
|
923
925
|
|
|
924
926
|
static __initStatic() {this.info = {
|
|
@@ -930,12 +932,12 @@
|
|
|
930
932
|
|
|
931
933
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
932
934
|
return (
|
|
933
|
-
_optionalChain$
|
|
935
|
+
_optionalChain$k([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMagicEden])
|
|
934
936
|
)
|
|
935
937
|
};}
|
|
936
938
|
} MagicEdenEVM.__initStatic(); MagicEdenEVM.__initStatic2();
|
|
937
939
|
|
|
938
|
-
function _optionalChain$
|
|
940
|
+
function _optionalChain$j(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
939
941
|
class MagicEdenSVM extends WindowSolana {
|
|
940
942
|
|
|
941
943
|
static __initStatic() {this.info = {
|
|
@@ -947,12 +949,12 @@
|
|
|
947
949
|
|
|
948
950
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
949
951
|
return (
|
|
950
|
-
_optionalChain$
|
|
952
|
+
_optionalChain$j([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isMagicEden])
|
|
951
953
|
)
|
|
952
954
|
};}
|
|
953
955
|
} MagicEdenSVM.__initStatic(); MagicEdenSVM.__initStatic2();
|
|
954
956
|
|
|
955
|
-
function _optionalChain$
|
|
957
|
+
function _optionalChain$i(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
956
958
|
class OKXEVM extends WindowEthereum {
|
|
957
959
|
|
|
958
960
|
static __initStatic() {this.info = {
|
|
@@ -964,12 +966,12 @@
|
|
|
964
966
|
|
|
965
967
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
966
968
|
return (
|
|
967
|
-
_optionalChain$
|
|
969
|
+
_optionalChain$i([window, 'optionalAccess', _2 => _2.okxwallet])
|
|
968
970
|
)
|
|
969
971
|
};}
|
|
970
972
|
} OKXEVM.__initStatic(); OKXEVM.__initStatic2();
|
|
971
973
|
|
|
972
|
-
function _optionalChain$
|
|
974
|
+
function _optionalChain$h(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
973
975
|
class OKXSVM extends WindowSolana {
|
|
974
976
|
|
|
975
977
|
static __initStatic() {this.info = {
|
|
@@ -981,12 +983,12 @@
|
|
|
981
983
|
|
|
982
984
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
983
985
|
return (
|
|
984
|
-
_optionalChain$
|
|
986
|
+
_optionalChain$h([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isOkxWallet])
|
|
985
987
|
)
|
|
986
988
|
};}
|
|
987
989
|
} OKXSVM.__initStatic(); OKXSVM.__initStatic2();
|
|
988
990
|
|
|
989
|
-
function _optionalChain$
|
|
991
|
+
function _optionalChain$g(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
990
992
|
class MetaMask extends WindowEthereum {
|
|
991
993
|
|
|
992
994
|
static __initStatic() {this.info = {
|
|
@@ -995,27 +997,32 @@
|
|
|
995
997
|
blockchains: supported$1.evm
|
|
996
998
|
};}
|
|
997
999
|
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}
|
|
1000
|
+
static __initStatic2() {this.isMetaMask = (provider)=> {
|
|
1001
|
+
return(
|
|
1002
|
+
_optionalChain$g([provider, 'optionalAccess', _3 => _3.isMetaMask]) &&
|
|
1003
|
+
Object.keys(provider).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1004
|
+
)
|
|
1005
|
+
};}
|
|
1005
1006
|
|
|
1006
|
-
static
|
|
1007
|
+
static __initStatic3() {this.getEip6963Provider = ()=>{
|
|
1008
|
+
return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
|
|
1009
|
+
return MetaMask.isMetaMask(provider)
|
|
1010
|
+
}) : undefined
|
|
1011
|
+
};}
|
|
1012
|
+
|
|
1013
|
+
static __initStatic4() {this.isAvailable = async()=>{
|
|
1007
1014
|
return(
|
|
1008
|
-
(
|
|
1009
|
-
|
|
1010
|
-
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1011
|
-
) || (
|
|
1012
|
-
_optionalChain$e([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.providerMap, 'optionalAccess', _19 => _19.has, 'call', _20 => _20('MetaMask')])
|
|
1013
|
-
)
|
|
1015
|
+
MetaMask.getEip6963Provider() ||
|
|
1016
|
+
MetaMask.isMetaMask(_optionalChain$g([window, 'optionalAccess', _4 => _4.ethereum]))
|
|
1014
1017
|
)
|
|
1015
1018
|
};}
|
|
1016
|
-
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
1017
1019
|
|
|
1018
|
-
|
|
1020
|
+
getProvider() {
|
|
1021
|
+
return MetaMask.getEip6963Provider() || (MetaMask.isMetaMask(_optionalChain$g([window, 'optionalAccess', _5 => _5.ethereum])) && _optionalChain$g([window, 'optionalAccess', _6 => _6.ethereum]))
|
|
1022
|
+
}
|
|
1023
|
+
} MetaMask.__initStatic(); MetaMask.__initStatic2(); MetaMask.__initStatic3(); MetaMask.__initStatic4();
|
|
1024
|
+
|
|
1025
|
+
function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1019
1026
|
class Opera extends WindowEthereum {
|
|
1020
1027
|
|
|
1021
1028
|
static __initStatic() {this.info = {
|
|
@@ -1024,10 +1031,10 @@
|
|
|
1024
1031
|
blockchains: supported$1.evm
|
|
1025
1032
|
};}
|
|
1026
1033
|
|
|
1027
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1034
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
1028
1035
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
1029
1036
|
|
|
1030
|
-
function _optionalChain$
|
|
1037
|
+
function _optionalChain$e(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1031
1038
|
class PhantomEVM extends WindowEthereum {
|
|
1032
1039
|
|
|
1033
1040
|
static __initStatic() {this.info = {
|
|
@@ -1041,13 +1048,13 @@
|
|
|
1041
1048
|
return (
|
|
1042
1049
|
window.phantom &&
|
|
1043
1050
|
window.phantom.ethereum &&
|
|
1044
|
-
! _optionalChain$
|
|
1045
|
-
! _optionalChain$
|
|
1051
|
+
! _optionalChain$e([window, 'optionalAccess', _4 => _4.ethereum, 'optionalAccess', _5 => _5.isMagicEden]) &&
|
|
1052
|
+
! _optionalChain$e([window, 'optionalAccess', _6 => _6.okxwallet])
|
|
1046
1053
|
)
|
|
1047
1054
|
};}
|
|
1048
1055
|
} PhantomEVM.__initStatic(); PhantomEVM.__initStatic2();
|
|
1049
1056
|
|
|
1050
|
-
function _optionalChain$
|
|
1057
|
+
function _optionalChain$d(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1051
1058
|
class PhantomSVM extends WindowSolana {
|
|
1052
1059
|
|
|
1053
1060
|
static __initStatic() {this.info = {
|
|
@@ -1061,16 +1068,16 @@
|
|
|
1061
1068
|
return (
|
|
1062
1069
|
window.phantom &&
|
|
1063
1070
|
!window.glow &&
|
|
1064
|
-
!_optionalChain$
|
|
1065
|
-
!_optionalChain$
|
|
1066
|
-
! _optionalChain$
|
|
1067
|
-
! _optionalChain$
|
|
1071
|
+
!_optionalChain$d([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.isGlow]) &&
|
|
1072
|
+
!_optionalChain$d([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isExodus]) &&
|
|
1073
|
+
! _optionalChain$d([window, 'optionalAccess', _12 => _12.ethereum, 'optionalAccess', _13 => _13.isMagicEden]) &&
|
|
1074
|
+
! _optionalChain$d([window, 'optionalAccess', _14 => _14.okxwallet]) &&
|
|
1068
1075
|
!['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
|
|
1069
1076
|
)
|
|
1070
1077
|
};}
|
|
1071
1078
|
} PhantomSVM.__initStatic(); PhantomSVM.__initStatic2();
|
|
1072
1079
|
|
|
1073
|
-
function _optionalChain$
|
|
1080
|
+
function _optionalChain$c(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1074
1081
|
class Rabby extends WindowEthereum {
|
|
1075
1082
|
|
|
1076
1083
|
static __initStatic() {this.info = {
|
|
@@ -1081,12 +1088,12 @@
|
|
|
1081
1088
|
|
|
1082
1089
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1083
1090
|
return(
|
|
1084
|
-
_optionalChain$
|
|
1091
|
+
_optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
|
|
1085
1092
|
)
|
|
1086
1093
|
};}
|
|
1087
1094
|
} Rabby.__initStatic(); Rabby.__initStatic2();
|
|
1088
1095
|
|
|
1089
|
-
function _optionalChain$
|
|
1096
|
+
function _optionalChain$b(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1090
1097
|
class Uniswap extends WindowEthereum {
|
|
1091
1098
|
|
|
1092
1099
|
static __initStatic() {this.info = {
|
|
@@ -1095,14 +1102,53 @@
|
|
|
1095
1102
|
blockchains: supported$1.evm
|
|
1096
1103
|
};}
|
|
1097
1104
|
|
|
1098
|
-
static __initStatic2() {this.
|
|
1105
|
+
static __initStatic2() {this.getEip6963Provider = ()=>{
|
|
1106
|
+
return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
|
|
1107
|
+
return _optionalChain$b([provider, 'optionalAccess', _4 => _4.isUniswapWallet])
|
|
1108
|
+
}) : undefined
|
|
1109
|
+
};}
|
|
1110
|
+
|
|
1111
|
+
static __initStatic3() {this.isAvailable = async()=>{
|
|
1099
1112
|
return(
|
|
1100
|
-
|
|
1113
|
+
Uniswap.getEip6963Provider() ||
|
|
1114
|
+
_optionalChain$b([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isUniswapWallet])
|
|
1101
1115
|
)
|
|
1102
1116
|
};}
|
|
1103
|
-
} Uniswap.__initStatic(); Uniswap.__initStatic2();
|
|
1104
1117
|
|
|
1105
|
-
|
|
1118
|
+
getProvider() {
|
|
1119
|
+
return Uniswap.getEip6963Provider() || (_optionalChain$b([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isUniswapWallet]) && _optionalChain$b([window, 'optionalAccess', _9 => _9.ethereum]))
|
|
1120
|
+
}
|
|
1121
|
+
} Uniswap.__initStatic(); Uniswap.__initStatic2(); Uniswap.__initStatic3();
|
|
1122
|
+
|
|
1123
|
+
function _optionalChain$a(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1124
|
+
class Rainbow extends WindowEthereum {
|
|
1125
|
+
|
|
1126
|
+
static __initStatic() {this.info = {
|
|
1127
|
+
name: 'Rainbow',
|
|
1128
|
+
logo: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNjJfMzI5KSIvPgo8cGF0aCBkPSJNMjAgMzhIMjZDNTYuOTI3OSAzOCA4MiA2My4wNzIxIDgyIDk0VjEwMEg5NEM5Ny4zMTM3IDEwMCAxMDAgOTcuMzEzNyAxMDAgOTRDMTAwIDUzLjEzMDkgNjYuODY5MSAyMCAyNiAyMEMyMi42ODYzIDIwIDIwIDIyLjY4NjMgMjAgMjZWMzhaIiBmaWxsPSJ1cmwoI3BhaW50MV9yYWRpYWxfNjJfMzI5KSIvPgo8cGF0aCBkPSJNODQgOTRIMTAwQzEwMCA5Ny4zMTM3IDk3LjMxMzcgMTAwIDk0IDEwMEg4NFY5NFoiIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl82Ml8zMjkpIi8+CjxwYXRoIGQ9Ik0yNiAyMEwyNiAzNkgyMEwyMCAyNkMyMCAyMi42ODYzIDIyLjY4NjMgMjAgMjYgMjBaIiBmaWxsPSJ1cmwoI3BhaW50M19saW5lYXJfNjJfMzI5KSIvPgo8cGF0aCBkPSJNMjAgMzZIMjZDNTguMDMyNSAzNiA4NCA2MS45Njc1IDg0IDk0VjEwMEg2NlY5NEM2NiA3MS45MDg2IDQ4LjA5MTQgNTQgMjYgNTRIMjBWMzZaIiBmaWxsPSJ1cmwoI3BhaW50NF9yYWRpYWxfNjJfMzI5KSIvPgo8cGF0aCBkPSJNNjggOTRIODRWMTAwSDY4Vjk0WiIgZmlsbD0idXJsKCNwYWludDVfbGluZWFyXzYyXzMyOSkiLz4KPHBhdGggZD0iTTIwIDUyTDIwIDM2TDI2IDM2TDI2IDUySDIwWiIgZmlsbD0idXJsKCNwYWludDZfbGluZWFyXzYyXzMyOSkiLz4KPHBhdGggZD0iTTIwIDYyQzIwIDY1LjMxMzcgMjIuNjg2MyA2OCAyNiA2OEM0MC4zNTk0IDY4IDUyIDc5LjY0MDYgNTIgOTRDNTIgOTcuMzEzNyA1NC42ODYzIDEwMCA1OCAxMDBINjhWOTRDNjggNzAuODA0IDQ5LjE5NiA1MiAyNiA1MkgyMFY2MloiIGZpbGw9InVybCgjcGFpbnQ3X3JhZGlhbF82Ml8zMjkpIi8+CjxwYXRoIGQ9Ik01MiA5NEg2OFYxMDBINThDNTQuNjg2MyAxMDAgNTIgOTcuMzEzNyA1MiA5NFoiIGZpbGw9InVybCgjcGFpbnQ4X3JhZGlhbF82Ml8zMjkpIi8+CjxwYXRoIGQ9Ik0yNiA2OEMyMi42ODYzIDY4IDIwIDY1LjMxMzcgMjAgNjJMMjAgNTJMMjYgNTJMMjYgNjhaIiBmaWxsPSJ1cmwoI3BhaW50OV9yYWRpYWxfNjJfMzI5KSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzYyXzMyOSIgeDE9IjYwIiB5MT0iMCIgeDI9IjYwIiB5Mj0iMTIwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiMxNzQyOTkiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQxX3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYgOTQpIHJvdGF0ZSgtOTApIHNjYWxlKDc0KSI+CjxzdG9wIG9mZnNldD0iMC43NzAyNzciIHN0b3AtY29sb3I9IiNGRjQwMDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQyX2xpbmVhcl82Ml8zMjkiIHgxPSI4MyIgeTE9Ijk3IiB4Mj0iMTAwIiB5Mj0iOTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM4NzU0QzkiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDNfbGluZWFyXzYyXzMyOSIgeDE9IjIzIiB5MT0iMjAiIHgyPSIyMyIgeTI9IjM3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ0X3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYgOTQpIHJvdGF0ZSgtOTApIHNjYWxlKDU4KSI+CjxzdG9wIG9mZnNldD0iMC43MjM5MjkiIHN0b3AtY29sb3I9IiNGRkY3MDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQ1X2xpbmVhcl82Ml8zMjkiIHgxPSI2OCIgeTE9Ijk3IiB4Mj0iODQiIHkyPSI5NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50Nl9saW5lYXJfNjJfMzI5IiB4MT0iMjMiIHkxPSI1MiIgeDI9IjIzIiB5Mj0iMzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk5MDEiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDdfcmFkaWFsXzYyXzMyOSIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyNiA5NCkgcm90YXRlKC05MCkgc2NhbGUoNDIpIj4KPHN0b3Agb2Zmc2V0PSIwLjU5NTEzIiBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50OF9yYWRpYWxfNjJfMzI5IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUxIDk3KSBzY2FsZSgxNyA0NS4zMzMzKSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwMEFBRkYiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ5X3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjMgNjkpIHJvdGF0ZSgtOTApIHNjYWxlKDE3IDMyMi4zNykiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=",
|
|
1129
|
+
blockchains: supported$1.evm
|
|
1130
|
+
};}
|
|
1131
|
+
|
|
1132
|
+
static __initStatic2() {this.getEip6963Provider = ()=>{
|
|
1133
|
+
return window['_eip6963Providers'] ? Object.values(window['_eip6963Providers']).find((provider)=>{
|
|
1134
|
+
return _optionalChain$a([provider, 'optionalAccess', _4 => _4.isRainbow])
|
|
1135
|
+
}) : undefined
|
|
1136
|
+
};}
|
|
1137
|
+
|
|
1138
|
+
static __initStatic3() {this.isAvailable = async()=>{
|
|
1139
|
+
return(
|
|
1140
|
+
Rainbow.getEip6963Provider() ||
|
|
1141
|
+
_optionalChain$a([window, 'optionalAccess', _5 => _5.rainbow, 'optionalAccess', _6 => _6.isRainbow])
|
|
1142
|
+
)
|
|
1143
|
+
};}
|
|
1144
|
+
|
|
1145
|
+
getProvider() {
|
|
1146
|
+
return Rainbow.getEip6963Provider() || _optionalChain$a([window, 'optionalAccess', _7 => _7.rainbow])
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
} Rainbow.__initStatic(); Rainbow.__initStatic2(); Rainbow.__initStatic3();
|
|
1150
|
+
|
|
1151
|
+
function _optionalChain$9(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1106
1152
|
|
|
1107
1153
|
|
|
1108
1154
|
const KEY$1 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
|
|
@@ -1193,8 +1239,8 @@
|
|
|
1193
1239
|
await solanaWeb3_js.transact(
|
|
1194
1240
|
async (wallet) => {
|
|
1195
1241
|
await this.authorize(wallet);
|
|
1196
|
-
if(_optionalChain$
|
|
1197
|
-
if(_optionalChain$
|
|
1242
|
+
if(_optionalChain$9([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
|
|
1243
|
+
if(_optionalChain$9([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
|
|
1198
1244
|
}
|
|
1199
1245
|
);
|
|
1200
1246
|
return this._account
|
|
@@ -1253,7 +1299,7 @@
|
|
|
1253
1299
|
}
|
|
1254
1300
|
} SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
|
|
1255
1301
|
|
|
1256
|
-
function _optionalChain$
|
|
1302
|
+
function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1257
1303
|
class Solflare extends WindowSolana {
|
|
1258
1304
|
|
|
1259
1305
|
static __initStatic() {this.info = {
|
|
@@ -1264,7 +1310,7 @@
|
|
|
1264
1310
|
|
|
1265
1311
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1266
1312
|
return (
|
|
1267
|
-
_optionalChain$
|
|
1313
|
+
_optionalChain$8([window, 'optionalAccess', _2 => _2.solflare]) &&
|
|
1268
1314
|
window.solflare.isSolflare
|
|
1269
1315
|
)
|
|
1270
1316
|
};}
|
|
@@ -1274,7 +1320,7 @@
|
|
|
1274
1320
|
_sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
|
|
1275
1321
|
} Solflare.__initStatic(); Solflare.__initStatic2();
|
|
1276
1322
|
|
|
1277
|
-
function _optionalChain$
|
|
1323
|
+
function _optionalChain$7(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1278
1324
|
class TokenPocket extends WindowEthereum {
|
|
1279
1325
|
|
|
1280
1326
|
static __initStatic() {this.info = {
|
|
@@ -1285,12 +1331,12 @@
|
|
|
1285
1331
|
|
|
1286
1332
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1287
1333
|
return (
|
|
1288
|
-
_optionalChain$
|
|
1334
|
+
_optionalChain$7([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
|
|
1289
1335
|
)
|
|
1290
1336
|
};}
|
|
1291
1337
|
} TokenPocket.__initStatic(); TokenPocket.__initStatic2();
|
|
1292
1338
|
|
|
1293
|
-
function _optionalChain$
|
|
1339
|
+
function _optionalChain$6(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1294
1340
|
class TrustEVM extends WindowEthereum {
|
|
1295
1341
|
|
|
1296
1342
|
static __initStatic() {this.info = {
|
|
@@ -1302,13 +1348,13 @@
|
|
|
1302
1348
|
|
|
1303
1349
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1304
1350
|
return (
|
|
1305
|
-
(_optionalChain$
|
|
1351
|
+
(_optionalChain$6([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$6([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
|
|
1306
1352
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1307
1353
|
)
|
|
1308
1354
|
};}
|
|
1309
1355
|
} TrustEVM.__initStatic(); TrustEVM.__initStatic2();
|
|
1310
1356
|
|
|
1311
|
-
function _optionalChain$
|
|
1357
|
+
function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1312
1358
|
class TrustSVM extends WindowSolana {
|
|
1313
1359
|
|
|
1314
1360
|
static __initStatic() {this.info = {
|
|
@@ -1319,7 +1365,7 @@
|
|
|
1319
1365
|
};}
|
|
1320
1366
|
|
|
1321
1367
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1322
|
-
return _optionalChain$
|
|
1368
|
+
return _optionalChain$5([window, 'access', _3 => _3.solana, 'optionalAccess', _4 => _4.isTrustWallet])
|
|
1323
1369
|
};}
|
|
1324
1370
|
} TrustSVM.__initStatic(); TrustSVM.__initStatic2();
|
|
1325
1371
|
|
|
@@ -1422,7 +1468,7 @@
|
|
|
1422
1468
|
}
|
|
1423
1469
|
};
|
|
1424
1470
|
|
|
1425
|
-
function _optionalChain$
|
|
1471
|
+
function _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1426
1472
|
|
|
1427
1473
|
const sendTransaction$1 = async ({ transaction, wallet })=> {
|
|
1428
1474
|
transaction = new Transaction(transaction);
|
|
@@ -1473,7 +1519,7 @@
|
|
|
1473
1519
|
try {
|
|
1474
1520
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
1475
1521
|
if(
|
|
1476
|
-
(error && _optionalChain$
|
|
1522
|
+
(error && _optionalChain$4([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
1477
1523
|
(error && error.toString().match('undefined'))
|
|
1478
1524
|
) {
|
|
1479
1525
|
setTimeout(()=>{
|
|
@@ -1487,7 +1533,7 @@
|
|
|
1487
1533
|
});
|
|
1488
1534
|
} catch (error) {
|
|
1489
1535
|
if(
|
|
1490
|
-
(error && _optionalChain$
|
|
1536
|
+
(error && _optionalChain$4([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
1491
1537
|
(error && error.toString().match('undefined'))
|
|
1492
1538
|
) {
|
|
1493
1539
|
setTimeout(()=>{
|
|
@@ -1518,7 +1564,7 @@
|
|
|
1518
1564
|
resolve(sentTransaction);
|
|
1519
1565
|
} catch (error) {
|
|
1520
1566
|
if(
|
|
1521
|
-
(error && _optionalChain$
|
|
1567
|
+
(error && _optionalChain$4([error, 'optionalAccess', _7 => _7.stack, 'optionalAccess', _8 => _8.match, 'call', _9 => _9('JSON-RPC error')])) ||
|
|
1522
1568
|
(error && error.toString().match('undefined'))
|
|
1523
1569
|
) {
|
|
1524
1570
|
setTimeout(()=>{
|
|
@@ -1560,8 +1606,8 @@
|
|
|
1560
1606
|
to: transaction.to,
|
|
1561
1607
|
value: transaction.value ? ethers.ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
|
|
1562
1608
|
data: await transaction.getData(),
|
|
1563
|
-
gas: _optionalChain$
|
|
1564
|
-
gasLimit: _optionalChain$
|
|
1609
|
+
gas: _optionalChain$4([gas, 'optionalAccess', _10 => _10.toHexString, 'call', _11 => _11()]),
|
|
1610
|
+
gasLimit: _optionalChain$4([gas, 'optionalAccess', _12 => _12.toHexString, 'call', _13 => _13()]),
|
|
1565
1611
|
gasPrice: gasPrice.toHexString(),
|
|
1566
1612
|
nonce: ethers.ethers.utils.hexlify(transaction.nonce),
|
|
1567
1613
|
}]
|
|
@@ -1588,16 +1634,16 @@
|
|
|
1588
1634
|
to: transaction.to,
|
|
1589
1635
|
value: transaction.value ? ethers.ethers.BigNumber.from(transaction.value.toString()).toHexString() : undefined,
|
|
1590
1636
|
data: '0x0',
|
|
1591
|
-
gas: _optionalChain$
|
|
1592
|
-
gasLimit: _optionalChain$
|
|
1593
|
-
gasPrice: _optionalChain$
|
|
1637
|
+
gas: _optionalChain$4([gas, 'optionalAccess', _14 => _14.toHexString, 'call', _15 => _15()]),
|
|
1638
|
+
gasLimit: _optionalChain$4([gas, 'optionalAccess', _16 => _16.toHexString, 'call', _17 => _17()]),
|
|
1639
|
+
gasPrice: _optionalChain$4([gasPrice, 'optionalAccess', _18 => _18.toHexString, 'call', _19 => _19()]),
|
|
1594
1640
|
nonce: ethers.ethers.utils.hexlify(transaction.nonce)
|
|
1595
1641
|
}]
|
|
1596
1642
|
}
|
|
1597
1643
|
}).catch((e)=>{console.log('ERROR', e);})
|
|
1598
1644
|
};
|
|
1599
1645
|
|
|
1600
|
-
function _optionalChain$
|
|
1646
|
+
function _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1601
1647
|
|
|
1602
1648
|
const KEY = 'depay:wallets:wc2';
|
|
1603
1649
|
|
|
@@ -1650,7 +1696,7 @@
|
|
|
1650
1696
|
optionalNamespaces['eip155'] = {
|
|
1651
1697
|
chains: supported$1.evm.map((blockchain)=>`${Blockchains__default['default'][blockchain].namespace}:${Blockchains__default['default'][blockchain].networkId}`),
|
|
1652
1698
|
};
|
|
1653
|
-
if(_optionalChain$
|
|
1699
|
+
if(_optionalChain$3([optionalNamespaces, 'optionalAccess', _ => _.eip155]) && _optionalChain$3([optionalNamespaces, 'optionalAccess', _2 => _2.eip155, 'optionalAccess', _3 => _3.chains, 'optionalAccess', _4 => _4.length])) {
|
|
1654
1700
|
optionalNamespaces['eip155'].methods = methods;
|
|
1655
1701
|
optionalNamespaces['eip155'].events = events;
|
|
1656
1702
|
}
|
|
@@ -1665,9 +1711,9 @@
|
|
|
1665
1711
|
projectId: localStorage[KEY+":projectId"],
|
|
1666
1712
|
metadata: {
|
|
1667
1713
|
name: document.title || 'dApp',
|
|
1668
|
-
description: _optionalChain$
|
|
1714
|
+
description: _optionalChain$3([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('meta[name="description"]'), 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8('content')]) || document.title || 'dApp',
|
|
1669
1715
|
url: location.href,
|
|
1670
|
-
icons: [_optionalChain$
|
|
1716
|
+
icons: [_optionalChain$3([document, 'access', _9 => _9.querySelector, 'call', _10 => _10("link[rel~='icon'], link[rel~='shortcut icon']"), 'optionalAccess', _11 => _11.href]) || `${location.origin}/favicon.ico`]
|
|
1671
1717
|
}
|
|
1672
1718
|
});
|
|
1673
1719
|
resolve(signClient);
|
|
@@ -1685,7 +1731,7 @@
|
|
|
1685
1731
|
};}
|
|
1686
1732
|
|
|
1687
1733
|
static __initStatic2() {this.isAvailable = async(options)=>{
|
|
1688
|
-
return !! await getLastSession(_optionalChain$
|
|
1734
|
+
return !! await getLastSession(_optionalChain$3([options, 'optionalAccess', _13 => _13.walletName]))
|
|
1689
1735
|
};}
|
|
1690
1736
|
|
|
1691
1737
|
constructor() {
|
|
@@ -1700,17 +1746,17 @@
|
|
|
1700
1746
|
}
|
|
1701
1747
|
|
|
1702
1748
|
async account() {
|
|
1703
|
-
if(_optionalChain$
|
|
1749
|
+
if(_optionalChain$3([this, 'access', _14 => _14.session, 'optionalAccess', _15 => _15.namespaces, 'optionalAccess', _16 => _16.eip155, 'optionalAccess', _17 => _17.accounts, 'optionalAccess', _18 => _18.length])) {
|
|
1704
1750
|
return this.session.namespaces.eip155.accounts[0].split(':')[2]
|
|
1705
1751
|
}
|
|
1706
1752
|
}
|
|
1707
1753
|
|
|
1708
1754
|
async setSessionBlockchains() {
|
|
1709
|
-
if(!this.session || (!_optionalChain$
|
|
1755
|
+
if(!this.session || (!_optionalChain$3([this, 'access', _19 => _19.session, 'optionalAccess', _20 => _20.namespaces, 'optionalAccess', _21 => _21.eip155]) && !_optionalChain$3([this, 'access', _22 => _22.session, 'optionalAccess', _23 => _23.optionalNamespaces, 'optionalAccess', _24 => _24.eip155]))) { return }
|
|
1710
1756
|
if(this.session.namespaces.eip155.chains) {
|
|
1711
|
-
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$
|
|
1757
|
+
this.blockchains = this.session.namespaces.eip155.chains.map((chainIdentifier)=>_optionalChain$3([Blockchains__default['default'], 'access', _25 => _25.findByNetworkId, 'call', _26 => _26(chainIdentifier.split(':')[1]), 'optionalAccess', _27 => _27.name])).filter(Boolean);
|
|
1712
1758
|
} else if(this.session.namespaces.eip155.accounts) {
|
|
1713
|
-
this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$
|
|
1759
|
+
this.blockchains = this.session.namespaces.eip155.accounts.map((accountIdentifier)=>_optionalChain$3([Blockchains__default['default'], 'access', _28 => _28.findByNetworkId, 'call', _29 => _29(accountIdentifier.split(':')[1]), 'optionalAccess', _30 => _30.name])).filter(Boolean);
|
|
1714
1760
|
}
|
|
1715
1761
|
}
|
|
1716
1762
|
|
|
@@ -1720,13 +1766,13 @@
|
|
|
1720
1766
|
|
|
1721
1767
|
try {
|
|
1722
1768
|
|
|
1723
|
-
this.walletName = _optionalChain$
|
|
1769
|
+
this.walletName = _optionalChain$3([options, 'optionalAccess', _31 => _31.name]);
|
|
1724
1770
|
|
|
1725
1771
|
// delete localStorage[`wc@2:client:0.3//session`] // DELETE WC SESSIONS
|
|
1726
1772
|
this.signClient = await getSignClient();
|
|
1727
1773
|
|
|
1728
1774
|
this.signClient.on("session_delete", (session)=> {
|
|
1729
|
-
if(_optionalChain$
|
|
1775
|
+
if(_optionalChain$3([session, 'optionalAccess', _32 => _32.topic]) === _optionalChain$3([this, 'access', _33 => _33.session, 'optionalAccess', _34 => _34.topic])) {
|
|
1730
1776
|
localStorage[KEY+':name'] = undefined;
|
|
1731
1777
|
localStorage[KEY+':logo'] = undefined;
|
|
1732
1778
|
this.signClient = undefined;
|
|
@@ -1735,14 +1781,14 @@
|
|
|
1735
1781
|
});
|
|
1736
1782
|
|
|
1737
1783
|
this.signClient.on("session_update", async(session)=> {
|
|
1738
|
-
if(_optionalChain$
|
|
1784
|
+
if(_optionalChain$3([session, 'optionalAccess', _35 => _35.topic]) === _optionalChain$3([this, 'access', _36 => _36.session, 'optionalAccess', _37 => _37.topic])) {
|
|
1739
1785
|
this.session = this.signClient.session.get(session.topic);
|
|
1740
1786
|
await this.setSessionBlockchains();
|
|
1741
1787
|
}
|
|
1742
1788
|
});
|
|
1743
1789
|
|
|
1744
1790
|
this.signClient.on("session_event", (event)=> {
|
|
1745
|
-
if(_optionalChain$
|
|
1791
|
+
if(_optionalChain$3([event, 'optionalAccess', _38 => _38.topic]) === _optionalChain$3([this, 'access', _39 => _39.session, 'optionalAccess', _40 => _40.topic])) {}
|
|
1746
1792
|
});
|
|
1747
1793
|
|
|
1748
1794
|
const connectWallet = async()=>{
|
|
@@ -1753,24 +1799,24 @@
|
|
|
1753
1799
|
await new Promise(resolve=>setTimeout(resolve, 500)); // to prevent race condition within WalletConnect
|
|
1754
1800
|
};
|
|
1755
1801
|
|
|
1756
|
-
const lastSession = _optionalChain$
|
|
1802
|
+
const lastSession = _optionalChain$3([this, 'optionalAccess', _41 => _41.walletName, 'optionalAccess', _42 => _42.length]) ? await getLastSession(this.walletName) : undefined;
|
|
1757
1803
|
if(lastSession) {
|
|
1758
1804
|
this.session = lastSession;
|
|
1759
1805
|
} else {
|
|
1760
1806
|
await connectWallet();
|
|
1761
1807
|
}
|
|
1762
1808
|
|
|
1763
|
-
let meta = _optionalChain$
|
|
1809
|
+
let meta = _optionalChain$3([this, 'access', _43 => _43.session, 'optionalAccess', _44 => _44.peer, 'optionalAccess', _45 => _45.metadata]);
|
|
1764
1810
|
if(meta && meta.name) {
|
|
1765
1811
|
this.name = meta.name;
|
|
1766
1812
|
localStorage[KEY+':name'] = meta.name;
|
|
1767
|
-
if(_optionalChain$
|
|
1813
|
+
if(_optionalChain$3([meta, 'optionalAccess', _46 => _46.icons]) && meta.icons.length) {
|
|
1768
1814
|
this.logo = meta.icons[0];
|
|
1769
1815
|
localStorage[KEY+':logo'] = this.logo;
|
|
1770
1816
|
}
|
|
1771
1817
|
}
|
|
1772
|
-
if(_optionalChain$
|
|
1773
|
-
if(_optionalChain$
|
|
1818
|
+
if(_optionalChain$3([options, 'optionalAccess', _47 => _47.name])) { localStorage[KEY+':name'] = this.name = options.name; }
|
|
1819
|
+
if(_optionalChain$3([options, 'optionalAccess', _48 => _48.logo])) { localStorage[KEY+':logo'] = this.logo = options.logo; }
|
|
1774
1820
|
|
|
1775
1821
|
await this.setSessionBlockchains();
|
|
1776
1822
|
|
|
@@ -1810,7 +1856,7 @@
|
|
|
1810
1856
|
switch (event) {
|
|
1811
1857
|
case 'account':
|
|
1812
1858
|
internalCallback = async(event)=> {
|
|
1813
|
-
if(_optionalChain$
|
|
1859
|
+
if(_optionalChain$3([event, 'optionalAccess', _49 => _49.topic]) === _optionalChain$3([this, 'access', _50 => _50.session, 'optionalAccess', _51 => _51.topic]) && event.params.event.name === 'accountsChanged') {
|
|
1814
1860
|
callback(await this.account());
|
|
1815
1861
|
}
|
|
1816
1862
|
};
|
|
@@ -1870,7 +1916,7 @@
|
|
|
1870
1916
|
|
|
1871
1917
|
WalletConnectV2.getConnectedInstance = getConnectedInstance$1;
|
|
1872
1918
|
|
|
1873
|
-
function _optionalChain$
|
|
1919
|
+
function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1874
1920
|
const sendTransaction = async ({ transaction, wallet })=> {
|
|
1875
1921
|
transaction = new Transaction(transaction);
|
|
1876
1922
|
if((await wallet.connectedTo(transaction.blockchain)) == false) {
|
|
@@ -1922,7 +1968,7 @@
|
|
|
1922
1968
|
|
|
1923
1969
|
sentTransaction.wait(1).then(resolve).catch((error)=>{
|
|
1924
1970
|
if(
|
|
1925
|
-
(error && _optionalChain$
|
|
1971
|
+
(error && _optionalChain$2([error, 'optionalAccess', _ => _.stack, 'optionalAccess', _2 => _2.match, 'call', _3 => _3('JSON-RPC error')])) ||
|
|
1926
1972
|
(error && error.toString().match('undefined'))
|
|
1927
1973
|
) {
|
|
1928
1974
|
setTimeout(()=>{
|
|
@@ -1936,7 +1982,7 @@
|
|
|
1936
1982
|
});
|
|
1937
1983
|
} catch(error) {
|
|
1938
1984
|
if(
|
|
1939
|
-
(error && _optionalChain$
|
|
1985
|
+
(error && _optionalChain$2([error, 'optionalAccess', _4 => _4.stack, 'optionalAccess', _5 => _5.match, 'call', _6 => _6('JSON-RPC error')])) ||
|
|
1940
1986
|
(error && error.toString().match('undefined'))
|
|
1941
1987
|
) {
|
|
1942
1988
|
setTimeout(()=>{
|
|
@@ -1981,7 +2027,7 @@
|
|
|
1981
2027
|
})
|
|
1982
2028
|
};
|
|
1983
2029
|
|
|
1984
|
-
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2030
|
+
function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1985
2031
|
|
|
1986
2032
|
const getConnectedInstance = ()=>{
|
|
1987
2033
|
return window._connectedWalletLinkInstance
|
|
@@ -2035,10 +2081,10 @@
|
|
|
2035
2081
|
let connect = (options && options.connect) ? options.connect : ({uri})=>{};
|
|
2036
2082
|
await connect({ uri: this.connector.qrUrl });
|
|
2037
2083
|
|
|
2038
|
-
_optionalChain([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
|
|
2039
|
-
_optionalChain([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('.-cbwsdk-extension-dialog-container'), 'optionalAccess', _7 => _7.setAttribute, 'call', _8 => _8('style', 'display: none;')]);
|
|
2084
|
+
_optionalChain$1([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
|
|
2085
|
+
_optionalChain$1([document, 'access', _5 => _5.querySelector, 'call', _6 => _6('.-cbwsdk-extension-dialog-container'), 'optionalAccess', _7 => _7.setAttribute, 'call', _8 => _8('style', 'display: none;')]);
|
|
2040
2086
|
setTimeout(()=>{
|
|
2041
|
-
if(_optionalChain([this, 'optionalAccess', _9 => _9.connector, 'optionalAccess', _10 => _10._relay, 'optionalAccess', _11 => _11.ui, 'optionalAccess', _12 => _12.linkFlow, 'optionalAccess', _13 => _13.isOpen])){
|
|
2087
|
+
if(_optionalChain$1([this, 'optionalAccess', _9 => _9.connector, 'optionalAccess', _10 => _10._relay, 'optionalAccess', _11 => _11.ui, 'optionalAccess', _12 => _12.linkFlow, 'optionalAccess', _13 => _13.isOpen])){
|
|
2042
2088
|
this.connector._relay.ui.linkFlow.isOpen = false;
|
|
2043
2089
|
}
|
|
2044
2090
|
}, 10);
|
|
@@ -2170,6 +2216,7 @@
|
|
|
2170
2216
|
Solflare,
|
|
2171
2217
|
Rabby,
|
|
2172
2218
|
Uniswap,
|
|
2219
|
+
Rainbow,
|
|
2173
2220
|
BraveEVM,
|
|
2174
2221
|
BraveSVM,
|
|
2175
2222
|
MagicEdenEVM,
|
|
@@ -2193,10 +2240,22 @@
|
|
|
2193
2240
|
WalletLink
|
|
2194
2241
|
};
|
|
2195
2242
|
|
|
2243
|
+
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2196
2244
|
const getWallets = async(args)=>{
|
|
2197
2245
|
|
|
2198
2246
|
let drip = (args && typeof args.drip === 'function') ? args.drip : undefined;
|
|
2199
2247
|
|
|
2248
|
+
// eip6963
|
|
2249
|
+
window['_eip6963Providers'] = {};
|
|
2250
|
+
const announceProvider = (event)=>{
|
|
2251
|
+
if(_optionalChain([event, 'optionalAccess', _ => _.detail, 'optionalAccess', _2 => _2.info, 'optionalAccess', _3 => _3.uuid])) {
|
|
2252
|
+
window['_eip6963Providers'][_optionalChain([event, 'optionalAccess', _4 => _4.detail, 'optionalAccess', _5 => _5.info, 'optionalAccess', _6 => _6.uuid])] = event.detail.provider;
|
|
2253
|
+
}
|
|
2254
|
+
};
|
|
2255
|
+
window.addEventListener("eip6963:announceProvider", announceProvider);
|
|
2256
|
+
window.dispatchEvent(new Event("eip6963:requestProvider"));
|
|
2257
|
+
window.removeEventListener("eip6963:announceProvider", announceProvider);
|
|
2258
|
+
|
|
2200
2259
|
let availableWallets = await Promise.all(
|
|
2201
2260
|
|
|
2202
2261
|
Object.keys(wallets).map(
|
|
@@ -2238,6 +2297,7 @@
|
|
|
2238
2297
|
wallets.Solflare,
|
|
2239
2298
|
wallets.Rabby,
|
|
2240
2299
|
wallets.Uniswap,
|
|
2300
|
+
wallets.Rainbow,
|
|
2241
2301
|
wallets.BraveEVM,
|
|
2242
2302
|
wallets.BraveSVM,
|
|
2243
2303
|
wallets.Opera,
|