@dynamic-labs/multi-wallet 0.17.0-RC.6 → 0.17.0-RC.8
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 +53 -0
- package/package.json +8 -6
- package/src/index.cjs +0 -18
- package/src/index.d.ts +0 -4
- package/src/index.js +1 -4
- package/src/multi-wallet.cjs +53 -96
- package/src/multi-wallet.js +53 -96
- package/src/types.d.ts +9 -47
- package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.d.ts +1 -1
- package/src/utils/getApiProviders.cjs +15 -0
- package/src/utils/getApiProviders.d.ts +10 -0
- package/src/utils/getApiProviders.js +11 -0
- package/src/utils/message.cjs +2 -2
- package/src/utils/message.d.ts +2 -2
- package/src/utils/message.js +1 -1
- package/src/utils/walletConnect.cjs +11 -8
- package/src/utils/walletConnect.d.ts +4 -4
- package/src/utils/walletConnect.js +11 -8
- package/src/wallets/algorand/MyAlgoWalletConnector.cjs +3 -3
- package/src/wallets/algorand/MyAlgoWalletConnector.js +1 -1
- package/src/wallets/clients/coinbase/coinbase.cjs +4 -4
- package/src/wallets/clients/coinbase/coinbase.js +1 -1
- package/src/wallets/clients/coinbase/types.d.ts +2 -2
- package/src/wallets/clients/walletConnect/walletConnect.cjs +20 -46
- package/src/wallets/clients/walletConnect/walletConnect.d.ts +1 -3
- package/src/wallets/clients/walletConnect/walletConnect.js +18 -43
- package/src/wallets/cosmos/KeplrWalletConnect.cjs +18 -16
- package/src/wallets/cosmos/KeplrWalletConnect.d.ts +7 -6
- package/src/wallets/cosmos/KeplrWalletConnect.js +14 -12
- package/src/wallets/cosmos/KeplrWalletConnector.cjs +21 -6
- package/src/wallets/cosmos/KeplrWalletConnector.d.ts +10 -5
- package/src/wallets/cosmos/KeplrWalletConnector.js +21 -6
- package/src/wallets/cosmos/wcClient.lib.cjs +100 -0
- package/src/wallets/cosmos/wcClient.lib.d.ts +20 -0
- package/src/wallets/cosmos/wcClient.lib.js +87 -0
- package/src/wallets/ethereum/BloctoEvm.cjs +10 -12
- package/src/wallets/ethereum/BloctoEvm.d.ts +2 -7
- package/src/wallets/ethereum/BloctoEvm.js +8 -10
- package/src/wallets/ethereum/EthWalletConnector.cjs +34 -19
- package/src/wallets/ethereum/EthWalletConnector.d.ts +8 -4
- package/src/wallets/ethereum/EthWalletConnector.js +28 -13
- package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.cjs +0 -2
- package/src/wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.js +0 -2
- package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.cjs +2 -2
- package/src/wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js +1 -1
- package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.cjs +14 -38
- package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.d.ts +5 -7
- package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.js +14 -38
- package/src/wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.cjs +10 -4
- package/src/wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.js +9 -3
- package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.cjs +15 -11
- package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.d.ts +9 -8
- package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.js +13 -9
- package/src/wallets/ethereum/coinbase.cjs +9 -11
- package/src/wallets/ethereum/coinbase.d.ts +7 -11
- package/src/wallets/ethereum/coinbase.js +10 -12
- package/src/wallets/ethereum/ethProviderHelper.cjs +103 -101
- package/src/wallets/ethereum/ethProviderHelper.d.ts +24 -31
- package/src/wallets/ethereum/ethProviderHelper.js +100 -98
- package/src/wallets/ethereum/evm-network.cjs +2 -2
- package/src/wallets/ethereum/evm-network.d.ts +1 -17
- package/src/wallets/ethereum/evm-network.js +2 -2
- package/src/wallets/ethereum/injected/BloctoInjected.cjs +2 -3
- package/src/wallets/ethereum/injected/BloctoInjected.d.ts +2 -3
- package/src/wallets/ethereum/injected/BloctoInjected.js +2 -3
- package/src/wallets/ethereum/injected/BraveEvm.cjs +2 -3
- package/src/wallets/ethereum/injected/BraveEvm.d.ts +2 -3
- package/src/wallets/ethereum/injected/BraveEvm.js +2 -3
- package/src/wallets/ethereum/injected/Dawn.cjs +2 -3
- package/src/wallets/ethereum/injected/Dawn.d.ts +2 -3
- package/src/wallets/ethereum/injected/Dawn.js +2 -3
- package/src/wallets/ethereum/injected/ExodusEvm.cjs +2 -3
- package/src/wallets/ethereum/injected/ExodusEvm.d.ts +2 -3
- package/src/wallets/ethereum/injected/ExodusEvm.js +2 -3
- package/src/wallets/ethereum/injected/Frame.cjs +2 -3
- package/src/wallets/ethereum/injected/Frame.d.ts +2 -3
- package/src/wallets/ethereum/injected/Frame.js +2 -3
- package/src/wallets/ethereum/injected/GameStop.cjs +2 -3
- package/src/wallets/ethereum/injected/GameStop.d.ts +2 -3
- package/src/wallets/ethereum/injected/GameStop.js +2 -3
- package/src/wallets/ethereum/injected/InjectedWalletBase.cjs +74 -0
- package/src/wallets/ethereum/{meta-mask.d.ts → injected/InjectedWalletBase.d.ts} +7 -9
- package/src/wallets/ethereum/injected/InjectedWalletBase.js +72 -0
- package/src/wallets/ethereum/injected/MetaMask.cjs +13 -0
- package/src/wallets/ethereum/injected/MetaMask.d.ts +6 -0
- package/src/wallets/ethereum/injected/MetaMask.js +11 -0
- package/src/wallets/ethereum/injected/Opera.cjs +2 -3
- package/src/wallets/ethereum/injected/Opera.d.ts +2 -3
- package/src/wallets/ethereum/injected/Opera.js +2 -3
- package/src/wallets/ethereum/injected/PhantomEvm.cjs +2 -3
- package/src/wallets/ethereum/injected/PhantomEvm.d.ts +2 -3
- package/src/wallets/ethereum/injected/PhantomEvm.js +2 -3
- package/src/wallets/ethereum/injected/Trust.cjs +3 -3
- package/src/wallets/ethereum/injected/Trust.d.ts +3 -3
- package/src/wallets/ethereum/injected/Trust.js +3 -3
- package/src/wallets/ethereum/injected/UnknownInjectedWallet.cjs +2 -3
- package/src/wallets/ethereum/injected/UnknownInjectedWallet.d.ts +2 -3
- package/src/wallets/ethereum/injected/UnknownInjectedWallet.js +2 -3
- package/src/wallets/ethereum/injected/Zerion.cjs +3 -3
- package/src/wallets/ethereum/injected/Zerion.d.ts +3 -3
- package/src/wallets/ethereum/injected/Zerion.js +3 -3
- package/src/wallets/flow/FlowWalletConnector.cjs +7 -8
- package/src/wallets/flow/FlowWalletConnector.js +2 -3
- package/src/wallets/getWalletConnectConnector.cjs +7 -10
- package/src/wallets/getWalletConnectConnector.d.ts +2 -5
- package/src/wallets/getWalletConnectConnector.js +7 -10
- package/src/wallets/solana/CoinbaseSolana.cjs +8 -11
- package/src/wallets/solana/CoinbaseSolana.d.ts +1 -3
- package/src/wallets/solana/CoinbaseSolana.js +8 -11
- package/src/wallets/solana/glow.cjs +8 -11
- package/src/wallets/solana/glow.d.ts +1 -3
- package/src/wallets/solana/glow.js +8 -11
- package/src/wallets/solana/injected/BraveSol.cjs +2 -1
- package/src/wallets/solana/injected/BraveSol.js +2 -1
- package/src/wallets/solana/phantom-ledger.cjs +5 -5
- package/src/wallets/solana/phantom-ledger.js +1 -1
- package/src/wallets/solana/phantom.cjs +8 -12
- package/src/wallets/solana/phantom.d.ts +1 -3
- package/src/wallets/solana/phantom.js +8 -12
- package/src/wallets/solana/slope.cjs +4 -4
- package/src/wallets/solana/slope.js +1 -1
- package/src/wallets/solana/solProviderHelper.cjs +47 -48
- package/src/wallets/solana/solProviderHelper.d.ts +18 -18
- package/src/wallets/solana/solProviderHelper.js +47 -48
- package/src/wallets/solana/solWalletConnector.cjs +24 -6
- package/src/wallets/solana/solWalletConnector.d.ts +8 -5
- package/src/wallets/solana/solWalletConnector.js +23 -5
- package/src/wallets/solana/solflare.cjs +6 -7
- package/src/wallets/solana/solflare.d.ts +0 -2
- package/src/wallets/solana/solflare.js +6 -7
- package/src/wallets/starknet/starknetWalletConnector.cjs +5 -6
- package/src/wallets/starknet/starknetWalletConnector.js +2 -3
- package/src/wallets/walletConnect/index.d.ts +1 -1
- package/src/wallets/walletConnect/walletConnect.cjs +8 -7
- package/src/wallets/walletConnect/walletConnect.d.ts +7 -7
- package/src/wallets/walletConnect/walletConnect.js +6 -5
- package/src/wallets/walletConnect/walletConnectV2.cjs +14 -14
- package/src/wallets/walletConnect/walletConnectV2.d.ts +7 -7
- package/src/wallets/walletConnect/walletConnectV2.js +3 -3
- package/src/wallets/walletConnect/zerion.d.ts +2 -4
- package/src/errors.cjs +0 -66
- package/src/errors.d.ts +0 -34
- package/src/errors.js +0 -54
- package/src/rpcProviders.cjs +0 -76
- package/src/rpcProviders.d.ts +0 -5
- package/src/rpcProviders.js +0 -69
- package/src/utils/CancellablePromise/CancellablePromise.cjs +0 -33
- package/src/utils/CancellablePromise/CancellablePromise.d.ts +0 -9
- package/src/utils/CancellablePromise/CancellablePromise.js +0 -29
- package/src/utils/CancellablePromise/index.d.ts +0 -1
- package/src/utils/logger.cjs +0 -9
- package/src/utils/logger.d.ts +0 -2
- package/src/utils/logger.js +0 -5
- package/src/wallets/cosmos/getKeplrConnector.cjs +0 -18
- package/src/wallets/cosmos/getKeplrConnector.d.ts +0 -6
- package/src/wallets/cosmos/getKeplrConnector.js +0 -14
- package/src/wallets/ethereum/fortmatic.cjs +0 -75
- package/src/wallets/ethereum/fortmatic.d.ts +0 -26
- package/src/wallets/ethereum/fortmatic.js +0 -69
- package/src/wallets/ethereum/meta-mask.cjs +0 -63
- package/src/wallets/ethereum/meta-mask.js +0 -61
- package/src/wallets/getMobileOrInjectedWallet.cjs +0 -26
- package/src/wallets/getMobileOrInjectedWallet.d.ts +0 -8
- package/src/wallets/getMobileOrInjectedWallet.js +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,57 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.17.0-RC.8](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.7...v0.17.0-RC.8) (2023-05-03)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* Removes support for Fortmatic in favor of Magic
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add selected address to qr code modal ([#2017](https://github.com/dynamic-labs/DynamicAuth/issues/2017)) ([58a5d69](https://github.com/dynamic-labs/DynamicAuth/commit/58a5d691f8a4045d92be1a2bcaf6092f44b91b73))
|
|
12
|
+
* **DYN-2228:** show network picker only when more than 1 network ([#2007](https://github.com/dynamic-labs/DynamicAuth/issues/2007)) ([8329737](https://github.com/dynamic-labs/DynamicAuth/commit/83297378cc5ed019f3f8297b48c16f56d7cfe9a7))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* disable kyc submit button when network is not supported ([#1952](https://github.com/dynamic-labs/DynamicAuth/issues/1952)) ([ec2f0eb](https://github.com/dynamic-labs/DynamicAuth/commit/ec2f0eb708ed2938dd68cbc7e8ee40f3bc856c2b))
|
|
18
|
+
* missing evm networks for connect-only ([#2006](https://github.com/dynamic-labs/DynamicAuth/issues/2006)) ([78561b3](https://github.com/dynamic-labs/DynamicAuth/commit/78561b3243ac38a348a383bb3c79ce58c8731538))
|
|
19
|
+
* wallet-connect menu on mobile ([#2025](https://github.com/dynamic-labs/DynamicAuth/issues/2025)) ([1f358a6](https://github.com/dynamic-labs/DynamicAuth/commit/1f358a66dda696e745db32f121fb4ef62379cb9a))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* remove Fortmatic ([#2010](https://github.com/dynamic-labs/DynamicAuth/issues/2010)) ([0ca95c1](https://github.com/dynamic-labs/DynamicAuth/commit/0ca95c175b5d8383433340832bd9ae7dab85f912))
|
|
23
|
+
|
|
24
|
+
## [0.17.0-RC.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.6...v0.17.0-RC.7) (2023-04-28)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
|
|
29
|
+
* EvmNetwork has deprecated `chainName` and replaced it with `name` with the exact same value.
|
|
30
|
+
Additionally, calling `walletConnector.getNetwork()` or `walletConnector.switchNetwork()` are generic network types of `string | number`
|
|
31
|
+
|
|
32
|
+
If for example, you know you are working with an EVM network, you can type cast with `walletConnector.getNetwork<number>()` to work nicely in typescript.
|
|
33
|
+
|
|
34
|
+
* feat: add network config version to invalidate local storage cache if new version is available
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* added onramp funding UI ([#1884](https://github.com/dynamic-labs/DynamicAuth/issues/1884)) ([d2d9895](https://github.com/dynamic-labs/DynamicAuth/commit/d2d98953b511ebe4aa62b6b5c9cd36c15e1fef97))
|
|
39
|
+
* create useNameService hook ([#1909](https://github.com/dynamic-labs/DynamicAuth/issues/1909)) ([78fd40a](https://github.com/dynamic-labs/DynamicAuth/commit/78fd40a7781fd907b6b807c544b5840fab30009a))
|
|
40
|
+
* **DYN-2235:** automatically move customer to the next step after updating their network ([#1999](https://github.com/dynamic-labs/DynamicAuth/issues/1999)) ([7721f51](https://github.com/dynamic-labs/DynamicAuth/commit/7721f51a92a899613c63a0bdc4d3504ab5d027b7))
|
|
41
|
+
* expose getNameService to useDynamicContext and add it to walletkitactions ([#1987](https://github.com/dynamic-labs/DynamicAuth/issues/1987)) ([48ac670](https://github.com/dynamic-labs/DynamicAuth/commit/48ac670bf086a67648c8853329a8069ba3905d36))
|
|
42
|
+
* **magic-link:** add default chain id to magic connector ([#1946](https://github.com/dynamic-labs/DynamicAuth/issues/1946)) ([8b64d96](https://github.com/dynamic-labs/DynamicAuth/commit/8b64d9680525e4882c390667f98d778ce887343e))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* call authSucces in missing places ([#1961](https://github.com/dynamic-labs/DynamicAuth/issues/1961)) ([c61ee5b](https://github.com/dynamic-labs/DynamicAuth/commit/c61ee5bac965a0b7c8f62ee8a5aa0167b1aa190b)), closes [#1963](https://github.com/dynamic-labs/DynamicAuth/issues/1963)
|
|
48
|
+
* display ens info when there's any ([#1973](https://github.com/dynamic-labs/DynamicAuth/issues/1973)) ([9b14dbe](https://github.com/dynamic-labs/DynamicAuth/commit/9b14dbe69043933edce7f0cecc0406f6d7c7a45d))
|
|
49
|
+
* revert trigger onAuthSuccess on additional flows ([#1953](https://github.com/dynamic-labs/DynamicAuth/issues/1953)) ([#1960](https://github.com/dynamic-labs/DynamicAuth/issues/1960)) ([fb10791](https://github.com/dynamic-labs/DynamicAuth/commit/fb107914eb799692e25d4fa63229ad66967bd3aa))
|
|
50
|
+
* show 'install extension' prompt when selecting a secondary wallet that cannot be detected ([#1948](https://github.com/dynamic-labs/DynamicAuth/issues/1948)) ([b6593c1](https://github.com/dynamic-labs/DynamicAuth/commit/b6593c19fe8edaefeca3fa9b8b1d5c64f7c3b9f9))
|
|
51
|
+
* support both number and string types for chainId regardless of chain ([#1978](https://github.com/dynamic-labs/DynamicAuth/issues/1978)) ([25fcc96](https://github.com/dynamic-labs/DynamicAuth/commit/25fcc969129be832cc0e9c68edc04773944dacae))
|
|
52
|
+
* update setPrimaryWallet return type ([#1983](https://github.com/dynamic-labs/DynamicAuth/issues/1983)) ([0724a4b](https://github.com/dynamic-labs/DynamicAuth/commit/0724a4bcaee25639b29335a91824dcaedb7b0330))
|
|
53
|
+
* update walletconnect disconned callback to reject instead of throwing an error ([#1992](https://github.com/dynamic-labs/DynamicAuth/issues/1992)) ([da726cf](https://github.com/dynamic-labs/DynamicAuth/commit/da726cfca67c945026bd29c6db7f8c6fef910b4d))
|
|
54
|
+
|
|
2
55
|
## [0.17.0-RC.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.5...v0.17.0-RC.6) (2023-04-25)
|
|
3
56
|
|
|
4
57
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/multi-wallet",
|
|
3
|
-
"version": "0.17.0-RC.
|
|
3
|
+
"version": "0.17.0-RC.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"buffer": "^6.0.3",
|
|
11
11
|
"deepmerge": "^4.3.1",
|
|
12
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
13
|
-
"@dynamic-labs/wallet-book": "^0.0.
|
|
12
|
+
"@dynamic-labs/sdk-api": "0.0.183",
|
|
13
|
+
"@dynamic-labs/wallet-book": "^0.0.14",
|
|
14
14
|
"@magic-ext/oauth": "^10.2.0",
|
|
15
15
|
"starknet": "^3.19.0",
|
|
16
16
|
"ethers": "^5.7.2",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@walletconnect/client": "^1.8.0",
|
|
21
21
|
"@walletconnect/utils": "^1.8.0",
|
|
22
22
|
"@blocto/sdk": "^0.3.3",
|
|
23
|
-
"fortmatic": "^2.4.0",
|
|
24
23
|
"@onflow/fcl": "^1.3.2",
|
|
25
24
|
"get-starknet": "^1.5.0",
|
|
26
25
|
"@walletconnect/ethereum-provider": "^1.8.0",
|
|
@@ -29,8 +28,11 @@
|
|
|
29
28
|
"magic-sdk": "^16.0.1",
|
|
30
29
|
"@keplr-wallet/provider": "0.11.56",
|
|
31
30
|
"@keplr-wallet/types": "^0.11.51",
|
|
32
|
-
"@dynamic-labs/logger": "0.17.0-RC.
|
|
33
|
-
"@dynamic-labs/
|
|
31
|
+
"@dynamic-labs/logger": "0.17.0-RC.8",
|
|
32
|
+
"@dynamic-labs/rpc-providers": "0.17.0-RC.8",
|
|
33
|
+
"@dynamic-labs/types": "0.17.0-RC.8",
|
|
34
|
+
"@dynamic-labs/utils": "0.17.0-RC.8",
|
|
35
|
+
"@dynamic-labs/wallet-connector-core": "0.17.0-RC.8"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@walletconnect/types": "^2.2.1"
|
package/src/index.cjs
CHANGED
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('./polyfills.cjs');
|
|
6
6
|
var multiWallet = require('./multi-wallet.cjs');
|
|
7
|
-
var errors = require('./errors.cjs');
|
|
8
|
-
var rpcProviders = require('./rpcProviders.cjs');
|
|
9
|
-
var logger = require('./utils/logger.cjs');
|
|
10
7
|
var EmailMagicWalletConnector = require('./wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.cjs');
|
|
11
8
|
var MagicWalletConnector = require('./wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.cjs');
|
|
12
9
|
var EmailOTPMagicWalletConnector = require('./wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.cjs');
|
|
@@ -33,20 +30,6 @@ exports.filteredWalletConnectWallets = multiWallet.filteredWalletConnectWallets;
|
|
|
33
30
|
exports.getEnabledWallets = multiWallet.getEnabledWallets;
|
|
34
31
|
exports.getSupportedChainsForWalletConnector = multiWallet.getSupportedChainsForWalletConnector;
|
|
35
32
|
exports.getSupportedWallets = multiWallet.getSupportedWallets;
|
|
36
|
-
exports.ChainalysisError = errors.ChainalysisError;
|
|
37
|
-
exports.DynamicError = errors.DynamicError;
|
|
38
|
-
exports.EmailAlreadyExistsError = errors.EmailAlreadyExistsError;
|
|
39
|
-
exports.EmailVerificationError = errors.EmailVerificationError;
|
|
40
|
-
exports.NoAccessError = errors.NoAccessError;
|
|
41
|
-
exports.NotSupportedError = errors.NotSupportedError;
|
|
42
|
-
exports.UsernameAlreadyExistsError = errors.UsernameAlreadyExistsError;
|
|
43
|
-
exports.WalletNotDeployedError = errors.WalletNotDeployedError;
|
|
44
|
-
exports.WalletUsedError = errors.WalletUsedError;
|
|
45
|
-
exports.getEvmDefaultRpcProvider = rpcProviders.getEvmDefaultRpcProvider;
|
|
46
|
-
exports.getEvmRpcProviderByChainId = rpcProviders.getEvmRpcProviderByChainId;
|
|
47
|
-
exports.getRpcProviders = rpcProviders.getRpcProviders;
|
|
48
|
-
exports.getSolanaDefaultRpcProvider = rpcProviders.getSolanaDefaultRpcProvider;
|
|
49
|
-
exports.logger = logger.logger;
|
|
50
33
|
exports.EmailMagicWalletConnector = EmailMagicWalletConnector.EmailMagicWalletConnector;
|
|
51
34
|
exports.MagicWalletConnector = MagicWalletConnector.MagicWalletConnector;
|
|
52
35
|
exports.EmailOTPMagicWalletConnector = EmailOTPMagicWalletConnector.EmailOTPMagicWalletConnector;
|
|
@@ -63,7 +46,6 @@ exports.isSocialWalletConnector = isSocialWalletConnector.isSocialWalletConnecto
|
|
|
63
46
|
exports.getChainInfo = getChainInfo.getChainInfo;
|
|
64
47
|
exports.getWalletConnectorByName = getWalletConnectorByName.getWalletConnectorByName;
|
|
65
48
|
exports.createSession = walletConnect.createSession;
|
|
66
|
-
exports.fetchWalletConnectCosmosPublicAddress = walletConnect.fetchWalletConnectCosmosPublicAddress;
|
|
67
49
|
exports.fetchWalletConnectEVMPublicAddress = walletConnect.fetchWalletConnectEVMPublicAddress;
|
|
68
50
|
exports.getDeepLink = walletConnect.getDeepLink;
|
|
69
51
|
exports.initClient = walletConnect.initClient;
|
package/src/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import './polyfills';
|
|
2
2
|
export * from './multi-wallet';
|
|
3
3
|
export * from './types';
|
|
4
|
-
export * from './errors';
|
|
5
|
-
export * from './rpcProviders';
|
|
6
|
-
export * from './utils/logger';
|
|
7
4
|
export * from './wallets/ethereum/MagicConnector';
|
|
8
5
|
export { generateMessageToSign } from './utils/message';
|
|
9
6
|
export { isIPad, isIPhone, isMobile } from './utils/isMobile';
|
|
@@ -15,7 +12,6 @@ export { getChainInfo } from './utils/getChainInfo';
|
|
|
15
12
|
export { getWalletConnectorByName } from './utils/getWalletConnectorByName';
|
|
16
13
|
export * from './wallets/clients/walletConnect';
|
|
17
14
|
export * from './wallets/clients/coinbase';
|
|
18
|
-
export type { EvmNetwork } from './wallets/ethereum/evm-network';
|
|
19
15
|
export { KeplrWalletConnector } from './wallets/cosmos/KeplrWalletConnector';
|
|
20
16
|
export * from './utils/isSameAddress';
|
|
21
17
|
export { DEFAULT_STARKNET_TYPED_DATA_DOMAIN as defaultStarknetTypedDataDomain } from './wallets/constants';
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import './polyfills.js';
|
|
2
2
|
export { filteredWalletConnectWallets, getEnabledWallets, getSupportedChainsForWalletConnector, getSupportedWallets } from './multi-wallet.js';
|
|
3
|
-
export { ChainalysisError, DynamicError, EmailAlreadyExistsError, EmailVerificationError, NoAccessError, NotSupportedError, UsernameAlreadyExistsError, WalletNotDeployedError, WalletUsedError } from './errors.js';
|
|
4
|
-
export { getEvmDefaultRpcProvider, getEvmRpcProviderByChainId, getRpcProviders, getSolanaDefaultRpcProvider } from './rpcProviders.js';
|
|
5
|
-
export { logger } from './utils/logger.js';
|
|
6
3
|
export { EmailMagicWalletConnector } from './wallets/ethereum/MagicConnector/EmailMagicWalletConnector/EmailMagicWalletConnector.js';
|
|
7
4
|
export { MagicWalletConnector } from './wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.js';
|
|
8
5
|
export { EmailOTPMagicWalletConnector } from './wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js';
|
|
@@ -16,7 +13,7 @@ export { isEmailOTPWalletConnector } from './utils/isEmailOTPWalletConnector/isE
|
|
|
16
13
|
export { isSocialWalletConnector } from './utils/isSocialWalletConnector/isSocialWalletConnector.js';
|
|
17
14
|
export { getChainInfo } from './utils/getChainInfo/getChainInfo.js';
|
|
18
15
|
export { getWalletConnectorByName } from './utils/getWalletConnectorByName.js';
|
|
19
|
-
export { createSession,
|
|
16
|
+
export { createSession, fetchWalletConnectEVMPublicAddress, getDeepLink, initClient, killWalletConnectSession, setupWalletConnectEventListeners, signWalletConnectPersonalMessage, teardownWalletConnectEventListeners, useDeepLink } from './wallets/clients/walletConnect/walletConnect.js';
|
|
20
17
|
export { fetchPublicAddress, getCoinbaseProvider, killCoinbaseSession, signMessage } from './wallets/clients/coinbase/coinbase.js';
|
|
21
18
|
export { KeplrWalletConnector } from './wallets/cosmos/KeplrWalletConnector.js';
|
|
22
19
|
export { isSameAddress } from './utils/isSameAddress/isSameAddress.js';
|
package/src/multi-wallet.cjs
CHANGED
|
@@ -28,7 +28,6 @@ var BloctoEvm = require('./wallets/ethereum/BloctoEvm.cjs');
|
|
|
28
28
|
var phantomLedger = require('./wallets/solana/phantom-ledger.cjs');
|
|
29
29
|
var CoinbaseSolana = require('./wallets/solana/CoinbaseSolana.cjs');
|
|
30
30
|
var Frame = require('./wallets/ethereum/injected/Frame.cjs');
|
|
31
|
-
var fortmatic = require('./wallets/ethereum/fortmatic.cjs');
|
|
32
31
|
var lilico = require('./wallets/flow/lilico.cjs');
|
|
33
32
|
var getWalletConnectConnector = require('./wallets/getWalletConnectConnector.cjs');
|
|
34
33
|
var Dawn = require('./wallets/ethereum/injected/Dawn.cjs');
|
|
@@ -36,15 +35,15 @@ var PhantomEvm = require('./wallets/ethereum/injected/PhantomEvm.cjs');
|
|
|
36
35
|
require('magic-sdk');
|
|
37
36
|
require('ethers');
|
|
38
37
|
require('@dynamic-labs/wallet-connector-core');
|
|
39
|
-
require('
|
|
38
|
+
require('@dynamic-labs/utils');
|
|
40
39
|
var EmailOTPMagicWalletConnector = require('./wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.cjs');
|
|
41
40
|
var MagicSocialWalletConnector = require('./wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.cjs');
|
|
42
41
|
var isEmailWalletConnector = require('./utils/isEmailWalletConnector/isEmailWalletConnector.cjs');
|
|
43
|
-
var getKeplrConnector = require('./wallets/cosmos/getKeplrConnector.cjs');
|
|
44
42
|
var Zerion = require('./wallets/ethereum/injected/Zerion.cjs');
|
|
45
|
-
var getMobileOrInjectedWallet = require('./wallets/getMobileOrInjectedWallet.cjs');
|
|
46
|
-
var metaMask = require('./wallets/ethereum/meta-mask.cjs');
|
|
47
43
|
var Trust = require('./wallets/ethereum/injected/Trust.cjs');
|
|
44
|
+
var KeplrWalletConnector = require('./wallets/cosmos/KeplrWalletConnector.cjs');
|
|
45
|
+
var MetaMask = require('./wallets/ethereum/injected/MetaMask.cjs');
|
|
46
|
+
var getApiProviders = require('./utils/getApiProviders.cjs');
|
|
48
47
|
|
|
49
48
|
let wallets = [];
|
|
50
49
|
// These wallets are either not supported or implement their
|
|
@@ -68,106 +67,72 @@ const defaultWalletUiUtils = {
|
|
|
68
67
|
throw Error('signMessage not implemented');
|
|
69
68
|
},
|
|
70
69
|
};
|
|
71
|
-
const getSupportedWallets = (
|
|
72
|
-
|
|
73
|
-
appName: '',
|
|
74
|
-
isWalletConnectV2Enabled: false,
|
|
75
|
-
networkConfigurations: { cosmos: [], evm: [], solana: [], starknet: [] },
|
|
76
|
-
skipMemo: false,
|
|
77
|
-
vendorCredentials: {},
|
|
78
|
-
walletConnectProjectId: '',
|
|
79
|
-
}) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
+
const getSupportedWallets = (args) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
var _a;
|
|
72
|
+
const { appLogoUrl = '', appName = '', chainRpcProviders, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletUiUtils = undefined, } = args;
|
|
80
73
|
if (!skipMemo && wallets.length > 0) {
|
|
81
74
|
return wallets;
|
|
82
75
|
}
|
|
83
76
|
const evmNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) || [];
|
|
84
77
|
const solanaNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.solana) || [];
|
|
85
78
|
const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
|
|
86
|
-
const
|
|
79
|
+
const apiProviders = getApiProviders.getApiProviders(customerApiProviders);
|
|
80
|
+
const opts = {
|
|
81
|
+
apiProviders,
|
|
82
|
+
appLogoUrl,
|
|
83
|
+
appName,
|
|
84
|
+
chainRpcProviders,
|
|
85
|
+
cosmosNetworks: cosmosNetworkConfigs,
|
|
86
|
+
evmNetworks: evmNetworkConfigs,
|
|
87
|
+
isWalletConnectV2Enabled,
|
|
88
|
+
solNetworks: solanaNetworkConfigs,
|
|
89
|
+
walletUiUtils: walletUiUtils || defaultWalletUiUtils,
|
|
90
|
+
};
|
|
91
|
+
const walletConnectWallets = walletConnect.fetchWalletConnectWallets({
|
|
92
|
+
isV2Enabled: isWalletConnectV2Enabled,
|
|
93
|
+
}).map((WalletConnect) => new WalletConnect(opts));
|
|
87
94
|
// temporary hack to filter out metamask, which currently has walletconnect
|
|
88
95
|
// functionality built-in
|
|
89
96
|
const filtered = walletConnectWallets.filter(({ name }) => !filteredWalletConnectWallets.includes(name));
|
|
90
97
|
const allWallets = [
|
|
91
|
-
new Dawn(
|
|
92
|
-
new phantom(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
new
|
|
107
|
-
new
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
new
|
|
113
|
-
|
|
114
|
-
new slope({ solNetworks: solanaNetworkConfigs }),
|
|
115
|
-
new dapper({ appLogoUrl, appName }),
|
|
116
|
-
new blocto({ appLogoUrl, appName }),
|
|
117
|
-
new BloctoEvm({ evmNetworks: evmNetworkConfigs }),
|
|
118
|
-
new BloctoInjected({ evmNetworks: evmNetworkConfigs }),
|
|
119
|
-
getWalletConnectConnector.getWalletConnectConnector({
|
|
120
|
-
evmNetworks: evmNetworkConfigs,
|
|
121
|
-
isWalletConnectV2Enabled,
|
|
122
|
-
projectId: walletConnectProjectId,
|
|
123
|
-
}),
|
|
124
|
-
new BraveSol({ solNetworks: solanaNetworkConfigs }),
|
|
125
|
-
new BraveEvm({ evmNetworks: evmNetworkConfigs }),
|
|
126
|
-
new UnknownInjectedWallet({ evmNetworks: evmNetworkConfigs }),
|
|
127
|
-
new GameStop({ evmNetworks: evmNetworkConfigs }),
|
|
128
|
-
new ExodusEvm({ evmNetworks: evmNetworkConfigs }),
|
|
129
|
-
new ExodusSol({ solNetworks: solanaNetworkConfigs }),
|
|
130
|
-
new Opera({ evmNetworks: evmNetworkConfigs }),
|
|
131
|
-
...(magicLinkApiKey
|
|
98
|
+
new Dawn(opts),
|
|
99
|
+
new phantom(opts),
|
|
100
|
+
new MetaMask(opts),
|
|
101
|
+
new Trust(opts),
|
|
102
|
+
new PhantomEvm(opts),
|
|
103
|
+
new phantomLedger["default"](opts),
|
|
104
|
+
new coinbase(opts),
|
|
105
|
+
new solflare(opts),
|
|
106
|
+
new glow(opts),
|
|
107
|
+
new slope(opts),
|
|
108
|
+
new dapper(opts),
|
|
109
|
+
new blocto(opts),
|
|
110
|
+
new BloctoEvm(opts),
|
|
111
|
+
new BloctoInjected(opts),
|
|
112
|
+
getWalletConnectConnector.getWalletConnectConnector(Object.assign(Object.assign({}, opts), { isWalletConnectV2Enabled, projectId: walletConnectProjectId })),
|
|
113
|
+
new BraveSol(opts),
|
|
114
|
+
new BraveEvm(opts),
|
|
115
|
+
new UnknownInjectedWallet(opts),
|
|
116
|
+
new GameStop(opts),
|
|
117
|
+
new ExodusEvm(opts),
|
|
118
|
+
new ExodusSol(opts),
|
|
119
|
+
new Opera(opts),
|
|
120
|
+
...(((_a = apiProviders.magicLink) === null || _a === void 0 ? void 0 : _a.providerProjectId)
|
|
132
121
|
? [
|
|
133
|
-
new EmailOTPMagicWalletConnector.EmailOTPMagicWalletConnector({
|
|
134
|
-
|
|
135
|
-
config: magicLinkConfig,
|
|
136
|
-
evmNetworks: evmNetworkConfigs,
|
|
137
|
-
walletUiUtils: walletUiUtils || defaultWalletUiUtils,
|
|
138
|
-
}),
|
|
139
|
-
new MagicSocialWalletConnector.MagicSocialWalletConnector({
|
|
140
|
-
apiKey: magicLinkApiKey,
|
|
141
|
-
config: magicLinkConfig,
|
|
142
|
-
evmNetworks: evmNetworkConfigs,
|
|
143
|
-
walletUiUtils: walletUiUtils || defaultWalletUiUtils,
|
|
144
|
-
}),
|
|
122
|
+
new EmailOTPMagicWalletConnector.EmailOTPMagicWalletConnector(Object.assign({}, opts)),
|
|
123
|
+
new MagicSocialWalletConnector.MagicSocialWalletConnector(Object.assign({}, opts)),
|
|
145
124
|
]
|
|
146
125
|
: []),
|
|
147
126
|
new MyAlgoWalletConnector(),
|
|
148
127
|
new argentx(),
|
|
149
128
|
new braavos(),
|
|
150
|
-
new CoinbaseSolana(
|
|
151
|
-
new Frame(
|
|
152
|
-
new lilico(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
injectedWallet: new Zerion({ evmNetworks: evmNetworkConfigs }),
|
|
156
|
-
isWalletConnectV2: isWalletConnectV2Enabled,
|
|
157
|
-
walletConnectName: 'Zerion',
|
|
158
|
-
}),
|
|
159
|
-
//TODO: https://linear.app/dynamic-labs/issue/DYN-2127/rename-evmnetworks-to-networks-across-the-application
|
|
160
|
-
getKeplrConnector.getKeplerConnector({ evmNetworks: cosmosNetworkConfigs }),
|
|
161
|
-
...((vendorCredentials === null || vendorCredentials === void 0 ? void 0 : vendorCredentials.fortmatic)
|
|
162
|
-
? [
|
|
163
|
-
new fortmatic({
|
|
164
|
-
apiKey: vendorCredentials.fortmatic,
|
|
165
|
-
evmNetworks: evmNetworkConfigs,
|
|
166
|
-
}),
|
|
167
|
-
]
|
|
168
|
-
: []),
|
|
129
|
+
new CoinbaseSolana(opts),
|
|
130
|
+
new Frame(opts),
|
|
131
|
+
new lilico(opts),
|
|
132
|
+
new Zerion(opts),
|
|
133
|
+
new KeplrWalletConnector.KeplrWalletConnector(opts),
|
|
169
134
|
...filtered,
|
|
170
|
-
];
|
|
135
|
+
].map((wallet) => wallet.getMobileOrInstalledWallet());
|
|
171
136
|
yield Promise.all(allWallets.map((wallet) => { var _a; return (_a = wallet.init) === null || _a === void 0 ? void 0 : _a.call(wallet); }));
|
|
172
137
|
// Memoize the wallets
|
|
173
138
|
const filteredWallets = filterWalletsForPlatform(allWallets);
|
|
@@ -202,14 +167,6 @@ const filterWalletsForPlatform = (wallets) => wallets.filter((wallet) => {
|
|
|
202
167
|
const handleMobileWalletFilter = (wallet, metadata) => {
|
|
203
168
|
if (!metadata.mobile)
|
|
204
169
|
return false;
|
|
205
|
-
/**
|
|
206
|
-
* Custom check added with DYN-1489 for mobile version only:
|
|
207
|
-
* it shows a WalletConnect listItem that wraps-up all the WalletConnect wallets
|
|
208
|
-
* in a new wallet-list view.
|
|
209
|
-
*/
|
|
210
|
-
if (wallet.isWalletConnect && wallet.name === 'WalletConnect') {
|
|
211
|
-
return true;
|
|
212
|
-
}
|
|
213
170
|
/**
|
|
214
171
|
* WalletConnect provides a "universal" and "native" deep link. They recommend using
|
|
215
172
|
* the universal deep link over the native one due to UX differences, and our current
|
package/src/multi-wallet.js
CHANGED
|
@@ -25,7 +25,6 @@ import PhantomLedger from './wallets/solana/phantom-ledger.js';
|
|
|
25
25
|
export { walletName as phantomLedgerWalletName } from './wallets/solana/phantom-ledger.js';
|
|
26
26
|
import CoinbaseSolana from './wallets/solana/CoinbaseSolana.js';
|
|
27
27
|
import Frame from './wallets/ethereum/injected/Frame.js';
|
|
28
|
-
import Fortmatic from './wallets/ethereum/fortmatic.js';
|
|
29
28
|
import Lilico from './wallets/flow/lilico.js';
|
|
30
29
|
import { getWalletConnectConnector } from './wallets/getWalletConnectConnector.js';
|
|
31
30
|
import Dawn from './wallets/ethereum/injected/Dawn.js';
|
|
@@ -33,15 +32,15 @@ import PhantomEvm from './wallets/ethereum/injected/PhantomEvm.js';
|
|
|
33
32
|
import 'magic-sdk';
|
|
34
33
|
import 'ethers';
|
|
35
34
|
import '@dynamic-labs/wallet-connector-core';
|
|
36
|
-
import '
|
|
35
|
+
import '@dynamic-labs/utils';
|
|
37
36
|
import { EmailOTPMagicWalletConnector } from './wallets/ethereum/MagicConnector/EmailOTPMagicWalletConnector/EmailOTPMagicWalletConnector.js';
|
|
38
37
|
import { MagicSocialWalletConnector } from './wallets/ethereum/MagicConnector/MagicSocialWalletConnector/MagicSocialWalletConnector.js';
|
|
39
38
|
import { isEmailWalletConnector } from './utils/isEmailWalletConnector/isEmailWalletConnector.js';
|
|
40
|
-
import { getKeplerConnector } from './wallets/cosmos/getKeplrConnector.js';
|
|
41
39
|
import Zerion from './wallets/ethereum/injected/Zerion.js';
|
|
42
|
-
import { getMobileOrInjectedWallet } from './wallets/getMobileOrInjectedWallet.js';
|
|
43
|
-
import MetaMask from './wallets/ethereum/meta-mask.js';
|
|
44
40
|
import Trust from './wallets/ethereum/injected/Trust.js';
|
|
41
|
+
import { KeplrWalletConnector } from './wallets/cosmos/KeplrWalletConnector.js';
|
|
42
|
+
import MetaMask from './wallets/ethereum/injected/MetaMask.js';
|
|
43
|
+
import { getApiProviders } from './utils/getApiProviders.js';
|
|
45
44
|
|
|
46
45
|
let wallets = [];
|
|
47
46
|
// These wallets are either not supported or implement their
|
|
@@ -65,106 +64,72 @@ const defaultWalletUiUtils = {
|
|
|
65
64
|
throw Error('signMessage not implemented');
|
|
66
65
|
},
|
|
67
66
|
};
|
|
68
|
-
const getSupportedWallets = (
|
|
69
|
-
|
|
70
|
-
appName: '',
|
|
71
|
-
isWalletConnectV2Enabled: false,
|
|
72
|
-
networkConfigurations: { cosmos: [], evm: [], solana: [], starknet: [] },
|
|
73
|
-
skipMemo: false,
|
|
74
|
-
vendorCredentials: {},
|
|
75
|
-
walletConnectProjectId: '',
|
|
76
|
-
}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
67
|
+
const getSupportedWallets = (args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
+
var _a;
|
|
69
|
+
const { appLogoUrl = '', appName = '', chainRpcProviders, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletUiUtils = undefined, } = args;
|
|
77
70
|
if (!skipMemo && wallets.length > 0) {
|
|
78
71
|
return wallets;
|
|
79
72
|
}
|
|
80
73
|
const evmNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) || [];
|
|
81
74
|
const solanaNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.solana) || [];
|
|
82
75
|
const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
|
|
83
|
-
const
|
|
76
|
+
const apiProviders = getApiProviders(customerApiProviders);
|
|
77
|
+
const opts = {
|
|
78
|
+
apiProviders,
|
|
79
|
+
appLogoUrl,
|
|
80
|
+
appName,
|
|
81
|
+
chainRpcProviders,
|
|
82
|
+
cosmosNetworks: cosmosNetworkConfigs,
|
|
83
|
+
evmNetworks: evmNetworkConfigs,
|
|
84
|
+
isWalletConnectV2Enabled,
|
|
85
|
+
solNetworks: solanaNetworkConfigs,
|
|
86
|
+
walletUiUtils: walletUiUtils || defaultWalletUiUtils,
|
|
87
|
+
};
|
|
88
|
+
const walletConnectWallets = fetchWalletConnectWallets({
|
|
89
|
+
isV2Enabled: isWalletConnectV2Enabled,
|
|
90
|
+
}).map((WalletConnect) => new WalletConnect(opts));
|
|
84
91
|
// temporary hack to filter out metamask, which currently has walletconnect
|
|
85
92
|
// functionality built-in
|
|
86
93
|
const filtered = walletConnectWallets.filter(({ name }) => !filteredWalletConnectWallets.includes(name));
|
|
87
94
|
const allWallets = [
|
|
88
|
-
new Dawn(
|
|
89
|
-
new Phantom(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
new
|
|
104
|
-
new
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
new
|
|
110
|
-
|
|
111
|
-
new Slope({ solNetworks: solanaNetworkConfigs }),
|
|
112
|
-
new Dapper({ appLogoUrl, appName }),
|
|
113
|
-
new Blocto({ appLogoUrl, appName }),
|
|
114
|
-
new BloctoEvm({ evmNetworks: evmNetworkConfigs }),
|
|
115
|
-
new BloctoInjected({ evmNetworks: evmNetworkConfigs }),
|
|
116
|
-
getWalletConnectConnector({
|
|
117
|
-
evmNetworks: evmNetworkConfigs,
|
|
118
|
-
isWalletConnectV2Enabled,
|
|
119
|
-
projectId: walletConnectProjectId,
|
|
120
|
-
}),
|
|
121
|
-
new BraveSol({ solNetworks: solanaNetworkConfigs }),
|
|
122
|
-
new BraveEvm({ evmNetworks: evmNetworkConfigs }),
|
|
123
|
-
new UnknownInjectedWallet({ evmNetworks: evmNetworkConfigs }),
|
|
124
|
-
new GameStop({ evmNetworks: evmNetworkConfigs }),
|
|
125
|
-
new ExodusEvm({ evmNetworks: evmNetworkConfigs }),
|
|
126
|
-
new ExodusSol({ solNetworks: solanaNetworkConfigs }),
|
|
127
|
-
new Opera({ evmNetworks: evmNetworkConfigs }),
|
|
128
|
-
...(magicLinkApiKey
|
|
95
|
+
new Dawn(opts),
|
|
96
|
+
new Phantom(opts),
|
|
97
|
+
new MetaMask(opts),
|
|
98
|
+
new Trust(opts),
|
|
99
|
+
new PhantomEvm(opts),
|
|
100
|
+
new PhantomLedger(opts),
|
|
101
|
+
new Coinbase(opts),
|
|
102
|
+
new Solflare(opts),
|
|
103
|
+
new Glow(opts),
|
|
104
|
+
new Slope(opts),
|
|
105
|
+
new Dapper(opts),
|
|
106
|
+
new Blocto(opts),
|
|
107
|
+
new BloctoEvm(opts),
|
|
108
|
+
new BloctoInjected(opts),
|
|
109
|
+
getWalletConnectConnector(Object.assign(Object.assign({}, opts), { isWalletConnectV2Enabled, projectId: walletConnectProjectId })),
|
|
110
|
+
new BraveSol(opts),
|
|
111
|
+
new BraveEvm(opts),
|
|
112
|
+
new UnknownInjectedWallet(opts),
|
|
113
|
+
new GameStop(opts),
|
|
114
|
+
new ExodusEvm(opts),
|
|
115
|
+
new ExodusSol(opts),
|
|
116
|
+
new Opera(opts),
|
|
117
|
+
...(((_a = apiProviders.magicLink) === null || _a === void 0 ? void 0 : _a.providerProjectId)
|
|
129
118
|
? [
|
|
130
|
-
new EmailOTPMagicWalletConnector({
|
|
131
|
-
|
|
132
|
-
config: magicLinkConfig,
|
|
133
|
-
evmNetworks: evmNetworkConfigs,
|
|
134
|
-
walletUiUtils: walletUiUtils || defaultWalletUiUtils,
|
|
135
|
-
}),
|
|
136
|
-
new MagicSocialWalletConnector({
|
|
137
|
-
apiKey: magicLinkApiKey,
|
|
138
|
-
config: magicLinkConfig,
|
|
139
|
-
evmNetworks: evmNetworkConfigs,
|
|
140
|
-
walletUiUtils: walletUiUtils || defaultWalletUiUtils,
|
|
141
|
-
}),
|
|
119
|
+
new EmailOTPMagicWalletConnector(Object.assign({}, opts)),
|
|
120
|
+
new MagicSocialWalletConnector(Object.assign({}, opts)),
|
|
142
121
|
]
|
|
143
122
|
: []),
|
|
144
123
|
new MyAlgoWalletConnector(),
|
|
145
124
|
new ArgentX(),
|
|
146
125
|
new Braavos(),
|
|
147
|
-
new CoinbaseSolana(
|
|
148
|
-
new Frame(
|
|
149
|
-
new Lilico(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
injectedWallet: new Zerion({ evmNetworks: evmNetworkConfigs }),
|
|
153
|
-
isWalletConnectV2: isWalletConnectV2Enabled,
|
|
154
|
-
walletConnectName: 'Zerion',
|
|
155
|
-
}),
|
|
156
|
-
//TODO: https://linear.app/dynamic-labs/issue/DYN-2127/rename-evmnetworks-to-networks-across-the-application
|
|
157
|
-
getKeplerConnector({ evmNetworks: cosmosNetworkConfigs }),
|
|
158
|
-
...((vendorCredentials === null || vendorCredentials === void 0 ? void 0 : vendorCredentials.fortmatic)
|
|
159
|
-
? [
|
|
160
|
-
new Fortmatic({
|
|
161
|
-
apiKey: vendorCredentials.fortmatic,
|
|
162
|
-
evmNetworks: evmNetworkConfigs,
|
|
163
|
-
}),
|
|
164
|
-
]
|
|
165
|
-
: []),
|
|
126
|
+
new CoinbaseSolana(opts),
|
|
127
|
+
new Frame(opts),
|
|
128
|
+
new Lilico(opts),
|
|
129
|
+
new Zerion(opts),
|
|
130
|
+
new KeplrWalletConnector(opts),
|
|
166
131
|
...filtered,
|
|
167
|
-
];
|
|
132
|
+
].map((wallet) => wallet.getMobileOrInstalledWallet());
|
|
168
133
|
yield Promise.all(allWallets.map((wallet) => { var _a; return (_a = wallet.init) === null || _a === void 0 ? void 0 : _a.call(wallet); }));
|
|
169
134
|
// Memoize the wallets
|
|
170
135
|
const filteredWallets = filterWalletsForPlatform(allWallets);
|
|
@@ -199,14 +164,6 @@ const filterWalletsForPlatform = (wallets) => wallets.filter((wallet) => {
|
|
|
199
164
|
const handleMobileWalletFilter = (wallet, metadata) => {
|
|
200
165
|
if (!metadata.mobile)
|
|
201
166
|
return false;
|
|
202
|
-
/**
|
|
203
|
-
* Custom check added with DYN-1489 for mobile version only:
|
|
204
|
-
* it shows a WalletConnect listItem that wraps-up all the WalletConnect wallets
|
|
205
|
-
* in a new wallet-list view.
|
|
206
|
-
*/
|
|
207
|
-
if (wallet.isWalletConnect && wallet.name === 'WalletConnect') {
|
|
208
|
-
return true;
|
|
209
|
-
}
|
|
210
167
|
/**
|
|
211
168
|
* WalletConnect provides a "universal" and "native" deep link. They recommend using
|
|
212
169
|
* the universal deep link over the native one due to UX differences, and our current
|