@dynamic-labs/utils 4.19.7 → 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 +24 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +4 -4
- package/src/services/PlatformService/PlatformService.cjs +2 -2
- package/src/services/PlatformService/PlatformService.d.ts +1 -1
- package/src/services/PlatformService/PlatformService.js +2 -2
- package/src/services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.cjs +2 -2
- package/src/services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.js +2 -2
- package/src/services/PlatformService/types.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
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
|
+
|
|
14
|
+
## [4.20.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.7...v4.20.0) (2025-06-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* encapsulate waas connectors within main connectors ([#8878](https://github.com/dynamic-labs/dynamic-auth/issues/8878)) ([fd1b6ab](https://github.com/dynamic-labs/dynamic-auth/commit/fd1b6ab037ff7ce5c66b30d9611689e8cc03b97b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* hide duplicate social connection logo on global wallets ([#8903](https://github.com/dynamic-labs/dynamic-auth/issues/8903)) ([c2f86e7](https://github.com/dynamic-labs/dynamic-auth/commit/c2f86e7aae91764b174abaa18439ffbdf7287475))
|
|
25
|
+
|
|
2
26
|
### [4.19.7](https://github.com/dynamic-labs/dynamic-auth/compare/v4.19.6...v4.19.7) (2025-06-06)
|
|
3
27
|
|
|
4
28
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "4.
|
|
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.
|
|
24
|
-
"@dynamic-labs/logger": "4.
|
|
25
|
-
"@dynamic-labs/types": "4.
|
|
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
|
|
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
|
|
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
|
|
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.
|
package/src/services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.cjs
CHANGED
|
@@ -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;
|
package/src/services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.js
CHANGED
|
@@ -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;
|