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

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,20 @@
1
1
 
2
+ ## [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
+
4
+
5
+ ### Features
6
+
7
+ * add createUserProfileFromSDKUser ([#5596](https://github.com/dynamic-labs/DynamicAuth/issues/5596)) ([d37a1b4](https://github.com/dynamic-labs/DynamicAuth/commit/d37a1b4119f5ff4fff1e987d157f6d5abf105a8b))
8
+ * add headless social sign-in ([#5439](https://github.com/dynamic-labs/DynamicAuth/issues/5439)) ([e32fdf8](https://github.com/dynamic-labs/DynamicAuth/commit/e32fdf863718d661b90b592c8df734e92386ddf3))
9
+ * fetch custom fields in profile and update user ([#5627](https://github.com/dynamic-labs/DynamicAuth/issues/5627)) ([3940c25](https://github.com/dynamic-labs/DynamicAuth/commit/3940c2542bb330f3ed9a8eb98eed9d05c8fcb03a))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * include applinks details to AASA ([#5635](https://github.com/dynamic-labs/DynamicAuth/issues/5635)) ([ce94fec](https://github.com/dynamic-labs/DynamicAuth/commit/ce94fec80adbb3eb4efcb79d1aa2cc6eb35eab6f))
15
+ * include the appOrigin to every api call to create correct passkey ([#5636](https://github.com/dynamic-labs/DynamicAuth/issues/5636)) ([ee64df3](https://github.com/dynamic-labs/DynamicAuth/commit/ee64df3b90037bd29cca161e601973ef202c58f0))
16
+ * use PromptModal when using the DynamicMultiWalletPromptsWidget for pending connection views ([#5594](https://github.com/dynamic-labs/DynamicAuth/issues/5594)) ([c095b6e](https://github.com/dynamic-labs/DynamicAuth/commit/c095b6e4c974f02cfe632963be92d16bb201dfa5))
17
+
2
18
  ## [2.1.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.17...v2.1.0-alpha.18) (2024-05-15)
3
19
 
4
20
  ## [2.1.0-alpha.17](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.16...v2.1.0-alpha.17) (2024-05-15)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/message-transport",
3
- "version": "2.1.0-alpha.18",
3
+ "version": "2.1.0-alpha.19",
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.18",
30
+ "@dynamic-labs/types": "2.1.0-alpha.19",
31
31
  "eventemitter3": "5.0.1"
32
32
  }
33
33
  }
package/src/index.cjs CHANGED
@@ -8,9 +8,9 @@ var applyDefaultMessageOrigin = require('./messageTransport/decorators/applyDefa
8
8
  var makeWaitForInitEvent = require('./messageTransport/decorators/makeWaitForInitEvent/makeWaitForInitEvent.cjs');
9
9
  var makeWaitForUnblock = require('./messageTransport/decorators/makeWaitForUnblock/makeWaitForUnblock.cjs');
10
10
  var requestChannel = require('./requestChannel/requestChannel.cjs');
11
+ var parseErrorFromTransport = require('./utils/parseErrorFromTransport/parseErrorFromTransport.cjs');
11
12
  var parseMessageTransportData = require('./utils/parseMessageTransportData/parseMessageTransportData.cjs');
12
13
  var serializeErrorForTransport = require('./utils/serializeErrorForTransport/serializeErrorForTransport.cjs');
13
- var parseErrorFromTransport = require('./utils/parseErrorFromTransport/parseErrorFromTransport.cjs');
14
14
  var createEventEmitterForMessages = require('./store/createEventEmitterForMessages/createEventEmitterForMessages.cjs');
15
15
  var store = require('./store/store.cjs');
16
16
  var storeSetter = require('./store/storeSetter/storeSetter.cjs');
@@ -23,9 +23,9 @@ exports.applyDefaultMessageOrigin = applyDefaultMessageOrigin.applyDefaultMessag
23
23
  exports.makeWaitForInitEvent = makeWaitForInitEvent.makeWaitForInitEvent;
24
24
  exports.makeWaitForUnblock = makeWaitForUnblock.makeWaitForUnblock;
25
25
  exports.createRequestChannel = requestChannel.createRequestChannel;
26
+ exports.parseErrorFromTransport = parseErrorFromTransport.parseErrorFromTransport;
26
27
  exports.parseMessageTransportData = parseMessageTransportData.parseMessageTransportData;
27
28
  exports.serializeErrorForTransport = serializeErrorForTransport.serializeErrorForTransport;
28
- exports.parseErrorFromTransport = parseErrorFromTransport.parseErrorFromTransport;
29
29
  exports.createEventEmitterForMessages = createEventEmitterForMessages.createEventEmitterForMessages;
30
30
  exports.createStore = store.createStore;
31
31
  exports.createStoreSetter = storeSetter.createStoreSetter;
package/src/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { applyDefaultMessageOrigin, createMessageTransport, makeWaitForInitEvent, makeWaitForUnblock, type BypassBlockCallback, type MessageTransport, type MessageTransportCallback, type MessageTransportData, type MessageTransportDataOptionalOrigin, type MessageTransportWithDefaultOrigin, } from './messageTransport';
2
2
  export { createRequestChannel, type RequestChannel } from './requestChannel';
3
+ export { parseErrorFromTransport } from './utils/parseErrorFromTransport';
3
4
  export { parseMessageTransportData } from './utils/parseMessageTransportData';
4
5
  export { serializeErrorForTransport } from './utils/serializeErrorForTransport';
5
- export { parseErrorFromTransport } from './utils/parseErrorFromTransport';
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 OtpMessages, type SdkModuleMessages, type SdkModuleState, type EthMessages, type WalletsModuleState, type ConsoleMessages, type WebViewVisibilityMessages, type UserInterfaceModuleMessages, } 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, } from './messageTypes';
package/src/index.js CHANGED
@@ -4,9 +4,9 @@ export { applyDefaultMessageOrigin } from './messageTransport/decorators/applyDe
4
4
  export { makeWaitForInitEvent } from './messageTransport/decorators/makeWaitForInitEvent/makeWaitForInitEvent.js';
5
5
  export { makeWaitForUnblock } from './messageTransport/decorators/makeWaitForUnblock/makeWaitForUnblock.js';
6
6
  export { createRequestChannel } from './requestChannel/requestChannel.js';
7
+ export { parseErrorFromTransport } from './utils/parseErrorFromTransport/parseErrorFromTransport.js';
7
8
  export { parseMessageTransportData } from './utils/parseMessageTransportData/parseMessageTransportData.js';
8
9
  export { serializeErrorForTransport } from './utils/serializeErrorForTransport/serializeErrorForTransport.js';
9
- export { parseErrorFromTransport } from './utils/parseErrorFromTransport/parseErrorFromTransport.js';
10
10
  export { createEventEmitterForMessages } from './store/createEventEmitterForMessages/createEventEmitterForMessages.js';
11
11
  export { createStore } from './store/store.js';
12
12
  export { createStoreSetter } from './store/storeSetter/storeSetter.js';
@@ -0,0 +1,8 @@
1
+ import { BaseWallet } from '@dynamic-labs/types';
2
+ export type EmbeddedWalletsModuleState = {
3
+ hasWallet: boolean;
4
+ };
5
+ export type EmbeddedWalletsModuleMessages = {
6
+ getWallet: () => Promise<BaseWallet | null>;
7
+ createWallet: () => Promise<BaseWallet>;
8
+ };
@@ -4,10 +4,10 @@
4
4
  export type EthMessages = {
5
5
  ethRequest(props: {
6
6
  method: string;
7
- args: readonly unknown[];
7
+ params: readonly unknown[];
8
8
  } & ({
9
9
  address: string;
10
10
  } | {
11
- chainId: number | string;
11
+ chainId: number;
12
12
  })): Promise<string>;
13
13
  };
@@ -0,0 +1,8 @@
1
+ export type FetchMessages = {
2
+ fetch: (input: RequestInfo, init?: RequestInit) => Promise<{
3
+ body: string;
4
+ status: number;
5
+ statusText: string;
6
+ headers: Record<string, string>;
7
+ }>;
8
+ };
@@ -0,0 +1,32 @@
1
+ type CustomPublicKeyCredentialUserEntity = Omit<PublicKeyCredentialUserEntity, 'id'> & {
2
+ id: string;
3
+ };
4
+ type CustomPublicKeyCredentialRpEntity = Omit<PublicKeyCredentialRpEntity, 'id'> & {
5
+ id: string;
6
+ };
7
+ export type PasskeyMessages = {
8
+ createPasskey: (params: {
9
+ publicKey: {
10
+ authenticatorName: string;
11
+ attestation?: AttestationConveyancePreference;
12
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
13
+ challenge?: string;
14
+ pubKeyCredParams: PublicKeyCredentialParameters[];
15
+ rp: CustomPublicKeyCredentialRpEntity;
16
+ timeout?: number;
17
+ user: CustomPublicKeyCredentialUserEntity;
18
+ };
19
+ }) => Promise<{
20
+ attestation: {
21
+ credentialId: string;
22
+ clientDataJson: string;
23
+ attestationObject: string;
24
+ transports: ('AUTHENTICATOR_TRANSPORT_BLE' | 'AUTHENTICATOR_TRANSPORT_INTERNAL' | 'AUTHENTICATOR_TRANSPORT_NFC' | 'AUTHENTICATOR_TRANSPORT_USB' | 'AUTHENTICATOR_TRANSPORT_HYBRID')[];
25
+ };
26
+ }>;
27
+ passkeyStamp: (rdId: string, payload: string) => Promise<{
28
+ stampHeaderName: string;
29
+ stampHeaderValue: string;
30
+ }>;
31
+ };
32
+ export {};
@@ -3,3 +3,25 @@ export type WalletsModuleState = {
3
3
  userWallets: BaseWallet[];
4
4
  primary: BaseWallet | undefined;
5
5
  };
6
+ export type WalletsModuleMessages = {
7
+ getBalance: (params: {
8
+ wallet: BaseWallet;
9
+ }) => Promise<{
10
+ balance: string;
11
+ }>;
12
+ signMessage: (params: {
13
+ wallet: BaseWallet;
14
+ message: string;
15
+ }) => Promise<{
16
+ signedMessage: string;
17
+ }>;
18
+ getNetwork: (params: {
19
+ wallet: BaseWallet;
20
+ }) => Promise<{
21
+ network: string | number;
22
+ }>;
23
+ switchNetwork: (params: {
24
+ wallet: BaseWallet;
25
+ chainId: string | number;
26
+ }) => Promise<void>;
27
+ };
@@ -1,8 +1,11 @@
1
1
  export * from './AuthModuleMessages';
2
+ export * from './ConsoleMessages';
3
+ export * from './EmbeddedWalletsModuleMessages';
2
4
  export * from './EthMessages';
5
+ export * from './FetchMessages';
3
6
  export * from './OtpMessages';
7
+ export * from './PasskeyMessages';
4
8
  export * from './SdkModuleMessages';
9
+ export * from './UserInterfaceModuleMessages';
5
10
  export * from './WalletsModuleMessages';
6
- export * from './ConsoleMessages';
7
11
  export * from './WebViewVisibilityMessages';
8
- export * from './UserInterfaceModuleMessages';
@@ -1,5 +1,5 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- export type StoreKeys = 'auth' | 'sdk' | 'wallets';
2
+ export type StoreKeys = 'auth' | 'sdk' | 'wallets' | 'embeddedWallets';
3
3
  /**
4
4
  * Readonly getters for the store values
5
5
  */