@dynamic-labs/wallet-connector-core 4.0.0-alpha.38 → 4.0.0-alpha.39

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.0.0-alpha.39](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.38...v4.0.0-alpha.39) (2024-12-02)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * remove usages of findWalletBookWallet when possible (#7455)
8
+
9
+ ### Bug Fixes
10
+
11
+ * sdkHasLoaded always false in cookie enabled env ([#7516](https://github.com/dynamic-labs/dynamic-auth/issues/7516)) ([1c3335c](https://github.com/dynamic-labs/dynamic-auth/commit/1c3335c13930e9bffe60cf1c09bc9c9584a59ef7))
12
+
13
+
14
+ * remove usages of findWalletBookWallet when possible ([#7455](https://github.com/dynamic-labs/dynamic-auth/issues/7455)) ([0ce977d](https://github.com/dynamic-labs/dynamic-auth/commit/0ce977d5d4d591c371c6ea2edfb252ba7acff5d2))
15
+
2
16
  ## [4.0.0-alpha.38](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.37...v4.0.0-alpha.38) (2024-11-27)
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.0.0-alpha.38";
6
+ var version = "4.0.0-alpha.39";
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.38";
2
+ var version = "4.0.0-alpha.39";
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.38",
3
+ "version": "4.0.0-alpha.39",
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",
@@ -21,12 +21,12 @@
21
21
  "@dynamic-labs/sdk-api-core": "0.0.570"
22
22
  },
23
23
  "peerDependencies": {
24
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.38",
25
- "@dynamic-labs/logger": "4.0.0-alpha.38",
26
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.38",
27
- "@dynamic-labs/types": "4.0.0-alpha.38",
28
- "@dynamic-labs/utils": "4.0.0-alpha.38",
29
- "@dynamic-labs/wallet-book": "4.0.0-alpha.38",
24
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.39",
25
+ "@dynamic-labs/logger": "4.0.0-alpha.39",
26
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.39",
27
+ "@dynamic-labs/types": "4.0.0-alpha.39",
28
+ "@dynamic-labs/utils": "4.0.0-alpha.39",
29
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.39",
30
30
  "eventemitter3": "5.0.1"
31
31
  }
32
32
  }
@@ -6,13 +6,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var _tslib = require('../../_virtual/_tslib.cjs');
7
7
  var EventEmitter = require('eventemitter3');
8
8
  var utils = require('@dynamic-labs/utils');
9
- var walletBook = require('@dynamic-labs/wallet-book');
10
9
  var walletConnectorEvents = require('../events/walletConnectorEvents.cjs');
11
10
  var logger = require('../utils/logger.cjs');
12
11
  var isSameAddress = require('../utils/isSameAddress/isSameAddress.cjs');
13
12
  var getMobileExperience = require('../utils/getMobileExperience/getMobileExperience.cjs');
14
13
  var getWalletMetadataFromWalletBook = require('../utils/getWalletMetadataFromWalletBook/getWalletMetadataFromWalletBook.cjs');
15
14
  var isConnectorMethodSupported = require('../utils/isConnectorMethodSupported/isConnectorMethodSupported.cjs');
15
+ require('@dynamic-labs/wallet-book');
16
16
  var WalletBookSingleton = require('../WalletBookSingleton/WalletBookSingleton.cjs');
17
17
 
18
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -137,13 +137,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
137
137
  return this._walletBookInstance.walletBook;
138
138
  }
139
139
  filter() {
140
- try {
141
- walletBook.getWalletBookWallet(this.walletBook, this.key, this.walletFallback);
142
- return true;
143
- }
144
- catch (_a) {
145
- return false;
146
- }
140
+ return true;
147
141
  }
148
142
  get mobileExperience() {
149
143
  return getMobileExperience.getMobileExperience({
@@ -2,13 +2,13 @@
2
2
  import { __classPrivateFieldGet, __awaiter } from '../../_virtual/_tslib.js';
3
3
  import EventEmitter from 'eventemitter3';
4
4
  import { WalletAddressMismatchError } from '@dynamic-labs/utils';
5
- import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
6
5
  import { walletConnectorEvents } from '../events/walletConnectorEvents.js';
7
6
  import { logger } from '../utils/logger.js';
8
7
  import { isSameAddress } from '../utils/isSameAddress/isSameAddress.js';
9
8
  import { getMobileExperience } from '../utils/getMobileExperience/getMobileExperience.js';
10
9
  import { getWalletMetadataFromWalletBook } from '../utils/getWalletMetadataFromWalletBook/getWalletMetadataFromWalletBook.js';
11
10
  import { isConnectorMethodSupported } from '../utils/isConnectorMethodSupported/isConnectorMethodSupported.js';
11
+ import '@dynamic-labs/wallet-book';
12
12
  import { WalletBookSingleton } from '../WalletBookSingleton/WalletBookSingleton.js';
13
13
 
14
14
  /* eslint-disable @typescript-eslint/triple-slash-reference */
@@ -129,13 +129,7 @@ class WalletConnectorBase extends EventEmitter {
129
129
  return this._walletBookInstance.walletBook;
130
130
  }
131
131
  filter() {
132
- try {
133
- getWalletBookWallet(this.walletBook, this.key, this.walletFallback);
134
- return true;
135
- }
136
- catch (_a) {
137
- return false;
138
- }
132
+ return true;
139
133
  }
140
134
  get mobileExperience() {
141
135
  return getMobileExperience({
package/src/types.d.ts CHANGED
@@ -64,6 +64,7 @@ export type WalletDeepLinks = {
64
64
  universal?: string;
65
65
  };
66
66
  };
67
+ export type HardwareWallet = 'ledger';
67
68
  /**
68
69
  * @property id - A key that can be used to identify the wallet/connector, based on the wallet name
69
70
  * @property name - The wallet name
@@ -86,6 +87,7 @@ export type WalletMetadata = {
86
87
  deepLinks?: WalletDeepLinks;
87
88
  downloadLinks?: WalletDownloadLinks;
88
89
  walletLimitations?: WalletLimitations;
90
+ supportedHardwareWallets?: HardwareWallet[];
89
91
  rdns?: string;
90
92
  };
91
93
  export declare namespace WalletConnectorCore { }
@@ -38,6 +38,7 @@ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBo
38
38
  inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
39
39
  name: wallet.name,
40
40
  rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
41
+ supportedHardwareWallets: wallet.hardwareWallets,
41
42
  walletLimitations: getWalletLimitations.getWalletLimitations(wallet.walletLimitations),
42
43
  };
43
44
  };
@@ -34,6 +34,7 @@ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBo
34
34
  inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
35
35
  name: wallet.name,
36
36
  rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
37
+ supportedHardwareWallets: wallet.hardwareWallets,
37
38
  walletLimitations: getWalletLimitations(wallet.walletLimitations),
38
39
  };
39
40
  };