@dynamic-labs/utils 4.23.1 → 4.25.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,29 @@
1
1
 
2
+ ## [4.25.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.24.0...v4.25.0) (2025-07-17)
3
+
4
+
5
+ ### Features
6
+
7
+ * add passkey 1fa to react native ([#9167](https://github.com/dynamic-labs/dynamic-auth/issues/9167)) ([8f9b166](https://github.com/dynamic-labs/dynamic-auth/commit/8f9b166de3e0ab329c1539597c350681f1254bfb))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * add waas iframe retry ([#9185](https://github.com/dynamic-labs/dynamic-auth/issues/9185)) ([ebe40d5](https://github.com/dynamic-labs/dynamic-auth/commit/ebe40d5ecdf214362b013502b4ac1313ba356aeb))
13
+ * ensure storage service defaults to local storage ([#9182](https://github.com/dynamic-labs/dynamic-auth/issues/9182)) ([d6ce48e](https://github.com/dynamic-labs/dynamic-auth/commit/d6ce48e8c1d2edb32d8db41efe3f56b97275c32a))
14
+ * add account address to wallet properties ([#9172](https://github.com/dynamic-labs/dynamic-auth/issues/9172)) ([61de8ca](https://github.com/dynamic-labs/dynamic-auth/commit/61de8caccb95c5d52126283ac7a1ebd5a36aa33c))
15
+ * show hcaptcha for headless social sign in ([#9154](https://github.com/dynamic-labs/dynamic-auth/issues/9154)) ([262b752](https://github.com/dynamic-labs/dynamic-auth/commit/262b75257ec6dcc05f67804b71f7285ec5919f91))
16
+
17
+ ## [4.24.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.23.1...v4.24.0) (2025-07-15)
18
+
19
+ ### Features
20
+
21
+ * add useMultichainTokenBalances hook ([#9171](https://github.com/dynamic-labs/dynamic-auth/issues/9171)) ([7890182](https://github.com/dynamic-labs/dynamic-auth/commit/7890182a45139c0ebcb4273ca717cf7ced0fd652))
22
+
23
+ ### Bug Fixes
24
+
25
+ * improve error for invalid embedded wallet action due to missing primary wallet or connector ([#9174](https://github.com/dynamic-labs/dynamic-auth/issues/9174)) ([8459728](https://github.com/dynamic-labs/dynamic-auth/commit/84597289ecad17bcbeccfda532bc2490373c0ab5))
26
+
2
27
  ### [4.23.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.23.0...v4.23.1) (2025-07-15)
3
28
 
4
29
  ## [4.23.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.8...v4.23.0) (2025-07-11)
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.23.1";
6
+ var version = "4.25.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.23.1";
2
+ var version = "4.25.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "4.23.1",
3
+ "version": "4.25.0",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.715",
21
+ "@dynamic-labs/sdk-api-core": "0.0.718",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.23.1",
24
- "@dynamic-labs/logger": "4.23.1",
25
- "@dynamic-labs/types": "4.23.1",
23
+ "@dynamic-labs/assert-package-version": "4.25.0",
24
+ "@dynamic-labs/logger": "4.25.0",
25
+ "@dynamic-labs/types": "4.25.0",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var DynamicError = require('./DynamicError.cjs');
7
+
8
+ class InvalidPrimaryWalletOrConnectorError extends DynamicError.DynamicError {
9
+ constructor(code) {
10
+ super('Primary wallet is not properly set or the wallet connector is missing from DynamicContextProvider settings.', code);
11
+ }
12
+ }
13
+
14
+ exports.InvalidPrimaryWalletOrConnectorError = InvalidPrimaryWalletOrConnectorError;
@@ -0,0 +1,5 @@
1
+ import { DynamicError } from './DynamicError';
2
+ import { ErrorCode } from './ErrorCode';
3
+ export declare class InvalidPrimaryWalletOrConnectorError extends DynamicError {
4
+ constructor(code?: ErrorCode | string);
5
+ }
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+ import { DynamicError } from './DynamicError.js';
3
+
4
+ class InvalidPrimaryWalletOrConnectorError extends DynamicError {
5
+ constructor(code) {
6
+ super('Primary wallet is not properly set or the wallet connector is missing from DynamicContextProvider settings.', code);
7
+ }
8
+ }
9
+
10
+ export { InvalidPrimaryWalletOrConnectorError };
@@ -17,6 +17,7 @@ export * from './GetAddressCancelledError';
17
17
  export * from './InsufficientFundsError';
18
18
  export * from './InvalidEmbeddedWalletSessionKeyError';
19
19
  export * from './InvalidPhoneNumberError';
20
+ export * from './InvalidPrimaryWalletOrConnectorError';
20
21
  export * from './MergeAccountsConfirmationError';
21
22
  export * from './MetaMaskError';
22
23
  export * from './MissingEnvironmentIdError';
package/src/index.cjs CHANGED
@@ -29,6 +29,7 @@ var GetAddressCancelledError = require('./errors/GetAddressCancelledError.cjs');
29
29
  var InsufficientFundsError = require('./errors/InsufficientFundsError.cjs');
30
30
  var InvalidEmbeddedWalletSessionKeyError = require('./errors/InvalidEmbeddedWalletSessionKeyError.cjs');
31
31
  var InvalidPhoneNumberError = require('./errors/InvalidPhoneNumberError.cjs');
32
+ var InvalidPrimaryWalletOrConnectorError = require('./errors/InvalidPrimaryWalletOrConnectorError.cjs');
32
33
  var MergeAccountsConfirmationError = require('./errors/MergeAccountsConfirmationError.cjs');
33
34
  var MetaMaskError = require('./errors/MetaMaskError.cjs');
34
35
  var MissingEnvironmentIdError = require('./errors/MissingEnvironmentIdError.cjs');
@@ -138,6 +139,7 @@ exports.GetAddressCancelledError = GetAddressCancelledError.GetAddressCancelledE
138
139
  exports.InsufficientFundsError = InsufficientFundsError.InsufficientFundsError;
139
140
  exports.InvalidEmbeddedWalletSessionKeyError = InvalidEmbeddedWalletSessionKeyError.InvalidEmbeddedWalletSessionKeyError;
140
141
  exports.InvalidPhoneNumberError = InvalidPhoneNumberError.InvalidPhoneNumberError;
142
+ exports.InvalidPrimaryWalletOrConnectorError = InvalidPrimaryWalletOrConnectorError.InvalidPrimaryWalletOrConnectorError;
141
143
  exports.MergeAccountsConfirmationError = MergeAccountsConfirmationError.MergeAccountsConfirmationError;
142
144
  exports.MetaMaskError = MetaMaskError.MetaMaskError;
143
145
  exports.metaMaskErrorMap = MetaMaskError.metaMaskErrorMap;
package/src/index.js CHANGED
@@ -25,6 +25,7 @@ export { GetAddressCancelledError } from './errors/GetAddressCancelledError.js';
25
25
  export { InsufficientFundsError } from './errors/InsufficientFundsError.js';
26
26
  export { InvalidEmbeddedWalletSessionKeyError } from './errors/InvalidEmbeddedWalletSessionKeyError.js';
27
27
  export { InvalidPhoneNumberError } from './errors/InvalidPhoneNumberError.js';
28
+ export { InvalidPrimaryWalletOrConnectorError } from './errors/InvalidPrimaryWalletOrConnectorError.js';
28
29
  export { MergeAccountsConfirmationError } from './errors/MergeAccountsConfirmationError.js';
29
30
  export { MetaMaskError, metaMaskErrorMap } from './errors/MetaMaskError.js';
30
31
  export { MissingEnvironmentIdError } from './errors/MissingEnvironmentIdError.js';
@@ -4,6 +4,8 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var EventEmitter = require('eventemitter3');
7
+ var logger = require('../../logger/logger.cjs');
8
+ var createStorageService = require('./createStorageService/createStorageService.cjs');
7
9
 
8
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
11
 
@@ -31,6 +33,18 @@ class StorageService {
31
33
  return storage;
32
34
  }
33
35
  }
36
+ /**
37
+ * Temporary fallback until we ensure that one instance of the utils package is
38
+ * installed
39
+ *
40
+ * thread https://dynamiclabsgroup.slack.com/archives/C03HMTUCXRR/p1752662470299459
41
+ */
42
+ if (priority.includes('localStorage')) {
43
+ logger.logger.info('No available storage found based on the specified priority, default to localStorage');
44
+ return createStorageService.createStorageService({
45
+ storage: localStorage,
46
+ });
47
+ }
34
48
  throw new Error('No available storage found based on the specified priority');
35
49
  }
36
50
  static getItem(key, options) {
@@ -1,5 +1,7 @@
1
1
  'use client'
2
2
  import EventEmitter from 'eventemitter3';
3
+ import { logger } from '../../logger/logger.js';
4
+ import { createStorageService } from './createStorageService/createStorageService.js';
3
5
 
4
6
  class StorageService {
5
7
  static clearRegistry() {
@@ -23,6 +25,18 @@ class StorageService {
23
25
  return storage;
24
26
  }
25
27
  }
28
+ /**
29
+ * Temporary fallback until we ensure that one instance of the utils package is
30
+ * installed
31
+ *
32
+ * thread https://dynamiclabsgroup.slack.com/archives/C03HMTUCXRR/p1752662470299459
33
+ */
34
+ if (priority.includes('localStorage')) {
35
+ logger.info('No available storage found based on the specified priority, default to localStorage');
36
+ return createStorageService({
37
+ storage: localStorage,
38
+ });
39
+ }
26
40
  throw new Error('No available storage found based on the specified priority');
27
41
  }
28
42
  static getItem(key, options) {