@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.solana.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$3(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$2 = ['solana'];
|
|
|
255
263
|
supported$2.evm = [];
|
|
256
264
|
supported$2.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
|
}
|
|
@@ -1205,7 +1213,7 @@ const request = async function (url, options) {
|
|
|
1205
1213
|
})
|
|
1206
1214
|
};
|
|
1207
1215
|
|
|
1208
|
-
function _optionalChain$
|
|
1216
|
+
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; }
|
|
1209
1217
|
class Backpack extends WindowSolana {
|
|
1210
1218
|
|
|
1211
1219
|
static __initStatic() {this.info = {
|
|
@@ -1216,7 +1224,7 @@ class Backpack extends WindowSolana {
|
|
|
1216
1224
|
|
|
1217
1225
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1218
1226
|
return (
|
|
1219
|
-
_optionalChain$
|
|
1227
|
+
_optionalChain$j([window, 'optionalAccess', _2 => _2.backpack]) &&
|
|
1220
1228
|
window.backpack.isBackpack
|
|
1221
1229
|
)
|
|
1222
1230
|
};}
|
|
@@ -1311,7 +1319,7 @@ const submitSimpleTransfer$3 = ({ transaction, signer })=>{
|
|
|
1311
1319
|
})
|
|
1312
1320
|
};
|
|
1313
1321
|
|
|
1314
|
-
function _optionalChain$
|
|
1322
|
+
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; }
|
|
1315
1323
|
class WindowEthereum {
|
|
1316
1324
|
|
|
1317
1325
|
static __initStatic() {this.info = {
|
|
@@ -1322,17 +1330,18 @@ class WindowEthereum {
|
|
|
1322
1330
|
|
|
1323
1331
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1324
1332
|
return (
|
|
1325
|
-
_optionalChain$
|
|
1333
|
+
_optionalChain$i([window, 'optionalAccess', _25 => _25.ethereum]) &&
|
|
1326
1334
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length != 1 && // MetaMask
|
|
1327
|
-
!_optionalChain$
|
|
1328
|
-
!(_optionalChain$
|
|
1329
|
-
!_optionalChain$
|
|
1330
|
-
!_optionalChain$
|
|
1331
|
-
!_optionalChain$
|
|
1332
|
-
!_optionalChain$
|
|
1333
|
-
!_optionalChain$
|
|
1334
|
-
!_optionalChain$
|
|
1335
|
-
!
|
|
1335
|
+
!_optionalChain$i([window, 'optionalAccess', _26 => _26.coin98]) && // Coin98
|
|
1336
|
+
!(_optionalChain$i([window, 'optionalAccess', _27 => _27.ethereum, 'optionalAccess', _28 => _28.isTrust]) || _optionalChain$i([window, 'optionalAccess', _29 => _29.ethereum, 'optionalAccess', _30 => _30.isTrustWallet])) && // Trust Wallet
|
|
1337
|
+
!_optionalChain$i([window, 'optionalAccess', _31 => _31.ethereum, 'optionalAccess', _32 => _32.isDeficonnectProvider]) && // crypto.com
|
|
1338
|
+
!_optionalChain$i([window, 'optionalAccess', _33 => _33.ethereum, 'optionalAccess', _34 => _34.isHyperPay]) && // isHyperPay
|
|
1339
|
+
!_optionalChain$i([window, 'optionalAccess', _35 => _35.ethereum, 'optionalAccess', _36 => _36.isPhantom]) && // Phantom
|
|
1340
|
+
!_optionalChain$i([window, 'optionalAccess', _37 => _37.solana, 'optionalAccess', _38 => _38.isPhantom]) && // Phantom
|
|
1341
|
+
!_optionalChain$i([window, 'optionalAccess', _39 => _39.ethereum, 'optionalAccess', _40 => _40.isRabby]) && // Rabby
|
|
1342
|
+
!_optionalChain$i([window, 'optionalAccess', _41 => _41.backpack, 'optionalAccess', _42 => _42.isBackpack]) && // Backpack
|
|
1343
|
+
!_optionalChain$i([window, 'optionalAccess', _43 => _43.ethereum, 'optionalAccess', _44 => _44.isTokenPocket]) && // TokenPocket
|
|
1344
|
+
!(_optionalChain$i([window, 'optionalAccess', _45 => _45.ethereum, 'optionalAccess', _46 => _46.isCoinbaseWallet]) || _optionalChain$i([window, 'optionalAccess', _47 => _47.ethereum, 'optionalAccess', _48 => _48.isWalletLink]))
|
|
1336
1345
|
)
|
|
1337
1346
|
};}
|
|
1338
1347
|
|
|
@@ -1458,7 +1467,7 @@ class WindowEthereum {
|
|
|
1458
1467
|
}
|
|
1459
1468
|
} WindowEthereum.__initStatic(); WindowEthereum.__initStatic2();
|
|
1460
1469
|
|
|
1461
|
-
function _optionalChain$
|
|
1470
|
+
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; }
|
|
1462
1471
|
class Binance extends WindowEthereum {
|
|
1463
1472
|
|
|
1464
1473
|
static __initStatic() {this.info = {
|
|
@@ -1468,7 +1477,7 @@ class Binance extends WindowEthereum {
|
|
|
1468
1477
|
};}
|
|
1469
1478
|
|
|
1470
1479
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1471
|
-
return _optionalChain$
|
|
1480
|
+
return _optionalChain$h([window, 'optionalAccess', _2 => _2.BinanceChain]) &&
|
|
1472
1481
|
!window.coin98
|
|
1473
1482
|
};}
|
|
1474
1483
|
|
|
@@ -1476,7 +1485,7 @@ class Binance extends WindowEthereum {
|
|
|
1476
1485
|
|
|
1477
1486
|
} Binance.__initStatic(); Binance.__initStatic2();
|
|
1478
1487
|
|
|
1479
|
-
function _optionalChain$
|
|
1488
|
+
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; }
|
|
1480
1489
|
class Brave extends WindowEthereum {
|
|
1481
1490
|
|
|
1482
1491
|
static __initStatic() {this.info = {
|
|
@@ -1485,10 +1494,10 @@ class Brave extends WindowEthereum {
|
|
|
1485
1494
|
blockchains: supported$2.evm
|
|
1486
1495
|
};}
|
|
1487
1496
|
|
|
1488
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1497
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$g([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isBraveWallet]) };}
|
|
1489
1498
|
} Brave.__initStatic(); Brave.__initStatic2();
|
|
1490
1499
|
|
|
1491
|
-
function _optionalChain$
|
|
1500
|
+
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; }
|
|
1492
1501
|
class Coin98 extends WindowEthereum {
|
|
1493
1502
|
|
|
1494
1503
|
static __initStatic() {this.info = {
|
|
@@ -1497,10 +1506,10 @@ class Coin98 extends WindowEthereum {
|
|
|
1497
1506
|
blockchains: supported$2.evm
|
|
1498
1507
|
};}
|
|
1499
1508
|
|
|
1500
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1509
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$f([window, 'optionalAccess', _2 => _2.coin98]) };}
|
|
1501
1510
|
} Coin98.__initStatic(); Coin98.__initStatic2();
|
|
1502
1511
|
|
|
1503
|
-
function _optionalChain$
|
|
1512
|
+
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; }
|
|
1504
1513
|
class Coinbase extends WindowEthereum {
|
|
1505
1514
|
|
|
1506
1515
|
static __initStatic() {this.info = {
|
|
@@ -1509,10 +1518,10 @@ class Coinbase extends WindowEthereum {
|
|
|
1509
1518
|
blockchains: supported$2.evm
|
|
1510
1519
|
};}
|
|
1511
1520
|
|
|
1512
|
-
static __initStatic2() {this.isAvailable = async()=>{ return (_optionalChain$
|
|
1521
|
+
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])) };}
|
|
1513
1522
|
} Coinbase.__initStatic(); Coinbase.__initStatic2();
|
|
1514
1523
|
|
|
1515
|
-
function _optionalChain$
|
|
1524
|
+
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; }
|
|
1516
1525
|
class CryptoCom extends WindowEthereum {
|
|
1517
1526
|
|
|
1518
1527
|
static __initStatic() {this.info = {
|
|
@@ -1521,7 +1530,7 @@ class CryptoCom extends WindowEthereum {
|
|
|
1521
1530
|
blockchains: supported$2.evm
|
|
1522
1531
|
};}
|
|
1523
1532
|
|
|
1524
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1533
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$d([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isDeficonnectProvider]) };}
|
|
1525
1534
|
} CryptoCom.__initStatic(); CryptoCom.__initStatic2();
|
|
1526
1535
|
|
|
1527
1536
|
class Glow extends WindowSolana {
|
|
@@ -1540,7 +1549,7 @@ class Glow extends WindowSolana {
|
|
|
1540
1549
|
};}
|
|
1541
1550
|
} Glow.__initStatic(); Glow.__initStatic2();
|
|
1542
1551
|
|
|
1543
|
-
function _optionalChain$
|
|
1552
|
+
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; }
|
|
1544
1553
|
class HyperPay extends WindowEthereum {
|
|
1545
1554
|
|
|
1546
1555
|
static __initStatic() {this.info = {
|
|
@@ -1549,10 +1558,10 @@ class HyperPay extends WindowEthereum {
|
|
|
1549
1558
|
blockchains: supported$2.evm
|
|
1550
1559
|
};}
|
|
1551
1560
|
|
|
1552
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1561
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$c([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isHyperPay]) };}
|
|
1553
1562
|
} HyperPay.__initStatic(); HyperPay.__initStatic2();
|
|
1554
1563
|
|
|
1555
|
-
function _optionalChain$
|
|
1564
|
+
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; }
|
|
1556
1565
|
class MetaMask extends WindowEthereum {
|
|
1557
1566
|
|
|
1558
1567
|
static __initStatic() {this.info = {
|
|
@@ -1563,13 +1572,13 @@ class MetaMask extends WindowEthereum {
|
|
|
1563
1572
|
|
|
1564
1573
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1565
1574
|
return(
|
|
1566
|
-
_optionalChain$
|
|
1575
|
+
_optionalChain$b([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isMetaMask]) &&
|
|
1567
1576
|
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1568
1577
|
)
|
|
1569
1578
|
};}
|
|
1570
1579
|
} MetaMask.__initStatic(); MetaMask.__initStatic2();
|
|
1571
1580
|
|
|
1572
|
-
function _optionalChain$
|
|
1581
|
+
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; }
|
|
1573
1582
|
class Opera extends WindowEthereum {
|
|
1574
1583
|
|
|
1575
1584
|
static __initStatic() {this.info = {
|
|
@@ -1578,7 +1587,7 @@ class Opera extends WindowEthereum {
|
|
|
1578
1587
|
blockchains: supported$2.evm
|
|
1579
1588
|
};}
|
|
1580
1589
|
|
|
1581
|
-
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$
|
|
1590
|
+
static __initStatic2() {this.isAvailable = async()=>{ return _optionalChain$a([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isOpera]) };}
|
|
1582
1591
|
} Opera.__initStatic(); Opera.__initStatic2();
|
|
1583
1592
|
|
|
1584
1593
|
class Phantom extends WindowSolana {
|
|
@@ -1596,7 +1605,7 @@ class Phantom extends WindowSolana {
|
|
|
1596
1605
|
};}
|
|
1597
1606
|
} Phantom.__initStatic(); Phantom.__initStatic2();
|
|
1598
1607
|
|
|
1599
|
-
function _optionalChain$
|
|
1608
|
+
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; }
|
|
1600
1609
|
class Rabby extends WindowEthereum {
|
|
1601
1610
|
|
|
1602
1611
|
static __initStatic() {this.info = {
|
|
@@ -1607,12 +1616,12 @@ class Rabby extends WindowEthereum {
|
|
|
1607
1616
|
|
|
1608
1617
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1609
1618
|
return(
|
|
1610
|
-
_optionalChain$
|
|
1619
|
+
_optionalChain$9([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isRabby])
|
|
1611
1620
|
)
|
|
1612
1621
|
};}
|
|
1613
1622
|
} Rabby.__initStatic(); Rabby.__initStatic2();
|
|
1614
1623
|
|
|
1615
|
-
function _optionalChain$
|
|
1624
|
+
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; }
|
|
1616
1625
|
|
|
1617
1626
|
|
|
1618
1627
|
const KEY$2 = '_DePayWeb3WalletsConnectedSolanaMobileWalletInstance';
|
|
@@ -1703,8 +1712,8 @@ class SolanaMobileWalletAdapter {
|
|
|
1703
1712
|
await transact(
|
|
1704
1713
|
async (wallet) => {
|
|
1705
1714
|
await this.authorize(wallet);
|
|
1706
|
-
if(_optionalChain$
|
|
1707
|
-
if(_optionalChain$
|
|
1715
|
+
if(_optionalChain$8([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$2+'_name'] = this.name = options.name; }
|
|
1716
|
+
if(_optionalChain$8([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$2+'_logo'] = this.logo = options.logo; }
|
|
1708
1717
|
}
|
|
1709
1718
|
);
|
|
1710
1719
|
return this._account
|
|
@@ -1763,7 +1772,7 @@ class SolanaMobileWalletAdapter {
|
|
|
1763
1772
|
}
|
|
1764
1773
|
} SolanaMobileWalletAdapter.__initStatic(); SolanaMobileWalletAdapter.__initStatic2();
|
|
1765
1774
|
|
|
1766
|
-
function _optionalChain$
|
|
1775
|
+
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; }
|
|
1767
1776
|
class Solflare extends WindowSolana {
|
|
1768
1777
|
|
|
1769
1778
|
static __initStatic() {this.info = {
|
|
@@ -1774,7 +1783,7 @@ class Solflare extends WindowSolana {
|
|
|
1774
1783
|
|
|
1775
1784
|
static __initStatic2() {this.isAvailable = async()=>{
|
|
1776
1785
|
return (
|
|
1777
|
-
_optionalChain$
|
|
1786
|
+
_optionalChain$7([window, 'optionalAccess', _2 => _2.solflare]) &&
|
|
1778
1787
|
window.solflare.isSolflare
|
|
1779
1788
|
)
|
|
1780
1789
|
};}
|
|
@@ -1784,6 +1793,22 @@ class Solflare extends WindowSolana {
|
|
|
1784
1793
|
_sendTransaction(transaction) { return this.getProvider().signTransaction(transaction) }
|
|
1785
1794
|
} Solflare.__initStatic(); Solflare.__initStatic2();
|
|
1786
1795
|
|
|
1796
|
+
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; }
|
|
1797
|
+
class TokenPocket extends WindowEthereum {
|
|
1798
|
+
|
|
1799
|
+
static __initStatic() {this.info = {
|
|
1800
|
+
name: 'TP Wallet (TokenPocket)',
|
|
1801
|
+
logo: "data:image/sv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NzI4LjQ0OCIgaGVpZ2h0PSI0NzAiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNjggMjc3KSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",
|
|
1802
|
+
blockchains: supported$2.evm
|
|
1803
|
+
};}
|
|
1804
|
+
|
|
1805
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
1806
|
+
return (
|
|
1807
|
+
_optionalChain$6([window, 'optionalAccess', _3 => _3.ethereum, 'optionalAccess', _4 => _4.isTokenPocket])
|
|
1808
|
+
)
|
|
1809
|
+
};}
|
|
1810
|
+
} TokenPocket.__initStatic(); TokenPocket.__initStatic2();
|
|
1811
|
+
|
|
1787
1812
|
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; }
|
|
1788
1813
|
class Trust extends WindowEthereum {
|
|
1789
1814
|
|
|
@@ -1793,7 +1818,12 @@ class Trust extends WindowEthereum {
|
|
|
1793
1818
|
blockchains: supported$2.evm
|
|
1794
1819
|
};}
|
|
1795
1820
|
|
|
1796
|
-
static __initStatic2() {this.isAvailable = async()=>{
|
|
1821
|
+
static __initStatic2() {this.isAvailable = async()=>{
|
|
1822
|
+
return (
|
|
1823
|
+
(_optionalChain$5([window, 'optionalAccess', _5 => _5.ethereum, 'optionalAccess', _6 => _6.isTrust]) || _optionalChain$5([window, 'optionalAccess', _7 => _7.ethereum, 'optionalAccess', _8 => _8.isTrustWallet])) &&
|
|
1824
|
+
Object.keys(window.ethereum).filter((key)=>key.match(/^is(?!Connected)(?!Debug)(?!TrustWallet)(?!MetaMask)(?!PocketUniverse)(?!RevokeCash)/)).length == 1
|
|
1825
|
+
)
|
|
1826
|
+
};}
|
|
1797
1827
|
} Trust.__initStatic(); Trust.__initStatic2();
|
|
1798
1828
|
|
|
1799
1829
|
const transactionApiBlockchainNames = {
|
|
@@ -2992,6 +3022,7 @@ var wallets = {
|
|
|
2992
3022
|
Coin98,
|
|
2993
3023
|
CryptoCom,
|
|
2994
3024
|
HyperPay,
|
|
3025
|
+
TokenPocket,
|
|
2995
3026
|
WindowEthereum,
|
|
2996
3027
|
WindowSolana,
|
|
2997
3028
|
SolanaMobileWalletAdapter,
|