@dynamic-labs/utils 4.20.0 → 4.20.1

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,16 @@
1
1
 
2
+ ### [4.20.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.0...v4.20.1) (2025-06-09)
3
+
4
+
5
+ ### Features
6
+
7
+ * **global-wallet:** new createKernelClient method to native api ([#8883](https://github.com/dynamic-labs/dynamic-auth/issues/8883)) ([005b34c](https://github.com/dynamic-labs/dynamic-auth/commit/005b34c230ceb5e945547e129231c108a6cec444))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * default embedded wallet chain enum ([#8917](https://github.com/dynamic-labs/dynamic-auth/issues/8917)) ([e9fd715](https://github.com/dynamic-labs/dynamic-auth/commit/e9fd715506598bfabbc71454421885d05a06a3ec))
13
+
2
14
  ## [4.20.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.7...v4.20.0) (2025-06-09)
3
15
 
4
16
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.20.0";
6
+ var version = "4.20.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.20.0";
2
+ var version = "4.20.1";
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.20.0",
3
+ "version": "4.20.1",
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",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.681",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.20.0",
24
- "@dynamic-labs/logger": "4.20.0",
25
- "@dynamic-labs/types": "4.20.0",
23
+ "@dynamic-labs/assert-package-version": "4.20.1",
24
+ "@dynamic-labs/logger": "4.20.1",
25
+ "@dynamic-labs/types": "4.20.1",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -64,8 +64,8 @@ class PlatformService {
64
64
  static get getUrl() {
65
65
  return _a.implementation.getUrl;
66
66
  }
67
- static get getTLD() {
68
- return _a.implementation.getTLD;
67
+ static getTLD(domain) {
68
+ return _a.implementation.getTLD(domain);
69
69
  }
70
70
  /**
71
71
  * Opens a URL. If possible, should avoid new windows.
@@ -38,7 +38,7 @@ export declare class PlatformService {
38
38
  * @example new URL(window.location.href)
39
39
  */
40
40
  static get getUrl(): () => URL;
41
- static get getTLD(): () => string | undefined;
41
+ static getTLD(domain?: string): string | undefined;
42
42
  /**
43
43
  * Opens a URL. If possible, should avoid new windows.
44
44
  */
@@ -60,8 +60,8 @@ class PlatformService {
60
60
  static get getUrl() {
61
61
  return _a.implementation.getUrl;
62
62
  }
63
- static get getTLD() {
64
- return _a.implementation.getTLD;
63
+ static getTLD(domain) {
64
+ return _a.implementation.getTLD(domain);
65
65
  }
66
66
  /**
67
67
  * Opens a URL. If possible, should avoid new windows.
@@ -11,14 +11,14 @@ const createBrowserPlatformService = (window) => ({
11
11
  getHost: () => window.location.host,
12
12
  getHostname: () => window.location.hostname,
13
13
  getOrigin: () => window.location.origin,
14
- getTLD: () => {
14
+ getTLD: (domain) => {
15
15
  // Passing the allowPrivateDomains option prevents returning the actual TLD
16
16
  // for domains that have delegated subdomains like herokuapp.com or s3.amazonaws.com
17
17
  // full list is contained here https://publicsuffix.org/list/effective_tld_names.dat
18
18
  // separated by ICANN DOMAINS and PRIVATE DOMAINS
19
19
  // so for instance parse('someapp.herokuapp.com') will return 'someapp.herokuapp.com' as the domain
20
20
  // whereas parse('app.dynamic.xyz') will return 'dynamic.xyz'
21
- const data = tldts.parse(window.location.hostname, {
21
+ const data = tldts.parse(domain || window.location.hostname, {
22
22
  allowPrivateDomains: true,
23
23
  });
24
24
  return data.domain || undefined;
@@ -7,14 +7,14 @@ const createBrowserPlatformService = (window) => ({
7
7
  getHost: () => window.location.host,
8
8
  getHostname: () => window.location.hostname,
9
9
  getOrigin: () => window.location.origin,
10
- getTLD: () => {
10
+ getTLD: (domain) => {
11
11
  // Passing the allowPrivateDomains option prevents returning the actual TLD
12
12
  // for domains that have delegated subdomains like herokuapp.com or s3.amazonaws.com
13
13
  // full list is contained here https://publicsuffix.org/list/effective_tld_names.dat
14
14
  // separated by ICANN DOMAINS and PRIVATE DOMAINS
15
15
  // so for instance parse('someapp.herokuapp.com') will return 'someapp.herokuapp.com' as the domain
16
16
  // whereas parse('app.dynamic.xyz') will return 'dynamic.xyz'
17
- const data = parse(window.location.hostname, {
17
+ const data = parse(domain || window.location.hostname, {
18
18
  allowPrivateDomains: true,
19
19
  });
20
20
  return data.domain || undefined;
@@ -34,7 +34,7 @@ export interface IPlatformService {
34
34
  * @example window.location.origin
35
35
  */
36
36
  getDisplayOrigin(): string | undefined;
37
- getTLD(): string | undefined;
37
+ getTLD(domain?: string): string | undefined;
38
38
  /**
39
39
  * Opens a URL.
40
40
  *