@dynamic-labs-sdk/client 1.6.0 → 1.8.0
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/android/build.gradle +231 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +8 -0
- package/android/gradlew +251 -0
- package/android/gradlew.bat +94 -0
- package/android/settings.gradle +30 -0
- package/android/src/main/java/xyz/dynamic/client/DynamicClientPackage.kt +52 -0
- package/android/src/main/java/xyz/dynamic/client/keychain/KeyStoreKeyManager.kt +147 -0
- package/android/src/main/java/xyz/dynamic/client/keychain/KeychainModule.kt +85 -0
- package/android/src/main/java/xyz/dynamic/client/manifest/ReactNativeManifestModule.kt +25 -0
- package/android/src/main/java/xyz/dynamic/client/webview/DynamicWebViewClient.kt +83 -0
- package/android/src/main/java/xyz/dynamic/client/webview/DynamicWebViewHost.kt +518 -0
- package/android/src/main/java/xyz/dynamic/client/webview/DynamicWebViewModule.kt +147 -0
- package/android/src/test/java/xyz/dynamic/client/keychain/KeyStoreKeyManagerTest.kt +288 -0
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewClientTest.kt +196 -0
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewHostOpenTest.kt +347 -0
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewHostTest.kt +171 -0
- package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewModuleTest.kt +191 -0
- package/dist/{InvalidParamError-BIptAjbC.native.esm.js → InvalidParamError-Bc6OZBog.native.esm.js} +91 -829
- package/dist/InvalidParamError-Bc6OZBog.native.esm.js.map +1 -0
- package/dist/{InvalidParamError-BZ0LHaml.esm.js → InvalidParamError-IHYLdzFd.esm.js} +108 -381
- package/dist/InvalidParamError-IHYLdzFd.esm.js.map +1 -0
- package/dist/{InvalidParamError-DyXEKMWn.cjs → InvalidParamError-S56rFFDP.cjs} +108 -450
- package/dist/InvalidParamError-S56rFFDP.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-nT4jrLbp.esm.js → NotWaasWalletAccountError-BP-bODbJ.native.esm.js} +4 -4
- package/dist/NotWaasWalletAccountError-BP-bODbJ.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-BbOA5rPd.native.esm.js → NotWaasWalletAccountError-BYEL2l-W.esm.js} +4 -4
- package/dist/NotWaasWalletAccountError-BYEL2l-W.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-CElqwdQO.cjs → NotWaasWalletAccountError-CbhIKUDM.cjs} +4 -4
- package/dist/NotWaasWalletAccountError-CbhIKUDM.cjs.map +1 -0
- package/dist/core.cjs +11 -11
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +5 -5
- package/dist/core.native.esm.js +7 -7
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/WebViewLoadFailedError.d.ts +1 -1
- package/dist/errors/WebViewLoadFailedError.d.ts.map +1 -1
- package/dist/exports/index.d.ts +2 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DbI5MZhq.cjs → getNetworkProviderFromNetworkId-BDdcpGHH.cjs} +56 -55
- package/dist/{getNetworkProviderFromNetworkId-DbI5MZhq.cjs.map → getNetworkProviderFromNetworkId-BDdcpGHH.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BkAPIdRC.esm.js → getNetworkProviderFromNetworkId-D8rWYXlT.esm.js} +54 -54
- package/dist/{getNetworkProviderFromNetworkId-BkAPIdRC.esm.js.map → getNetworkProviderFromNetworkId-D8rWYXlT.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js → getNetworkProviderFromNetworkId-DVmF7pH2.native.esm.js} +312 -41
- package/dist/getNetworkProviderFromNetworkId-DVmF7pH2.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-BF6n8gve.cjs → getSignedSessionId-BBaBCi9S.cjs} +3 -3
- package/dist/{getSignedSessionId-BF6n8gve.cjs.map → getSignedSessionId-BBaBCi9S.cjs.map} +1 -1
- package/dist/{getSignedSessionId-y3YtxFHZ.esm.js → getSignedSessionId-CND07Eca.esm.js} +3 -3
- package/dist/{getSignedSessionId-y3YtxFHZ.esm.js.map → getSignedSessionId-CND07Eca.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-1TV-x__C.native.esm.js → getSignedSessionId-RwV7JPn8.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-1TV-x__C.native.esm.js.map → getSignedSessionId-RwV7JPn8.native.esm.js.map} +1 -1
- package/dist/getVerifiedCredentialForWalletAccount-BVrGV8qf.native.esm.js +701 -0
- package/dist/getVerifiedCredentialForWalletAccount-BVrGV8qf.native.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-etV50QRH.esm.js → getVerifiedCredentialForWalletAccount-BiOS65Tk.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-etV50QRH.esm.js.map → getVerifiedCredentialForWalletAccount-BiOS65Tk.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-BfJ29erz.cjs → getVerifiedCredentialForWalletAccount-FrxYWSuD.cjs} +3 -2
- package/dist/{getVerifiedCredentialForWalletAccount-BfJ29erz.cjs.map → getVerifiedCredentialForWalletAccount-FrxYWSuD.cjs.map} +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +14 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +14 -14
- package/dist/index.native.esm.js.map +1 -1
- package/dist/isMfaRequiredForAction-BPL_dgIM.esm.js +318 -0
- package/dist/isMfaRequiredForAction-BPL_dgIM.esm.js.map +1 -0
- package/dist/isMfaRequiredForAction-BolTrtCO.cjs +405 -0
- package/dist/isMfaRequiredForAction-BolTrtCO.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-B2vKX31S.native.esm.js → isMfaRequiredForAction-DQDoPsi6.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-B2vKX31S.native.esm.js.map → isMfaRequiredForAction-DQDoPsi6.native.esm.js.map} +1 -1
- package/dist/modules/apiClient/apiClient.types.d.ts +0 -12
- package/dist/modules/apiClient/apiClient.types.d.ts.map +1 -1
- package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
- package/dist/modules/auth/logoutReason.d.ts +1 -1
- package/dist/modules/auth/logoutReason.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
- package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts +12 -1
- package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts.map +1 -1
- package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
- package/dist/modules/waas/createWaasClient/translateNativeOpenError.d.ts.map +1 -1
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/waas.types.d.ts +1 -0
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts +1 -2
- package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs +7 -4
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +6 -4
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +6 -4
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +10 -5
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +10 -5
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +10 -8
- package/dist/waasCore.native.esm.js.map +1 -1
- package/dynamic-labs-sdk-client.podspec +27 -0
- package/ios/DynamicClientKeychain.h +4 -0
- package/ios/DynamicClientKeychain.mm +101 -0
- package/ios/DynamicClientManifest.h +4 -0
- package/ios/DynamicClientManifest.mm +45 -0
- package/ios/DynamicClientWebView.h +5 -0
- package/ios/DynamicClientWebView.mm +143 -0
- package/ios/DynamicWebViewImpl.swift +603 -0
- package/ios/LiveSecKeyAPI.swift +86 -0
- package/ios/ReactNativeManifestImpl.swift +20 -0
- package/ios/SecKeyAPI.swift +57 -0
- package/ios/SecureEnclaveKeyManager.swift +191 -0
- package/package.json +16 -5
- package/react-native.config.cjs +14 -0
- package/src/turboModules/NativeDynamicWebView.native.spec.ts +61 -0
- package/src/turboModules/NativeDynamicWebView.ts +40 -0
- package/src/turboModules/NativeKeychain.native.spec.ts +47 -0
- package/src/turboModules/NativeKeychain.ts +19 -0
- package/src/turboModules/NativeReactNativeManifest.native.spec.ts +55 -0
- package/src/turboModules/NativeReactNativeManifest.ts +28 -0
- package/dist/InvalidParamError-BIptAjbC.native.esm.js.map +0 -1
- package/dist/InvalidParamError-BZ0LHaml.esm.js.map +0 -1
- package/dist/InvalidParamError-DyXEKMWn.cjs.map +0 -1
- package/dist/NotWaasWalletAccountError-BbOA5rPd.native.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-CElqwdQO.cjs.map +0 -1
- package/dist/NotWaasWalletAccountError-nT4jrLbp.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js +0 -269
- package/dist/getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-Dy4-S3mr.esm.js +0 -79
- package/dist/isMfaRequiredForAction-Dy4-S3mr.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-K2Jh-3-j.cjs +0 -96
- package/dist/isMfaRequiredForAction-K2Jh-3-j.cjs.map +0 -1
- package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts +0 -27
- package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts.map +0 -1
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
const require_InvalidParamError = require('./InvalidParamError-S56rFFDP.cjs');
|
|
29
|
+
let zod_mini = require("zod/mini");
|
|
30
|
+
zod_mini = __toESM(zod_mini);
|
|
31
|
+
|
|
32
|
+
//#region src/utils/retryOnFail/InvalidRetryOnFailCallError.ts
|
|
33
|
+
/**
|
|
34
|
+
* This error is thrown when the `retryOnFail` function is called with an invalid
|
|
35
|
+
* number of retries (i.e. less than 0).
|
|
36
|
+
*/
|
|
37
|
+
var InvalidRetryOnFailCallError = class extends require_InvalidParamError.BaseError {
|
|
38
|
+
constructor(maxRetries) {
|
|
39
|
+
super({
|
|
40
|
+
cause: null,
|
|
41
|
+
code: "invalid_retry_on_fail_call_error",
|
|
42
|
+
docsUrl: null,
|
|
43
|
+
name: "InvalidRetryOnFailCallError",
|
|
44
|
+
shortMessage: `Invalid retries parameter for retryOnFail call: ${maxRetries}`
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/utils/retryOnFail/retryOnFail.ts
|
|
51
|
+
/** @not-instrumented */
|
|
52
|
+
const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
|
|
53
|
+
for (let retry = 0; retry <= maxRetries; retry++) try {
|
|
54
|
+
return await fn();
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (retry >= maxRetries) throw error;
|
|
57
|
+
if (delay > 0) await new Promise((resolve) => setTimeout(resolve, delay));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Reaching this point should never happen and this
|
|
61
|
+
* error is thrown to help us debug the issue.
|
|
62
|
+
*/
|
|
63
|
+
throw new InvalidRetryOnFailCallError(maxRetries);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/modules/auth/isSignedIn/isSignedIn.ts
|
|
68
|
+
/**
|
|
69
|
+
* Checks if the user is currently signed in to the Dynamic client.
|
|
70
|
+
*
|
|
71
|
+
* The client is considered to be in a signed in state if a user has
|
|
72
|
+
* authenticated or if the client has at least one wallet connected.
|
|
73
|
+
*
|
|
74
|
+
* @deprecated What counts as "signed in" is your app's business logic, not the
|
|
75
|
+
* SDK's. This helper bakes in one opinion (a user OR any connected wallet),
|
|
76
|
+
* which rarely matches every app and forces a dependency on us for every
|
|
77
|
+
* variation. Compose your own check from the underlying primitives instead —
|
|
78
|
+
* e.g. `Boolean(client.user) || isAnyWalletAccountConnected(client)` — and
|
|
79
|
+
* layer in whatever your app requires (device registration, completed
|
|
80
|
+
* onboarding, satisfied MFA, a required embedded wallet, …). See the
|
|
81
|
+
* "Check if signed in" guide:
|
|
82
|
+
* https://www.dynamic.xyz/docs/javascript/user-session-management
|
|
83
|
+
*
|
|
84
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
85
|
+
* @returns True if the user is signed in, false otherwise.
|
|
86
|
+
* @not-instrumented
|
|
87
|
+
*/
|
|
88
|
+
const isSignedIn = (client = require_InvalidParamError.getDefaultClient()) => Boolean(client.user || require_InvalidParamError.getWalletAccounts(client).length > 0);
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/services/storage/createStorageKeySchema/createStorageKeySchema.ts
|
|
92
|
+
/** @not-instrumented */
|
|
93
|
+
const createStorageKeySchema = (params) => {
|
|
94
|
+
return params;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts
|
|
99
|
+
/**
|
|
100
|
+
* The schema to track the expiration time of the project settings.
|
|
101
|
+
*/
|
|
102
|
+
const projectSettingsExpirationStorageKeySchema = createStorageKeySchema({
|
|
103
|
+
key: "projectSettingsExpiration",
|
|
104
|
+
schema: zod_mini.number()
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts
|
|
109
|
+
/**
|
|
110
|
+
* Expiration time of the project settings in milliseconds.
|
|
111
|
+
*/
|
|
112
|
+
const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
|
|
113
|
+
/**
|
|
114
|
+
* Fetches and updates the project settings from the API.
|
|
115
|
+
*
|
|
116
|
+
* This function retrieves the latest project configuration settings
|
|
117
|
+
* from Dynamic's servers, including authentication options, enabled chains,
|
|
118
|
+
* and security configurations. The settings are cached for performance.
|
|
119
|
+
*
|
|
120
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
121
|
+
* @returns A promise that resolves to the updated project settings.
|
|
122
|
+
* @not-instrumented
|
|
123
|
+
*/
|
|
124
|
+
const fetchProjectSettings = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
125
|
+
const core = require_InvalidParamError.getCore(client);
|
|
126
|
+
const currentExpiration = await core.storage.getItem(projectSettingsExpirationStorageKeySchema);
|
|
127
|
+
if (Boolean(client.projectSettings) && !(currentExpiration && currentExpiration < Date.now()) && isSignedIn(client)) return client.projectSettings;
|
|
128
|
+
const apiClient = require_InvalidParamError.createApiClient({}, client);
|
|
129
|
+
core.logger.debug("[fetchProjectSettings] Fetching project settings...");
|
|
130
|
+
const doFetch = async () => apiClient.getEnvironmentSettings({
|
|
131
|
+
environmentId: core.environmentId,
|
|
132
|
+
sdkVersion: `${require_InvalidParamError.CLIENT_SDK_NAME}/${core.version}`
|
|
133
|
+
}, { credentials: "omit" });
|
|
134
|
+
const projectSettings = await retryOnFail({
|
|
135
|
+
fn: doFetch,
|
|
136
|
+
maxRetries: 2
|
|
137
|
+
});
|
|
138
|
+
core.state.set({ projectSettings: projectSettings ?? null });
|
|
139
|
+
await core.storage.setItem(projectSettingsExpirationStorageKeySchema, Date.now() + PROJECT_SETTINGS_EXPIRATION_TIME);
|
|
140
|
+
return projectSettings;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts
|
|
145
|
+
/** @not-instrumented */
|
|
146
|
+
const generateSessionKeys = async (client) => {
|
|
147
|
+
const core = require_InvalidParamError.getCore(client);
|
|
148
|
+
await core.keychain.removeKey("session");
|
|
149
|
+
const publicKey = await core.keychain.generateKey("session");
|
|
150
|
+
require_InvalidParamError.assertDefined(publicKey, "Public key not found");
|
|
151
|
+
core.state.set({ sessionKeys: publicKey });
|
|
152
|
+
return { publicKey };
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts
|
|
157
|
+
/** @not-instrumented */
|
|
158
|
+
const getAvailableWalletProvidersFromWalletAccounts = (client) => {
|
|
159
|
+
const core = require_InvalidParamError.getCore(client);
|
|
160
|
+
const walletProvidersMap = /* @__PURE__ */ new Map();
|
|
161
|
+
require_InvalidParamError.getWalletAccounts(client).forEach((walletAccount) => {
|
|
162
|
+
if (walletProvidersMap.has(walletAccount.walletProviderKey)) return;
|
|
163
|
+
try {
|
|
164
|
+
const walletProvider = require_InvalidParamError.getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
165
|
+
walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);
|
|
166
|
+
} catch (error) {
|
|
167
|
+
core.logger.debug("Wallet provider not found for wallet account", {
|
|
168
|
+
error,
|
|
169
|
+
walletAccount: walletAccount.address
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
return Array.from(walletProvidersMap.values());
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/modules/wallets/destroyWalletProviders/destroyWalletProviders.ts
|
|
178
|
+
/**
|
|
179
|
+
* Tear down every wallet provider on the client.
|
|
180
|
+
*
|
|
181
|
+
* Each provider's `destroy` is responsible for its own local + remote
|
|
182
|
+
* cleanup. We swallow errors so a failing destroy on one provider does not
|
|
183
|
+
* block teardown of the others (e.g. during logout).
|
|
184
|
+
*
|
|
185
|
+
* @not-instrumented
|
|
186
|
+
*/
|
|
187
|
+
const destroyWalletProviders = async ({ reason }, client) => {
|
|
188
|
+
const core = require_InvalidParamError.getCore(client);
|
|
189
|
+
const walletProviders = getAvailableWalletProvidersFromWalletAccounts(client);
|
|
190
|
+
await Promise.all(walletProviders.map(async (walletProvider) => {
|
|
191
|
+
if (!walletProvider.destroy) return;
|
|
192
|
+
try {
|
|
193
|
+
await walletProvider.destroy({ reason });
|
|
194
|
+
} catch (err) {
|
|
195
|
+
core.logger.error(`Error destroying wallet provider ${walletProvider.key}`, err);
|
|
196
|
+
}
|
|
197
|
+
}));
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/modules/auth/logoutWithReason/logoutWithReason.ts
|
|
202
|
+
/**
|
|
203
|
+
* Logs the user out with an explicit reason.
|
|
204
|
+
*
|
|
205
|
+
* Revokes the session, clears auth state, terminates wallet providers, and
|
|
206
|
+
* emits the `logout` client event with the given reason. The reason is also
|
|
207
|
+
* captured as an argument on the function-instrumentation event, which is
|
|
208
|
+
* how Datadog distinguishes between different logout causes.
|
|
209
|
+
*
|
|
210
|
+
* Use this instead of the public `logout` when triggering a logout from
|
|
211
|
+
* internal or extension code — the caller owns the reason string, so the
|
|
212
|
+
* telemetry correctly attributes *why* the logout happened.
|
|
213
|
+
*
|
|
214
|
+
* @param params - The logout params.
|
|
215
|
+
* @param params.reason - Why the logout is being triggered. Extension authors
|
|
216
|
+
* needing a reason outside the SDK catalog can cast with `as LogoutReason`.
|
|
217
|
+
* @param client - The Dynamic client instance.
|
|
218
|
+
* @instrumented
|
|
219
|
+
*/
|
|
220
|
+
const logoutWithReason = async ({ reason }, client) => {
|
|
221
|
+
const core = require_InvalidParamError.getCore(client);
|
|
222
|
+
core.logger.debug("[logoutWithReason] Logging out...", { reason });
|
|
223
|
+
await destroyWalletProviders({ reason }, client);
|
|
224
|
+
if (client.user !== null) {
|
|
225
|
+
const apiClient = require_InvalidParamError.createApiClient({}, client);
|
|
226
|
+
try {
|
|
227
|
+
await apiClient.revokeSession({ environmentId: core.environmentId });
|
|
228
|
+
} catch (error) {
|
|
229
|
+
core.logger.error("Failed to revoke session", error);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* This deletes the auth cookie if it exists.
|
|
233
|
+
* If the cookie doesn't exist, this sets a new cookie that expires immediately.
|
|
234
|
+
*/
|
|
235
|
+
if (require_InvalidParamError.isCookieEnabled(client)) require_InvalidParamError.setCookie(`${require_InvalidParamError.DYNAMIC_AUTH_COOKIE_NAME}=; Max-Age=-99999999; path=/; SameSite=Lax`);
|
|
236
|
+
}
|
|
237
|
+
await core.keychain.removeKey("session");
|
|
238
|
+
core.state.set({
|
|
239
|
+
captchaToken: null,
|
|
240
|
+
elevatedAccessTokens: [],
|
|
241
|
+
legacyToken: null,
|
|
242
|
+
mfaToken: null,
|
|
243
|
+
sessionExpiresAt: null,
|
|
244
|
+
sessionKeys: null,
|
|
245
|
+
token: null,
|
|
246
|
+
unverifiedWalletAccounts: [],
|
|
247
|
+
user: null
|
|
248
|
+
});
|
|
249
|
+
require_InvalidParamError.emitEvent({
|
|
250
|
+
args: { reason },
|
|
251
|
+
event: "logout"
|
|
252
|
+
}, client);
|
|
253
|
+
fetchProjectSettings(client);
|
|
254
|
+
generateSessionKeys(client);
|
|
255
|
+
};
|
|
256
|
+
const __logoutWithReason_impl = logoutWithReason;
|
|
257
|
+
const __logoutWithReason_wrapped = require_InvalidParamError.instrumentFunction({
|
|
258
|
+
fn: __logoutWithReason_impl,
|
|
259
|
+
functionName: "logoutWithReason",
|
|
260
|
+
getCore: () => {
|
|
261
|
+
try {
|
|
262
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
263
|
+
} catch {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
271
|
+
/**
|
|
272
|
+
* Consumes and clears the current MFA token from the client state.
|
|
273
|
+
*
|
|
274
|
+
* This function retrieves the MFA token obtained from a successful MFA authentication,
|
|
275
|
+
* and removes it from the client, to prevent it from being used again.
|
|
276
|
+
*
|
|
277
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
278
|
+
* @returns The MFA token that was consumed.
|
|
279
|
+
* @throws Error if no MFA token is found.
|
|
280
|
+
* @instrumented
|
|
281
|
+
* @redact-params
|
|
282
|
+
*/
|
|
283
|
+
const consumeMfaToken = (client = require_InvalidParamError.getDefaultClient()) => {
|
|
284
|
+
const core = require_InvalidParamError.getCore(client);
|
|
285
|
+
const mfaToken = core.state.get().mfaToken;
|
|
286
|
+
require_InvalidParamError.assertDefined(mfaToken, "No MFA token found");
|
|
287
|
+
core.state.set({ mfaToken: null });
|
|
288
|
+
return mfaToken;
|
|
289
|
+
};
|
|
290
|
+
const __consumeMfaToken_impl = consumeMfaToken;
|
|
291
|
+
const __consumeMfaToken_wrapped = require_InvalidParamError.instrumentFunction({
|
|
292
|
+
fn: __consumeMfaToken_impl,
|
|
293
|
+
functionName: "consumeMfaToken",
|
|
294
|
+
getCore: () => {
|
|
295
|
+
try {
|
|
296
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
297
|
+
} catch {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
redactAll: true
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/modules/mfa/getMfaMethods/getMfaMethods.ts
|
|
306
|
+
/**
|
|
307
|
+
* Retrieves the available MFA methods for the current user.
|
|
308
|
+
*
|
|
309
|
+
* This function fetches information about which multi-factor authentication
|
|
310
|
+
* methods are available and configured for the user's account.
|
|
311
|
+
*
|
|
312
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
313
|
+
* @returns A promise that resolves to the user's MFA methods configuration.
|
|
314
|
+
* @not-instrumented
|
|
315
|
+
*/
|
|
316
|
+
const getMfaMethods = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
317
|
+
const core = require_InvalidParamError.getCore(client);
|
|
318
|
+
return await require_InvalidParamError.createApiClient({}, client).getUserMfaMethods({
|
|
319
|
+
environmentId: core.environmentId,
|
|
320
|
+
verifiedOnly: true
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts
|
|
326
|
+
/**
|
|
327
|
+
* Checks if MFA is required for a specific action.
|
|
328
|
+
*
|
|
329
|
+
* This function determines whether multi-factor authentication is required
|
|
330
|
+
* for the specified action based on project settings and user configuration.
|
|
331
|
+
*
|
|
332
|
+
* @param params.mfaAction - The action to check MFA requirements for.
|
|
333
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
334
|
+
* @returns A promise that resolves to true if MFA is required for the action, false otherwise.
|
|
335
|
+
* @not-instrumented
|
|
336
|
+
*/
|
|
337
|
+
const isMfaRequiredForAction = async ({ mfaAction }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
338
|
+
const projectSettings = client.projectSettings;
|
|
339
|
+
if (!projectSettings?.security?.mfa?.actions?.some((action) => action.action === mfaAction && action.required)) return false;
|
|
340
|
+
if (projectSettings?.security?.mfa?.required) return true;
|
|
341
|
+
return (await getMfaMethods(client)).userHasVerifiedMfaMethods;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
//#endregion
|
|
345
|
+
Object.defineProperty(exports, '__consumeMfaToken_wrapped', {
|
|
346
|
+
enumerable: true,
|
|
347
|
+
get: function () {
|
|
348
|
+
return __consumeMfaToken_wrapped;
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
Object.defineProperty(exports, '__logoutWithReason_wrapped', {
|
|
352
|
+
enumerable: true,
|
|
353
|
+
get: function () {
|
|
354
|
+
return __logoutWithReason_wrapped;
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
Object.defineProperty(exports, '__toESM', {
|
|
358
|
+
enumerable: true,
|
|
359
|
+
get: function () {
|
|
360
|
+
return __toESM;
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
Object.defineProperty(exports, 'createStorageKeySchema', {
|
|
364
|
+
enumerable: true,
|
|
365
|
+
get: function () {
|
|
366
|
+
return createStorageKeySchema;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
Object.defineProperty(exports, 'fetchProjectSettings', {
|
|
370
|
+
enumerable: true,
|
|
371
|
+
get: function () {
|
|
372
|
+
return fetchProjectSettings;
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
Object.defineProperty(exports, 'generateSessionKeys', {
|
|
376
|
+
enumerable: true,
|
|
377
|
+
get: function () {
|
|
378
|
+
return generateSessionKeys;
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
Object.defineProperty(exports, 'getMfaMethods', {
|
|
382
|
+
enumerable: true,
|
|
383
|
+
get: function () {
|
|
384
|
+
return getMfaMethods;
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
Object.defineProperty(exports, 'isMfaRequiredForAction', {
|
|
388
|
+
enumerable: true,
|
|
389
|
+
get: function () {
|
|
390
|
+
return isMfaRequiredForAction;
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
Object.defineProperty(exports, 'isSignedIn', {
|
|
394
|
+
enumerable: true,
|
|
395
|
+
get: function () {
|
|
396
|
+
return isSignedIn;
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
Object.defineProperty(exports, 'retryOnFail', {
|
|
400
|
+
enumerable: true,
|
|
401
|
+
get: function () {
|
|
402
|
+
return retryOnFail;
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
//# sourceMappingURL=isMfaRequiredForAction-BolTrtCO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-BolTrtCO.cjs","names":["BaseError","getDefaultClient","getWalletAccounts","z","getDefaultClient","getCore","createApiClient","CLIENT_SDK_NAME","getCore","getCore","walletProvidersMap: Map<string, WalletProvider>","getWalletAccounts","getWalletProviderFromWalletAccount","getCore","getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/utils/retryOnFail/InvalidRetryOnFailCallError.ts","../src/utils/retryOnFail/retryOnFail.ts","../src/modules/auth/isSignedIn/isSignedIn.ts","../src/services/storage/createStorageKeySchema/createStorageKeySchema.ts","../src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts","../src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts","../src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts","../src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts","../src/modules/wallets/destroyWalletProviders/destroyWalletProviders.ts","../src/modules/auth/logoutWithReason/logoutWithReason.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { BaseError } from '../../errors/base';\n\n/**\n * This error is thrown when the `retryOnFail` function is called with an invalid\n * number of retries (i.e. less than 0).\n */\nexport class InvalidRetryOnFailCallError extends BaseError {\n // eslint-disable-next-line custom-rules/require-single-object-param\n constructor(maxRetries: number) {\n super({\n cause: null,\n code: 'invalid_retry_on_fail_call_error',\n docsUrl: null,\n name: 'InvalidRetryOnFailCallError',\n shortMessage: `Invalid retries parameter for retryOnFail call: ${maxRetries}`,\n });\n }\n}\n","import { InvalidRetryOnFailCallError } from './InvalidRetryOnFailCallError';\n\nexport type RetryOnFailParams<T> = {\n /**\n * The delay between retries in milliseconds.\n */\n delay?: number;\n /**\n * The function to call.\n */\n fn: () => Promise<T>;\n /**\n * The maximum number of retries.\n *\n * When set to 0, the function will be called only once and is\n * therefore equivalent to calling the function directly.\n */\n maxRetries: number;\n};\n\n/** @not-instrumented */\nexport const retryOnFail = async <T>({\n delay = 0,\n fn,\n maxRetries,\n}: RetryOnFailParams<T>) => {\n for (let retry = 0; retry <= maxRetries; retry++) {\n try {\n return await fn();\n } catch (error) {\n if (retry >= maxRetries) {\n throw error;\n }\n\n if (delay > 0) {\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n }\n\n /**\n * Reaching this point should never happen and this\n * error is thrown to help us debug the issue.\n */\n throw new InvalidRetryOnFailCallError(maxRetries);\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { getWalletAccounts } from '../../wallets/getWalletAccounts';\n\n/**\n * Checks if the user is currently signed in to the Dynamic client.\n *\n * The client is considered to be in a signed in state if a user has\n * authenticated or if the client has at least one wallet connected.\n *\n * @deprecated What counts as \"signed in\" is your app's business logic, not the\n * SDK's. This helper bakes in one opinion (a user OR any connected wallet),\n * which rarely matches every app and forces a dependency on us for every\n * variation. Compose your own check from the underlying primitives instead —\n * e.g. `Boolean(client.user) || isAnyWalletAccountConnected(client)` — and\n * layer in whatever your app requires (device registration, completed\n * onboarding, satisfied MFA, a required embedded wallet, …). See the\n * \"Check if signed in\" guide:\n * https://www.dynamic.xyz/docs/javascript/user-session-management\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if the user is signed in, false otherwise.\n * @not-instrumented\n */\nexport const isSignedIn = (client = getDefaultClient()) =>\n Boolean(client.user || getWalletAccounts(client).length > 0);\n","import type * as z from 'zod/mini';\n\nimport type { StorageKeySchema, StorageKeySchemaConfig } from '../storage.types';\n\n/** @not-instrumented */\nexport const createStorageKeySchema = <T>(params: {\n config?: StorageKeySchemaConfig;\n key: string;\n schema: z.ZodMiniType<T>;\n}): StorageKeySchema<T> => {\n return params;\n};\n","import * as z from 'zod/mini';\n\nimport { createStorageKeySchema } from '../../../services/storage';\n\n/**\n * The schema to track the expiration time of the project settings.\n */\nexport const projectSettingsExpirationStorageKeySchema = createStorageKeySchema(\n {\n key: 'projectSettingsExpiration',\n schema: z.number(),\n }\n);\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { retryOnFail } from '../../../utils/retryOnFail';\nimport { createApiClient } from '../../apiClient';\nimport { CLIENT_SDK_NAME } from '../../apiClient/constants';\nimport { isSignedIn } from '../../auth/isSignedIn';\nimport { projectSettingsExpirationStorageKeySchema } from './projectSettingsExpirationScheme';\n\n/**\n * Expiration time of the project settings in milliseconds.\n */\nexport const PROJECT_SETTINGS_EXPIRATION_TIME = 1000 * 60 * 5; // 5 minutes\n\n/**\n * Fetches and updates the project settings from the API.\n *\n * This function retrieves the latest project configuration settings\n * from Dynamic's servers, including authentication options, enabled chains,\n * and security configurations. The settings are cached for performance.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the updated project settings.\n * @not-instrumented\n */\nexport const fetchProjectSettings = async (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const currentExpiration = await core.storage.getItem(\n projectSettingsExpirationStorageKeySchema\n );\n\n const hasProjectSettings = Boolean(client.projectSettings);\n const isExpired = currentExpiration && currentExpiration < Date.now();\n\n // We want to cache the project settings if its valid and user is connected.\n // This avoids unnecessary API calls and speeds up the initial load.\n if (hasProjectSettings && !isExpired && isSignedIn(client)) {\n return client.projectSettings;\n }\n\n const apiClient = createApiClient({}, client);\n\n core.logger.debug('[fetchProjectSettings] Fetching project settings...');\n\n const doFetch = async () =>\n apiClient.getEnvironmentSettings(\n {\n environmentId: core.environmentId,\n sdkVersion: `${CLIENT_SDK_NAME}/${core.version}`,\n },\n {\n credentials: 'omit',\n }\n );\n\n const projectSettings = await retryOnFail({\n fn: doFetch,\n maxRetries: 2,\n });\n\n core.state.set({ projectSettings: projectSettings ?? null });\n\n await core.storage.setItem(\n projectSettingsExpirationStorageKeySchema,\n Date.now() + PROJECT_SETTINGS_EXPIRATION_TIME\n );\n\n return projectSettings;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport type { SessionKeys } from '../sessionKeys.types';\n\n/** @not-instrumented */\nexport const generateSessionKeys = async (\n client: DynamicClient\n): Promise<SessionKeys> => {\n const core = getCore(client);\n\n await core.keychain.removeKey('session');\n\n const publicKey = await core.keychain.generateKey('session');\n\n assertDefined(publicKey, 'Public key not found');\n\n core.state.set({\n sessionKeys: publicKey,\n });\n\n return { publicKey };\n};\n","import { getCore } from '../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../client/types';\nimport { getWalletAccounts } from '../../getWalletAccounts';\nimport type { WalletProvider } from '../../walletProvider';\nimport { getWalletProviderFromWalletAccount } from '../getWalletProviderFromWalletAccount';\n\n/** @not-instrumented */\nexport const getAvailableWalletProvidersFromWalletAccounts = (\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletProvidersMap: Map<string, WalletProvider> = new Map();\n\n const walletAccounts = getWalletAccounts(client);\n\n walletAccounts.forEach((walletAccount) => {\n if (walletProvidersMap.has(walletAccount.walletProviderKey)) {\n return;\n }\n\n try {\n const walletProvider = getWalletProviderFromWalletAccount(\n {\n walletAccount,\n },\n client\n );\n\n walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);\n } catch (error) {\n core.logger.debug('Wallet provider not found for wallet account', {\n error,\n walletAccount: walletAccount.address,\n });\n }\n });\n\n return Array.from(walletProvidersMap.values());\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { LogoutReason } from '../../auth/logoutReason';\nimport { getAvailableWalletProvidersFromWalletAccounts } from '../utils/getAvailableWalletProvidersFromWalletAccounts';\n\n/**\n * Tear down every wallet provider on the client.\n *\n * Each provider's `destroy` is responsible for its own local + remote\n * cleanup. We swallow errors so a failing destroy on one provider does not\n * block teardown of the others (e.g. during logout).\n *\n * @not-instrumented\n */\nexport const destroyWalletProviders = async (\n { reason }: { reason?: LogoutReason },\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletProviders = getAvailableWalletProvidersFromWalletAccounts(client);\n\n await Promise.all(\n walletProviders.map(async (walletProvider) => {\n if (!walletProvider.destroy) return;\n try {\n await walletProvider.destroy({ reason });\n } catch (err) {\n core.logger.error(\n `Error destroying wallet provider ${walletProvider.key}`,\n err\n );\n }\n })\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { getCore } from '../../../client/core/getCore';\nimport { setCookie } from '../../../utils/setCookie';\nimport { createApiClient } from '../../apiClient';\nimport { emitEvent } from '../../clientEvents';\nimport { fetchProjectSettings } from '../../projectSettings/fetchProjectSettings';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { generateSessionKeys } from '../../sessionKeys/generateSessionKeys';\nimport { destroyWalletProviders } from '../../wallets/destroyWalletProviders';\nimport { DYNAMIC_AUTH_COOKIE_NAME } from '../consts';\nimport type { LogoutReason } from '../logoutReason';\n\n/**\n * Logs the user out with an explicit reason.\n *\n * Revokes the session, clears auth state, terminates wallet providers, and\n * emits the `logout` client event with the given reason. The reason is also\n * captured as an argument on the function-instrumentation event, which is\n * how Datadog distinguishes between different logout causes.\n *\n * Use this instead of the public `logout` when triggering a logout from\n * internal or extension code — the caller owns the reason string, so the\n * telemetry correctly attributes *why* the logout happened.\n *\n * @param params - The logout params.\n * @param params.reason - Why the logout is being triggered. Extension authors\n * needing a reason outside the SDK catalog can cast with `as LogoutReason`.\n * @param client - The Dynamic client instance.\n * @instrumented\n */\nexport const logoutWithReason = async (\n { reason }: { reason: LogoutReason },\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n core.logger.debug('[logoutWithReason] Logging out...', { reason });\n\n await destroyWalletProviders({ reason }, client);\n\n if (client.user !== null) {\n const apiClient = createApiClient({}, client);\n\n try {\n await apiClient.revokeSession({\n environmentId: core.environmentId,\n });\n } catch (error) {\n core.logger.error('Failed to revoke session', error);\n }\n\n /**\n * This deletes the auth cookie if it exists.\n * If the cookie doesn't exist, this sets a new cookie that expires immediately.\n */\n if (isCookieEnabled(client)) {\n setCookie(\n `${DYNAMIC_AUTH_COOKIE_NAME}=; Max-Age=-99999999; path=/; SameSite=Lax`\n );\n }\n }\n\n await core.keychain.removeKey('session');\n\n core.state.set({\n captchaToken: null,\n elevatedAccessTokens: [],\n legacyToken: null,\n mfaToken: null,\n sessionExpiresAt: null,\n sessionKeys: null,\n token: null,\n unverifiedWalletAccounts: [],\n user: null,\n });\n\n emitEvent({ args: { reason }, event: 'logout' }, client);\n\n // Refetch project settings\n void fetchProjectSettings(client);\n\n // Regenerate session keys\n void generateSessionKeys(client);\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @not-instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAa,8BAAb,cAAiDA,oCAAU;CAEzD,YAAY,YAAoB;AAC9B,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mDAAmD;GAClE,CAAC;;;;;;;ACMN,MAAa,cAAc,OAAU,EACnC,QAAQ,GACR,IACA,iBAC0B;AAC1B,MAAK,IAAI,QAAQ,GAAG,SAAS,YAAY,QACvC,KAAI;AACF,SAAO,MAAM,IAAI;UACV,OAAO;AACd,MAAI,SAAS,WACX,OAAM;AAGR,MAAI,QAAQ,EACV,OAAM,IAAI,SAAS,YAAY,WAAW,SAAS,MAAM,CAAC;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EAAA;EACtB,aAAa;EACb,UAAO;EACP,kBAAA;EACA,aAAU;EACV,OAAA;;EAEF,MAAA;;AAGA,qCAAK;EAAA,MAAA,EAAA,QAAqB;EAAA,OAAO;EAAA,EAAA,OAAA;AAGjC,CAAK,qBAAoB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/DlC,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAASC,4CAAkB,KAAK;CAClE,MAAM,OAAOC,kCAAQ,OAAO;AAQ5B,QALuB,MAFLC,0CAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,4CAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as getCore, D as instrumentFunction, I as getDefaultClient, u as createApiClient, w as assertDefined, z as BaseError } from "./InvalidParamError-Bc6OZBog.native.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/errors/NativeModuleNotLinkedError.ts
|
|
4
4
|
var NativeModuleNotLinkedError = class extends BaseError {
|
|
@@ -105,4 +105,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
105
105
|
|
|
106
106
|
//#endregion
|
|
107
107
|
export { NativeModuleNotLinkedError as i, getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
|
|
108
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
108
|
+
//# sourceMappingURL=isMfaRequiredForAction-DQDoPsi6.native.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-DQDoPsi6.native.esm.js","names":[],"sources":["../src/errors/NativeModuleNotLinkedError.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NativeModuleNotLinkedErrorParams = {\n moduleName: string;\n};\n\nexport class NativeModuleNotLinkedError extends BaseError {\n constructor({ moduleName }: NativeModuleNotLinkedErrorParams) {\n super({\n cause: null,\n code: 'native_module_not_linked_error',\n details: [\n `The \"${moduleName}\" TurboModule is not registered with React Native.`,\n 'This usually means the native module was not autolinked into the host app,',\n 'or the app binary was not rebuilt after installing the SDK.',\n '',\n 'To resolve:',\n ' 1. Ensure \"@dynamic-labs-sdk/client\" is a direct dependency of the app',\n ' and reinstall (e.g. `pnpm install`).',\n ' 2. Rebuild the native app:',\n ' iOS: `cd ios && pod install && cd .. && npx react-native run-ios`',\n ' Android: `npx react-native run-android`',\n ' Expo: `npx expo prebuild --clean` then run the app.',\n ' 3. Confirm autolinking sees the package:',\n ' `npx expo-modules-autolinking react-native-config --json`',\n ].join('\\n'),\n docsUrl: null,\n name: 'NativeModuleNotLinkedError',\n shortMessage: `Native TurboModule \"${moduleName}\" is not linked.`,\n });\n }\n}\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @not-instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,cAAgD;AAC5D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;IACP,QAAQ,WAAW;IACnB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,KAAK,KAAK;GACZ,SAAS;GACT,MAAM;GACN,cAAc,uBAAuB,WAAW;GACjD,CAAC;;;;;;;;;;;;;;;;;;ACVN,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
|
|
@@ -48,17 +48,5 @@ export type CreateApiClientOptions = {
|
|
|
48
48
|
* @default false
|
|
49
49
|
*/
|
|
50
50
|
includeMfaToken?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* When `true`, omits the session-expiry middleware so a 401 on this request
|
|
53
|
-
* does not trigger an automatic logout.
|
|
54
|
-
*
|
|
55
|
-
* Set this for endpoints that legitimately return 401 for non-session
|
|
56
|
-
* reasons (e.g. probing whether devices are registered), and for the
|
|
57
|
-
* session-revocation call made during logout itself, to avoid re-entering
|
|
58
|
-
* logout.
|
|
59
|
-
*
|
|
60
|
-
* @default false
|
|
61
|
-
*/
|
|
62
|
-
skipSessionExpiryLogout?: boolean;
|
|
63
51
|
};
|
|
64
52
|
//# sourceMappingURL=apiClient.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiClient.types.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/apiClient.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,IAAI,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,UAAU,CAAC;IAEtC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"apiClient.types.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/apiClient.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,IAAI,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,UAAU,CAAC;IAEtC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAiChE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,sBAAsB,sBACvB,aAAa,WAqEtB,CAAC"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Surfaced in Datadog logout events so we can understand why users are being
|
|
5
5
|
* signed out.
|
|
6
6
|
*/
|
|
7
|
-
export type LogoutReason = 'user-intent' | 'token-expired' | 'keychain-migration-failed' | 'keychain-key-missing' | 'session-refresh-unauthorized' | '
|
|
7
|
+
export type LogoutReason = 'user-intent' | 'token-expired' | 'keychain-migration-failed' | 'keychain-key-missing' | 'session-refresh-unauthorized' | 'user-refresh-failed' | 'user-deleted' | 'device-revoked' | 'all-devices-revoked';
|
|
8
8
|
//# sourceMappingURL=logoutReason.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,eAAe,GACf,2BAA2B,GAC3B,sBAAsB,GACtB,8BAA8B,GAC9B,
|
|
1
|
+
{"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,eAAe,GACf,2BAA2B,GAC3B,sBAAsB,GACtB,8BAA8B,GAC9B,qBAAqB,GACrB,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logoutWithReason.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/logoutWithReason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,eACf;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,UAC5B,aAAa,
|
|
1
|
+
{"version":3,"file":"logoutWithReason.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/logoutWithReason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,eACf;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,UAC5B,aAAa,kBAmDtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRegisteredDevices.d.ts","sourceRoot":"","sources":["../../../../src/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAO7E,wBAAwB;AACxB,eAAO,MAAM,oBAAoB,yDAE9B,OAAO,CAAC,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"getRegisteredDevices.d.ts","sourceRoot":"","sources":["../../../../src/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAO7E,wBAAwB;AACxB,eAAO,MAAM,oBAAoB,yDAE9B,OAAO,CAAC,0BAA0B,EAAE,CAqBtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth.d.ts","sourceRoot":"","sources":["../../../../src/modules/user/refreshAuth/refreshAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAOjE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,yDAErB,OAAO,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"refreshAuth.d.ts","sourceRoot":"","sources":["../../../../src/modules/user/refreshAuth/refreshAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAOjE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,yDAErB,OAAO,CAAC,cAAc,CAWxB,CAAC"}
|
package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { WalletAccount } from '../../wallets/walletAccount';
|
|
2
2
|
type BackupWaasKeySharesToGoogleDriveParams = {
|
|
3
|
+
/**
|
|
4
|
+
* Optional consumer-supplied Google Drive access token. When provided (and
|
|
5
|
+
* already granted Drive scopes), the SDK uses it directly instead of falling
|
|
6
|
+
* back to the stored OAuth token — avoiding a second Google consent prompt.
|
|
7
|
+
*
|
|
8
|
+
* Especially useful for consumers using external auth: the user's Google
|
|
9
|
+
* account isn't linked in Dynamic, so there's no stored OAuth token to fall
|
|
10
|
+
* back on — they obtain a Drive-scoped token themselves and pass it here.
|
|
11
|
+
*/
|
|
12
|
+
googleDriveAccessToken?: string;
|
|
3
13
|
password?: string;
|
|
4
14
|
walletAccount: WalletAccount;
|
|
5
15
|
};
|
|
@@ -11,10 +21,11 @@ type BackupWaasKeySharesToGoogleDriveParams = {
|
|
|
11
21
|
*
|
|
12
22
|
* @param params.walletAccount - The WaaS wallet account to backup.
|
|
13
23
|
* @param [params.password] - Optional password to encrypt the backup.
|
|
24
|
+
* @param [params.googleDriveAccessToken] - Optional consumer-supplied Drive-scoped access token; used directly instead of the stored OAuth token (avoids a second Google consent). Useful for external-auth setups.
|
|
14
25
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
15
26
|
* @returns A promise that resolves when the backup process is complete.
|
|
16
27
|
* @not-instrumented
|
|
17
28
|
*/
|
|
18
|
-
export declare const backupWaasKeySharesToGoogleDrive: ({ password, walletAccount }: BackupWaasKeySharesToGoogleDriveParams, client?: import("../../../exports").DynamicClient) => Promise<void>;
|
|
29
|
+
export declare const backupWaasKeySharesToGoogleDrive: ({ googleDriveAccessToken, password, walletAccount, }: BackupWaasKeySharesToGoogleDriveParams, client?: import("../../../exports").DynamicClient) => Promise<void>;
|
|
19
30
|
export {};
|
|
20
31
|
//# sourceMappingURL=backupWaasKeySharesToGoogleDrive.d.ts.map
|
package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backupWaasKeySharesToGoogleDrive.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,KAAK,sCAAsC,GAAG;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"backupWaasKeySharesToGoogleDrive.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,KAAK,sCAAsC,GAAG;IAC5C;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC,yDAKxC,sCAAsC,qEAa1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWaasClient.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasClient/createWaasClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createWaasClient.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasClient/createWaasClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAMjE,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,EAAE,gBA+C9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateNativeOpenError.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasClient/translateNativeOpenError.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEvB,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"translateNativeOpenError.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasClient/translateNativeOpenError.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEvB,MAAM,wCAAwC,CAAC;AA4BhD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,QAC9B,OAAO,KACX,sBAuBF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWaasProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasProvider/createWaasProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAGzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,kBAAkB,0BAG5B,wBAAwB,KAAG,
|
|
1
|
+
{"version":3,"file":"createWaasProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasProvider/createWaasProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAGzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,kBAAkB,0BAG5B,wBAAwB,KAAG,YAgZ7B,CAAC"}
|
|
@@ -1 +1 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