@dynamic-labs/utils 4.18.4 → 4.18.6

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,25 @@
1
1
 
2
+ ### [4.18.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.18.5...v4.18.6) (2025-05-16)
3
+
4
+
5
+ ### Features
6
+
7
+ * remove alert on wallet icon fail errors ([#8719](https://github.com/dynamic-labs/dynamic-auth/issues/8719)) ([3257160](https://github.com/dynamic-labs/dynamic-auth/commit/3257160ec2ce422e76ccf5e5adc10f92e73c3c61))
8
+ * evm export waas ([#8669](https://github.com/dynamic-labs/dynamic-auth/issues/8669)) ([c8f6199](https://github.com/dynamic-labs/dynamic-auth/commit/c8f6199914c5c0791996e0dfad1ac5642c327bea))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * onramps hook ([#8700](https://github.com/dynamic-labs/dynamic-auth/issues/8700)) ([33d0fb5](https://github.com/dynamic-labs/dynamic-auth/commit/33d0fb5e83db627aeea5ce2f07871cd4029c118a))
14
+ * use mainnet as default SVM cluster ([#8721](https://github.com/dynamic-labs/dynamic-auth/issues/8721)) ([5408f9a](https://github.com/dynamic-labs/dynamic-auth/commit/5408f9afbd2b4c6dfaf041c661cc3fb4802b6c05))
15
+
16
+ ### [4.18.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.18.4...v4.18.5) (2025-05-15)
17
+
18
+
19
+ ### Features
20
+
21
+ * add support for external wallet login in global wallet ([#8673](https://github.com/dynamic-labs/dynamic-auth/issues/8673)) ([098b87e](https://github.com/dynamic-labs/dynamic-auth/commit/098b87ea2d588c1808a587fb831b31f47d34c990))
22
+
2
23
  ### [4.18.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.18.3...v4.18.4) (2025-05-15)
3
24
 
4
25
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.18.4";
6
+ var version = "4.18.6";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.18.4";
2
+ var version = "4.18.6";
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.18.4",
3
+ "version": "4.18.6",
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.663",
21
+ "@dynamic-labs/sdk-api-core": "0.0.669",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.18.4",
24
- "@dynamic-labs/logger": "4.18.4",
25
- "@dynamic-labs/types": "4.18.4",
23
+ "@dynamic-labs/assert-package-version": "4.18.6",
24
+ "@dynamic-labs/logger": "4.18.6",
25
+ "@dynamic-labs/types": "4.18.6",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
package/src/index.cjs CHANGED
@@ -92,6 +92,7 @@ var isInIframe = require('./isInIframe/isInIframe.cjs');
92
92
  var promiseWithTimeout = require('./promiseWithTimeout/promiseWithTimeout.cjs');
93
93
  var runSafe = require('./runSafe/runSafe.cjs');
94
94
  var template = require('./template/template.cjs');
95
+ var tracing = require('./tracing/tracing.cjs');
95
96
  var phantomRedirect = require('./consts/phantomRedirect.cjs');
96
97
  var PlatformService = require('./services/PlatformService/PlatformService.cjs');
97
98
  var createBrowserPlatformService = require('./services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.cjs');
@@ -218,6 +219,7 @@ exports.isInIframe = isInIframe.isInIframe;
218
219
  exports.promiseWithTimeout = promiseWithTimeout.promiseWithTimeout;
219
220
  exports.runSafe = runSafe.runSafe;
220
221
  exports.template = template.template;
222
+ exports.tracing = tracing.tracing;
221
223
  exports.PHANTOM_REDIRECT_CONNECTION_TYPE_KEY = phantomRedirect.PHANTOM_REDIRECT_CONNECTION_TYPE_KEY;
222
224
  exports.PlatformService = PlatformService.PlatformService;
223
225
  exports.createBrowserPlatformService = createBrowserPlatformService.createBrowserPlatformService;
package/src/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export { isInIframe } from './isInIframe';
36
36
  export { promiseWithTimeout } from './promiseWithTimeout';
37
37
  export { runSafe } from './runSafe';
38
38
  export { template } from './template';
39
+ export { tracing } from './tracing';
39
40
  export { PHANTOM_REDIRECT_CONNECTION_TYPE_KEY, type PhantomRedirectConnectionType, } from './consts/phantomRedirect';
40
41
  export { PlatformService, createBrowserPlatformService, type IPlatformService, } from './services/PlatformService';
41
42
  export { PlatformEventsService, type IPlatformEvents, type IPlatformEventsService, } from './services/PlatformEventsService';
package/src/index.js CHANGED
@@ -88,6 +88,7 @@ export { isInIframe } from './isInIframe/isInIframe.js';
88
88
  export { promiseWithTimeout } from './promiseWithTimeout/promiseWithTimeout.js';
89
89
  export { runSafe } from './runSafe/runSafe.js';
90
90
  export { template } from './template/template.js';
91
+ export { tracing } from './tracing/tracing.js';
91
92
  export { PHANTOM_REDIRECT_CONNECTION_TYPE_KEY } from './consts/phantomRedirect.js';
92
93
  export { PlatformService } from './services/PlatformService/PlatformService.js';
93
94
  export { createBrowserPlatformService } from './services/PlatformService/createBrowserPlatformService/createBrowserPlatformService.js';
@@ -0,0 +1 @@
1
+ export { tracing } from './tracing';
@@ -0,0 +1,49 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ const formatTrace = (trace) => `
7
+ --- ${trace.scope} : ${trace.timestamp.toISOString()} ---
8
+ ${trace.payload.join('\n')}
9
+ `.trim();
10
+ /**
11
+ * Creates a tracing utility with functions for logging and formatting
12
+ * @returns Tracing utility object
13
+ */
14
+ const createTracing = () => {
15
+ const traces = [];
16
+ return {
17
+ /**
18
+ * Formats an object as a pretty-printed JSON string
19
+ * @param object - The object to format
20
+ * @returns JSON string representation of the object
21
+ */
22
+ formatObject: (object) => JSON.stringify(object, null, 2),
23
+ /**
24
+ * Logs an event to the trace collection
25
+ * @param scope - The scope/category of the event
26
+ * @param args - String messages to include in the trace
27
+ */
28
+ logEvent: (scope, ...args) => {
29
+ traces.push({
30
+ payload: args,
31
+ scope,
32
+ timestamp: new Date(),
33
+ });
34
+ },
35
+ /**
36
+ * Formats and returns traces filtered by scope
37
+ * @param scopes - Optional array of scopes to filter traces
38
+ * @returns Formatted trace output as a string
39
+ */
40
+ packScopes: (scopes) => traces
41
+ .filter((trace) => (scopes ? scopes.includes(trace.scope) : true))
42
+ .map(formatTrace)
43
+ .join('\n\n'),
44
+ };
45
+ };
46
+ const tracing = createTracing();
47
+
48
+ exports.createTracing = createTracing;
49
+ exports.tracing = tracing;
@@ -0,0 +1,46 @@
1
+ type Payload = string[];
2
+ /**
3
+ * Creates a tracing utility with functions for logging and formatting
4
+ * @returns Tracing utility object
5
+ */
6
+ export declare const createTracing: () => {
7
+ /**
8
+ * Formats an object as a pretty-printed JSON string
9
+ * @param object - The object to format
10
+ * @returns JSON string representation of the object
11
+ */
12
+ formatObject: (object: Record<string, unknown>) => string;
13
+ /**
14
+ * Logs an event to the trace collection
15
+ * @param scope - The scope/category of the event
16
+ * @param args - String messages to include in the trace
17
+ */
18
+ logEvent: (scope: string, ...args: Payload) => void;
19
+ /**
20
+ * Formats and returns traces filtered by scope
21
+ * @param scopes - Optional array of scopes to filter traces
22
+ * @returns Formatted trace output as a string
23
+ */
24
+ packScopes: (scopes?: string[] | undefined) => string;
25
+ };
26
+ export declare const tracing: {
27
+ /**
28
+ * Formats an object as a pretty-printed JSON string
29
+ * @param object - The object to format
30
+ * @returns JSON string representation of the object
31
+ */
32
+ formatObject: (object: Record<string, unknown>) => string;
33
+ /**
34
+ * Logs an event to the trace collection
35
+ * @param scope - The scope/category of the event
36
+ * @param args - String messages to include in the trace
37
+ */
38
+ logEvent: (scope: string, ...args: Payload) => void;
39
+ /**
40
+ * Formats and returns traces filtered by scope
41
+ * @param scopes - Optional array of scopes to filter traces
42
+ * @returns Formatted trace output as a string
43
+ */
44
+ packScopes: (scopes?: string[] | undefined) => string;
45
+ };
46
+ export {};
@@ -0,0 +1,44 @@
1
+ 'use client'
2
+ const formatTrace = (trace) => `
3
+ --- ${trace.scope} : ${trace.timestamp.toISOString()} ---
4
+ ${trace.payload.join('\n')}
5
+ `.trim();
6
+ /**
7
+ * Creates a tracing utility with functions for logging and formatting
8
+ * @returns Tracing utility object
9
+ */
10
+ const createTracing = () => {
11
+ const traces = [];
12
+ return {
13
+ /**
14
+ * Formats an object as a pretty-printed JSON string
15
+ * @param object - The object to format
16
+ * @returns JSON string representation of the object
17
+ */
18
+ formatObject: (object) => JSON.stringify(object, null, 2),
19
+ /**
20
+ * Logs an event to the trace collection
21
+ * @param scope - The scope/category of the event
22
+ * @param args - String messages to include in the trace
23
+ */
24
+ logEvent: (scope, ...args) => {
25
+ traces.push({
26
+ payload: args,
27
+ scope,
28
+ timestamp: new Date(),
29
+ });
30
+ },
31
+ /**
32
+ * Formats and returns traces filtered by scope
33
+ * @param scopes - Optional array of scopes to filter traces
34
+ * @returns Formatted trace output as a string
35
+ */
36
+ packScopes: (scopes) => traces
37
+ .filter((trace) => (scopes ? scopes.includes(trace.scope) : true))
38
+ .map(formatTrace)
39
+ .join('\n\n'),
40
+ };
41
+ };
42
+ const tracing = createTracing();
43
+
44
+ export { createTracing, tracing };