@depay/web3-wallets-evm 15.9.7 → 15.10.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/README.md +0 -1
- package/dist/esm/index.evm.js +73 -46
- package/dist/esm/index.js +73 -46
- package/dist/esm/index.solana.js +72 -46
- package/dist/umd/index.evm.js +73 -46
- package/dist/umd/index.js +73 -46
- package/dist/umd/index.solana.js +72 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -165,7 +165,6 @@ await wallet.connect() // '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'
|
|
|
165
165
|
`blockchains:Array`: Array containing the names of supported blockchains
|
|
166
166
|
|
|
167
167
|
```javascript
|
|
168
|
-
wallet.name // MetaMask
|
|
169
168
|
wallet.blockchains // ['ethereum', 'bsc', 'polygon']
|
|
170
169
|
```
|
|
171
170
|
|
package/dist/esm/index.evm.js
CHANGED
|
@@ -41441,7 +41441,7 @@ const request = async function (url, options) {
|
|
|
41441
41441
|
})
|
|
41442
41442
|
};
|
|
41443
41443
|
|
|
41444
|
-
function _optionalChain$
|
|
41444
|
+
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; }
|
|
41445
41445
|
class Transaction {
|
|
41446
41446
|
|
|
41447
41447
|
constructor({
|
|
@@ -41466,7 +41466,7 @@ class Transaction {
|
|
|
41466
41466
|
this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
|
|
41467
41467
|
|
|
41468
41468
|
// optional
|
|
41469
|
-
this.value = _optionalChain$
|
|
41469
|
+
this.value = _optionalChain$f([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
41470
41470
|
this.api = api;
|
|
41471
41471
|
this.method = method;
|
|
41472
41472
|
this.params = params;
|
|
@@ -41483,7 +41483,7 @@ class Transaction {
|
|
|
41483
41483
|
}
|
|
41484
41484
|
|
|
41485
41485
|
async prepare({ wallet }) {
|
|
41486
|
-
this.from = await wallet.account();
|
|
41486
|
+
this.from = await wallet.account(this.blockchain);
|
|
41487
41487
|
}
|
|
41488
41488
|
|
|
41489
41489
|
static bigNumberify(value, blockchain) {
|
|
@@ -41632,7 +41632,7 @@ const submitSimpleTransfer$3 = ({ transaction, signer })=>{
|
|
|
41632
41632
|
})
|
|
41633
41633
|
};
|
|
41634
41634
|
|
|
41635
|
-
function _optionalChain$
|
|
41635
|
+
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; }
|
|
41636
41636
|
class WindowEthereum {
|
|
41637
41637
|
|
|
41638
41638
|
static __initStatic() {this.info = {
|
|
@@ -41643,14 +41643,16 @@ class WindowEthereum {
|
|
|
41643
41643
|
|
|
41644
41644
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
41645
41645
|
return (
|
|
41646
|
-
_optionalChain$
|
|
41646
|
+
_optionalChain$e([window, 'optionalAccess', _21 => _21.ethereum]) &&
|
|
41647
41647
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length != 1 && // MetaMask
|
|
41648
|
-
!_optionalChain$
|
|
41649
|
-
!(_optionalChain$
|
|
41650
|
-
!_optionalChain$
|
|
41651
|
-
!_optionalChain$
|
|
41652
|
-
!_optionalChain$
|
|
41653
|
-
!
|
|
41648
|
+
!_optionalChain$e([window, 'optionalAccess', _22 => _22.coin98]) && // Coin98
|
|
41649
|
+
!(_optionalChain$e([window, 'optionalAccess', _23 => _23.ethereum, 'optionalAccess', _24 => _24.isTrust]) || _optionalChain$e([window, 'optionalAccess', _25 => _25.ethereum, 'optionalAccess', _26 => _26.isTrustWallet])) && // Trust Wallet
|
|
41650
|
+
!_optionalChain$e([window, 'optionalAccess', _27 => _27.ethereum, 'optionalAccess', _28 => _28.isDeficonnectProvider]) && // crypto.com
|
|
41651
|
+
!_optionalChain$e([window, 'optionalAccess', _29 => _29.ethereum, 'optionalAccess', _30 => _30.isHyperPay]) && // isHyperPay
|
|
41652
|
+
!_optionalChain$e([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isPhantom]) && // Phantom
|
|
41653
|
+
!_optionalChain$e([window, 'optionalAccess', _33 => _33.solana, 'optionalAccess', _34 => _34.isPhantom]) && // Phantom
|
|
41654
|
+
!_optionalChain$e([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isRabby]) && // Rabby
|
|
41655
|
+
!(_optionalChain$e([window, 'optionalAccess', _37 => _37.ethereum, 'optionalAccess', _38 => _38.isCoinbaseWallet]) || _optionalChain$e([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isWalletLink]))
|
|
41654
41656
|
)
|
|
41655
41657
|
};}
|
|
41656
41658
|
|
|
@@ -41761,7 +41763,7 @@ class WindowEthereum {
|
|
|
41761
41763
|
}
|
|
41762
41764
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
41763
41765
|
|
|
41764
|
-
function _optionalChain$
|
|
41766
|
+
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; }
|
|
41765
41767
|
class Binance extends WindowEthereum {
|
|
41766
41768
|
|
|
41767
41769
|
static __initStatic() {this.info = {
|
|
@@ -41771,7 +41773,7 @@ class Binance extends WindowEthereum {
|
|
|
41771
41773
|
};}
|
|
41772
41774
|
|
|
41773
41775
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
41774
|
-
return _optionalChain$
|
|
41776
|
+
return _optionalChain$d([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
41775
41777
|
!window.coin98
|
|
41776
41778
|
};}
|
|
41777
41779
|
|
|
@@ -41779,7 +41781,7 @@ class Binance extends WindowEthereum {
|
|
|
41779
41781
|
|
|
41780
41782
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
41781
41783
|
|
|
41782
|
-
function _optionalChain$
|
|
41784
|
+
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; }
|
|
41783
41785
|
class Brave extends WindowEthereum {
|
|
41784
41786
|
|
|
41785
41787
|
static __initStatic() {this.info = {
|
|
@@ -41788,10 +41790,10 @@ class Brave extends WindowEthereum {
|
|
|
41788
41790
|
blockchains: supported$2.evm
|
|
41789
41791
|
};}
|
|
41790
41792
|
|
|
41791
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
41793
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
41792
41794
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
41793
41795
|
|
|
41794
|
-
function _optionalChain$
|
|
41796
|
+
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; }
|
|
41795
41797
|
class Coin98 extends WindowEthereum {
|
|
41796
41798
|
|
|
41797
41799
|
static __initStatic() {this.info = {
|
|
@@ -41800,10 +41802,10 @@ class Coin98 extends WindowEthereum {
|
|
|
41800
41802
|
blockchains: supported$2.evm
|
|
41801
41803
|
};}
|
|
41802
41804
|
|
|
41803
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
41805
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$b([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
41804
41806
|
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
41805
41807
|
|
|
41806
|
-
function _optionalChain$
|
|
41808
|
+
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; }
|
|
41807
41809
|
class Coinbase extends WindowEthereum {
|
|
41808
41810
|
|
|
41809
41811
|
static __initStatic() {this.info = {
|
|
@@ -41812,10 +41814,10 @@ class Coinbase extends WindowEthereum {
|
|
|
41812
41814
|
blockchains: supported$2.evm
|
|
41813
41815
|
};}
|
|
41814
41816
|
|
|
41815
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
41817
|
+
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$a([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isCoinbaseWallet]) || _optionalChain$a([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isWalletLink])) };}
|
|
41816
41818
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
41817
41819
|
|
|
41818
|
-
function _optionalChain$
|
|
41820
|
+
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; }
|
|
41819
41821
|
class CryptoCom extends WindowEthereum {
|
|
41820
41822
|
|
|
41821
41823
|
static __initStatic() {this.info = {
|
|
@@ -41824,10 +41826,10 @@ class CryptoCom extends WindowEthereum {
|
|
|
41824
41826
|
blockchains: supported$2.evm
|
|
41825
41827
|
};}
|
|
41826
41828
|
|
|
41827
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
41829
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
41828
41830
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
41829
41831
|
|
|
41830
|
-
function _optionalChain$
|
|
41832
|
+
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; }
|
|
41831
41833
|
class HyperPay extends WindowEthereum {
|
|
41832
41834
|
|
|
41833
41835
|
static __initStatic() {this.info = {
|
|
@@ -41836,10 +41838,10 @@ class HyperPay extends WindowEthereum {
|
|
|
41836
41838
|
blockchains: supported$2.evm
|
|
41837
41839
|
};}
|
|
41838
41840
|
|
|
41839
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
41841
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$8([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
41840
41842
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
41841
41843
|
|
|
41842
|
-
function _optionalChain$
|
|
41844
|
+
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; }
|
|
41843
41845
|
class MetaMask extends WindowEthereum {
|
|
41844
41846
|
|
|
41845
41847
|
static __initStatic() {this.info = {
|
|
@@ -41850,13 +41852,13 @@ class MetaMask extends WindowEthereum {
|
|
|
41850
41852
|
|
|
41851
41853
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
41852
41854
|
return(
|
|
41853
|
-
_optionalChain$
|
|
41855
|
+
_optionalChain$7([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
|
|
41854
41856
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
41855
41857
|
)
|
|
41856
41858
|
};}
|
|
41857
41859
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
41858
41860
|
|
|
41859
|
-
function _optionalChain$
|
|
41861
|
+
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; }
|
|
41860
41862
|
class Opera extends WindowEthereum {
|
|
41861
41863
|
|
|
41862
41864
|
static __initStatic() {this.info = {
|
|
@@ -41865,10 +41867,10 @@ class Opera extends WindowEthereum {
|
|
|
41865
41867
|
blockchains: supported$2.evm
|
|
41866
41868
|
};}
|
|
41867
41869
|
|
|
41868
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
41870
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
41869
41871
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
41870
41872
|
|
|
41871
|
-
function _optionalChain$
|
|
41873
|
+
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; }
|
|
41872
41874
|
|
|
41873
41875
|
const POLL_SPEED = 500; // 0.5 seconds
|
|
41874
41876
|
const MAX_POLLS = 240; // 120 seconds
|
|
@@ -41889,14 +41891,14 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
41889
41891
|
|
|
41890
41892
|
const provider = await getProvider(transaction.blockchain);
|
|
41891
41893
|
const { value } = await provider.getSignatureStatus(signature);
|
|
41892
|
-
const confirmationStatus = _optionalChain$
|
|
41894
|
+
const confirmationStatus = _optionalChain$5([value, 'optionalAccess', _ => _.confirmationStatus]);
|
|
41893
41895
|
if(confirmationStatus) {
|
|
41894
41896
|
const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
|
|
41895
41897
|
if (hasReachedSufficientCommitment) {
|
|
41896
41898
|
if(value.err) {
|
|
41897
41899
|
transaction._failed = true;
|
|
41898
41900
|
const confirmedTransaction = await provider.getConfirmedTransaction(signature);
|
|
41899
|
-
const failedReason = _optionalChain$
|
|
41901
|
+
const failedReason = _optionalChain$5([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
|
|
41900
41902
|
if(transaction.failed) transaction.failed(transaction, failedReason);
|
|
41901
41903
|
} else {
|
|
41902
41904
|
transaction._succeeded = true;
|
|
@@ -41961,7 +41963,7 @@ const submitInstructions = async ({ transaction, wallet })=> {
|
|
|
41961
41963
|
return window.solana.signAndSendTransaction(transactionV0)
|
|
41962
41964
|
};
|
|
41963
41965
|
|
|
41964
|
-
function _optionalChain$
|
|
41966
|
+
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; }
|
|
41965
41967
|
class WindowSolana {
|
|
41966
41968
|
|
|
41967
41969
|
static __initStatic() {this.info = {
|
|
@@ -41970,10 +41972,10 @@ class WindowSolana {
|
|
|
41970
41972
|
blockchains: supported$2.solana
|
|
41971
41973
|
};}
|
|
41972
41974
|
|
|
41973
|
-
|
|
41975
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
41974
41976
|
return (
|
|
41975
|
-
_optionalChain$
|
|
41976
|
-
!_optionalChain$
|
|
41977
|
+
_optionalChain$4([window, 'optionalAccess', _4 => _4.solana]) &&
|
|
41978
|
+
!_optionalChain$4([window, 'optionalAccess', _5 => _5.solana, 'optionalAccess', _6 => _6.isPhantom]) &&
|
|
41977
41979
|
!window.coin98
|
|
41978
41980
|
)
|
|
41979
41981
|
};}
|
|
@@ -41991,9 +41993,9 @@ class WindowSolana {
|
|
|
41991
41993
|
}
|
|
41992
41994
|
|
|
41993
41995
|
async account() {
|
|
41994
|
-
if(_optionalChain$
|
|
41995
|
-
if(_optionalChain$
|
|
41996
|
-
if(_optionalChain$
|
|
41996
|
+
if(_optionalChain$4([window, 'optionalAccess', _7 => _7.solana]) == undefined){ return }
|
|
41997
|
+
if(_optionalChain$4([window, 'optionalAccess', _8 => _8.solana, 'optionalAccess', _9 => _9.publicKey])) { return window.solana.publicKey.toString() }
|
|
41998
|
+
if(_optionalChain$4([window, 'optionalAccess', _10 => _10.solana, 'optionalAccess', _11 => _11.isBraveWallet]) != true) {
|
|
41997
41999
|
let publicKey;
|
|
41998
42000
|
try { ({ publicKey } = await window.solana.connect({ onlyIfTrusted: true })); } catch (e) {}
|
|
41999
42001
|
if(publicKey){ return publicKey.toString() }
|
|
@@ -42001,7 +42003,7 @@ class WindowSolana {
|
|
|
42001
42003
|
}
|
|
42002
42004
|
|
|
42003
42005
|
async connect() {
|
|
42004
|
-
if(!_optionalChain$
|
|
42006
|
+
if(!_optionalChain$4([window, 'optionalAccess', _12 => _12.solana])) { return undefined }
|
|
42005
42007
|
let { publicKey } = await window.solana.connect();
|
|
42006
42008
|
return publicKey.toString()
|
|
42007
42009
|
}
|
|
@@ -42010,7 +42012,7 @@ class WindowSolana {
|
|
|
42010
42012
|
let internalCallback;
|
|
42011
42013
|
switch (event) {
|
|
42012
42014
|
case 'account':
|
|
42013
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
42015
|
+
internalCallback = (publicKey) => callback(_optionalChain$4([publicKey, 'optionalAccess', _13 => _13.toString, 'call', _14 => _14()]));
|
|
42014
42016
|
window.solana.on('accountChanged', internalCallback);
|
|
42015
42017
|
break
|
|
42016
42018
|
}
|
|
@@ -42020,7 +42022,6 @@ class WindowSolana {
|
|
|
42020
42022
|
off(event, internalCallback) {
|
|
42021
42023
|
switch (event) {
|
|
42022
42024
|
case 'account':
|
|
42023
|
-
console.log('removeListener');
|
|
42024
42025
|
window.solana.removeListener('accountChanged', internalCallback);
|
|
42025
42026
|
break
|
|
42026
42027
|
}
|
|
@@ -42028,7 +42029,11 @@ class WindowSolana {
|
|
|
42028
42029
|
}
|
|
42029
42030
|
|
|
42030
42031
|
async connectedTo(input) {
|
|
42031
|
-
|
|
42032
|
+
if(input) {
|
|
42033
|
+
return input == 'solana'
|
|
42034
|
+
} else {
|
|
42035
|
+
return 'solana'
|
|
42036
|
+
}
|
|
42032
42037
|
}
|
|
42033
42038
|
|
|
42034
42039
|
switchTo(blockchainName) {
|
|
@@ -42050,7 +42055,7 @@ class WindowSolana {
|
|
|
42050
42055
|
}
|
|
42051
42056
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
42052
42057
|
|
|
42053
|
-
function _optionalChain$
|
|
42058
|
+
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; }
|
|
42054
42059
|
class Phantom extends WindowSolana {
|
|
42055
42060
|
|
|
42056
42061
|
static __initStatic() {this.info = {
|
|
@@ -42059,10 +42064,14 @@ class Phantom extends WindowSolana {
|
|
|
42059
42064
|
blockchains: ['solana', 'ethereum', 'polygon']
|
|
42060
42065
|
};}
|
|
42061
42066
|
|
|
42062
|
-
static __initStatic2() {this.isAvailable = async()=>{
|
|
42067
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
42068
|
+
return (
|
|
42069
|
+
_optionalChain$3([window, 'optionalAccess', _3 => _3.solana, 'optionalAccess', _4 => _4.isPhantom])
|
|
42070
|
+
)
|
|
42071
|
+
};}
|
|
42063
42072
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
|
42064
42073
|
|
|
42065
|
-
function _optionalChain$
|
|
42074
|
+
function _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
42066
42075
|
class Trust extends WindowEthereum {
|
|
42067
42076
|
|
|
42068
42077
|
static __initStatic() {this.info = {
|
|
@@ -42071,9 +42080,25 @@ class Trust extends WindowEthereum {
|
|
|
42071
42080
|
blockchains: supported$2.evm
|
|
42072
42081
|
};}
|
|
42073
42082
|
|
|
42074
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
42083
|
+
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$2([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$2([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) };}
|
|
42075
42084
|
} Trust.__initStatic(); Trust.__initStatic2();
|
|
42076
42085
|
|
|
42086
|
+
function _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
42087
|
+
class Rabby extends WindowEthereum {
|
|
42088
|
+
|
|
42089
|
+
static __initStatic() {this.info = {
|
|
42090
|
+
name: 'Rabby',
|
|
42091
|
+
logo: "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4wIiBpZD0ia2F0bWFuXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMjA0IDE1MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjA0IDE1MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6dXJsKCNTVkdJRF8xXyk7fQ0KCS5zdDF7ZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbD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llbnQgaWQ9IlNWR0lEXzAwMDAwMTMyNzc0Njc1MDcyMTkxNTM3MjgwMDAwMDEzOTM1Mzk1MjcyODI4MzAzNTE3XyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI3OS41MTY0IiB5MT0iNzQuNDUzNCIgeDI9IjExMC4yMjQ5IiB5Mj0iMzUuNDM1IiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDAgMTU0KSI+DQoJPHN0b3AgIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6Izg4OThGRiIvPg0KCTxzdG9wICBvZmZzZXQ9IjAuOTgzOSIgc3R5bGU9InN0b3AtY29sb3I6IzVGNDdGMSIvPg0KPC9saW5lYXJHcmFkaWVudD4NCjxwYXRoIHN0eWxlPSJmaWxsOnVybCgjU1ZHSURfMDAwMDAxMzI3NzQ2NzUwNzIxOTE1MzcyODAwMDAwMTM5MzUzOTUyNzI4MjgzMDM1MTdfKTsiIGQ9Ik02Mi43LDg3LjNjMS4xLDkuNiw2LjYsMTMuNCwxNy44LDE0LjUNCgljMTEuMiwxLjEsMTcuNiwwLjQsMjYuMSwxLjFjNy4xLDAuNiwxMy41LDQuMywxNS44LDNjMi4xLTEuMSwwLjktNS4yLTEuOS03LjhjLTMuNy0zLjQtOC44LTUuNy0xNy43LTYuNmMxLjgtNC45LDEuMy0xMS44LTEuNS0xNS41DQoJYy00LTUuNC0xMS40LTcuOC0yMC44LTYuOEM3MC43LDcwLjQsNjEuMyw3NS4zLDYyLjcsODcuM3oiLz4NCjwvc3ZnPg0K",
|
|
42092
|
+
blockchains: supported$2.evm
|
|
42093
|
+
};}
|
|
42094
|
+
|
|
42095
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
42096
|
+
return(
|
|
42097
|
+
_optionalChain$1([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
|
|
42098
|
+
)
|
|
42099
|
+
};}
|
|
42100
|
+
} Rabby.__initStatic(); Rabby.__initStatic2();
|
|
42101
|
+
|
|
42077
42102
|
const transactionApiBlockchainNames = {
|
|
42078
42103
|
'ethereum': 'mainnet',
|
|
42079
42104
|
'bsc': 'bsc',
|
|
@@ -42635,7 +42660,7 @@ class WalletLink {
|
|
|
42635
42660
|
static __initStatic() {this.info = {
|
|
42636
42661
|
name: 'Coinbase',
|
|
42637
42662
|
logo: Coinbase.info.logo,
|
|
42638
|
-
blockchains: supported$2.evm
|
|
42663
|
+
blockchains: supported$2.evm
|
|
42639
42664
|
};}
|
|
42640
42665
|
|
|
42641
42666
|
static __initStatic2() {this.isAvailable = async()=>{ return getConnectedInstance() != undefined };}
|
|
@@ -42767,6 +42792,7 @@ var wallets = {
|
|
|
42767
42792
|
Coinbase,
|
|
42768
42793
|
Binance,
|
|
42769
42794
|
Trust,
|
|
42795
|
+
Rabby,
|
|
42770
42796
|
Brave,
|
|
42771
42797
|
Opera,
|
|
42772
42798
|
Coin98,
|
|
@@ -42815,6 +42841,7 @@ const supported = [
|
|
|
42815
42841
|
wallets.Coinbase,
|
|
42816
42842
|
wallets.Binance,
|
|
42817
42843
|
wallets.Trust,
|
|
42844
|
+
wallets.Rabby,
|
|
42818
42845
|
wallets.Brave,
|
|
42819
42846
|
wallets.Opera,
|
|
42820
42847
|
wallets.Coin98,
|