@dynamic-labs/sdk-react-core 2.0.0 → 2.0.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 +21 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +17 -16
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +11 -3
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +11 -3
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.types.d.ts +1 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +41 -40
- package/src/lib/context/FundingContext/FundingContext.cjs +1 -1
- package/src/lib/context/FundingContext/FundingContext.js +1 -1
- package/src/lib/context/FundingContext/useFunding/useFunding.cjs +1 -1
- package/src/lib/context/FundingContext/useFunding/useFunding.js +1 -1
- package/src/lib/data/api/email/email.cjs +5 -5
- package/src/lib/data/api/email/email.d.ts +2 -2
- package/src/lib/data/api/email/email.js +5 -5
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +14 -14
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +14 -14
- package/src/lib/data/api/oauth/oauth.cjs +6 -6
- package/src/lib/data/api/oauth/oauth.js +6 -6
- package/src/lib/data/api/onramp/onramp.cjs +1 -1
- package/src/lib/data/api/onramp/onramp.d.ts +2 -2
- package/src/lib/data/api/onramp/onramp.js +1 -1
- package/src/lib/data/api/session/session.cjs +2 -2
- package/src/lib/data/api/session/session.js +2 -2
- package/src/lib/data/api/sms/sms.cjs +6 -6
- package/src/lib/data/api/sms/sms.d.ts +2 -2
- package/src/lib/data/api/sms/sms.js +6 -6
- package/src/lib/data/api/user/user.cjs +1 -1
- package/src/lib/data/api/user/user.js +1 -1
- package/src/lib/data/api/wallets/wallets.cjs +5 -5
- package/src/lib/data/api/wallets/wallets.js +5 -5
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.d.ts +1 -1
- package/src/lib/utils/constants/values.cjs +1 -1
- package/src/lib/utils/constants/values.js +1 -1
- package/src/lib/utils/functions/getSiweStatement/getSiweStatement.d.ts +1 -1
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +4 -4
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +1 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +1 -1
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +1 -1
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +4 -4
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +4 -4
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
- package/src/lib/utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.d.ts +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +19 -17
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +19 -17
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +4 -4
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +4 -4
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +4 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +5 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +4 -4
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +1 -1
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +1 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.d.ts +1 -1
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +4 -4
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +4 -4
- package/src/lib/utils/hooks/usePromise/usePromise.d.ts +1 -1
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +1 -1
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +1 -1
- package/src/lib/utils/hooks/useResizeObserver/useResizeObserver.d.ts +1 -1
- package/src/lib/utils/hooks/useSocialAuth/farcaster.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAuth/farcaster.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAuth/farcaster.js +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +11 -10
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +2 -2
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +11 -10
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -4
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -2
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +7 -7
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.d.ts +3 -3
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +7 -7
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +3 -3
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +3 -3
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +1 -1
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +1 -1
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +23 -23
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.d.ts +2 -2
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +23 -23
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +2 -6
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +2 -6
|
@@ -14,7 +14,7 @@ import '../../../shared/utils/classes/storage/localStorage.js';
|
|
|
14
14
|
import '../../../shared/consts/index.js';
|
|
15
15
|
import { sdkApi } from '../api.js';
|
|
16
16
|
|
|
17
|
-
const getEmailProvider = (
|
|
17
|
+
const getEmailProvider = (_a) => __awaiter(void 0, [_a], void 0, function* ({ email, environmentId, }) {
|
|
18
18
|
try {
|
|
19
19
|
const res = yield sdkApi().getEmailProvider({
|
|
20
20
|
email,
|
|
@@ -28,7 +28,7 @@ const getEmailProvider = ({ email, environmentId, }) => __awaiter(void 0, void 0
|
|
|
28
28
|
throw new EmailProviderError(data.code);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
const createEmailVerification = (
|
|
31
|
+
const createEmailVerification = (_b) => __awaiter(void 0, [_b], void 0, function* ({ email, environmentId, captchaToken, }) {
|
|
32
32
|
try {
|
|
33
33
|
const res = yield sdkApi().createEmailVerification({
|
|
34
34
|
emailVerificationCreateRequest: {
|
|
@@ -45,7 +45,7 @@ const createEmailVerification = ({ email, environmentId, captchaToken, }) => __a
|
|
|
45
45
|
throw new EmailVerificationError(data.code);
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
const signInWithEmailVerification = (
|
|
48
|
+
const signInWithEmailVerification = (_c) => __awaiter(void 0, [_c], void 0, function* ({ verificationToken, verificationUUID, environmentId, captchaToken, }) {
|
|
49
49
|
try {
|
|
50
50
|
const res = yield sdkApi().signInWithEmailVerification({
|
|
51
51
|
emailVerificationVerifyRequest: {
|
|
@@ -69,7 +69,7 @@ const signInWithEmailVerification = ({ verificationToken, verificationUUID, envi
|
|
|
69
69
|
throw new EmailVerificationError(data.code);
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const retryEmailVerification = (
|
|
72
|
+
const retryEmailVerification = (_d) => __awaiter(void 0, [_d], void 0, function* ({ email, environmentId, verificationUUID, }) {
|
|
73
73
|
try {
|
|
74
74
|
const res = yield sdkApi().retryEmailVerification({
|
|
75
75
|
emailVerificationRetryRequest: {
|
|
@@ -86,7 +86,7 @@ const retryEmailVerification = ({ email, environmentId, verificationUUID, }) =>
|
|
|
86
86
|
throw new EmailVerificationError(data.code);
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
const verifyEmail = (
|
|
89
|
+
const verifyEmail = (_e, userJwt_1) => __awaiter(void 0, [_e, userJwt_1], void 0, function* ({ verificationToken, verificationUUID, environmentId, }, userJwt) {
|
|
90
90
|
try {
|
|
91
91
|
const res = yield sdkApi(userJwt).verifyEmailVerification({
|
|
92
92
|
emailVerificationVerifyRequest: {
|
|
@@ -18,7 +18,7 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
18
18
|
require('../../../shared/consts/index.cjs');
|
|
19
19
|
var api = require('../api.cjs');
|
|
20
20
|
|
|
21
|
-
const createTurnkeyEmbeddedWallet = ({ attestation, challenge, environmentId, userJwt, chains = [sdkApiCore.ChainEnum.Evm], passkeyAlias, })
|
|
21
|
+
const createTurnkeyEmbeddedWallet = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ attestation, challenge, environmentId, userJwt, chains = [sdkApiCore.ChainEnum.Evm], passkeyAlias, }) {
|
|
22
22
|
const embeddedWallets = [
|
|
23
23
|
{
|
|
24
24
|
chains,
|
|
@@ -40,7 +40,7 @@ const createTurnkeyEmbeddedWallet = ({ attestation, challenge, environmentId, us
|
|
|
40
40
|
environmentId,
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
|
-
const initEmbeddedWalletSession = (
|
|
43
|
+
const initEmbeddedWalletSession = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ authenticatorType, walletId, publicKey, environmentId, userJwt, }) {
|
|
44
44
|
if (authenticatorType === 'passkey') {
|
|
45
45
|
return api.sdkApi(userJwt).initPasskeyRecovery({
|
|
46
46
|
environmentId,
|
|
@@ -58,7 +58,7 @@ const initEmbeddedWalletSession = ({ authenticatorType, walletId, publicKey, env
|
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
|
-
const completePasskeyRecovery = (
|
|
61
|
+
const completePasskeyRecovery = (_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ walletId, attestation, challenge, environmentId, userJwt, }) {
|
|
62
62
|
return api.sdkApi(userJwt).completePasskeyRecovery({
|
|
63
63
|
completePasskeyRecoveryRequest: {
|
|
64
64
|
attestation,
|
|
@@ -68,7 +68,7 @@ const completePasskeyRecovery = ({ walletId, attestation, challenge, environment
|
|
|
68
68
|
environmentId,
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
const updatePasskeyRecoveryEmail = (
|
|
71
|
+
const updatePasskeyRecoveryEmail = (_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ userJwt, environmentId, updateRecoveryEmailRequest, }) {
|
|
72
72
|
try {
|
|
73
73
|
yield api.sdkApi(userJwt).updateEmbeddedWalletRecoveryEmail({
|
|
74
74
|
environmentId,
|
|
@@ -80,7 +80,7 @@ const updatePasskeyRecoveryEmail = ({ userJwt, environmentId, updateRecoveryEmai
|
|
|
80
80
|
throw new utils.DynamicError('Error updating recovery email');
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
const getUserPasskeys = (
|
|
83
|
+
const getUserPasskeys = (_e) => _tslib.__awaiter(void 0, [_e], void 0, function* ({ userJwt, environmentId, }) {
|
|
84
84
|
try {
|
|
85
85
|
const data = yield api.sdkApi(userJwt).getUserPasskeys({
|
|
86
86
|
environmentId,
|
|
@@ -95,7 +95,7 @@ const getUserPasskeys = ({ userJwt, environmentId, }) => _tslib.__awaiter(void 0
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
|
-
const updateUserPasskey = (
|
|
98
|
+
const updateUserPasskey = (_f) => _tslib.__awaiter(void 0, [_f], void 0, function* ({ userJwt, environmentId, id, alias, }) {
|
|
99
99
|
try {
|
|
100
100
|
const data = yield api.sdkApi(userJwt).updatePasskey({
|
|
101
101
|
environmentId,
|
|
@@ -108,7 +108,7 @@ const updateUserPasskey = ({ userJwt, environmentId, id, alias, }) => _tslib.__a
|
|
|
108
108
|
return undefined;
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
const exportEmbeddedWallet = (
|
|
111
|
+
const exportEmbeddedWallet = (_g) => _tslib.__awaiter(void 0, [_g], void 0, function* ({ userJwt, environmentId, walletId, activityId, }) {
|
|
112
112
|
try {
|
|
113
113
|
const data = yield api.sdkApi(userJwt).embeddedWalletExport({
|
|
114
114
|
activityId,
|
|
@@ -122,7 +122,7 @@ const exportEmbeddedWallet = ({ userJwt, environmentId, walletId, activityId, })
|
|
|
122
122
|
return { exportBundle: '' };
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
|
-
const getWalletAuthToken = (
|
|
125
|
+
const getWalletAuthToken = (_h, userJwt_1) => _tslib.__awaiter(void 0, [_h, userJwt_1], void 0, function* ({ environmentId, type, }, userJwt) {
|
|
126
126
|
try {
|
|
127
127
|
const authToken = yield api.sdkApi(userJwt).getAuthToken({
|
|
128
128
|
environmentId,
|
|
@@ -134,7 +134,7 @@ const getWalletAuthToken = ({ environmentId, type, }, userJwt) => _tslib.__await
|
|
|
134
134
|
return undefined;
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
const getEmbeddedWalletBackup = (
|
|
137
|
+
const getEmbeddedWalletBackup = (_j, userJwt_2) => _tslib.__awaiter(void 0, [_j, userJwt_2], void 0, function* ({ environmentId, }, userJwt) {
|
|
138
138
|
try {
|
|
139
139
|
const response = yield api.sdkApi(userJwt).getEmbeddedWalletBackups({
|
|
140
140
|
environmentId,
|
|
@@ -145,7 +145,7 @@ const getEmbeddedWalletBackup = ({ environmentId, }, userJwt) => _tslib.__awaite
|
|
|
145
145
|
return undefined;
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
-
const getEmbeddedWalletPasscode = (
|
|
148
|
+
const getEmbeddedWalletPasscode = (_k, userJwt_3) => _tslib.__awaiter(void 0, [_k, userJwt_3], void 0, function* ({ environmentId, }, userJwt) {
|
|
149
149
|
try {
|
|
150
150
|
const response = yield api.sdkApi(userJwt).getEmbeddedWalletPasscode({
|
|
151
151
|
environmentId,
|
|
@@ -156,8 +156,8 @@ const getEmbeddedWalletPasscode = ({ environmentId, }, userJwt) => _tslib.__awai
|
|
|
156
156
|
return undefined;
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
|
-
const claimEmbeddedWallet = (
|
|
160
|
-
var
|
|
159
|
+
const claimEmbeddedWallet = (_l, userJwt_4) => _tslib.__awaiter(void 0, [_l, userJwt_4], void 0, function* ({ environmentId, walletId, }, userJwt) {
|
|
160
|
+
var _m, _o;
|
|
161
161
|
try {
|
|
162
162
|
const response = yield api.sdkApi(userJwt).claimEmbeddedWallet({
|
|
163
163
|
embeddedWalletPasscodeClaimRequest: {
|
|
@@ -170,8 +170,8 @@ const claimEmbeddedWallet = ({ environmentId, walletId, }, userJwt) => _tslib.__
|
|
|
170
170
|
catch (e) {
|
|
171
171
|
logger.logger.error(e);
|
|
172
172
|
// request failed, return unknown error
|
|
173
|
-
const data = yield ((
|
|
174
|
-
if (!((
|
|
173
|
+
const data = yield ((_m = e === null || e === void 0 ? void 0 : e.json) === null || _m === void 0 ? void 0 : _m.call(e));
|
|
174
|
+
if (!((_o = data === null || data === void 0 ? void 0 : data.error) === null || _o === void 0 ? void 0 : _o.code)) {
|
|
175
175
|
return { code: 'unknown_error' };
|
|
176
176
|
}
|
|
177
177
|
throw e;
|
|
@@ -14,7 +14,7 @@ import '../../../shared/utils/classes/storage/localStorage.js';
|
|
|
14
14
|
import '../../../shared/consts/index.js';
|
|
15
15
|
import { sdkApi } from '../api.js';
|
|
16
16
|
|
|
17
|
-
const createTurnkeyEmbeddedWallet = ({ attestation, challenge, environmentId, userJwt, chains = [ChainEnum.Evm], passkeyAlias, })
|
|
17
|
+
const createTurnkeyEmbeddedWallet = (_a) => __awaiter(void 0, [_a], void 0, function* ({ attestation, challenge, environmentId, userJwt, chains = [ChainEnum.Evm], passkeyAlias, }) {
|
|
18
18
|
const embeddedWallets = [
|
|
19
19
|
{
|
|
20
20
|
chains,
|
|
@@ -36,7 +36,7 @@ const createTurnkeyEmbeddedWallet = ({ attestation, challenge, environmentId, us
|
|
|
36
36
|
environmentId,
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
const initEmbeddedWalletSession = (
|
|
39
|
+
const initEmbeddedWalletSession = (_b) => __awaiter(void 0, [_b], void 0, function* ({ authenticatorType, walletId, publicKey, environmentId, userJwt, }) {
|
|
40
40
|
if (authenticatorType === 'passkey') {
|
|
41
41
|
return sdkApi(userJwt).initPasskeyRecovery({
|
|
42
42
|
environmentId,
|
|
@@ -54,7 +54,7 @@ const initEmbeddedWalletSession = ({ authenticatorType, walletId, publicKey, env
|
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
|
-
const completePasskeyRecovery = (
|
|
57
|
+
const completePasskeyRecovery = (_c) => __awaiter(void 0, [_c], void 0, function* ({ walletId, attestation, challenge, environmentId, userJwt, }) {
|
|
58
58
|
return sdkApi(userJwt).completePasskeyRecovery({
|
|
59
59
|
completePasskeyRecoveryRequest: {
|
|
60
60
|
attestation,
|
|
@@ -64,7 +64,7 @@ const completePasskeyRecovery = ({ walletId, attestation, challenge, environment
|
|
|
64
64
|
environmentId,
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
const updatePasskeyRecoveryEmail = (
|
|
67
|
+
const updatePasskeyRecoveryEmail = (_d) => __awaiter(void 0, [_d], void 0, function* ({ userJwt, environmentId, updateRecoveryEmailRequest, }) {
|
|
68
68
|
try {
|
|
69
69
|
yield sdkApi(userJwt).updateEmbeddedWalletRecoveryEmail({
|
|
70
70
|
environmentId,
|
|
@@ -76,7 +76,7 @@ const updatePasskeyRecoveryEmail = ({ userJwt, environmentId, updateRecoveryEmai
|
|
|
76
76
|
throw new DynamicError('Error updating recovery email');
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
|
-
const getUserPasskeys = (
|
|
79
|
+
const getUserPasskeys = (_e) => __awaiter(void 0, [_e], void 0, function* ({ userJwt, environmentId, }) {
|
|
80
80
|
try {
|
|
81
81
|
const data = yield sdkApi(userJwt).getUserPasskeys({
|
|
82
82
|
environmentId,
|
|
@@ -91,7 +91,7 @@ const getUserPasskeys = ({ userJwt, environmentId, }) => __awaiter(void 0, void
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
|
-
const updateUserPasskey = (
|
|
94
|
+
const updateUserPasskey = (_f) => __awaiter(void 0, [_f], void 0, function* ({ userJwt, environmentId, id, alias, }) {
|
|
95
95
|
try {
|
|
96
96
|
const data = yield sdkApi(userJwt).updatePasskey({
|
|
97
97
|
environmentId,
|
|
@@ -104,7 +104,7 @@ const updateUserPasskey = ({ userJwt, environmentId, id, alias, }) => __awaiter(
|
|
|
104
104
|
return undefined;
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
-
const exportEmbeddedWallet = (
|
|
107
|
+
const exportEmbeddedWallet = (_g) => __awaiter(void 0, [_g], void 0, function* ({ userJwt, environmentId, walletId, activityId, }) {
|
|
108
108
|
try {
|
|
109
109
|
const data = yield sdkApi(userJwt).embeddedWalletExport({
|
|
110
110
|
activityId,
|
|
@@ -118,7 +118,7 @@ const exportEmbeddedWallet = ({ userJwt, environmentId, walletId, activityId, })
|
|
|
118
118
|
return { exportBundle: '' };
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
const getWalletAuthToken = (
|
|
121
|
+
const getWalletAuthToken = (_h, userJwt_1) => __awaiter(void 0, [_h, userJwt_1], void 0, function* ({ environmentId, type, }, userJwt) {
|
|
122
122
|
try {
|
|
123
123
|
const authToken = yield sdkApi(userJwt).getAuthToken({
|
|
124
124
|
environmentId,
|
|
@@ -130,7 +130,7 @@ const getWalletAuthToken = ({ environmentId, type, }, userJwt) => __awaiter(void
|
|
|
130
130
|
return undefined;
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
const getEmbeddedWalletBackup = (
|
|
133
|
+
const getEmbeddedWalletBackup = (_j, userJwt_2) => __awaiter(void 0, [_j, userJwt_2], void 0, function* ({ environmentId, }, userJwt) {
|
|
134
134
|
try {
|
|
135
135
|
const response = yield sdkApi(userJwt).getEmbeddedWalletBackups({
|
|
136
136
|
environmentId,
|
|
@@ -141,7 +141,7 @@ const getEmbeddedWalletBackup = ({ environmentId, }, userJwt) => __awaiter(void
|
|
|
141
141
|
return undefined;
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
const getEmbeddedWalletPasscode = (
|
|
144
|
+
const getEmbeddedWalletPasscode = (_k, userJwt_3) => __awaiter(void 0, [_k, userJwt_3], void 0, function* ({ environmentId, }, userJwt) {
|
|
145
145
|
try {
|
|
146
146
|
const response = yield sdkApi(userJwt).getEmbeddedWalletPasscode({
|
|
147
147
|
environmentId,
|
|
@@ -152,8 +152,8 @@ const getEmbeddedWalletPasscode = ({ environmentId, }, userJwt) => __awaiter(voi
|
|
|
152
152
|
return undefined;
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
-
const claimEmbeddedWallet = (
|
|
156
|
-
var
|
|
155
|
+
const claimEmbeddedWallet = (_l, userJwt_4) => __awaiter(void 0, [_l, userJwt_4], void 0, function* ({ environmentId, walletId, }, userJwt) {
|
|
156
|
+
var _m, _o;
|
|
157
157
|
try {
|
|
158
158
|
const response = yield sdkApi(userJwt).claimEmbeddedWallet({
|
|
159
159
|
embeddedWalletPasscodeClaimRequest: {
|
|
@@ -166,8 +166,8 @@ const claimEmbeddedWallet = ({ environmentId, walletId, }, userJwt) => __awaiter
|
|
|
166
166
|
catch (e) {
|
|
167
167
|
logger.error(e);
|
|
168
168
|
// request failed, return unknown error
|
|
169
|
-
const data = yield ((
|
|
170
|
-
if (!((
|
|
169
|
+
const data = yield ((_m = e === null || e === void 0 ? void 0 : e.json) === null || _m === void 0 ? void 0 : _m.call(e));
|
|
170
|
+
if (!((_o = data === null || data === void 0 ? void 0 : data.error) === null || _o === void 0 ? void 0 : _o.code)) {
|
|
171
171
|
return { code: 'unknown_error' };
|
|
172
172
|
}
|
|
173
173
|
throw e;
|
|
@@ -18,7 +18,7 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
18
18
|
require('../../../shared/consts/index.cjs');
|
|
19
19
|
var api = require('../api.cjs');
|
|
20
20
|
|
|
21
|
-
const verifyOAuth = (
|
|
21
|
+
const verifyOAuth = (environmentId_1, providerType_1, _a, userJwt_1) => _tslib.__awaiter(void 0, [environmentId_1, providerType_1, _a, userJwt_1], void 0, function* (environmentId, providerType, { code, codeVerifier, state }, userJwt) {
|
|
22
22
|
const oauthRequest = {
|
|
23
23
|
code,
|
|
24
24
|
codeVerifier,
|
|
@@ -41,7 +41,7 @@ const verifyOAuth = (environmentId, providerType, { code, codeVerifier, state },
|
|
|
41
41
|
return undefined;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
const unlinkOAuth = (
|
|
44
|
+
const unlinkOAuth = (_b, userJwt_2) => _tslib.__awaiter(void 0, [_b, userJwt_2], void 0, function* ({ environmentId, primaryWalletId, verifiedCrentialId, }, userJwt) {
|
|
45
45
|
try {
|
|
46
46
|
const response = yield api.sdkApi(userJwt).verifyUnlink({
|
|
47
47
|
environmentId,
|
|
@@ -56,8 +56,8 @@ const unlinkOAuth = ({ environmentId, primaryWalletId, verifiedCrentialId, }, us
|
|
|
56
56
|
return undefined;
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
const signInOAuth = (
|
|
60
|
-
var
|
|
59
|
+
const signInOAuth = (environmentId_2, providerType_2, _c) => _tslib.__awaiter(void 0, [environmentId_2, providerType_2, _c], void 0, function* (environmentId, providerType, { code, codeVerifier, state, captchaToken }) {
|
|
60
|
+
var _d;
|
|
61
61
|
const oauthRequest = {
|
|
62
62
|
captchaToken,
|
|
63
63
|
code,
|
|
@@ -80,7 +80,7 @@ const signInOAuth = (environmentId, providerType, { code, codeVerifier, state, c
|
|
|
80
80
|
}
|
|
81
81
|
if (data.error.code === 'missing_from_list') {
|
|
82
82
|
throw new utils.NoAccessError({
|
|
83
|
-
walletPublicKey: (
|
|
83
|
+
walletPublicKey: (_d = data === null || data === void 0 ? void 0 : data.payload) === null || _d === void 0 ? void 0 : _d.walletPublicKey,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (data.code === 'email_associated_with_different_provider') {
|
|
@@ -89,7 +89,7 @@ const signInOAuth = (environmentId, providerType, { code, codeVerifier, state, c
|
|
|
89
89
|
return undefined;
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
const getOAuthResult = (
|
|
92
|
+
const getOAuthResult = (environmentId_3, providerType_3, _e) => _tslib.__awaiter(void 0, [environmentId_3, providerType_3, _e], void 0, function* (environmentId, providerType, { state }) {
|
|
93
93
|
const oauthResultRequest = {
|
|
94
94
|
state,
|
|
95
95
|
};
|
|
@@ -14,7 +14,7 @@ import '../../../shared/utils/classes/storage/localStorage.js';
|
|
|
14
14
|
import '../../../shared/consts/index.js';
|
|
15
15
|
import { sdkApi } from '../api.js';
|
|
16
16
|
|
|
17
|
-
const verifyOAuth = (
|
|
17
|
+
const verifyOAuth = (environmentId_1, providerType_1, _a, userJwt_1) => __awaiter(void 0, [environmentId_1, providerType_1, _a, userJwt_1], void 0, function* (environmentId, providerType, { code, codeVerifier, state }, userJwt) {
|
|
18
18
|
const oauthRequest = {
|
|
19
19
|
code,
|
|
20
20
|
codeVerifier,
|
|
@@ -37,7 +37,7 @@ const verifyOAuth = (environmentId, providerType, { code, codeVerifier, state },
|
|
|
37
37
|
return undefined;
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const unlinkOAuth = (
|
|
40
|
+
const unlinkOAuth = (_b, userJwt_2) => __awaiter(void 0, [_b, userJwt_2], void 0, function* ({ environmentId, primaryWalletId, verifiedCrentialId, }, userJwt) {
|
|
41
41
|
try {
|
|
42
42
|
const response = yield sdkApi(userJwt).verifyUnlink({
|
|
43
43
|
environmentId,
|
|
@@ -52,8 +52,8 @@ const unlinkOAuth = ({ environmentId, primaryWalletId, verifiedCrentialId, }, us
|
|
|
52
52
|
return undefined;
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
const signInOAuth = (
|
|
56
|
-
var
|
|
55
|
+
const signInOAuth = (environmentId_2, providerType_2, _c) => __awaiter(void 0, [environmentId_2, providerType_2, _c], void 0, function* (environmentId, providerType, { code, codeVerifier, state, captchaToken }) {
|
|
56
|
+
var _d;
|
|
57
57
|
const oauthRequest = {
|
|
58
58
|
captchaToken,
|
|
59
59
|
code,
|
|
@@ -76,7 +76,7 @@ const signInOAuth = (environmentId, providerType, { code, codeVerifier, state, c
|
|
|
76
76
|
}
|
|
77
77
|
if (data.error.code === 'missing_from_list') {
|
|
78
78
|
throw new NoAccessError({
|
|
79
|
-
walletPublicKey: (
|
|
79
|
+
walletPublicKey: (_d = data === null || data === void 0 ? void 0 : data.payload) === null || _d === void 0 ? void 0 : _d.walletPublicKey,
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
if (data.code === 'email_associated_with_different_provider') {
|
|
@@ -85,7 +85,7 @@ const signInOAuth = (environmentId, providerType, { code, codeVerifier, state, c
|
|
|
85
85
|
return undefined;
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
const getOAuthResult = (
|
|
88
|
+
const getOAuthResult = (environmentId_3, providerType_3, _e) => __awaiter(void 0, [environmentId_3, providerType_3, _e], void 0, function* (environmentId, providerType, { state }) {
|
|
89
89
|
const oauthResultRequest = {
|
|
90
90
|
state,
|
|
91
91
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var api = require('../api.cjs');
|
|
7
7
|
|
|
8
|
-
const getOnrampProviders = (
|
|
8
|
+
const getOnrampProviders = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ chain, environmentId, networkId, token, walletAddress, }) {
|
|
9
9
|
const { onramps } = yield api.sdkApi().getSupportedOnramps({
|
|
10
10
|
chain,
|
|
11
11
|
environmentId,
|
|
@@ -2,7 +2,7 @@ import { OnrampConfiguration } from '@dynamic-labs/sdk-api-core';
|
|
|
2
2
|
export declare const getOnrampProviders: ({ chain, environmentId, networkId, token, walletAddress, }: {
|
|
3
3
|
chain: string;
|
|
4
4
|
environmentId: string;
|
|
5
|
-
networkId?: string | number
|
|
6
|
-
token?: string
|
|
5
|
+
networkId?: string | number;
|
|
6
|
+
token?: string;
|
|
7
7
|
walletAddress: string;
|
|
8
8
|
}) => Promise<OnrampConfiguration[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { sdkApi } from '../api.js';
|
|
3
3
|
|
|
4
|
-
const getOnrampProviders = (
|
|
4
|
+
const getOnrampProviders = (_a) => __awaiter(void 0, [_a], void 0, function* ({ chain, environmentId, networkId, token, walletAddress, }) {
|
|
5
5
|
const { onramps } = yield sdkApi().getSupportedOnramps({
|
|
6
6
|
chain,
|
|
7
7
|
environmentId,
|
|
@@ -18,7 +18,7 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
18
18
|
require('../../../shared/consts/index.cjs');
|
|
19
19
|
var api = require('../api.cjs');
|
|
20
20
|
|
|
21
|
-
const revokeSession = (
|
|
21
|
+
const revokeSession = (_a, userJwt_1) => _tslib.__awaiter(void 0, [_a, userJwt_1], void 0, function* ({ environmentId, sessionId, }, userJwt) {
|
|
22
22
|
try {
|
|
23
23
|
yield api.sdkApi(userJwt).revokeSession({
|
|
24
24
|
environmentId,
|
|
@@ -50,7 +50,7 @@ const mapAuthModeTypeToEnum = (authMode) => {
|
|
|
50
50
|
}
|
|
51
51
|
return found;
|
|
52
52
|
};
|
|
53
|
-
const createVisit = (
|
|
53
|
+
const createVisit = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ authMode, chain, environmentId, walletProvider, publicWalletAddress, walletName, }) {
|
|
54
54
|
try {
|
|
55
55
|
const connectRequest = {
|
|
56
56
|
address: publicWalletAddress,
|
|
@@ -14,7 +14,7 @@ import '../../../shared/utils/classes/storage/localStorage.js';
|
|
|
14
14
|
import '../../../shared/consts/index.js';
|
|
15
15
|
import { sdkApi } from '../api.js';
|
|
16
16
|
|
|
17
|
-
const revokeSession = (
|
|
17
|
+
const revokeSession = (_a, userJwt_1) => __awaiter(void 0, [_a, userJwt_1], void 0, function* ({ environmentId, sessionId, }, userJwt) {
|
|
18
18
|
try {
|
|
19
19
|
yield sdkApi(userJwt).revokeSession({
|
|
20
20
|
environmentId,
|
|
@@ -46,7 +46,7 @@ const mapAuthModeTypeToEnum = (authMode) => {
|
|
|
46
46
|
}
|
|
47
47
|
return found;
|
|
48
48
|
};
|
|
49
|
-
const createVisit = (
|
|
49
|
+
const createVisit = (_b) => __awaiter(void 0, [_b], void 0, function* ({ authMode, chain, environmentId, walletProvider, publicWalletAddress, walletName, }) {
|
|
50
50
|
try {
|
|
51
51
|
const connectRequest = {
|
|
52
52
|
address: publicWalletAddress,
|
|
@@ -19,7 +19,7 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
19
19
|
require('../../../shared/consts/index.cjs');
|
|
20
20
|
var api = require('../api.cjs');
|
|
21
21
|
|
|
22
|
-
const createSmsVerification = (
|
|
22
|
+
const createSmsVerification = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ isoCountryCode, phoneNumber, phoneCountryCode, environmentId, captchaToken, }) {
|
|
23
23
|
try {
|
|
24
24
|
return yield api.sdkApi().createSmsVerification({
|
|
25
25
|
environmentId,
|
|
@@ -37,8 +37,8 @@ const createSmsVerification = ({ isoCountryCode, phoneNumber, phoneCountryCode,
|
|
|
37
37
|
throw new utils.SmsVerificationError(data.error, data.code);
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const signInWithSmsVerification = (
|
|
41
|
-
var
|
|
40
|
+
const signInWithSmsVerification = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ verificationToken, verificationUUID, environmentId, captchaToken, }) {
|
|
41
|
+
var _c;
|
|
42
42
|
try {
|
|
43
43
|
return yield api.sdkApi().signInWithSmsVerification({
|
|
44
44
|
environmentId,
|
|
@@ -52,7 +52,7 @@ const signInWithSmsVerification = ({ verificationToken, verificationUUID, enviro
|
|
|
52
52
|
catch (e) {
|
|
53
53
|
const data = yield e.json();
|
|
54
54
|
logger.logger.error(data.error);
|
|
55
|
-
if (((
|
|
55
|
+
if (((_c = data.error) === null || _c === void 0 ? void 0 : _c.code) === 'missing_from_list') {
|
|
56
56
|
throw new utils.NoAccessError({ phoneNumber: data.payload.phoneNumber });
|
|
57
57
|
}
|
|
58
58
|
if (data.code === 'wrong_sms_verification_token') {
|
|
@@ -61,7 +61,7 @@ const signInWithSmsVerification = ({ verificationToken, verificationUUID, enviro
|
|
|
61
61
|
throw new utils.SmsVerificationError(data.error, data.code);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
const retrySmsVerification = (
|
|
64
|
+
const retrySmsVerification = (_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ isoCountryCode, phoneCountryCode, phoneNumber, environmentId, verificationUUID, }) {
|
|
65
65
|
try {
|
|
66
66
|
return yield api.sdkApi().retrySmsVerification({
|
|
67
67
|
environmentId,
|
|
@@ -79,7 +79,7 @@ const retrySmsVerification = ({ isoCountryCode, phoneCountryCode, phoneNumber, e
|
|
|
79
79
|
throw new utils.SmsVerificationError(data.error, data.code);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
const verifySms = (
|
|
82
|
+
const verifySms = (_e, userJwt_1) => _tslib.__awaiter(void 0, [_e, userJwt_1], void 0, function* ({ verificationToken, verificationUUID, environmentId, }, userJwt) {
|
|
83
83
|
try {
|
|
84
84
|
return yield api.sdkApi(userJwt).verifySmsVerification({
|
|
85
85
|
environmentId,
|
|
@@ -7,13 +7,13 @@ export declare const createSmsVerification: ({ isoCountryCode, phoneNumber, phon
|
|
|
7
7
|
/** Only the phone number, without country code or anything but digits */
|
|
8
8
|
phoneNumber: string;
|
|
9
9
|
environmentId: string;
|
|
10
|
-
captchaToken?: string
|
|
10
|
+
captchaToken?: string;
|
|
11
11
|
}) => Promise<SmsVerificationCreateResponse>;
|
|
12
12
|
export declare const signInWithSmsVerification: ({ verificationToken, verificationUUID, environmentId, captchaToken, }: {
|
|
13
13
|
environmentId: string;
|
|
14
14
|
verificationToken: string;
|
|
15
15
|
verificationUUID: string;
|
|
16
|
-
captchaToken?: string
|
|
16
|
+
captchaToken?: string;
|
|
17
17
|
}) => Promise<VerifyResponse>;
|
|
18
18
|
export declare const retrySmsVerification: ({ isoCountryCode, phoneCountryCode, phoneNumber, environmentId, verificationUUID, }: {
|
|
19
19
|
/** The iso2 of the country ex: US, FR or BR */
|
|
@@ -15,7 +15,7 @@ import '../../../shared/utils/classes/storage/localStorage.js';
|
|
|
15
15
|
import '../../../shared/consts/index.js';
|
|
16
16
|
import { sdkApi } from '../api.js';
|
|
17
17
|
|
|
18
|
-
const createSmsVerification = (
|
|
18
|
+
const createSmsVerification = (_a) => __awaiter(void 0, [_a], void 0, function* ({ isoCountryCode, phoneNumber, phoneCountryCode, environmentId, captchaToken, }) {
|
|
19
19
|
try {
|
|
20
20
|
return yield sdkApi().createSmsVerification({
|
|
21
21
|
environmentId,
|
|
@@ -33,8 +33,8 @@ const createSmsVerification = ({ isoCountryCode, phoneNumber, phoneCountryCode,
|
|
|
33
33
|
throw new SmsVerificationError(data.error, data.code);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
const signInWithSmsVerification = (
|
|
37
|
-
var
|
|
36
|
+
const signInWithSmsVerification = (_b) => __awaiter(void 0, [_b], void 0, function* ({ verificationToken, verificationUUID, environmentId, captchaToken, }) {
|
|
37
|
+
var _c;
|
|
38
38
|
try {
|
|
39
39
|
return yield sdkApi().signInWithSmsVerification({
|
|
40
40
|
environmentId,
|
|
@@ -48,7 +48,7 @@ const signInWithSmsVerification = ({ verificationToken, verificationUUID, enviro
|
|
|
48
48
|
catch (e) {
|
|
49
49
|
const data = yield e.json();
|
|
50
50
|
logger.error(data.error);
|
|
51
|
-
if (((
|
|
51
|
+
if (((_c = data.error) === null || _c === void 0 ? void 0 : _c.code) === 'missing_from_list') {
|
|
52
52
|
throw new NoAccessError({ phoneNumber: data.payload.phoneNumber });
|
|
53
53
|
}
|
|
54
54
|
if (data.code === 'wrong_sms_verification_token') {
|
|
@@ -57,7 +57,7 @@ const signInWithSmsVerification = ({ verificationToken, verificationUUID, enviro
|
|
|
57
57
|
throw new SmsVerificationError(data.error, data.code);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
const retrySmsVerification = (
|
|
60
|
+
const retrySmsVerification = (_d) => __awaiter(void 0, [_d], void 0, function* ({ isoCountryCode, phoneCountryCode, phoneNumber, environmentId, verificationUUID, }) {
|
|
61
61
|
try {
|
|
62
62
|
return yield sdkApi().retrySmsVerification({
|
|
63
63
|
environmentId,
|
|
@@ -75,7 +75,7 @@ const retrySmsVerification = ({ isoCountryCode, phoneCountryCode, phoneNumber, e
|
|
|
75
75
|
throw new SmsVerificationError(data.error, data.code);
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
const verifySms = (
|
|
78
|
+
const verifySms = (_e, userJwt_1) => __awaiter(void 0, [_e, userJwt_1], void 0, function* ({ verificationToken, verificationUUID, environmentId, }, userJwt) {
|
|
79
79
|
try {
|
|
80
80
|
return yield sdkApi(userJwt).verifySmsVerification({
|
|
81
81
|
environmentId,
|
|
@@ -60,7 +60,7 @@ const mergeUserAccounts = (userJwt, environmentId) => _tslib.__awaiter(void 0, v
|
|
|
60
60
|
throw e;
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
const refreshUserJwt = (
|
|
63
|
+
const refreshUserJwt = (_a, userJwt_1) => _tslib.__awaiter(void 0, [_a, userJwt_1], void 0, function* ({ environmentId, }, userJwt) {
|
|
64
64
|
try {
|
|
65
65
|
const { jwt, minifiedJwt } = yield api.sdkApi(userJwt).refreshAuth({
|
|
66
66
|
environmentId,
|
|
@@ -56,7 +56,7 @@ const mergeUserAccounts = (userJwt, environmentId) => __awaiter(void 0, void 0,
|
|
|
56
56
|
throw e;
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
const refreshUserJwt = (
|
|
59
|
+
const refreshUserJwt = (_a, userJwt_1) => __awaiter(void 0, [_a, userJwt_1], void 0, function* ({ environmentId, }, userJwt) {
|
|
60
60
|
try {
|
|
61
61
|
const { jwt, minifiedJwt } = yield sdkApi(userJwt).refreshAuth({
|
|
62
62
|
environmentId,
|
|
@@ -18,7 +18,7 @@ require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
18
18
|
require('../../../shared/consts/index.cjs');
|
|
19
19
|
var api = require('../api.cjs');
|
|
20
20
|
|
|
21
|
-
const linkWallet = (environmentId, { messageToSign, network, signedMessage, publicWalletAddress, chain, walletName, walletProvider, additionalWalletAddresses, backup, password, passwordSource, }, userJwt)
|
|
21
|
+
const linkWallet = (environmentId_1, _a, userJwt_1) => _tslib.__awaiter(void 0, [environmentId_1, _a, userJwt_1], void 0, function* (environmentId, { messageToSign, network, signedMessage, publicWalletAddress, chain, walletName, walletProvider, additionalWalletAddresses, backup, password, passwordSource, }, userJwt) {
|
|
22
22
|
const verifyRequest = sdkApiCore.VerifyRequestFromJSON({
|
|
23
23
|
additionalWalletAddresses,
|
|
24
24
|
backup,
|
|
@@ -49,7 +49,7 @@ const linkWallet = (environmentId, { messageToSign, network, signedMessage, publ
|
|
|
49
49
|
return undefined;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
const unlinkWallet = (
|
|
52
|
+
const unlinkWallet = (_b, userJwt_2) => _tslib.__awaiter(void 0, [_b, userJwt_2], void 0, function* ({ environmentId, primaryWalletId, walletId, }, userJwt) {
|
|
53
53
|
try {
|
|
54
54
|
const response = yield api.sdkApi(userJwt).verifyUnlink({
|
|
55
55
|
environmentId,
|
|
@@ -64,7 +64,7 @@ const unlinkWallet = ({ environmentId, primaryWalletId, walletId, }, userJwt) =>
|
|
|
64
64
|
return undefined;
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
const transferWallet = (environmentId, { network, messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, skipEmptyAccountCheck = false, }, userJwt)
|
|
67
|
+
const transferWallet = (environmentId_2, _c, userJwt_3) => _tslib.__awaiter(void 0, [environmentId_2, _c, userJwt_3], void 0, function* (environmentId, { network, messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, skipEmptyAccountCheck = false, }, userJwt) {
|
|
68
68
|
// We should find a better way to do this than force type casting
|
|
69
69
|
const verifyRequest = {
|
|
70
70
|
chain,
|
|
@@ -83,11 +83,11 @@ const transferWallet = (environmentId, { network, messageToSign, signedMessage,
|
|
|
83
83
|
});
|
|
84
84
|
return response;
|
|
85
85
|
}
|
|
86
|
-
catch (
|
|
86
|
+
catch (_d) {
|
|
87
87
|
return undefined;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
-
const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, network, oauth, additionalWalletAddresses, })
|
|
90
|
+
const verifyWallet = (environmentId_3, _e) => _tslib.__awaiter(void 0, [environmentId_3, _e], void 0, function* (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, network, oauth, additionalWalletAddresses, }) {
|
|
91
91
|
const verifyRequest = sdkApiCore.VerifyRequestFromJSON({
|
|
92
92
|
additionalWalletAddresses,
|
|
93
93
|
captchaToken,
|