@dynamic-labs/message-transport 4.25.9 → 4.26.0
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 +33 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +4 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +2 -0
- package/src/messageTransportDataJson/index.d.ts +2 -0
- package/src/messageTransportDataJson/messageTransportDataJsonReplacer.cjs +19 -0
- package/src/messageTransportDataJson/messageTransportDataJsonReplacer.d.ts +7 -0
- package/src/messageTransportDataJson/messageTransportDataJsonReplacer.js +15 -0
- package/src/messageTransportDataJson/messageTransportDataJsonReviver.cjs +27 -0
- package/src/messageTransportDataJson/messageTransportDataJsonReviver.d.ts +7 -0
- package/src/messageTransportDataJson/messageTransportDataJsonReviver.js +23 -0
- package/src/messageTypes/NetworksModuleMessages.d.ts +1 -0
- package/src/messageTypes/SuiMessages.d.ts +21 -0
- package/src/messageTypes/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.26.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.10...v4.26.0) (2025-08-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add forceRefresh to useTokenBalances ([#9320](https://github.com/dynamic-labs/dynamic-auth/issues/9320)) ([22c4035](https://github.com/dynamic-labs/dynamic-auth/commit/22c403546496ffb6b1ed846510a079efc65c5d57))
|
|
8
|
+
* add signMessageWithContext to support user operations with WaaS ([#9287](https://github.com/dynamic-labs/dynamic-auth/issues/9287)) ([744c158](https://github.com/dynamic-labs/dynamic-auth/commit/744c158a890346c624a101ba8b20911eefbdd1ef))
|
|
9
|
+
* add sui support to react native ([#9236](https://github.com/dynamic-labs/dynamic-auth/issues/9236)) ([301d821](https://github.com/dynamic-labs/dynamic-auth/commit/301d821b16eb1bc112609882ed0ae5e9f2477ace))
|
|
10
|
+
* add whitelistedContracts to token balance hooks ([#9324](https://github.com/dynamic-labs/dynamic-auth/issues/9324)) ([86596dd](https://github.com/dynamic-labs/dynamic-auth/commit/86596dd692152f82a2553b9824ce21781024dac1))
|
|
11
|
+
* pass policy context to sign authorization ([#9327](https://github.com/dynamic-labs/dynamic-auth/issues/9327)) ([3e6d009](https://github.com/dynamic-labs/dynamic-auth/commit/3e6d009ca3d50e01a665550fa803d07bd3038eb1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* don't prompt passkeys twice when component renders ([#9340](https://github.com/dynamic-labs/dynamic-auth/issues/9340)) ([8fbdd28](https://github.com/dynamic-labs/dynamic-auth/commit/8fbdd287d1dd67fee4720f16a3d506f75d9dafe7))
|
|
17
|
+
* onAuthSuccess with primaryWallet null when signing up with embedded wallets v3 ([#9345](https://github.com/dynamic-labs/dynamic-auth/issues/9345)) ([14e54a0](https://github.com/dynamic-labs/dynamic-auth/commit/14e54a093395a46cb32282aebc172b26c243d42f))
|
|
18
|
+
* rename passkey not automatically updating UI ([#9339](https://github.com/dynamic-labs/dynamic-auth/issues/9339)) ([b9ef253](https://github.com/dynamic-labs/dynamic-auth/commit/b9ef2532152a228feebb1fb9811937d7a14d81b1))
|
|
19
|
+
* wallet kit being initiated internally multiple times ([#9344](https://github.com/dynamic-labs/dynamic-auth/issues/9344)) ([49a3664](https://github.com/dynamic-labs/dynamic-auth/commit/49a3664c5995b0104693ec87b41b8540dd19bdca))
|
|
20
|
+
|
|
21
|
+
### [4.25.10](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.9...v4.25.10) (2025-08-07)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* trigger event for social account changes ([#9291](https://github.com/dynamic-labs/dynamic-auth/issues/9291)) ([6766754](https://github.com/dynamic-labs/dynamic-auth/commit/6766754dd6858628003781fab6cca42c1898dd2d))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* allow using the custom transport config in EthereumWallet walletClient creation ([#9310](https://github.com/dynamic-labs/dynamic-auth/issues/9310)) ([e1db68a](https://github.com/dynamic-labs/dynamic-auth/commit/e1db68a16d51d4db3317b707f27ff35b64056829))
|
|
32
|
+
* incorrect modal showing up when linking MetaMask SOL in headless mode ([#9317](https://github.com/dynamic-labs/dynamic-auth/issues/9317)) ([c7f9644](https://github.com/dynamic-labs/dynamic-auth/commit/c7f9644abe51d537100997db47d8a6d1b78cf8e7))
|
|
33
|
+
* prevent logged-in users from trying to signing in again with social ([#9315](https://github.com/dynamic-labs/dynamic-auth/issues/9315)) ([365c65c](https://github.com/dynamic-labs/dynamic-auth/commit/365c65c0c7bb22c47e77ca58727a473b60887e24))
|
|
34
|
+
|
|
2
35
|
### [4.25.9](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.8...v4.25.9) (2025-08-01)
|
|
3
36
|
|
|
4
37
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/message-transport",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.26.0",
|
|
4
4
|
"description": "Defines the interface to communicate with dynamic's webview",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs-sdk/client": "0.0.1-alpha.
|
|
22
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs-sdk/client": "0.0.1-alpha.24",
|
|
22
|
+
"@dynamic-labs/sdk-api-core": "0.0.749",
|
|
23
23
|
"@vue/reactivity": "^3.4.21",
|
|
24
|
-
"@dynamic-labs/types": "4.
|
|
24
|
+
"@dynamic-labs/types": "4.26.0",
|
|
25
25
|
"eventemitter3": "5.0.1",
|
|
26
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
27
|
-
"@dynamic-labs/logger": "4.
|
|
28
|
-
"@dynamic-labs/utils": "4.
|
|
29
|
-
"@dynamic-labs/webauthn": "4.
|
|
26
|
+
"@dynamic-labs/assert-package-version": "4.26.0",
|
|
27
|
+
"@dynamic-labs/logger": "4.26.0",
|
|
28
|
+
"@dynamic-labs/utils": "4.26.0",
|
|
29
|
+
"@dynamic-labs/webauthn": "4.26.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
package/src/index.cjs
CHANGED
|
@@ -27,6 +27,8 @@ var SdkModuleMessages = require('./messageTypes/SdkModuleMessages.cjs');
|
|
|
27
27
|
var UserInterfaceModuleMessages = require('./messageTypes/UserInterfaceModuleMessages.cjs');
|
|
28
28
|
var WalletsModuleMessages = require('./messageTypes/WalletsModuleMessages.cjs');
|
|
29
29
|
var debug = require('./debug/debug.cjs');
|
|
30
|
+
var messageTransportDataJsonReplacer = require('./messageTransportDataJson/messageTransportDataJsonReplacer.cjs');
|
|
31
|
+
var messageTransportDataJsonReviver = require('./messageTransportDataJson/messageTransportDataJsonReviver.cjs');
|
|
30
32
|
|
|
31
33
|
assertPackageVersion.assertPackageVersion('@dynamic-labs/message-transport', _package.version);
|
|
32
34
|
|
|
@@ -61,3 +63,5 @@ exports.userInterfaceEventNames = UserInterfaceModuleMessages.userInterfaceEvent
|
|
|
61
63
|
exports.userWalletsEventNames = WalletsModuleMessages.userWalletsEventNames;
|
|
62
64
|
exports.isGlobalDebugEnabled = debug.isGlobalDebugEnabled;
|
|
63
65
|
exports.setGlobalDebugEnabled = debug.setGlobalDebugEnabled;
|
|
66
|
+
exports.messageTransportDataJsonReplacer = messageTransportDataJsonReplacer.messageTransportDataJsonReplacer;
|
|
67
|
+
exports.messageTransportDataJsonReviver = messageTransportDataJsonReviver.messageTransportDataJsonReviver;
|
package/src/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ 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 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 TurnkeyPasskeyMessages, 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 SuiMessages, type SuiNetworkName, type TurnkeyIframeEventProxyMessages, type TurnkeyPasskeyMessages, type UserInterfaceModuleMessages, type VerifyWithExternalJwtParams, type ViemMessages, type WaasMessages, type WalletEvents, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, type ZeroDevExtensionMessages, } from './messageTypes';
|
|
11
11
|
export { isGlobalDebugEnabled, setGlobalDebugEnabled } from './debug';
|
|
12
|
+
export { messageTransportDataJsonReplacer, messageTransportDataJsonReviver, } from './messageTransportDataJson';
|
package/src/index.js
CHANGED
|
@@ -23,5 +23,7 @@ export { sdkHasLoadedEventName } from './messageTypes/SdkModuleMessages.js';
|
|
|
23
23
|
export { userInterfaceEventNames } from './messageTypes/UserInterfaceModuleMessages.js';
|
|
24
24
|
export { userWalletsEventNames } from './messageTypes/WalletsModuleMessages.js';
|
|
25
25
|
export { isGlobalDebugEnabled, setGlobalDebugEnabled } from './debug/debug.js';
|
|
26
|
+
export { messageTransportDataJsonReplacer } from './messageTransportDataJson/messageTransportDataJsonReplacer.js';
|
|
27
|
+
export { messageTransportDataJsonReviver } from './messageTransportDataJson/messageTransportDataJsonReviver.js';
|
|
26
28
|
|
|
27
29
|
assertPackageVersion('@dynamic-labs/message-transport', version);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Replacer to be used when serializing message transport messages
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* JSON.stringify(data, messageTransportDataJsonReplacer)
|
|
11
|
+
*/
|
|
12
|
+
const messageTransportDataJsonReplacer = (_, value) => {
|
|
13
|
+
if (typeof value === 'bigint') {
|
|
14
|
+
return { __type: 'bigint', value: value.toString() };
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.messageTransportDataJsonReplacer = messageTransportDataJsonReplacer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/**
|
|
3
|
+
* Replacer to be used when serializing message transport messages
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* JSON.stringify(data, messageTransportDataJsonReplacer)
|
|
7
|
+
*/
|
|
8
|
+
const messageTransportDataJsonReplacer = (_, value) => {
|
|
9
|
+
if (typeof value === 'bigint') {
|
|
10
|
+
return { __type: 'bigint', value: value.toString() };
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { messageTransportDataJsonReplacer };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Reviver to be used when deserializing message transport messages
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* JSON.parse(data, messageTransportDataJsonReviver)
|
|
11
|
+
*/
|
|
12
|
+
const messageTransportDataJsonReviver = (_, value) => {
|
|
13
|
+
/**
|
|
14
|
+
* Handle bigint values that were serialized as { __type: 'bigint', value: '123' }
|
|
15
|
+
*/
|
|
16
|
+
if (value &&
|
|
17
|
+
typeof value === 'object' &&
|
|
18
|
+
'__type' in value &&
|
|
19
|
+
value.__type === 'bigint' &&
|
|
20
|
+
'value' in value &&
|
|
21
|
+
typeof value.value === 'string') {
|
|
22
|
+
return BigInt(value.value);
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.messageTransportDataJsonReviver = messageTransportDataJsonReviver;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
/**
|
|
3
|
+
* Reviver to be used when deserializing message transport messages
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* JSON.parse(data, messageTransportDataJsonReviver)
|
|
7
|
+
*/
|
|
8
|
+
const messageTransportDataJsonReviver = (_, value) => {
|
|
9
|
+
/**
|
|
10
|
+
* Handle bigint values that were serialized as { __type: 'bigint', value: '123' }
|
|
11
|
+
*/
|
|
12
|
+
if (value &&
|
|
13
|
+
typeof value === 'object' &&
|
|
14
|
+
'__type' in value &&
|
|
15
|
+
value.__type === 'bigint' &&
|
|
16
|
+
'value' in value &&
|
|
17
|
+
typeof value.value === 'string') {
|
|
18
|
+
return BigInt(value.value);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { messageTransportDataJsonReviver };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type SuiNetworkName = 'mainnet' | 'testnet' | 'devnet';
|
|
2
|
+
/**
|
|
3
|
+
* Messages exchanged for sui requests.
|
|
4
|
+
*/
|
|
5
|
+
export type SuiMessages = {
|
|
6
|
+
sui_signMessage: (arg: {
|
|
7
|
+
message: string;
|
|
8
|
+
walletId: string;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
signature: string;
|
|
11
|
+
}>;
|
|
12
|
+
sui_signTransaction: (arg: {
|
|
13
|
+
transaction: string;
|
|
14
|
+
walletId: string;
|
|
15
|
+
}) => Promise<{
|
|
16
|
+
signature: string;
|
|
17
|
+
}>;
|
|
18
|
+
sui_getNetworkName: (arg: {
|
|
19
|
+
walletId: string;
|
|
20
|
+
}) => Promise<SuiNetworkName>;
|
|
21
|
+
};
|
|
@@ -15,6 +15,7 @@ export * from './SdkModuleMessages';
|
|
|
15
15
|
export * from './SocialAuthModuleMessages';
|
|
16
16
|
export * from './SolanaMessages';
|
|
17
17
|
export * from './StorageMessages';
|
|
18
|
+
export * from './SuiMessages';
|
|
18
19
|
export * from './TurnkeyIframeEventProxyMessages';
|
|
19
20
|
export * from './TurnkeyPasskeyMessages';
|
|
20
21
|
export * from './UserInterfaceModuleMessages';
|