@dynamic-labs/message-transport 4.0.0-alpha.1 → 4.0.0-alpha.3
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 +22 -0
- package/package.json +5 -4
- package/src/index.d.ts +1 -1
- package/src/messageTypes/EmbeddedWalletsModuleMessages.d.ts +5 -1
- package/src/messageTypes/UserInterfaceModuleMessages.d.ts +2 -0
- package/src/requestChannel/requestChannel.cjs +3 -3
- package/src/requestChannel/requestChannel.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-09-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* developers provide global connectivity appkit project id ([#6941](https://github.com/dynamic-labs/DynamicAuth/issues/6941)) ([83760ea](https://github.com/dynamic-labs/DynamicAuth/commit/83760ea57591685b12caee945f173f6a7f9312d1))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* don't try to set up event listeners if wallet provider doesn't support it ([#6943](https://github.com/dynamic-labs/DynamicAuth/issues/6943)) ([439f1bb](https://github.com/dynamic-labs/DynamicAuth/commit/439f1bbb3c765959756cfc6eeb8429e4018e0379))
|
|
13
|
+
* dont verify all signatures for solana embedded multisig tx ([#6953](https://github.com/dynamic-labs/DynamicAuth/issues/6953)) ([7a7973e](https://github.com/dynamic-labs/DynamicAuth/commit/7a7973e05f0960421b348a55c6a00c9fd873b0b7))
|
|
14
|
+
|
|
15
|
+
## [4.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2024-09-18)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add iconVariant prop to DynamicBridgeWidget ([#6915](https://github.com/dynamic-labs/DynamicAuth/issues/6915)) ([8aa0f3d](https://github.com/dynamic-labs/DynamicAuth/commit/8aa0f3d8d8c41c7b5c4796106f611f208010cb6d))
|
|
21
|
+
* allow to create extra embedded wallets in react-native ([#6923](https://github.com/dynamic-labs/DynamicAuth/issues/6923)) ([ba22f7b](https://github.com/dynamic-labs/DynamicAuth/commit/ba22f7bcf41a444a4df0aff9b6aec257457e9402))
|
|
22
|
+
* **client:** add hide method for auth and userProfile ui modules ([#6928](https://github.com/dynamic-labs/DynamicAuth/issues/6928)) ([a11a4a5](https://github.com/dynamic-labs/DynamicAuth/commit/a11a4a5d6e25ce2a916ebd52f0b341020dc1a7e5))
|
|
23
|
+
|
|
2
24
|
## [4.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2024-09-17)
|
|
3
25
|
|
|
4
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/message-transport",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -26,12 +26,13 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.534",
|
|
29
30
|
"@vue/reactivity": "3.4.21",
|
|
30
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
31
|
+
"@dynamic-labs/types": "4.0.0-alpha.3",
|
|
31
32
|
"eventemitter3": "5.0.1"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
35
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
35
|
+
"@dynamic-labs/logger": "4.0.0-alpha.3",
|
|
36
|
+
"@dynamic-labs/utils": "4.0.0-alpha.3"
|
|
36
37
|
}
|
|
37
38
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export { parseMessageTransportData } from './utils/parseMessageTransportData';
|
|
|
5
5
|
export { serializeErrorForTransport } from './utils/serializeErrorForTransport';
|
|
6
6
|
export { createEventEmitterForMessages, createStore, createStoreSetter, type CreateStoreProps, type MessagesForEventEmitter, } from './store';
|
|
7
7
|
export type { Store, StoreEventListeners, StoreKeys, StoreSetter, StoreStateChangeEvent, StoreStateEvents, StoreStateGetters, } from './store/types';
|
|
8
|
-
export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type ConsoleMessages, type EmailOtpParams, type EmbeddedWalletsModuleMessages, type EmbeddedWalletsModuleState, type EthMessages, type EthRequestWithAddressParams, type EthRequestWithChainIdParams, type ExternalAuthMessages, type FetchMessages, type NetworksModuleState, type OtpMessages, type PasskeyMessages, type PlatformServiceMessages, type SdkModuleMessages, type SdkModuleState, type SignInWithExternalJwtParams, type SmsOtpParams, type SecureStorageMessages, type SocialAuthModuleMessages, type SocialProvider, type SolanaMessages, type UserInterfaceModuleMessages, type VerifyWithExternalJwtParams, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, } from './messageTypes';
|
|
8
|
+
export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type ConsoleMessages, type CreateEmbeddedWalletArgs, type EmailOtpParams, type EmbeddedWalletsModuleMessages, type EmbeddedWalletsModuleState, type EthMessages, type EthRequestWithAddressParams, type EthRequestWithChainIdParams, type ExternalAuthMessages, type FetchMessages, type NetworksModuleState, type OtpMessages, type PasskeyMessages, type PlatformServiceMessages, type SdkModuleMessages, type SdkModuleState, type SignInWithExternalJwtParams, type SmsOtpParams, type SecureStorageMessages, type SocialAuthModuleMessages, type SocialProvider, type SolanaMessages, type UserInterfaceModuleMessages, type VerifyWithExternalJwtParams, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, } from './messageTypes';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { EmbeddedWalletChainEnum } from '@dynamic-labs/sdk-api-core';
|
|
1
2
|
import { BaseWallet } from '@dynamic-labs/types';
|
|
3
|
+
export type CreateEmbeddedWalletArgs = {
|
|
4
|
+
chain?: keyof typeof EmbeddedWalletChainEnum;
|
|
5
|
+
};
|
|
2
6
|
export type EmbeddedWalletsModuleState = {
|
|
3
7
|
hasWallet: boolean;
|
|
4
8
|
};
|
|
5
9
|
export type EmbeddedWalletsModuleMessages = {
|
|
6
10
|
getWallet: () => Promise<BaseWallet | null>;
|
|
7
|
-
createWallet: () => Promise<BaseWallet>;
|
|
11
|
+
createWallet: (args?: CreateEmbeddedWalletArgs) => Promise<BaseWallet>;
|
|
8
12
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type UserInterfaceModuleMessages = {
|
|
2
2
|
openUserProfile: () => void;
|
|
3
|
+
hideUserProfile: () => void;
|
|
3
4
|
openAuthFlow: () => void;
|
|
5
|
+
hideAuthFlow: () => void;
|
|
4
6
|
/** Opens the secret key export for embedded wallets */
|
|
5
7
|
revealEmbeddedWalletKey: (params: {
|
|
6
8
|
type: 'recovery-phrase' | 'private-key';
|
|
@@ -158,15 +158,15 @@ const createRequestChannel = (messageTransport) => {
|
|
|
158
158
|
};
|
|
159
159
|
const cleanup = () => messageTransport.off(handleMessage);
|
|
160
160
|
messageTransport.on(handleMessage);
|
|
161
|
+
// And start the time out timer
|
|
162
|
+
const timeoutTimer = setTimeout(() => reject(createNoHandlerError(requestType, cleanup)), TIMEOUT_DURATION);
|
|
163
|
+
timeoutMap[messageSessionId] = timeoutTimer;
|
|
161
164
|
// Now we emit the event to set off the request
|
|
162
165
|
messageTransport.emit({
|
|
163
166
|
args: params,
|
|
164
167
|
messageSessionId,
|
|
165
168
|
type: requestType,
|
|
166
169
|
});
|
|
167
|
-
// And start the time out timer
|
|
168
|
-
const timeoutTimer = setTimeout(() => reject(createNoHandlerError(requestType, cleanup)), TIMEOUT_DURATION);
|
|
169
|
-
timeoutMap[messageSessionId] = timeoutTimer;
|
|
170
170
|
}),
|
|
171
171
|
};
|
|
172
172
|
};
|
|
@@ -154,15 +154,15 @@ const createRequestChannel = (messageTransport) => {
|
|
|
154
154
|
};
|
|
155
155
|
const cleanup = () => messageTransport.off(handleMessage);
|
|
156
156
|
messageTransport.on(handleMessage);
|
|
157
|
+
// And start the time out timer
|
|
158
|
+
const timeoutTimer = setTimeout(() => reject(createNoHandlerError(requestType, cleanup)), TIMEOUT_DURATION);
|
|
159
|
+
timeoutMap[messageSessionId] = timeoutTimer;
|
|
157
160
|
// Now we emit the event to set off the request
|
|
158
161
|
messageTransport.emit({
|
|
159
162
|
args: params,
|
|
160
163
|
messageSessionId,
|
|
161
164
|
type: requestType,
|
|
162
165
|
});
|
|
163
|
-
// And start the time out timer
|
|
164
|
-
const timeoutTimer = setTimeout(() => reject(createNoHandlerError(requestType, cleanup)), TIMEOUT_DURATION);
|
|
165
|
-
timeoutMap[messageSessionId] = timeoutTimer;
|
|
166
166
|
}),
|
|
167
167
|
};
|
|
168
168
|
};
|