@dynamic-labs/wallet-connector-core 4.48.0 → 4.48.2

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,18 @@
1
1
 
2
+ ### [4.48.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.48.1...v4.48.2) (2025-12-03)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * only prompt ready wallet once to connect ([#10013](https://github.com/dynamic-labs/dynamic-auth/issues/10013)) ([fd3e306](https://github.com/dynamic-labs/dynamic-auth/commit/fd3e306f175969efee6d82ce539f77e55c329f38))
8
+
9
+ ### [4.48.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.48.0...v4.48.1) (2025-12-02)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * support for linking multiple slush wallets ([#9957](https://github.com/dynamic-labs/dynamic-auth/issues/9957)) ([b1433a4](https://github.com/dynamic-labs/dynamic-auth/commit/b1433a49d1b31abe4806bcc66fc5b03750c953d4))
15
+
2
16
  ## [4.48.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.47.3...v4.48.0) (2025-12-01)
3
17
 
4
18
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.48.0";
6
+ var version = "4.48.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.48.0";
2
+ var version = "4.48.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-connector-core",
3
- "version": "4.48.0",
3
+ "version": "4.48.2",
4
4
  "description": "Core package for utilities and types for handling multiple wallet/chain support Dynamic SDK",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,13 +18,13 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.824",
22
- "@dynamic-labs/assert-package-version": "4.48.0",
23
- "@dynamic-labs/logger": "4.48.0",
24
- "@dynamic-labs/rpc-providers": "4.48.0",
25
- "@dynamic-labs/types": "4.48.0",
26
- "@dynamic-labs/utils": "4.48.0",
27
- "@dynamic-labs/wallet-book": "4.48.0",
21
+ "@dynamic-labs/sdk-api-core": "0.0.831",
22
+ "@dynamic-labs/assert-package-version": "4.48.2",
23
+ "@dynamic-labs/logger": "4.48.2",
24
+ "@dynamic-labs/rpc-providers": "4.48.2",
25
+ "@dynamic-labs/types": "4.48.2",
26
+ "@dynamic-labs/utils": "4.48.2",
27
+ "@dynamic-labs/wallet-book": "4.48.2",
28
28
  "eventemitter3": "5.0.1"
29
29
  },
30
30
  "peerDependencies": {}
package/src/index.cjs CHANGED
@@ -42,6 +42,7 @@ var getWalletLinks = require('./utils/getWalletLinks/getWalletLinks.cjs');
42
42
  var convertWalletToBaseWallet = require('./utils/convertWalletToBaseWallet/convertWalletToBaseWallet.cjs');
43
43
  var isDynamicWaasConnector = require('./utils/isDynamicWaasConnector/isDynamicWaasConnector.cjs');
44
44
  var getWalletProvider = require('./utils/getWalletProvider/getWalletProvider.cjs');
45
+ var connectorRequiresDisconnectionForNewConnection = require('./utils/connectorRequiresDisconnectionForNewConnection/connectorRequiresDisconnectionForNewConnection.cjs');
45
46
  var Wallet = require('./Wallet/Wallet.cjs');
46
47
  var WalletConnectorBase = require('./WalletConnectorBase/WalletConnectorBase.cjs');
47
48
  var types = require('./WalletConnectorBase/types.cjs');
@@ -91,6 +92,7 @@ exports.convertWalletToBaseWallet = convertWalletToBaseWallet.convertWalletToBas
91
92
  exports.convertWalletToBaseWalletPartial = convertWalletToBaseWallet.convertWalletToBaseWalletPartial;
92
93
  exports.isDynamicWaasConnector = isDynamicWaasConnector.isDynamicWaasConnector;
93
94
  exports.getWalletProvider = getWalletProvider.getWalletProvider;
95
+ exports.connectorRequiresDisconnectionForNewConnection = connectorRequiresDisconnectionForNewConnection.connectorRequiresDisconnectionForNewConnection;
94
96
  exports.Wallet = Wallet.Wallet;
95
97
  exports.WalletConnectorBase = WalletConnectorBase.WalletConnectorBase;
96
98
  exports.Chains = types.Chains;
package/src/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { walletConnectorEvents, type ProviderReadyEventProps } from './events';
2
2
  export { type Attestation, type AuthenticatorRecoveryHandler, type AuthenticatorType, type BitcoinSignPsbtRequest, type BitcoinSignPsbtRequestSignature, type BitcoinSignPsbtResponse, type ExportHandler, type IAccountAbstractionWalletConnector, type IBitcoinWalletConnector, type IEmailOTPWalletConnector, type IEmailWalletConnector, type IHardwareWalletConnector, type IPasskeyWalletConnector, type IPhantomRedirectConnector, type IPhantomRedirectConnectorWithEvents, type ISendBalanceWalletConnector, type ISessionKeyCompatibleWalletConnector, type ISMSWalletConnector, type ITurnkeyWalletConnector, type ITurnkeyWalletConnectorStamper, type IWalletConnectConnector, type IZeroDevConnector, type RecoveryEmailParams, type RecoveryWebAuthnAttestation, type SignAllTransactionsListener, type SignAndSendTransactionListener, type SignMessageListener, type SignTransactionListener, type WebAuthnAttestation, type IEthereumConnector, type IPublicClient, type ISolanaConnection, type IDynamicWaasConnector, } from './interfaces';
