@dynamic-labs/message-transport 4.20.11 → 4.20.13

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.20.13](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.12...v4.20.13) (2025-07-02)
3
+
4
+
5
+ ### Features
6
+
7
+ * add createWalletClient method to ZeroDevExtension ([#9036](https://github.com/dynamic-labs/dynamic-auth/issues/9036)) ([674df45](https://github.com/dynamic-labs/dynamic-auth/commit/674df45f21e76070594963c2e3b7c19ba94e3004))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * allow to retry metamask deeplink ([#9066](https://github.com/dynamic-labs/dynamic-auth/issues/9066)) ([308c0d2](https://github.com/dynamic-labs/dynamic-auth/commit/308c0d2ddd7a5c7460f31d25365687b315b0a0f4))
13
+
14
+ ### [4.20.12](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.11...v4.20.12) (2025-07-01)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * bring back braavos mobile deeplink support ([#9041](https://github.com/dynamic-labs/dynamic-auth/issues/9041)) ([90a7eb6](https://github.com/dynamic-labs/dynamic-auth/commit/90a7eb620f6bd27d4560e88fe5542a121e586bed))
20
+ * start exchange funding errors should be logged as error ([#9056](https://github.com/dynamic-labs/dynamic-auth/issues/9056)) ([ba122af](https://github.com/dynamic-labs/dynamic-auth/commit/ba122afb68c462fe8627828bd20f9cc5f92803ff))
21
+ * WC redirect on mobile ([#9063](https://github.com/dynamic-labs/dynamic-auth/issues/9063)) ([f43aa4a](https://github.com/dynamic-labs/dynamic-auth/commit/f43aa4aedea20e3baf012f4778f5e6a47c27515c))
22
+
2
23
  ### [4.20.11](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.10...v4.20.11) (2025-07-01)
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.20.11";
6
+ var version = "4.20.13";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.20.11";
2
+ var version = "4.20.13";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/message-transport",
3
- "version": "4.20.11",
3
+ "version": "4.20.13",
4
4
  "description": "Defines the interface to communicate with dynamic's webview",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -20,12 +20,12 @@
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.699",
22
22
  "@vue/reactivity": "^3.4.21",
23
- "@dynamic-labs/types": "4.20.11",
23
+ "@dynamic-labs/types": "4.20.13",
24
24
  "eventemitter3": "5.0.1",
25
- "@dynamic-labs/assert-package-version": "4.20.11",
26
- "@dynamic-labs/logger": "4.20.11",
27
- "@dynamic-labs/utils": "4.20.11",
28
- "@dynamic-labs/webauthn": "4.20.11"
25
+ "@dynamic-labs/assert-package-version": "4.20.13",
26
+ "@dynamic-labs/logger": "4.20.13",
27
+ "@dynamic-labs/utils": "4.20.13",
28
+ "@dynamic-labs/webauthn": "4.20.13"
29
29
  },
30
30
  "peerDependencies": {}
31
31
  }
package/src/index.cjs CHANGED
@@ -7,9 +7,10 @@ var assertPackageVersion = require('@dynamic-labs/assert-package-version');
7
7
  var _package = require('../package.cjs');
8
8
  var messageTransport = require('./messageTransport/messageTransport.cjs');
9
9
  var applyDefaultMessageOrigin = require('./messageTransport/decorators/applyDefaultMessageOrigin/applyDefaultMessageOrigin.cjs');
10
+ var applyRecoveryManager = require('./messageTransport/decorators/applyRecoveryManager/applyRecoveryManager.cjs');
11
+ var applyTransportStamps = require('./messageTransport/decorators/applyTransportStamps/applyTransportStamps.cjs');
10
12
  var makeWaitForInitEvent = require('./messageTransport/decorators/makeWaitForInitEvent/makeWaitForInitEvent.cjs');
11
13
  var makeWaitForUnblock = require('./messageTransport/decorators/makeWaitForUnblock/makeWaitForUnblock.cjs');
12
- var applyRecoveryManager = require('./messageTransport/decorators/applyRecoveryManager/applyRecoveryManager.cjs');
13
14
  var requestChannel = require('./requestChannel/requestChannel.cjs');
14
15
  var utils = require('./requestChannel/utils/utils.cjs');
15
16
  var isSerializedError = require('./utils/isSerializedError/isSerializedError.cjs');
@@ -30,10 +31,11 @@ assertPackageVersion.assertPackageVersion('@dynamic-labs/message-transport', _pa
30
31
 
31
32
  exports.createMessageTransport = messageTransport.createMessageTransport;
32
33
  exports.applyDefaultMessageOrigin = applyDefaultMessageOrigin.applyDefaultMessageOrigin;
33
- exports.makeWaitForInitEvent = makeWaitForInitEvent.makeWaitForInitEvent;
34
- exports.makeWaitForUnblock = makeWaitForUnblock.makeWaitForUnblock;
35
34
  exports.applyRecoveryManager = applyRecoveryManager.applyRecoveryManager;
36
35
  exports.hasRecoveryManager = applyRecoveryManager.hasRecoveryManager;
36
+ exports.applyTransportStamps = applyTransportStamps.applyTransportStamps;
37
+ exports.makeWaitForInitEvent = makeWaitForInitEvent.makeWaitForInitEvent;
38
+ exports.makeWaitForUnblock = makeWaitForUnblock.makeWaitForUnblock;
37
39
  exports.createRequestChannel = requestChannel.createRequestChannel;
38
40
  exports.getAckMessageType = utils.getAckMessageType;
39
41
  exports.getRejectMessageType = utils.getRejectMessageType;
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { applyDefaultMessageOrigin, applyRecoveryManager, createMessageTransport, hasRecoveryManager, makeWaitForInitEvent, makeWaitForUnblock, type BypassBlockCallback, type MessageTransport, type MessageTransportCallback, type MessageTransportData, type MessageTransportDataOptionalOrigin, type MessageTransportWithDefaultOrigin, } from './messageTransport';
1
+ export { applyDefaultMessageOrigin, applyRecoveryManager, applyTransportStamps, createMessageTransport, hasRecoveryManager, makeWaitForInitEvent, makeWaitForUnblock, type BypassBlockCallback, type MessageTransport, type MessageTransportCallback, type MessageTransportData, type MessageTransportDataOptionalOrigin, type MessageTransportWithDefaultOrigin, } from './messageTransport';
2
2
  export { createRequestChannel, getAckMessageType, getRejectMessageType, getResolveMessageType, isAckMessageType, isRejectMessageType, isRequestMessageType, isResolveMessageType, type RequestChannel, type RequestTypes, type TypesExpectingResponse, } from './requestChannel';
3
3
  export { isSerializedError } from './utils/isSerializedError';
4
4
  export { parseErrorFromTransport } from './utils/parseErrorFromTransport';
@@ -7,4 +7,4 @@ export { serializeErrorForTransport, type SerializedError, } from './utils/seria
7
7
  export { createEventEmitterForMessages, createStore, createStoreSetter, type CreateStoreProps, } from './store';
8
8
  export type { Store, StoreEventListeners, StoreKeys, StoreSetter, StoreStateChangeEvent, StoreStateEvents, StoreStateGetters, } from './store/types';
9
9
  export type { PickedEventListeners } from './types';
10
- export { authEventNames, emailEventNames, embeddedWalletsEventNames, sdkHasLoadedEventName, smsEventNames, userInterfaceEventNames, userWalletsEventNames, type AccountAbstractionGetEOAWalletArgs, type AccountAbstractionGetSmartWalletArgs, type AccountAbstractionIsSmartWalletArgs, type AccountAbstractionMessages, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type ConsoleMessages, type CreateEmbeddedWalletArgs, type DeleteStorageItemArgs, type EmailOtpParams, type EmbeddedWalletsModuleMessages, type EmbeddedWalletsModuleState, type EthMessages, type EthRequestParams, type EthRequestWithAddressParams, type EthRequestWithChainIdParams, type ExternalAuthMessages, type FetchMessages, type GetStorageItemArgs, type NetworksModuleState, type OtpData, type OtpMessages, type PasskeyMessages, type PlatformServiceMessages, type ProjectSettingsMessages, type SdkModuleMessages, type SdkModuleState, type SetStorageItemArgs, type SignInWithExternalJwtParams, type SmsOtpParams, type SocialAuthModuleMessages, type MfaMessages, type SocialProvider, type SolanaMessages, type StorageMessages, type StorageMessageSource, type TurnkeyIframeEventProxyMessages, type UserInterfaceModuleMessages, type VerifyWithExternalJwtParams, type ViemMessages, type WaasMessages, type WalletEvents, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, type ZeroDevExtensionMessages, } from './messageTypes';
10
+ export { authEventNames, emailEventNames, embeddedWalletsEventNames, sdkHasLoadedEventName, smsEventNames, userInterfaceEventNames, userWalletsEventNames, type AccountAbstractionGetEOAWalletArgs, type AccountAbstractionGetSmartWalletArgs, type AccountAbstractionIsSmartWalletArgs, type AccountAbstractionMessages, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type ConsoleMessages, type CreateEmbeddedWalletArgs, type DeleteStorageItemArgs, type EmailOtpParams, type EmbeddedWalletsModuleMessages, type EmbeddedWalletsModuleState, type EthMessages, type EthRequestParams, type EthRequestWithAddressParams, type EthRequestWithChainIdParams, type ExternalAuthMessages, type FetchMessages, type GetStorageItemArgs, type MfaMessages, type NetworksModuleState, type OtpData, type OtpMessages, type PasskeyMessages, type PlatformServiceMessages, type ProjectSettingsMessages, type SdkModuleMessages, type SdkModuleState, type SetStorageItemArgs, type SignInWithExternalJwtParams, type SmsOtpParams, type SocialAuthModuleMessages, type SocialProvider, type SolanaMessages, type StorageMessages, type StorageMessageSource, type TurnkeyIframeEventProxyMessages, type UserInterfaceModuleMessages, type VerifyWithExternalJwtParams, type ViemMessages, type WaasMessages, type WalletEvents, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, type ZeroDevExtensionMessages, } from './messageTypes';
package/src/index.js CHANGED
@@ -3,9 +3,10 @@ import { assertPackageVersion } from '@dynamic-labs/assert-package-version';
3
3
  import { version } from '../package.js';
4
4
  export { createMessageTransport } from './messageTransport/messageTransport.js';
5
5
  export { applyDefaultMessageOrigin } from './messageTransport/decorators/applyDefaultMessageOrigin/applyDefaultMessageOrigin.js';
6
+ export { applyRecoveryManager, hasRecoveryManager } from './messageTransport/decorators/applyRecoveryManager/applyRecoveryManager.js';
7
+ export { applyTransportStamps } from './messageTransport/decorators/applyTransportStamps/applyTransportStamps.js';
6
8
  export { makeWaitForInitEvent } from './messageTransport/decorators/makeWaitForInitEvent/makeWaitForInitEvent.js';
7
9
  export { makeWaitForUnblock } from './messageTransport/decorators/makeWaitForUnblock/makeWaitForUnblock.js';
8
- export { applyRecoveryManager, hasRecoveryManager } from './messageTransport/decorators/applyRecoveryManager/applyRecoveryManager.js';
9
10
  export { createRequestChannel } from './requestChannel/requestChannel.js';
10
11
  export { getAckMessageType, getRejectMessageType, getResolveMessageType, isAckMessageType, isRejectMessageType, isRequestMessageType, isResolveMessageType } from './requestChannel/utils/utils.js';
11
12
  export { isSerializedError } from './utils/isSerializedError/isSerializedError.js';
@@ -0,0 +1,25 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ /**
7
+ * Applies transport stamps to a message transport
8
+ * as a trail of where the message has been
9
+ */
10
+ const applyTransportStamps = (messageTransport) => {
11
+ const id = Math.random().toString(36).slice(2);
12
+ return Object.assign(Object.assign({}, messageTransport), { emit: (message) => {
13
+ var _a;
14
+ const transportStamps = [
15
+ ...((_a = message.transportStamps) !== null && _a !== void 0 ? _a : []),
16
+ {
17
+ emittedAt: new Date().toISOString(),
18
+ messageTransportId: id,
19
+ },
20
+ ];
21
+ messageTransport.emit(Object.assign(Object.assign({}, message), { transportStamps }));
22
+ } });
23
+ };
24
+
25
+ exports.applyTransportStamps = applyTransportStamps;
@@ -0,0 +1,6 @@
1
+ import { MessageTransport } from '../../messageTransport';
2
+ /**
3
+ * Applies transport stamps to a message transport
4
+ * as a trail of where the message has been
5
+ */
6
+ export declare const applyTransportStamps: <T extends MessageTransport>(messageTransport: T) => T;
@@ -0,0 +1,21 @@
1
+ 'use client'
2
+ /**
3
+ * Applies transport stamps to a message transport
4
+ * as a trail of where the message has been
5
+ */
6
+ const applyTransportStamps = (messageTransport) => {
7
+ const id = Math.random().toString(36).slice(2);
8
+ return Object.assign(Object.assign({}, messageTransport), { emit: (message) => {
9
+ var _a;
10
+ const transportStamps = [
11
+ ...((_a = message.transportStamps) !== null && _a !== void 0 ? _a : []),
12
+ {
13
+ emittedAt: new Date().toISOString(),
14
+ messageTransportId: id,
15
+ },
16
+ ];
17
+ messageTransport.emit(Object.assign(Object.assign({}, message), { transportStamps }));
18
+ } });
19
+ };
20
+
21
+ export { applyTransportStamps };
@@ -0,0 +1 @@
1
+ export { applyTransportStamps } from './applyTransportStamps';
@@ -1,4 +1,5 @@
1
1
  export * from './applyDefaultMessageOrigin';
2
+ export { applyRecoveryManager, hasRecoveryManager, } from './applyRecoveryManager';
3
+ export * from './applyTransportStamps';
2
4
  export * from './makeWaitForInitEvent';
3
5
  export * from './makeWaitForUnblock';
4
- export { applyRecoveryManager, hasRecoveryManager, } from './applyRecoveryManager';
@@ -1,5 +1,18 @@
1
1
  /** Defines the structure of messages that can be sent to and from webviews */
2
2
  export type MessageTransportData = {
3
+ /**
4
+ * A list of stamps that represent the history of the message
5
+ */
6
+ transportStamps?: {
7
+ /**
8
+ * The id of the message transport that emitted this message
9
+ */
10
+ messageTransportId: string;
11
+ /**
12
+ * The date and time when the message was emitted
13
+ */
14
+ emittedAt: string;
15
+ }[];
3
16
  /**
4
17
  * Defines which kind of message this is.
5
18
  *
@@ -34,7 +34,7 @@ const createNoHandlerError = (type) => {
34
34
  *
35
35
  * This controls how many ms we should wait before we time out.
36
36
  */
37
- const TIMEOUT_DURATION = 1000;
37
+ const TIMEOUT_DURATION = 5000;
38
38
 
39
39
  exports.TIMEOUT_DURATION = TIMEOUT_DURATION;
40
40
  exports.createNoHandlerError = createNoHandlerError;
@@ -21,4 +21,4 @@ export declare const createNoHandlerError: (type: string) => RequestChannelNotHa
21
21
  *
22
22
  * This controls how many ms we should wait before we time out.
23
23
  */
24
- export declare const TIMEOUT_DURATION = 1000;
24
+ export declare const TIMEOUT_DURATION = 5000;
@@ -30,6 +30,6 @@ const createNoHandlerError = (type) => {
30
30
  *
31
31
  * This controls how many ms we should wait before we time out.
32
32
  */
33
- const TIMEOUT_DURATION = 1000;
33
+ const TIMEOUT_DURATION = 5000;
34
34
 
35
35
  export { TIMEOUT_DURATION, createNoHandlerError, getAckMessageType, getRejectMessageType, getResolveMessageType, isAckMessageType, isRejectMessageType, isRequestMessageType, isResolveMessageType };
@@ -13,6 +13,7 @@ parsedData) => {
13
13
  args: parsedData.args,
14
14
  messageSessionId: parsedData.messageSessionId,
15
15
  origin: parsedData.origin,
16
+ transportStamps: parsedData.transportStamps,
16
17
  type: parsedData.type,
17
18
  };
18
19
  if (!Array.isArray(message.args) ||
@@ -9,6 +9,7 @@ parsedData) => {
9
9
  args: parsedData.args,
10
10
  messageSessionId: parsedData.messageSessionId,
11
11
  origin: parsedData.origin,
12
+ transportStamps: parsedData.transportStamps,
12
13
  type: parsedData.type,
13
14
  };
14
15
  if (!Array.isArray(message.args) ||