@depay/web3-wallets-evm 14.0.0 → 14.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 +342 -81
- package/dist/esm/index.js +135 -37
- package/dist/umd/index.evm.js +345 -85
- package/dist/umd/index.js +135 -37
- package/package.json +4 -5
package/dist/umd/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Wallets = {}, global.Web3Blockchains, global.ethers, global.Web3Constants, global.SolanaWeb3js, global.Web3Client, global.WalletConnect, global.WalletConnectV2, global.CoinbaseWalletSdk));
|
|
5
5
|
}(this, (function (exports, web3Blockchains, ethers, web3Constants, solanaWeb3_js, web3Client, walletconnectV1, walletconnectV2, coinbaseWalletSdk) { 'use strict';
|
|
6
6
|
|
|
7
|
-
function _optionalChain$
|
|
7
|
+
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; }
|
|
8
8
|
class Transaction {
|
|
9
9
|
|
|
10
10
|
constructor({ blockchain, from, to, value, api, method, params, instructions, sent, succeeded, failed }) {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
this.to = (to && to.match('0x')) ? ethers.ethers.utils.getAddress(to) : to;
|
|
16
16
|
|
|
17
17
|
// optional
|
|
18
|
-
this.value = _optionalChain$
|
|
18
|
+
this.value = _optionalChain$h([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
19
19
|
this.api = api;
|
|
20
20
|
this.method = method;
|
|
21
21
|
this.params = params;
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
setProvider: setProvider$1,
|
|
294
294
|
};
|
|
295
295
|
|
|
296
|
-
function _optionalChain$
|
|
296
|
+
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; }
|
|
297
297
|
let getCacheStore = () => {
|
|
298
298
|
if (getWindow()._cacheStore == undefined) {
|
|
299
299
|
resetCache();
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
|
|
324
324
|
let get = function ({ key, expires }) {
|
|
325
325
|
let cachedEntry = getCacheStore()[key];
|
|
326
|
-
if (_optionalChain$
|
|
326
|
+
if (_optionalChain$g([cachedEntry, 'optionalAccess', _ => _.expiresAt]) > Date.now()) {
|
|
327
327
|
return cachedEntry.value
|
|
328
328
|
}
|
|
329
329
|
};
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
await transaction.prepare({ wallet });
|
|
495
495
|
let transactionCount = await request({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
|
|
496
496
|
transaction.nonce = transactionCount;
|
|
497
|
-
let provider = new ethers.ethers.providers.Web3Provider(
|
|
497
|
+
let provider = new ethers.ethers.providers.Web3Provider(wallet.getProvider(), 'any');
|
|
498
498
|
let signer = provider.getSigner(0);
|
|
499
499
|
await submit$4({ transaction, provider, signer }).then((sentTransaction)=>{
|
|
500
500
|
if (sentTransaction) {
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
supported$2.evm = ['ethereum', 'bsc', 'polygon', 'velas'];
|
|
565
565
|
supported$2.solana = [];
|
|
566
566
|
|
|
567
|
-
function _optionalChain$
|
|
567
|
+
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; }
|
|
568
568
|
class WindowEthereum {
|
|
569
569
|
|
|
570
570
|
static __initStatic() {this.info = {
|
|
@@ -575,9 +575,12 @@
|
|
|
575
575
|
|
|
576
576
|
static __initStatic2() {this.isAvailable = ()=>{
|
|
577
577
|
return (
|
|
578
|
-
_optionalChain$
|
|
579
|
-
|
|
580
|
-
!
|
|
578
|
+
_optionalChain$f([window, 'optionalAccess', _13 => _13.ethereum]) &&
|
|
579
|
+
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)/)).length != 1 && // MetaMask
|
|
580
|
+
!_optionalChain$f([window, 'optionalAccess', _14 => _14.coin98]) && // Coin98
|
|
581
|
+
!(_optionalChain$f([window, 'optionalAccess', _15 => _15.ethereum, 'optionalAccess', _16 => _16.isTrust]) || _optionalChain$f([window, 'optionalAccess', _17 => _17.ethereum, 'optionalAccess', _18 => _18.isTrustWallet])) && // Trust Wallet
|
|
582
|
+
!_optionalChain$f([window, 'optionalAccess', _19 => _19.ethereum, 'optionalAccess', _20 => _20.isDeficonnectProvider]) && // crypto.com
|
|
583
|
+
!(_optionalChain$f([window, 'optionalAccess', _21 => _21.ethereum, 'optionalAccess', _22 => _22.isCoinbaseWallet]) || _optionalChain$f([window, 'optionalAccess', _23 => _23.ethereum, 'optionalAccess', _24 => _24.isWalletLink]))
|
|
581
584
|
)
|
|
582
585
|
};}
|
|
583
586
|
|
|
@@ -585,7 +588,7 @@
|
|
|
585
588
|
this.name = this.constructor.info.name;
|
|
586
589
|
this.logo = this.constructor.info.logo;
|
|
587
590
|
this.blockchains = this.constructor.info.blockchains;
|
|
588
|
-
this.sendTransaction = (transaction)=>{
|
|
591
|
+
this.sendTransaction = (transaction)=>{
|
|
589
592
|
return sendTransaction$4({
|
|
590
593
|
wallet: this,
|
|
591
594
|
transaction
|
|
@@ -593,15 +596,17 @@
|
|
|
593
596
|
};
|
|
594
597
|
}
|
|
595
598
|
|
|
599
|
+
getProvider() { return window.ethereum }
|
|
600
|
+
|
|
596
601
|
async account() {
|
|
597
|
-
if(!
|
|
598
|
-
const accounts = (await
|
|
602
|
+
if(!this.getProvider()) { return undefined }
|
|
603
|
+
const accounts = (await this.getProvider().request({ method: 'eth_accounts' })).map((address)=>ethers.ethers.utils.getAddress(address));
|
|
599
604
|
return accounts[0]
|
|
600
605
|
}
|
|
601
606
|
|
|
602
607
|
async connect() {
|
|
603
|
-
if(!
|
|
604
|
-
const accounts = (await
|
|
608
|
+
if(!this.getProvider()) { return undefined }
|
|
609
|
+
const accounts = (await this.getProvider().request({ method: 'eth_requestAccounts' })).map((address)=>ethers.ethers.utils.getAddress(address));
|
|
605
610
|
return accounts[0]
|
|
606
611
|
}
|
|
607
612
|
|
|
@@ -610,7 +615,7 @@
|
|
|
610
615
|
switch (event) {
|
|
611
616
|
case 'account':
|
|
612
617
|
internalCallback = (accounts) => callback(ethers.ethers.utils.getAddress(accounts[0]));
|
|
613
|
-
|
|
618
|
+
this.getProvider().on('accountsChanged', internalCallback);
|
|
614
619
|
break
|
|
615
620
|
}
|
|
616
621
|
return internalCallback
|
|
@@ -619,14 +624,14 @@
|
|
|
619
624
|
off(event, internalCallback) {
|
|
620
625
|
switch (event) {
|
|
621
626
|
case 'account':
|
|
622
|
-
|
|
627
|
+
this.getProvider().removeListener('accountsChanged', internalCallback);
|
|
623
628
|
break
|
|
624
629
|
}
|
|
625
630
|
return internalCallback
|
|
626
631
|
}
|
|
627
632
|
|
|
628
633
|
async connectedTo(input) {
|
|
629
|
-
const blockchain = web3Blockchains.Blockchain.findById(await
|
|
634
|
+
const blockchain = web3Blockchains.Blockchain.findById(await this.getProvider().request({ method: 'eth_chainId' }));
|
|
630
635
|
if(input) {
|
|
631
636
|
return input === blockchain.name
|
|
632
637
|
} else {
|
|
@@ -637,7 +642,7 @@
|
|
|
637
642
|
addNetwork(blockchainName) {
|
|
638
643
|
return new Promise((resolve, reject)=>{
|
|
639
644
|
const blockchain = web3Blockchains.Blockchain.findByName(blockchainName);
|
|
640
|
-
|
|
645
|
+
this.getProvider().request({
|
|
641
646
|
method: 'wallet_addEthereumChain',
|
|
642
647
|
params: [{
|
|
643
648
|
chainId: blockchain.id,
|
|
@@ -658,7 +663,7 @@
|
|
|
658
663
|
switchTo(blockchainName) {
|
|
659
664
|
return new Promise((resolve, reject)=>{
|
|
660
665
|
const blockchain = web3Blockchains.Blockchain.findByName(blockchainName);
|
|
661
|
-
|
|
666
|
+
this.getProvider().request({
|
|
662
667
|
method: 'wallet_switchEthereumChain',
|
|
663
668
|
params: [{ chainId: blockchain.id }],
|
|
664
669
|
}).then(resolve).catch((error)=> {
|
|
@@ -675,14 +680,56 @@
|
|
|
675
680
|
|
|
676
681
|
async sign(message) {
|
|
677
682
|
await this.account();
|
|
678
|
-
let provider = new ethers.ethers.providers.Web3Provider(
|
|
683
|
+
let provider = new ethers.ethers.providers.Web3Provider(this.getProvider(), 'any');
|
|
679
684
|
let signer = provider.getSigner(0);
|
|
680
685
|
let signature = await signer.signMessage(message);
|
|
681
686
|
return signature
|
|
682
687
|
}
|
|
683
688
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
684
689
|
|
|
685
|
-
function _optionalChain$
|
|
690
|
+
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
|
+
class Binance extends WindowEthereum {
|
|
692
|
+
|
|
693
|
+
static __initStatic() {this.info = {
|
|
694
|
+
name: 'Binance',
|
|
695
|
+
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTIgMTkzLjY4Ij48cmVjdCB3aWR0aD0iMTkyIiBoZWlnaHQ9IjE5My42OCIgZmlsbD0iIzFlMjAyNCIvPjxwYXRoIGQ9Im01Ni45Miw0Ni41M2wzOS4wOC0yMi41NCwzOS4wOCwyMi41NC0xNC4zNSw4LjM2LTI0LjczLTE0LjE4LTI0LjczLDE0LjE4LTE0LjM1LTguMzZabTc4LjE3LDI4LjUzbC0xNC4zNS04LjM2LTI0LjczLDE0LjI3LTI0LjczLTE0LjI3LTE0LjM1LDguMzZ2MTYuNzFsMjQuNzMsMTQuMTh2MjguNDVsMTQuMzUsOC4zNiwxNC4zNS04LjM2di0yOC40NWwyNC43My0xNC4yN3YtMTYuNjNabTAsNDUuMTZ2LTE2LjcxbC0xNC4zNSw4LjM2djE2LjcxbDE0LjM1LTguMzZabTEwLjIxLDUuODJsLTI0LjczLDE0LjI3djE2LjcxbDM5LjA4LTIyLjU0di00NS4yNWwtMTQuMzUsOC4zNnYyOC40NVptLTE0LjM1LTY1LjI1bDE0LjM1LDguMzZ2MTYuNzFsMTQuMzUtOC4zNnYtMTYuNzFsLTE0LjM1LTguMzYtMTQuMzUsOC4zNlptLTQ5LjMsODUuNnYxNi43MWwxNC4zNSw4LjM2LDE0LjM1LTguMzZ2LTE2LjcxbC0xNC4zNSw4LjM2LTE0LjM1LTguMzZabS0yNC43My0yNi4xN2wxNC4zNSw4LjM2di0xNi43MWwtMTQuMzUtOC4zNnYxNi43MVptMjQuNzMtNTkuNDNsMTQuMzUsOC4zNiwxNC4zNS04LjM2LTE0LjM1LTguMzYtMTQuMzUsOC4zNlptLTM0Ljk1LDguMzZsMTQuMzUtOC4zNi0xNC4zNS04LjM2LTE0LjM1LDguMzZ2MTYuNzFsMTQuMzUsOC4zNnYtMTYuNzFabTAsMjguNDVsLTE0LjM1LTguMzZ2NDUuMTZsMzkuMDgsMjIuNTR2LTE2LjcxbC0yNC43My0xNC4yN3MwLTI4LjM2LDAtMjguMzZaIiBmaWxsPSIjZjBiOTBiIi8+PC9zdmc+",
|
|
696
|
+
blockchains: ['ethereum', 'bsc']
|
|
697
|
+
};}
|
|
698
|
+
|
|
699
|
+
static __initStatic2() {this.isAvailable = ()=>{
|
|
700
|
+
return _optionalChain$e([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
701
|
+
!window.coin98
|
|
702
|
+
};}
|
|
703
|
+
|
|
704
|
+
getProvider() { return window.BinanceChain }
|
|
705
|
+
|
|
706
|
+
} Binance.__initStatic(); Binance.__initStatic2();
|
|
707
|
+
|
|
708
|
+
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; }
|
|
709
|
+
class Brave extends WindowEthereum {
|
|
710
|
+
|
|
711
|
+
static __initStatic() {this.info = {
|
|
712
|
+
name: 'Brave',
|
|
713
|
+
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNTYgMzAxIiB2ZXJzaW9uPSIxL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y44bC01LjgtMTMuOGMtMC40LTEtMC4yLTIuNSAwLjYtMy40bDI3LjktMjkuN2MwLjgtMC44IDEuOS0yLjIgMi43LTMtMC40LTAuMyAxLjEtMi4xIDEuNi00LjF6Ii8+Cgo8L3N2Zz4K",
|
|
714
|
+
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
715
|
+
};}
|
|
716
|
+
|
|
717
|
+
static __initStatic2() {this.isAvailable = ()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
718
|
+
} Brave.__initStatic(); Brave.__initStatic2();
|
|
719
|
+
|
|
720
|
+
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; }
|
|
721
|
+
class Coin98 extends WindowEthereum {
|
|
722
|
+
|
|
723
|
+
static __initStatic() {this.info = {
|
|
724
|
+
name: 'Coin98',
|
|
725
|
+
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA0MC43IDQwIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA0MC43IDQwIiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsPSIjRDlCNDMyIiBkPSJtMzMuMyAwaC0yNS45Yy00LjEgMC03LjQgMy4zLTcuNCA3LjN2MjUuNGMwIDQgMy4zIDcuMyA3LjQgNy4zaDI1LjljNC4xIDA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EtMS43IDMuNy0zLjggMy43cy0zLjgtMS43LTMuOC0zLjdjMC0yLjEgMS43LTMuNyAzLjgtMy43IDIuMiAwIDMuOCAxLjYgMy44IDMuN3oiLz4KPC9zdmc+Cg==",
|
|
726
|
+
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
727
|
+
};}
|
|
728
|
+
|
|
729
|
+
static __initStatic2() {this.isAvailable = ()=>{ return _optionalChain$c([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
730
|
+
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
731
|
+
|
|
732
|
+
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; }
|
|
686
733
|
class Coinbase extends WindowEthereum {
|
|
687
734
|
|
|
688
735
|
static __initStatic() {this.info = {
|
|
@@ -691,10 +738,22 @@
|
|
|
691
738
|
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
692
739
|
};}
|
|
693
740
|
|
|
694
|
-
static __initStatic2() {this.isAvailable = ()=>{ return (_optionalChain$
|
|
741
|
+
static __initStatic2() {this.isAvailable = ()=>{ return (_optionalChain$b([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isCoinbaseWallet]) || _optionalChain$b([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isWalletLink])) };}
|
|
695
742
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
696
743
|
|
|
697
|
-
function _optionalChain$
|
|
744
|
+
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; }
|
|
745
|
+
class CryptoCom extends WindowEthereum {
|
|
746
|
+
|
|
747
|
+
static __initStatic() {this.info = {
|
|
748
|
+
name: 'Crypto.com',
|
|
749
|
+
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4OS45IDEwMi44IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA4OS45IDEwMi44IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiNGRkZGRkY7fQoJLnN0MXtmaWxsOiMwMzMxNkM7fQo8L3N0eWxlPgoKPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMzc1MSAtMTEzLjYxKSI+Cgk8ZyB0cmFuc2Zvcm09Im1hdHJpeCguMzE3OTQgMCAwIC4zMTQ2NSAtMS4wNDczIDMwLjQ0NykiPgoJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Im0xNjEuNiAyNjQuMy0xNDEuNCA4MS42djE2My4zbDE0MS40IDgxLjYgMTQxLjQtODEuNnYtMTYzLjNsLTE0MS40LTgxLjZ6bTAgMC0xNDEuNCA4MS42djE2My4zbDE0MS40IDgxLjYgMTQxLjQtODEuNnYtMTYzLjNsLTE0MS40LTgxLjZ6Ii8+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0ibTIxNy41IDUyNy4xaC0yMC4xbC0yNC4xLTIyLjF2LTExLjNsMjQuOS0yMy44di0zNy43bDMyLjYtMjEuMyAzNy4xIDI4LjEtNTAuNCA4OC4xem0tODMuMy01OS42IDMuNy0zNS40LTEyLjItMzEuN2g3MmwtMTEuOSAzMS43IDMuNCAzNS40aC01NXptMTYuNCAzNy41LTI0LjEgMjIuNGgtMjAuNGwtNTAuNy04OC40IDM3LjQtMjcuOCAzMi45IDIxdjM3LjdsMjQuOSAyMy44djExLjN6bS00NC44LTE3MC4xaDExMS40bDEzLjMgNTYuN2gtMTM3LjdsMTMtNTYuN3ptNTUuOC03MC42LTE0MS40IDgxLjZ2MTYzLjNsMTQxLjQgODEuNiAxNDEuNC04MS42di0xNjMuM2wtMTQxLjQtODEuNnoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",
|
|
750
|
+
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
751
|
+
};}
|
|
752
|
+
|
|
753
|
+
static __initStatic2() {this.isAvailable = ()=>{ return _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
754
|
+
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
755
|
+
|
|
756
|
+
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; }
|
|
698
757
|
class MetaMask extends WindowEthereum {
|
|
699
758
|
|
|
700
759
|
static __initStatic() {this.info = {
|
|
@@ -703,10 +762,24 @@
|
|
|
703
762
|
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
704
763
|
};}
|
|
705
764
|
|
|
706
|
-
static __initStatic2() {this.isAvailable = ()=>{
|
|
765
|
+
static __initStatic2() {this.isAvailable = ()=>{
|
|
766
|
+
return _optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) && Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)/)).length == 1
|
|
767
|
+
};}
|
|
707
768
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
708
769
|
|
|
709
|
-
function _optionalChain$
|
|
770
|
+
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; }
|
|
771
|
+
class Opera extends WindowEthereum {
|
|
772
|
+
|
|
773
|
+
static __initStatic() {this.info = {
|
|
774
|
+
name: 'Opera',
|
|
775
|
+
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA3NS42IDc1LjYiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIHRyYW5zZm9ybT0ibWF0cml4KDEuMzMzMyAwIDAgLTEuMzMzMyAwIDEwNy4yKSI+CiAgCiAgPGxpbmVhckdyYWRpZW50IGlkPSJvcGVyYUxvZ28wMDAwMDAxMjM1MTEiIHgxPSItMTA3LjM0IiB4Mj0iLTEwNi4zNCIgeTE9Ii0xMzcuODUiIHkyPSItMTM3Ljg1IiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDAgLTczLjI1NyAtNzMuMjU3IDAgLTEwMDc1IC03Nzg0LjEpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3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CNEIiIG9mZnNldD0iLjciLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRjRCNEIiIG9mZnNldD0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHBhdGggZD0ibTE5IDY4YzIuNiAzLjEgNiA0LjkgOS42IDQuOSA4LjMgMCAxNC45LTkuNCAxNC45LTIwLjlzLTYuNy0yMC45LTE0LjktMjAuOWMtMy43IDAtNyAxLjktOS42IDQuOSA0LjEtNS4zIDEwLjEtOC42IDE2LjktOC42IDQuMiAwIDggMS4zIDExLjQgMy41IDUuOCA1LjIgOS41IDEyLjcgOS41IDIxLjFzLTMuNyAxNS45LTkuNSAyMS4xYy0zLjMgMi4yLTcuMiAzLjUtMTEuNCAzLjUtNi44IDAuMS0xMi44LTMuMy0xNi45LTguNiIgZmlsbD0idXJsKCNiKSIvPgo8L2c+Cjwvc3ZnPgo=",
|
|
776
|
+
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
777
|
+
};}
|
|
778
|
+
|
|
779
|
+
static __initStatic2() {this.isAvailable = ()=>{ return _optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
780
|
+
} Opera.__initStatic(); Opera.__initStatic2();
|
|
781
|
+
|
|
782
|
+
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; }
|
|
710
783
|
const POLL_SPEED = 500; // 0.5 seconds
|
|
711
784
|
const MAX_POLLS = 240; // 120 seconds
|
|
712
785
|
|
|
@@ -726,14 +799,14 @@
|
|
|
726
799
|
|
|
727
800
|
const provider = await web3Client.getProvider(transaction.blockchain);
|
|
728
801
|
const { value } = await provider.getSignatureStatus(signature);
|
|
729
|
-
const confirmationStatus = _optionalChain$
|
|
802
|
+
const confirmationStatus = _optionalChain$7([value, 'optionalAccess', _ => _.confirmationStatus]);
|
|
730
803
|
if(confirmationStatus) {
|
|
731
804
|
const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
|
|
732
805
|
if (hasReachedSufficientCommitment) {
|
|
733
806
|
if(value.err) {
|
|
734
807
|
transaction._failed = true;
|
|
735
808
|
const confirmedTransaction = await provider.getConfirmedTransaction(signature);
|
|
736
|
-
const failedReason = _optionalChain$
|
|
809
|
+
const failedReason = _optionalChain$7([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
|
|
737
810
|
if(transaction.failed) transaction.failed(transaction, failedReason);
|
|
738
811
|
} else {
|
|
739
812
|
transaction._succeeded = true;
|
|
@@ -796,7 +869,7 @@
|
|
|
796
869
|
supported$1.evm = ['ethereum', 'bsc', 'polygon', 'velas'];
|
|
797
870
|
supported$1.solana = ['solana'];
|
|
798
871
|
|
|
799
|
-
function _optionalChain$
|
|
872
|
+
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; }
|
|
800
873
|
class WindowSolana {
|
|
801
874
|
|
|
802
875
|
static __initStatic() {this.info = {
|
|
@@ -807,8 +880,9 @@
|
|
|
807
880
|
|
|
808
881
|
static __initStatic2() {this.isAvailable = ()=>{
|
|
809
882
|
return (
|
|
810
|
-
_optionalChain$
|
|
811
|
-
!_optionalChain$
|
|
883
|
+
_optionalChain$6([window, 'optionalAccess', _4 => _4.solana]) &&
|
|
884
|
+
!_optionalChain$6([window, 'optionalAccess', _5 => _5.solana, 'optionalAccess', _6 => _6.isPhantom]) &&
|
|
885
|
+
!window.coin98
|
|
812
886
|
)
|
|
813
887
|
};}
|
|
814
888
|
|
|
@@ -825,9 +899,9 @@
|
|
|
825
899
|
}
|
|
826
900
|
|
|
827
901
|
async account() {
|
|
828
|
-
if(_optionalChain$
|
|
829
|
-
if(_optionalChain$
|
|
830
|
-
if(_optionalChain$
|
|
902
|
+
if(_optionalChain$6([window, 'optionalAccess', _7 => _7.solana]) == undefined){ return }
|
|
903
|
+
if(_optionalChain$6([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.publicKey])) { return window.solana.publicKey.toString() }
|
|
904
|
+
if(_optionalChain$6([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isBraveWallet]) != true) {
|
|
831
905
|
let publicKey;
|
|
832
906
|
try { ({ publicKey } = await window.solana.connect({ onlyIfTrusted: true })); } catch (e) {}
|
|
833
907
|
if(publicKey){ return publicKey.toString() }
|
|
@@ -835,7 +909,7 @@
|
|
|
835
909
|
}
|
|
836
910
|
|
|
837
911
|
async connect() {
|
|
838
|
-
if(!_optionalChain$
|
|
912
|
+
if(!_optionalChain$6([window, 'optionalAccess', _12 => _12.solana])) { return undefined }
|
|
839
913
|
let { publicKey } = await window.solana.connect();
|
|
840
914
|
return publicKey.toString()
|
|
841
915
|
}
|
|
@@ -844,7 +918,7 @@
|
|
|
844
918
|
let internalCallback;
|
|
845
919
|
switch (event) {
|
|
846
920
|
case 'account':
|
|
847
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
921
|
+
internalCallback = (publicKey) => callback(_optionalChain$6([publicKey, 'optionalAccess', _13 => _13.toString, 'call', _14 => _14()]));
|
|
848
922
|
window.solana.on('accountChanged', internalCallback);
|
|
849
923
|
break
|
|
850
924
|
}
|
|
@@ -884,7 +958,7 @@
|
|
|
884
958
|
}
|
|
885
959
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
886
960
|
|
|
887
|
-
function _optionalChain$
|
|
961
|
+
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; }
|
|
888
962
|
class Phantom extends WindowSolana {
|
|
889
963
|
|
|
890
964
|
static __initStatic() {this.info = {
|
|
@@ -893,9 +967,21 @@
|
|
|
893
967
|
blockchains: supported$1.solana
|
|
894
968
|
};}
|
|
895
969
|
|
|
896
|
-
static __initStatic2() {this.isAvailable = ()=>{ return _optionalChain$
|
|
970
|
+
static __initStatic2() {this.isAvailable = ()=>{ return _optionalChain$5([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isPhantom]) };}
|
|
897
971
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
|
898
972
|
|
|
973
|
+
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; }
|
|
974
|
+
class Trust extends WindowEthereum {
|
|
975
|
+
|
|
976
|
+
static __initStatic() {this.info = {
|
|
977
|
+
name: 'Trust',
|
|
978
|
+
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA5Ni41IDk2LjUiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDk2LjUgOTYuNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgZmlsbD0iI0ZGRkZGRiIgd2lkdGg9Ijk2LjUiIGhlaWdodD0iOTYuNSIvPgo8cGF0aCBzdHJva2U9IiMzMzc1QkIiIHN0cm9rZS13aWR0aD0iNi4wNjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQgPSIxMCIgZmlsbD0ibm9uZSIgZD0ibTQ4LjUgMjAuMWM5LjYgOCAyMC42IDcuNSAyMy43IDcuNS0wLjcgNDUuNS01LjkgMzYuNS0yMy43IDQ5LjMtMTcuOC0xMi44LTIzLTMuNy0yMy43LTQ5LjMgMy4yIDAgMTQuMSAwLjUgMjMuNy03LjV6Ii8+Cjwvc3ZnPgo=",
|
|
979
|
+
blockchains: ['ethereum', 'bsc', 'polygon', 'velas']
|
|
980
|
+
};}
|
|
981
|
+
|
|
982
|
+
static __initStatic2() {this.isAvailable = ()=>{ return (_optionalChain$4([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$4([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) };}
|
|
983
|
+
} Trust.__initStatic(); Trust.__initStatic2();
|
|
984
|
+
|
|
899
985
|
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; }
|
|
900
986
|
const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
901
987
|
transaction = new Transaction(transaction);
|
|
@@ -1683,6 +1769,12 @@
|
|
|
1683
1769
|
MetaMask,
|
|
1684
1770
|
Phantom,
|
|
1685
1771
|
Coinbase,
|
|
1772
|
+
Binance,
|
|
1773
|
+
Trust,
|
|
1774
|
+
Brave,
|
|
1775
|
+
Opera,
|
|
1776
|
+
Coin98,
|
|
1777
|
+
CryptoCom,
|
|
1686
1778
|
WindowEthereum,
|
|
1687
1779
|
WindowSolana,
|
|
1688
1780
|
WalletConnectV1,
|
|
@@ -1729,6 +1821,12 @@
|
|
|
1729
1821
|
wallets.MetaMask,
|
|
1730
1822
|
wallets.Phantom,
|
|
1731
1823
|
wallets.Coinbase,
|
|
1824
|
+
wallets.Binance,
|
|
1825
|
+
wallets.Trust,
|
|
1826
|
+
wallets.Brave,
|
|
1827
|
+
wallets.Opera,
|
|
1828
|
+
wallets.Coin98,
|
|
1829
|
+
wallets.CryptoCom,
|
|
1732
1830
|
wallets.WalletConnectV1,
|
|
1733
1831
|
wallets.WalletConnectV2,
|
|
1734
1832
|
wallets.WalletLink
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/web3-wallets-evm",
|
|
3
3
|
"moduleName": "Web3Wallets",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.2.0",
|
|
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",
|
|
@@ -26,10 +26,9 @@
|
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@depay/coinbase-wallet-sdk": "^1.1.0",
|
|
29
|
-
"@depay/walletconnect-v1": "^1.
|
|
30
|
-
"@walletconnect
|
|
31
|
-
"@
|
|
32
|
-
"@depay/web3-blockchains": "^6.3.1",
|
|
29
|
+
"@depay/walletconnect-v1": "^1.8.0",
|
|
30
|
+
"@depay/walletconnect-v2": "^2.4.2",
|
|
31
|
+
"@depay/web3-blockchains": "^6.4.0",
|
|
33
32
|
"@depay/web3-client-evm": "^10.3.0",
|
|
34
33
|
"@depay/web3-constants": "^6.3.2",
|
|
35
34
|
"ethers": "^5.7.1"
|