@depay/web3-wallets-evm 16.0.5 → 16.0.7
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 +93 -42
- package/dist/esm/index.js +93 -42
- package/dist/esm/index.solana.js +93 -42
- package/dist/umd/index.evm.js +93 -42
- package/dist/umd/index.js +93 -42
- package/dist/umd/index.solana.js +93 -42
- 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$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; }
|
|
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$n([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$n([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$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; }
|
|
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$m([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$m([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'];
|
|
266
266
|
supported$1.solana = ['solana'];
|
|
267
267
|
|
|
268
|
-
function _optionalChain$
|
|
268
|
+
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; }
|
|
269
269
|
class WindowSolana {
|
|
270
270
|
|
|
271
271
|
static __initStatic() {this.info = {
|
|
@@ -276,9 +276,14 @@
|
|
|
276
276
|
|
|
277
277
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
278
278
|
return (
|
|
279
|
-
_optionalChain$
|
|
280
|
-
|
|
279
|
+
_optionalChain$l([window, 'optionalAccess', _5 => _5.solana]) &&
|
|
280
|
+
// not Phantom
|
|
281
|
+
!(window.phantom && !window.glow && !window.solana.isGlow && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
282
|
+
// not Coin98
|
|
281
283
|
!window.coin98 &&
|
|
284
|
+
// not BitKeep
|
|
285
|
+
!(_optionalChain$l([window, 'optionalAccess', _6 => _6.solana]) && _optionalChain$l([window, 'optionalAccess', _7 => _7.solana, 'access', _8 => _8.isBitKeep])) &&
|
|
286
|
+
// not Glow
|
|
282
287
|
!window.solana.isGlow
|
|
283
288
|
)
|
|
284
289
|
};}
|
|
@@ -326,7 +331,7 @@
|
|
|
326
331
|
let internalCallback;
|
|
327
332
|
switch (event) {
|
|
328
333
|
case 'account':
|
|
329
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
334
|
+
internalCallback = (publicKey) => callback(_optionalChain$l([publicKey, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]));
|
|
330
335
|
this.getProvider().on('accountChanged', internalCallback);
|
|
331
336
|
break
|
|
332
337
|
}
|
|
@@ -379,7 +384,7 @@
|
|
|
379
384
|
}
|
|
380
385
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
381
386
|
|
|
382
|
-
function _optionalChain$
|
|
387
|
+
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; }
|
|
383
388
|
class Backpack extends WindowSolana {
|
|
384
389
|
|
|
385
390
|
static __initStatic() {this.info = {
|
|
@@ -390,7 +395,7 @@
|
|
|
390
395
|
|
|
391
396
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
392
397
|
return (
|
|
393
|
-
_optionalChain$
|
|
398
|
+
_optionalChain$k([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
394
399
|
window.backpack.isBackpack
|
|
395
400
|
)
|
|
396
401
|
};}
|
|
@@ -485,7 +490,7 @@
|
|
|
485
490
|
})
|
|
486
491
|
};
|
|
487
492
|
|
|
488
|
-
function _optionalChain$
|
|
493
|
+
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; }
|
|
489
494
|
class WindowEthereum {
|
|
490
495
|
|
|
491
496
|
static __initStatic() {this.info = {
|
|
@@ -496,18 +501,29 @@
|
|
|
496
501
|
|
|
497
502
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
498
503
|
return (
|
|
499
|
-
_optionalChain$
|
|
500
|
-
|
|
501
|
-
!_optionalChain$
|
|
502
|
-
|
|
503
|
-
!_optionalChain$
|
|
504
|
-
|
|
505
|
-
!_optionalChain$
|
|
506
|
-
|
|
507
|
-
!_optionalChain$
|
|
508
|
-
|
|
509
|
-
!_optionalChain$
|
|
510
|
-
|
|
504
|
+
_optionalChain$j([window, 'optionalAccess', _27 => _27.ethereum]) &&
|
|
505
|
+
// not MetaMask
|
|
506
|
+
!(_optionalChain$j([window, 'optionalAccess', _28 => _28.ethereum, 'optionalAccess', _29 => _29.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
|
|
507
|
+
// not Coin98
|
|
508
|
+
!_optionalChain$j([window, 'optionalAccess', _30 => _30.coin98]) &&
|
|
509
|
+
// not Trust Wallet
|
|
510
|
+
!(_optionalChain$j([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isTrust]) || _optionalChain$j([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isTrustWallet])) &&
|
|
511
|
+
// not crypto.com
|
|
512
|
+
!_optionalChain$j([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isDeficonnectProvider]) &&
|
|
513
|
+
// not HyperPay
|
|
514
|
+
!_optionalChain$j([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isHyperPay]) &&
|
|
515
|
+
// not Phantom
|
|
516
|
+
!(window.phantom && !window.glow && !_optionalChain$j([window, 'optionalAccess', _39 => _39.solana, 'optionalAccess', _40 => _40.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
517
|
+
// not Rabby
|
|
518
|
+
!_optionalChain$j([window, 'optionalAccess', _41 => _41.ethereum, 'optionalAccess', _42 => _42.isRabby]) &&
|
|
519
|
+
// not Backpack
|
|
520
|
+
!_optionalChain$j([window, 'optionalAccess', _43 => _43.backpack, 'optionalAccess', _44 => _44.isBackpack]) &&
|
|
521
|
+
// not TokenPocket
|
|
522
|
+
!_optionalChain$j([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isTokenPocket]) &&
|
|
523
|
+
// not BitKeep
|
|
524
|
+
!_optionalChain$j([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isBitKeep]) &&
|
|
525
|
+
// not Coinbase
|
|
526
|
+
!(_optionalChain$j([window, 'optionalAccess', _49 => _49.ethereum, 'optionalAccess', _50 => _50.isCoinbaseWallet]) || _optionalChain$j([window, 'optionalAccess', _51 => _51.ethereum, 'optionalAccess', _52 => _52.isWalletLink]))
|
|
511
527
|
)
|
|
512
528
|
};}
|
|
513
529
|
|
|
@@ -633,7 +649,7 @@
|
|
|
633
649
|
}
|
|
634
650
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
635
651
|
|
|
636
|
-
function _optionalChain$
|
|
652
|
+
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; }
|
|
637
653
|
class Binance extends WindowEthereum {
|
|
638
654
|
|
|
639
655
|
static __initStatic() {this.info = {
|
|
@@ -643,7 +659,7 @@
|
|
|
643
659
|
};}
|
|
644
660
|
|
|
645
661
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
646
|
-
return _optionalChain$
|
|
662
|
+
return _optionalChain$i([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
647
663
|
!window.coin98
|
|
648
664
|
};}
|
|
649
665
|
|
|
@@ -651,7 +667,7 @@
|
|
|
651
667
|
|
|
652
668
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
653
669
|
|
|
654
|
-
function _optionalChain$
|
|
670
|
+
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; }
|
|
655
671
|
class Brave extends WindowEthereum {
|
|
656
672
|
|
|
657
673
|
static __initStatic() {this.info = {
|
|
@@ -660,10 +676,10 @@
|
|
|
660
676
|
blockchains: supported$1.evm
|
|
661
677
|
};}
|
|
662
678
|
|
|
663
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
679
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
664
680
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
665
681
|
|
|
666
|
-
function _optionalChain$
|
|
682
|
+
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; }
|
|
667
683
|
class Coin98 extends WindowEthereum {
|
|
668
684
|
|
|
669
685
|
static __initStatic() {this.info = {
|
|
@@ -672,10 +688,10 @@
|
|
|
672
688
|
blockchains: supported$1.evm
|
|
673
689
|
};}
|
|
674
690
|
|
|
675
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
691
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
676
692
|
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
677
693
|
|
|
678
|
-
function _optionalChain$
|
|
694
|
+
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; }
|
|
679
695
|
class Coinbase extends WindowEthereum {
|
|
680
696
|
|
|
681
697
|
static __initStatic() {this.info = {
|
|
@@ -684,10 +700,10 @@
|
|
|
684
700
|
blockchains: supported$1.evm
|
|
685
701
|
};}
|
|
686
702
|
|
|
687
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
703
|
+
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$f([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isCoinbaseWallet]) || _optionalChain$f([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isWalletLink])) };}
|
|
688
704
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
689
705
|
|
|
690
|
-
function _optionalChain$
|
|
706
|
+
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; }
|
|
691
707
|
class CryptoCom extends WindowEthereum {
|
|
692
708
|
|
|
693
709
|
static __initStatic() {this.info = {
|
|
@@ -696,7 +712,7 @@
|
|
|
696
712
|
blockchains: supported$1.evm
|
|
697
713
|
};}
|
|
698
714
|
|
|
699
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
715
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
700
716
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
701
717
|
|
|
702
718
|
class Glow extends WindowSolana {
|
|
@@ -715,7 +731,7 @@
|
|
|
715
731
|
};}
|
|
716
732
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
717
733
|
|
|
718
|
-
function _optionalChain$
|
|
734
|
+
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; }
|
|
719
735
|
class HyperPay extends WindowEthereum {
|
|
720
736
|
|
|
721
737
|
static __initStatic() {this.info = {
|
|
@@ -724,10 +740,10 @@
|
|
|
724
740
|
blockchains: supported$1.evm
|
|
725
741
|
};}
|
|
726
742
|
|
|
727
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
743
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
728
744
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
729
745
|
|
|
730
|
-
function _optionalChain$
|
|
746
|
+
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; }
|
|
731
747
|
class MetaMask extends WindowEthereum {
|
|
732
748
|
|
|
733
749
|
static __initStatic() {this.info = {
|
|
@@ -738,13 +754,13 @@
|
|
|
738
754
|
|
|
739
755
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
740
756
|
return(
|
|
741
|
-
_optionalChain$
|
|
757
|
+
_optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
|
|
742
758
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
743
759
|
)
|
|
744
760
|
};}
|
|
745
761
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
746
762
|
|
|
747
|
-
function _optionalChain$
|
|
763
|
+
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; }
|
|
748
764
|
class Opera extends WindowEthereum {
|
|
749
765
|
|
|
750
766
|
static __initStatic() {this.info = {
|
|
@@ -753,9 +769,10 @@
|
|
|
753
769
|
blockchains: supported$1.evm
|
|
754
770
|
};}
|
|
755
771
|
|
|
756
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
772
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
757
773
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
758
774
|
|
|
775
|
+
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; }
|
|
759
776
|
class Phantom extends WindowSolana {
|
|
760
777
|
|
|
761
778
|
static __initStatic() {this.info = {
|
|
@@ -766,7 +783,10 @@
|
|
|
766
783
|
|
|
767
784
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
768
785
|
return (
|
|
769
|
-
window.phantom &&
|
|
786
|
+
window.phantom &&
|
|
787
|
+
!window.glow &&
|
|
788
|
+
!_optionalChain$a([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isGlow]) &&
|
|
789
|
+
!['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
|
|
770
790
|
)
|
|
771
791
|
};}
|
|
772
792
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
|
@@ -1624,6 +1644,36 @@
|
|
|
1624
1644
|
]
|
|
1625
1645
|
},
|
|
1626
1646
|
|
|
1647
|
+
"BitGet (BitKeep)": {
|
|
1648
|
+
methods: [
|
|
1649
|
+
"eth_sendTransaction",
|
|
1650
|
+
"personal_sign",
|
|
1651
|
+
"eth_signTypedData",
|
|
1652
|
+
"eth_signTypedData_v4",
|
|
1653
|
+
],
|
|
1654
|
+
requiredNamespaces: {
|
|
1655
|
+
eip155: {
|
|
1656
|
+
chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'optimism'].map((blockchainName)=>`eip155:${Blockchains__default['default'][blockchainName].networkId}`)
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
optionalNamespaces: {},
|
|
1660
|
+
},
|
|
1661
|
+
|
|
1662
|
+
"BitGet": {
|
|
1663
|
+
methods: [
|
|
1664
|
+
"eth_sendTransaction",
|
|
1665
|
+
"personal_sign",
|
|
1666
|
+
"eth_signTypedData",
|
|
1667
|
+
"eth_signTypedData_v4",
|
|
1668
|
+
],
|
|
1669
|
+
requiredNamespaces: {
|
|
1670
|
+
eip155: {
|
|
1671
|
+
chains: ['ethereum', 'bsc', 'polygon', 'arbitrum', 'optimism'].map((blockchainName)=>`eip155:${Blockchains__default['default'][blockchainName].networkId}`)
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
optionalNamespaces: {},
|
|
1675
|
+
},
|
|
1676
|
+
|
|
1627
1677
|
"Uniswap Wallet": {
|
|
1628
1678
|
methods: [
|
|
1629
1679
|
"eth_sendTransaction",
|
|
@@ -1758,6 +1808,7 @@
|
|
|
1758
1808
|
}
|
|
1759
1809
|
|
|
1760
1810
|
async setSessionBlockchains() {
|
|
1811
|
+
if(!this.session) { return }
|
|
1761
1812
|
if(_optionalChain$1([CONFIGURATIONS, 'access', _27 => _27[this.walletName], 'optionalAccess', _28 => _28.methods, 'optionalAccess', _29 => _29.includes, 'call', _30 => _30('wallet_switchEthereumChain')])) {
|
|
1762
1813
|
this.blockchains = [this.session.namespaces.eip155.chains[this.session.namespaces.eip155.chains.length-1]].map((chainIdentifier)=>_optionalChain$1([Blockchains__default['default'], 'access', _31 => _31.findByNetworkId, 'call', _32 => _32(chainIdentifier.split(':')[1]), 'optionalAccess', _33 => _33.name])).filter(Boolean);
|
|
1763
1814
|
} else if(this.session.namespaces.eip155.chains) {
|