3
3
  export type { AccountChangeEventHandler, ChainChangeEventHandler, DisconnectEventHandler, WalletConnectorCore, WalletMetadata, WalletDeepLinks, WalletDownloadLinks, WalletLimitations, WalletLinks, } from './types';
4
- export { addHexPrefix, bufferToHex, eventListenerHandlers, getChainInfo, getChainInfoWithOverrides, getDeepLink, getMobileExperience, getRpcUrlForChain, getWalletConnectorByKey, isAccountAbstractionConnector, isBitcoinConnector, isBloctoConnector, isEmailOTPWalletConnector, isEmailWalletConnector, isEmbeddedConnector, isHardwareWalletConnector, isHex, isMagicConnector, isPasskeyWalletConnector, isPhantomRedirectConnector, isSameAddress, isSendBalanceWalletConnector, isSessionKeyCompatibleWallet, isSessionKeyCompatibleWalletConnector, isSocialWalletConnector, isTurnkeyWalletConnector, isWalletConnectConnector, isConnectorMethodSupported, isConnectorEventSupported, getWalletProvider, getWalletMetadataFromWalletBook, getWalletLinks, logger, performPlatformSpecificConnectionMethod, ProviderLookup, setChainInfoOverrides, shouldLowercaseAddress, utf8ToHex, convertWalletToBaseWallet, convertWalletToBaseWalletPartial, type ChainDisplayOverrides, type DeepLinkVariant, type ProviderCondition, isDynamicWaasConnector, } from './utils';
4
+ export { addHexPrefix, bufferToHex, connectorRequiresDisconnectionForNewConnection, eventListenerHandlers, getChainInfo, getChainInfoWithOverrides, getDeepLink, getMobileExperience, getRpcUrlForChain, getWalletConnectorByKey, isAccountAbstractionConnector, isBitcoinConnector, isBloctoConnector, isEmailOTPWalletConnector, isEmailWalletConnector, isEmbeddedConnector, isHardwareWalletConnector, isHex, isMagicConnector, isPasskeyWalletConnector, isPhantomRedirectConnector, isSameAddress, isSendBalanceWalletConnector, isSessionKeyCompatibleWallet, isSessionKeyCompatibleWalletConnector, isSocialWalletConnector, isTurnkeyWalletConnector, isWalletConnectConnector, isConnectorMethodSupported, isConnectorEventSupported, getWalletProvider, getWalletMetadataFromWalletBook, getWalletLinks, logger, performPlatformSpecificConnectionMethod, ProviderLookup, setChainInfoOverrides, shouldLowercaseAddress, utf8ToHex, convertWalletToBaseWallet, convertWalletToBaseWalletPartial, type ChainDisplayOverrides, type DeepLinkVariant, type ProviderCondition, isDynamicWaasConnector, } from './utils';
5
5
  export { Wallet, type WalletConstructor, type WalletProps } from './Wallet';
6
6
  export { Chains, socialProviders, WalletConnectorBase, type Chain, type ChainInfo, type GetAddressOpts, type InternalWalletConnector, type NameServiceData, type PayloadParams, type SocialProvider, type WalletConnector, type WalletConnectorConstructor, type WalletConnectorEventTypes, type WalletConnectorExtension, type WalletConnectorsMethod, } from './WalletConnectorBase';
7
7
  export { WalletBookSingleton } from './WalletBookSingleton';
package/src/index.js CHANGED
@@ -38,6 +38,7 @@ export { getWalletLinks } from './utils/getWalletLinks/getWalletLinks.js';
38
38
  export { convertWalletToBaseWallet, convertWalletToBaseWalletPartial } from './utils/convertWalletToBaseWallet/convertWalletToBaseWallet.js';
39
39
  export { isDynamicWaasConnector } from './utils/isDynamicWaasConnector/isDynamicWaasConnector.js';
40
40
  export { getWalletProvider } from './utils/getWalletProvider/getWalletProvider.js';
41
+ export { connectorRequiresDisconnectionForNewConnection } from './utils/connectorRequiresDisconnectionForNewConnection/connectorRequiresDisconnectionForNewConnection.js';
41
42
  export { Wallet } from './Wallet/Wallet.js';
