@depay/web3-wallets-evm 16.0.5 → 16.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.evm.js +58 -42
- package/dist/esm/index.js +58 -42
- package/dist/esm/index.solana.js +58 -42
- package/dist/umd/index.evm.js +58 -42
- package/dist/umd/index.js +58 -42
- package/dist/umd/index.solana.js +58 -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,12 @@
|
|
|
276
276
|
|
|
277
277
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
278
278
|
return (
|
|
279
|
-
_optionalChain$
|
|
280
|
-
|
|
279
|
+
_optionalChain$l([window, 'optionalAccess', _2 => _2.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 Glow
|
|
282
285
|
!window.solana.isGlow
|
|
283
286
|
)
|
|
284
287
|
};}
|
|
@@ -326,7 +329,7 @@
|
|
|
326
329
|
let internalCallback;
|
|
327
330
|
switch (event) {
|
|
328
331
|
case 'account':
|
|
329
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
332
|
+
internalCallback = (publicKey) => callback(_optionalChain$l([publicKey, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]));
|
|
330
333
|
this.getProvider().on('accountChanged', internalCallback);
|
|
331
334
|
break
|
|
332
335
|
}
|
|
@@ -379,7 +382,7 @@
|
|
|
379
382
|
}
|
|
380
383
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
381
384
|
|
|
382
|
-
function _optionalChain$
|
|
385
|
+
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
386
|
class Backpack extends WindowSolana {
|
|
384
387
|
|
|
385
388
|
static __initStatic() {this.info = {
|
|
@@ -390,7 +393,7 @@
|
|
|
390
393
|
|
|
391
394
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
392
395
|
return (
|
|
393
|
-
_optionalChain$
|
|
396
|
+
_optionalChain$k([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
394
397
|
window.backpack.isBackpack
|
|
395
398
|
)
|
|
396
399
|
};}
|
|
@@ -485,7 +488,7 @@
|
|
|
485
488
|
})
|
|
486
489
|
};
|
|
487
490
|
|
|
488
|
-
function _optionalChain$
|
|
491
|
+
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
492
|
class WindowEthereum {
|
|
490
493
|
|
|
491
494
|
static __initStatic() {this.info = {
|
|
@@ -496,18 +499,27 @@
|
|
|
496
499
|
|
|
497
500
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
498
501
|
return (
|
|
499
|
-
_optionalChain$
|
|
500
|
-
|
|
501
|
-
!_optionalChain$
|
|
502
|
-
|
|
503
|
-
!_optionalChain$
|
|
504
|
-
|
|
505
|
-
!_optionalChain$
|
|
506
|
-
|
|
507
|
-
!_optionalChain$
|
|
508
|
-
|
|
509
|
-
!_optionalChain$
|
|
510
|
-
|
|
502
|
+
_optionalChain$j([window, 'optionalAccess', _25 => _25.ethereum]) &&
|
|
503
|
+
// not MetaMask
|
|
504
|
+
!(_optionalChain$j([window, 'optionalAccess', _26 => _26.ethereum, 'optionalAccess', _27 => _27.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
|
|
505
|
+
// not Coin98
|
|
506
|
+
!_optionalChain$j([window, 'optionalAccess', _28 => _28.coin98]) &&
|
|
507
|
+
// not Trust Wallet
|
|
508
|
+
!(_optionalChain$j([window, 'optionalAccess', _29 => _29.ethereum, 'optionalAccess', _30 => _30.isTrust]) || _optionalChain$j([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isTrustWallet])) &&
|
|
509
|
+
// not crypto.com
|
|
510
|
+
!_optionalChain$j([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isDeficonnectProvider]) &&
|
|
511
|
+
// not HyperPay
|
|
512
|
+
!_optionalChain$j([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isHyperPay]) &&
|
|
513
|
+
// not Phantom
|
|
514
|
+
!(window.phantom && !window.glow && !_optionalChain$j([window, 'optionalAccess', _37 => _37.solana, 'optionalAccess', _38 => _38.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
515
|
+
// not Rabby
|
|
516
|
+
!_optionalChain$j([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isRabby]) &&
|
|
517
|
+
// not Backpack
|
|
518
|
+
!_optionalChain$j([window, 'optionalAccess', _41 => _41.backpack, 'optionalAccess', _42 => _42.isBackpack]) &&
|
|
519
|
+
// not TokenPocket
|
|
520
|
+
!_optionalChain$j([window, 'optionalAccess', _43 => _43.ethereum, 'optionalAccess', _44 => _44.isTokenPocket]) &&
|
|
521
|
+
// not Coinbase
|
|
522
|
+
!(_optionalChain$j([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isCoinbaseWallet]) || _optionalChain$j([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isWalletLink]))
|
|
511
523
|
)
|
|
512
524
|
};}
|
|
513
525
|
|
|
@@ -633,7 +645,7 @@
|
|
|
633
645
|
}
|
|
634
646
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
635
647
|
|
|
636
|
-
function _optionalChain$
|
|
648
|
+
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
649
|
class Binance extends WindowEthereum {
|
|
638
650
|
|
|
639
651
|
static __initStatic() {this.info = {
|
|
@@ -643,7 +655,7 @@
|
|
|
643
655
|
};}
|
|
644
656
|
|
|
645
657
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
646
|
-
return _optionalChain$
|
|
658
|
+
return _optionalChain$i([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
647
659
|
!window.coin98
|
|
648
660
|
};}
|
|
649
661
|
|
|
@@ -651,7 +663,7 @@
|
|
|
651
663
|
|
|
652
664
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
653
665
|
|
|
654
|
-
function _optionalChain$
|
|
666
|
+
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
667
|
class Brave extends WindowEthereum {
|
|
656
668
|
|
|
657
669
|
static __initStatic() {this.info = {
|
|
@@ -660,10 +672,10 @@
|
|
|
660
672
|
blockchains: supported$1.evm
|
|
661
673
|
};}
|
|
662
674
|
|
|
663
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
675
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
664
676
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
665
677
|
|
|
666
|
-
function _optionalChain$
|
|
678
|
+
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
679
|
class Coin98 extends WindowEthereum {
|
|
668
680
|
|
|
669
681
|
static __initStatic() {this.info = {
|
|
@@ -672,10 +684,10 @@
|
|
|
672
684
|
blockchains: supported$1.evm
|
|
673
685
|
};}
|
|
674
686
|
|
|
675
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
687
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
676
688
|
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
677
689
|
|
|
678
|
-
function _optionalChain$
|
|
690
|
+
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
691
|
class Coinbase extends WindowEthereum {
|
|
680
692
|
|
|
681
693
|
static __initStatic() {this.info = {
|
|
@@ -684,10 +696,10 @@
|
|
|
684
696
|
blockchains: supported$1.evm
|
|
685
697
|
};}
|
|
686
698
|
|
|
687
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
699
|
+
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
700
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
689
701
|
|
|
690
|
-
function _optionalChain$
|
|
702
|
+
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
703
|
class CryptoCom extends WindowEthereum {
|
|
692
704
|
|
|
693
705
|
static __initStatic() {this.info = {
|
|
@@ -696,7 +708,7 @@
|
|
|
696
708
|
blockchains: supported$1.evm
|
|
697
709
|
};}
|
|
698
710
|
|
|
699
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
711
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
700
712
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
701
713
|
|
|
702
714
|
class Glow extends WindowSolana {
|
|
@@ -715,7 +727,7 @@
|
|
|
715
727
|
};}
|
|
716
728
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
717
729
|
|
|
718
|
-
function _optionalChain$
|
|
730
|
+
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
731
|
class HyperPay extends WindowEthereum {
|
|
720
732
|
|
|
721
733
|
static __initStatic() {this.info = {
|
|
@@ -724,10 +736,10 @@
|
|
|
724
736
|
blockchains: supported$1.evm
|
|
725
737
|
};}
|
|
726
738
|
|
|
727
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
739
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
728
740
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
729
741
|
|
|
730
|
-
function _optionalChain$
|
|
742
|
+
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
743
|
class MetaMask extends WindowEthereum {
|
|
732
744
|
|
|
733
745
|
static __initStatic() {this.info = {
|
|
@@ -738,13 +750,13 @@
|
|
|
738
750
|
|
|
739
751
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
740
752
|
return(
|
|
741
|
-
_optionalChain$
|
|
753
|
+
_optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
|
|
742
754
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
743
755
|
)
|
|
744
756
|
};}
|
|
745
757
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
746
758
|
|
|
747
|
-
function _optionalChain$
|
|
759
|
+
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
760
|
class Opera extends WindowEthereum {
|
|
749
761
|
|
|
750
762
|
static __initStatic() {this.info = {
|
|
@@ -753,9 +765,10 @@
|
|
|
753
765
|
blockchains: supported$1.evm
|
|
754
766
|
};}
|
|
755
767
|
|
|
756
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
768
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
757
769
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
758
770
|
|
|
771
|
+
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
772
|
class Phantom extends WindowSolana {
|
|
760
773
|
|
|
761
774
|
static __initStatic() {this.info = {
|
|
@@ -766,7 +779,10 @@
|
|
|
766
779
|
|
|
767
780
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
768
781
|
return (
|
|
769
|
-
window.phantom &&
|
|
782
|
+
window.phantom &&
|
|
783
|
+
!window.glow &&
|
|
784
|
+
!_optionalChain$a([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isGlow]) &&
|
|
785
|
+
!['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
|
|
770
786
|
)
|
|
771
787
|
};}
|
|
772
788
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
package/dist/umd/index.solana.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 web3ClientSolana.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$2.evm = [];
|
|
266
266
|
supported$2.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,12 @@
|
|
|
276
276
|
|
|
277
277
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
278
278
|
return (
|
|
279
|
-
_optionalChain$
|
|
280
|
-
|
|
279
|
+
_optionalChain$l([window, 'optionalAccess', _2 => _2.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 Glow
|
|
282
285
|
!window.solana.isGlow
|
|
283
286
|
)
|
|
284
287
|
};}
|
|
@@ -326,7 +329,7 @@
|
|
|
326
329
|
let internalCallback;
|
|
327
330
|
switch (event) {
|
|
328
331
|
case 'account':
|
|
329
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
332
|
+
internalCallback = (publicKey) => callback(_optionalChain$l([publicKey, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]));
|
|
330
333
|
this.getProvider().on('accountChanged', internalCallback);
|
|
331
334
|
break
|
|
332
335
|
}
|
|
@@ -1215,7 +1218,7 @@
|
|
|
1215
1218
|
})
|
|
1216
1219
|
};
|
|
1217
1220
|
|
|
1218
|
-
function _optionalChain$
|
|
1221
|
+
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; }
|
|
1219
1222
|
class Backpack extends WindowSolana {
|
|
1220
1223
|
|
|
1221
1224
|
static __initStatic() {this.info = {
|
|
@@ -1226,7 +1229,7 @@
|
|
|
1226
1229
|
|
|
1227
1230
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1228
1231
|
return (
|
|
1229
|
-
_optionalChain$
|
|
1232
|
+
_optionalChain$k([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
1230
1233
|
window.backpack.isBackpack
|
|
1231
1234
|
)
|
|
1232
1235
|
};}
|
|
@@ -1321,7 +1324,7 @@
|
|
|
1321
1324
|
})
|
|
1322
1325
|
};
|
|
1323
1326
|
|
|
1324
|
-
function _optionalChain$
|
|
1327
|
+
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; }
|
|
1325
1328
|
class WindowEthereum {
|
|
1326
1329
|
|
|
1327
1330
|
static __initStatic() {this.info = {
|
|
@@ -1332,18 +1335,27 @@
|
|
|
1332
1335
|
|
|
1333
1336
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1334
1337
|
return (
|
|
1335
|
-
_optionalChain$
|
|
1336
|
-
|
|
1337
|
-
!_optionalChain$
|
|
1338
|
-
|
|
1339
|
-
!_optionalChain$
|
|
1340
|
-
|
|
1341
|
-
!_optionalChain$
|
|
1342
|
-
|
|
1343
|
-
!_optionalChain$
|
|
1344
|
-
|
|
1345
|
-
!_optionalChain$
|
|
1346
|
-
|
|
1338
|
+
_optionalChain$j([window, 'optionalAccess', _25 => _25.ethereum]) &&
|
|
1339
|
+
// not MetaMask
|
|
1340
|
+
!(_optionalChain$j([window, 'optionalAccess', _26 => _26.ethereum, 'optionalAccess', _27 => _27.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1) &&
|
|
1341
|
+
// not Coin98
|
|
1342
|
+
!_optionalChain$j([window, 'optionalAccess', _28 => _28.coin98]) &&
|
|
1343
|
+
// not Trust Wallet
|
|
1344
|
+
!(_optionalChain$j([window, 'optionalAccess', _29 => _29.ethereum, 'optionalAccess', _30 => _30.isTrust]) || _optionalChain$j([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isTrustWallet])) &&
|
|
1345
|
+
// not crypto.com
|
|
1346
|
+
!_optionalChain$j([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isDeficonnectProvider]) &&
|
|
1347
|
+
// not HyperPay
|
|
1348
|
+
!_optionalChain$j([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isHyperPay]) &&
|
|
1349
|
+
// not Phantom
|
|
1350
|
+
!(window.phantom && !window.glow && !_optionalChain$j([window, 'optionalAccess', _37 => _37.solana, 'optionalAccess', _38 => _38.isGlow]) && !['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])) &&
|
|
1351
|
+
// not Rabby
|
|
1352
|
+
!_optionalChain$j([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isRabby]) &&
|
|
1353
|
+
// not Backpack
|
|
1354
|
+
!_optionalChain$j([window, 'optionalAccess', _41 => _41.backpack, 'optionalAccess', _42 => _42.isBackpack]) &&
|
|
1355
|
+
// not TokenPocket
|
|
1356
|
+
!_optionalChain$j([window, 'optionalAccess', _43 => _43.ethereum, 'optionalAccess', _44 => _44.isTokenPocket]) &&
|
|
1357
|
+
// not Coinbase
|
|
1358
|
+
!(_optionalChain$j([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isCoinbaseWallet]) || _optionalChain$j([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isWalletLink]))
|
|
1347
1359
|
)
|
|
1348
1360
|
};}
|
|
1349
1361
|
|
|
@@ -1469,7 +1481,7 @@
|
|
|
1469
1481
|
}
|
|
1470
1482
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
1471
1483
|
|
|
1472
|
-
function _optionalChain$
|
|
1484
|
+
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; }
|
|
1473
1485
|
class Binance extends WindowEthereum {
|
|
1474
1486
|
|
|
1475
1487
|
static __initStatic() {this.info = {
|
|
@@ -1479,7 +1491,7 @@
|
|
|
1479
1491
|
};}
|
|
1480
1492
|
|
|
1481
1493
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1482
|
-
return _optionalChain$
|
|
1494
|
+
return _optionalChain$i([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
1483
1495
|
!window.coin98
|
|
1484
1496
|
};}
|
|
1485
1497
|
|
|
@@ -1487,7 +1499,7 @@
|
|
|
1487
1499
|
|
|
1488
1500
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
1489
1501
|
|
|
1490
|
-
function _optionalChain$
|
|
1502
|
+
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; }
|
|
1491
1503
|
class Brave extends WindowEthereum {
|
|
1492
1504
|
|
|
1493
1505
|
static __initStatic() {this.info = {
|
|
@@ -1496,10 +1508,10 @@
|
|
|
1496
1508
|
blockchains: supported$2.evm
|
|
1497
1509
|
};}
|
|
1498
1510
|
|
|
1499
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1511
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$h([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
1500
1512
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
1501
1513
|
|
|
1502
|
-
function _optionalChain$
|
|
1514
|
+
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; }
|
|
1503
1515
|
class Coin98 extends WindowEthereum {
|
|
1504
1516
|
|
|
1505
1517
|
static __initStatic() {this.info = {
|
|
@@ -1508,10 +1520,10 @@
|
|
|
1508
1520
|
blockchains: supported$2.evm
|
|
1509
1521
|
};}
|
|
1510
1522
|
|
|
1511
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1523
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
1512
1524
|
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
1513
1525
|
|
|
1514
|
-
function _optionalChain$
|
|
1526
|
+
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; }
|
|
1515
1527
|
class Coinbase extends WindowEthereum {
|
|
1516
1528
|
|
|
1517
1529
|
static __initStatic() {this.info = {
|
|
@@ -1520,10 +1532,10 @@
|
|
|
1520
1532
|
blockchains: supported$2.evm
|
|
1521
1533
|
};}
|
|
1522
1534
|
|
|
1523
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
1535
|
+
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])) };}
|
|
1524
1536
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
1525
1537
|
|
|
1526
|
-
function _optionalChain$
|
|
1538
|
+
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; }
|
|
1527
1539
|
class CryptoCom extends WindowEthereum {
|
|
1528
1540
|
|
|
1529
1541
|
static __initStatic() {this.info = {
|
|
@@ -1532,7 +1544,7 @@
|
|
|
1532
1544
|
blockchains: supported$2.evm
|
|
1533
1545
|
};}
|
|
1534
1546
|
|
|
1535
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1547
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$e([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
1536
1548
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
1537
1549
|
|
|
1538
1550
|
class Glow extends WindowSolana {
|
|
@@ -1551,7 +1563,7 @@
|
|
|
1551
1563
|
};}
|
|
1552
1564
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
1553
1565
|
|
|
1554
|
-
function _optionalChain$
|
|
1566
|
+
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; }
|
|
1555
1567
|
class HyperPay extends WindowEthereum {
|
|
1556
1568
|
|
|
1557
1569
|
static __initStatic() {this.info = {
|
|
@@ -1560,10 +1572,10 @@
|
|
|
1560
1572
|
blockchains: supported$2.evm
|
|
1561
1573
|
};}
|
|
1562
1574
|
|
|
1563
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1575
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
1564
1576
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
1565
1577
|
|
|
1566
|
-
function _optionalChain$
|
|
1578
|
+
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; }
|
|
1567
1579
|
class MetaMask extends WindowEthereum {
|
|
1568
1580
|
|
|
1569
1581
|
static __initStatic() {this.info = {
|
|
@@ -1574,13 +1586,13 @@
|
|
|
1574
1586
|
|
|
1575
1587
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1576
1588
|
return(
|
|
1577
|
-
_optionalChain$
|
|
1589
|
+
_optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
|
|
1578
1590
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1579
1591
|
)
|
|
1580
1592
|
};}
|
|
1581
1593
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
1582
1594
|
|
|
1583
|
-
function _optionalChain$
|
|
1595
|
+
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; }
|
|
1584
1596
|
class Opera extends WindowEthereum {
|
|
1585
1597
|
|
|
1586
1598
|
static __initStatic() {this.info = {
|
|
@@ -1589,9 +1601,10 @@
|
|
|
1589
1601
|
blockchains: supported$2.evm
|
|
1590
1602
|
};}
|
|
1591
1603
|
|
|
1592
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1604
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
1593
1605
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
1594
1606
|
|
|
1607
|
+
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; }
|
|
1595
1608
|
class Phantom extends WindowSolana {
|
|
1596
1609
|
|
|
1597
1610
|
static __initStatic() {this.info = {
|
|
@@ -1602,7 +1615,10 @@
|
|
|
1602
1615
|
|
|
1603
1616
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1604
1617
|
return (
|
|
1605
|
-
window.phantom &&
|
|
1618
|
+
window.phantom &&
|
|
1619
|
+
!window.glow &&
|
|
1620
|
+
!_optionalChain$a([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isGlow]) &&
|
|
1621
|
+
!['isBitKeep'].some((identifier)=>window.solana && window.solana[identifier])
|
|
1606
1622
|
)
|
|
1607
1623
|
};}
|
|
1608
1624
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/web3-wallets-evm",
|
|
3
3
|
"moduleName": "Web3Wallets",
|
|
4
|
-
"version": "16.0.
|
|
4
|
+
"version": "16.0.6",
|
|
5
5
|
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
|
|
6
6
|
"main": "dist/umd/index.evm.js",
|
|
7
7
|
"module": "dist/esm/index.evm.js",
|