@dynamic-labs/client 2.1.0-alpha.3 → 2.1.0-alpha.31
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 +263 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +6 -4
- package/src/client/client.cjs +8 -2
- package/src/client/client.d.ts +11 -0
- package/src/client/client.js +8 -2
- package/src/client/core/core.cjs +12 -1
- package/src/client/core/core.d.ts +14 -2
- package/src/client/core/core.js +12 -1
- package/src/client/core/modules/initializationModule/index.d.ts +1 -0
- package/src/client/core/modules/initializationModule/initializationModule.cjs +33 -0
- package/src/client/core/modules/initializationModule/initializationModule.d.ts +6 -0
- package/src/client/core/modules/initializationModule/initializationModule.js +29 -0
- package/src/{modules/sdkModule/manifest/manifest.cjs → client/core/modules/manifestModule/createPartialManifest/createPartialManifest.cjs} +3 -3
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts +3 -0
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.js +13 -0
- package/src/client/core/modules/manifestModule/createPartialManifest/index.d.ts +1 -0
- package/src/client/core/modules/manifestModule/index.d.ts +1 -0
- package/src/client/core/modules/manifestModule/manifestModule.cjs +35 -0
- package/src/client/core/modules/manifestModule/manifestModule.d.ts +10 -0
- package/src/client/core/modules/manifestModule/manifestModule.js +31 -0
- package/src/client/core/modules/manifestModule/validateManifest/index.d.ts +1 -0
- package/src/client/core/modules/manifestModule/validateManifest/validateManifest.cjs +30 -0
- package/src/client/core/modules/manifestModule/validateManifest/validateManifest.d.ts +14 -0
- package/src/client/core/modules/manifestModule/validateManifest/validateManifest.js +25 -0
- package/src/index.d.ts +2 -0
- package/src/modules/authModule/authModule.cjs +6 -0
- package/src/modules/authModule/authModule.d.ts +10 -1
- package/src/modules/authModule/authModule.js +6 -0
- package/src/modules/authModule/emailAuthModule/emailAuthModule.cjs +20 -0
- package/src/modules/authModule/emailAuthModule/emailAuthModule.d.ts +8 -0
- package/src/modules/authModule/emailAuthModule/emailAuthModule.js +16 -0
- package/src/modules/authModule/emailAuthModule/index.d.ts +1 -0
- package/src/modules/authModule/smsAuthModule/index.d.ts +1 -0
- package/src/modules/authModule/smsAuthModule/smsAuthModule.cjs +17 -0
- package/src/modules/authModule/smsAuthModule/smsAuthModule.d.ts +9 -0
- package/src/modules/authModule/smsAuthModule/smsAuthModule.js +13 -0
- package/src/modules/authModule/socialAuthModule/index.d.ts +1 -0
- package/src/modules/authModule/socialAuthModule/socialAuthModule.cjs +14 -0
- package/src/modules/authModule/socialAuthModule/socialAuthModule.d.ts +6 -0
- package/src/modules/authModule/socialAuthModule/socialAuthModule.js +10 -0
- package/src/modules/networksModule/index.d.ts +1 -0
- package/src/modules/networksModule/networksModule.cjs +18 -0
- package/src/modules/networksModule/networksModule.d.ts +3 -0
- package/src/modules/networksModule/networksModule.js +14 -0
- package/src/modules/sdkModule/sdkModule.cjs +6 -6
- package/src/modules/sdkModule/sdkModule.d.ts +4 -3
- package/src/modules/sdkModule/sdkModule.js +7 -7
- package/src/modules/userInterfaceModule/index.d.ts +1 -0
- package/src/modules/userInterfaceModule/userInterfaceModule.cjs +20 -0
- package/src/modules/userInterfaceModule/userInterfaceModule.d.ts +9 -0
- package/src/modules/userInterfaceModule/userInterfaceModule.js +16 -0
- package/src/modules/walletsModule/embeddedWalletsModule/embeddedWalletsModule.cjs +29 -0
- package/src/modules/walletsModule/embeddedWalletsModule/embeddedWalletsModule.d.ts +6 -0
- package/src/modules/walletsModule/embeddedWalletsModule/embeddedWalletsModule.js +25 -0
- package/src/modules/walletsModule/embeddedWalletsModule/index.d.ts +1 -0
- package/src/modules/walletsModule/walletsModule.cjs +13 -1
- package/src/modules/walletsModule/walletsModule.d.ts +9 -2
- package/src/modules/walletsModule/walletsModule.js +14 -2
- package/src/utils/addProperty/addProperty.cjs +21 -0
- package/src/utils/addProperty/addProperty.d.ts +13 -0
- package/src/utils/addProperty/addProperty.js +17 -0
- package/src/utils/addProperty/index.d.ts +1 -0
- package/src/utils/logger/index.d.ts +1 -0
- package/src/utils/logger/logger.cjs +10 -0
- package/src/utils/logger/logger.d.ts +2 -0
- package/src/utils/logger/logger.js +6 -0
- package/src/modules/sdkModule/manifest/index.d.ts +0 -1
- package/src/modules/sdkModule/manifest/manifest.d.ts +0 -3
- package/src/modules/sdkModule/manifest/manifest.js +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,267 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.1.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.30...v2.1.0-alpha.31) (2024-05-31)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* export solana private keys in the correct format ([#5809](https://github.com/dynamic-labs/DynamicAuth/issues/5809)) ([08ac1f8](https://github.com/dynamic-labs/DynamicAuth/commit/08ac1f87bb02ad07fd1fc1f544fdcc64ebe635b8))
|
|
8
|
+
* magiceden evm network switching ([#5800](https://github.com/dynamic-labs/DynamicAuth/issues/5800)) ([9b86797](https://github.com/dynamic-labs/DynamicAuth/commit/9b8679735f3db4b33bb57409c3a69adf2beb82aa))
|
|
9
|
+
* pass all signing inputs to createPsbtOptions ([#5798](https://github.com/dynamic-labs/DynamicAuth/issues/5798)) ([628ad4f](https://github.com/dynamic-labs/DynamicAuth/commit/628ad4f8c161496a0610ecbc3052735f8ceae98d))
|
|
10
|
+
* trigger onboarding async ([#5805](https://github.com/dynamic-labs/DynamicAuth/issues/5805)) ([2c1f98c](https://github.com/dynamic-labs/DynamicAuth/commit/2c1f98c0d91422f75e2d6d32ea4a27c2bc8d8376))
|
|
11
|
+
|
|
12
|
+
## [2.1.0-alpha.30](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.29...v2.1.0-alpha.30) (2024-05-31)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* ensure initExpirationTime is called automatically after authenticating ([#5797](https://github.com/dynamic-labs/DynamicAuth/issues/5797)) ([87eb802](https://github.com/dynamic-labs/DynamicAuth/commit/87eb802e0c2d3af2ca116e07099bfef426d30a1f))
|
|
18
|
+
* initExpirationTime should use expiresAt from storage ([#5799](https://github.com/dynamic-labs/DynamicAuth/issues/5799)) ([384ed17](https://github.com/dynamic-labs/DynamicAuth/commit/384ed1747d9b813ac0d34aaee36eb6480cb256d3))
|
|
19
|
+
* only run useValidateSession once on rerender ([#5795](https://github.com/dynamic-labs/DynamicAuth/issues/5795)) ([ba4446d](https://github.com/dynamic-labs/DynamicAuth/commit/ba4446df95726248b877a84def959cabe81ad9b6))
|
|
20
|
+
* store expiresAt timestamp from VerifyResponse in local storage for use in initExpirationTime ([#5796](https://github.com/dynamic-labs/DynamicAuth/issues/5796)) ([5f8aaeb](https://github.com/dynamic-labs/DynamicAuth/commit/5f8aaeb1cd45b10cb007f9eac25d18f50f142d8f))
|
|
21
|
+
|
|
22
|
+
## [2.1.0-alpha.29](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.28...v2.1.0-alpha.29) (2024-05-30)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add account and chain to coinbase walletClient ([#5776](https://github.com/dynamic-labs/DynamicAuth/issues/5776)) ([557091c](https://github.com/dynamic-labs/DynamicAuth/commit/557091c0efaec11273bd40b53c8bcd633c1bf48d))
|
|
28
|
+
* add support for phantom btc ([#5717](https://github.com/dynamic-labs/DynamicAuth/issues/5717)) ([c61ca4f](https://github.com/dynamic-labs/DynamicAuth/commit/c61ca4f437796be2b420902de7e7de730725d122))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* add phantom btc mobile redirect ([#5789](https://github.com/dynamic-labs/DynamicAuth/issues/5789)) ([aaa2654](https://github.com/dynamic-labs/DynamicAuth/commit/aaa26548668b0733e7930c1d7f5cc3937b3dfb50))
|
|
34
|
+
* clear settings and configurations when logged out on page load ([#5787](https://github.com/dynamic-labs/DynamicAuth/issues/5787)) ([53c4d0b](https://github.com/dynamic-labs/DynamicAuth/commit/53c4d0b4686debdb43b1ab1b8b9e296ed4dd74b6))
|
|
35
|
+
* lookup projectSettings from store to check if cookie enabled ([#5790](https://github.com/dynamic-labs/DynamicAuth/issues/5790)) ([6f2314b](https://github.com/dynamic-labs/DynamicAuth/commit/6f2314b0afef984e6caea79ead73d12c5c6d83f0))
|
|
36
|
+
|
|
37
|
+
## [2.1.0-alpha.28](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.27...v2.1.0-alpha.28) (2024-05-29)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* adds solana standard wallet connector ([#5752](https://github.com/dynamic-labs/DynamicAuth/issues/5752)) ([0040940](https://github.com/dynamic-labs/DynamicAuth/commit/0040940fd1adb37ab3106bb0e4dfe79403bc41f2))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* farcaster fetch url fix ([#5767](https://github.com/dynamic-labs/DynamicAuth/issues/5767)) ([1408ba9](https://github.com/dynamic-labs/DynamicAuth/commit/1408ba92680363b9db7820a63d5e3d15dc26ad22))
|
|
48
|
+
|
|
49
|
+
## [2.1.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2024-05-29)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* coinbase connection ([#5764](https://github.com/dynamic-labs/DynamicAuth/issues/5764)) ([aeacd1c](https://github.com/dynamic-labs/DynamicAuth/commit/aeacd1c55dc471fbf8c14eb05ab356b0a90aa239))
|
|
55
|
+
|
|
56
|
+
## [2.1.0-alpha.26](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.25...v2.1.0-alpha.26) (2024-05-29)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* add farcaster login to react native ([#5713](https://github.com/dynamic-labs/DynamicAuth/issues/5713)) ([08f4473](https://github.com/dynamic-labs/DynamicAuth/commit/08f4473eec9b32b82b6f703fa4d5136514a61b25))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* better error handling of invalid mfa otp ([#5759](https://github.com/dynamic-labs/DynamicAuth/issues/5759)) ([72ab01f](https://github.com/dynamic-labs/DynamicAuth/commit/72ab01f8f919f147eeedfabf8b4838802abf308a))
|
|
67
|
+
* show correct status for magic eden btc wallets after ([#5748](https://github.com/dynamic-labs/DynamicAuth/issues/5748)) ([b8f20bb](https://github.com/dynamic-labs/DynamicAuth/commit/b8f20bb796b9a2e88817ef3b0da6ac32e9012b18))
|
|
68
|
+
|
|
69
|
+
## [2.1.0-alpha.25](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.24...v2.1.0-alpha.25) (2024-05-27)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* btc balance calculation ([#5737](https://github.com/dynamic-labs/DynamicAuth/issues/5737)) ([9b5ceb3](https://github.com/dynamic-labs/DynamicAuth/commit/9b5ceb32d543037f60d7104f0b81b3abc86ebd10))
|
|
75
|
+
|
|
76
|
+
## [2.1.0-alpha.24](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.23...v2.1.0-alpha.24) (2024-05-26)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Features
|
|
80
|
+
|
|
81
|
+
* add onMfaCompleteOnce to useMfa ([#5702](https://github.com/dynamic-labs/DynamicAuth/issues/5702)) ([6451e33](https://github.com/dynamic-labs/DynamicAuth/commit/6451e3369ef1b4ba116378f0dd3fe4e82007e670))
|
|
82
|
+
* prompt custom fields during onboarding ([#5302](https://github.com/dynamic-labs/DynamicAuth/issues/5302)) ([8664223](https://github.com/dynamic-labs/DynamicAuth/commit/86642232cf2b490a820169f48ba8dc093010e1a0))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Bug Fixes
|
|
86
|
+
|
|
87
|
+
* correct text on pending signature screen to match the embedded widget modal text ([#5707](https://github.com/dynamic-labs/DynamicAuth/issues/5707)) ([44a6a06](https://github.com/dynamic-labs/DynamicAuth/commit/44a6a0664e08d4b9fc25dd86c0e30f8d585558e0))
|
|
88
|
+
* pass captcha token for farcaster login ([#5706](https://github.com/dynamic-labs/DynamicAuth/issues/5706)) ([32bcb6e](https://github.com/dynamic-labs/DynamicAuth/commit/32bcb6e0e06c6e273c07f32893dfd550deeb6a19))
|
|
89
|
+
* use coinbase provider to get connected accounts for consistency ([#5711](https://github.com/dynamic-labs/DynamicAuth/issues/5711)) ([b9e9170](https://github.com/dynamic-labs/DynamicAuth/commit/b9e9170dad1ac27a85a44a7177b82055ce0035cb))
|
|
90
|
+
|
|
91
|
+
## [2.1.0-alpha.23](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.22...v2.1.0-alpha.23) (2024-05-23)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
|
|
96
|
+
* add authFailure and authInit events ([#5659](https://github.com/dynamic-labs/DynamicAuth/issues/5659)) ([f4f592a](https://github.com/dynamic-labs/DynamicAuth/commit/f4f592aaacd96fae9333b803c235c5f1fea0e20e))
|
|
97
|
+
* prompt mfa on signup and signin ([#5599](https://github.com/dynamic-labs/DynamicAuth/issues/5599)) ([8d4ecf4](https://github.com/dynamic-labs/DynamicAuth/commit/8d4ecf4c69c59c1fb14e79511fb2f9b33a7e3d89))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
* close auth modal if create embedded wallet throws ([#5683](https://github.com/dynamic-labs/DynamicAuth/issues/5683)) ([5331d73](https://github.com/dynamic-labs/DynamicAuth/commit/5331d731a171bb52a598eb5b25f7ba80cef7a64c))
|
|
103
|
+
* prevent state update when the webview is unmounted ([#5688](https://github.com/dynamic-labs/DynamicAuth/issues/5688)) ([8e4ecbd](https://github.com/dynamic-labs/DynamicAuth/commit/8e4ecbdcdb5f48c57ecaad90d663c66529013192))
|
|
104
|
+
* show phone number in use error message ([#5681](https://github.com/dynamic-labs/DynamicAuth/issues/5681)) ([e62f7b7](https://github.com/dynamic-labs/DynamicAuth/commit/e62f7b7b6a5e217944346faf2410028433cecad4))
|
|
105
|
+
|
|
106
|
+
## [2.1.0-alpha.22](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.21...v2.1.0-alpha.22) (2024-05-21)
|
|
107
|
+
|
|
108
|
+
## [2.1.0-alpha.21](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.20...v2.1.0-alpha.21) (2024-05-21)
|
|
109
|
+
|
|
110
|
+
## [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)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Features
|
|
114
|
+
|
|
115
|
+
* adds client.networks module ([#5650](https://github.com/dynamic-labs/DynamicAuth/issues/5650)) ([70f7fe5](https://github.com/dynamic-labs/DynamicAuth/commit/70f7fe5f437756c51e787ac12183be0a23c51b89))
|
|
116
|
+
* user fields supports custom fields ([#5639](https://github.com/dynamic-labs/DynamicAuth/issues/5639)) ([8eb5788](https://github.com/dynamic-labs/DynamicAuth/commit/8eb5788fc3e1286929f5949ecb57736b21b13fb5))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* add webcredentials to expo ([#5640](https://github.com/dynamic-labs/DynamicAuth/issues/5640)) ([9026fbf](https://github.com/dynamic-labs/DynamicAuth/commit/9026fbf0108537e884588f3adcdb9f0db04a159b))
|
|
122
|
+
* 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))
|
|
123
|
+
|
|
124
|
+
## [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)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Features
|
|
128
|
+
|
|
129
|
+
* add createUserProfileFromSDKUser ([#5596](https://github.com/dynamic-labs/DynamicAuth/issues/5596)) ([d37a1b4](https://github.com/dynamic-labs/DynamicAuth/commit/d37a1b4119f5ff4fff1e987d157f6d5abf105a8b))
|
|
130
|
+
* add headless social sign-in ([#5439](https://github.com/dynamic-labs/DynamicAuth/issues/5439)) ([e32fdf8](https://github.com/dynamic-labs/DynamicAuth/commit/e32fdf863718d661b90b592c8df734e92386ddf3))
|
|
131
|
+
* 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))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Bug Fixes
|
|
135
|
+
|
|
136
|
+
* include applinks details to AASA ([#5635](https://github.com/dynamic-labs/DynamicAuth/issues/5635)) ([ce94fec](https://github.com/dynamic-labs/DynamicAuth/commit/ce94fec80adbb3eb4efcb79d1aa2cc6eb35eab6f))
|
|
137
|
+
* 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))
|
|
138
|
+
* 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))
|
|
139
|
+
|
|
140
|
+
## [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)
|
|
141
|
+
|
|
142
|
+
## [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)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Features
|
|
146
|
+
|
|
147
|
+
* add coinbaseWalletPreference prop ([#5607](https://github.com/dynamic-labs/DynamicAuth/issues/5607)) ([1ac3b2c](https://github.com/dynamic-labs/DynamicAuth/commit/1ac3b2ce7abb136465f4aa88b045dfb70d99aad7))
|
|
148
|
+
|
|
149
|
+
## [2.1.0-alpha.16](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.15...v2.1.0-alpha.16) (2024-05-14)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Features
|
|
153
|
+
|
|
154
|
+
* add client.sdk.error with errors from the webview ([#5520](https://github.com/dynamic-labs/DynamicAuth/issues/5520)) ([a886927](https://github.com/dynamic-labs/DynamicAuth/commit/a8869273bf361c870d6e3cb82a28d9ccec65905b))
|
|
155
|
+
* add setDefaultTabIndex to default the selected wallets tab ([#5593](https://github.com/dynamic-labs/DynamicAuth/issues/5593)) ([6e8ce05](https://github.com/dynamic-labs/DynamicAuth/commit/6e8ce053c4f6f009acc57dac55a8e9c74fbcc73b))
|
|
156
|
+
* add visibility/auth-flow/user-profile to react-native ([#5564](https://github.com/dynamic-labs/DynamicAuth/issues/5564)) ([d93cea8](https://github.com/dynamic-labs/DynamicAuth/commit/d93cea82a123c6ec4d3d594a7dc064f4db2981c2))
|
|
157
|
+
|
|
158
|
+
## [2.1.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.14...v2.1.0-alpha.15) (2024-05-13)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### Bug Fixes
|
|
162
|
+
|
|
163
|
+
* when a pregen is created, primaryWallet is not being setup ([#5584](https://github.com/dynamic-labs/DynamicAuth/issues/5584)) ([de08721](https://github.com/dynamic-labs/DynamicAuth/commit/de0872151e09f91dcbfaf1d043cf830f9df8d799))
|
|
164
|
+
|
|
165
|
+
## [2.1.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.13...v2.1.0-alpha.14) (2024-05-09)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Features
|
|
169
|
+
|
|
170
|
+
* add useSwitchWallet ([#5575](https://github.com/dynamic-labs/DynamicAuth/issues/5575)) ([d3053d9](https://github.com/dynamic-labs/DynamicAuth/commit/d3053d920110c26ef8052e77bf59e07dedc7c683))
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### Bug Fixes
|
|
174
|
+
|
|
175
|
+
* linking phantom wallets in mobile ([#5524](https://github.com/dynamic-labs/DynamicAuth/issues/5524)) ([28d90f5](https://github.com/dynamic-labs/DynamicAuth/commit/28d90f5126b9c22535b63a3797cc060ef089fc63))
|
|
176
|
+
* only show farcaster QR code if Social Login is enabled ([#5559](https://github.com/dynamic-labs/DynamicAuth/issues/5559)) ([fa71aaf](https://github.com/dynamic-labs/DynamicAuth/commit/fa71aaf0f80da31d397600b2fd0cbea99b3689a4))
|
|
177
|
+
* remove goerli testnets and add sepolia ([#5565](https://github.com/dynamic-labs/DynamicAuth/issues/5565)) ([888eb03](https://github.com/dynamic-labs/DynamicAuth/commit/888eb031ef6f4dbbdc3015265cce8647d2c720b0))
|
|
178
|
+
|
|
179
|
+
## [2.1.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.12...v2.1.0-alpha.13) (2024-05-03)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Bug Fixes
|
|
183
|
+
|
|
184
|
+
* ensure Farcaster QR uses useSocialAuth hook ([#5550](https://github.com/dynamic-labs/DynamicAuth/issues/5550)) ([57fcd97](https://github.com/dynamic-labs/DynamicAuth/commit/57fcd97c44e3f52065dcf856acf7bca7b24fabc7))
|
|
185
|
+
|
|
186
|
+
## [2.1.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.11...v2.1.0-alpha.12) (2024-05-02)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Features
|
|
190
|
+
|
|
191
|
+
* display Farcaster QR code when it is the only login option ([#5514](https://github.com/dynamic-labs/DynamicAuth/issues/5514)) ([7b166d9](https://github.com/dynamic-labs/DynamicAuth/commit/7b166d9a30c581746f0e2edb71c44fc015dc128e))
|
|
192
|
+
|
|
193
|
+
## [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)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
### Features
|
|
197
|
+
|
|
198
|
+
* **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))
|
|
199
|
+
* headless reveal embedded wallet key ([#5518](https://github.com/dynamic-labs/DynamicAuth/issues/5518)) ([77c1536](https://github.com/dynamic-labs/DynamicAuth/commit/77c15360b2b28c52cbdeafb3ce8ca7e80dbecf57))
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Bug Fixes
|
|
203
|
+
|
|
204
|
+
* 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))
|
|
205
|
+
|
|
206
|
+
## [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)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Features
|
|
210
|
+
|
|
211
|
+
* 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))
|
|
212
|
+
|
|
213
|
+
## [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)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
### Features
|
|
217
|
+
|
|
218
|
+
* 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))
|
|
219
|
+
|
|
220
|
+
## [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)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### Bug Fixes
|
|
224
|
+
|
|
225
|
+
* 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))
|
|
226
|
+
* 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))
|
|
227
|
+
* network with keplr ([#5485](https://github.com/dynamic-labs/DynamicAuth/issues/5485)) ([b86f2fc](https://github.com/dynamic-labs/DynamicAuth/commit/b86f2fce491f9752e80a86643916da9ac7fb9276))
|
|
228
|
+
* refetch nameservice data and display properly ([#5476](https://github.com/dynamic-labs/DynamicAuth/issues/5476)) ([2aee798](https://github.com/dynamic-labs/DynamicAuth/commit/2aee798846f69496201bec7aa52e7ec1f370b7c3))
|
|
229
|
+
* 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))
|
|
230
|
+
|
|
231
|
+
## [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)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### Bug Fixes
|
|
235
|
+
|
|
236
|
+
* 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))
|
|
237
|
+
|
|
238
|
+
## [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)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Bug Fixes
|
|
242
|
+
|
|
243
|
+
* embedded wallets headless session control fixes ([#5469](https://github.com/dynamic-labs/DynamicAuth/issues/5469)) ([92e6c35](https://github.com/dynamic-labs/DynamicAuth/commit/92e6c359d2710fd4f5f5a6fedc4acf6c4bab78ba))
|
|
244
|
+
|
|
245
|
+
## [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)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
### Bug Fixes
|
|
249
|
+
|
|
250
|
+
* 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))
|
|
251
|
+
|
|
252
|
+
## [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)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
### Features
|
|
256
|
+
|
|
257
|
+
* 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))
|
|
258
|
+
* headless create passkeys for embedded wallets ([#5395](https://github.com/dynamic-labs/DynamicAuth/issues/5395)) ([0b64099](https://github.com/dynamic-labs/DynamicAuth/commit/0b6409968457f65886248f0a0879e39ec3803fd0))
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Bug Fixes
|
|
262
|
+
|
|
263
|
+
* 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))
|
|
264
|
+
|
|
2
265
|
## [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)
|
|
3
266
|
|
|
4
267
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/client",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.31",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
|
-
"url": "https://github.com/dynamic-labs/
|
|
6
|
+
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
7
7
|
"directory": "packages/client"
|
|
8
8
|
},
|
|
9
9
|
"description": "Core package for utilizing Dynamic's sdk",
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/message-transport": "2.1.0-alpha.
|
|
29
|
+
"@dynamic-labs/message-transport": "2.1.0-alpha.31",
|
|
30
|
+
"@vue/reactivity": "3.4.21"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
|
-
"@dynamic-labs/
|
|
33
|
+
"@dynamic-labs/logger": "2.1.0-alpha.31",
|
|
34
|
+
"@dynamic-labs/types": "2.1.0-alpha.31",
|
|
33
35
|
"eventemitter3": "5.0.1"
|
|
34
36
|
}
|
|
35
37
|
}
|
package/src/client/client.cjs
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var authModule = require('../modules/authModule/authModule.cjs');
|
|
7
|
+
var networksModule = require('../modules/networksModule/networksModule.cjs');
|
|
7
8
|
var sdkModule = require('../modules/sdkModule/sdkModule.cjs');
|
|
9
|
+
var userInterfaceModule = require('../modules/userInterfaceModule/userInterfaceModule.cjs');
|
|
8
10
|
var walletsModule = require('../modules/walletsModule/walletsModule.cjs');
|
|
9
11
|
var Extendable = require('../utils/Extendable/Extendable.cjs');
|
|
10
12
|
var core = require('./core/core.cjs');
|
|
@@ -17,13 +19,17 @@ var core = require('./core/core.cjs');
|
|
|
17
19
|
* it will be used for.
|
|
18
20
|
*/
|
|
19
21
|
const createClient = (props) => {
|
|
20
|
-
const core$1 = core.createCore();
|
|
22
|
+
const core$1 = core.createCore(props);
|
|
21
23
|
const baseExtendable = new Extendable.Extendable(core$1);
|
|
22
24
|
return baseExtendable.extend(() => ({
|
|
23
25
|
/** Module that gives access over authentication state, such as the auth token and user */
|
|
24
26
|
auth: authModule.createAuthModule(core$1),
|
|
27
|
+
/** Module that provides all the networks configured */
|
|
28
|
+
networks: networksModule.createNetworksModule(core$1),
|
|
25
29
|
/** Module that gives insight over the state of the SDK */
|
|
26
|
-
sdk: sdkModule.createSdkModule(core$1
|
|
30
|
+
sdk: sdkModule.createSdkModule(core$1),
|
|
31
|
+
/** Module that provide access to UI features */
|
|
32
|
+
ui: userInterfaceModule.createUserInterfaceModule(core$1),
|
|
27
33
|
/** Module that provides access to user's wallets */
|
|
28
34
|
wallets: walletsModule.createWalletsModule(core$1),
|
|
29
35
|
}));
|
package/src/client/client.d.ts
CHANGED
|
@@ -17,8 +17,19 @@ export type ClientProps = {
|
|
|
17
17
|
export declare const createClient: (props: ClientProps) => {
|
|
18
18
|
/** Module that gives access over authentication state, such as the auth token and user */
|
|
19
19
|
auth: import("../modules/authModule").AuthModule;
|
|
20
|
+
/** Module that provides all the networks configured */
|
|
21
|
+
networks: import("dist/packages/message-transport/src").StoreStateGetters<import("dist/packages/message-transport/src").NetworksModuleState> & Pick<import("eventemitter3").EventEmitter<import("dist/packages/message-transport/src").StoreStateEvents<import("dist/packages/message-transport/src").NetworksModuleState>, any>, "on" | "off" | "once">;
|
|
20
22
|
/** Module that gives insight over the state of the SDK */
|
|
21
23
|
sdk: import("../modules/sdkModule").SdkModule;
|
|
24
|
+
/** Module that provide access to UI features */
|
|
25
|
+
ui: {
|
|
26
|
+
auth: {
|
|
27
|
+
show: () => void;
|
|
28
|
+
};
|
|
29
|
+
userProfile: {
|
|
30
|
+
show: () => void;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
22
33
|
/** Module that provides access to user's wallets */
|
|
23
34
|
wallets: import("../modules/walletsModule").WalletsModule;
|
|
24
35
|
} & Extendable;
|
package/src/client/client.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { createAuthModule } from '../modules/authModule/authModule.js';
|
|
3
|
+
import { createNetworksModule } from '../modules/networksModule/networksModule.js';
|
|
3
4
|
import { createSdkModule } from '../modules/sdkModule/sdkModule.js';
|
|
5
|
+
import { createUserInterfaceModule } from '../modules/userInterfaceModule/userInterfaceModule.js';
|
|
4
6
|
import { createWalletsModule } from '../modules/walletsModule/walletsModule.js';
|
|
5
7
|
import { Extendable } from '../utils/Extendable/Extendable.js';
|
|
6
8
|
import { createCore } from './core/core.js';
|
|
@@ -13,13 +15,17 @@ import { createCore } from './core/core.js';
|
|
|
13
15
|
* it will be used for.
|
|
14
16
|
*/
|
|
15
17
|
const createClient = (props) => {
|
|
16
|
-
const core = createCore();
|
|
18
|
+
const core = createCore(props);
|
|
17
19
|
const baseExtendable = new Extendable(core);
|
|
18
20
|
return baseExtendable.extend(() => ({
|
|
19
21
|
/** Module that gives access over authentication state, such as the auth token and user */
|
|
20
22
|
auth: createAuthModule(core),
|
|
23
|
+
/** Module that provides all the networks configured */
|
|
24
|
+
networks: createNetworksModule(core),
|
|
21
25
|
/** Module that gives insight over the state of the SDK */
|
|
22
|
-
sdk: createSdkModule(core
|
|
26
|
+
sdk: createSdkModule(core),
|
|
27
|
+
/** Module that provide access to UI features */
|
|
28
|
+
ui: createUserInterfaceModule(core),
|
|
23
29
|
/** Module that provides access to user's wallets */
|
|
24
30
|
wallets: createWalletsModule(core),
|
|
25
31
|
}));
|
package/src/client/core/core.cjs
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var messageTransport$1 = require('@dynamic-labs/message-transport');
|
|
7
|
+
var initializationModule = require('./modules/initializationModule/initializationModule.cjs');
|
|
8
|
+
var manifestModule = require('./modules/manifestModule/manifestModule.cjs');
|
|
7
9
|
|
|
8
10
|
const messageTransport = messageTransport$1.applyDefaultMessageOrigin({
|
|
9
11
|
defaultOrigin: 'host',
|
|
@@ -17,7 +19,8 @@ const messageTransport = messageTransport$1.applyDefaultMessageOrigin({
|
|
|
17
19
|
// messageTransport.on((message) =>
|
|
18
20
|
// console.log('message', JSON.stringify(message, null, 2)),
|
|
19
21
|
// );
|
|
20
|
-
const
|
|
22
|
+
const initialization = initializationModule.createInitializationModule(messageTransport);
|
|
23
|
+
const createCore = (props) => ({
|
|
21
24
|
/**
|
|
22
25
|
* Allows an extension to add its name to the list, such that
|
|
23
26
|
* other extensions are able to detect if it is present.
|
|
@@ -26,6 +29,14 @@ const createCore = () => ({
|
|
|
26
29
|
* checks this list and throws an error if it doesn't find "viem" there.
|
|
27
30
|
*/
|
|
28
31
|
declaredExtensionNames: [],
|
|
32
|
+
/**
|
|
33
|
+
* SDK initialization module handles the initialization error
|
|
34
|
+
*/
|
|
35
|
+
initialization,
|
|
36
|
+
/**
|
|
37
|
+
* Manages the manifest of the host
|
|
38
|
+
*/
|
|
39
|
+
manifest: manifestModule.createManifestModule(props, messageTransport, initialization),
|
|
29
40
|
/**
|
|
30
41
|
* Message transport that will be used to send and receive messages to the webview.
|
|
31
42
|
* Should preferably be used with createRequestChannel, rather than used directly.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ClientProps } from '../client';
|
|
1
2
|
/**
|
|
2
3
|
* Holds properties and methods used by client extensions, but that we don't
|
|
3
4
|
* want users to have access to.
|
|
4
5
|
*/
|
|
5
6
|
export type Core = ReturnType<typeof createCore>;
|
|
6
|
-
export declare const createCore: () => {
|
|
7
|
+
export declare const createCore: (props: ClientProps) => {
|
|
7
8
|
/**
|
|
8
9
|
* Allows an extension to add its name to the list, such that
|
|
9
10
|
* other extensions are able to detect if it is present.
|
|
@@ -12,6 +13,17 @@ export declare const createCore: () => {
|
|
|
12
13
|
* checks this list and throws an error if it doesn't find "viem" there.
|
|
13
14
|
*/
|
|
14
15
|
declaredExtensionNames: string[];
|
|
16
|
+
/**
|
|
17
|
+
* SDK initialization module handles the initialization error
|
|
18
|
+
*/
|
|
19
|
+
initialization: import("./modules/initializationModule/initializationModule").InitializationModule;
|
|
20
|
+
/**
|
|
21
|
+
* Manages the manifest of the host
|
|
22
|
+
*/
|
|
23
|
+
manifest: {
|
|
24
|
+
setAppOrigin: (appOrigin: string) => string;
|
|
25
|
+
setPlatform: (platform: "browser" | "react-native") => "browser" | "react-native";
|
|
26
|
+
};
|
|
15
27
|
/**
|
|
16
28
|
* Message transport that will be used to send and receive messages to the webview.
|
|
17
29
|
* Should preferably be used with createRequestChannel, rather than used directly.
|
|
@@ -25,7 +37,7 @@ export declare const createCore: () => {
|
|
|
25
37
|
off: (callback: import("@dynamic-labs/message-transport").MessageTransportCallback) => void;
|
|
26
38
|
on: (callback: import("@dynamic-labs/message-transport").MessageTransportCallback) => void;
|
|
27
39
|
} & {
|
|
28
|
-
defaultOrigin: "
|
|
40
|
+
defaultOrigin: "webview" | "host";
|
|
29
41
|
emit: (message: import("@dynamic-labs/message-transport").MessageTransportDataOptionalOrigin) => void;
|
|
30
42
|
};
|
|
31
43
|
};
|
package/src/client/core/core.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { applyDefaultMessageOrigin, makeWaitForInitEvent, sdkHasLoadedEventName, createMessageTransport } from '@dynamic-labs/message-transport';
|
|
3
|
+
import { createInitializationModule } from './modules/initializationModule/initializationModule.js';
|
|
4
|
+
import { createManifestModule } from './modules/manifestModule/manifestModule.js';
|
|
3
5
|
|
|
4
6
|
const messageTransport = applyDefaultMessageOrigin({
|
|
5
7
|
defaultOrigin: 'host',
|
|
@@ -13,7 +15,8 @@ const messageTransport = applyDefaultMessageOrigin({
|
|
|
13
15
|
// messageTransport.on((message) =>
|
|
14
16
|
// console.log('message', JSON.stringify(message, null, 2)),
|
|
15
17
|
// );
|
|
16
|
-
const
|
|
18
|
+
const initialization = createInitializationModule(messageTransport);
|
|
19
|
+
const createCore = (props) => ({
|
|
17
20
|
/**
|
|
18
21
|
* Allows an extension to add its name to the list, such that
|
|
19
22
|
* other extensions are able to detect if it is present.
|
|
@@ -22,6 +25,14 @@ const createCore = () => ({
|
|
|
22
25
|
* checks this list and throws an error if it doesn't find "viem" there.
|
|
23
26
|
*/
|
|
24
27
|
declaredExtensionNames: [],
|
|
28
|
+
/**
|
|
29
|
+
* SDK initialization module handles the initialization error
|
|
30
|
+
*/
|
|
31
|
+
initialization,
|
|
32
|
+
/**
|
|
33
|
+
* Manages the manifest of the host
|
|
34
|
+
*/
|
|
35
|
+
manifest: createManifestModule(props, messageTransport, initialization),
|
|
25
36
|
/**
|
|
26
37
|
* Message transport that will be used to send and receive messages to the webview.
|
|
27
38
|
* Should preferably be used with createRequestChannel, rather than used directly.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createInitializationModule } from './initializationModule';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var reactivity = require('@vue/reactivity');
|
|
7
|
+
var messageTransport = require('@dynamic-labs/message-transport');
|
|
8
|
+
var logger = require('../../../../utils/logger/logger.cjs');
|
|
9
|
+
|
|
10
|
+
const createInitializationModule = (messageTransport$1) => {
|
|
11
|
+
const consoleRequestChannel = messageTransport.createRequestChannel(messageTransport$1);
|
|
12
|
+
const state = reactivity.reactive({
|
|
13
|
+
error: null,
|
|
14
|
+
});
|
|
15
|
+
consoleRequestChannel.handle('error', (serializedError, { severity }) => {
|
|
16
|
+
const error = messageTransport.parseErrorFromTransport(serializedError);
|
|
17
|
+
if (severity === 'fatal') {
|
|
18
|
+
state.error = error;
|
|
19
|
+
}
|
|
20
|
+
logger.logger.error(error);
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
get error() {
|
|
24
|
+
return state.error;
|
|
25
|
+
},
|
|
26
|
+
set error(error) {
|
|
27
|
+
state.error = error;
|
|
28
|
+
logger.logger.error(state.error);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.createInitializationModule = createInitializationModule;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MessageTransportWithDefaultOrigin } from '@dynamic-labs/message-transport';
|
|
2
|
+
export type InitializationModule = {
|
|
3
|
+
get error(): Error | null;
|
|
4
|
+
set error(error: Error);
|
|
5
|
+
};
|
|
6
|
+
export declare const createInitializationModule: (messageTransport: MessageTransportWithDefaultOrigin) => InitializationModule;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { reactive } from '@vue/reactivity';
|
|
3
|
+
import { createRequestChannel, parseErrorFromTransport } from '@dynamic-labs/message-transport';
|
|
4
|
+
import { logger } from '../../../../utils/logger/logger.js';
|
|
5
|
+
|
|
6
|
+
const createInitializationModule = (messageTransport) => {
|
|
7
|
+
const consoleRequestChannel = createRequestChannel(messageTransport);
|
|
8
|
+
const state = reactive({
|
|
9
|
+
error: null,
|
|
10
|
+
});
|
|
11
|
+
consoleRequestChannel.handle('error', (serializedError, { severity }) => {
|
|
12
|
+
const error = parseErrorFromTransport(serializedError);
|
|
13
|
+
if (severity === 'fatal') {
|
|
14
|
+
state.error = error;
|
|
15
|
+
}
|
|
16
|
+
logger.error(error);
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
get error() {
|
|
20
|
+
return state.error;
|
|
21
|
+
},
|
|
22
|
+
set error(error) {
|
|
23
|
+
state.error = error;
|
|
24
|
+
logger.error(state.error);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { createInitializationModule };
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var _package = require('
|
|
6
|
+
var _package = require('../../../../../../package.cjs');
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, }) => ({
|
|
9
9
|
apiBaseUrl,
|
|
10
10
|
appLogoUrl,
|
|
11
11
|
appName,
|
|
@@ -14,4 +14,4 @@ const createManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOve
|
|
|
14
14
|
environmentId,
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
exports.
|
|
17
|
+
exports.createPartialManifest = createPartialManifest;
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ClientManifest } from '@dynamic-labs/message-transport';
|
|
2
|
+
import { ClientProps } from '../../../../client';
|
|
3
|
+
export declare const createPartialManifest: ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, }: ClientProps) => Partial<ClientManifest>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { version } from '../../../../../../package.js';
|
|
3
|
+
|
|
4
|
+
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, }) => ({
|
|
5
|
+
apiBaseUrl,
|
|
6
|
+
appLogoUrl,
|
|
7
|
+
appName,
|
|
8
|
+
clientVersion: version,
|
|
9
|
+
cssOverrides,
|
|
10
|
+
environmentId,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { createPartialManifest };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './createPartialManifest';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createManifestModule } from './manifestModule';
|