@dynamic-labs/message-transport 2.1.0-alpha.19 → 2.1.0-alpha.20

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,18 @@
1
1
 
2
+ ## [2.1.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.19...v2.1.0-alpha.20) (2024-05-21)
3
+
4
+
5
+ ### Features
6
+
7
+ * adds client.networks module ([#5650](https://github.com/dynamic-labs/DynamicAuth/issues/5650)) ([70f7fe5](https://github.com/dynamic-labs/DynamicAuth/commit/70f7fe5f437756c51e787ac12183be0a23c51b89))
8
+ * user fields supports custom fields ([#5639](https://github.com/dynamic-labs/DynamicAuth/issues/5639)) ([8eb5788](https://github.com/dynamic-labs/DynamicAuth/commit/8eb5788fc3e1286929f5949ecb57736b21b13fb5))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add webcredentials to expo ([#5640](https://github.com/dynamic-labs/DynamicAuth/issues/5640)) ([9026fbf](https://github.com/dynamic-labs/DynamicAuth/commit/9026fbf0108537e884588f3adcdb9f0db04a159b))
14
+ * init ethers web3provider without a network if selected network is unsupported ([#5651](https://github.com/dynamic-labs/DynamicAuth/issues/5651)) ([e82040f](https://github.com/dynamic-labs/DynamicAuth/commit/e82040f424b17a70fac4400ab5b85a0dc6c0e35a))
15
+
2
16
  ## [2.1.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.18...v2.1.0-alpha.19) (2024-05-17)
3
17
 
4
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/message-transport",
3
- "version": "2.1.0-alpha.19",
3
+ "version": "2.1.0-alpha.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@vue/reactivity": "3.4.21",
30
- "@dynamic-labs/types": "2.1.0-alpha.19",
30
+ "@dynamic-labs/types": "2.1.0-alpha.20",
31
31
  "eventemitter3": "5.0.1"
32
32
  }
33
33
  }
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 MessagesForEventEmitter, } from './store';
7
7
  export type { Store, StoreEventListeners, StoreKeys, StoreSetter, StoreStateEvents, StoreStateGetters, } from './store/types';
8
- export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type ConsoleMessages, type EmbeddedWalletsModuleMessages, type EmbeddedWalletsModuleState, type EthMessages, type FetchMessages, type OtpMessages, type PasskeyMessages, type SdkModuleMessages, type SdkModuleState, type UserInterfaceModuleMessages, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, } from './messageTypes';
8
+ export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type ConsoleMessages, type EmbeddedWalletsModuleMessages, type EmbeddedWalletsModuleState, type EthMessages, type FetchMessages, type OtpMessages, type PasskeyMessages, type SdkModuleMessages, type SdkModuleState, type UserInterfaceModuleMessages, type WalletsModuleMessages, type WalletsModuleState, type WebViewVisibilityMessages, type NetworksModuleState, } from './messageTypes';
@@ -1,4 +1,11 @@
1
1
  import { SerializedError } from '../utils/serializeErrorForTransport';
2
2
  export type ConsoleMessages = {
3
- error: (serializedError: SerializedError) => void;
3
+ error: (serializedError: SerializedError, props: {
4
+ /**
5
+ * Describes the severity of the error sent to the host.
6
+ * fatal: The error has not been handled and the SDK is unusable.
7
+ * log-only: The error has been handled but should still be logged.
8
+ */
9
+ severity: 'fatal' | 'log-only';
10
+ }) => void;
4
11
  };
@@ -0,0 +1,4 @@
1
+ import { GenericNetwork } from '@dynamic-labs/types';
2
+ export type NetworksModuleState = {
3
+ evm: GenericNetwork[];
4
+ };
@@ -9,3 +9,4 @@ export * from './SdkModuleMessages';
9
9
  export * from './UserInterfaceModuleMessages';
10
10
  export * from './WalletsModuleMessages';
11
11
  export * from './WebViewVisibilityMessages';
12
+ export * from './NetworksModuleMessages';
@@ -1,5 +1,5 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- export type StoreKeys = 'auth' | 'sdk' | 'wallets' | 'embeddedWallets';
2
+ export type StoreKeys = 'auth' | 'sdk' | 'wallets' | 'embeddedWallets' | 'networks';
3
3
  /**
4
4
  * Readonly getters for the store values
5
5
  */
@@ -44,7 +44,7 @@ const parseErrorFromTransport = (serializedError) => {
44
44
  }
45
45
  // Reattach the stack trace and any other enumerable properties
46
46
  if (stack) {
47
- error.stack = stack;
47
+ error.stack = [message, stack].join('\n');
48
48
  }
49
49
  // Reattach other custom properties that may have been serialized
50
50
  Object.assign(error, otherProps);
@@ -40,7 +40,7 @@ const parseErrorFromTransport = (serializedError) => {
40
40
  }
41
41
  // Reattach the stack trace and any other enumerable properties
42
42
  if (stack) {
43
- error.stack = stack;
43
+ error.stack = [message, stack].join('\n');
44
44
  }
45
45
  // Reattach other custom properties that may have been serialized
46
46
  Object.assign(error, otherProps);