@dynamic-labs/message-transport 2.0.0-alpha.30 → 2.0.0-alpha.32

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,19 @@
1
1
 
2
+ ## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
3
+
4
+ ## [2.0.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2024-04-11)
5
+
6
+
7
+ ### Features
8
+
9
+ * support adding email for recovery to existing embedded wallet ([#5128](https://github.com/dynamic-labs/DynamicAuth/issues/5128)) ([477fd81](https://github.com/dynamic-labs/DynamicAuth/commit/477fd81ac00864284d9d2183c0b8c078a0a23a2b))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * issue where customer also tries to use i18n.init ([#5267](https://github.com/dynamic-labs/DynamicAuth/issues/5267)) ([7f81f1e](https://github.com/dynamic-labs/DynamicAuth/commit/7f81f1e010fbc6408f6a5d6a37608235e947befa))
15
+ * smart wallet not loading correctly upon refresh when using non-embedded eoa wallet ([#5301](https://github.com/dynamic-labs/DynamicAuth/issues/5301)) ([e957317](https://github.com/dynamic-labs/DynamicAuth/commit/e9573173f6209773a0be5f4af37323f2be8d7906))
16
+
2
17
  ## [2.0.0-alpha.30](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2024-04-11)
3
18
 
4
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/message-transport",
3
- "version": "2.0.0-alpha.30",
3
+ "version": "2.0.0-alpha.32",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,7 +26,8 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "peerDependencies": {
29
- "@dynamic-labs/types": "2.0.0-alpha.30",
29
+ "@dynamic-labs/sdk-react-core": "2.0.0-alpha.32",
30
+ "@dynamic-labs/types": "2.0.0-alpha.32",
30
31
  "eventemitter3": "5.0.1"
31
32
  }
32
33
  }
package/src/index.d.ts CHANGED
@@ -3,4 +3,4 @@ export { createRequestChannel, type RequestChannel } from './requestChannel';
3
3
  export { parseMessageTransportData } from './utils/parseMessageTransportData';
4
4
  export { createEventEmitterForMessages, createStore, createStoreSetter, type MessagesForEventEmitter, } from './store';
5
5
  export type { Store, StoreKeys, StoreSetter, StoreStateEvents, StoreStateGetters, } from './store/types';
6
- export { sdkHasLoadedEventName, type ClientManifest, type SdkModuleMessages, type SdkModuleState, type WalletsModuleState, } from './messageTypes';
6
+ export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type OtpExtensionMessages, type SdkModuleMessages, type SdkModuleState, type WalletsModuleState, } from './messageTypes';
@@ -0,0 +1,9 @@
1
+ import type { UserProfile } from '@dynamic-labs/sdk-react-core';
2
+ export type AuthModuleState = {
3
+ authToken: string | null;
4
+ authenticatedUser: UserProfile | null;
5
+ };
6
+ export type AuthModuleMessages = {
7
+ logout: () => Promise<void>;
8
+ login: () => Promise<void>;
9
+ };
@@ -0,0 +1,17 @@
1
+ import { OtpDestination, PhoneData } from '@dynamic-labs/sdk-react-core';
2
+ type OtpData = {
3
+ destination: Extract<OtpDestination, 'email'>;
4
+ target: string;
5
+ } | {
6
+ destination: Extract<OtpDestination, 'sms'>;
7
+ target: PhoneData;
8
+ };
9
+ export type OtpExtensionMessages = {
10
+ /** Request to send an OTP to a destination for verification */
11
+ sendOTP: (data: OtpData) => Promise<void>;
12
+ /** Performs verification for the latest send OTP */
13
+ verifyOTP: (token: string) => Promise<void>;
14
+ /** Re-sends the OTP for verification */
15
+ resendOTP: () => Promise<void>;
16
+ };
17
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { BaseWallet } from '@dynamic-labs/types';
2
2
  export type WalletsModuleState = {
3
3
  userWallets: BaseWallet[];
4
- primaryWallet: BaseWallet | undefined;
4
+ primary: BaseWallet | undefined;
5
5
  };
@@ -1,2 +1,4 @@
1
+ export * from './AuthModuleMessages';
2
+ export * from './OtpExtensionMessages';
1
3
  export * from './SdkModuleMessages';
2
4
  export * from './WalletsModuleMessages';
@@ -1,5 +1,5 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- export type StoreKeys = 'sdk' | 'wallets';
2
+ export type StoreKeys = 'auth' | 'sdk' | 'wallets';
3
3
  /**
4
4
  * Readonly getters for the store values
5
5
  */