@dynamic-labs/utils 3.0.0-alpha.66 → 3.0.0-alpha.68

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,29 @@
1
1
 
2
+ ## [3.0.0-alpha.68](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.67...v3.0.0-alpha.68) (2024-09-12)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * combine signing inputs for new signTransaction method in bitcoin sats connector by address ([#6882](https://github.com/dynamic-labs/DynamicAuth/issues/6882)) ([dd78923](https://github.com/dynamic-labs/DynamicAuth/commit/dd78923e84042dbd23977c595467a6d587b729fb))
8
+ * log message during v1 embedded wallet email recovery ([#6877](https://github.com/dynamic-labs/DynamicAuth/issues/6877)) ([92fd70e](https://github.com/dynamic-labs/DynamicAuth/commit/92fd70e8d685edf334cb60c61b6411441fbfe54d))
9
+ * return correct chain format for smart wallets ([#6878](https://github.com/dynamic-labs/DynamicAuth/issues/6878)) ([e26544a](https://github.com/dynamic-labs/DynamicAuth/commit/e26544ad39277fcd5e94cf70cd871f7111f7a3c2))
10
+
11
+ ## [3.0.0-alpha.67](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.66...v3.0.0-alpha.67) (2024-09-12)
12
+
13
+
14
+ ### Features
15
+
16
+ * add blockaid url scanning to sdk api ([#6869](https://github.com/dynamic-labs/DynamicAuth/issues/6869)) ([0a20eef](https://github.com/dynamic-labs/DynamicAuth/commit/0a20eef2eec8793a714f67948ddba2bc1bab06cd))
17
+ * allow selecting which MetaMask account to connect with on sign-in ([#6838](https://github.com/dynamic-labs/DynamicAuth/issues/6838)) ([8a30614](https://github.com/dynamic-labs/DynamicAuth/commit/8a306140563390602a417fd191bc789d6e07c220))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * cach get server snashot to avoid next js rerender loop ([#6867](https://github.com/dynamic-labs/DynamicAuth/issues/6867)) ([6f77c01](https://github.com/dynamic-labs/DynamicAuth/commit/6f77c01663641ab870a8b96fb2d3b5611bc38c2c))
23
+ * clean up console errors on log out ([#6834](https://github.com/dynamic-labs/DynamicAuth/issues/6834)) ([a18a4ce](https://github.com/dynamic-labs/DynamicAuth/commit/a18a4ce57766dec0cc351794ff7a71b3c632d9a3))
24
+ * ensure open url method will be available in the webview controller ([#6852](https://github.com/dynamic-labs/DynamicAuth/issues/6852)) ([bdaf12f](https://github.com/dynamic-labs/DynamicAuth/commit/bdaf12f7a77b801c3dec67163e1fef2fdffc7d2a))
25
+ * solana transaction decoder fallback ([#6868](https://github.com/dynamic-labs/DynamicAuth/issues/6868)) ([38c9242](https://github.com/dynamic-labs/DynamicAuth/commit/38c924253c29e8e3569d9da9bc452a8cdc3af0d2))
26
+
2
27
  ## [3.0.0-alpha.66](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.65...v3.0.0-alpha.66) (2024-09-11)
3
28
 
4
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "3.0.0-alpha.66",
3
+ "version": "3.0.0-alpha.68",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -26,10 +26,10 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api-core": "0.0.526",
29
+ "@dynamic-labs/sdk-api-core": "0.0.529",
30
30
  "tldts": "6.0.16",
31
- "@dynamic-labs/logger": "3.0.0-alpha.66",
32
- "@dynamic-labs/types": "3.0.0-alpha.66",
31
+ "@dynamic-labs/logger": "3.0.0-alpha.68",
32
+ "@dynamic-labs/types": "3.0.0-alpha.68",
33
33
  "buffer": "6.0.3",
34
34
  "eventemitter3": "5.0.1",
35
35
  "stream": "0.0.2"
@@ -32,6 +32,14 @@ class PlatformService {
32
32
  static get getOrigin() {
33
33
  return _a.implementation.getOrigin;
34
34
  }
35
+ /**
36
+ * Gets the origin to be displayed in the UI.
37
+ *
38
+ * @example window.location.origin
39
+ */
40
+ static get getDisplayOrigin() {
41
+ return _a.implementation.getDisplayOrigin;
42
+ }
35
43
  /**
36
44
  * Gets the host of the current location.
37
45
  *
@@ -14,6 +14,12 @@ export declare class PlatformService {
14
14
  * @example window.location.origin
15
15
  */
16
16
  static get getOrigin(): () => string;
17
+ /**
18
+ * Gets the origin to be displayed in the UI.
19
+ *
20
+ * @example window.location.origin
21
+ */
22
+ static get getDisplayOrigin(): () => string | undefined;
17
23
  /**
18
24
  * Gets the host of the current location.
19
25
  *
@@ -28,6 +28,14 @@ class PlatformService {
28
28
  static get getOrigin() {
29
29
  return _a.implementation.getOrigin;
30
30
  }
31
+ /**
32
+ * Gets the origin to be displayed in the UI.
33
+ *
34
+ * @example window.location.origin
35
+ */
36
+ static get getDisplayOrigin() {
37
+ return _a.implementation.getDisplayOrigin;
38
+ }
31
39
  /**
32
40
  * Gets the host of the current location.
33
41
  *
@@ -7,6 +7,7 @@ var _tslib = require('../../../../_virtual/_tslib.cjs');
7
7
  var tldts = require('tldts');
8
8
 
9
9
  const createBrowserPlatformService = (window) => ({
10
+ getDisplayOrigin: () => window.location.origin,
10
11
  getHost: () => window.location.host,
11
12
  getHostname: () => window.location.hostname,
12
13
  getOrigin: () => window.location.origin,
@@ -3,6 +3,7 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
3
3
  import { parse } from 'tldts';
4
4
 
5
5
  const createBrowserPlatformService = (window) => ({
6
+ getDisplayOrigin: () => window.location.origin,
6
7
  getHost: () => window.location.host,
7
8
  getHostname: () => window.location.hostname,
8
9
  getOrigin: () => window.location.origin,
@@ -22,6 +22,12 @@ export interface IPlatformService {
22
22
  * @example window.location.origin
23
23
  */
24
24
  getOrigin(): string;
25
+ /**
26
+ * Gets the origin to be displayed in the UI.
27
+ *
28
+ * @example window.location.origin
29
+ */
30
+ getDisplayOrigin(): string | undefined;
25
31
  getTLD(): string | undefined;
26
32
  /**
27
33
  * Opens a URL. If possible, should avoid new windows.
@@ -6,8 +6,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var logger = require('../../../logger/logger.cjs');
7
7
  var StorageService = require('../StorageService.cjs');
8
8
 
9
- const createStorageService = ({ prefix, storage, }) => {
10
- const getKey = (key) => (prefix ? `${key}_${prefix}` : key);
9
+ const createStorageService = ({ postfix, storage, }) => {
10
+ const getKey = (key) => (postfix ? `${key}_${postfix}` : key);
11
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
12
  const packValue = (value) => JSON.stringify(value);
13
13
  const unpackValue = (value) => JSON.parse(value);
@@ -1,7 +1,7 @@
1
1
  import { IStorageService } from '../types';
2
2
  type CreateStorageServiceProps = {
3
- prefix?: string;
3
+ postfix?: string;
4
4
  storage: Storage;
5
5
  };
6
- export declare const createStorageService: ({ prefix, storage, }: CreateStorageServiceProps) => IStorageService;
6
+ export declare const createStorageService: ({ postfix, storage, }: CreateStorageServiceProps) => IStorageService;
7
7
  export {};
@@ -2,8 +2,8 @@
2
2
  import { logger } from '../../../logger/logger.js';
3
3
  import { StorageService } from '../StorageService.js';
4
4
 
5
- const createStorageService = ({ prefix, storage, }) => {
6
- const getKey = (key) => (prefix ? `${key}_${prefix}` : key);
5
+ const createStorageService = ({ postfix, storage, }) => {
6
+ const getKey = (key) => (postfix ? `${key}_${postfix}` : key);
7
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
8
  const packValue = (value) => JSON.stringify(value);
9
9
  const unpackValue = (value) => JSON.parse(value);