@dynamic-labs/ethereum 2.0.0-alpha.2 → 2.0.0-alpha.4
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/CHANGELOG.md +35 -0
- package/package.json +7 -9
- package/src/EthWalletConnector.cjs +2 -2
- package/src/EthWalletConnector.d.ts +2 -3
- package/src/EthWalletConnector.js +1 -1
- package/src/coinbase/coinbase.cjs +1 -4
- package/src/coinbase/coinbase.js +1 -4
- package/src/index.cjs +5 -12
- package/src/index.js +4 -11
- package/src/injected/InjectedWalletBase.cjs +1 -9
- package/src/injected/InjectedWalletBase.js +1 -9
- package/src/injected/fetchInjectedWalletConnectors.d.ts +0 -1
- package/src/walletConnect/fetchWalletConnectWallets.cjs +10 -30
- package/src/walletConnect/fetchWalletConnectWallets.d.ts +2 -5
- package/src/walletConnect/fetchWalletConnectWallets.js +10 -30
- package/src/walletConnect/index.d.ts +1 -2
- package/src/walletConnect/walletConnect.cjs +393 -74
- package/src/walletConnect/walletConnect.d.ts +306 -25
- package/src/walletConnect/walletConnect.js +394 -76
- package/src/walletConnect/client/client.cjs +0 -201
- package/src/walletConnect/client/client.d.ts +0 -17
- package/src/walletConnect/client/client.js +0 -187
- package/src/walletConnect/client/index.d.ts +0 -1
- package/src/walletConnect/client/types.d.ts +0 -4
- package/src/walletConnect/walletConnectV2.cjs +0 -475
- package/src/walletConnect/walletConnectV2.d.ts +0 -333
- package/src/walletConnect/walletConnectV2.js +0 -466
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,39 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-02-22)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* remove wallet connector from callback types (#4730)
|
|
8
|
+
* drop support for walletconnect v1 (#4666)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add coin98 evm ([1d64f5f](https://github.com/dynamic-labs/DynamicAuth/commit/1d64f5f00885ff671358651fd0251b77a2e05739))
|
|
13
|
+
* add support for solana versioned transactions ([#4721](https://github.com/dynamic-labs/DynamicAuth/issues/4721)) ([25b1643](https://github.com/dynamic-labs/DynamicAuth/commit/25b1643f8addbada09fff5d22e988bdf22038170))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* allow rpc-providers package to use exports based on usage ([#4539](https://github.com/dynamic-labs/DynamicAuth/issues/4539)) ([abdc196](https://github.com/dynamic-labs/DynamicAuth/commit/abdc19641580cbcfe8f9e357c645f8291bc9ed66))
|
|
19
|
+
* coinbasesocial should display coinbase in profile linking section ([#4680](https://github.com/dynamic-labs/DynamicAuth/issues/4680)) ([21cbe2e](https://github.com/dynamic-labs/DynamicAuth/commit/21cbe2e24345a33bc927428c01cc7b5c724e40e5))
|
|
20
|
+
* improve on transaction confirmation step ([#4704](https://github.com/dynamic-labs/DynamicAuth/issues/4704)) ([f2b27cf](https://github.com/dynamic-labs/DynamicAuth/commit/f2b27cfd94452be2eb7e88a298f61ef56985931f))
|
|
21
|
+
* prevent the DynamicMultiWalletPromptsWidget from opening if useris not logged in ([#4701](https://github.com/dynamic-labs/DynamicAuth/issues/4701)) ([2bb35fd](https://github.com/dynamic-labs/DynamicAuth/commit/2bb35fd29b60677e893390f7d47857cd76c73adc))
|
|
22
|
+
* reduce isPreauthorized calls when starknet wallet is connected ([#4710](https://github.com/dynamic-labs/DynamicAuth/issues/4710)) ([ca6a630](https://github.com/dynamic-labs/DynamicAuth/commit/ca6a630dd47a1c116afcd63fe7256ffc745532ab))
|
|
23
|
+
* update sepolia currency symbol ([#4728](https://github.com/dynamic-labs/DynamicAuth/issues/4728)) ([3c228a0](https://github.com/dynamic-labs/DynamicAuth/commit/3c228a03ccc962374ad1dac3ab45af92732ba61a))
|
|
24
|
+
* use overflow clip when available, use hidden by default ([#4696](https://github.com/dynamic-labs/DynamicAuth/issues/4696)) ([29fb2a1](https://github.com/dynamic-labs/DynamicAuth/commit/29fb2a1e48b010c6c1d525403fbdcf7ded068466))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
* drop support for walletconnect v1 ([#4666](https://github.com/dynamic-labs/DynamicAuth/issues/4666)) ([4af93e4](https://github.com/dynamic-labs/DynamicAuth/commit/4af93e4f9b95fa4c49bbfda0c1144da1a4a43991))
|
|
28
|
+
* remove wallet connector from callback types ([#4730](https://github.com/dynamic-labs/DynamicAuth/issues/4730)) ([08cb200](https://github.com/dynamic-labs/DynamicAuth/commit/08cb200a09c0fd78d2093d1a60b17089b3b2c2b1))
|
|
29
|
+
|
|
30
|
+
## [2.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-02-13)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* allow any icon to be used in wallet list tabs ([#4678](https://github.com/dynamic-labs/DynamicAuth/issues/4678)) ([eb03603](https://github.com/dynamic-labs/DynamicAuth/commit/eb036031725a91cb28c144b3bdcb5b20b3314038))
|
|
36
|
+
|
|
2
37
|
## [2.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-13)
|
|
3
38
|
|
|
4
39
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -27,17 +27,15 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@coinbase/wallet-sdk": "3.9.1",
|
|
30
|
-
"@walletconnect/client": "1.8.0",
|
|
31
|
-
"@walletconnect/ethereum-provider": "1.8.0",
|
|
32
30
|
"@walletconnect/universal-provider": "2.10.6",
|
|
33
31
|
"eventemitter3": "5.0.1",
|
|
34
32
|
"buffer": "6.0.3",
|
|
35
|
-
"@dynamic-labs/rpc-
|
|
36
|
-
"@dynamic-labs/turnkey": "2.0.0-alpha.
|
|
37
|
-
"@dynamic-labs/types": "2.0.0-alpha.
|
|
38
|
-
"@dynamic-labs/utils": "2.0.0-alpha.
|
|
39
|
-
"@dynamic-labs/wallet-book": "2.0.0-alpha.
|
|
40
|
-
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.
|
|
33
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.0.0-alpha.4",
|
|
34
|
+
"@dynamic-labs/turnkey": "2.0.0-alpha.4",
|
|
35
|
+
"@dynamic-labs/types": "2.0.0-alpha.4",
|
|
36
|
+
"@dynamic-labs/utils": "2.0.0-alpha.4",
|
|
37
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.4",
|
|
38
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.4",
|
|
41
39
|
"stream": "0.0.2"
|
|
42
40
|
},
|
|
43
41
|
"peerDependencies": {
|
|
@@ -6,7 +6,7 @@ var _tslib = require('../_virtual/_tslib.cjs');
|
|
|
6
6
|
var viem = require('viem');
|
|
7
7
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
8
|
var utils = require('@dynamic-labs/utils');
|
|
9
|
-
var
|
|
9
|
+
var rpcProviderEthereum = require('@dynamic-labs/rpc-provider-ethereum');
|
|
10
10
|
var findEvmNetwork = require('./utils/findEvmNetwork.cjs');
|
|
11
11
|
|
|
12
12
|
class EthWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
@@ -38,7 +38,7 @@ class EthWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
38
38
|
}, {});
|
|
39
39
|
this.evmNetworks = utils.parseEvmNetworks(props.evmNetworks);
|
|
40
40
|
this.chainRpcProviders = props.chainRpcProviders;
|
|
41
|
-
(_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerChainProviders(
|
|
41
|
+
(_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerChainProviders(rpcProviderEthereum.ProviderChain.EVM, (config) => {
|
|
42
42
|
const rpcProviders = {};
|
|
43
43
|
if (config === null || config === void 0 ? void 0 : config.evm) {
|
|
44
44
|
rpcProviders.evm = utils.parseEvmNetworks(config.evm).map((network) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WalletClient, PublicClient } from 'viem';
|
|
2
2
|
import { NameServiceData, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
3
3
|
import { EvmNetwork, GenericNetwork } from '@dynamic-labs/types';
|
|
4
|
-
import {
|
|
4
|
+
import { IChainRpcProviders } from '@dynamic-labs/rpc-provider-ethereum';
|
|
5
5
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
6
6
|
export type SwitchNetworkOps = {
|
|
7
7
|
networkChainId?: number;
|
|
@@ -11,9 +11,8 @@ type EvmRpcMap = {
|
|
|
11
11
|
[chainId: number]: string;
|
|
12
12
|
};
|
|
13
13
|
export type EthWalletConnectorOpts = {
|
|
14
|
-
chainRpcProviders:
|
|
14
|
+
chainRpcProviders: IChainRpcProviders;
|
|
15
15
|
evmNetworks: GenericNetwork[];
|
|
16
|
-
isWalletConnectV2Enabled?: boolean;
|
|
17
16
|
walletBook: WalletBookSchema;
|
|
18
17
|
};
|
|
19
18
|
export declare abstract class EthWalletConnector extends WalletConnectorBase {
|
|
@@ -2,7 +2,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
|
|
|
2
2
|
import { createPublicClient, http, formatEther } from 'viem';
|
|
3
3
|
import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { parseEvmNetworks, getOrMapViemChain, retryableFn, FALLBACK_UNDEFINED, DynamicError } from '@dynamic-labs/utils';
|
|
5
|
-
import { ProviderChain } from '@dynamic-labs/rpc-
|
|
5
|
+
import { ProviderChain } from '@dynamic-labs/rpc-provider-ethereum';
|
|
6
6
|
import { findEvmNetwork } from './utils/findEvmNetwork.js';
|
|
7
7
|
|
|
8
8
|
class EthWalletConnector extends WalletConnectorBase {
|
|
@@ -10,10 +10,7 @@ require('@dynamic-labs/turnkey');
|
|
|
10
10
|
require('@dynamic-labs/utils');
|
|
11
11
|
var ethProviderHelper = require('../ethProviderHelper.cjs');
|
|
12
12
|
var EthWalletConnector = require('../EthWalletConnector.cjs');
|
|
13
|
-
require('../walletConnect/
|
|
14
|
-
require('@walletconnect/ethereum-provider');
|
|
15
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
16
|
-
require('@walletconnect/client');
|
|
13
|
+
require('../walletConnect/walletConnect.cjs');
|
|
17
14
|
var client = require('./client/client.cjs');
|
|
18
15
|
|
|
19
16
|
class Coinbase extends EthWalletConnector.EthWalletConnector {
|
package/src/coinbase/coinbase.js
CHANGED
|
@@ -6,10 +6,7 @@ import '@dynamic-labs/turnkey';
|
|
|
6
6
|
import '@dynamic-labs/utils';
|
|
7
7
|
import { EthProviderHelper } from '../ethProviderHelper.js';
|
|
8
8
|
import { EthWalletConnector } from '../EthWalletConnector.js';
|
|
9
|
-
import '../walletConnect/
|
|
10
|
-
import '@walletconnect/ethereum-provider';
|
|
11
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
12
|
-
import '@walletconnect/client';
|
|
9
|
+
import '../walletConnect/walletConnect.js';
|
|
13
10
|
import { getCoinbaseProvider, fetchPublicAddress, signMessage, killCoinbaseSession } from './client/client.js';
|
|
14
11
|
|
|
15
12
|
class Coinbase extends EthWalletConnector {
|
package/src/index.cjs
CHANGED
|
@@ -7,19 +7,12 @@ var turnkey = require('@dynamic-labs/turnkey');
|
|
|
7
7
|
var PhantomEvm = require('./injected/PhantomEvm.cjs');
|
|
8
8
|
var ExodusEvm = require('./injected/ExodusEvm.cjs');
|
|
9
9
|
var fetchInjectedWalletConnectors = require('./injected/fetchInjectedWalletConnectors.cjs');
|
|
10
|
-
require('./walletConnect/
|
|
11
|
-
require('../_virtual/_tslib.cjs');
|
|
12
|
-
require('@walletconnect/ethereum-provider');
|
|
13
|
-
require('viem');
|
|
14
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
15
|
-
require('@dynamic-labs/wallet-book');
|
|
16
|
-
require('@dynamic-labs/utils');
|
|
17
|
-
var EthWalletConnector = require('./EthWalletConnector.cjs');
|
|
18
|
-
var constants = require('./constants.cjs');
|
|
19
|
-
require('@walletconnect/client');
|
|
10
|
+
require('./walletConnect/walletConnect.cjs');
|
|
20
11
|
var fetchWalletConnectWallets = require('./walletConnect/fetchWalletConnectWallets.cjs');
|
|
21
12
|
var coinbase = require('./coinbase/coinbase.cjs');
|
|
13
|
+
var EthWalletConnector = require('./EthWalletConnector.cjs');
|
|
22
14
|
var ethProviderHelper = require('./ethProviderHelper.cjs');
|
|
15
|
+
var constants = require('./constants.cjs');
|
|
23
16
|
|
|
24
17
|
const EthereumWalletConnectors = (props) => [
|
|
25
18
|
...fetchInjectedWalletConnectors.injectedWalletOverrides,
|
|
@@ -27,7 +20,7 @@ const EthereumWalletConnectors = (props) => [
|
|
|
27
20
|
...fetchWalletConnectWallets.fetchWalletConnectWallets(props),
|
|
28
21
|
...turnkey.TurnkeyWalletConnectors(props),
|
|
29
22
|
coinbase.Coinbase,
|
|
30
|
-
fetchWalletConnectWallets.getWalletConnectConnector(
|
|
23
|
+
fetchWalletConnectWallets.getWalletConnectConnector(),
|
|
31
24
|
];
|
|
32
25
|
|
|
33
26
|
exports.PhantomEvm = PhantomEvm.PhantomEvm;
|
|
@@ -35,6 +28,6 @@ exports.ExodusEvm = ExodusEvm.ExodusEvm;
|
|
|
35
28
|
exports.fetchInjectedWalletConnector = fetchInjectedWalletConnectors.fetchInjectedWalletConnector;
|
|
36
29
|
exports.injectedWalletOverrides = fetchInjectedWalletConnectors.injectedWalletOverrides;
|
|
37
30
|
exports.EthWalletConnector = EthWalletConnector.EthWalletConnector;
|
|
38
|
-
exports.INFURA_ID = constants.INFURA_ID;
|
|
39
31
|
exports.EthProviderHelper = ethProviderHelper.EthProviderHelper;
|
|
32
|
+
exports.INFURA_ID = constants.INFURA_ID;
|
|
40
33
|
exports.EthereumWalletConnectors = EthereumWalletConnectors;
|
package/src/index.js
CHANGED
|
@@ -4,19 +4,12 @@ export { PhantomEvm } from './injected/PhantomEvm.js';
|
|
|
4
4
|
export { ExodusEvm } from './injected/ExodusEvm.js';
|
|
5
5
|
import { injectedWalletOverrides, fetchInjectedWalletConnector } from './injected/fetchInjectedWalletConnectors.js';
|
|
6
6
|
export { fetchInjectedWalletConnector, injectedWalletOverrides } from './injected/fetchInjectedWalletConnectors.js';
|
|
7
|
-
import './walletConnect/
|
|
8
|
-
import '../_virtual/_tslib.js';
|
|
9
|
-
import '@walletconnect/ethereum-provider';
|
|
10
|
-
import 'viem';
|
|
11
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
12
|
-
import '@dynamic-labs/wallet-book';
|
|
13
|
-
import '@dynamic-labs/utils';
|
|
14
|
-
export { EthWalletConnector } from './EthWalletConnector.js';
|
|
15
|
-
export { INFURA_ID } from './constants.js';
|
|
16
|
-
import '@walletconnect/client';
|
|
7
|
+
import './walletConnect/walletConnect.js';
|
|
17
8
|
import { fetchWalletConnectWallets, getWalletConnectConnector } from './walletConnect/fetchWalletConnectWallets.js';
|
|
18
9
|
import { Coinbase } from './coinbase/coinbase.js';
|
|
10
|
+
export { EthWalletConnector } from './EthWalletConnector.js';
|
|
19
11
|
export { EthProviderHelper } from './ethProviderHelper.js';
|
|
12
|
+
export { INFURA_ID } from './constants.js';
|
|
20
13
|
|
|
21
14
|
const EthereumWalletConnectors = (props) => [
|
|
22
15
|
...injectedWalletOverrides,
|
|
@@ -24,7 +17,7 @@ const EthereumWalletConnectors = (props) => [
|
|
|
24
17
|
...fetchWalletConnectWallets(props),
|
|
25
18
|
...TurnkeyWalletConnectors(props),
|
|
26
19
|
Coinbase,
|
|
27
|
-
getWalletConnectConnector(
|
|
20
|
+
getWalletConnectConnector(),
|
|
28
21
|
];
|
|
29
22
|
|
|
30
23
|
export { EthereumWalletConnectors };
|
|
@@ -4,7 +4,6 @@ var _tslib = require('../../_virtual/_tslib.cjs');
|
|
|
4
4
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
5
5
|
var ethProviderHelper = require('../ethProviderHelper.cjs');
|
|
6
6
|
var EthWalletConnector = require('../EthWalletConnector.cjs');
|
|
7
|
-
var walletConnectV2 = require('../walletConnect/walletConnectV2.cjs');
|
|
8
7
|
var walletConnect = require('../walletConnect/walletConnect.cjs');
|
|
9
8
|
|
|
10
9
|
class InjectedWalletBase extends EthWalletConnector.EthWalletConnector {
|
|
@@ -27,17 +26,10 @@ class InjectedWalletBase extends EthWalletConnector.EthWalletConnector {
|
|
|
27
26
|
return this.ethProviderHelper;
|
|
28
27
|
}
|
|
29
28
|
getMobileOrInstalledWallet() {
|
|
30
|
-
var _a, _b, _c, _d;
|
|
31
29
|
if (this.walletConnectorFallback && !this.isInstalledOnBrowser()) {
|
|
32
30
|
if (!this.wallet)
|
|
33
31
|
this.wallet = walletBook.findWalletBookWallet(this.walletBook, this.key);
|
|
34
|
-
|
|
35
|
-
((_d = (_c = (_b = this.wallet) === null || _b === void 0 ? void 0 : _b.walletConnect) === null || _c === void 0 ? void 0 : _c.sdks) === null || _d === void 0 ? void 0 : _d.includes('sign_v2'))) {
|
|
36
|
-
return new walletConnectV2.WalletConnectV2(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return new walletConnect.WalletConnect(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
|
|
40
|
-
}
|
|
32
|
+
return new walletConnect.WalletConnect(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
|
|
41
33
|
}
|
|
42
34
|
return this;
|
|
43
35
|
}
|
|
@@ -2,7 +2,6 @@ import { __awaiter } from '../../_virtual/_tslib.js';
|
|
|
2
2
|
import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
3
3
|
import { EthProviderHelper } from '../ethProviderHelper.js';
|
|
4
4
|
import { EthWalletConnector } from '../EthWalletConnector.js';
|
|
5
|
-
import { WalletConnectV2 } from '../walletConnect/walletConnectV2.js';
|
|
6
5
|
import { WalletConnect } from '../walletConnect/walletConnect.js';
|
|
7
6
|
|
|
8
7
|
class InjectedWalletBase extends EthWalletConnector {
|
|
@@ -25,17 +24,10 @@ class InjectedWalletBase extends EthWalletConnector {
|
|
|
25
24
|
return this.ethProviderHelper;
|
|
26
25
|
}
|
|
27
26
|
getMobileOrInstalledWallet() {
|
|
28
|
-
var _a, _b, _c, _d;
|
|
29
27
|
if (this.walletConnectorFallback && !this.isInstalledOnBrowser()) {
|
|
30
28
|
if (!this.wallet)
|
|
31
29
|
this.wallet = findWalletBookWallet(this.walletBook, this.key);
|
|
32
|
-
|
|
33
|
-
((_d = (_c = (_b = this.wallet) === null || _b === void 0 ? void 0 : _b.walletConnect) === null || _c === void 0 ? void 0 : _c.sdks) === null || _d === void 0 ? void 0 : _d.includes('sign_v2'))) {
|
|
34
|
-
return new WalletConnectV2(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return new WalletConnect(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
|
|
38
|
-
}
|
|
30
|
+
return new WalletConnect(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
|
|
39
31
|
}
|
|
40
32
|
return this;
|
|
41
33
|
}
|
|
@@ -2,6 +2,5 @@ import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core'
|
|
|
2
2
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
3
3
|
export declare const injectedWalletOverrides: WalletConnectorConstructor[];
|
|
4
4
|
export declare const fetchInjectedWalletConnector: ({ walletBook, }: {
|
|
5
|
-
isWalletConnectV2Enabled: boolean;
|
|
6
5
|
walletBook: WalletBookSchema;
|
|
7
6
|
}) => WalletConnectorConstructor[];
|
|
@@ -2,47 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var walletConnectV2 = require('./walletConnectV2.cjs');
|
|
6
5
|
var walletConnect = require('./walletConnect.cjs');
|
|
7
6
|
|
|
8
|
-
const fetchWalletConnectWallets = ({
|
|
7
|
+
const fetchWalletConnectWallets = ({ walletBook, }) => {
|
|
9
8
|
var _a;
|
|
10
9
|
return Object.values((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
|
|
11
10
|
.filter((wallet) => wallet.walletConnect && !wallet.filterFromWalletConnect)
|
|
12
11
|
.map((wallet) => {
|
|
13
|
-
var _a;
|
|
14
12
|
const { shortName } = wallet;
|
|
15
13
|
const name = shortName || wallet.name;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
constructor(props) {
|
|
22
|
-
super(Object.assign(Object.assign({}, props), { walletName: name }));
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return class extends walletConnect.WalletConnect {
|
|
28
|
-
constructor(props) {
|
|
29
|
-
super(Object.assign(Object.assign({}, props), { walletName: name }));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
14
|
+
return class extends walletConnect.WalletConnect {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(Object.assign(Object.assign({}, props), { walletName: name }));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
33
19
|
});
|
|
34
20
|
};
|
|
35
|
-
const getWalletConnectConnector = (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
super(Object.assign(Object.assign({}, props), { walletName: 'WalletConnect' }));
|
|
39
|
-
}
|
|
21
|
+
const getWalletConnectConnector = () => class extends walletConnect.WalletConnect {
|
|
22
|
+
constructor(props) {
|
|
23
|
+
super(Object.assign(Object.assign({}, props), { walletName: 'WalletConnect' }));
|
|
40
24
|
}
|
|
41
|
-
|
|
42
|
-
constructor(props) {
|
|
43
|
-
super(Object.assign(Object.assign({}, props), { walletName: 'WalletConnect' }));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
25
|
+
};
|
|
46
26
|
|
|
47
27
|
exports.fetchWalletConnectWallets = fetchWalletConnectWallets;
|
|
48
28
|
exports.getWalletConnectConnector = getWalletConnectConnector;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
2
2
|
import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
-
export declare const fetchWalletConnectWallets: ({
|
|
4
|
-
isWalletConnectV2Enabled: boolean;
|
|
3
|
+
export declare const fetchWalletConnectWallets: ({ walletBook, }: {
|
|
5
4
|
walletBook: WalletBookSchema;
|
|
6
5
|
}) => Array<WalletConnectorConstructor>;
|
|
7
|
-
export declare const getWalletConnectConnector: (
|
|
8
|
-
isWalletConnectV2Enabled: boolean;
|
|
9
|
-
}) => WalletConnectorConstructor;
|
|
6
|
+
export declare const getWalletConnectConnector: () => WalletConnectorConstructor;
|
|
@@ -1,43 +1,23 @@
|
|
|
1
|
-
import { WalletConnectV2 } from './walletConnectV2.js';
|
|
2
1
|
import { WalletConnect } from './walletConnect.js';
|
|
3
2
|
|
|
4
|
-
const fetchWalletConnectWallets = ({
|
|
3
|
+
const fetchWalletConnectWallets = ({ walletBook, }) => {
|
|
5
4
|
var _a;
|
|
6
5
|
return Object.values((_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _a !== void 0 ? _a : {})
|
|
7
6
|
.filter((wallet) => wallet.walletConnect && !wallet.filterFromWalletConnect)
|
|
8
7
|
.map((wallet) => {
|
|
9
|
-
var _a;
|
|
10
8
|
const { shortName } = wallet;
|
|
11
9
|
const name = shortName || wallet.name;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
constructor(props) {
|
|
18
|
-
super(Object.assign(Object.assign({}, props), { walletName: name }));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return class extends WalletConnect {
|
|
24
|
-
constructor(props) {
|
|
25
|
-
super(Object.assign(Object.assign({}, props), { walletName: name }));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
10
|
+
return class extends WalletConnect {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(Object.assign(Object.assign({}, props), { walletName: name }));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
29
15
|
});
|
|
30
16
|
};
|
|
31
|
-
const getWalletConnectConnector = (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
super(Object.assign(Object.assign({}, props), { walletName: 'WalletConnect' }));
|
|
35
|
-
}
|
|
17
|
+
const getWalletConnectConnector = () => class extends WalletConnect {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(Object.assign(Object.assign({}, props), { walletName: 'WalletConnect' }));
|
|
36
20
|
}
|
|
37
|
-
|
|
38
|
-
constructor(props) {
|
|
39
|
-
super(Object.assign(Object.assign({}, props), { walletName: 'WalletConnect' }));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
21
|
+
};
|
|
42
22
|
|
|
43
23
|
export { fetchWalletConnectWallets, getWalletConnectConnector };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { WalletConnect } from './walletConnect';
|
|
1
|
+
export { WalletConnect, type WalletConnectOpts } from './walletConnect';
|
|
3
2
|
export { fetchWalletConnectWallets } from './fetchWalletConnectWallets';
|