@dynamic-labs/sdk-react-core 4.47.0 → 4.47.1
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +2 -0
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +2 -0
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +2 -0
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -0
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +2 -0
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +0 -6
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +1 -7
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +2 -0
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +2 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +3 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +3 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +2 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.47.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.47.0...v4.47.1) (2025-11-24)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add aptos non-native coins to sendBalance ([#9914](https://github.com/dynamic-labs/dynamic-auth/issues/9914)) ([0f0f855](https://github.com/dynamic-labs/dynamic-auth/commit/0f0f855229a052eb280831c81d235b0164f26ff3))
|
|
8
|
+
* add aptos non-native token sending to dynamic widget ([#9915](https://github.com/dynamic-labs/dynamic-auth/issues/9915)) ([c91c117](https://github.com/dynamic-labs/dynamic-auth/commit/c91c1172d5185c151f9b4cac1a0757f6d72304ca))
|
|
9
|
+
* **react-native:** add waas wallet upgrade to react-native ([#9936](https://github.com/dynamic-labs/dynamic-auth/issues/9936)) ([024366e](https://github.com/dynamic-labs/dynamic-auth/commit/024366e179b284353d0b05667e916a01520b2874))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* remove noise from wallet connect when it is disabled ([#9945](https://github.com/dynamic-labs/dynamic-auth/issues/9945)) ([ada6511](https://github.com/dynamic-labs/dynamic-auth/commit/ada6511e2d25351f1b63312eb4810752f6d95ad6))
|
|
15
|
+
|
|
2
16
|
## [4.47.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.46.3...v4.47.0) (2025-11-21)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.47.
|
|
3
|
+
"version": "4.47.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.821",
|
|
6
6
|
"@dynamic-labs-sdk/client": "0.1.0-alpha.28",
|
|
@@ -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.47.
|
|
19
|
-
"@dynamic-labs/iconic": "4.47.
|
|
20
|
-
"@dynamic-labs/locale": "4.47.
|
|
21
|
-
"@dynamic-labs/logger": "4.47.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "4.47.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "4.47.
|
|
24
|
-
"@dynamic-labs/store": "4.47.
|
|
25
|
-
"@dynamic-labs/types": "4.47.
|
|
26
|
-
"@dynamic-labs/utils": "4.47.
|
|
27
|
-
"@dynamic-labs/wallet-book": "4.47.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "4.47.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.47.1",
|
|
19
|
+
"@dynamic-labs/iconic": "4.47.1",
|
|
20
|
+
"@dynamic-labs/locale": "4.47.1",
|
|
21
|
+
"@dynamic-labs/logger": "4.47.1",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "4.47.1",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "4.47.1",
|
|
24
|
+
"@dynamic-labs/store": "4.47.1",
|
|
25
|
+
"@dynamic-labs/types": "4.47.1",
|
|
26
|
+
"@dynamic-labs/utils": "4.47.1",
|
|
27
|
+
"@dynamic-labs/wallet-book": "4.47.1",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "4.47.1",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -28,6 +28,7 @@ require('@dynamic-labs/locale');
|
|
|
28
28
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
29
29
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
30
30
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
31
|
+
var getClientSessionKeys = require('../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
31
32
|
require('../../../events/dynamicEvents.cjs');
|
|
32
33
|
var storeTokenAndUser = require('../../../client/extension/storeTokenAndUser/storeTokenAndUser.cjs');
|
|
33
34
|
|
|
@@ -55,6 +56,7 @@ const createEmailHandler = (environmentId, { shouldRegisterSessionKeysOnSignin,
|
|
|
55
56
|
const keypair = yield generateSessionKey();
|
|
56
57
|
sessionPublicKey = keypair.publicKey;
|
|
57
58
|
}
|
|
59
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
58
60
|
const response = yield email.signInWithEmailVerification({
|
|
59
61
|
captchaToken,
|
|
60
62
|
environmentId,
|
|
@@ -24,6 +24,7 @@ import '@dynamic-labs/locale';
|
|
|
24
24
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
25
25
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
26
26
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
27
|
+
import { generateClientSessionKeys } from '../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
27
28
|
import '../../../events/dynamicEvents.js';
|
|
28
29
|
import { storeTokenAndUser } from '../../../client/extension/storeTokenAndUser/storeTokenAndUser.js';
|
|
29
30
|
|
|
@@ -51,6 +52,7 @@ const createEmailHandler = (environmentId, { shouldRegisterSessionKeysOnSignin,
|
|
|
51
52
|
const keypair = yield generateSessionKey();
|
|
52
53
|
sessionPublicKey = keypair.publicKey;
|
|
53
54
|
}
|
|
55
|
+
yield generateClientSessionKeys();
|
|
54
56
|
const response = yield signInWithEmailVerification({
|
|
55
57
|
captchaToken,
|
|
56
58
|
environmentId,
|
|
@@ -27,6 +27,7 @@ var sms = require('../../../data/api/sms/sms.cjs');
|
|
|
27
27
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
28
28
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
29
29
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
30
|
+
var getClientSessionKeys = require('../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
30
31
|
require('../../../events/dynamicEvents.cjs');
|
|
31
32
|
var storeTokenAndUser = require('../../../client/extension/storeTokenAndUser/storeTokenAndUser.cjs');
|
|
32
33
|
|
|
@@ -46,6 +47,7 @@ const createSmsHandler = (environmentId, { shouldRegisterSessionKeysOnSignin, ge
|
|
|
46
47
|
const keypair = yield generateSessionKey();
|
|
47
48
|
sessionPublicKey = keypair.publicKey;
|
|
48
49
|
}
|
|
50
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
49
51
|
const response = yield sms.signInWithSmsVerification({
|
|
50
52
|
captchaToken,
|
|
51
53
|
environmentId,
|
|
@@ -23,6 +23,7 @@ import { createSmsVerification, signInWithSmsVerification } from '../../../data/
|
|
|
23
23
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
24
24
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
25
25
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
26
|
+
import { generateClientSessionKeys } from '../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
26
27
|
import '../../../events/dynamicEvents.js';
|
|
27
28
|
import { storeTokenAndUser } from '../../../client/extension/storeTokenAndUser/storeTokenAndUser.js';
|
|
28
29
|
|
|
@@ -42,6 +43,7 @@ const createSmsHandler = (environmentId, { shouldRegisterSessionKeysOnSignin, ge
|
|
|
42
43
|
const keypair = yield generateSessionKey();
|
|
43
44
|
sessionPublicKey = keypair.publicKey;
|
|
44
45
|
}
|
|
46
|
+
yield generateClientSessionKeys();
|
|
45
47
|
const response = yield signInWithSmsVerification({
|
|
46
48
|
captchaToken,
|
|
47
49
|
environmentId,
|
|
@@ -24,6 +24,7 @@ var updatePrimaryWalletId = require('../../utils/functions/updatePrimaryWalletId
|
|
|
24
24
|
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
25
25
|
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
26
26
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
27
|
+
var getClientSessionKeys = require('../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
27
28
|
require('@dynamic-labs-sdk/client/core');
|
|
28
29
|
require('../../client/client.cjs');
|
|
29
30
|
require('@dynamic-labs-sdk/client');
|
|
@@ -231,6 +232,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
231
232
|
yield connectWallet(socialWalletConnector);
|
|
232
233
|
const address = yield socialWalletConnector.getAddress();
|
|
233
234
|
walletUiUtils.disabledConfirmationOnce();
|
|
235
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
234
236
|
yield verifyWallet({
|
|
235
237
|
captchaToken: getCaptchaToken(),
|
|
236
238
|
oauth: {
|
|
@@ -20,6 +20,7 @@ import { updatePrimaryWalletId } from '../../utils/functions/updatePrimaryWallet
|
|
|
20
20
|
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
21
21
|
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
22
22
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
23
|
+
import { generateClientSessionKeys } from '../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
23
24
|
import '@dynamic-labs-sdk/client/core';
|
|
24
25
|
import '../../client/client.js';
|
|
25
26
|
import '@dynamic-labs-sdk/client';
|
|
@@ -227,6 +228,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
227
228
|
yield connectWallet(socialWalletConnector);
|
|
228
229
|
const address = yield socialWalletConnector.getAddress();
|
|
229
230
|
walletUiUtils.disabledConfirmationOnce();
|
|
231
|
+
yield generateClientSessionKeys();
|
|
230
232
|
yield verifyWallet({
|
|
231
233
|
captchaToken: getCaptchaToken(),
|
|
232
234
|
oauth: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { StorageService, tracing } from '@dynamic-labs/utils';
|
|
4
4
|
import { CLIENT_SESSION_KEYS, CLIENT_SESSION_KEYS_STORAGE_OPTIONS } from '../../constants/sessionStorage.js';
|
|
5
|
-
import {
|
|
5
|
+
import { p256Keygen, toEncodedFormat, p256Sign } from '../keyService/keyService.js';
|
|
6
6
|
import '@dynamic-labs/iconic';
|
|
7
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
import 'react';
|
|
@@ -35,6 +35,7 @@ require('@dynamic-labs/locale');
|
|
|
35
35
|
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
36
36
|
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
37
37
|
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
38
|
+
var getClientSessionKeys = require('../../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
38
39
|
var useHandleWalletsToConnect = require('../../useHandleWalletsToConnect/useHandleWalletsToConnect.cjs');
|
|
39
40
|
var useVerifyWallet = require('../../useVerifyWallet/useVerifyWallet.cjs');
|
|
40
41
|
var showPendingConnectView = require('../helpers/showPendingConnectView.cjs');
|
|
@@ -130,6 +131,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
130
131
|
else {
|
|
131
132
|
walletUiUtils.disabledConfirmationOnce();
|
|
132
133
|
}
|
|
134
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
133
135
|
yield verifyWallet({
|
|
134
136
|
captchaToken,
|
|
135
137
|
publicWalletAddress,
|
|
@@ -31,6 +31,7 @@ import '@dynamic-labs/locale';
|
|
|
31
31
|
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
32
32
|
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
33
33
|
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
34
|
+
import { generateClientSessionKeys } from '../../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
34
35
|
import { useHandleWalletsToConnect } from '../../useHandleWalletsToConnect/useHandleWalletsToConnect.js';
|
|
35
36
|
import { useVerifyWallet } from '../../useVerifyWallet/useVerifyWallet.js';
|
|
36
37
|
import { showPendingConnectView } from '../helpers/showPendingConnectView.js';
|
|
@@ -126,6 +127,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
126
127
|
else {
|
|
127
128
|
walletUiUtils.disabledConfirmationOnce();
|
|
128
129
|
}
|
|
130
|
+
yield generateClientSessionKeys();
|
|
129
131
|
yield verifyWallet({
|
|
130
132
|
captchaToken,
|
|
131
133
|
publicWalletAddress,
|
|
@@ -35,6 +35,7 @@ require('@dynamic-labs/locale');
|
|
|
35
35
|
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
36
36
|
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
37
37
|
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
38
|
+
var getClientSessionKeys = require('../../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
38
39
|
var useHandleWalletsToConnect = require('../../useHandleWalletsToConnect/useHandleWalletsToConnect.cjs');
|
|
39
40
|
var useVerifyWallet = require('../../useVerifyWallet/useVerifyWallet.cjs');
|
|
40
41
|
var showPendingConnectView = require('../helpers/showPendingConnectView.cjs');
|
|
@@ -188,6 +189,7 @@ const useConnectAndSignSplitSteps = () => {
|
|
|
188
189
|
}
|
|
189
190
|
return pushView('network-not-supported');
|
|
190
191
|
}
|
|
192
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
191
193
|
yield verifyWallet({
|
|
192
194
|
captchaToken: getCaptchaToken(),
|
|
193
195
|
publicWalletAddress: connectionResult.address,
|
|
@@ -31,6 +31,7 @@ import '@dynamic-labs/locale';
|
|
|
31
31
|
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
32
32
|
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
33
33
|
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
34
|
+
import { generateClientSessionKeys } from '../../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
34
35
|
import { useHandleWalletsToConnect } from '../../useHandleWalletsToConnect/useHandleWalletsToConnect.js';
|
|
35
36
|
import { useVerifyWallet } from '../../useVerifyWallet/useVerifyWallet.js';
|
|
36
37
|
import { showPendingConnectView } from '../helpers/showPendingConnectView.js';
|
|
@@ -184,6 +185,7 @@ const useConnectAndSignSplitSteps = () => {
|
|
|
184
185
|
}
|
|
185
186
|
return pushView('network-not-supported');
|
|
186
187
|
}
|
|
188
|
+
yield generateClientSessionKeys();
|
|
187
189
|
yield verifyWallet({
|
|
188
190
|
captchaToken: getCaptchaToken(),
|
|
189
191
|
publicWalletAddress: connectionResult.address,
|
package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs
CHANGED
|
@@ -32,6 +32,7 @@ require('@dynamic-labs/locale');
|
|
|
32
32
|
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
33
33
|
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
34
34
|
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
35
|
+
var getClientSessionKeys = require('../../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
35
36
|
var useVerifyWallet = require('../../useVerifyWallet/useVerifyWallet.cjs');
|
|
36
37
|
require('../../../../store/state/authMode/authMode.cjs');
|
|
37
38
|
require('../../../../context/VerificationContext/VerificationContext.cjs');
|
|
@@ -136,6 +137,7 @@ const useSignConnectOnlyUser = () => {
|
|
|
136
137
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.address)) {
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
140
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
139
141
|
yield verifyWallet({
|
|
140
142
|
captchaToken: getCaptchaToken(),
|
|
141
143
|
publicWalletAddress: connectionResult.address,
|
package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js
CHANGED
|
@@ -28,6 +28,7 @@ import '@dynamic-labs/locale';
|
|
|
28
28
|
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
29
29
|
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
30
30
|
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
31
|
+
import { generateClientSessionKeys } from '../../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
31
32
|
import { useVerifyWallet } from '../../useVerifyWallet/useVerifyWallet.js';
|
|
32
33
|
import '../../../../store/state/authMode/authMode.js';
|
|
33
34
|
import '../../../../context/VerificationContext/VerificationContext.js';
|
|
@@ -132,6 +133,7 @@ const useSignConnectOnlyUser = () => {
|
|
|
132
133
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.address)) {
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
136
|
+
yield generateClientSessionKeys();
|
|
135
137
|
yield verifyWallet({
|
|
136
138
|
captchaToken: getCaptchaToken(),
|
|
137
139
|
publicWalletAddress: connectionResult.address,
|
|
@@ -35,12 +35,6 @@ var usePromise = require('../usePromise/usePromise.cjs');
|
|
|
35
35
|
const useClientSessionKeys = () => {
|
|
36
36
|
const user = useOnboardingCompleteUser.useOnboardingCompleteUser();
|
|
37
37
|
const sessionPublicKey = getClientSessionKeys.getClientSessionPublicKey();
|
|
38
|
-
usePromise.usePromise(getClientSessionKeys.generateClientSessionKeys, {
|
|
39
|
-
deps: [sessionPublicKey],
|
|
40
|
-
enabled: !sessionPublicKey,
|
|
41
|
-
initialData: undefined,
|
|
42
|
-
retries: 2,
|
|
43
|
-
});
|
|
44
38
|
const getSignedSessionId = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
45
39
|
if (!(user === null || user === void 0 ? void 0 : user.sessionId) || !sessionPublicKey) {
|
|
46
40
|
throw new Error('Session ID and public key are required');
|
|
@@ -23,7 +23,7 @@ import '@dynamic-labs/locale';
|
|
|
23
23
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
24
24
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
25
25
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
26
|
-
import { getClientSessionPublicKey, getClientSessionSignature
|
|
26
|
+
import { getClientSessionPublicKey, getClientSessionSignature } from '../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
27
27
|
import '../../../events/dynamicEvents.js';
|
|
28
28
|
import { useOnboardingCompleteUser } from '../../../client/extension/user/useOnboardingCompleteUser/useOnboardingCompleteUser.js';
|
|
29
29
|
import { usePromise } from '../usePromise/usePromise.js';
|
|
@@ -31,12 +31,6 @@ import { usePromise } from '../usePromise/usePromise.js';
|
|
|
31
31
|
const useClientSessionKeys = () => {
|
|
32
32
|
const user = useOnboardingCompleteUser();
|
|
33
33
|
const sessionPublicKey = getClientSessionPublicKey();
|
|
34
|
-
usePromise(generateClientSessionKeys, {
|
|
35
|
-
deps: [sessionPublicKey],
|
|
36
|
-
enabled: !sessionPublicKey,
|
|
37
|
-
initialData: undefined,
|
|
38
|
-
retries: 2,
|
|
39
|
-
});
|
|
40
34
|
const getSignedSessionId = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
35
|
if (!(user === null || user === void 0 ? void 0 : user.sessionId) || !sessionPublicKey) {
|
|
42
36
|
throw new Error('Session ID and public key are required');
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var client = require('@dynamic-labs-sdk/client');
|
|
9
|
+
var getClientSessionKeys = require('../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
9
10
|
require('@dynamic-labs/utils');
|
|
10
11
|
require('@dynamic-labs/sdk-api-core');
|
|
11
12
|
require('@dynamic-labs-sdk/client/core');
|
|
@@ -127,6 +128,7 @@ const useExternalAuth = () => {
|
|
|
127
128
|
const sessionPublicKey = shouldRegisterSessionKeysOnSignin()
|
|
128
129
|
? (yield generateSessionKey()).publicKey
|
|
129
130
|
: undefined;
|
|
131
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
130
132
|
const response = yield client.signInWithExternalJwt({
|
|
131
133
|
externalJwt,
|
|
132
134
|
sessionPublicKey,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { useCallback, useMemo } from 'react';
|
|
4
4
|
import { signInWithExternalJwt } from '@dynamic-labs-sdk/client';
|
|
5
|
+
import { generateClientSessionKeys } from '../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
5
6
|
import '@dynamic-labs/utils';
|
|
6
7
|
import '@dynamic-labs/sdk-api-core';
|
|
7
8
|
import '@dynamic-labs-sdk/client/core';
|
|
@@ -123,6 +124,7 @@ const useExternalAuth = () => {
|
|
|
123
124
|
const sessionPublicKey = shouldRegisterSessionKeysOnSignin()
|
|
124
125
|
? (yield generateSessionKey()).publicKey
|
|
125
126
|
: undefined;
|
|
127
|
+
yield generateClientSessionKeys();
|
|
126
128
|
const response = yield signInWithExternalJwt({
|
|
127
129
|
externalJwt,
|
|
128
130
|
sessionPublicKey,
|
|
@@ -40,6 +40,7 @@ require('@dynamic-labs/locale');
|
|
|
40
40
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
41
41
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
42
42
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
43
|
+
var getClientSessionKeys = require('../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
43
44
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
44
45
|
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
45
46
|
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -224,6 +225,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
224
225
|
}));
|
|
225
226
|
}
|
|
226
227
|
if (authMode === 'signin') {
|
|
228
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
227
229
|
if (provider === sdkApiCore.ProviderEnum.Telegram && telegramAuthToken) {
|
|
228
230
|
const apiCall = () => oauth.telegramSignIn(environmentId, {
|
|
229
231
|
captchaToken,
|
|
@@ -338,6 +340,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
338
340
|
const keypair = yield generateSessionKey();
|
|
339
341
|
sessionPublicKey = keypair.publicKey;
|
|
340
342
|
}
|
|
343
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
341
344
|
const apiCall = () => oauth.farcasterSignIn(environmentId, {
|
|
342
345
|
address,
|
|
343
346
|
captchaToken,
|
|
@@ -36,6 +36,7 @@ import '@dynamic-labs/locale';
|
|
|
36
36
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
37
37
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
38
38
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
39
|
+
import { generateClientSessionKeys } from '../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
39
40
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
40
41
|
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
41
42
|
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -220,6 +221,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
220
221
|
}));
|
|
221
222
|
}
|
|
222
223
|
if (authMode === 'signin') {
|
|
224
|
+
yield generateClientSessionKeys();
|
|
223
225
|
if (provider === ProviderEnum.Telegram && telegramAuthToken) {
|
|
224
226
|
const apiCall = () => telegramSignIn(environmentId, {
|
|
225
227
|
captchaToken,
|
|
@@ -334,6 +336,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
|
|
|
334
336
|
const keypair = yield generateSessionKey();
|
|
335
337
|
sessionPublicKey = keypair.publicKey;
|
|
336
338
|
}
|
|
339
|
+
yield generateClientSessionKeys();
|
|
337
340
|
const apiCall = () => farcasterSignIn(environmentId, {
|
|
338
341
|
address,
|
|
339
342
|
captchaToken,
|
|
@@ -32,6 +32,7 @@ var updatePrimaryWalletId = require('../../functions/updatePrimaryWalletId/updat
|
|
|
32
32
|
var connectedWalletsInfo = require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
33
33
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
34
34
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
35
|
+
var getClientSessionKeys = require('../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
35
36
|
require('@dynamic-labs-sdk/client/core');
|
|
36
37
|
require('../../../client/client.cjs');
|
|
37
38
|
require('@dynamic-labs-sdk/client');
|
|
@@ -145,6 +146,7 @@ const useVerifyWallet = ({ displaySiweStatement, environmentId, projectSettings,
|
|
|
145
146
|
const keypair = yield generateSessionKey();
|
|
146
147
|
verifyArgs.sessionPublicKey = keypair.publicKey;
|
|
147
148
|
}
|
|
149
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
148
150
|
let verifyResponse;
|
|
149
151
|
if (!user) {
|
|
150
152
|
verifyResponse = wallets.verifyWallet(environmentId, Object.assign(Object.assign({}, verifyArgs), { captchaToken,
|
|
@@ -28,6 +28,7 @@ import { updatePrimaryWalletId } from '../../functions/updatePrimaryWalletId/upd
|
|
|
28
28
|
import { resetConnectedWalletsInfo } from '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
29
29
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
30
30
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
31
|
+
import { generateClientSessionKeys } from '../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
31
32
|
import '@dynamic-labs-sdk/client/core';
|
|
32
33
|
import '../../../client/client.js';
|
|
33
34
|
import '@dynamic-labs-sdk/client';
|
|
@@ -141,6 +142,7 @@ const useVerifyWallet = ({ displaySiweStatement, environmentId, projectSettings,
|
|
|
141
142
|
const keypair = yield generateSessionKey();
|
|
142
143
|
verifyArgs.sessionPublicKey = keypair.publicKey;
|
|
143
144
|
}
|
|
145
|
+
yield generateClientSessionKeys();
|
|
144
146
|
let verifyResponse;
|
|
145
147
|
if (!user) {
|
|
146
148
|
verifyResponse = verifyWallet(environmentId, Object.assign(Object.assign({}, verifyArgs), { captchaToken,
|
|
@@ -33,6 +33,7 @@ var updatePrimaryWalletId = require('../../utils/functions/updatePrimaryWalletId
|
|
|
33
33
|
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
34
34
|
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
35
35
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
36
|
+
var getClientSessionKeys = require('../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
36
37
|
var email = require('../../data/api/email/email.cjs');
|
|
37
38
|
require('@dynamic-labs/locale');
|
|
38
39
|
var dynamicEvents = require('../../events/dynamicEvents.cjs');
|
|
@@ -281,6 +282,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
|
|
|
281
282
|
const keypair = yield generateSessionKey();
|
|
282
283
|
sessionPublicKey = keypair.publicKey;
|
|
283
284
|
}
|
|
285
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
284
286
|
return email.signInWithEmailVerification({
|
|
285
287
|
environmentId,
|
|
286
288
|
sessionPublicKey,
|
|
@@ -29,6 +29,7 @@ import { updatePrimaryWalletId } from '../../utils/functions/updatePrimaryWallet
|
|
|
29
29
|
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
30
30
|
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
31
31
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
32
|
+
import { generateClientSessionKeys } from '../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
32
33
|
import { signInWithEmailVerification, retryEmailVerification } from '../../data/api/email/email.js';
|
|
33
34
|
import '@dynamic-labs/locale';
|
|
34
35
|
import { dynamicEvents } from '../../events/dynamicEvents.js';
|
|
@@ -277,6 +278,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
|
|
|
277
278
|
const keypair = yield generateSessionKey();
|
|
278
279
|
sessionPublicKey = keypair.publicKey;
|
|
279
280
|
}
|
|
281
|
+
yield generateClientSessionKeys();
|
|
280
282
|
return signInWithEmailVerification({
|
|
281
283
|
environmentId,
|
|
282
284
|
sessionPublicKey,
|
|
@@ -122,6 +122,7 @@ const getTransactionValue = (transaction, isNativeToken) => {
|
|
|
122
122
|
};
|
|
123
123
|
const getSupportedChainName = (connectedChain) => {
|
|
124
124
|
const supportedChains = {
|
|
125
|
+
APTOS: sdkApiCore.ChainEnum.Aptos,
|
|
125
126
|
EVM: sdkApiCore.ChainEnum.Evm,
|
|
126
127
|
SOL: sdkApiCore.ChainEnum.Sol,
|
|
127
128
|
SUI: sdkApiCore.ChainEnum.Sui,
|
|
@@ -118,6 +118,7 @@ const getTransactionValue = (transaction, isNativeToken) => {
|
|
|
118
118
|
};
|
|
119
119
|
const getSupportedChainName = (connectedChain) => {
|
|
120
120
|
const supportedChains = {
|
|
121
|
+
APTOS: ChainEnum.Aptos,
|
|
121
122
|
EVM: ChainEnum.Evm,
|
|
122
123
|
SOL: ChainEnum.Sol,
|
|
123
124
|
SUI: ChainEnum.Sui,
|
|
@@ -32,6 +32,7 @@ var sms = require('../../../data/api/sms/sms.cjs');
|
|
|
32
32
|
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
33
33
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
34
34
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
35
|
+
var getClientSessionKeys = require('../../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
35
36
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
37
|
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
38
|
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -186,6 +187,7 @@ const useSmsVerification = (type) => {
|
|
|
186
187
|
const keypair = yield generateSessionKey();
|
|
187
188
|
sessionPublicKey = keypair.publicKey;
|
|
188
189
|
}
|
|
190
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
189
191
|
return sms.signInWithSmsVerification({
|
|
190
192
|
environmentId,
|
|
191
193
|
sessionPublicKey,
|
|
@@ -28,6 +28,7 @@ import { signInWithSmsVerification, retrySmsVerification } from '../../../data/a
|
|
|
28
28
|
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
29
29
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
30
30
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
31
|
+
import { generateClientSessionKeys } from '../../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
31
32
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
33
|
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
34
|
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -182,6 +183,7 @@ const useSmsVerification = (type) => {
|
|
|
182
183
|
const keypair = yield generateSessionKey();
|
|
183
184
|
sessionPublicKey = keypair.publicKey;
|
|
184
185
|
}
|
|
186
|
+
yield generateClientSessionKeys();
|
|
185
187
|
return signInWithSmsVerification({
|
|
186
188
|
environmentId,
|
|
187
189
|
sessionPublicKey,
|