@dynamic-labs/client 2.1.0-alpha.1 → 2.1.0-alpha.11

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,96 @@
1
1
 
2
+ ## [2.1.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.10...v2.1.0-alpha.11) (2024-05-02)
3
+
4
+
5
+ ### Features
6
+
7
+ * **GVTY-1050:** add account token balances hook ([#5521](https://github.com/dynamic-labs/DynamicAuth/issues/5521)) ([5a6f937](https://github.com/dynamic-labs/DynamicAuth/commit/5a6f93733019f3b8d5c7a2c7a5537172a1e7eba4))
8
+ * headless reveal embedded wallet key ([#5518](https://github.com/dynamic-labs/DynamicAuth/issues/5518)) ([77c1536](https://github.com/dynamic-labs/DynamicAuth/commit/77c15360b2b28c52cbdeafb3ce8ca7e80dbecf57))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fallback to walletconnect for zerion on mobile ([#5536](https://github.com/dynamic-labs/DynamicAuth/issues/5536)) ([f0e5bfe](https://github.com/dynamic-labs/DynamicAuth/commit/f0e5bfea0b2ab271fd4c1475c8ce708ecb1a5926))
14
+
15
+ ## [2.1.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.9...v2.1.0-alpha.10) (2024-04-30)
16
+
17
+
18
+ ### Features
19
+
20
+ * bump @coinbase/wallet-sdk to latest beta ([#5388](https://github.com/dynamic-labs/DynamicAuth/issues/5388)) ([9225546](https://github.com/dynamic-labs/DynamicAuth/commit/922554630ccf2ef98bc297521309918f922bc671))
21
+
22
+ ## [2.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.8...v2.1.0-alpha.9) (2024-04-30)
23
+
24
+
25
+ ### Features
26
+
27
+ * headless create embedded wallet with optional passkey data parameter ([#5487](https://github.com/dynamic-labs/DynamicAuth/issues/5487)) ([891c3d7](https://github.com/dynamic-labs/DynamicAuth/commit/891c3d77a02a019140bcb8dd03b62b1afd69710e))
28
+
29
+ ## [2.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.7...v2.1.0-alpha.8) (2024-04-26)
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * display wallet tabs when linking a wallet ([#5491](https://github.com/dynamic-labs/DynamicAuth/issues/5491)) ([10fd6b4](https://github.com/dynamic-labs/DynamicAuth/commit/10fd6b4d9aec7596338c50e17f79f6be534cf2c1))
35
+ * ensure zerodev viem client handles eth_accounts call ([#5477](https://github.com/dynamic-labs/DynamicAuth/issues/5477)) ([1132e1e](https://github.com/dynamic-labs/DynamicAuth/commit/1132e1e8655b58e81cb56789453ba56a059f52ec))
36
+ * network with keplr ([#5485](https://github.com/dynamic-labs/DynamicAuth/issues/5485)) ([b86f2fc](https://github.com/dynamic-labs/DynamicAuth/commit/b86f2fce491f9752e80a86643916da9ac7fb9276))
37
+ * refetch nameservice data and display properly ([#5476](https://github.com/dynamic-labs/DynamicAuth/issues/5476)) ([2aee798](https://github.com/dynamic-labs/DynamicAuth/commit/2aee798846f69496201bec7aa52e7ec1f370b7c3))
38
+ * use embeddedWallet create response authToken in embeddedWalletCreated ([#5478](https://github.com/dynamic-labs/DynamicAuth/issues/5478)) ([51772da](https://github.com/dynamic-labs/DynamicAuth/commit/51772daf557a72984c757efd8301e2b510dc37f1))
39
+
40
+ ## [2.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.6...v2.1.0-alpha.7) (2024-04-25)
41
+
42
+
43
+ ### Bug Fixes
44
+
45
+ * restore embedded wallet session iframe element conflict ([#5474](https://github.com/dynamic-labs/DynamicAuth/issues/5474)) ([c157477](https://github.com/dynamic-labs/DynamicAuth/commit/c157477ea126b3130b13b711796bdd06215e7af1))
46
+
47
+ ## [2.1.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.5...v2.1.0-alpha.6) (2024-04-24)
48
+
49
+
50
+ ### Bug Fixes
51
+
52
+ * embedded wallets headless session control fixes ([#5469](https://github.com/dynamic-labs/DynamicAuth/issues/5469)) ([92e6c35](https://github.com/dynamic-labs/DynamicAuth/commit/92e6c359d2710fd4f5f5a6fedc4acf6c4bab78ba))
53
+
54
+ ## [2.1.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.4...v2.1.0-alpha.5) (2024-04-23)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * get embedded wallet checking the wrong chain enum ([#5458](https://github.com/dynamic-labs/DynamicAuth/issues/5458)) ([ed1c523](https://github.com/dynamic-labs/DynamicAuth/commit/ed1c523ca14cd4d21c00181ab40802f876c02b80))
60
+
61
+ ## [2.1.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.3...v2.1.0-alpha.4) (2024-04-23)
62
+
63
+
64
+ ### Features
65
+
66
+ * add email and sms to client auth module ([#5436](https://github.com/dynamic-labs/DynamicAuth/issues/5436)) ([5420476](https://github.com/dynamic-labs/DynamicAuth/commit/5420476d1ba38fd4f987f28e9aefbfb3e61ea2bf))
67
+ * headless create passkeys for embedded wallets ([#5395](https://github.com/dynamic-labs/DynamicAuth/issues/5395)) ([0b64099](https://github.com/dynamic-labs/DynamicAuth/commit/0b6409968457f65886248f0a0879e39ec3803fd0))
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * prevent wagmi from reconnect when DynamicContextProvider rerender ([#5446](https://github.com/dynamic-labs/DynamicAuth/issues/5446)) ([33337af](https://github.com/dynamic-labs/DynamicAuth/commit/33337af76786963cb3db7fa7c58c1292c529d0ac))
73
+
74
+ ## [2.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.2...v2.1.0-alpha.3) (2024-04-23)
75
+
76
+
77
+ ### Features
78
+
79
+ * add merge user accounts flow ([#5429](https://github.com/dynamic-labs/DynamicAuth/issues/5429)) ([41d4239](https://github.com/dynamic-labs/DynamicAuth/commit/41d423906625e28004ba8f20baf57847ed8bf5d0))
80
+
81
+
82
+ ### Bug Fixes
83
+
84
+ * disconnect wallet on lock in connect-only ([#5422](https://github.com/dynamic-labs/DynamicAuth/issues/5422)) ([a26f9fe](https://github.com/dynamic-labs/DynamicAuth/commit/a26f9fe93cf8568f1482e10b831de98c77fb2a2d))
85
+ * useReactiveProxy to stop proxing when it finds a reactive value ([#5428](https://github.com/dynamic-labs/DynamicAuth/issues/5428)) ([838dce9](https://github.com/dynamic-labs/DynamicAuth/commit/838dce9ee953361e41772239a91adb1dd8d40234))
86
+
87
+ ## [2.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.1...v2.1.0-alpha.2) (2024-04-19)
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([bd40441](https://github.com/dynamic-labs/DynamicAuth/commit/bd404414a2e51d79fad86d7603dae89628c225b9))
93
+
2
94
  ## [2.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.0...v2.1.0-alpha.1) (2024-04-18)
3
95
 
4
96
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "2.1.0-alpha.1";
6
+ var version = "2.1.0-alpha.11";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "2.1.0-alpha.1";
2
+ var version = "2.1.0-alpha.11";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/client",
3
- "version": "2.1.0-alpha.1",
3
+ "version": "2.1.0-alpha.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,10 +26,10 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/message-transport": "2.1.0-alpha.1"
29
+ "@dynamic-labs/message-transport": "2.1.0-alpha.11"
30
30
  },
31
31
  "peerDependencies": {
32
- "@dynamic-labs/types": "2.1.0-alpha.1",
32
+ "@dynamic-labs/types": "2.1.0-alpha.11",
33
33
  "eventemitter3": "5.0.1"
34
34
  }
35
35
  }
@@ -5,8 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var messageTransport = require('@dynamic-labs/message-transport');
7
7
  var pickListenerActions = require('../../utils/pickListenerActions/pickListenerActions.cjs');
8
+ var smsAuthModule = require('../smsAuthModule/smsAuthModule.cjs');
9
+ var emailAuthModule = require('../emailAuthModule/emailAuthModule.cjs');
8
10
 
9
11
  const createAuthModule = (core) => {
12
+ const email = emailAuthModule.createEmailAuthModule(core);
13
+ const sms = smsAuthModule.createSmsAuthModule(core);
10
14
  const store = messageTransport.createStore({
11
15
  initialState: {
12
16
  authenticatedUser: null,
@@ -22,7 +26,9 @@ const createAuthModule = (core) => {
22
26
  });
23
27
  const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
24
28
  return Object.assign(store.getters, pickListenerActions.pickListenerActions(messageEvents), {
29
+ email,
25
30
  logout: () => requestChannel.request('logout'),
31
+ sms,
26
32
  });
27
33
  };
28
34
 
@@ -1,4 +1,9 @@
1
1
  import { AuthModuleMessages, AuthModuleState, StoreEventListeners } from '@dynamic-labs/message-transport';
2
2
  import { Core } from '../../client/core';
3
- export type AuthModule = AuthModuleState & StoreEventListeners<AuthModuleState> & Pick<AuthModuleMessages, 'logout'>;
3
+ import { SmsAuthModule } from '../smsAuthModule';
4
+ import { EmailAuthModule } from '../emailAuthModule';
5
+ export type AuthModule = AuthModuleState & StoreEventListeners<AuthModuleState> & Pick<AuthModuleMessages, 'logout'> & {
6
+ sms: SmsAuthModule;
7
+ email: EmailAuthModule;
8
+ };
4
9
  export declare const createAuthModule: (core: Core) => AuthModule;
@@ -1,8 +1,12 @@
1
1
  'use client'
2
2
  import { createStore, createEventEmitterForMessages, createRequestChannel } from '@dynamic-labs/message-transport';
3
3
  import { pickListenerActions } from '../../utils/pickListenerActions/pickListenerActions.js';
4
+ import { createSmsAuthModule } from '../smsAuthModule/smsAuthModule.js';
5
+ import { createEmailAuthModule } from '../emailAuthModule/emailAuthModule.js';
4
6
 
5
7
  const createAuthModule = (core) => {
8
+ const email = createEmailAuthModule(core);
9
+ const sms = createSmsAuthModule(core);
6
10
  const store = createStore({
7
11
  initialState: {
8
12
  authenticatedUser: null,
@@ -18,7 +22,9 @@ const createAuthModule = (core) => {
18
22
  });
19
23
  const requestChannel = createRequestChannel(core.messageTransport);
20
24
  return Object.assign(store.getters, pickListenerActions(messageEvents), {
25
+ email,
21
26
  logout: () => requestChannel.request('logout'),
27
+ sms,
22
28
  });
23
29
  };
24
30
 
@@ -0,0 +1,17 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+
8
+ const createEmailAuthModule = (core) => {
9
+ const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
10
+ return {
11
+ resendOTP: () => requestChannel.request('resendOTP'),
12
+ sendOTP: (target) => requestChannel.request('sendOTP', { destination: 'email', target }),
13
+ verifyOTP: (token) => requestChannel.request('verifyOTP', token),
14
+ };
15
+ };
16
+
17
+ exports.createEmailAuthModule = createEmailAuthModule;
@@ -0,0 +1,7 @@
1
+ import { Core } from '../../client/core';
2
+ export declare const createEmailAuthModule: (core: Core) => {
3
+ resendOTP: () => Promise<void>;
4
+ sendOTP: (target: string) => Promise<void>;
5
+ verifyOTP: (token: string) => Promise<void>;
6
+ };
7
+ export type EmailAuthModule = ReturnType<typeof createEmailAuthModule>;
@@ -0,0 +1,13 @@
1
+ 'use client'
2
+ import { createRequestChannel } from '@dynamic-labs/message-transport';
3
+
4
+ const createEmailAuthModule = (core) => {
5
+ const requestChannel = createRequestChannel(core.messageTransport);
6
+ return {
7
+ resendOTP: () => requestChannel.request('resendOTP'),
8
+ sendOTP: (target) => requestChannel.request('sendOTP', { destination: 'email', target }),
9
+ verifyOTP: (token) => requestChannel.request('verifyOTP', token),
10
+ };
11
+ };
12
+
13
+ export { createEmailAuthModule };
@@ -0,0 +1 @@
1
+ export { createEmailAuthModule, type EmailAuthModule } from './emailAuthModule';
@@ -0,0 +1 @@
1
+ export { createSmsAuthModule, type SmsAuthModule } from './smsAuthModule';
@@ -0,0 +1,17 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+
8
+ const createSmsAuthModule = (core) => {
9
+ const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
10
+ return {
11
+ resendOTP: () => requestChannel.request('resendOTP'),
12
+ sendOTP: (target) => requestChannel.request('sendOTP', { destination: 'sms', target }),
13
+ verifyOTP: (token) => requestChannel.request('verifyOTP', token),
14
+ };
15
+ };
16
+
17
+ exports.createSmsAuthModule = createSmsAuthModule;
@@ -0,0 +1,8 @@
1
+ import { PhoneData } from '@dynamic-labs/types';
2
+ import { Core } from '../../client/core';
3
+ export declare const createSmsAuthModule: (core: Core) => {
4
+ resendOTP: () => Promise<void>;
5
+ sendOTP: (target: PhoneData) => Promise<void>;
6
+ verifyOTP: (token: string) => Promise<void>;
7
+ };
8
+ export type SmsAuthModule = ReturnType<typeof createSmsAuthModule>;
@@ -0,0 +1,13 @@
1
+ 'use client'
2
+ import { createRequestChannel } from '@dynamic-labs/message-transport';
3
+
4
+ const createSmsAuthModule = (core) => {
5
+ const requestChannel = createRequestChannel(core.messageTransport);
6
+ return {
7
+ resendOTP: () => requestChannel.request('resendOTP'),
8
+ sendOTP: (target) => requestChannel.request('sendOTP', { destination: 'sms', target }),
9
+ verifyOTP: (token) => requestChannel.request('verifyOTP', token),
10
+ };
11
+ };
12
+
13
+ export { createSmsAuthModule };