@dynamic-labs/wallet-connector-core 4.0.0-alpha.48 → 4.0.0-alpha.49

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,33 @@
1
1
 
2
+ ## [4.0.0-alpha.49](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.48...v4.0.0-alpha.49) (2024-12-27)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * change openFunding to openExternalFunding (#7684)
8
+
9
+ ### Features
10
+
11
+ * aa blockaid simulations ([#7583](https://github.com/dynamic-labs/dynamic-auth/issues/7583)) ([6436220](https://github.com/dynamic-labs/dynamic-auth/commit/64362204d2c96291a37bf281d62531d6f2384fdf))
12
+ * add ethereum createConnector function ([#7607](https://github.com/dynamic-labs/dynamic-auth/issues/7607)) ([f306537](https://github.com/dynamic-labs/dynamic-auth/commit/f3065372f3c5dfc8bf26173dc722576e614af5e1))
13
+ * add fundWithExternalWallet method to useFunding ([#7688](https://github.com/dynamic-labs/dynamic-auth/issues/7688)) ([d48b1d2](https://github.com/dynamic-labs/dynamic-auth/commit/d48b1d2568ba928b322a4d81b6386e775ae4aa98))
14
+ * change openFunding to openExternalFunding ([#7684](https://github.com/dynamic-labs/dynamic-auth/issues/7684)) ([8efb9cb](https://github.com/dynamic-labs/dynamic-auth/commit/8efb9cb9ca3d7e2273c14e18f7be5892e50b8e12))
15
+ * connect global wallet in ethereum ([#7619](https://github.com/dynamic-labs/dynamic-auth/issues/7619)) ([fdb7f00](https://github.com/dynamic-labs/dynamic-auth/commit/fdb7f00c33f7da3ac95ae13ac674caa64b453cae))
16
+ * create wallet groups dynamically based on wallet options ([#7662](https://github.com/dynamic-labs/dynamic-auth/issues/7662)) ([981affc](https://github.com/dynamic-labs/dynamic-auth/commit/981affce5518f6532d960fe4e879e9cf40a66ce7))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **ethereum:** normalize user reject error from injected wallets ([#7702](https://github.com/dynamic-labs/dynamic-auth/issues/7702)) ([ce456a8](https://github.com/dynamic-labs/dynamic-auth/commit/ce456a8592197b07857baf32bb1b38867ffb37fe))
22
+ * fetch nonce when authenticating a user that connected in connect-only mode ([#7689](https://github.com/dynamic-labs/dynamic-auth/issues/7689)) ([f048bb9](https://github.com/dynamic-labs/dynamic-auth/commit/f048bb96b6cb5ae603966b2813f900a082cd158f))
23
+ * filter out wallets for the current network when using external wallet funding ([#7694](https://github.com/dynamic-labs/dynamic-auth/issues/7694)) ([65db665](https://github.com/dynamic-labs/dynamic-auth/commit/65db6652a934561e7d07379a65d2baa8f7813d8e))
24
+ * remove toaccount from signmessage and signtypeddata for zerodev ([#7650](https://github.com/dynamic-labs/dynamic-auth/issues/7650)) ([626e849](https://github.com/dynamic-labs/dynamic-auth/commit/626e849a4af3af51d60b42dd2787edb05126744b))
25
+ * save nonce to storage ([#7698](https://github.com/dynamic-labs/dynamic-auth/issues/7698)) ([93dc65b](https://github.com/dynamic-labs/dynamic-auth/commit/93dc65b7f78040367b85420c1374f3cafbfb598b))
26
+ * **sdk-react-core:** add timeout when getting connected accounts ([#7697](https://github.com/dynamic-labs/dynamic-auth/issues/7697)) ([9a4bd7c](https://github.com/dynamic-labs/dynamic-auth/commit/9a4bd7c02795205ec98d8d71aba75b51b9bbee7c))
27
+ * update auth token from new source ([#7666](https://github.com/dynamic-labs/dynamic-auth/issues/7666)) ([61798de](https://github.com/dynamic-labs/dynamic-auth/commit/61798de26d759db9064f5f84118540346a44ab50))
28
+ * update extension update_url endpoint ([#7655](https://github.com/dynamic-labs/dynamic-auth/issues/7655)) ([46cff3a](https://github.com/dynamic-labs/dynamic-auth/commit/46cff3a80c9efee659a764df47f927ed5a117079))
29
+ * zerodev confirmation UI closes properly ([#7664](https://github.com/dynamic-labs/dynamic-auth/issues/7664)) ([a78aded](https://github.com/dynamic-labs/dynamic-auth/commit/a78adedc054d09134198d22812aa5cab7bbff548))
30
+
2
31
  ## [4.0.0-alpha.48](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.47...v4.0.0-alpha.48) (2024-12-17)
3
32
 
4
33
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.0.0-alpha.48";
6
+ var version = "4.0.0-alpha.49";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.0.0-alpha.48";
2
+ var version = "4.0.0-alpha.49";
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.0.0-alpha.48",
3
+ "version": "4.0.0-alpha.49",
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,15 +18,15 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.576"
21
+ "@dynamic-labs/sdk-api-core": "0.0.578"
22
22
  },
23
23
  "peerDependencies": {
24
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.48",
25
- "@dynamic-labs/logger": "4.0.0-alpha.48",
26
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.48",
27
- "@dynamic-labs/types": "4.0.0-alpha.48",
28
- "@dynamic-labs/utils": "4.0.0-alpha.48",
29
- "@dynamic-labs/wallet-book": "4.0.0-alpha.48",
24
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.49",
25
+ "@dynamic-labs/logger": "4.0.0-alpha.49",
26
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.49",
27
+ "@dynamic-labs/types": "4.0.0-alpha.49",
28
+ "@dynamic-labs/utils": "4.0.0-alpha.49",
29
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.49",
30
30
  "eventemitter3": "5.0.1"
31
31
  }
32
32
  }
@@ -88,7 +88,9 @@ class Wallet extends types.BaseWallet {
88
88
  signMessage(messageToSign) {
89
89
  return _tslib.__awaiter(this, void 0, void 0, function* () {
90
90
  yield this.sync();
91
- return this._connector.signMessage(messageToSign, this.address);
91
+ return this._connector.signMessage(messageToSign, {
92
+ address: this.address,
93
+ });
92
94
  });
93
95
  }
94
96
  /**
@@ -84,7 +84,9 @@ class Wallet extends BaseWallet {
84
84
  signMessage(messageToSign) {
85
85
  return __awaiter(this, void 0, void 0, function* () {
86
86
  yield this.sync();
87
- return this._connector.signMessage(messageToSign, this.address);
87
+ return this._connector.signMessage(messageToSign, {
88
+ address: this.address,
89
+ });
88
90
  });
89
91
  }
90
92
  /**
@@ -326,7 +326,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
326
326
  *
327
327
  * @default Promise<undefined>
328
328
  */
329
- signMessage(messageToSign, withAddress) {
329
+ signMessage(messageToSign, options) {
330
330
  return Promise.resolve(undefined);
331
331
  }
332
332
  /**
@@ -260,7 +260,9 @@ export declare abstract class WalletConnectorBase<C extends WalletConstructor<an
260
260
  *
261
261
  * @default Promise<undefined>
262
262
  */
263
- signMessage(messageToSign: string, withAddress?: string): Promise<string | undefined>;
263
+ signMessage(messageToSign: string, options?: {
264
+ address?: string;
265
+ }): Promise<string | undefined>;
264
266
  /**
265
267
  * List of supported chains for this wallet
266
268
  */
@@ -318,7 +318,7 @@ class WalletConnectorBase extends EventEmitter {
318
318
  *
319
319
  * @default Promise<undefined>
320
320
  */
321
- signMessage(messageToSign, withAddress) {
321
+ signMessage(messageToSign, options) {
322
322
  return Promise.resolve(undefined);
323
323
  }
324
324
  /**
package/src/index.cjs CHANGED
@@ -40,6 +40,7 @@ var getWalletMetadataFromWalletBook = require('./utils/getWalletMetadataFromWall
40
40
  var isConnectorMethodSupported = require('./utils/isConnectorMethodSupported/isConnectorMethodSupported.cjs');
41
41
  var isConnectorEventSupported = require('./utils/isConnectorEventSupported/isConnectorEventSupported.cjs');
42
42
  var getWalletLinks = require('./utils/getWalletLinks/getWalletLinks.cjs');
43
+ var convertWalletToBaseWallet = require('./utils/convertWalletToBaseWallet/convertWalletToBaseWallet.cjs');
43
44
  var Wallet = require('./Wallet/Wallet.cjs');
44
45
  var WalletConnectorBase = require('./WalletConnectorBase/WalletConnectorBase.cjs');
45
46
  var types = require('./WalletConnectorBase/types.cjs');
@@ -86,6 +87,8 @@ exports.getWalletMetadataFromWalletBook = getWalletMetadataFromWalletBook.getWal
86
87
  exports.isConnectorMethodSupported = isConnectorMethodSupported.isConnectorMethodSupported;
87
88
  exports.isConnectorEventSupported = isConnectorEventSupported.isConnectorEventSupported;
88
89
  exports.getWalletLinks = getWalletLinks.getWalletLinks;
90
+ exports.convertWalletToBaseWallet = convertWalletToBaseWallet.convertWalletToBaseWallet;
91
+ exports.convertWalletToBaseWalletPartial = convertWalletToBaseWallet.convertWalletToBaseWalletPartial;
89
92
  exports.Wallet = Wallet.Wallet;
90
93
  exports.WalletConnectorBase = WalletConnectorBase.WalletConnectorBase;
91
94
  exports.Chains = types.Chains;
package/src/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { walletConnectorEvents } from './events';
2
2
  export { type Attestation, type AuthenticatorRecoveryHandler, type AuthenticatorType, type BitcoinSignPsbtRequest, type BitcoinSignPsbtRequestSignature, type BitcoinSignPsbtResponse, type ExportHandler, type ExtendedPrivateKey, type IAccountAbstractionWalletConnector, type IBitcoinWalletConnector, type ICoinbaseMPCWalletConnector, 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 RawPrivateKey, type RecoveryEmailParams, type RecoveryWebAuthnAttestation, type SignAllTransactionsListener, type SignAndSendTransactionListener, type SignMessageListener, type SignTransactionListener, type WebAuthnAttestation, } 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, isCoinbaseMpcWalletConnector, isEmailOTPWalletConnector, isEmailWalletConnector, isEmbeddedConnector, isHardwareWalletConnector, isHex, isMagicConnector, isPasskeyWalletConnector, isPhantomRedirectConnector, isSameAddress, isSendBalanceWalletConnector, isSessionKeyCompatibleWallet, isSessionKeyCompatibleWalletConnector, isSocialWalletConnector, isTurnkeyWalletConnector, isWalletConnectConnector, isConnectorMethodSupported, isConnectorEventSupported, getWalletMetadataFromWalletBook, getWalletLinks, logger, performPlatformSpecificConnectionMethod, ProviderLookup, setChainInfoOverrides, shouldLowercaseAddress, utf8ToHex, type ChainDisplayOverrides, type DeepLinkVariant, type ProviderCondition, } from './utils';
4
+ export { addHexPrefix, bufferToHex, eventListenerHandlers, getChainInfo, getChainInfoWithOverrides, getDeepLink, getMobileExperience, getRpcUrlForChain, getWalletConnectorByKey, isAccountAbstractionConnector, isBitcoinConnector, isBloctoConnector, isCoinbaseMpcWalletConnector, isEmailOTPWalletConnector, isEmailWalletConnector, isEmbeddedConnector, isHardwareWalletConnector, isHex, isMagicConnector, isPasskeyWalletConnector, isPhantomRedirectConnector, isSameAddress, isSendBalanceWalletConnector, isSessionKeyCompatibleWallet, isSessionKeyCompatibleWalletConnector, isSocialWalletConnector, isTurnkeyWalletConnector, isWalletConnectConnector, isConnectorMethodSupported, isConnectorEventSupported, getWalletMetadataFromWalletBook, getWalletLinks, logger, performPlatformSpecificConnectionMethod, ProviderLookup, setChainInfoOverrides, shouldLowercaseAddress, utf8ToHex, convertWalletToBaseWallet, convertWalletToBaseWalletPartial, type ChainDisplayOverrides, type DeepLinkVariant, type ProviderCondition, } 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
@@ -36,6 +36,7 @@ export { getWalletMetadataFromWalletBook } from './utils/getWalletMetadataFromWa
36
36
  export { isConnectorMethodSupported } from './utils/isConnectorMethodSupported/isConnectorMethodSupported.js';
37
37
  export { isConnectorEventSupported } from './utils/isConnectorEventSupported/isConnectorEventSupported.js';
38
38
  export { getWalletLinks } from './utils/getWalletLinks/getWalletLinks.js';
39
+ export { convertWalletToBaseWallet, convertWalletToBaseWalletPartial } from './utils/convertWalletToBaseWallet/convertWalletToBaseWallet.js';
39
40
  export { Wallet } from './Wallet/Wallet.js';
40
41
  export { WalletConnectorBase } from './WalletConnectorBase/WalletConnectorBase.js';
41
42
  export { Chains, socialProviders } from './WalletConnectorBase/types.js';
@@ -0,0 +1,24 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const convertWalletToBaseWallet = (wallet) => ({
7
+ additionalAddresses: wallet.additionalAddresses,
8
+ address: wallet.address,
9
+ chain: wallet.chain,
10
+ id: wallet.id,
11
+ isAuthenticated: wallet.isAuthenticated,
12
+ key: wallet.key,
13
+ });
14
+ const convertWalletToBaseWalletPartial = (wallet) => ({
15
+ additionalAddresses: wallet.additionalAddresses,
16
+ address: wallet.address,
17
+ chain: wallet.chain,
18
+ id: wallet.id,
19
+ isAuthenticated: wallet.isAuthenticated,
20
+ key: wallet.key,
21
+ });
22
+
23
+ exports.convertWalletToBaseWallet = convertWalletToBaseWallet;
24
+ exports.convertWalletToBaseWalletPartial = convertWalletToBaseWalletPartial;
@@ -0,0 +1,4 @@
1
+ import { BaseWallet } from '@dynamic-labs/types';
2
+ import { Wallet } from '../../Wallet';
3
+ export declare const convertWalletToBaseWallet: (wallet: Wallet) => BaseWallet;
4
+ export declare const convertWalletToBaseWalletPartial: (wallet: Partial<Wallet>) => Partial<BaseWallet>;
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+ const convertWalletToBaseWallet = (wallet) => ({
3
+ additionalAddresses: wallet.additionalAddresses,
4
+ address: wallet.address,
5
+ chain: wallet.chain,
6
+ id: wallet.id,
7
+ isAuthenticated: wallet.isAuthenticated,
8
+ key: wallet.key,
9
+ });
10
+ const convertWalletToBaseWalletPartial = (wallet) => ({
11
+ additionalAddresses: wallet.additionalAddresses,
12
+ address: wallet.address,
13
+ chain: wallet.chain,
14
+ id: wallet.id,
15
+ isAuthenticated: wallet.isAuthenticated,
16
+ key: wallet.key,
17
+ });
18
+
19
+ export { convertWalletToBaseWallet, convertWalletToBaseWalletPartial };
@@ -0,0 +1 @@
1
+ export * from './convertWalletToBaseWallet';
@@ -30,3 +30,4 @@ export * from './getWalletMetadataFromWalletBook';
30
30
  export * from './isConnectorMethodSupported';
31
31
  export * from './isConnectorEventSupported';
32
32
  export * from './getWalletLinks';
33
+ export * from './convertWalletToBaseWallet';