@dynamic-labs/sdk-react-core 4.50.5 → 4.51.2
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 +30 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +14 -14
- package/src/index.cjs +2 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -0
- package/src/lib/context/CaptchaContext/CaptchaContext.cjs +88 -1
- package/src/lib/context/CaptchaContext/CaptchaContext.js +88 -1
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +19 -0
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +20 -1
- package/src/lib/data/api/constants.cjs +12 -0
- package/src/lib/data/api/constants.d.ts +3 -0
- package/src/lib/data/api/constants.js +6 -0
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +12 -1
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +12 -1
- package/src/lib/data/api/user/user.cjs +19 -0
- package/src/lib/data/api/user/user.d.ts +5 -0
- package/src/lib/data/api/user/user.js +19 -1
- package/src/lib/store/stateConfig.cjs +39 -35
- package/src/lib/store/stateConfig.js +39 -35
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.cjs +33 -1
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.d.ts +11 -0
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.js +32 -2
- package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.cjs +1 -32
- package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.js +1 -32
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -1
- package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.cjs +1 -1
- package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.js +1 -1
- package/src/lib/utils/hooks/useIsMfaRequiredForAction/useIsMfaRequiredForAction.cjs +1 -4
- package/src/lib/utils/hooks/useIsMfaRequiredForAction/useIsMfaRequiredForAction.js +1 -4
- package/src/lib/utils/hooks/useRegisterPasskey/useRegisterPasskey.cjs +8 -1
- package/src/lib/utils/hooks/useRegisterPasskey/useRegisterPasskey.js +8 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +2 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +4 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +2 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/unlinkUserEmail/unlinkUserEmail.cjs +131 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/unlinkUserEmail/unlinkUserEmail.d.ts +6 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/unlinkUserEmail/unlinkUserEmail.js +127 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +3 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.d.ts +2 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +3 -1
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.cjs +38 -15
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.d.ts +8 -2
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.js +38 -15
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +14 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.js +15 -3
- package/src/lib/views/WalletDelegation/WalletDelegationView/WalletDelegationView.cjs +10 -2
- package/src/lib/views/WalletDelegation/WalletDelegationView/WalletDelegationView.js +10 -2
- package/src/lib/widgets/DynamicWidget/views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.cjs +18 -18
- package/src/lib/widgets/DynamicWidget/views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.js +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,34 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.51.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.51.1...v4.51.2) (2025-12-19)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add updateUserEmail method ([#10133](https://github.com/dynamic-labs/dynamic-auth/issues/10133)) ([78ba809](https://github.com/dynamic-labs/dynamic-auth/commit/78ba809b8226d00d7c69a55424dc9c9471060ae7))
|
|
8
|
+
|
|
9
|
+
### [4.51.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.51.0...v4.51.1) (2025-12-19)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* emit mfaCompletionSuccess event when registering a passkey ([#10135](https://github.com/dynamic-labs/dynamic-auth/issues/10135)) ([1e1a19a](https://github.com/dynamic-labs/dynamic-auth/commit/1e1a19ac19002183b3041c733b2fd98e51b77fa6))
|
|
15
|
+
|
|
16
|
+
## [4.51.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.50.5...v4.51.0) (2025-12-18)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **react-native:** add connectOnly option as a client prop ([#10112](https://github.com/dynamic-labs/dynamic-auth/issues/10112)) ([8cdee00](https://github.com/dynamic-labs/dynamic-auth/commit/8cdee00b249252aee74723f66b8875d6e3d70410))
|
|
22
|
+
* **react-native:** add support for metamask ([#10004](https://github.com/dynamic-labs/dynamic-auth/issues/10004)) ([dcdb52c](https://github.com/dynamic-labs/dynamic-auth/commit/dcdb52c4fd70f1b691c2235be3464e3c25f1ea8b))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* add useExchangeAccounts export ([#10101](https://github.com/dynamic-labs/dynamic-auth/issues/10101)) ([d9051fa](https://github.com/dynamic-labs/dynamic-auth/commit/d9051fa2769f37989e7a38c5035d6a39a6fc38fd))
|
|
28
|
+
* ensure the flutter SDK will not get wallet version field with V3 ([#10115](https://github.com/dynamic-labs/dynamic-auth/issues/10115)) ([f3b80cc](https://github.com/dynamic-labs/dynamic-auth/commit/f3b80ccf070cc1f615c43e60c0681fe28c92e96e))
|
|
29
|
+
* **react-native:** show captcha screen when enabled during signature prompt ([#10113](https://github.com/dynamic-labs/dynamic-auth/issues/10113)) ([12edd1c](https://github.com/dynamic-labs/dynamic-auth/commit/12edd1ca9c7abe3f249930f27a2e3043a7cd3723))
|
|
30
|
+
* solana swap issue with outdated jup api ([#10119](https://github.com/dynamic-labs/dynamic-auth/issues/10119)) ([172a074](https://github.com/dynamic-labs/dynamic-auth/commit/172a074b607c8e25c3d4141e0caedff943aeec15))
|
|
31
|
+
|
|
2
32
|
### [4.50.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.50.4...v4.50.5) (2025-12-16)
|
|
3
33
|
|
|
4
34
|
|
package/package.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.
|
|
6
|
+
var version = "4.51.2";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
9
|
-
"@dynamic-labs-sdk/client": "0.1.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.843",
|
|
9
|
+
"@dynamic-labs-sdk/client": "0.1.2",
|
|
10
10
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
11
11
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
12
12
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.
|
|
2
|
+
var version = "4.51.2";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
5
|
-
"@dynamic-labs-sdk/client": "0.1.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.843",
|
|
5
|
+
"@dynamic-labs-sdk/client": "0.1.2",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
8
8
|
"country-list": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.51.2",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
6
|
-
"@dynamic-labs-sdk/client": "0.1.
|
|
5
|
+
"@dynamic-labs/sdk-api-core": "0.0.843",
|
|
6
|
+
"@dynamic-labs-sdk/client": "0.1.2",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
8
8
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
9
9
|
"country-list": "2.3.0",
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"react-international-phone": "4.5.0",
|
|
17
17
|
"bs58": "5.0.0",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
19
|
-
"@dynamic-labs/iconic": "4.
|
|
20
|
-
"@dynamic-labs/locale": "4.
|
|
21
|
-
"@dynamic-labs/logger": "4.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "4.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
24
|
-
"@dynamic-labs/store": "4.
|
|
25
|
-
"@dynamic-labs/types": "4.
|
|
26
|
-
"@dynamic-labs/utils": "4.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.51.2",
|
|
19
|
+
"@dynamic-labs/iconic": "4.51.2",
|
|
20
|
+
"@dynamic-labs/locale": "4.51.2",
|
|
21
|
+
"@dynamic-labs/logger": "4.51.2",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "4.51.2",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "4.51.2",
|
|
24
|
+
"@dynamic-labs/store": "4.51.2",
|
|
25
|
+
"@dynamic-labs/types": "4.51.2",
|
|
26
|
+
"@dynamic-labs/utils": "4.51.2",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.51.2",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "4.51.2",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -168,6 +168,7 @@ var useSyncMfaFlow = require('./lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cj
|
|
|
168
168
|
var useTelegramLogin = require('./lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs');
|
|
169
169
|
var useUpgradeEmbeddedWallet = require('./lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs');
|
|
170
170
|
var useDeleteUserAccount = require('./lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.cjs');
|
|
171
|
+
var useExchangeAccounts = require('./lib/utils/hooks/useExchangeAccounts/useExchangeAccounts.cjs');
|
|
171
172
|
var usePayWithDynamic = require('./lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.cjs');
|
|
172
173
|
var useGetPasskeys = require('./lib/utils/hooks/useGetPasskeys/useGetPasskeys.cjs');
|
|
173
174
|
var useDeletePasskey = require('./lib/utils/hooks/useDeletePasskey/useDeletePasskey.cjs');
|
|
@@ -322,6 +323,7 @@ exports.useSyncMfaFlow = useSyncMfaFlow.useSyncMfaFlow;
|
|
|
322
323
|
exports.useTelegramLogin = useTelegramLogin.useTelegramLogin;
|
|
323
324
|
exports.useUpgradeEmbeddedWallet = useUpgradeEmbeddedWallet.useUpgradeEmbeddedWallet;
|
|
324
325
|
exports.useDeleteUserAccount = useDeleteUserAccount.useDeleteUserAccount;
|
|
326
|
+
exports.useExchangeAccounts = useExchangeAccounts.useExchangeAccounts;
|
|
325
327
|
exports.usePayWithDynamic = usePayWithDynamic.usePayWithDynamic;
|
|
326
328
|
exports.useGetPasskeys = useGetPasskeys.useGetPasskeys;
|
|
327
329
|
exports.useDeletePasskey = useDeletePasskey.useDeletePasskey;
|
package/src/index.d.ts
CHANGED
|
@@ -123,7 +123,7 @@ export { FilterAndSortWallets, FilterBridgeChainsName, FilterChain, FilterWallet
|
|
|
123
123
|
export {
|
|
124
124
|
/** @deprecated */
|
|
125
125
|
DynamicWidgetContextProvider, } from './lib/widgets/DynamicWidget/context';
|
|
126
|
-
export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useTokenBalances, useMultichainTokenBalances, useSwitchWallet, useRpcProviders, useRefreshUser, useWalletOptions, useSmartWallets, EmbeddedWalletVersion, useTelegramLogin, useUpgradeEmbeddedWallet, useEVMTransactionSimulation, useSVMTransactionSimulation, useDeleteUserAccount, useDynamicWaas, useGetPasskeys, useDeletePasskey, useRegisterPasskey, useAuthenticatePasskeyMFA, useGetUserMfaMethods, usePromptMfaAuth, useUpgradeToDynamicWaasFlow, useGetMfaToken, useIsMfaRequiredForAction, useWalletDelegation, } from './lib/utils/hooks';
|
|
126
|
+
export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useTokenBalances, useMultichainTokenBalances, useSwitchWallet, useRpcProviders, useRefreshUser, useWalletOptions, useSmartWallets, EmbeddedWalletVersion, useTelegramLogin, useUpgradeEmbeddedWallet, useEVMTransactionSimulation, useSVMTransactionSimulation, useDeleteUserAccount, useDynamicWaas, useGetPasskeys, useDeletePasskey, useRegisterPasskey, useAuthenticatePasskeyMFA, useGetUserMfaMethods, usePromptMfaAuth, useUpgradeToDynamicWaasFlow, useGetMfaToken, useIsMfaRequiredForAction, useWalletDelegation, useExchangeAccounts, } from './lib/utils/hooks';
|
|
127
127
|
export {
|
|
128
128
|
/** @deprecated use useOnramp instead */
|
|
129
129
|
useFunding, } from './lib/utils/hooks/useFunding';
|
package/src/index.js
CHANGED
|
@@ -164,6 +164,7 @@ export { useSyncMfaFlow } from './lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.
|
|
|
164
164
|
export { useTelegramLogin } from './lib/utils/hooks/useTelegramLogin/useTelegramLogin.js';
|
|
165
165
|
export { useUpgradeEmbeddedWallet } from './lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js';
|
|
166
166
|
export { useDeleteUserAccount } from './lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.js';
|
|
167
|
+
export { useExchangeAccounts } from './lib/utils/hooks/useExchangeAccounts/useExchangeAccounts.js';
|
|
167
168
|
export { usePayWithDynamic } from './lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.js';
|
|
168
169
|
export { useGetPasskeys } from './lib/utils/hooks/useGetPasskeys/useGetPasskeys.js';
|
|
169
170
|
export { useDeletePasskey } from './lib/utils/hooks/useDeletePasskey/useDeletePasskey.js';
|
|
@@ -17,16 +17,103 @@ require('../../utils/constants/values.cjs');
|
|
|
17
17
|
require('@dynamic-labs/sdk-api-core');
|
|
18
18
|
var useLocalStorage = require('../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
19
19
|
require('../../shared/consts/index.cjs');
|
|
20
|
+
require('../DynamicContext/DynamicContext.cjs');
|
|
21
|
+
require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
22
|
+
require('../../events/dynamicEvents.cjs');
|
|
23
|
+
require('../../../../_virtual/_tslib.cjs');
|
|
24
|
+
require('../ErrorContext/ErrorContext.cjs');
|
|
25
|
+
require('@dynamic-labs/multi-wallet');
|
|
26
|
+
require('react-international-phone');
|
|
27
|
+
require('../../store/state/nonce/nonce.cjs');
|
|
28
|
+
require('@dynamic-labs-sdk/client/core');
|
|
29
|
+
require('../../client/client.cjs');
|
|
30
|
+
require('@dynamic-labs-sdk/client');
|
|
31
|
+
require('../../config/ApiEndpoint.cjs');
|
|
32
|
+
require('@dynamic-labs/locale');
|
|
33
|
+
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
34
|
+
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
35
|
+
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
36
|
+
require('../AccessDeniedContext/AccessDeniedContext.cjs');
|
|
37
|
+
require('../AccountExistsContext/AccountExistsContext.cjs');
|
|
38
|
+
require('../UserWalletsContext/UserWalletsContext.cjs');
|
|
39
|
+
require('../../store/state/authMode/authMode.cjs');
|
|
40
|
+
require('../VerificationContext/VerificationContext.cjs');
|
|
41
|
+
require('react-dom');
|
|
42
|
+
require('../../utils/functions/compareChains/compareChains.cjs');
|
|
43
|
+
require('../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
44
|
+
require('../ThemeContext/ThemeContext.cjs');
|
|
45
|
+
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
46
|
+
require('bs58');
|
|
47
|
+
require('@dynamic-labs/types');
|
|
48
|
+
require('../SocialRedirectContext/SocialRedirectContext.cjs');
|
|
49
|
+
require('../LoadingContext/LoadingContext.cjs');
|
|
50
|
+
require('../WalletContext/WalletContext.cjs');
|
|
51
|
+
require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
52
|
+
require('yup');
|
|
53
|
+
require('../MockContext/MockContext.cjs');
|
|
54
|
+
require('../../views/CollectUserDataView/useFields.cjs');
|
|
55
|
+
require('../FieldsStateContext/FieldsStateContext.cjs');
|
|
56
|
+
require('../UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
57
|
+
require('@dynamic-labs/rpc-providers');
|
|
58
|
+
require('../../store/state/walletOptions/walletOptions.cjs');
|
|
59
|
+
require('react-i18next');
|
|
60
|
+
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
61
|
+
require('../../components/Alert/Alert.cjs');
|
|
62
|
+
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
63
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
64
|
+
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
65
|
+
require('../../components/Input/Input.cjs');
|
|
66
|
+
require('../../components/IsBrowser/IsBrowser.cjs');
|
|
67
|
+
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
68
|
+
require('../../components/OverlayCard/OverlayCard.cjs');
|
|
69
|
+
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
70
|
+
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
71
|
+
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
72
|
+
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
73
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
74
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
75
|
+
require('react-focus-lock');
|
|
76
|
+
require('qrcode');
|
|
77
|
+
require('formik');
|
|
78
|
+
require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
79
|
+
require('../WalletGroupContext/WalletGroupContext.cjs');
|
|
80
|
+
require('../IpConfigurationContext/IpConfigurationContext.cjs');
|
|
81
|
+
require('../ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
82
|
+
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
83
|
+
require('@hcaptcha/react-hcaptcha');
|
|
84
|
+
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
85
|
+
require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
86
|
+
require('../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
87
|
+
require('../ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
88
|
+
require('../FooterAnimationContext/index.cjs');
|
|
89
|
+
require('../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
|
|
90
|
+
require('../PasskeyContext/PasskeyContext.cjs');
|
|
91
|
+
require('../OnrampContext/OnrampContext.cjs');
|
|
92
|
+
require('../../store/state/sendBalances.cjs');
|
|
93
|
+
require('../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
94
|
+
require('../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
95
|
+
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
96
|
+
require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
97
|
+
require('../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
|
|
98
|
+
require('../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
|
|
99
|
+
require('../../../index.cjs');
|
|
100
|
+
require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
101
|
+
require('../../store/state/tokenBalances.cjs');
|
|
102
|
+
require('../../store/state/multichainBalances.cjs');
|
|
103
|
+
require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
104
|
+
var useInternalDynamicContext = require('../DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
20
105
|
|
|
21
106
|
const CaptchaContext = React.createContext(undefined);
|
|
22
107
|
const CaptchaContextProvider = ({ children, }) => {
|
|
23
108
|
const { pushView } = ViewContext.useViewContext();
|
|
109
|
+
const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
24
110
|
const [captchaToken, setCaptchaToken, removeCaptchaToken] = useLocalStorage.useLocalStorage(localStorage.CAPTCHA_TOKEN, undefined);
|
|
25
111
|
const [captchaAuthState, setCaptchaAuthState] = React.useState();
|
|
26
112
|
const engageCaptcha = React.useCallback(({ authMethod, onCaptchaSuccess, }) => {
|
|
27
113
|
setCaptchaAuthState({ authMethod, onCaptchaSuccess });
|
|
28
114
|
pushView('captcha');
|
|
29
|
-
|
|
115
|
+
setShowAuthFlow(true);
|
|
116
|
+
}, [pushView, setCaptchaAuthState, setShowAuthFlow]);
|
|
30
117
|
const getCaptchaToken = React.useCallback(() => {
|
|
31
118
|
const token = captchaToken;
|
|
32
119
|
removeCaptchaToken();
|
|
@@ -13,16 +13,103 @@ import '../../utils/constants/values.js';
|
|
|
13
13
|
import '@dynamic-labs/sdk-api-core';
|
|
14
14
|
import { useLocalStorage } from '../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
15
15
|
import '../../shared/consts/index.js';
|
|
16
|
+
import '../DynamicContext/DynamicContext.js';
|
|
17
|
+
import '../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
18
|
+
import '../../events/dynamicEvents.js';
|
|
19
|
+
import '../../../../_virtual/_tslib.js';
|
|
20
|
+
import '../ErrorContext/ErrorContext.js';
|
|
21
|
+
import '@dynamic-labs/multi-wallet';
|
|
22
|
+
import 'react-international-phone';
|
|
23
|
+
import '../../store/state/nonce/nonce.js';
|
|
24
|
+
import '@dynamic-labs-sdk/client/core';
|
|
25
|
+
import '../../client/client.js';
|
|
26
|
+
import '@dynamic-labs-sdk/client';
|
|
27
|
+
import '../../config/ApiEndpoint.js';
|
|
28
|
+
import '@dynamic-labs/locale';
|
|
29
|
+
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
30
|
+
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
31
|
+
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
32
|
+
import '../AccessDeniedContext/AccessDeniedContext.js';
|
|
33
|
+
import '../AccountExistsContext/AccountExistsContext.js';
|
|
34
|
+
import '../UserWalletsContext/UserWalletsContext.js';
|
|
35
|
+
import '../../store/state/authMode/authMode.js';
|
|
36
|
+
import '../VerificationContext/VerificationContext.js';
|
|
37
|
+
import 'react-dom';
|
|
38
|
+
import '../../utils/functions/compareChains/compareChains.js';
|
|
39
|
+
import '../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
40
|
+
import '../ThemeContext/ThemeContext.js';
|
|
41
|
+
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
42
|
+
import 'bs58';
|
|
43
|
+
import '@dynamic-labs/types';
|
|
44
|
+
import '../SocialRedirectContext/SocialRedirectContext.js';
|
|
45
|
+
import '../LoadingContext/LoadingContext.js';
|
|
46
|
+
import '../WalletContext/WalletContext.js';
|
|
47
|
+
import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
48
|
+
import 'yup';
|
|
49
|
+
import '../MockContext/MockContext.js';
|
|
50
|
+
import '../../views/CollectUserDataView/useFields.js';
|
|
51
|
+
import '../FieldsStateContext/FieldsStateContext.js';
|
|
52
|
+
import '../UserFieldEditorContext/UserFieldEditorContext.js';
|
|
53
|
+
import '@dynamic-labs/rpc-providers';
|
|
54
|
+
import '../../store/state/walletOptions/walletOptions.js';
|
|
55
|
+
import 'react-i18next';
|
|
56
|
+
import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
57
|
+
import '../../components/Alert/Alert.js';
|
|
58
|
+
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
59
|
+
import '../../components/IconButton/IconButton.js';
|
|
60
|
+
import '../../components/InlineWidget/InlineWidget.js';
|
|
61
|
+
import '../../components/Input/Input.js';
|
|
62
|
+
import '../../components/IsBrowser/IsBrowser.js';
|
|
63
|
+
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
64
|
+
import '../../components/OverlayCard/OverlayCard.js';
|
|
65
|
+
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
66
|
+
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
67
|
+
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
68
|
+
import '../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
69
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
70
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
71
|
+
import 'react-focus-lock';
|
|
72
|
+
import 'qrcode';
|
|
73
|
+
import 'formik';
|
|
74
|
+
import '../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
75
|
+
import '../WalletGroupContext/WalletGroupContext.js';
|
|
76
|
+
import '../IpConfigurationContext/IpConfigurationContext.js';
|
|
77
|
+
import '../ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
78
|
+
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
79
|
+
import '@hcaptcha/react-hcaptcha';
|
|
80
|
+
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
81
|
+
import '../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
|
|
82
|
+
import '../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
83
|
+
import '../ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
84
|
+
import '../FooterAnimationContext/index.js';
|
|
85
|
+
import '../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
|
|
86
|
+
import '../PasskeyContext/PasskeyContext.js';
|
|
87
|
+
import '../OnrampContext/OnrampContext.js';
|
|
88
|
+
import '../../store/state/sendBalances.js';
|
|
89
|
+
import '../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
90
|
+
import '../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
91
|
+
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
92
|
+
import '../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
93
|
+
import '../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
|
|
94
|
+
import '../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js';
|
|
95
|
+
import '../../../index.js';
|
|
96
|
+
import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
97
|
+
import '../../store/state/tokenBalances.js';
|
|
98
|
+
import '../../store/state/multichainBalances.js';
|
|
99
|
+
import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
100
|
+
import { useInternalDynamicContext } from '../DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
16
101
|
|
|
17
102
|
const CaptchaContext = createContext(undefined);
|
|
18
103
|
const CaptchaContextProvider = ({ children, }) => {
|
|
19
104
|
const { pushView } = useViewContext();
|
|
105
|
+
const { setShowAuthFlow } = useInternalDynamicContext();
|
|
20
106
|
const [captchaToken, setCaptchaToken, removeCaptchaToken] = useLocalStorage(CAPTCHA_TOKEN, undefined);
|
|
21
107
|
const [captchaAuthState, setCaptchaAuthState] = useState();
|
|
22
108
|
const engageCaptcha = useCallback(({ authMethod, onCaptchaSuccess, }) => {
|
|
23
109
|
setCaptchaAuthState({ authMethod, onCaptchaSuccess });
|
|
24
110
|
pushView('captcha');
|
|
25
|
-
|
|
111
|
+
setShowAuthFlow(true);
|
|
112
|
+
}, [pushView, setCaptchaAuthState, setShowAuthFlow]);
|
|
26
113
|
const getCaptchaToken = useCallback(() => {
|
|
27
114
|
const token = captchaToken;
|
|
28
115
|
removeCaptchaToken();
|
|
@@ -37,6 +37,7 @@ require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
|
37
37
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
38
38
|
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
39
39
|
var useVerifyWallet = require('../../utils/hooks/useVerifyWallet/useVerifyWallet.cjs');
|
|
40
|
+
var isConnectOnly = require('../../utils/hooks/authenticationHooks/helpers/isConnectOnly.cjs');
|
|
40
41
|
require('../VerificationContext/VerificationContext.cjs');
|
|
41
42
|
require('react-dom');
|
|
42
43
|
require('../../utils/functions/compareChains/compareChains.cjs');
|
|
@@ -169,6 +170,24 @@ const useResponseHandlers = () => {
|
|
|
169
170
|
return;
|
|
170
171
|
}
|
|
171
172
|
// Default behavior is to link a wallet
|
|
173
|
+
// In connect-only mode, skip verification and just handle the wallet connection
|
|
174
|
+
if (isConnectOnly.isConnectOnly()) {
|
|
175
|
+
logger.logger.logVerboseTroubleshootingMessage('[PhantomRedirect handleConnectResponse] Connect-only mode: skipping verification', {
|
|
176
|
+
authMode: 'connect-only',
|
|
177
|
+
connectResult,
|
|
178
|
+
});
|
|
179
|
+
if (connectResult === null || connectResult === void 0 ? void 0 : connectResult.address) {
|
|
180
|
+
// connectWallet already added the wallet to the store in connect-only mode
|
|
181
|
+
// Just set the last used wallet and close the auth flow
|
|
182
|
+
utils.StorageService.setItem(localStorage.LAST_USED_WALLET, phantomRedirectConnector.key);
|
|
183
|
+
setShowAuthFlow(false);
|
|
184
|
+
}
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
logger.logger.logVerboseTroubleshootingMessage('[PhantomRedirect handleConnectResponse] Connect-and-sign mode: proceeding to verification', {
|
|
188
|
+
authMode: 'connect-and-sign',
|
|
189
|
+
connectResult,
|
|
190
|
+
});
|
|
172
191
|
setShowAuthFlow(true, { ignoreIfIsEmbeddedWidget: true });
|
|
173
192
|
pushView('pending-signature');
|
|
174
193
|
setSelectedWalletConnectorKey('phantom');
|
|
@@ -3,7 +3,7 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import { StorageService, PHANTOM_REDIRECT_CONNECTION_TYPE_KEY } from '@dynamic-labs/utils';
|
|
5
5
|
import { isPhantomRedirectConnector } from '@dynamic-labs/wallet-connector-core';
|
|
6
|
-
import { PHANTOM_SIGNATURE_STATE } from '../../utils/constants/localStorage.js';
|
|
6
|
+
import { LAST_USED_WALLET, PHANTOM_SIGNATURE_STATE } from '../../utils/constants/localStorage.js';
|
|
7
7
|
import { getSiweStatement } from '../../utils/functions/getSiweStatement/getSiweStatement.js';
|
|
8
8
|
import { dynamicEvents } from '../../events/dynamicEvents.js';
|
|
9
9
|
import '../DynamicContext/DynamicContext.js';
|
|
@@ -33,6 +33,7 @@ import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
|
33
33
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
34
34
|
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
35
35
|
import { useVerifyWallet } from '../../utils/hooks/useVerifyWallet/useVerifyWallet.js';
|
|
36
|
+
import { isConnectOnly } from '../../utils/hooks/authenticationHooks/helpers/isConnectOnly.js';
|
|
36
37
|
import '../VerificationContext/VerificationContext.js';
|
|
37
38
|
import 'react-dom';
|
|
38
39
|
import '../../utils/functions/compareChains/compareChains.js';
|
|
@@ -165,6 +166,24 @@ const useResponseHandlers = () => {
|
|
|
165
166
|
return;
|
|
166
167
|
}
|
|
167
168
|
// Default behavior is to link a wallet
|
|
169
|
+
// In connect-only mode, skip verification and just handle the wallet connection
|
|
170
|
+
if (isConnectOnly()) {
|
|
171
|
+
logger.logVerboseTroubleshootingMessage('[PhantomRedirect handleConnectResponse] Connect-only mode: skipping verification', {
|
|
172
|
+
authMode: 'connect-only',
|
|
173
|
+
connectResult,
|
|
174
|
+
});
|
|
175
|
+
if (connectResult === null || connectResult === void 0 ? void 0 : connectResult.address) {
|
|
176
|
+
// connectWallet already added the wallet to the store in connect-only mode
|
|
177
|
+
// Just set the last used wallet and close the auth flow
|
|
178
|
+
StorageService.setItem(LAST_USED_WALLET, phantomRedirectConnector.key);
|
|
179
|
+
setShowAuthFlow(false);
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
logger.logVerboseTroubleshootingMessage('[PhantomRedirect handleConnectResponse] Connect-and-sign mode: proceeding to verification', {
|
|
184
|
+
authMode: 'connect-and-sign',
|
|
185
|
+
connectResult,
|
|
186
|
+
});
|
|
168
187
|
setShowAuthFlow(true, { ignoreIfIsEmbeddedWidget: true });
|
|
169
188
|
pushView('pending-signature');
|
|
170
189
|
setSelectedWalletConnectorKey('phantom');
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
const DYNAMIC_SESSION_PUBLIC_KEY_HEADER = 'x-dyn-session-public-key';
|
|
7
|
+
const DYNAMIC_SESSION_NONCE_HEADER = 'x-dyn-session-nonce';
|
|
8
|
+
const DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER = 'x-dyn-session-nonce-signature';
|
|
9
|
+
|
|
10
|
+
exports.DYNAMIC_SESSION_NONCE_HEADER = DYNAMIC_SESSION_NONCE_HEADER;
|
|
11
|
+
exports.DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER = DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER;
|
|
12
|
+
exports.DYNAMIC_SESSION_PUBLIC_KEY_HEADER = DYNAMIC_SESSION_PUBLIC_KEY_HEADER;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
const DYNAMIC_SESSION_PUBLIC_KEY_HEADER = 'x-dyn-session-public-key';
|
|
3
|
+
const DYNAMIC_SESSION_NONCE_HEADER = 'x-dyn-session-nonce';
|
|
4
|
+
const DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER = 'x-dyn-session-nonce-signature';
|
|
5
|
+
|
|
6
|
+
export { DYNAMIC_SESSION_NONCE_HEADER, DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER, DYNAMIC_SESSION_PUBLIC_KEY_HEADER };
|
|
@@ -24,10 +24,12 @@ require('../../../config/ApiEndpoint.cjs');
|
|
|
24
24
|
require('@dynamic-labs/multi-wallet');
|
|
25
25
|
require('react-international-phone');
|
|
26
26
|
require('../../../store/state/nonce/nonce.cjs');
|
|
27
|
+
var constants = require('../constants.cjs');
|
|
27
28
|
require('@dynamic-labs/locale');
|
|
28
29
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
29
30
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
30
31
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
32
|
+
var getClientSessionKeys = require('../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
31
33
|
require('../../../events/dynamicEvents.cjs');
|
|
32
34
|
var storeTokenAndUser = require('../../../client/extension/storeTokenAndUser/storeTokenAndUser.cjs');
|
|
33
35
|
|
|
@@ -156,7 +158,16 @@ const exportEmbeddedWallet = (_g) => _tslib.__awaiter(void 0, [_g], void 0, func
|
|
|
156
158
|
const registerSessionKey = (_h) => _tslib.__awaiter(void 0, [_h], void 0, function* ({ environmentId, walletId, publicKey, prevSessionKeySignature, }) {
|
|
157
159
|
let response;
|
|
158
160
|
try {
|
|
159
|
-
|
|
161
|
+
const { nonce, nonceSignature, publicKey: sessionPublicKey, } = yield getClientSessionKeys.getClientSessionNonceSignature({
|
|
162
|
+
environmentId,
|
|
163
|
+
});
|
|
164
|
+
response = yield api.sdkApi({
|
|
165
|
+
customHeaders: {
|
|
166
|
+
[constants.DYNAMIC_SESSION_NONCE_HEADER]: nonce,
|
|
167
|
+
[constants.DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER]: nonceSignature,
|
|
168
|
+
[constants.DYNAMIC_SESSION_PUBLIC_KEY_HEADER]: sessionPublicKey,
|
|
169
|
+
},
|
|
170
|
+
}).registerSessionKey({
|
|
160
171
|
environmentId,
|
|
161
172
|
registerSessionKeyRequest: {
|
|
162
173
|
prevSessionKeySignature,
|
|
@@ -20,10 +20,12 @@ import '../../../config/ApiEndpoint.js';
|
|
|
20
20
|
import '@dynamic-labs/multi-wallet';
|
|
21
21
|
import 'react-international-phone';
|
|
22
22
|
import '../../../store/state/nonce/nonce.js';
|
|
23
|
+
import { DYNAMIC_SESSION_NONCE_HEADER, DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER, DYNAMIC_SESSION_PUBLIC_KEY_HEADER } from '../constants.js';
|
|
23
24
|
import '@dynamic-labs/locale';
|
|
24
25
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
25
26
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
26
27
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
28
|
+
import { getClientSessionNonceSignature } from '../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
27
29
|
import '../../../events/dynamicEvents.js';
|
|
28
30
|
import { storeTokenAndUser } from '../../../client/extension/storeTokenAndUser/storeTokenAndUser.js';
|
|
29
31
|
|
|
@@ -152,7 +154,16 @@ const exportEmbeddedWallet = (_g) => __awaiter(void 0, [_g], void 0, function* (
|
|
|
152
154
|
const registerSessionKey = (_h) => __awaiter(void 0, [_h], void 0, function* ({ environmentId, walletId, publicKey, prevSessionKeySignature, }) {
|
|
153
155
|
let response;
|
|
154
156
|
try {
|
|
155
|
-
|
|
157
|
+
const { nonce, nonceSignature, publicKey: sessionPublicKey, } = yield getClientSessionNonceSignature({
|
|
158
|
+
environmentId,
|
|
159
|
+
});
|
|
160
|
+
response = yield sdkApi({
|
|
161
|
+
customHeaders: {
|
|
162
|
+
[DYNAMIC_SESSION_NONCE_HEADER]: nonce,
|
|
163
|
+
[DYNAMIC_SESSION_NONCE_SIGNATURE_HEADER]: nonceSignature,
|
|
164
|
+
[DYNAMIC_SESSION_PUBLIC_KEY_HEADER]: sessionPublicKey,
|
|
165
|
+
},
|
|
166
|
+
}).registerSessionKey({
|
|
156
167
|
environmentId,
|
|
157
168
|
registerSessionKeyRequest: {
|
|
158
169
|
prevSessionKeySignature,
|
|
@@ -128,10 +128,29 @@ const getUserFieldsCheck = (_c) => _tslib.__awaiter(void 0, [_c], void 0, functi
|
|
|
128
128
|
return undefined;
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
+
const unlinkEmail = (_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ environmentId, primaryWalletId, verifiedCredentialId, }) {
|
|
132
|
+
const normalizedPrimaryWalletId = primaryWalletId === null || primaryWalletId === void 0 ? void 0 : primaryWalletId.replace('-zerodev', '');
|
|
133
|
+
try {
|
|
134
|
+
const response = yield api.sdkApi().verifyUnlink({
|
|
135
|
+
environmentId,
|
|
136
|
+
verifyUnlinkRequest: {
|
|
137
|
+
primaryWalletId: normalizedPrimaryWalletId,
|
|
138
|
+
verifiedCredentialId,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
const user = storeTokenAndUser.storeTokenAndUser(response);
|
|
142
|
+
return user;
|
|
143
|
+
}
|
|
144
|
+
catch (e) {
|
|
145
|
+
yield utils.logResponseError(e, 'Error unlinkEmail');
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
131
149
|
|
|
132
150
|
exports.getUserFieldsCheck = getUserFieldsCheck;
|
|
133
151
|
exports.hardDeleteUser = hardDeleteUser;
|
|
134
152
|
exports.mergeUserAccounts = mergeUserAccounts;
|
|
135
153
|
exports.refreshUserJwt = refreshUserJwt;
|
|
154
|
+
exports.unlinkEmail = unlinkEmail;
|
|
136
155
|
exports.updateUserProfileFields = updateUserProfileFields;
|
|
137
156
|
exports.verifyMergeUsers = verifyMergeUsers;
|
|
@@ -18,3 +18,8 @@ export declare const getUserFieldsCheck: ({ environmentId, filter, }: {
|
|
|
18
18
|
environmentId: string;
|
|
19
19
|
filter: UserFieldsCheckParams;
|
|
20
20
|
}) => Promise<UserFieldsCheckResponse | undefined>;
|
|
21
|
+
export declare const unlinkEmail: ({ environmentId, primaryWalletId, verifiedCredentialId, }: {
|
|
22
|
+
environmentId: string;
|
|
23
|
+
primaryWalletId: string;
|
|
24
|
+
verifiedCredentialId: string;
|
|
25
|
+
}) => Promise<UserProfile | undefined>;
|
|
@@ -124,5 +124,23 @@ const getUserFieldsCheck = (_c) => __awaiter(void 0, [_c], void 0, function* ({
|
|
|
124
124
|
return undefined;
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
+
const unlinkEmail = (_d) => __awaiter(void 0, [_d], void 0, function* ({ environmentId, primaryWalletId, verifiedCredentialId, }) {
|
|
128
|
+
const normalizedPrimaryWalletId = primaryWalletId === null || primaryWalletId === void 0 ? void 0 : primaryWalletId.replace('-zerodev', '');
|
|
129
|
+
try {
|
|
130
|
+
const response = yield sdkApi().verifyUnlink({
|
|
131
|
+
environmentId,
|
|
132
|
+
verifyUnlinkRequest: {
|
|
133
|
+
primaryWalletId: normalizedPrimaryWalletId,
|
|
134
|
+
verifiedCredentialId,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
const user = storeTokenAndUser(response);
|
|
138
|
+
return user;
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
yield logResponseError(e, 'Error unlinkEmail');
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
127
145
|
|
|
128
|
-
export { getUserFieldsCheck, hardDeleteUser, mergeUserAccounts, refreshUserJwt, updateUserProfileFields, verifyMergeUsers };
|
|
146
|
+
export { getUserFieldsCheck, hardDeleteUser, mergeUserAccounts, refreshUserJwt, unlinkEmail, updateUserProfileFields, verifyMergeUsers };
|