42
43
  export { WalletConnectorBase } from './WalletConnectorBase/WalletConnectorBase.js';
43
44
  export { Chains, socialProviders } from './WalletConnectorBase/types.js';
@@ -0,0 +1,47 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var walletBook = require('@dynamic-labs/wallet-book');
7
+
8
+ /**
9
+ * Checks if a wallet connector supports multi-account connection.
10
+ *
11
+ * This function looks up the wallet entry in the wallet book and checks
12
+ * if the `requiresDisconnectBeforeNewConnection` flag is set to true.
13
+ *
14
+ * @param connector - The wallet connector to check
15
+ * @returns true if the connector supports multi-account connection, false otherwise
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const connector = getSomeWalletConnector();
20
+ * if (connectorRequiresDisconnectionForNewConnection(connector)) {
21
+ * // Handle multi-account connection
22
+ * }
23
+ * ```
24
+ */
25
+ const connectorRequiresDisconnectionForNewConnection = (connector) => {
26
+ if (!connector || !connector.key) {
27
+ return false;
28
+ }
29
+ try {
30
+ const { walletBook: walletBook$1 } = connector;
31
+ if (!walletBook$1 || !walletBook$1.wallets) {
32
+ return false;
33
+ }
34
+ const walletBookRecord = walletBook.findWalletBookWallet(walletBook$1, connector.key);
35
+ if (!walletBookRecord) {
36
+ return false;
37
+ }
38
+ return Boolean('requiresDisconnectBeforeNewConnection' in walletBookRecord &&
39
+ walletBookRecord.requiresDisconnectBeforeNewConnection);
40
+ }
41
+ catch (error) {
42
+ // If anything goes wrong, default to false
43
+ return false;
44
+ }
45
+ };
46
+
47
+ exports.connectorRequiresDisconnectionForNewConnection = connectorRequiresDisconnectionForNewConnection;
@@ -0,0 +1,19 @@
1
+ import type { WalletConnectorBase } from '../../WalletConnectorBase';
2
+ /**
3
+ * Checks if a wallet connector supports multi-account connection.
4
+ *
5
+ * This function looks up the wallet entry in the wallet book and checks
6
+ * if the `requiresDisconnectBeforeNewConnection` flag is set to true.
7
+ *
8
+ * @param connector - The wallet connector to check
9
+ * @returns true if the connector supports multi-account connection, false otherwise
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const connector = getSomeWalletConnector();
14
+ * if (connectorRequiresDisconnectionForNewConnection(connector)) {
15
+ * // Handle multi-account connection
16
+ * }
17
+ * ```
18
+ */
19
+ export declare const connectorRequiresDisconnectionForNewConnection: (connector: WalletConnectorBase | null | undefined) => boolean;
@@ -0,0 +1,43 @@
1
+ 'use client'
2
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
3
+
4
+ /**
5
+ * Checks if a wallet connector supports multi-account connection.
6
+ *
7
+ * This function looks up the wallet entry in the wallet book and checks
8
+ * if the `requiresDisconnectBeforeNewConnection` flag is set to true.
9
+ *
10
+ * @param connector - The wallet connector to check
11
+ * @returns true if the connector supports multi-account connection, false otherwise
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const connector = getSomeWalletConnector();
16
+ * if (connectorRequiresDisconnectionForNewConnection(connector)) {
17
+ * // Handle multi-account connection
18
+ * }
19
+ * ```
20
+ */
21
+ const connectorRequiresDisconnectionForNewConnection = (connector) => {
22
+ if (!connector || !connector.key) {
23
+ return false;
24
+ }
25
+ try {
26
+ const { walletBook } = connector;
27
+ if (!walletBook || !walletBook.wallets) {
28
+ return false;
29
+ }
30
+ const walletBookRecord = findWalletBookWallet(walletBook, connector.key);
31
+ if (!walletBookRecord) {
32
+ return false;
33
+ }
34
+ return Boolean('requiresDisconnectBeforeNewConnection' in walletBookRecord &&
35
+ walletBookRecord.requiresDisconnectBeforeNewConnection);
36
+ }
37
+ catch (error) {
38
+ // If anything goes wrong, default to false
39
+ return false;
40
+ }
41
+ };
42
+
43
+ export { connectorRequiresDisconnectionForNewConnection };
@@ -0,0 +1 @@
1
+ export { connectorRequiresDisconnectionForNewConnection } from './connectorRequiresDisconnectionForNewConnection';
@@ -32,3 +32,4 @@ export * from './getWalletLinks';
32
32
  export * from './convertWalletToBaseWallet';
33
33
  export * from './isDynamicWaasConnector';
34
34
  export * from './getWalletProvider';
35
+ export * from './connectorRequiresDisconnectionForNewConnection';