@depay/web3-wallets-evm 16.0.3 → 16.0.5
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 +78 -46
- package/dist/esm/index.js +78 -46
- package/dist/esm/index.solana.js +77 -46
- package/dist/umd/index.evm.js +78 -46
- package/dist/umd/index.js +78 -46
- package/dist/umd/index.solana.js +77 -46
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { WalletConnectClient } from '@depay/walletconnect-v1';
|
|
|
6
6
|
import { SignClient } from '@depay/walletconnect-v2';
|
|
7
7
|
import { CoinbaseWalletSDK } from '@depay/coinbase-wallet-sdk';
|
|
8
8
|
|
|
9
|
-
function _optionalChain$
|
|
9
|
+
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; }
|
|
10
10
|
class Transaction {
|
|
11
11
|
|
|
12
12
|
constructor({
|
|
@@ -31,7 +31,7 @@ class Transaction {
|
|
|
31
31
|
this.to = (to && to.match('0x')) ? ethers.utils.getAddress(to) : to;
|
|
32
32
|
|
|
33
33
|
// optional
|
|
34
|
-
this.value = _optionalChain$
|
|
34
|
+
this.value = _optionalChain$m([Transaction, 'access', _ => _.bigNumberify, 'call', _2 => _2(value, blockchain), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
35
35
|
this.api = api;
|
|
36
36
|
this.method = method;
|
|
37
37
|
this.params = params;
|
|
@@ -70,10 +70,18 @@ class Transaction {
|
|
|
70
70
|
})
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
getParamType(param) {
|
|
74
|
+
if(_optionalChain$m([param, 'optionalAccess', _5 => _5.components, 'optionalAccess', _6 => _6.length])) {
|
|
75
|
+
return `(${param.components.map((param)=>this.getParamType(param)).join(',')})`
|
|
76
|
+
} else {
|
|
77
|
+
return param.type
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
getMethodNameWithSignature() {
|
|
74
82
|
let fragment = this.findFragment();
|
|
75
83
|
if(fragment.inputs) {
|
|
76
|
-
return `${this.method}(${fragment.inputs.map((
|
|
84
|
+
return `${this.method}(${fragment.inputs.map((param)=>this.getParamType(param)).join(',')})`
|
|
77
85
|
} else {
|
|
78
86
|
return this.method
|
|
79
87
|
}
|
|
@@ -136,7 +144,7 @@ class Transaction {
|
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
146
|
|
|
139
|
-
function _optionalChain$
|
|
147
|
+
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; }
|
|
140
148
|
|
|
141
149
|
const POLL_SPEED = 500; // 0.5 seconds
|
|
142
150
|
const MAX_POLLS = 240; // 120 seconds
|
|
@@ -157,14 +165,14 @@ const sendTransaction$4 = async ({ transaction, wallet })=> {
|
|
|
157
165
|
|
|
158
166
|
const provider = await getProvider(transaction.blockchain);
|
|
159
167
|
const { value } = await provider.getSignatureStatus(signature);
|
|
160
|
-
const confirmationStatus = _optionalChain$
|
|
168
|
+
const confirmationStatus = _optionalChain$l([value, 'optionalAccess', _ => _.confirmationStatus]);
|
|
161
169
|
if(confirmationStatus) {
|
|
162
170
|
const hasReachedSufficientCommitment = confirmationStatus === 'confirmed' || confirmationStatus === 'finalized';
|
|
163
171
|
if (hasReachedSufficientCommitment) {
|
|
164
172
|
if(value.err) {
|
|
165
173
|
transaction._failed = true;
|
|
166
174
|
const confirmedTransaction = await provider.getConfirmedTransaction(signature);
|
|
167
|
-
const failedReason = _optionalChain$
|
|
175
|
+
const failedReason = _optionalChain$l([confirmedTransaction, 'optionalAccess', _2 => _2.meta, 'optionalAccess', _3 => _3.logMessages]) ? confirmedTransaction.meta.logMessages[confirmedTransaction.meta.logMessages.length - 1] : null;
|
|
168
176
|
if(transaction.failed) transaction.failed(transaction, failedReason);
|
|
169
177
|
} else {
|
|
170
178
|
transaction._succeeded = true;
|
|
@@ -255,7 +263,7 @@ let supported$1 = ['ethereum', 'bsc', 'polygon', 'solana', 'fantom', 'arbitrum',
|
|
|
255
263
|
supported$1.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism'];
|
|
256
264
|
supported$1.solana = ['solana'];
|
|
257
265
|
|
|
258
|
-
function _optionalChain$
|
|
266
|
+
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; }
|
|
259
267
|
class WindowSolana {
|
|
260
268
|
|
|
261
269
|
static __initStatic() {this.info = {
|
|
@@ -266,7 +274,7 @@ class WindowSolana {
|
|
|
266
274
|
|
|
267
275
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
268
276
|
return (
|
|
269
|
-
_optionalChain$
|
|
277
|
+
_optionalChain$k([window, 'optionalAccess', _2 => _2.solana]) &&
|
|
270
278
|
!(window.phantom && !window.glow && !window.solana.isGlow) &&
|
|
271
279
|
!window.coin98 &&
|
|
272
280
|
!window.solana.isGlow
|
|
@@ -316,7 +324,7 @@ class WindowSolana {
|
|
|
316
324
|
let internalCallback;
|
|
317
325
|
switch (event) {
|
|
318
326
|
case 'account':
|
|
319
|
-
internalCallback = (publicKey) => callback(_optionalChain$
|
|
327
|
+
internalCallback = (publicKey) => callback(_optionalChain$k([publicKey, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]));
|
|
320
328
|
this.getProvider().on('accountChanged', internalCallback);
|
|
321
329
|
break
|
|
322
330
|
}
|
|
@@ -369,7 +377,7 @@ class WindowSolana {
|
|
|
369
377
|
}
|
|
370
378
|
} WindowSolana.__initStatic(); WindowSolana.__initStatic2();
|
|
371
379
|
|
|
372
|
-
function _optionalChain$
|
|
380
|
+
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; }
|
|
373
381
|
class Backpack extends WindowSolana {
|
|
374
382
|
|
|
375
383
|
static __initStatic() {this.info = {
|
|
@@ -380,7 +388,7 @@ class Backpack extends WindowSolana {
|
|
|
380
388
|
|
|
381
389
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
382
390
|
return (
|
|
383
|
-
_optionalChain$
|
|
391
|
+
_optionalChain$j([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
384
392
|
window.backpack.isBackpack
|
|
385
393
|
)
|
|
386
394
|
};}
|
|
@@ -475,7 +483,7 @@ const submitSimpleTransfer$3 = ({ transaction, signer })=>{
|
|
|
475
483
|
})
|
|
476
484
|
};
|
|
477
485
|
|
|
478
|
-
function _optionalChain$
|
|
486
|
+
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; }
|
|
479
487
|
class WindowEthereum {
|
|
480
488
|
|
|
481
489
|
static __initStatic() {this.info = {
|
|
@@ -486,17 +494,18 @@ class WindowEthereum {
|
|
|
486
494
|
|
|
487
495
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
488
496
|
return (
|
|
489
|
-
_optionalChain$
|
|
497
|
+
_optionalChain$i([window, 'optionalAccess', _25 => _25.ethereum]) &&
|
|
490
498
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length != 1 && // MetaMask
|
|
491
|
-
!_optionalChain$
|
|
492
|
-
!(_optionalChain$
|
|
493
|
-
!_optionalChain$
|
|
494
|
-
!_optionalChain$
|
|
495
|
-
!_optionalChain$
|
|
496
|
-
!_optionalChain$
|
|
497
|
-
!_optionalChain$
|
|
498
|
-
!_optionalChain$
|
|
499
|
-
!
|
|
499
|
+
!_optionalChain$i([window, 'optionalAccess', _26 => _26.coin98]) && // Coin98
|
|
500
|
+
!(_optionalChain$i([window, 'optionalAccess', _27 => _27.ethereum, 'optionalAccess', _28 => _28.isTrust]) || _optionalChain$i([window, 'optionalAccess', _29 => _29.ethereum, 'optionalAccess', _30 => _30.isTrustWallet])) && // Trust Wallet
|
|
501
|
+
!_optionalChain$i([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isDeficonnectProvider]) && // crypto.com
|
|
502
|
+
!_optionalChain$i([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isHyperPay]) && // isHyperPay
|
|
503
|
+
!_optionalChain$i([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isPhantom]) && // Phantom
|
|
504
|
+
!_optionalChain$i([window, 'optionalAccess', _37 => _37.solana, 'optionalAccess', _38 => _38.isPhantom]) && // Phantom
|
|
505
|
+
!_optionalChain$i([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isRabby]) && // Rabby
|
|
506
|
+
!_optionalChain$i([window, 'optionalAccess', _41 => _41.backpack, 'optionalAccess', _42 => _42.isBackpack]) && // Backpack
|
|
507
|
+
!_optionalChain$i([window, 'optionalAccess', _43 => _43.ethereum, 'optionalAccess', _44 => _44.isTokenPocket]) && // TokenPocket
|
|
508
|
+
!(_optionalChain$i([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isCoinbaseWallet]) || _optionalChain$i([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isWalletLink]))
|
|
500
509
|
)
|
|
501
510
|
};}
|
|
502
511
|
|
|
@@ -622,7 +631,7 @@ class WindowEthereum {
|
|
|
622
631
|
}
|
|
623
632
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
624
633
|
|
|
625
|
-
function _optionalChain$
|
|
634
|
+
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; }
|
|
626
635
|
class Binance extends WindowEthereum {
|
|
627
636
|
|
|
628
637
|
static __initStatic() {this.info = {
|
|
@@ -632,7 +641,7 @@ class Binance extends WindowEthereum {
|
|
|
632
641
|
};}
|
|
633
642
|
|
|
634
643
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
635
|
-
return _optionalChain$
|
|
644
|
+
return _optionalChain$h([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
636
645
|
!window.coin98
|
|
637
646
|
};}
|
|
638
647
|
|
|
@@ -640,7 +649,7 @@ class Binance extends WindowEthereum {
|
|
|
640
649
|
|
|
641
650
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
642
651
|
|
|
643
|
-
function _optionalChain$
|
|
652
|
+
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; }
|
|
644
653
|
class Brave extends WindowEthereum {
|
|
645
654
|
|
|
646
655
|
static __initStatic() {this.info = {
|
|
@@ -649,10 +658,10 @@ class Brave extends WindowEthereum {
|
|
|
649
658
|
blockchains: supported$1.evm
|
|
650
659
|
};}
|
|
651
660
|
|
|
652
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
661
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
653
662
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
654
663
|
|
|
655
|
-
function _optionalChain$
|
|
664
|
+
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; }
|
|
656
665
|
class Coin98 extends WindowEthereum {
|
|
657
666
|
|
|
658
667
|
static __initStatic() {this.info = {
|
|
@@ -661,10 +670,10 @@ class Coin98 extends WindowEthereum {
|
|
|
661
670
|
blockchains: supported$1.evm
|
|
662
671
|
};}
|
|
663
672
|
|
|
664
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
673
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
665
674
|
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
666
675
|
|
|
667
|
-
function _optionalChain$
|
|
676
|
+
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; }
|
|
668
677
|
class Coinbase extends WindowEthereum {
|
|
669
678
|
|
|
670
679
|
static __initStatic() {this.info = {
|
|
@@ -673,10 +682,10 @@ class Coinbase extends WindowEthereum {
|
|
|
673
682
|
blockchains: supported$1.evm
|
|
674
683
|
};}
|
|
675
684
|
|
|
676
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
685
|
+
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$e([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isCoinbaseWallet]) || _optionalChain$e([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isWalletLink])) };}
|
|
677
686
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
678
687
|
|
|
679
|
-
function _optionalChain$
|
|
688
|
+
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; }
|
|
680
689
|
class CryptoCom extends WindowEthereum {
|
|
681
690
|
|
|
682
691
|
static __initStatic() {this.info = {
|
|
@@ -685,7 +694,7 @@ class CryptoCom extends WindowEthereum {
|
|
|
685
694
|
blockchains: supported$1.evm
|
|
686
695
|
};}
|
|
687
696
|
|
|
688
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
697
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
689
698
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
690
699
|
|
|
691
700
|
class Glow extends WindowSolana {
|
|
@@ -704,7 +713,7 @@ class Glow extends WindowSolana {
|
|
|
704
713
|
};}
|
|
705
714
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
706
715
|
|
|
707
|
-
function _optionalChain$
|
|
716
|
+
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; }
|
|
708
717
|
class HyperPay extends WindowEthereum {
|
|
709
718
|
|
|
710
719
|
static __initStatic() {this.info = {
|
|
@@ -713,10 +722,10 @@ class HyperPay extends WindowEthereum {
|
|
|
713
722
|
blockchains: supported$1.evm
|
|
714
723
|
};}
|
|
715
724
|
|
|
716
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
725
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
717
726
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
718
727
|
|
|
719
|
-
function _optionalChain$
|
|
728
|
+
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; }
|
|
720
729
|
class MetaMask extends WindowEthereum {
|
|
721
730
|
|
|
722
731
|
static __initStatic() {this.info = {
|
|
@@ -727,13 +736,13 @@ class MetaMask extends WindowEthereum {
|
|
|
727
736
|
|
|
728
737
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
729
738
|
return(
|
|
730
|
-
_optionalChain$
|
|
739
|
+
_optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
|
|
731
740
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
732
741
|
)
|
|
733
742
|
};}
|
|
734
743
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
735
744
|
|
|
736
|
-
function _optionalChain$
|
|
745
|
+
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; }
|
|
737
746
|
class Opera extends WindowEthereum {
|
|
738
747
|
|
|
739
748
|
static __initStatic() {this.info = {
|
|
@@ -742,7 +751,7 @@ class Opera extends WindowEthereum {
|
|
|
742
751
|
blockchains: supported$1.evm
|
|
743
752
|
};}
|
|
744
753
|
|
|
745
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
754
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
746
755
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
747
756
|
|
|
748
757
|
class Phantom extends WindowSolana {
|
|
@@ -760,7 +769,7 @@ class Phantom extends WindowSolana {
|
|
|
760
769
|
};}
|
|
761
770
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
|
762
771
|
|
|
763
|
-
function _optionalChain$
|
|
772
|
+
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; }
|
|
764
773
|
class Rabby extends WindowEthereum {
|
|
765
774
|
|
|
766
775
|
static __initStatic() {this.info = {
|
|
@@ -771,12 +780,12 @@ class Rabby extends WindowEthereum {
|
|
|
771
780
|
|
|
772
781
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
773
782
|
return(
|
|
774
|
-
_optionalChain$
|
|
783
|
+
_optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
|
|
775
784
|
)
|
|
776
785
|
};}
|
|
777
786
|
} Rabby.__initStatic(); Rabby.__initStatic2();
|
|
778
787
|
|
|
779
|
-
function _optionalChain$
|
|
788
|
+
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; }
|
|
780
789
|
|
|
781
790
|
|
|
782
791
|
const KEY$2 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
|
|
@@ -867,8 +876,8 @@ class SolanaMobileWalletAdapter {
|
|
|
867
876
|
await transact(
|
|
868
877
|
async (wallet) => {
|
|
869
878
|
await this.authorize(wallet);
|
|
870
|
-
if(_optionalChain$
|
|
871
|
-
if(_optionalChain$
|
|
879
|
+
if(_optionalChain$8([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$2+'_name'] = this.name = options.name; }
|
|
880
|
+
if(_optionalChain$8([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$2+'_logo'] = this.logo = options.logo; }
|
|
872
881
|
}
|
|
873
882
|
);
|
|
874
883
|
return this._account
|
|
@@ -927,7 +936,7 @@ class SolanaMobileWalletAdapter {
|
|
|
927
936
|
}
|
|
928
937
|
} SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
|
|
929
938
|
|
|
930
|
-
function _optionalChain$
|
|
939
|
+
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; }
|
|
931
940
|
class Solflare extends WindowSolana {
|
|
932
941
|
|
|
933
942
|
static __initStatic() {this.info = {
|
|
@@ -938,7 +947,7 @@ class Solflare extends WindowSolana {
|
|
|
938
947
|
|
|
939
948
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
940
949
|
return (
|
|
941
|
-
_optionalChain$
|
|
950
|
+
_optionalChain$7([window, 'optionalAccess', _2 => _2.solflare]) &&
|
|
942
951
|
window.solflare.isSolflare
|
|
943
952
|
)
|
|
944
953
|
};}
|
|
@@ -948,6 +957,22 @@ class Solflare extends WindowSolana {
|
|
|
948
957
|
_sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
|
|
949
958
|
} Solflare.__initStatic(); Solflare.__initStatic2();
|
|
950
959
|
|
|
960
|
+
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; }
|
|
961
|
+
class TokenPocket extends WindowEthereum {
|
|
962
|
+
|
|
963
|
+
static __initStatic() {this.info = {
|
|
964
|
+
name: 'TP Wallet (TokenPocket)',
|
|
965
|
+
logo: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8bWFzayBpZD0ibWFzazBfNDA4XzIyNSIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMjQiIGhlaWdodD0iMTAyNCI+CjxyZWN0IH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UgMzYwLjU3MyA4MTIuODcyIDI3NyA3MDkuNzgxIDI3N1oiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik03MDkuNzggNjUwLjA2NlY1MDUuNTgxQzcwOC43MzMgNTA1LjU4MSA3MDcuODE2IDUwNS41ODEgNzA2Ljc2OCA1MDUuNDVWNjUwLjA2NkM3MDcuODE2IDY1MC4wNjYgNzA4Ljg2NCA2NTAuMDY2IDcwOS43OCA2NTAuMDY2WiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfNDA4XzIyNSIgeDE9IjcwOS44NDQiIHkxPSI1NTYuODI3IiB4Mj0iNjY3Ljc1MyIgeTI9IjU1Ni44MjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0id2hpdGUiLz4KPHN0b3Agb2Zmc2V0PSIwLjk2NjciIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAuMzIzMyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAuMyIvPgo8L2xpbmVhckdyYWRpZW50Pgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzQwOF8yMjUiPgo8cmVjdCB3aWR0aD0iNzI4LjQ0OCIgaGVpZ2h0PSI0NzAiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNjggMjc3KSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",
|
|
966
|
+
blockchains: supported$1.evm
|
|
967
|
+
};}
|
|
968
|
+
|
|
969
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
970
|
+
return (
|
|
971
|
+
_optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
|
|
972
|
+
)
|
|
973
|
+
};}
|
|
974
|
+
} TokenPocket.__initStatic(); TokenPocket.__initStatic2();
|
|
975
|
+
|
|
951
976
|
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; }
|
|
952
977
|
class Trust extends WindowEthereum {
|
|
953
978
|
|
|
@@ -957,7 +982,12 @@ class Trust extends WindowEthereum {
|
|
|
957
982
|
blockchains: supported$1.evm
|
|
958
983
|
};}
|
|
959
984
|
|
|
960
|
-
static __initStatic2() {this.isAvailable = async()=>{
|
|
985
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
986
|
+
return (
|
|
987
|
+
(_optionalChain$5([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$5([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
|
|
988
|
+
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
989
|
+
)
|
|
990
|
+
};}
|
|
961
991
|
} Trust.__initStatic(); Trust.__initStatic2();
|
|
962
992
|
|
|
963
993
|
const transactionApiBlockchainNames = {
|
|
@@ -2156,6 +2186,7 @@ var wallets = {
|
|
|
2156
2186
|
Coin98,
|
|
2157
2187
|
CryptoCom,
|
|
2158
2188
|
HyperPay,
|
|
2189
|
+
TokenPocket,
|
|
2159
2190
|
WindowEthereum,
|
|
2160
2191
|
WindowSolana,
|
|
2161
2192
|
SolanaMobileWalletAdapter,
|
|
@@ -2210,6 +2241,7 @@ const supported = [
|
|
|
2210
2241
|
wallets.Coin98,
|
|
2211
2242
|
wallets.CryptoCom,
|
|
2212
2243
|
wallets.HyperPay,
|
|
2244
|
+
wallets.TokenPocket,
|
|
2213
2245
|
wallets.WalletConnectV1,
|
|
2214
2246
|
wallets.WalletConnectV2,
|
|
2215
2247
|
wallets.SolanaMobileWalletAdapter,
|