@dynamic-labs/utils 4.9.2-preview.0 → 4.9.3

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,5 +1,32 @@
1
1
 
2
- ### [4.9.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2-preview.0) (2025-03-11)
2
+ ### [4.9.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.2...v4.9.3) (2025-03-14)
3
+
4
+
5
+ ### Features
6
+
7
+ * allow adding extra text to ToS and PP footer using custom css ([#8290](https://github.com/dynamic-labs/dynamic-auth/issues/8290)) ([0f6eb26](https://github.com/dynamic-labs/dynamic-auth/commit/0f6eb2666ea93a32360710ba5ac14eac53e07e2d))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * log out if there is a mismatch in user and wallet state ([#8300](https://github.com/dynamic-labs/dynamic-auth/issues/8300)) ([82ec2ad](https://github.com/dynamic-labs/dynamic-auth/commit/82ec2add1682a576d00dfe13aa1b9cccecf96688))
13
+ * sol sponsored tx for v3 ([#8288](https://github.com/dynamic-labs/dynamic-auth/issues/8288)) ([c466fba](https://github.com/dynamic-labs/dynamic-auth/commit/c466fba417d39641631e29104ec9c156dfdf7647))
14
+ * v3 existing wallet could not log in again ([#8282](https://github.com/dynamic-labs/dynamic-auth/issues/8282)) ([c2d68ad](https://github.com/dynamic-labs/dynamic-auth/commit/c2d68adf575fcce371e438076184ef590f346c9f))
15
+
16
+ ### [4.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2) (2025-03-12)
17
+
18
+
19
+ ### Features
20
+
21
+ * **QNTM-2951:** update sdk styles ([#8214](https://github.com/dynamic-labs/dynamic-auth/issues/8214)) ([45cefa8](https://github.com/dynamic-labs/dynamic-auth/commit/45cefa82bdaad769c63ffeab4fb48f88ac855461))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * embedded widget race condition that would show both embedded and non-embedded widgets at the same time ([#8208](https://github.com/dynamic-labs/dynamic-auth/issues/8208)) ([031fb77](https://github.com/dynamic-labs/dynamic-auth/commit/031fb775c10daa383bf56ab7ba5fa4cf6ae9451c))
27
+ * **iframe-setup:** require the initial parent url when using an iframe ([#8268](https://github.com/dynamic-labs/dynamic-auth/issues/8268)) ([258e8a1](https://github.com/dynamic-labs/dynamic-auth/commit/258e8a128c31b8695518f9943bc74de9fce63196))
28
+ * improve WalletConnect experience ([#8201](https://github.com/dynamic-labs/dynamic-auth/issues/8201)) ([a09b16d](https://github.com/dynamic-labs/dynamic-auth/commit/a09b16de2ccd3cbba89f70a8ded4b7656f09f807)), closes [#8202](https://github.com/dynamic-labs/dynamic-auth/issues/8202) [#8207](https://github.com/dynamic-labs/dynamic-auth/issues/8207)
29
+ * prevent closing modal when mfa view is required ([#8156](https://github.com/dynamic-labs/dynamic-auth/issues/8156)) ([c34b245](https://github.com/dynamic-labs/dynamic-auth/commit/c34b24509e3f96046e72150b055d9c820f98706f))
3
30
 
4
31
  ### [4.9.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.0...v4.9.1) (2025-03-11)
5
32
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.9.2-preview.0";
6
+ var version = "4.9.3";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.9.2-preview.0";
2
+ var version = "4.9.3";
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.9.2-preview.0",
3
+ "version": "4.9.3",
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.638",
21
+ "@dynamic-labs/sdk-api-core": "0.0.642",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.9.2-preview.0",
24
- "@dynamic-labs/logger": "4.9.2-preview.0",
25
- "@dynamic-labs/types": "4.9.2-preview.0",
23
+ "@dynamic-labs/assert-package-version": "4.9.3",
24
+ "@dynamic-labs/logger": "4.9.3",
25
+ "@dynamic-labs/types": "4.9.3",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -21,4 +21,5 @@ exports.ErrorCode = void 0;
21
21
  ErrorCode[ErrorCode["ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_PROFILE"] = 7] = "ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_PROFILE";
22
22
  ErrorCode[ErrorCode["CONNECTION_REJECTED"] = 8] = "CONNECTION_REJECTED";
23
23
  ErrorCode[ErrorCode["MISSING_PUBLIC_ADDRESS"] = 9] = "MISSING_PUBLIC_ADDRESS";
24
+ ErrorCode[ErrorCode["CONNECTION_PROPOSAL_EXPIRED"] = 10] = "CONNECTION_PROPOSAL_EXPIRED";
24
25
  })(exports.ErrorCode || (exports.ErrorCode = {}));
@@ -14,5 +14,6 @@ export declare enum ErrorCode {
14
14
  INTERNAL_ERROR = 6,
15
15
  ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_PROFILE = 7,
16
16
  CONNECTION_REJECTED = 8,
17
- MISSING_PUBLIC_ADDRESS = 9
17
+ MISSING_PUBLIC_ADDRESS = 9,
18
+ CONNECTION_PROPOSAL_EXPIRED = 10
18
19
  }
@@ -17,6 +17,7 @@ var ErrorCode;
17
17
  ErrorCode[ErrorCode["ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_PROFILE"] = 7] = "ACCOUNT_ALREADY_LINKED_TO_DIFFERENT_PROFILE";
18
18
  ErrorCode[ErrorCode["CONNECTION_REJECTED"] = 8] = "CONNECTION_REJECTED";
19
19
  ErrorCode[ErrorCode["MISSING_PUBLIC_ADDRESS"] = 9] = "MISSING_PUBLIC_ADDRESS";
20
+ ErrorCode[ErrorCode["CONNECTION_PROPOSAL_EXPIRED"] = 10] = "CONNECTION_PROPOSAL_EXPIRED";
20
21
  })(ErrorCode || (ErrorCode = {}));
21
22
 
22
23
  export { ErrorCode };
@@ -8,6 +8,8 @@ var getInitialParentURL = require('./utils/getInitialParentURL/getInitialParentU
8
8
  var setupPlatformEventsService = require('./utils/setupPlatformEventsService/setupPlatformEventsService.cjs');
9
9
 
10
10
  const setupInsideIframe = () => {
11
+ if (typeof window === 'undefined')
12
+ return;
11
13
  // Get the initial parent URL
12
14
  const initialParentURL = getInitialParentURL.getInitialParentURL();
13
15
  // Setup services
@@ -4,6 +4,8 @@ import { getInitialParentURL } from './utils/getInitialParentURL/getInitialParen
4
4
  import { setupPlatformEventsService } from './utils/setupPlatformEventsService/setupPlatformEventsService.js';
5
5
 
6
6
  const setupInsideIframe = () => {
7
+ if (typeof window === 'undefined')
8
+ return;
7
9
  // Get the initial parent URL
8
10
  const initialParentURL = getInitialParentURL();
9
11
  // Setup services
@@ -3,10 +3,27 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
+ const missingParentURLMessage = `Parent URL is required
7
+
8
+ You must pass the parent URL to the iframe using the following query parameter:
9
+
10
+ ?initial-parent-url=<encoded-parent-url>
11
+
12
+ Example:
13
+
14
+ const iframeUrl = new URL('https://my-iframe.com');
15
+
16
+ iframeUrl.searchParams.set('initial-parent-url', window.location.href);
17
+
18
+ <iframe src="\${iframeUrl.toString()}"></iframe>
19
+
20
+ For more information, see the documentation:
21
+ https://npmjs.com/package/@dynamic-labs/iframe-setup
22
+ `;
6
23
  const getInitialParentURL = () => {
7
24
  const initialParentURL = new URLSearchParams(window.location.search).get('initial-parent-url');
8
25
  if (!initialParentURL) {
9
- throw new Error('Parent URL is required');
26
+ throw new Error(missingParentURLMessage);
10
27
  }
11
28
  return new URL(decodeURIComponent(initialParentURL));
12
29
  };
@@ -1,8 +1,25 @@
1
1
  'use client'
2
+ const missingParentURLMessage = `Parent URL is required
3
+
4
+ You must pass the parent URL to the iframe using the following query parameter:
5
+
6
+ ?initial-parent-url=<encoded-parent-url>
7
+
8
+ Example:
9
+
10
+ const iframeUrl = new URL('https://my-iframe.com');
11
+
12
+ iframeUrl.searchParams.set('initial-parent-url', window.location.href);
13
+
14
+ <iframe src="\${iframeUrl.toString()}"></iframe>
15
+
16
+ For more information, see the documentation:
17
+ https://npmjs.com/package/@dynamic-labs/iframe-setup
18
+ `;
2
19
  const getInitialParentURL = () => {
3
20
  const initialParentURL = new URLSearchParams(window.location.search).get('initial-parent-url');
4
21
  if (!initialParentURL) {
5
- throw new Error('Parent URL is required');
22
+ throw new Error(missingParentURLMessage);
6
23
  }
7
24
  return new URL(decodeURIComponent(initialParentURL));
8
25
  };