@dynamic-labs/wallet-connector-core 4.0.0-alpha.27 → 4.0.0-alpha.29

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,25 @@
1
1
 
2
+ ## [4.0.0-alpha.29](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.28...v4.0.0-alpha.29) (2024-11-07)
3
+
4
+ ## [4.0.0-alpha.28](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.27...v4.0.0-alpha.28) (2024-11-07)
5
+
6
+
7
+ ### ⚠ BREAKING CHANGES
8
+
9
+ * upgrade to starknet v6
10
+ See this guide for more details: https://starknetjs.com/docs/guides/migrate/
11
+ There are no code changes required on the Dynamic SDK side, however if you have installed the `starknet` package, you will need to upgrade to >= v6.11.0.
12
+
13
+ ### Features
14
+
15
+ * new transaction modal and ui for sign/signAll ([#7296](https://github.com/dynamic-labs/dynamic-auth/issues/7296)) ([05a8af1](https://github.com/dynamic-labs/dynamic-auth/commit/05a8af1eb772b2b8087ed96a54caf4b6ae8b79d2)), closes [#7297](https://github.com/dynamic-labs/dynamic-auth/issues/7297) [#7298](https://github.com/dynamic-labs/dynamic-auth/issues/7298)
16
+ * upgrade to starknet v6 ([#7189](https://github.com/dynamic-labs/dynamic-auth/issues/7189)) ([2a6e24e](https://github.com/dynamic-labs/dynamic-auth/commit/2a6e24e4178fcee671b381c28f6a681f4ce52c62))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * transaction confirmation modal popup ([#7368](https://github.com/dynamic-labs/dynamic-auth/issues/7368)) ([3c48658](https://github.com/dynamic-labs/dynamic-auth/commit/3c48658a62874d908bba8f06fb092ff5983ede16))
22
+
2
23
  ## [4.0.0-alpha.27](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.26...v4.0.0-alpha.27) (2024-11-06)
3
24
 
4
25
 
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.27";
6
+ var version = "4.0.0-alpha.29";
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.27";
2
+ var version = "4.0.0-alpha.29";
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.27",
3
+ "version": "4.0.0-alpha.29",
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.559"
21
+ "@dynamic-labs/sdk-api-core": "0.0.563"
22
22
  },
23
23
  "peerDependencies": {
24
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.27",
25
- "@dynamic-labs/logger": "4.0.0-alpha.27",
26
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.27",
27
- "@dynamic-labs/types": "4.0.0-alpha.27",
28
- "@dynamic-labs/utils": "4.0.0-alpha.27",
29
- "@dynamic-labs/wallet-book": "4.0.0-alpha.27",
24
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.29",
25
+ "@dynamic-labs/logger": "4.0.0-alpha.29",
26
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.29",
27
+ "@dynamic-labs/types": "4.0.0-alpha.29",
28
+ "@dynamic-labs/utils": "4.0.0-alpha.29",
29
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.29",
30
30
  "eventemitter3": "5.0.1"
31
31
  }
32
32
  }
@@ -11,6 +11,7 @@ var walletConnectorEvents = require('../events/walletConnectorEvents.cjs');
11
11
  var logger = require('../utils/logger.cjs');
12
12
  var isSameAddress = require('../utils/isSameAddress/isSameAddress.cjs');
13
13
  var getMobileExperience = require('../utils/getMobileExperience/getMobileExperience.cjs');
14
+ var getWalletMetadataFromWalletBook = require('../utils/getWalletMetadataFromWalletBook/getWalletMetadataFromWalletBook.cjs');
14
15
  var isConnectorMethodSupported = require('../utils/isConnectorMethodSupported/isConnectorMethodSupported.cjs');
15
16
  var WalletBookSingleton = require('../WalletBookSingleton/WalletBookSingleton.cjs');
16
17
 
@@ -289,6 +290,12 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
289
290
  }
290
291
  get metadata() {
291
292
  var _a;
293
+ if (!this._metadata) {
294
+ this._metadata = getWalletMetadataFromWalletBook.getWalletMetadataFromWalletBook({
295
+ walletBook: this.walletBook,
296
+ walletKey: this.key,
297
+ });
298
+ }
292
299
  return (_a = this._metadata) !== null && _a !== void 0 ? _a : { icon: '', id: this.key, name: this.name };
293
300
  }
294
301
  /**
@@ -7,6 +7,7 @@ import { walletConnectorEvents } from '../events/walletConnectorEvents.js';
7
7
  import { logger } from '../utils/logger.js';
8
8
  import { isSameAddress } from '../utils/isSameAddress/isSameAddress.js';
9
9
  import { getMobileExperience } from '../utils/getMobileExperience/getMobileExperience.js';
10
+ import { getWalletMetadataFromWalletBook } from '../utils/getWalletMetadataFromWalletBook/getWalletMetadataFromWalletBook.js';
10
11
  import { isConnectorMethodSupported } from '../utils/isConnectorMethodSupported/isConnectorMethodSupported.js';
11
12
  import { WalletBookSingleton } from '../WalletBookSingleton/WalletBookSingleton.js';
12
13
 
@@ -281,6 +282,12 @@ class WalletConnectorBase extends EventEmitter {
281
282
  }
282
283
  get metadata() {
283
284
  var _a;
285
+ if (!this._metadata) {
286
+ this._metadata = getWalletMetadataFromWalletBook({
287
+ walletBook: this.walletBook,
288
+ walletKey: this.key,
289
+ });
290
+ }
284
291
  return (_a = this._metadata) !== null && _a !== void 0 ? _a : { icon: '', id: this.key, name: this.name };
285
292
  }
286
293
  /**
@@ -1,4 +1,5 @@
1
1
  import { IUITransaction } from '@dynamic-labs/types';
2
+ import { EcdsaValidatorOptions, ProviderEntryPointVersionEnum, ProviderKernelVersionEnum } from '@dynamic-labs/sdk-api-core';
2
3
  import { WalletConnector, WalletConnectorBase } from '../WalletConnectorBase';
3
4
  type GetAccountAbstractionProviderProps = {
4
5
  withSponsorship?: boolean;
@@ -13,11 +14,14 @@ export interface IAccountAbstractionWalletConnector extends WalletConnectorBase
13
14
  * from the useSmartWallet hook
14
15
  */
15
16
  getEOAConnector(): WalletConnector | undefined;
16
- registerEoa({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector, }: {
17
+ registerEoa({ smartWalletAddress, eoaAddress, eoaConnector, shouldSetEoaConnector, ecdsaProviderType, entryPointVersion, kernelVersion, }: {
17
18
  smartWalletAddress: string;
18
19
  eoaAddress: string;
19
20
  eoaConnector: WalletConnectorBase;
20
21
  shouldSetEoaConnector?: boolean;
22
+ ecdsaProviderType?: EcdsaValidatorOptions;
23
+ entryPointVersion?: ProviderEntryPointVersionEnum;
24
+ kernelVersion?: ProviderKernelVersionEnum;
21
25
  }): Promise<void>;
22
26
  }
23
27
  export {};
package/src/types.d.ts CHANGED
@@ -30,6 +30,7 @@ export type WalletDeepLinks = {
30
30
  * @property icon - The url or data for the wallet icon
31
31
  * @property brandColor - The hex valye for the wallet brand color
32
32
  * @property groupKey - Key used to group wallets together, for example, by chain
33
+ * @property inAppBrowserUrl - The url to open the wallet in the in-app browser
33
34
  * @property deepLinks - The mobile deep links of the wallet
34
35
  * @property downloadLinks - The ids to download the wallet in the different browsers and mobile stores
35
36
  * @property walletLimitations - The limitations of the wallet in regards to methods and events
@@ -41,6 +42,7 @@ export type WalletMetadata = {
41
42
  icon: string;
42
43
  brandColor?: `#${string}`;
43
44
  groupKey?: string;
45
+ inAppBrowserUrl?: string;
44
46
  deepLinks?: WalletDeepLinks;
45
47
  downloadLinks?: WalletDownloadLinks;
46
48
  walletLimitations?: WalletLimitations;
@@ -11,7 +11,7 @@ var getDownloadLinks = require('./getDownloadLinks/getDownloadLinks.cjs');
11
11
  var getWalletLimitations = require('./getWalletLimitations/getWalletLimitations.cjs');
12
12
 
13
13
  const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBook: walletBook$1, walletFallback, }) => {
14
- var _a, _b, _c, _d, _e;
14
+ var _a, _b, _c, _d, _e, _f, _g;
15
15
  if (!walletBook$1 && !walletFallback) {
16
16
  throw new Error('Wallet book is required');
17
17
  }
@@ -27,8 +27,9 @@ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBo
27
27
  groupKey: (_b = wallet === null || wallet === void 0 ? void 0 : wallet.chainGroup) !== null && _b !== void 0 ? _b : wallet === null || wallet === void 0 ? void 0 : wallet.walletGroup,
28
28
  icon: (_d = getIconUrl.getIconUrl((_c = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _c === void 0 ? void 0 : _c.spriteId)) !== null && _d !== void 0 ? _d : '',
29
29
  id: walletKey,
30
+ inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
30
31
  name: wallet.name,
31
- rdns: (_e = wallet.eip6963Config) === null || _e === void 0 ? void 0 : _e.rdns,
32
+ rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
32
33
  walletLimitations: getWalletLimitations.getWalletLimitations(wallet.walletLimitations),
33
34
  };
34
35
  };
@@ -7,7 +7,7 @@ import { getDownloadLinks } from './getDownloadLinks/getDownloadLinks.js';
7
7
  import { getWalletLimitations } from './getWalletLimitations/getWalletLimitations.js';
8
8
 
9
9
  const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBook, walletFallback, }) => {
10
- var _a, _b, _c, _d, _e;
10
+ var _a, _b, _c, _d, _e, _f, _g;
11
11
  if (!walletBook && !walletFallback) {
12
12
  throw new Error('Wallet book is required');
13
13
  }
@@ -23,8 +23,9 @@ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBo
23
23
  groupKey: (_b = wallet === null || wallet === void 0 ? void 0 : wallet.chainGroup) !== null && _b !== void 0 ? _b : wallet === null || wallet === void 0 ? void 0 : wallet.walletGroup,
24
24
  icon: (_d = getIconUrl((_c = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _c === void 0 ? void 0 : _c.spriteId)) !== null && _d !== void 0 ? _d : '',
25
25
  id: walletKey,
26
+ inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
26
27
  name: wallet.name,
27
- rdns: (_e = wallet.eip6963Config) === null || _e === void 0 ? void 0 : _e.rdns,
28
+ rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
28
29
  walletLimitations: getWalletLimitations(wallet.walletLimitations),
29
30
  };
30
31
  };