@dynamic-labs/utils 4.10.2 → 4.10.4-preview.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,19 @@
1
1
 
2
+ ### [4.10.4-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.10.3...v4.10.4-preview.0) (2025-04-04)
3
+
4
+
5
+ ### Features
6
+
7
+ * add zk sync aa connector ([9835145](https://github.com/dynamic-labs/dynamic-auth/commit/9835145987a859bf2da894bf49521afce66bf9f1))
8
+
9
+ ### [4.10.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.10.2...v4.10.3) (2025-04-04)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * dark mode vars ([#8456](https://github.com/dynamic-labs/dynamic-auth/issues/8456)) ([26c8a28](https://github.com/dynamic-labs/dynamic-auth/commit/26c8a289d151b79c73726ddf00048d83ff8d5098))
15
+ * onramp options override ([#8335](https://github.com/dynamic-labs/dynamic-auth/issues/8335)) ([731af19](https://github.com/dynamic-labs/dynamic-auth/commit/731af199df5c7743be8d7502dd7c6155a7d68128))
16
+
2
17
  ### [4.10.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.10.1...v4.10.2) (2025-04-02)
3
18
 
4
19
 
@@ -7,7 +22,6 @@
7
22
  * add walletTabSelected event ([#8430](https://github.com/dynamic-labs/dynamic-auth/issues/8430)) ([01ef815](https://github.com/dynamic-labs/dynamic-auth/commit/01ef815330e6c5433f7c135f561ed86621cc2bd9))
8
23
 
9
24
 
10
- ### Bug Fixes
11
25
 
12
26
  * disconect wallets on logout ([#8399](https://github.com/dynamic-labs/dynamic-auth/issues/8399)) ([148bc0d](https://github.com/dynamic-labs/dynamic-auth/commit/148bc0dd175048fa8a9a675383e8e6d93c7d16ac))
13
27
  * ensure primary wallet is still a valid credential when calling resfreshUser ([#8439](https://github.com/dynamic-labs/dynamic-auth/issues/8439)) ([2e567e5](https://github.com/dynamic-labs/dynamic-auth/commit/2e567e53ea7738d4a42f3d54bb40a294403a1c36))
@@ -23,9 +37,6 @@
23
37
  * Sui Support for branded wallets
24
38
  * better handling of non-multiasset balance fetching ([#8419](https://github.com/dynamic-labs/dynamic-auth/issues/8419)) ([574d4ea](https://github.com/dynamic-labs/dynamic-auth/commit/574d4eabf85e6f85325dc374b6cd84aa9fdd7ed4))
25
39
 
26
-
27
- ### Bug Fixes
28
-
29
40
  * do not prompt passkey with 7702 on v2 wallets ([#8391](https://github.com/dynamic-labs/dynamic-auth/issues/8391)) ([bb91396](https://github.com/dynamic-labs/dynamic-auth/commit/bb913965121e97801922f5ca828d11e4a551a3b6))
30
41
  * ensure the global wallet app url is used ([#8404](https://github.com/dynamic-labs/dynamic-auth/issues/8404)) ([23a7d91](https://github.com/dynamic-labs/dynamic-auth/commit/23a7d91b50cc85e67de52306f91163c675e0f007))
31
42
  * **global-wallet-client:** use global wallet env id when storing data to ls ([#8405](https://github.com/dynamic-labs/dynamic-auth/issues/8405)) ([2b3d9ce](https://github.com/dynamic-labs/dynamic-auth/commit/2b3d9ce8dd82dda487759e0621c73bfad2842aef))
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.10.2";
6
+ var version = "4.10.4-preview.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.10.2";
2
+ var version = "4.10.4-preview.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.10.2",
3
+ "version": "4.10.4-preview.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.650",
21
+ "@dynamic-labs/sdk-api-core": "0.0.656",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.10.2",
24
- "@dynamic-labs/logger": "4.10.2",
25
- "@dynamic-labs/types": "4.10.2",
23
+ "@dynamic-labs/assert-package-version": "4.10.4-preview.0",
24
+ "@dynamic-labs/logger": "4.10.4-preview.0",
25
+ "@dynamic-labs/types": "4.10.4-preview.0",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -0,0 +1,41 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _tslib = require('../../_virtual/_tslib.cjs');
7
+ var CustomError = require('./CustomError.cjs');
8
+
9
+ class ResponseError extends CustomError.CustomError {
10
+ constructor({ message, cause, jsonData }) {
11
+ const messageError = `
12
+ Message: ${message !== null && message !== void 0 ? message : 'Unknown'}
13
+ URL: ${cause.url}
14
+ Status: ${cause.status}
15
+ Status Text: ${cause.statusText}
16
+ Type: ${cause.type}
17
+ Redirect: ${cause.redirected}
18
+
19
+ Json data:${jsonData ? '\n' + JSON.stringify(jsonData, null, 2) : ' No data'}
20
+ `.trim();
21
+ super(messageError);
22
+ this.jsonData = jsonData;
23
+ this.response = cause;
24
+ this.cause = cause;
25
+ }
26
+ get json() {
27
+ return this.jsonData;
28
+ }
29
+ static fromResponse(_a) {
30
+ return _tslib.__awaiter(this, arguments, void 0, function* ({ cause, message, }) {
31
+ const jsonData = yield cause.json();
32
+ return new ResponseError({
33
+ cause,
34
+ jsonData,
35
+ message,
36
+ });
37
+ });
38
+ }
39
+ }
40
+
41
+ exports.ResponseError = ResponseError;
@@ -0,0 +1,15 @@
1
+ import { CustomError } from './CustomError';
2
+ type ResponseErrorProps = {
3
+ message?: string;
4
+ cause: Response;
5
+ jsonData?: unknown;
6
+ };
7
+ export declare class ResponseError<T> extends CustomError {
8
+ jsonData: unknown;
9
+ response: Response;
10
+ cause: Response;
11
+ constructor({ message, cause, jsonData }: ResponseErrorProps);
12
+ get json(): Partial<T>;
13
+ static fromResponse<T>({ cause, message, }: Omit<ResponseErrorProps, 'jsonData'>): Promise<ResponseError<T>>;
14
+ }
15
+ export {};
@@ -0,0 +1,37 @@
1
+ 'use client'
2
+ import { __awaiter } from '../../_virtual/_tslib.js';
3
+ import { CustomError } from './CustomError.js';
4
+
5
+ class ResponseError extends CustomError {
6
+ constructor({ message, cause, jsonData }) {
7
+ const messageError = `
8
+ Message: ${message !== null && message !== void 0 ? message : 'Unknown'}
9
+ URL: ${cause.url}
10
+ Status: ${cause.status}
11
+ Status Text: ${cause.statusText}
12
+ Type: ${cause.type}
13
+ Redirect: ${cause.redirected}
14
+
15
+ Json data:${jsonData ? '\n' + JSON.stringify(jsonData, null, 2) : ' No data'}
16
+ `.trim();
17
+ super(messageError);
18
+ this.jsonData = jsonData;
19
+ this.response = cause;
20
+ this.cause = cause;
21
+ }
22
+ get json() {
23
+ return this.jsonData;
24
+ }
25
+ static fromResponse(_a) {
26
+ return __awaiter(this, arguments, void 0, function* ({ cause, message, }) {
27
+ const jsonData = yield cause.json();
28
+ return new ResponseError({
29
+ cause,
30
+ jsonData,
31
+ message,
32
+ });
33
+ });
34
+ }
35
+ }
36
+
37
+ export { ResponseError };
@@ -41,3 +41,4 @@ export * from './InvalidEmbeddedWalletSessionKeyError';
41
41
  export * from './EmbeddedWalletExistsError';
42
42
  export * from './GetAddressCancelledError';
43
43
  export * from './SeiNotEnabledInKeplrWalletError';
44
+ export * from './ResponseError';
package/src/index.cjs CHANGED
@@ -52,6 +52,7 @@ var InvalidEmbeddedWalletSessionKeyError = require('./errors/InvalidEmbeddedWall
52
52
  var EmbeddedWalletExistsError = require('./errors/EmbeddedWalletExistsError.cjs');
53
53
  var GetAddressCancelledError = require('./errors/GetAddressCancelledError.cjs');
54
54
  var SeiNotEnabledInKeplrWalletError = require('./errors/SeiNotEnabledInKeplrWalletError.cjs');
55
+ var ResponseError = require('./errors/ResponseError.cjs');
55
56
  var eventTimeline = require('./eventTimeline/eventTimeline.cjs');
56
57
  var formatNumberText = require('./formatNumberText/formatNumberText.cjs');
57
58
  var getProvidersFromWindow = require('./getProvidersFromWindow/getProvidersFromWindow.cjs');
@@ -162,6 +163,7 @@ exports.InvalidEmbeddedWalletSessionKeyError = InvalidEmbeddedWalletSessionKeyEr
162
163
  exports.EmbeddedWalletExistsError = EmbeddedWalletExistsError.EmbeddedWalletExistsError;
163
164
  exports.GetAddressCancelledError = GetAddressCancelledError.GetAddressCancelledError;
164
165
  exports.SeiNotEnabledInKeplrWalletError = SeiNotEnabledInKeplrWalletError.SeiNotEnabledInKeplrWalletError;
166
+ exports.ResponseError = ResponseError.ResponseError;
165
167
  exports.createEventTimeline = eventTimeline.createEventTimeline;
166
168
  exports.formatNumberText = formatNumberText.formatNumberText;
167
169
  exports.getProvidersFromWindow = getProvidersFromWindow.getProvidersFromWindow;
package/src/index.js CHANGED
@@ -48,6 +48,7 @@ export { InvalidEmbeddedWalletSessionKeyError } from './errors/InvalidEmbeddedWa
48
48
  export { EmbeddedWalletExistsError } from './errors/EmbeddedWalletExistsError.js';
49
49
  export { GetAddressCancelledError } from './errors/GetAddressCancelledError.js';
50
50
  export { SeiNotEnabledInKeplrWalletError } from './errors/SeiNotEnabledInKeplrWalletError.js';
51
+ export { ResponseError } from './errors/ResponseError.js';
51
52
  export { createEventTimeline } from './eventTimeline/eventTimeline.js';
52
53
  export { formatNumberText } from './formatNumberText/formatNumberText.js';
53
54
  export { getProvidersFromWindow } from './getProvidersFromWindow/getProvidersFromWindow.js';