@dynamic-labs/utils 2.1.2-alpha.0 → 2.1.2
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.json +3 -3
- package/src/get/get.cjs +24 -0
- package/src/get/get.d.ts +7 -0
- package/src/get/get.js +20 -0
- package/src/get/index.d.ts +1 -0
- package/src/index.cjs +2 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.1.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2-alpha.1...v2.1.2) (2024-06-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* hide wallets from wallet list that can't have multiple accounts linked ([#5935](https://github.com/dynamic-labs/DynamicAuth/issues/5935)) ([20f9b15](https://github.com/dynamic-labs/DynamicAuth/commit/20f9b15b145cbc57519155691b3640149eec3689))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* ensure sign message will not show 2 times ([#5938](https://github.com/dynamic-labs/DynamicAuth/issues/5938)) ([#5941](https://github.com/dynamic-labs/DynamicAuth/issues/5941)) ([2c5a156](https://github.com/dynamic-labs/DynamicAuth/commit/2c5a156ead565bd25067b3bc2b23cbc704f9b314))
|
|
13
|
+
* improve logic related to embedded wallets and emailVerifcation ([#5947](https://github.com/dynamic-labs/DynamicAuth/issues/5947)) ([b885a14](https://github.com/dynamic-labs/DynamicAuth/commit/b885a14dcf200f05233e4ab42b8b518d877d291a))
|
|
14
|
+
* init coinbase provider adhoc ([#5907](https://github.com/dynamic-labs/DynamicAuth/issues/5907)) ([#5933](https://github.com/dynamic-labs/DynamicAuth/issues/5933)) ([2fa1f52](https://github.com/dynamic-labs/DynamicAuth/commit/2fa1f528b27113ee108252ee874ee7f5ead88329))
|
|
15
|
+
* remove force consent and account selection even for returning google users ([#5912](https://github.com/dynamic-labs/DynamicAuth/issues/5912)) ([26a07f2](https://github.com/dynamic-labs/DynamicAuth/commit/26a07f29bdb8bf32a080396906a21d8b084c202f))
|
|
16
|
+
* resolve the default phone country based on enabled countries ([#5](https://github.com/dynamic-labs/DynamicAuth/issues/5)… ([#5916](https://github.com/dynamic-labs/DynamicAuth/issues/5916)) ([8f27c00](https://github.com/dynamic-labs/DynamicAuth/commit/8f27c0082edb77b964b8402cfa75c6a896b061d3)), closes [#5910](https://github.com/dynamic-labs/DynamicAuth/issues/5910)
|
|
17
|
+
* versioned tx needs address lookup table ([#5909](https://github.com/dynamic-labs/DynamicAuth/issues/5909)) ([#5919](https://github.com/dynamic-labs/DynamicAuth/issues/5919)) ([22e3ca2](https://github.com/dynamic-labs/DynamicAuth/commit/22e3ca2d0b27d15efb50e3092a7bc3a0c0d255a5))
|
|
18
|
+
|
|
19
|
+
### [2.1.2-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2-alpha.0...v2.1.2-alpha.1) (2024-06-07)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* find phantom solana provider when opening dapp on new tab ([#5902](https://github.com/dynamic-labs/DynamicAuth/issues/5902)) ([99daf87](https://github.com/dynamic-labs/DynamicAuth/commit/99daf87f17caed870a76e4f89a257a14da37c7ab)), closes [#5895](https://github.com/dynamic-labs/DynamicAuth/issues/5895) [#5896](https://github.com/dynamic-labs/DynamicAuth/issues/5896) [#5897](https://github.com/dynamic-labs/DynamicAuth/issues/5897)
|
|
25
|
+
|
|
2
26
|
### [2.1.2-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.1...v2.1.2-alpha.0) (2024-06-07)
|
|
3
27
|
|
|
4
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "2.1.2
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@dynamic-labs/sdk-api-core": "0.0.460",
|
|
30
30
|
"tldts": "6.0.16",
|
|
31
|
-
"@dynamic-labs/logger": "2.1.2
|
|
32
|
-
"@dynamic-labs/types": "2.1.2
|
|
31
|
+
"@dynamic-labs/logger": "2.1.2",
|
|
32
|
+
"@dynamic-labs/types": "2.1.2",
|
|
33
33
|
"buffer": "6.0.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
package/src/get/get.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the value at the given path of an object.
|
|
8
|
+
* @param obj - The object from which to extract the value.
|
|
9
|
+
* @param path - The path to the desired value within the object, using dot notation.
|
|
10
|
+
* @returns The value from the specified path, or undefined if the path is not valid.
|
|
11
|
+
*/
|
|
12
|
+
const get = (obj, path) => {
|
|
13
|
+
try {
|
|
14
|
+
// Split the path into keys considering special characters as part of the keys
|
|
15
|
+
const keys = path.match(/[^.[\]"']+/g) || [];
|
|
16
|
+
return keys.reduce((acc, key) => acc[key], obj);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
// If there is an error accessing the properties, return undefined
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.get = get;
|
package/src/get/get.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the value at the given path of an object.
|
|
3
|
+
* @param obj - The object from which to extract the value.
|
|
4
|
+
* @param path - The path to the desired value within the object, using dot notation.
|
|
5
|
+
* @returns The value from the specified path, or undefined if the path is not valid.
|
|
6
|
+
*/
|
|
7
|
+
export declare const get: <T = any>(obj: Record<string, any>, path: string) => T | undefined;
|
package/src/get/get.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the value at the given path of an object.
|
|
4
|
+
* @param obj - The object from which to extract the value.
|
|
5
|
+
* @param path - The path to the desired value within the object, using dot notation.
|
|
6
|
+
* @returns The value from the specified path, or undefined if the path is not valid.
|
|
7
|
+
*/
|
|
8
|
+
const get = (obj, path) => {
|
|
9
|
+
try {
|
|
10
|
+
// Split the path into keys considering special characters as part of the keys
|
|
11
|
+
const keys = path.match(/[^.[\]"']+/g) || [];
|
|
12
|
+
return keys.reduce((acc, key) => acc[key], obj);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
// If there is an error accessing the properties, return undefined
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { get };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { get } from './get';
|
package/src/index.cjs
CHANGED
|
@@ -60,6 +60,7 @@ var PlatformService = require('./services/PlatformService/PlatformService.cjs');
|
|
|
60
60
|
var createBrowserPlatformService = require('./services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.cjs');
|
|
61
61
|
var FetchService = require('./services/FetchService/FetchService.cjs');
|
|
62
62
|
var template = require('./template/template.cjs');
|
|
63
|
+
var get = require('./get/get.cjs');
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
|
|
@@ -134,3 +135,4 @@ exports.PlatformService = PlatformService.PlatformService;
|
|
|
134
135
|
exports.createBrowserPlatformService = createBrowserPlatformService.createBrowserPlatformService;
|
|
135
136
|
exports.FetchService = FetchService.FetchService;
|
|
136
137
|
exports.template = template.template;
|
|
138
|
+
exports.get = get.get;
|
package/src/index.d.ts
CHANGED
|
@@ -25,3 +25,4 @@ export { runSafe } from './runSafe';
|
|
|
25
25
|
export { PlatformService, createBrowserPlatformService, type IPlatformService, } from './services/PlatformService';
|
|
26
26
|
export { FetchService } from './services/FetchService';
|
|
27
27
|
export { template } from './template';
|
|
28
|
+
export { get } from './get';
|
package/src/index.js
CHANGED
|
@@ -56,3 +56,4 @@ export { PlatformService } from './services/PlatformService/PlatformService.js';
|
|
|
56
56
|
export { createBrowserPlatformService } from './services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.js';
|
|
57
57
|
export { FetchService } from './services/FetchService/FetchService.js';
|
|
58
58
|
export { template } from './template/template.js';
|
|
59
|
+
export { get } from './get/get.js';
|