@dynamic-labs/multi-wallet 4.32.1 → 4.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,24 @@
1
1
 
2
+ ## [4.34.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.33.0...v4.34.0) (2025-09-30)
3
+
4
+
5
+ ### Features
6
+
7
+ * add getMultichainBalances to react-native ([#9593](https://github.com/dynamic-labs/dynamic-auth/issues/9593)) ([2e482c3](https://github.com/dynamic-labs/dynamic-auth/commit/2e482c3a3d17e4570173c3ca6e27d83c9fac7265))
8
+
9
+ ## [4.33.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.32.1...v4.33.0) (2025-09-26)
10
+
11
+
12
+ ### Features
13
+
14
+ * add support for signAndExecuteTransactionBlock and signTransactionBlock legacy sui features ([#9574](https://github.com/dynamic-labs/dynamic-auth/issues/9574)) ([316481f](https://github.com/dynamic-labs/dynamic-auth/commit/316481f9255ccc8873d267e85932df3b9d58184b))
15
+ * add viem account for waas wallets ([#9518](https://github.com/dynamic-labs/dynamic-auth/issues/9518)) ([39b6314](https://github.com/dynamic-labs/dynamic-auth/commit/39b631489a5fc38bf8077a91f7dd36d517e42512))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * unable to use backup codes to delete totp method on dynamics ui ([#9575](https://github.com/dynamic-labs/dynamic-auth/issues/9575)) ([db55161](https://github.com/dynamic-labs/dynamic-auth/commit/db5516191103ba00f3d993db28ec0df630e066b0))
21
+
2
22
  ### [4.32.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.32.0...v4.32.1) (2025-09-25)
3
23
 
4
24
 
package/README.md CHANGED
@@ -1,7 +1,94 @@
1
- # multi-wallet
1
+ # @dynamic-labs/multi-wallet
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ ## Overview
4
4
 
5
- ## Running unit tests
5
+ The multi-wallet package provides utility functions for filtering and configuring wallet connectors in the Dynamic Labs SDK. It contains helper functions used by the main SDK to determine which wallets should be available based on project settings and enabled chains.
6
6
 
7
- Run `nx test multi-wallet` to execute the unit tests via [Jest](https://jestjs.io).
7
+ ## Key Features
8
+
9
+ - **Wallet filtering**: Filters wallet connectors based on enabled chains and project settings
10
+ - **Configuration building**: Creates configuration objects needed to instantiate wallet connectors
11
+ - **Message generation**: Generates standardized messages for wallet signature operations
12
+ - **Provider filtering**: Determines which authentication providers are enabled
13
+
14
+ ## Core Functions
15
+
16
+ ### `getSupportedWallets(opts)`
17
+
18
+ Main function that returns a filtered list of available wallet connectors based on:
19
+
20
+ - Project settings and enabled providers
21
+ - Platform compatibility (mobile/desktop)
22
+ - Wallet availability and installation status
23
+ - User preferences and disabled connectors
24
+
25
+ ### `getWalletConnectorConstructorOptions(params)`
26
+
27
+ Builds configuration options for wallet connector constructors, including:
28
+
29
+ - Network configurations for all supported chains
30
+ - API providers and RPC configurations
31
+ - Authentication modes and UI utilities
32
+ - WalletConnect project settings
33
+
34
+ ### `getEnabledWallets(props)`
35
+
36
+ Filters wallet connectors based on enabled chains. Takes an object with:
37
+
38
+ - `enabledChains`: Array of Chain types that are enabled
39
+ - `getSupportedWalletOpts`: Configuration options for getting supported wallets
40
+
41
+ ### `generateMessageToSign(params)`
42
+
43
+ Creates standardized messages for wallet signing operations. Takes a `MessageParameters` object with fields like:
44
+
45
+ - `blockchain`: The blockchain type (Chain)
46
+ - `domain`: The domain requesting the signature
47
+ - `nonce`: Unique nonce for the request
48
+ - `publicKey`: User's public key
49
+ - `uri`: URI of the requesting application
50
+ - Additional optional fields for chainId, statement, resources, etc.
51
+
52
+ ### `getEnabledProviders(providers)`
53
+
54
+ Filters providers to return only those that are enabled (have `enabledAt` set, or are MagicLink with `providerProjectId`, or are Turnkey).
55
+
56
+ ### `getSupportedChainsForWalletConnector(walletBook, walletConnector)`
57
+
58
+ Returns the supported chains for a specific wallet connector by combining information from the wallet book and the connector's native supported chains.
59
+
60
+ ## Usage
61
+
62
+ ```typescript
63
+ import { getSupportedWallets } from '@dynamic-labs/multi-wallet';
64
+
65
+ const wallets = getSupportedWallets({
66
+ settings: projectSettings,
67
+ walletConnectorsProp: walletConnectors,
68
+ walletBook: walletBookData,
69
+ chainRpcProviders: rpcProviders,
70
+ // ... other options
71
+ });
72
+ ```
73
+
74
+ ## Usage in Dynamic SDK
75
+
76
+ This package is primarily used internally by the Dynamic SDK React Core package. The main usage patterns are:
77
+
78
+ - **Wallet List Building**: `getEnabledWallets` is used to filter available wallets based on enabled chains
79
+ - **Configuration Setup**: `getWalletConnectorConstructorOptions` builds the options needed to create wallet connector instances
80
+ - **Message Signing**: `generateMessageToSign` creates SIWE-compliant messages for wallet authentication
81
+
82
+ ## Development
83
+
84
+ ### Running unit tests
85
+
86
+ ```bash
87
+ npx nx test multi-wallet
88
+ ```
89
+
90
+ ### Building the package
91
+
92
+ ```bash
93
+ npx nx build multi-wallet
94
+ ```
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.32.1";
6
+ var version = "4.34.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.32.1";
2
+ var version = "4.34.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dynamic-labs/multi-wallet",
3
- "version": "4.32.1",
3
+ "version": "4.34.0",
4
4
  "dependencies": {
5
5
  "@dynamic-labs/sdk-api-core": "0.0.762",
6
6
  "tslib": "2.4.1",
7
- "@dynamic-labs/assert-package-version": "4.32.1",
8
- "@dynamic-labs/rpc-providers": "4.32.1",
9
- "@dynamic-labs/types": "4.32.1",
10
- "@dynamic-labs/utils": "4.32.1",
11
- "@dynamic-labs/wallet-book": "4.32.1",
12
- "@dynamic-labs/wallet-connector-core": "4.32.1"
7
+ "@dynamic-labs/assert-package-version": "4.34.0",
8
+ "@dynamic-labs/rpc-providers": "4.34.0",
9
+ "@dynamic-labs/types": "4.34.0",
10
+ "@dynamic-labs/utils": "4.34.0",
11
+ "@dynamic-labs/wallet-book": "4.34.0",
12
+ "@dynamic-labs/wallet-connector-core": "4.34.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@walletconnect/types": "2.21.5"
@@ -15,6 +15,7 @@ const getWalletConnectorConstructorOptions = ({ appLogoUrl, appName, authMode, c
15
15
  const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
16
16
  const starknetNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.starknet) || [];
17
17
  const suiNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.sui) || [];
18
+ const tronNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.tron) || [];
18
19
  const apiProviders = getApiProviders.getApiProviders(getEnabledProviders.getEnabledProviders(settings.providers));
19
20
  const opts = {
20
21
  apiProviders,
@@ -34,6 +35,7 @@ const getWalletConnectorConstructorOptions = ({ appLogoUrl, appName, authMode, c
34
35
  solNetworks: solanaNetworkConfigs,
35
36
  starknetNetworks: starknetNetworkConfigs,
36
37
  suiNetworks: suiNetworkConfigs,
38
+ tronNetworks: tronNetworkConfigs,
37
39
  useMetamaskSdk,
38
40
  walletBook,
39
41
  walletConnectPreferredChains,
@@ -75,6 +75,7 @@ export declare const getWalletConnectorConstructorOptions: ({ appLogoUrl, appNam
75
75
  solNetworks: import("@dynamic-labs/types").GenericNetwork[];
76
76
  starknetNetworks: import("@dynamic-labs/types").GenericNetwork[];
77
77
  suiNetworks: import("@dynamic-labs/types").GenericNetwork[];
78
+ tronNetworks: import("@dynamic-labs/types").GenericNetwork[];
78
79
  useMetamaskSdk: boolean;
79
80
  walletBook: {
80
81
  groups: Record<string, {
@@ -11,6 +11,7 @@ const getWalletConnectorConstructorOptions = ({ appLogoUrl, appName, authMode, c
11
11
  const cosmosNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.cosmos) || [];
12
12
  const starknetNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.starknet) || [];
13
13
  const suiNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.sui) || [];
14
+ const tronNetworkConfigs = (networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.tron) || [];
14
15
  const apiProviders = getApiProviders(getEnabledProviders(settings.providers));
15
16
  const opts = {
16
17
  apiProviders,
@@ -30,6 +31,7 @@ const getWalletConnectorConstructorOptions = ({ appLogoUrl, appName, authMode, c
30
31
  solNetworks: solanaNetworkConfigs,
31
32
  starknetNetworks: starknetNetworkConfigs,
32
33
  suiNetworks: suiNetworkConfigs,
34
+ tronNetworks: tronNetworkConfigs,
33
35
  useMetamaskSdk,
34
36
  walletBook,
35
37
  walletConnectPreferredChains,