@dynamic-labs-sdk/client 0.20.0 → 0.22.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/dist/{InvalidParamError-C8i6ExCF.esm.js → InvalidParamError-CxahHqE2.esm.js} +463 -11
- package/dist/InvalidParamError-CxahHqE2.esm.js.map +1 -0
- package/dist/{InvalidParamError-C9egR24p.cjs.js → InvalidParamError-D7xRBKr4.cjs.js} +511 -35
- package/dist/InvalidParamError-D7xRBKr4.cjs.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-BI9ZiEz_.esm.js → NotWaasWalletAccountError-CoqWYjd1.esm.js} +18 -6
- package/dist/{NotWaasWalletAccountError-BI9ZiEz_.esm.js.map → NotWaasWalletAccountError-CoqWYjd1.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-DoCmrSvg.cjs.js → NotWaasWalletAccountError-Da0wXVcL.cjs.js} +19 -7
- package/dist/NotWaasWalletAccountError-Da0wXVcL.cjs.js.map +1 -0
- package/dist/client/defaultClient/defaultClient.d.ts.map +1 -1
- package/dist/core.cjs.js +121 -49
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.esm.js +84 -12
- package/dist/core.esm.js.map +1 -1
- package/dist/errors/base/BaseError.d.ts.map +1 -1
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CwHLK1vS.esm.js → getNetworkProviderFromNetworkId-DFfDAd0n.esm.js} +268 -16
- package/dist/getNetworkProviderFromNetworkId-DFfDAd0n.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-Bd5KJOTp.cjs.js → getNetworkProviderFromNetworkId-nk9uXEoJ.cjs.js} +321 -69
- package/dist/getNetworkProviderFromNetworkId-nk9uXEoJ.cjs.js.map +1 -0
- package/dist/{getSignedSessionId-CHIq5TnT.cjs.js → getSignedSessionId-BVPDe38W.cjs.js} +33 -9
- package/dist/{getSignedSessionId-CHIq5TnT.cjs.js.map → getSignedSessionId-BVPDe38W.cjs.js.map} +1 -1
- package/dist/{getSignedSessionId-BMJxU50H.esm.js → getSignedSessionId-Bpb-PAHO.esm.js} +30 -6
- package/dist/{getSignedSessionId-BMJxU50H.esm.js.map → getSignedSessionId-Bpb-PAHO.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-CsJEjM3D.cjs.js → getVerifiedCredentialForWalletAccount-C8Po-OFi.cjs.js} +164 -56
- package/dist/getVerifiedCredentialForWalletAccount-C8Po-OFi.cjs.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-DBJ_U78Y.esm.js → getVerifiedCredentialForWalletAccount-C8SCA6xu.esm.js} +118 -10
- package/dist/getVerifiedCredentialForWalletAccount-C8SCA6xu.esm.js.map +1 -0
- package/dist/index.cjs.js +1328 -320
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1232 -224
- package/dist/index.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-D5Mgfi6K.cjs.js → isMfaRequiredForAction-BOZQJorF.cjs.js} +32 -8
- package/dist/isMfaRequiredForAction-BOZQJorF.cjs.js.map +1 -0
- package/dist/{isMfaRequiredForAction-Bc6KzFrM.esm.js → isMfaRequiredForAction-DFFSz7P4.esm.js} +29 -5
- package/dist/isMfaRequiredForAction-DFFSz7P4.esm.js.map +1 -0
- package/dist/modules/apiClient/utils/convertToApiErrorMiddleware/convertToApiErrorMiddleware.d.ts.map +1 -1
- package/dist/modules/checkout/checkout.types.d.ts +1 -1
- package/dist/modules/checkout/checkout.types.d.ts.map +1 -1
- package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/clientEvents/clientEvents.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts.map +1 -1
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +1 -2
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts.map +1 -1
- package/dist/modules/wallets/constants.d.ts.map +1 -1
- package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts +1 -1
- package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts +2 -1
- package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts +8 -1
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/createInstrumentation/createInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +1 -0
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentation.types.d.ts +13 -1
- package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
- package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts.map +1 -1
- package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts.map +1 -1
- package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts.map +1 -1
- package/dist/services/storage/createStorage/formatForStorage/storageFormat.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
- package/dist/waas.cjs.js +12 -11
- package/dist/waas.cjs.js.map +1 -1
- package/dist/waas.esm.js +11 -10
- package/dist/waas.esm.js.map +1 -1
- package/dist/waasCore.cjs.js +26 -26
- package/dist/waasCore.cjs.js.map +1 -1
- package/dist/waasCore.esm.js +25 -25
- package/dist/waasCore.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/InvalidParamError-C8i6ExCF.esm.js.map +0 -1
- package/dist/InvalidParamError-C9egR24p.cjs.js.map +0 -1
- package/dist/NotWaasWalletAccountError-DoCmrSvg.cjs.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-Bd5KJOTp.cjs.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CwHLK1vS.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-CsJEjM3D.cjs.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DBJ_U78Y.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-Bc6KzFrM.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-D5Mgfi6K.cjs.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-
|
|
2
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
3
|
-
const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-
|
|
4
|
-
const require_NotWaasWalletAccountError = require('./NotWaasWalletAccountError-
|
|
5
|
-
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-
|
|
1
|
+
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-nk9uXEoJ.cjs.js');
|
|
2
|
+
const require_InvalidParamError = require('./InvalidParamError-D7xRBKr4.cjs.js');
|
|
3
|
+
const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-C8Po-OFi.cjs.js');
|
|
4
|
+
const require_NotWaasWalletAccountError = require('./NotWaasWalletAccountError-Da0wXVcL.cjs.js');
|
|
5
|
+
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-BOZQJorF.cjs.js');
|
|
6
6
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
7
7
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
8
8
|
let zod_mini = require("zod/mini");
|
|
@@ -82,14 +82,14 @@ const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
|
|
|
82
82
|
* @returns True if the user is signed in, false otherwise.
|
|
83
83
|
* @not-instrumented
|
|
84
84
|
*/
|
|
85
|
-
const isSignedIn = (client = require_InvalidParamError.getDefaultClient()) => Boolean(client.user || require_getVerifiedCredentialForWalletAccount.
|
|
85
|
+
const isSignedIn = (client = require_InvalidParamError.getDefaultClient()) => Boolean(client.user || require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).length > 0);
|
|
86
86
|
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts
|
|
89
89
|
/**
|
|
90
90
|
* The schema to track the expiration time of the project settings.
|
|
91
91
|
*/
|
|
92
|
-
const projectSettingsExpirationStorageKeySchema = require_getNetworkProviderFromNetworkId.
|
|
92
|
+
const projectSettingsExpirationStorageKeySchema = require_getNetworkProviderFromNetworkId.__createStorageKeySchema_wrapped({
|
|
93
93
|
key: "projectSettingsExpiration",
|
|
94
94
|
schema: zod_mini.number()
|
|
95
95
|
});
|
|
@@ -98,7 +98,6 @@ const projectSettingsExpirationStorageKeySchema = require_getNetworkProviderFrom
|
|
|
98
98
|
//#region src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts
|
|
99
99
|
/**
|
|
100
100
|
* Expiration time of the project settings in milliseconds.
|
|
101
|
-
* @instrumented
|
|
102
101
|
*/
|
|
103
102
|
const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
|
|
104
103
|
/**
|
|
@@ -110,13 +109,13 @@ const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
|
|
|
110
109
|
*
|
|
111
110
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
112
111
|
* @returns A promise that resolves to the updated project settings.
|
|
113
|
-
* @
|
|
112
|
+
* @instrumented
|
|
114
113
|
*/
|
|
115
114
|
const fetchProjectSettings = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
116
115
|
const core = require_InvalidParamError.getCore(client);
|
|
117
116
|
const currentExpiration = await core.storage.getItem(projectSettingsExpirationStorageKeySchema);
|
|
118
117
|
if (Boolean(client.projectSettings) && !(currentExpiration && currentExpiration < Date.now()) && isSignedIn(client)) return client.projectSettings;
|
|
119
|
-
const apiClient = require_InvalidParamError.
|
|
118
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
120
119
|
core.logger.debug("[fetchProjectSettings] Fetching project settings...");
|
|
121
120
|
const doFetch = async () => apiClient.getEnvironmentSettings({
|
|
122
121
|
environmentId: core.environmentId,
|
|
@@ -130,6 +129,18 @@ const fetchProjectSettings = async (client = require_InvalidParamError.getDefaul
|
|
|
130
129
|
await core.storage.setItem(projectSettingsExpirationStorageKeySchema, Date.now() + PROJECT_SETTINGS_EXPIRATION_TIME);
|
|
131
130
|
return projectSettings;
|
|
132
131
|
};
|
|
132
|
+
const __fetchProjectSettings_impl = fetchProjectSettings;
|
|
133
|
+
const __fetchProjectSettings_wrapped = require_InvalidParamError.instrumentFunction({
|
|
134
|
+
fn: __fetchProjectSettings_impl,
|
|
135
|
+
functionName: "fetchProjectSettings",
|
|
136
|
+
getCore: () => {
|
|
137
|
+
try {
|
|
138
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
139
|
+
} catch {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
133
144
|
|
|
134
145
|
//#endregion
|
|
135
146
|
//#region src/services/runtimeServices/createRuntimeServices/createRuntimeServices.ts
|
|
@@ -154,10 +165,10 @@ const createRuntimeServices = () => {
|
|
|
154
165
|
const getAvailableWalletProvidersFromWalletAccounts = (client) => {
|
|
155
166
|
const core = require_InvalidParamError.getCore(client);
|
|
156
167
|
const walletProvidersMap = /* @__PURE__ */ new Map();
|
|
157
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
168
|
+
require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).forEach((walletAccount) => {
|
|
158
169
|
if (walletProvidersMap.has(walletAccount.walletProviderKey)) return;
|
|
159
170
|
try {
|
|
160
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
171
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
161
172
|
walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);
|
|
162
173
|
} catch (error) {
|
|
163
174
|
core.logger.debug("Wallet provider not found for wallet account", {
|
|
@@ -201,7 +212,7 @@ const performLogout = async ({ reason }, client) => {
|
|
|
201
212
|
core.logger.debug("[logout] Logging out...");
|
|
202
213
|
await disconnectAndTerminateWalletProviders({ reason }, client);
|
|
203
214
|
if (client.user !== null) {
|
|
204
|
-
const apiClient = require_InvalidParamError.
|
|
215
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
205
216
|
try {
|
|
206
217
|
await apiClient.revokeSession({ environmentId: core.environmentId });
|
|
207
218
|
} catch (error) {
|
|
@@ -229,8 +240,8 @@ const performLogout = async ({ reason }, client) => {
|
|
|
229
240
|
args: { reason },
|
|
230
241
|
event: "logout"
|
|
231
242
|
}, client);
|
|
232
|
-
|
|
233
|
-
require_getNetworkProviderFromNetworkId.
|
|
243
|
+
__fetchProjectSettings_wrapped(client);
|
|
244
|
+
require_getNetworkProviderFromNetworkId.__generateSessionKeys_wrapped(client);
|
|
234
245
|
};
|
|
235
246
|
|
|
236
247
|
//#endregion
|
|
@@ -246,6 +257,18 @@ const performLogout = async ({ reason }, client) => {
|
|
|
246
257
|
const handleSessionExpiration = async (client) => {
|
|
247
258
|
return performLogout({ reason: "token-expired" }, client);
|
|
248
259
|
};
|
|
260
|
+
const __handleSessionExpiration_impl = handleSessionExpiration;
|
|
261
|
+
const __handleSessionExpiration_wrapped = require_InvalidParamError.instrumentFunction({
|
|
262
|
+
fn: __handleSessionExpiration_impl,
|
|
263
|
+
functionName: "handleSessionExpiration",
|
|
264
|
+
getCore: () => {
|
|
265
|
+
try {
|
|
266
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
267
|
+
} catch {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
});
|
|
249
272
|
|
|
250
273
|
//#endregion
|
|
251
274
|
//#region src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts
|
|
@@ -279,7 +302,7 @@ const setLongTimeout = (callback, delay) => {
|
|
|
279
302
|
const initializeAuth = (client) => {
|
|
280
303
|
const core = require_InvalidParamError.getCore(client);
|
|
281
304
|
let clearExpirationTimeout = null;
|
|
282
|
-
const onChangeExpiration = require_getNetworkProviderFromNetworkId.
|
|
305
|
+
const onChangeExpiration = require_getNetworkProviderFromNetworkId.__subscribeWithSelector_wrapped(core.state, (state) => state.sessionExpiresAt);
|
|
283
306
|
const checkExpiration = () => {
|
|
284
307
|
const expiration = core.state.get().sessionExpiresAt;
|
|
285
308
|
clearExpirationTimeout?.();
|
|
@@ -287,7 +310,7 @@ const initializeAuth = (client) => {
|
|
|
287
310
|
const now = /* @__PURE__ */ new Date();
|
|
288
311
|
const timeUntilExpiration = expiration.getTime() - now.getTime();
|
|
289
312
|
if (timeUntilExpiration <= 0) {
|
|
290
|
-
|
|
313
|
+
__handleSessionExpiration_wrapped(client);
|
|
291
314
|
return;
|
|
292
315
|
}
|
|
293
316
|
clearExpirationTimeout = setLongTimeout(checkExpiration, timeUntilExpiration);
|
|
@@ -308,6 +331,18 @@ const initializeAuth = (client) => {
|
|
|
308
331
|
const logout = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
309
332
|
return performLogout({ reason: "user-intent" }, client);
|
|
310
333
|
};
|
|
334
|
+
const __logout_impl = logout;
|
|
335
|
+
const __logout_wrapped = require_InvalidParamError.instrumentFunction({
|
|
336
|
+
fn: __logout_impl,
|
|
337
|
+
functionName: "logout",
|
|
338
|
+
getCore: () => {
|
|
339
|
+
try {
|
|
340
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
341
|
+
} catch {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
});
|
|
311
346
|
|
|
312
347
|
//#endregion
|
|
313
348
|
//#region src/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.ts
|
|
@@ -362,7 +397,7 @@ const walletProviderKeyMapSchema = zod_mini.record(zod_mini.string(), zod_mini.s
|
|
|
362
397
|
|
|
363
398
|
//#endregion
|
|
364
399
|
//#region src/modules/storageSync/schema.ts
|
|
365
|
-
const stateStorageKeySchema = require_getNetworkProviderFromNetworkId.
|
|
400
|
+
const stateStorageKeySchema = require_getNetworkProviderFromNetworkId.__createStorageKeySchema_wrapped({
|
|
366
401
|
key: "state",
|
|
367
402
|
schema: zod_mini.object({
|
|
368
403
|
apiVersion: zod_mini.string(),
|
|
@@ -374,7 +409,7 @@ const stateStorageKeySchema = require_getNetworkProviderFromNetworkId.createStor
|
|
|
374
409
|
walletProviderKeyMap: walletProviderKeyMapSchema
|
|
375
410
|
})
|
|
376
411
|
});
|
|
377
|
-
const sessionStorageKeySchema = require_getNetworkProviderFromNetworkId.
|
|
412
|
+
const sessionStorageKeySchema = require_getNetworkProviderFromNetworkId.__createStorageKeySchema_wrapped({
|
|
378
413
|
key: "session",
|
|
379
414
|
schema: zod_mini.object({
|
|
380
415
|
captchaToken: zod_mini.nullable(zod_mini.string()),
|
|
@@ -599,10 +634,10 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
599
634
|
logger: core.logger,
|
|
600
635
|
state: core.state,
|
|
601
636
|
storage: core.storage
|
|
602
|
-
}).catch(() =>
|
|
603
|
-
if (core.state.get().sessionKeys && !await core.keychain.hasKey("session")) await
|
|
637
|
+
}).catch(() => __logout_wrapped(client));
|
|
638
|
+
if (core.state.get().sessionKeys && !await core.keychain.hasKey("session")) await __logout_wrapped(client);
|
|
604
639
|
}).then(async () => {
|
|
605
|
-
if (!core.state.get().projectSettings) await
|
|
640
|
+
if (!core.state.get().projectSettings) await __fetchProjectSettings_wrapped(client);
|
|
606
641
|
});
|
|
607
642
|
fetchProjectSettingsPromise.then(() => prefetchNoncesIfNeeded(client)).catch((error) => {
|
|
608
643
|
core.logger.error("Failed to prefetch nonces:", error);
|
|
@@ -611,7 +646,7 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
611
646
|
* Generate session keys if they don't exist
|
|
612
647
|
*/
|
|
613
648
|
const generateSessionKeysPromise = fetchProjectSettingsPromise.then(async () => {
|
|
614
|
-
if (!core.state.get().sessionKeys) await require_getNetworkProviderFromNetworkId.
|
|
649
|
+
if (!core.state.get().sessionKeys) await require_getNetworkProviderFromNetworkId.__generateSessionKeys_wrapped(client);
|
|
615
650
|
});
|
|
616
651
|
/**
|
|
617
652
|
* Refresh user state on initialization when cookie is enabled.
|
|
@@ -633,10 +668,10 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
633
668
|
* This call can fail with a 401 error if the user is not logged in and the SDK should finish its initialization process
|
|
634
669
|
* without throwing an error because that is an expected behavior.
|
|
635
670
|
*/
|
|
636
|
-
if (require_InvalidParamError.isCookieEnabled(client)) await require_NotWaasWalletAccountError.
|
|
671
|
+
if (require_InvalidParamError.isCookieEnabled(client)) await require_NotWaasWalletAccountError.__refreshAuth_wrapped(client).catch(async (error) => {
|
|
637
672
|
if (error.status === 401) {
|
|
638
673
|
core.logger.error("Session expired during initialization", error);
|
|
639
|
-
if (client.user) await
|
|
674
|
+
if (client.user) await __logout_wrapped(client);
|
|
640
675
|
} else throw error;
|
|
641
676
|
});
|
|
642
677
|
});
|
|
@@ -666,6 +701,18 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
666
701
|
}
|
|
667
702
|
if (client.user) require_getVerifiedCredentialForWalletAccount.restoreUserSharesForAllWalletAccounts(client);
|
|
668
703
|
};
|
|
704
|
+
const __initializeClient_impl = initializeClient;
|
|
705
|
+
const __initializeClient_wrapped = require_InvalidParamError.instrumentFunction({
|
|
706
|
+
fn: __initializeClient_impl,
|
|
707
|
+
functionName: "initializeClient",
|
|
708
|
+
getCore: () => {
|
|
709
|
+
try {
|
|
710
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
711
|
+
} catch {
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
});
|
|
669
716
|
|
|
670
717
|
//#endregion
|
|
671
718
|
//#region src/services/asyncTrack/createAsyncTrack.ts
|
|
@@ -682,7 +729,7 @@ const createAsyncTrack = () => {
|
|
|
682
729
|
*/
|
|
683
730
|
let isTrackEnabled = true;
|
|
684
731
|
const eventEmitter = new eventemitter3.EventEmitter();
|
|
685
|
-
const allSettledPromise = require_getNetworkProviderFromNetworkId.
|
|
732
|
+
const allSettledPromise = require_getNetworkProviderFromNetworkId.__createDeferredPromise_wrapped();
|
|
686
733
|
const tracker = /* @__PURE__ */ new Map();
|
|
687
734
|
/**
|
|
688
735
|
* Checks if all processes are initialized and resolves the main promise if they are.
|
|
@@ -755,47 +802,6 @@ const createWebFetch = () => {
|
|
|
755
802
|
return window.fetch.bind(window);
|
|
756
803
|
};
|
|
757
804
|
|
|
758
|
-
//#endregion
|
|
759
|
-
//#region src/utils/getUserAgent/getUserAgent.ts
|
|
760
|
-
/**
|
|
761
|
-
* Returns the browser's `navigator.userAgent` string for inclusion in
|
|
762
|
-
* instrumentation events.
|
|
763
|
-
*
|
|
764
|
-
* Falls back to an empty string in environments where `navigator` is not
|
|
765
|
-
* available (e.g., Node.js SSR, service workers) so that callers never need
|
|
766
|
-
* to guard against undefined.
|
|
767
|
-
* @not-instrumented
|
|
768
|
-
*/
|
|
769
|
-
const getUserAgent = () => {
|
|
770
|
-
try {
|
|
771
|
-
return navigator.userAgent;
|
|
772
|
-
} catch {
|
|
773
|
-
return "";
|
|
774
|
-
}
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
//#endregion
|
|
778
|
-
//#region src/modules/auth/extractSessionId/extractSessionId.ts
|
|
779
|
-
/**
|
|
780
|
-
* Extracts the session ID (`sid` claim) from a JWT token string.
|
|
781
|
-
*
|
|
782
|
-
* Decodes the base64url-encoded payload segment of the token and reads the
|
|
783
|
-
* `sid` field. This is used to correlate instrumentation events with the
|
|
784
|
-
* authenticated session, without ever forwarding the full token.
|
|
785
|
-
*
|
|
786
|
-
* Returns `null` when no token is present, when the token is malformed, or
|
|
787
|
-
* when the payload does not contain a `sid` claim.
|
|
788
|
-
* @not-instrumented
|
|
789
|
-
*/
|
|
790
|
-
const extractSessionId = (token) => {
|
|
791
|
-
try {
|
|
792
|
-
const payload = token.split(".")[1];
|
|
793
|
-
return JSON.parse(atob(payload)).sid ?? null;
|
|
794
|
-
} catch {
|
|
795
|
-
return null;
|
|
796
|
-
}
|
|
797
|
-
};
|
|
798
|
-
|
|
799
805
|
//#endregion
|
|
800
806
|
//#region src/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.ts
|
|
801
807
|
/**
|
|
@@ -819,34 +825,19 @@ const connectLoggerToInstrumentation = ({ environmentId, instrumentation, logger
|
|
|
819
825
|
},
|
|
820
826
|
sdkSessionId,
|
|
821
827
|
sdkVersion,
|
|
828
|
+
status: "error",
|
|
822
829
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
823
|
-
tokenSessionId: token ? extractSessionId(token) : null,
|
|
824
|
-
userAgent: getUserAgent(),
|
|
830
|
+
tokenSessionId: token ? require_InvalidParamError.extractSessionId(token) : null,
|
|
831
|
+
userAgent: require_InvalidParamError.getUserAgent(),
|
|
825
832
|
userId: user?.id ?? null
|
|
826
833
|
});
|
|
827
834
|
});
|
|
828
835
|
};
|
|
829
836
|
|
|
830
|
-
//#endregion
|
|
831
|
-
//#region src/services/instrumentation/constants.ts
|
|
832
|
-
const DEFAULT_PII_FIELDS = [
|
|
833
|
-
"password",
|
|
834
|
-
"token",
|
|
835
|
-
"secret",
|
|
836
|
-
"privateKey",
|
|
837
|
-
"mnemonic",
|
|
838
|
-
"seed",
|
|
839
|
-
"email",
|
|
840
|
-
"phone",
|
|
841
|
-
"ssn",
|
|
842
|
-
"address",
|
|
843
|
-
"authorization"
|
|
844
|
-
];
|
|
845
|
-
|
|
846
837
|
//#endregion
|
|
847
838
|
//#region src/services/instrumentation/createInstrumentation/createInstrumentation.ts
|
|
848
839
|
const buildPiiFields = (customFields = []) => {
|
|
849
|
-
const merged = [...DEFAULT_PII_FIELDS, ...customFields];
|
|
840
|
+
const merged = [...require_InvalidParamError.DEFAULT_PII_FIELDS, ...customFields];
|
|
850
841
|
return [...new Set(merged)];
|
|
851
842
|
};
|
|
852
843
|
/**
|
|
@@ -868,7 +859,8 @@ const createInstrumentation = ({ config: inputConfig } = {}) => {
|
|
|
868
859
|
piiFields: buildPiiFields(inputConfig?.piiFields)
|
|
869
860
|
};
|
|
870
861
|
const emit = (event) => {
|
|
871
|
-
if (config.enabled
|
|
862
|
+
if (!config.enabled || !transport) return;
|
|
863
|
+
transport.log(event);
|
|
872
864
|
};
|
|
873
865
|
return {
|
|
874
866
|
config,
|
|
@@ -909,7 +901,8 @@ const createDynamicTransport = (params) => {
|
|
|
909
901
|
flushScheduled = false;
|
|
910
902
|
const events = queue.splice(0);
|
|
911
903
|
if (events.length === 0) return;
|
|
912
|
-
|
|
904
|
+
const url = `${LOGS_BASE_URL}/${params.environmentId}`;
|
|
905
|
+
params.fetch(url, {
|
|
913
906
|
body: JSON.stringify(events),
|
|
914
907
|
headers: { "Content-Type": "application/json" },
|
|
915
908
|
method: "POST"
|
|
@@ -983,7 +976,7 @@ const createWebPasskeyService = () => ({
|
|
|
983
976
|
const createDebouncedMutex = () => {
|
|
984
977
|
const mutexState = /* @__PURE__ */ new Map();
|
|
985
978
|
return async ({ lockKey, callback, debounceTime = 0 }) => {
|
|
986
|
-
const resolutionPromise = require_getNetworkProviderFromNetworkId.
|
|
979
|
+
const resolutionPromise = require_getNetworkProviderFromNetworkId.__createDeferredPromise_wrapped();
|
|
987
980
|
if (!mutexState.has(lockKey)) mutexState.set(lockKey, {
|
|
988
981
|
nextCallback: null,
|
|
989
982
|
queuePromise: Promise.resolve(),
|
|
@@ -1135,10 +1128,10 @@ const getInitialState = () => ({
|
|
|
1135
1128
|
*/
|
|
1136
1129
|
const createCore = (config) => {
|
|
1137
1130
|
const apiBaseUrl = config.coreConfig?.apiBaseUrl ?? DEFAULT_API_BASE_URL;
|
|
1138
|
-
const logger = config.coreConfig?.logger ?? require_getNetworkProviderFromNetworkId.
|
|
1139
|
-
const storage = require_getNetworkProviderFromNetworkId.
|
|
1131
|
+
const logger = config.coreConfig?.logger ?? require_getNetworkProviderFromNetworkId.__createLogger_wrapped({ level: config.logLevel });
|
|
1132
|
+
const storage = require_getNetworkProviderFromNetworkId.__createStorage_wrapped({
|
|
1140
1133
|
prefix: `dynamic_${config.environmentId}`,
|
|
1141
|
-
storageAdapter: config.coreConfig?.storageAdapter ?? require_getNetworkProviderFromNetworkId.
|
|
1134
|
+
storageAdapter: config.coreConfig?.storageAdapter ?? require_getNetworkProviderFromNetworkId.__createLocalStorageAdapter_wrapped()
|
|
1142
1135
|
});
|
|
1143
1136
|
const fetch = config.coreConfig?.fetch ?? createWebFetch();
|
|
1144
1137
|
const openDeeplink = config.coreConfig?.openDeeplink ?? createWebDeeplinkOpener();
|
|
@@ -1163,12 +1156,12 @@ const createCore = (config) => {
|
|
|
1163
1156
|
}));
|
|
1164
1157
|
const runtimeServices = createRuntimeServices();
|
|
1165
1158
|
const passkey = config.coreConfig?.passkey ?? createWebPasskeyService();
|
|
1166
|
-
const realtime = config.coreConfig?.realtime ?? require_getNetworkProviderFromNetworkId.
|
|
1159
|
+
const realtime = config.coreConfig?.realtime ?? require_getNetworkProviderFromNetworkId.__createRealtimeService_wrapped();
|
|
1167
1160
|
const deviceSigner = config.coreConfig?.deviceSigner;
|
|
1168
|
-
const keychain = config.coreConfig?.keychain ?? require_getNetworkProviderFromNetworkId.
|
|
1161
|
+
const keychain = config.coreConfig?.keychain ?? require_getNetworkProviderFromNetworkId.__createIndexedDBKeychainService_wrapped({ dbName: `dynamic_${config.environmentId}_keychain` });
|
|
1169
1162
|
return {
|
|
1170
1163
|
apiBaseUrl,
|
|
1171
|
-
crossTabBroadcast: config.coreConfig?.crossTabBroadcast ?? require_getNetworkProviderFromNetworkId.
|
|
1164
|
+
crossTabBroadcast: config.coreConfig?.crossTabBroadcast ?? require_getNetworkProviderFromNetworkId.__createCrossTabBroadcast_wrapped({ channelName: `dynamic_${config.environmentId}_broadcast` }),
|
|
1172
1165
|
debouncedMutex,
|
|
1173
1166
|
deviceSigner,
|
|
1174
1167
|
environmentId: config.environmentId,
|
|
@@ -1244,11 +1237,23 @@ const createDynamicClient = (config) => {
|
|
|
1244
1237
|
core.logger.debug("[createDynamicClient] Creating client...");
|
|
1245
1238
|
if (shouldAutoInitialize) {
|
|
1246
1239
|
core.logger.debug("[createDynamicClient] Initializing client...");
|
|
1247
|
-
|
|
1240
|
+
__initializeClient_wrapped(client);
|
|
1248
1241
|
}
|
|
1249
1242
|
require_InvalidParamError.setDefaultClient(client);
|
|
1250
1243
|
return client;
|
|
1251
1244
|
};
|
|
1245
|
+
const __createDynamicClient_impl = createDynamicClient;
|
|
1246
|
+
const __createDynamicClient_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1247
|
+
fn: __createDynamicClient_impl,
|
|
1248
|
+
functionName: "createDynamicClient",
|
|
1249
|
+
getCore: () => {
|
|
1250
|
+
try {
|
|
1251
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1252
|
+
} catch {
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1252
1257
|
|
|
1253
1258
|
//#endregion
|
|
1254
1259
|
//#region src/errors/CheckoutSessionTokenMissingError.ts
|
|
@@ -1639,7 +1644,7 @@ const STEP_UP_REQUIRED_DEFAULT = {
|
|
|
1639
1644
|
* @instrumented
|
|
1640
1645
|
*/
|
|
1641
1646
|
const checkStepUpAuth = async ({ scope }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
1642
|
-
if (require_InvalidParamError.
|
|
1647
|
+
if (require_InvalidParamError.__getElevatedAccessToken_wrapped({
|
|
1643
1648
|
consume: false,
|
|
1644
1649
|
scope
|
|
1645
1650
|
}, client)) return {
|
|
@@ -1648,7 +1653,7 @@ const checkStepUpAuth = async ({ scope }, client = require_InvalidParamError.get
|
|
|
1648
1653
|
};
|
|
1649
1654
|
try {
|
|
1650
1655
|
const core = require_InvalidParamError.getCore(client);
|
|
1651
|
-
const response = await require_InvalidParamError.
|
|
1656
|
+
const response = await require_InvalidParamError.__createApiClient_wrapped({}, client).stepUpCheck({
|
|
1652
1657
|
environmentId: core.environmentId,
|
|
1653
1658
|
stepUpCheckRequest: { scope }
|
|
1654
1659
|
});
|
|
@@ -1661,6 +1666,18 @@ const checkStepUpAuth = async ({ scope }, client = require_InvalidParamError.get
|
|
|
1661
1666
|
return STEP_UP_REQUIRED_DEFAULT;
|
|
1662
1667
|
}
|
|
1663
1668
|
};
|
|
1669
|
+
const __checkStepUpAuth_impl = checkStepUpAuth;
|
|
1670
|
+
const __checkStepUpAuth_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1671
|
+
fn: __checkStepUpAuth_impl,
|
|
1672
|
+
functionName: "checkStepUpAuth",
|
|
1673
|
+
getCore: () => {
|
|
1674
|
+
try {
|
|
1675
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1676
|
+
} catch {
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1664
1681
|
|
|
1665
1682
|
//#endregion
|
|
1666
1683
|
//#region src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts
|
|
@@ -1681,7 +1698,7 @@ const checkStepUpAuth = async ({ scope }, client = require_InvalidParamError.get
|
|
|
1681
1698
|
*/
|
|
1682
1699
|
const requestExternalAuthElevatedToken = async ({ externalJwt }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
1683
1700
|
const core = require_InvalidParamError.getCore(client);
|
|
1684
|
-
const response = await require_InvalidParamError.
|
|
1701
|
+
const response = await require_InvalidParamError.__createApiClient_wrapped({}, client).externalAuthVerify({
|
|
1685
1702
|
environmentId: core.environmentId,
|
|
1686
1703
|
externalAuthSigninRequest: { jwt: externalJwt }
|
|
1687
1704
|
});
|
|
@@ -1695,6 +1712,18 @@ const requestExternalAuthElevatedToken = async ({ externalJwt }, client = requir
|
|
|
1695
1712
|
}
|
|
1696
1713
|
return response;
|
|
1697
1714
|
};
|
|
1715
|
+
const __requestExternalAuthElevatedToken_impl = requestExternalAuthElevatedToken;
|
|
1716
|
+
const __requestExternalAuthElevatedToken_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1717
|
+
fn: __requestExternalAuthElevatedToken_impl,
|
|
1718
|
+
functionName: "requestExternalAuthElevatedToken",
|
|
1719
|
+
getCore: () => {
|
|
1720
|
+
try {
|
|
1721
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1722
|
+
} catch {
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
});
|
|
1698
1727
|
|
|
1699
1728
|
//#endregion
|
|
1700
1729
|
//#region src/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.ts
|
|
@@ -1713,16 +1742,29 @@ const requestExternalAuthElevatedToken = async ({ externalJwt }, client = requir
|
|
|
1713
1742
|
*/
|
|
1714
1743
|
const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, client = require_InvalidParamError.getDefaultClient()) => {
|
|
1715
1744
|
const core = require_InvalidParamError.getCore(client);
|
|
1716
|
-
const response = await require_InvalidParamError.
|
|
1745
|
+
const response = await require_InvalidParamError.__createApiClient_wrapped({}, client).externalAuthSignin({
|
|
1717
1746
|
environmentId: core.environmentId,
|
|
1718
1747
|
externalAuthSigninRequest: {
|
|
1719
1748
|
jwt: externalJwt,
|
|
1720
1749
|
sessionPublicKey
|
|
1721
1750
|
}
|
|
1722
1751
|
});
|
|
1723
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
1752
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
1724
1753
|
return response;
|
|
1725
1754
|
};
|
|
1755
|
+
const __signInWithExternalJwt_impl = signInWithExternalJwt;
|
|
1756
|
+
const __signInWithExternalJwt_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1757
|
+
fn: __signInWithExternalJwt_impl,
|
|
1758
|
+
functionName: "signInWithExternalJwt",
|
|
1759
|
+
getCore: () => {
|
|
1760
|
+
try {
|
|
1761
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1762
|
+
} catch {
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
},
|
|
1766
|
+
redactAll: true
|
|
1767
|
+
});
|
|
1726
1768
|
|
|
1727
1769
|
//#endregion
|
|
1728
1770
|
//#region src/modules/auth/passkeys/deletePasskey/deletePasskey.ts
|
|
@@ -1736,7 +1778,7 @@ const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, cli
|
|
|
1736
1778
|
*/
|
|
1737
1779
|
const deletePasskey = async ({ passkeyId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
1738
1780
|
const core = require_InvalidParamError.getCore(client);
|
|
1739
|
-
await require_InvalidParamError.
|
|
1781
|
+
await require_InvalidParamError.__createApiClient_wrapped({
|
|
1740
1782
|
elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.Credentialunlink,
|
|
1741
1783
|
includeMfaToken: true
|
|
1742
1784
|
}, client).deletePasskey({
|
|
@@ -1744,6 +1786,18 @@ const deletePasskey = async ({ passkeyId }, client = require_InvalidParamError.g
|
|
|
1744
1786
|
environmentId: core.environmentId
|
|
1745
1787
|
});
|
|
1746
1788
|
};
|
|
1789
|
+
const __deletePasskey_impl = deletePasskey;
|
|
1790
|
+
const __deletePasskey_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1791
|
+
fn: __deletePasskey_impl,
|
|
1792
|
+
functionName: "deletePasskey",
|
|
1793
|
+
getCore: () => {
|
|
1794
|
+
try {
|
|
1795
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1796
|
+
} catch {
|
|
1797
|
+
return;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1747
1801
|
|
|
1748
1802
|
//#endregion
|
|
1749
1803
|
//#region src/modules/auth/passkeys/getPasskeys/getPasskeys.ts
|
|
@@ -1759,15 +1813,27 @@ const deletePasskey = async ({ passkeyId }, client = require_InvalidParamError.g
|
|
|
1759
1813
|
*/
|
|
1760
1814
|
const getPasskeys = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
1761
1815
|
const core = require_InvalidParamError.getCore(client);
|
|
1762
|
-
return (await require_InvalidParamError.
|
|
1816
|
+
return (await require_InvalidParamError.__createApiClient_wrapped({}, client).getUserPasskeys({ environmentId: core.environmentId })).passkeys;
|
|
1763
1817
|
};
|
|
1818
|
+
const __getPasskeys_impl = getPasskeys;
|
|
1819
|
+
const __getPasskeys_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1820
|
+
fn: __getPasskeys_impl,
|
|
1821
|
+
functionName: "getPasskeys",
|
|
1822
|
+
getCore: () => {
|
|
1823
|
+
try {
|
|
1824
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1825
|
+
} catch {
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
});
|
|
1764
1830
|
|
|
1765
1831
|
//#endregion
|
|
1766
1832
|
//#region src/modules/auth/passkeys/getPasskeyRegistrationOptions/getPasskeyRegistrationOptions.ts
|
|
1767
1833
|
/** @not-instrumented */
|
|
1768
1834
|
const getPasskeyRegistrationOptions = async (client) => {
|
|
1769
1835
|
const core = require_InvalidParamError.getCore(client);
|
|
1770
|
-
return await require_InvalidParamError.
|
|
1836
|
+
return await require_InvalidParamError.__createApiClient_wrapped({}, client).getPasskeyRegistrationOptions({ environmentId: core.environmentId });
|
|
1771
1837
|
};
|
|
1772
1838
|
|
|
1773
1839
|
//#endregion
|
|
@@ -1775,7 +1841,7 @@ const getPasskeyRegistrationOptions = async (client) => {
|
|
|
1775
1841
|
/** @not-instrumented */
|
|
1776
1842
|
const serverRegisterPasskey = async ({ registration, createMfaToken }, client) => {
|
|
1777
1843
|
const core = require_InvalidParamError.getCore(client);
|
|
1778
|
-
return await require_InvalidParamError.
|
|
1844
|
+
return await require_InvalidParamError.__createApiClient_wrapped({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.Credentiallink }, client).registerPasskey({
|
|
1779
1845
|
environmentId: core.environmentId,
|
|
1780
1846
|
passkeyRegisterRequest: {
|
|
1781
1847
|
...registration,
|
|
@@ -1811,16 +1877,28 @@ const registerPasskey = async ({ createMfaToken } = {}, client = require_Invalid
|
|
|
1811
1877
|
createMfaToken,
|
|
1812
1878
|
registration: await core.passkey.register({ optionsJSON: options })
|
|
1813
1879
|
}, client);
|
|
1814
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
1880
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
1815
1881
|
return response;
|
|
1816
1882
|
};
|
|
1883
|
+
const __registerPasskey_impl = registerPasskey;
|
|
1884
|
+
const __registerPasskey_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1885
|
+
fn: __registerPasskey_impl,
|
|
1886
|
+
functionName: "registerPasskey",
|
|
1887
|
+
getCore: () => {
|
|
1888
|
+
try {
|
|
1889
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1890
|
+
} catch {
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
});
|
|
1817
1895
|
|
|
1818
1896
|
//#endregion
|
|
1819
1897
|
//#region src/modules/auth/passkeys/getPasskeyAuthenticationSignInOptions/getPasskeyAuthenticationSignInOptions.ts
|
|
1820
1898
|
/** @not-instrumented */
|
|
1821
1899
|
const getPasskeyAuthenticationSignInOptions = async ({ relatedOriginRpId } = {}, client) => {
|
|
1822
1900
|
const core = require_InvalidParamError.getCore(client);
|
|
1823
|
-
return await require_InvalidParamError.
|
|
1901
|
+
return await require_InvalidParamError.__createApiClient_wrapped({}, client).getPasskeyAuthenticationSigninOptions({
|
|
1824
1902
|
environmentId: core.environmentId,
|
|
1825
1903
|
relatedOriginRpId
|
|
1826
1904
|
});
|
|
@@ -1831,7 +1909,7 @@ const getPasskeyAuthenticationSignInOptions = async ({ relatedOriginRpId } = {},
|
|
|
1831
1909
|
/** @not-instrumented */
|
|
1832
1910
|
const serverSigninPasskey = async ({ authentication, createMfaToken }, client) => {
|
|
1833
1911
|
const core = require_InvalidParamError.getCore(client);
|
|
1834
|
-
return await require_InvalidParamError.
|
|
1912
|
+
return await require_InvalidParamError.__createApiClient_wrapped({}, client).signinWithPasskey({
|
|
1835
1913
|
environmentId: core.environmentId,
|
|
1836
1914
|
passkeyAuthRequest: {
|
|
1837
1915
|
...authentication,
|
|
@@ -1863,9 +1941,21 @@ const signInWithPasskey = async ({ relatedOriginRpId } = {}, client = require_In
|
|
|
1863
1941
|
if (!core.passkey.isSupported()) throw new NoWebAuthNSupportError();
|
|
1864
1942
|
const formattedOptions = { ...await getPasskeyAuthenticationSignInOptions({ relatedOriginRpId }, client) };
|
|
1865
1943
|
const response = await serverSigninPasskey({ authentication: await core.passkey.authenticate({ optionsJSON: formattedOptions }) }, client);
|
|
1866
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
1944
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
1867
1945
|
return response;
|
|
1868
1946
|
};
|
|
1947
|
+
const __signInWithPasskey_impl = signInWithPasskey;
|
|
1948
|
+
const __signInWithPasskey_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1949
|
+
fn: __signInWithPasskey_impl,
|
|
1950
|
+
functionName: "signInWithPasskey",
|
|
1951
|
+
getCore: () => {
|
|
1952
|
+
try {
|
|
1953
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1954
|
+
} catch {
|
|
1955
|
+
return;
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1869
1959
|
|
|
1870
1960
|
//#endregion
|
|
1871
1961
|
//#region src/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.ts
|
|
@@ -1889,6 +1979,18 @@ const getUserSocialAccounts = (client = require_InvalidParamError.getDefaultClie
|
|
|
1889
1979
|
verifiedCredentialId: credential.id
|
|
1890
1980
|
}));
|
|
1891
1981
|
};
|
|
1982
|
+
const __getUserSocialAccounts_impl = getUserSocialAccounts;
|
|
1983
|
+
const __getUserSocialAccounts_wrapped = require_InvalidParamError.instrumentFunction({
|
|
1984
|
+
fn: __getUserSocialAccounts_impl,
|
|
1985
|
+
functionName: "getUserSocialAccounts",
|
|
1986
|
+
getCore: () => {
|
|
1987
|
+
try {
|
|
1988
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
1989
|
+
} catch {
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
});
|
|
1892
1994
|
|
|
1893
1995
|
//#endregion
|
|
1894
1996
|
//#region src/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.ts
|
|
@@ -1903,7 +2005,7 @@ const removeDynamicOauthParamsFromUrl = (url) => {
|
|
|
1903
2005
|
//#endregion
|
|
1904
2006
|
//#region src/modules/auth/social/oauth/redirectStateStorageSchema/redirectStateStorageSchema.ts
|
|
1905
2007
|
/** The schema to track the state of the OAuth flow. */
|
|
1906
|
-
const redirectStateStorageKeySchema = require_getNetworkProviderFromNetworkId.
|
|
2008
|
+
const redirectStateStorageKeySchema = require_getNetworkProviderFromNetworkId.__createStorageKeySchema_wrapped({
|
|
1907
2009
|
key: "redirectState",
|
|
1908
2010
|
schema: zod_mini.object({
|
|
1909
2011
|
codeVerifier: zod_mini.optional(zod_mini.string()),
|
|
@@ -2033,7 +2135,7 @@ const buildOAuthUrl = async (core, provider) => {
|
|
|
2033
2135
|
*/
|
|
2034
2136
|
const authenticateWithSocial = async ({ provider, redirectUrl }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2035
2137
|
const core = require_InvalidParamError.getCore(client);
|
|
2036
|
-
const apiClient = require_InvalidParamError.
|
|
2138
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2037
2139
|
await core.initTrack.waitForAll();
|
|
2038
2140
|
const providerType = provider;
|
|
2039
2141
|
const { url, state, codeVerifier } = await buildOAuthUrl(core, providerType);
|
|
@@ -2052,6 +2154,18 @@ const authenticateWithSocial = async ({ provider, redirectUrl }, client = requir
|
|
|
2052
2154
|
});
|
|
2053
2155
|
await core.navigate(url.toString());
|
|
2054
2156
|
};
|
|
2157
|
+
const __authenticateWithSocial_impl = authenticateWithSocial;
|
|
2158
|
+
const __authenticateWithSocial_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2159
|
+
fn: __authenticateWithSocial_impl,
|
|
2160
|
+
functionName: "authenticateWithSocial",
|
|
2161
|
+
getCore: () => {
|
|
2162
|
+
try {
|
|
2163
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2164
|
+
} catch {
|
|
2165
|
+
return;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2055
2169
|
|
|
2056
2170
|
//#endregion
|
|
2057
2171
|
//#region src/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.ts
|
|
@@ -2071,7 +2185,7 @@ const authenticateWithSocial = async ({ provider, redirectUrl }, client = requir
|
|
|
2071
2185
|
*/
|
|
2072
2186
|
const completeSocialAuthentication = async ({ url, requestedScopes }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2073
2187
|
const core = require_InvalidParamError.getCore(client);
|
|
2074
|
-
const apiClient = require_InvalidParamError.
|
|
2188
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2075
2189
|
await core.initTrack.waitForAll();
|
|
2076
2190
|
const dynamicOauthState = url.searchParams.get("dynamicOauthState");
|
|
2077
2191
|
const dynamicOauthCode = url.searchParams.get("dynamicOauthCode");
|
|
@@ -2096,16 +2210,28 @@ const completeSocialAuthentication = async ({ url, requestedScopes }, client = r
|
|
|
2096
2210
|
else response = await apiClient.oauthSignIn({
|
|
2097
2211
|
environmentId: core.environmentId,
|
|
2098
2212
|
oauthRequest: {
|
|
2099
|
-
captchaToken: require_getNetworkProviderFromNetworkId.
|
|
2213
|
+
captchaToken: require_getNetworkProviderFromNetworkId.__consumeCaptchaToken_wrapped(client),
|
|
2100
2214
|
code: dynamicOauthCode,
|
|
2101
2215
|
codeVerifier,
|
|
2102
2216
|
state: dynamicOauthState
|
|
2103
2217
|
},
|
|
2104
2218
|
providerType: provider
|
|
2105
2219
|
});
|
|
2106
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
2220
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
2107
2221
|
return response.user;
|
|
2108
2222
|
};
|
|
2223
|
+
const __completeSocialAuthentication_impl = completeSocialAuthentication;
|
|
2224
|
+
const __completeSocialAuthentication_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2225
|
+
fn: __completeSocialAuthentication_impl,
|
|
2226
|
+
functionName: "completeSocialAuthentication",
|
|
2227
|
+
getCore: () => {
|
|
2228
|
+
try {
|
|
2229
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2230
|
+
} catch {
|
|
2231
|
+
return;
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
});
|
|
2109
2235
|
|
|
2110
2236
|
//#endregion
|
|
2111
2237
|
//#region src/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.ts
|
|
@@ -2130,6 +2256,18 @@ const detectOAuthRedirect = async ({ url }, client = require_InvalidParamError.g
|
|
|
2130
2256
|
if (!storedSocialRedirectState || storedSocialRedirectState.state !== dynamicOauthState) return false;
|
|
2131
2257
|
return true;
|
|
2132
2258
|
};
|
|
2259
|
+
const __detectOAuthRedirect_impl = detectOAuthRedirect;
|
|
2260
|
+
const __detectOAuthRedirect_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2261
|
+
fn: __detectOAuthRedirect_impl,
|
|
2262
|
+
functionName: "detectOAuthRedirect",
|
|
2263
|
+
getCore: () => {
|
|
2264
|
+
try {
|
|
2265
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2266
|
+
} catch {
|
|
2267
|
+
return;
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
});
|
|
2133
2271
|
|
|
2134
2272
|
//#endregion
|
|
2135
2273
|
//#region src/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.ts
|
|
@@ -2141,11 +2279,23 @@ const detectOAuthRedirect = async ({ url }, client = require_InvalidParamError.g
|
|
|
2141
2279
|
* @instrumented
|
|
2142
2280
|
*/
|
|
2143
2281
|
const getPrimaryWalletAccount = (client = require_InvalidParamError.getDefaultClient()) => {
|
|
2144
|
-
const sortedLastSelectedWalletAccounts = require_getVerifiedCredentialForWalletAccount.
|
|
2282
|
+
const sortedLastSelectedWalletAccounts = require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).filter((walletAccount) => Boolean(walletAccount.lastSelectedAt)).sort((a, b) => b.lastSelectedAt.getTime() - a.lastSelectedAt.getTime());
|
|
2145
2283
|
if (sortedLastSelectedWalletAccounts.length === 0) return null;
|
|
2146
2284
|
const [primaryWalletAccount] = sortedLastSelectedWalletAccounts;
|
|
2147
2285
|
return primaryWalletAccount;
|
|
2148
2286
|
};
|
|
2287
|
+
const __getPrimaryWalletAccount_impl = getPrimaryWalletAccount;
|
|
2288
|
+
const __getPrimaryWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2289
|
+
fn: __getPrimaryWalletAccount_impl,
|
|
2290
|
+
functionName: "getPrimaryWalletAccount",
|
|
2291
|
+
getCore: () => {
|
|
2292
|
+
try {
|
|
2293
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2294
|
+
} catch {
|
|
2295
|
+
return;
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
});
|
|
2149
2299
|
|
|
2150
2300
|
//#endregion
|
|
2151
2301
|
//#region src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts
|
|
@@ -2159,8 +2309,8 @@ const getPrimaryWalletAccount = (client = require_InvalidParamError.getDefaultCl
|
|
|
2159
2309
|
*/
|
|
2160
2310
|
const unlinkSocialAccount = async ({ verifiedCredentialId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2161
2311
|
const core = require_InvalidParamError.getCore(client);
|
|
2162
|
-
const apiClient = require_InvalidParamError.
|
|
2163
|
-
const walletId =
|
|
2312
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2313
|
+
const walletId = __getPrimaryWalletAccount_wrapped(client)?.verifiedCredentialId?.replace("-zerodev", "");
|
|
2164
2314
|
const response = await apiClient.verifyUnlink({
|
|
2165
2315
|
environmentId: core.environmentId,
|
|
2166
2316
|
verifyUnlinkRequest: {
|
|
@@ -2168,9 +2318,21 @@ const unlinkSocialAccount = async ({ verifiedCredentialId }, client = require_In
|
|
|
2168
2318
|
walletId: walletId ?? void 0
|
|
2169
2319
|
}
|
|
2170
2320
|
});
|
|
2171
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
2321
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
2172
2322
|
return response;
|
|
2173
2323
|
};
|
|
2324
|
+
const __unlinkSocialAccount_impl = unlinkSocialAccount;
|
|
2325
|
+
const __unlinkSocialAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2326
|
+
fn: __unlinkSocialAccount_impl,
|
|
2327
|
+
functionName: "unlinkSocialAccount",
|
|
2328
|
+
getCore: () => {
|
|
2329
|
+
try {
|
|
2330
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2331
|
+
} catch {
|
|
2332
|
+
return;
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
});
|
|
2174
2336
|
|
|
2175
2337
|
//#endregion
|
|
2176
2338
|
//#region src/modules/balances/getBalances/getBalances.ts
|
|
@@ -2186,9 +2348,9 @@ const unlinkSocialAccount = async ({ verifiedCredentialId }, client = require_In
|
|
|
2186
2348
|
*/
|
|
2187
2349
|
const getBalances = async ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2188
2350
|
const core = require_InvalidParamError.getCore(client);
|
|
2189
|
-
const apiClient = require_InvalidParamError.
|
|
2351
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2190
2352
|
if (!networkId) {
|
|
2191
|
-
const activeNetworkId = await require_getVerifiedCredentialForWalletAccount.
|
|
2353
|
+
const activeNetworkId = await require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).getActiveNetworkId();
|
|
2192
2354
|
networkId = Number(activeNetworkId.networkId);
|
|
2193
2355
|
}
|
|
2194
2356
|
return await apiClient.getAccountBalances({
|
|
@@ -2203,6 +2365,18 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
|
|
|
2203
2365
|
whitelistedContracts
|
|
2204
2366
|
});
|
|
2205
2367
|
};
|
|
2368
|
+
const __getBalances_impl = getBalances;
|
|
2369
|
+
const __getBalances_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2370
|
+
fn: __getBalances_impl,
|
|
2371
|
+
functionName: "getBalances",
|
|
2372
|
+
getCore: () => {
|
|
2373
|
+
try {
|
|
2374
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2375
|
+
} catch {
|
|
2376
|
+
return;
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2206
2380
|
|
|
2207
2381
|
//#endregion
|
|
2208
2382
|
//#region src/modules/balances/getMultichainBalances/getMultichainBalances.ts
|
|
@@ -2219,17 +2393,29 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
|
|
|
2219
2393
|
*/
|
|
2220
2394
|
const getMultichainBalances = async ({ balanceRequest }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2221
2395
|
const core = require_InvalidParamError.getCore(client);
|
|
2222
|
-
return (await require_InvalidParamError.
|
|
2396
|
+
return (await require_InvalidParamError.__createApiClient_wrapped({}, client).postMultichainAccountBalances({
|
|
2223
2397
|
environmentId: core.environmentId,
|
|
2224
2398
|
multichainAccountBalancesRequest: balanceRequest
|
|
2225
2399
|
})).chainBalances;
|
|
2226
2400
|
};
|
|
2401
|
+
const __getMultichainBalances_impl = getMultichainBalances;
|
|
2402
|
+
const __getMultichainBalances_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2403
|
+
fn: __getMultichainBalances_impl,
|
|
2404
|
+
functionName: "getMultichainBalances",
|
|
2405
|
+
getCore: () => {
|
|
2406
|
+
try {
|
|
2407
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2408
|
+
} catch {
|
|
2409
|
+
return;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2227
2413
|
|
|
2228
2414
|
//#endregion
|
|
2229
2415
|
//#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
|
|
2230
2416
|
/** @not-instrumented */
|
|
2231
2417
|
const createCheckoutSessionTokenStorageKey = (transactionId) => {
|
|
2232
|
-
return require_getNetworkProviderFromNetworkId.
|
|
2418
|
+
return require_getNetworkProviderFromNetworkId.__createStorageKeySchema_wrapped({
|
|
2233
2419
|
key: `checkoutSessionToken:${transactionId}`,
|
|
2234
2420
|
schema: zod_mini.string()
|
|
2235
2421
|
});
|
|
@@ -2240,7 +2426,7 @@ const createCheckoutSessionTokenStorageKey = (transactionId) => {
|
|
|
2240
2426
|
/** @not-instrumented */
|
|
2241
2427
|
const createCheckoutApiClient = async ({ transactionId }, client) => {
|
|
2242
2428
|
const core = require_InvalidParamError.getCore(client);
|
|
2243
|
-
const apiClient = require_InvalidParamError.
|
|
2429
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2244
2430
|
const sessionToken = await core.storage.getItem(createCheckoutSessionTokenStorageKey(transactionId));
|
|
2245
2431
|
if (!sessionToken) throw new CheckoutSessionTokenMissingError({ transactionId });
|
|
2246
2432
|
return {
|
|
@@ -2274,6 +2460,18 @@ const attachCheckoutTransactionSource = async ({ fromAddress, fromChainId, fromC
|
|
|
2274
2460
|
xDynamicCheckoutSessionToken: sessionToken
|
|
2275
2461
|
});
|
|
2276
2462
|
};
|
|
2463
|
+
const __attachCheckoutTransactionSource_impl = attachCheckoutTransactionSource;
|
|
2464
|
+
const __attachCheckoutTransactionSource_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2465
|
+
fn: __attachCheckoutTransactionSource_impl,
|
|
2466
|
+
functionName: "attachCheckoutTransactionSource",
|
|
2467
|
+
getCore: () => {
|
|
2468
|
+
try {
|
|
2469
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2470
|
+
} catch {
|
|
2471
|
+
return;
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
});
|
|
2277
2475
|
|
|
2278
2476
|
//#endregion
|
|
2279
2477
|
//#region src/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.ts
|
|
@@ -2294,6 +2492,18 @@ const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client =
|
|
|
2294
2492
|
xDynamicCheckoutSessionToken: sessionToken
|
|
2295
2493
|
});
|
|
2296
2494
|
};
|
|
2495
|
+
const __broadcastCheckoutTransaction_impl = broadcastCheckoutTransaction;
|
|
2496
|
+
const __broadcastCheckoutTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2497
|
+
fn: __broadcastCheckoutTransaction_impl,
|
|
2498
|
+
functionName: "broadcastCheckoutTransaction",
|
|
2499
|
+
getCore: () => {
|
|
2500
|
+
try {
|
|
2501
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2502
|
+
} catch {
|
|
2503
|
+
return;
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
});
|
|
2297
2507
|
|
|
2298
2508
|
//#endregion
|
|
2299
2509
|
//#region src/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.ts
|
|
@@ -2315,6 +2525,18 @@ const cancelCheckoutTransaction = async ({ transactionId }, client = require_Inv
|
|
|
2315
2525
|
await require_InvalidParamError.getCore(client).storage.removeItem(createCheckoutSessionTokenStorageKey(transactionId));
|
|
2316
2526
|
return result;
|
|
2317
2527
|
};
|
|
2528
|
+
const __cancelCheckoutTransaction_impl = cancelCheckoutTransaction;
|
|
2529
|
+
const __cancelCheckoutTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2530
|
+
fn: __cancelCheckoutTransaction_impl,
|
|
2531
|
+
functionName: "cancelCheckoutTransaction",
|
|
2532
|
+
getCore: () => {
|
|
2533
|
+
try {
|
|
2534
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2535
|
+
} catch {
|
|
2536
|
+
return;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
});
|
|
2318
2540
|
|
|
2319
2541
|
//#endregion
|
|
2320
2542
|
//#region src/modules/checkout/getCheckouts/getCheckouts.ts
|
|
@@ -2337,7 +2559,7 @@ const getCheckouts = async (client) => {
|
|
|
2337
2559
|
*/
|
|
2338
2560
|
const createCheckoutTransaction = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2339
2561
|
const core = require_InvalidParamError.getCore(client);
|
|
2340
|
-
const apiClient = require_InvalidParamError.
|
|
2562
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2341
2563
|
const checkouts = await getCheckouts(client);
|
|
2342
2564
|
const checkoutId = params.checkoutId || checkouts?.[0]?.id;
|
|
2343
2565
|
require_InvalidParamError.assertDefined(checkoutId, "No checkout found. Please make sure you have a Checkout setup in the Dashboard.");
|
|
@@ -2358,6 +2580,18 @@ const createCheckoutTransaction = async (params, client = require_InvalidParamEr
|
|
|
2358
2580
|
await core.storage.setItem(createCheckoutSessionTokenStorageKey(result.transaction.id), result.sessionToken);
|
|
2359
2581
|
return result;
|
|
2360
2582
|
};
|
|
2583
|
+
const __createCheckoutTransaction_impl = createCheckoutTransaction;
|
|
2584
|
+
const __createCheckoutTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2585
|
+
fn: __createCheckoutTransaction_impl,
|
|
2586
|
+
functionName: "createCheckoutTransaction",
|
|
2587
|
+
getCore: () => {
|
|
2588
|
+
try {
|
|
2589
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2590
|
+
} catch {
|
|
2591
|
+
return;
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
});
|
|
2361
2595
|
|
|
2362
2596
|
//#endregion
|
|
2363
2597
|
//#region src/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.ts
|
|
@@ -2371,11 +2605,23 @@ const createCheckoutTransaction = async (params, client = require_InvalidParamEr
|
|
|
2371
2605
|
*/
|
|
2372
2606
|
const getCheckoutTransaction = async ({ transactionId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2373
2607
|
const core = require_InvalidParamError.getCore(client);
|
|
2374
|
-
return require_InvalidParamError.
|
|
2608
|
+
return require_InvalidParamError.__createApiClient_wrapped({}, client).getCheckoutTransaction({
|
|
2375
2609
|
environmentId: core.environmentId,
|
|
2376
2610
|
transactionId
|
|
2377
2611
|
});
|
|
2378
2612
|
};
|
|
2613
|
+
const __getCheckoutTransaction_impl = getCheckoutTransaction;
|
|
2614
|
+
const __getCheckoutTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2615
|
+
fn: __getCheckoutTransaction_impl,
|
|
2616
|
+
functionName: "getCheckoutTransaction",
|
|
2617
|
+
getCore: () => {
|
|
2618
|
+
try {
|
|
2619
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2620
|
+
} catch {
|
|
2621
|
+
return;
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
});
|
|
2379
2625
|
|
|
2380
2626
|
//#endregion
|
|
2381
2627
|
//#region src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts
|
|
@@ -2399,6 +2645,18 @@ const getCheckoutTransactionQuote = async ({ fromTokenAddress, slippage, transac
|
|
|
2399
2645
|
xDynamicCheckoutSessionToken: sessionToken
|
|
2400
2646
|
});
|
|
2401
2647
|
};
|
|
2648
|
+
const __getCheckoutTransactionQuote_impl = getCheckoutTransactionQuote;
|
|
2649
|
+
const __getCheckoutTransactionQuote_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2650
|
+
fn: __getCheckoutTransactionQuote_impl,
|
|
2651
|
+
functionName: "getCheckoutTransactionQuote",
|
|
2652
|
+
getCore: () => {
|
|
2653
|
+
try {
|
|
2654
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2655
|
+
} catch {
|
|
2656
|
+
return;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
});
|
|
2402
2660
|
|
|
2403
2661
|
//#endregion
|
|
2404
2662
|
//#region src/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.ts
|
|
@@ -2420,6 +2678,18 @@ const prepareCheckoutTransaction = async ({ transactionId }, client = require_In
|
|
|
2420
2678
|
xDynamicCheckoutSessionToken: sessionToken
|
|
2421
2679
|
});
|
|
2422
2680
|
};
|
|
2681
|
+
const __prepareCheckoutTransaction_impl = prepareCheckoutTransaction;
|
|
2682
|
+
const __prepareCheckoutTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2683
|
+
fn: __prepareCheckoutTransaction_impl,
|
|
2684
|
+
functionName: "prepareCheckoutTransaction",
|
|
2685
|
+
getCore: () => {
|
|
2686
|
+
try {
|
|
2687
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2688
|
+
} catch {
|
|
2689
|
+
return;
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
});
|
|
2423
2693
|
|
|
2424
2694
|
//#endregion
|
|
2425
2695
|
//#region src/modules/wallets/utils/assertWalletProviderMethodDefined/assertWalletProviderMethodDefined.ts
|
|
@@ -2468,7 +2738,7 @@ const SWAP_SUPPORTED_CHAINS = [
|
|
|
2468
2738
|
*/
|
|
2469
2739
|
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2470
2740
|
if (!SWAP_SUPPORTED_CHAINS.includes(walletAccount.chain)) throw new require_InvalidParamError.InvalidParamError(`Chain ${walletAccount.chain} is not supported for swap transactions`);
|
|
2471
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
2741
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
2472
2742
|
assertWalletProviderMethodDefined(walletProvider, "executeSwapTransaction");
|
|
2473
2743
|
const requiredNetworkId = signingPayload.chainId;
|
|
2474
2744
|
if (requiredNetworkId && walletProvider.switchActiveNetwork) {
|
|
@@ -2482,6 +2752,18 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
|
|
|
2482
2752
|
});
|
|
2483
2753
|
return { transactionHash };
|
|
2484
2754
|
};
|
|
2755
|
+
const __executeSwapTransaction_impl = executeSwapTransaction;
|
|
2756
|
+
const __executeSwapTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2757
|
+
fn: __executeSwapTransaction_impl,
|
|
2758
|
+
functionName: "executeSwapTransaction",
|
|
2759
|
+
getCore: () => {
|
|
2760
|
+
try {
|
|
2761
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2762
|
+
} catch {
|
|
2763
|
+
return;
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
});
|
|
2485
2767
|
|
|
2486
2768
|
//#endregion
|
|
2487
2769
|
//#region src/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.ts
|
|
@@ -2500,18 +2782,30 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
|
|
|
2500
2782
|
* @instrumented
|
|
2501
2783
|
*/
|
|
2502
2784
|
const submitCheckoutTransaction = async ({ onStepChange, transactionId, walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2503
|
-
const
|
|
2504
|
-
require_InvalidParamError.assertDefined(
|
|
2505
|
-
const { transactionHash } = await
|
|
2785
|
+
const signingPayload = (await __prepareCheckoutTransaction_wrapped({ transactionId }, client)).quote?.signingPayload;
|
|
2786
|
+
require_InvalidParamError.assertDefined(signingPayload, "No signing payload returned from prepare — quote may be missing transaction data");
|
|
2787
|
+
const { transactionHash } = await __executeSwapTransaction_wrapped({
|
|
2506
2788
|
onStepChange,
|
|
2507
|
-
signingPayload
|
|
2789
|
+
signingPayload,
|
|
2508
2790
|
walletAccount
|
|
2509
|
-
});
|
|
2510
|
-
return
|
|
2791
|
+
}, client);
|
|
2792
|
+
return __broadcastCheckoutTransaction_wrapped({
|
|
2511
2793
|
transactionId,
|
|
2512
2794
|
txHash: transactionHash
|
|
2513
2795
|
}, client);
|
|
2514
2796
|
};
|
|
2797
|
+
const __submitCheckoutTransaction_impl = submitCheckoutTransaction;
|
|
2798
|
+
const __submitCheckoutTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2799
|
+
fn: __submitCheckoutTransaction_impl,
|
|
2800
|
+
functionName: "submitCheckoutTransaction",
|
|
2801
|
+
getCore: () => {
|
|
2802
|
+
try {
|
|
2803
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2804
|
+
} catch {
|
|
2805
|
+
return;
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
});
|
|
2515
2809
|
|
|
2516
2810
|
//#endregion
|
|
2517
2811
|
//#region src/modules/checkout/utils/requiresConversion/requiresConversion.ts
|
|
@@ -2535,6 +2829,18 @@ const requiresConversion = async ({ transaction }, client = require_InvalidParam
|
|
|
2535
2829
|
require_InvalidParamError.assertDefined(checkout, "Could not find checkout associated with transaction.");
|
|
2536
2830
|
return !checkout.settlementConfig.settlements.some((settlement) => settlement.chainName === transaction.fromChainName && settlement.chainId === transaction.fromChainId && settlement.tokenAddress === transaction.fromToken);
|
|
2537
2831
|
};
|
|
2832
|
+
const __requiresConversion_impl = requiresConversion;
|
|
2833
|
+
const __requiresConversion_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2834
|
+
fn: __requiresConversion_impl,
|
|
2835
|
+
functionName: "requiresConversion",
|
|
2836
|
+
getCore: () => {
|
|
2837
|
+
try {
|
|
2838
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2839
|
+
} catch {
|
|
2840
|
+
return;
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
});
|
|
2538
2844
|
|
|
2539
2845
|
//#endregion
|
|
2540
2846
|
//#region src/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.ts
|
|
@@ -2543,11 +2849,23 @@ const DEVICE_REGISTRATION_TOKEN_HEADER = "x-dynamic-device-registration-token";
|
|
|
2543
2849
|
const completeDeviceRegistration = async ({ deviceToken }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2544
2850
|
require_InvalidParamError.assertDefined(deviceToken, "deviceToken is required");
|
|
2545
2851
|
const core = require_InvalidParamError.getCore(client);
|
|
2546
|
-
const response = await require_InvalidParamError.
|
|
2547
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
2852
|
+
const response = await require_InvalidParamError.__createApiClient_wrapped({ headers: { [DEVICE_REGISTRATION_TOKEN_HEADER]: deviceToken } }, client).deviceRegistration({ environmentId: core.environmentId });
|
|
2853
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
2548
2854
|
require_getVerifiedCredentialForWalletAccount.emitEvent({ event: "deviceRegistrationCompleted" }, client);
|
|
2549
2855
|
return response;
|
|
2550
2856
|
};
|
|
2857
|
+
const __completeDeviceRegistration_impl = completeDeviceRegistration;
|
|
2858
|
+
const __completeDeviceRegistration_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2859
|
+
fn: __completeDeviceRegistration_impl,
|
|
2860
|
+
functionName: "completeDeviceRegistration",
|
|
2861
|
+
getCore: () => {
|
|
2862
|
+
try {
|
|
2863
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2864
|
+
} catch {
|
|
2865
|
+
return;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
});
|
|
2551
2869
|
|
|
2552
2870
|
//#endregion
|
|
2553
2871
|
//#region src/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.ts
|
|
@@ -2572,6 +2890,18 @@ const getDeviceRegistrationTokenFromUrl = ({ url }) => {
|
|
|
2572
2890
|
if (!deviceRegistrationToken || deviceRegistrationToken.trim() === "") throw new InvalidDeviceRegistrationRedirectError();
|
|
2573
2891
|
return deviceRegistrationToken;
|
|
2574
2892
|
};
|
|
2893
|
+
const __getDeviceRegistrationTokenFromUrl_impl = getDeviceRegistrationTokenFromUrl;
|
|
2894
|
+
const __getDeviceRegistrationTokenFromUrl_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2895
|
+
fn: __getDeviceRegistrationTokenFromUrl_impl,
|
|
2896
|
+
functionName: "getDeviceRegistrationTokenFromUrl",
|
|
2897
|
+
getCore: () => {
|
|
2898
|
+
try {
|
|
2899
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2900
|
+
} catch {
|
|
2901
|
+
return;
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
});
|
|
2575
2905
|
|
|
2576
2906
|
//#endregion
|
|
2577
2907
|
//#region src/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.ts
|
|
@@ -2586,19 +2916,31 @@ const getDeviceRegistrationTokenFromUrl = ({ url }) => {
|
|
|
2586
2916
|
*/
|
|
2587
2917
|
const detectDeviceRegistrationRedirect = ({ url }) => {
|
|
2588
2918
|
try {
|
|
2589
|
-
|
|
2919
|
+
__getDeviceRegistrationTokenFromUrl_wrapped({ url });
|
|
2590
2920
|
return true;
|
|
2591
2921
|
} catch {
|
|
2592
2922
|
return false;
|
|
2593
2923
|
}
|
|
2594
2924
|
};
|
|
2925
|
+
const __detectDeviceRegistrationRedirect_impl = detectDeviceRegistrationRedirect;
|
|
2926
|
+
const __detectDeviceRegistrationRedirect_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2927
|
+
fn: __detectDeviceRegistrationRedirect_impl,
|
|
2928
|
+
functionName: "detectDeviceRegistrationRedirect",
|
|
2929
|
+
getCore: () => {
|
|
2930
|
+
try {
|
|
2931
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2932
|
+
} catch {
|
|
2933
|
+
return;
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
});
|
|
2595
2937
|
|
|
2596
2938
|
//#endregion
|
|
2597
2939
|
//#region src/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.ts
|
|
2598
2940
|
/** @instrumented */
|
|
2599
2941
|
const getRegisteredDevices = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
2600
2942
|
const core = require_InvalidParamError.getCore(client);
|
|
2601
|
-
const apiClient = require_InvalidParamError.
|
|
2943
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
2602
2944
|
try {
|
|
2603
2945
|
return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
|
|
2604
2946
|
} catch (error) {
|
|
@@ -2610,6 +2952,18 @@ const getRegisteredDevices = async (client = require_InvalidParamError.getDefaul
|
|
|
2610
2952
|
throw error;
|
|
2611
2953
|
}
|
|
2612
2954
|
};
|
|
2955
|
+
const __getRegisteredDevices_impl = getRegisteredDevices;
|
|
2956
|
+
const __getRegisteredDevices_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2957
|
+
fn: __getRegisteredDevices_impl,
|
|
2958
|
+
functionName: "getRegisteredDevices",
|
|
2959
|
+
getCore: () => {
|
|
2960
|
+
try {
|
|
2961
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2962
|
+
} catch {
|
|
2963
|
+
return;
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
});
|
|
2613
2967
|
|
|
2614
2968
|
//#endregion
|
|
2615
2969
|
//#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
|
|
@@ -2630,9 +2984,21 @@ const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("dev
|
|
|
2630
2984
|
/** @instrumented */
|
|
2631
2985
|
const revokeAllRegisteredDevices = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
2632
2986
|
const core = require_InvalidParamError.getCore(client);
|
|
2633
|
-
await require_InvalidParamError.
|
|
2634
|
-
await
|
|
2635
|
-
};
|
|
2987
|
+
await require_InvalidParamError.__createApiClient_wrapped({}, client).deleteAllDeviceRegistrations({ environmentId: core.environmentId });
|
|
2988
|
+
await __logout_wrapped(client);
|
|
2989
|
+
};
|
|
2990
|
+
const __revokeAllRegisteredDevices_impl = revokeAllRegisteredDevices;
|
|
2991
|
+
const __revokeAllRegisteredDevices_wrapped = require_InvalidParamError.instrumentFunction({
|
|
2992
|
+
fn: __revokeAllRegisteredDevices_impl,
|
|
2993
|
+
functionName: "revokeAllRegisteredDevices",
|
|
2994
|
+
getCore: () => {
|
|
2995
|
+
try {
|
|
2996
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
2997
|
+
} catch {
|
|
2998
|
+
return;
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
});
|
|
2636
3002
|
|
|
2637
3003
|
//#endregion
|
|
2638
3004
|
//#region src/modules/deviceRegistration/revokeRegisteredDevice/revokeRegisteredDevice.ts
|
|
@@ -2640,11 +3006,23 @@ const revokeAllRegisteredDevices = async (client = require_InvalidParamError.get
|
|
|
2640
3006
|
const revokeRegisteredDevice = async ({ deviceRegistrationId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2641
3007
|
require_InvalidParamError.assertDefined(deviceRegistrationId, "deviceRegistrationId is required");
|
|
2642
3008
|
const core = require_InvalidParamError.getCore(client);
|
|
2643
|
-
if ((await require_InvalidParamError.
|
|
3009
|
+
if ((await require_InvalidParamError.__createApiClient_wrapped({}, client).deleteDeviceRegistration({
|
|
2644
3010
|
deviceRegistrationId,
|
|
2645
3011
|
environmentId: core.environmentId
|
|
2646
|
-
})).currentDeviceRevoked) await
|
|
3012
|
+
})).currentDeviceRevoked) await __logout_wrapped(client);
|
|
2647
3013
|
};
|
|
3014
|
+
const __revokeRegisteredDevice_impl = revokeRegisteredDevice;
|
|
3015
|
+
const __revokeRegisteredDevice_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3016
|
+
fn: __revokeRegisteredDevice_impl,
|
|
3017
|
+
functionName: "revokeRegisteredDevice",
|
|
3018
|
+
getCore: () => {
|
|
3019
|
+
try {
|
|
3020
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3021
|
+
} catch {
|
|
3022
|
+
return;
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
});
|
|
2648
3026
|
|
|
2649
3027
|
//#endregion
|
|
2650
3028
|
//#region src/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.ts
|
|
@@ -2680,6 +3058,18 @@ const addCoinbaseOnrampOrderEventListener = ({ listener }, client = require_Inva
|
|
|
2680
3058
|
window.removeEventListener("message", handleMessageEvent);
|
|
2681
3059
|
};
|
|
2682
3060
|
};
|
|
3061
|
+
const __addCoinbaseOnrampOrderEventListener_impl = addCoinbaseOnrampOrderEventListener;
|
|
3062
|
+
const __addCoinbaseOnrampOrderEventListener_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3063
|
+
fn: __addCoinbaseOnrampOrderEventListener_impl,
|
|
3064
|
+
functionName: "addCoinbaseOnrampOrderEventListener",
|
|
3065
|
+
getCore: () => {
|
|
3066
|
+
try {
|
|
3067
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3068
|
+
} catch {
|
|
3069
|
+
return;
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
});
|
|
2683
3073
|
|
|
2684
3074
|
//#endregion
|
|
2685
3075
|
//#region src/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.ts
|
|
@@ -2732,6 +3122,18 @@ const getMissingVerificationForCoinbaseOnrampOrder = ({ paymentMethod }, client
|
|
|
2732
3122
|
});
|
|
2733
3123
|
return fieldsMissingVerification;
|
|
2734
3124
|
};
|
|
3125
|
+
const __getMissingVerificationForCoinbaseOnrampOrder_impl = getMissingVerificationForCoinbaseOnrampOrder;
|
|
3126
|
+
const __getMissingVerificationForCoinbaseOnrampOrder_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3127
|
+
fn: __getMissingVerificationForCoinbaseOnrampOrder_impl,
|
|
3128
|
+
functionName: "getMissingVerificationForCoinbaseOnrampOrder",
|
|
3129
|
+
getCore: () => {
|
|
3130
|
+
try {
|
|
3131
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3132
|
+
} catch {
|
|
3133
|
+
return;
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
});
|
|
2735
3137
|
|
|
2736
3138
|
//#endregion
|
|
2737
3139
|
//#region src/modules/funding/coinbase/utils/validateUserCredentialsForCoinbaseOnrampOrder/validateUserCredentialsForCoinbaseOnrampOrder.ts
|
|
@@ -2739,7 +3141,7 @@ const getMissingVerificationForCoinbaseOnrampOrder = ({ paymentMethod }, client
|
|
|
2739
3141
|
const validateUserCredentialsForCoinbaseOnrampOrder = (client) => {
|
|
2740
3142
|
const { user } = client;
|
|
2741
3143
|
require_InvalidParamError.assertDefined(user, "User is not authenticated");
|
|
2742
|
-
const fieldsMissingVerification =
|
|
3144
|
+
const fieldsMissingVerification = __getMissingVerificationForCoinbaseOnrampOrder_wrapped({ paymentMethod: "GUEST_CHECKOUT_APPLE_PAY" }, client);
|
|
2743
3145
|
if (fieldsMissingVerification.find((field) => field.field === "email")) throw new MissingUserVerificationError({
|
|
2744
3146
|
informationToVerify: "email",
|
|
2745
3147
|
message: "User must have a verified email to create a Coinbase onramp order"
|
|
@@ -2770,7 +3172,7 @@ const validateUserCredentialsForCoinbaseOnrampOrder = (client) => {
|
|
|
2770
3172
|
const createCoinbaseOnrampOrder = async (orderParams, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2771
3173
|
const user = validateUserCredentialsForCoinbaseOnrampOrder(client);
|
|
2772
3174
|
const core = require_InvalidParamError.getCore(client);
|
|
2773
|
-
const apiClient = require_InvalidParamError.
|
|
3175
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client);
|
|
2774
3176
|
const { isSandbox, ...restOrderParams } = orderParams;
|
|
2775
3177
|
const orderResponse = await apiClient.createCoinbaseOnrampOrder({
|
|
2776
3178
|
coinbaseOnrampOrderCreateRequest: {
|
|
@@ -2789,6 +3191,18 @@ const createCoinbaseOnrampOrder = async (orderParams, client = require_InvalidPa
|
|
|
2789
3191
|
}
|
|
2790
3192
|
};
|
|
2791
3193
|
};
|
|
3194
|
+
const __createCoinbaseOnrampOrder_impl = createCoinbaseOnrampOrder;
|
|
3195
|
+
const __createCoinbaseOnrampOrder_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3196
|
+
fn: __createCoinbaseOnrampOrder_impl,
|
|
3197
|
+
functionName: "createCoinbaseOnrampOrder",
|
|
3198
|
+
getCore: () => {
|
|
3199
|
+
try {
|
|
3200
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3201
|
+
} catch {
|
|
3202
|
+
return;
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
});
|
|
2792
3206
|
|
|
2793
3207
|
//#endregion
|
|
2794
3208
|
//#region src/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.ts
|
|
@@ -2802,11 +3216,23 @@ const createCoinbaseOnrampOrder = async (orderParams, client = require_InvalidPa
|
|
|
2802
3216
|
*/
|
|
2803
3217
|
const getCoinbaseBuyUrl = async (buyUrlParams, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2804
3218
|
const core = require_InvalidParamError.getCore(client);
|
|
2805
|
-
return await require_InvalidParamError.
|
|
3219
|
+
return await require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client).generateCoinbaseOnrampBuyUrl({
|
|
2806
3220
|
coinbaseOnrampGetBuyUrlRequest: buyUrlParams,
|
|
2807
3221
|
environmentId: core.environmentId
|
|
2808
3222
|
});
|
|
2809
3223
|
};
|
|
3224
|
+
const __getCoinbaseBuyUrl_impl = getCoinbaseBuyUrl;
|
|
3225
|
+
const __getCoinbaseBuyUrl_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3226
|
+
fn: __getCoinbaseBuyUrl_impl,
|
|
3227
|
+
functionName: "getCoinbaseBuyUrl",
|
|
3228
|
+
getCore: () => {
|
|
3229
|
+
try {
|
|
3230
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3231
|
+
} catch {
|
|
3232
|
+
return;
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
});
|
|
2810
3236
|
|
|
2811
3237
|
//#endregion
|
|
2812
3238
|
//#region src/modules/funding/cryptoDotCom/createCryptoDotComPayment/createCryptoDotComPayment.ts
|
|
@@ -2820,7 +3246,7 @@ const getCoinbaseBuyUrl = async (buyUrlParams, client = require_InvalidParamErro
|
|
|
2820
3246
|
*/
|
|
2821
3247
|
const createCryptoDotComPayment = async (paymentParams, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2822
3248
|
const core = require_InvalidParamError.getCore(client);
|
|
2823
|
-
return await require_InvalidParamError.
|
|
3249
|
+
return await require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client).createCryptoDotComPayment({
|
|
2824
3250
|
cryptoDotComPaymentCreateRequest: {
|
|
2825
3251
|
...paymentParams,
|
|
2826
3252
|
chain: paymentParams.chain
|
|
@@ -2828,6 +3254,18 @@ const createCryptoDotComPayment = async (paymentParams, client = require_Invalid
|
|
|
2828
3254
|
environmentId: core.environmentId
|
|
2829
3255
|
});
|
|
2830
3256
|
};
|
|
3257
|
+
const __createCryptoDotComPayment_impl = createCryptoDotComPayment;
|
|
3258
|
+
const __createCryptoDotComPayment_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3259
|
+
fn: __createCryptoDotComPayment_impl,
|
|
3260
|
+
functionName: "createCryptoDotComPayment",
|
|
3261
|
+
getCore: () => {
|
|
3262
|
+
try {
|
|
3263
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3264
|
+
} catch {
|
|
3265
|
+
return;
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
});
|
|
2831
3269
|
|
|
2832
3270
|
//#endregion
|
|
2833
3271
|
//#region src/modules/funding/kraken/createKrakenExchangeTransfer/createKrakenExchangeTransfer.ts
|
|
@@ -2841,7 +3279,7 @@ const createCryptoDotComPayment = async (paymentParams, client = require_Invalid
|
|
|
2841
3279
|
*/
|
|
2842
3280
|
const createKrakenExchangeTransfer = async (transferParams, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2843
3281
|
const core = require_InvalidParamError.getCore(client);
|
|
2844
|
-
const apiClient = require_InvalidParamError.
|
|
3282
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client);
|
|
2845
3283
|
const { accountId, ...createExchangeTransferRequest } = transferParams;
|
|
2846
3284
|
return await apiClient.postExchangeAccountTransfer({
|
|
2847
3285
|
accountId,
|
|
@@ -2850,6 +3288,18 @@ const createKrakenExchangeTransfer = async (transferParams, client = require_Inv
|
|
|
2850
3288
|
exchangeKey: _dynamic_labs_sdk_api_core.ExchangeKeyEnum.Kraken
|
|
2851
3289
|
});
|
|
2852
3290
|
};
|
|
3291
|
+
const __createKrakenExchangeTransfer_impl = createKrakenExchangeTransfer;
|
|
3292
|
+
const __createKrakenExchangeTransfer_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3293
|
+
fn: __createKrakenExchangeTransfer_impl,
|
|
3294
|
+
functionName: "createKrakenExchangeTransfer",
|
|
3295
|
+
getCore: () => {
|
|
3296
|
+
try {
|
|
3297
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3298
|
+
} catch {
|
|
3299
|
+
return;
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
});
|
|
2853
3303
|
|
|
2854
3304
|
//#endregion
|
|
2855
3305
|
//#region src/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.ts
|
|
@@ -2863,13 +3313,25 @@ const createKrakenExchangeTransfer = async (transferParams, client = require_Inv
|
|
|
2863
3313
|
*/
|
|
2864
3314
|
const getKrakenAccounts = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2865
3315
|
const core = require_InvalidParamError.getCore(client);
|
|
2866
|
-
return await require_InvalidParamError.
|
|
3316
|
+
return await require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client).getUserAccounts({
|
|
2867
3317
|
chainName: params?.chainName,
|
|
2868
3318
|
environmentId: core.environmentId,
|
|
2869
3319
|
exchangeKey: _dynamic_labs_sdk_api_core.ExchangeKeyEnum.Kraken,
|
|
2870
3320
|
networkId: params?.networkId
|
|
2871
3321
|
});
|
|
2872
3322
|
};
|
|
3323
|
+
const __getKrakenAccounts_impl = getKrakenAccounts;
|
|
3324
|
+
const __getKrakenAccounts_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3325
|
+
fn: __getKrakenAccounts_impl,
|
|
3326
|
+
functionName: "getKrakenAccounts",
|
|
3327
|
+
getCore: () => {
|
|
3328
|
+
try {
|
|
3329
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3330
|
+
} catch {
|
|
3331
|
+
return;
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
});
|
|
2873
3335
|
|
|
2874
3336
|
//#endregion
|
|
2875
3337
|
//#region src/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.ts
|
|
@@ -2882,11 +3344,23 @@ const getKrakenAccounts = async (params, client = require_InvalidParamError.getD
|
|
|
2882
3344
|
*/
|
|
2883
3345
|
const getKrakenWhitelistedAddresses = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
2884
3346
|
const core = require_InvalidParamError.getCore(client);
|
|
2885
|
-
return await require_InvalidParamError.
|
|
3347
|
+
return await require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client).getExchangeTransferDestinations({
|
|
2886
3348
|
environmentId: core.environmentId,
|
|
2887
3349
|
exchangeKey: _dynamic_labs_sdk_api_core.ExchangeKeyEnum.Kraken
|
|
2888
3350
|
});
|
|
2889
3351
|
};
|
|
3352
|
+
const __getKrakenWhitelistedAddresses_impl = getKrakenWhitelistedAddresses;
|
|
3353
|
+
const __getKrakenWhitelistedAddresses_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3354
|
+
fn: __getKrakenWhitelistedAddresses_impl,
|
|
3355
|
+
functionName: "getKrakenWhitelistedAddresses",
|
|
3356
|
+
getCore: () => {
|
|
3357
|
+
try {
|
|
3358
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3359
|
+
} catch {
|
|
3360
|
+
return;
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
});
|
|
2890
3364
|
|
|
2891
3365
|
//#endregion
|
|
2892
3366
|
//#region src/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.ts
|
|
@@ -2900,6 +3374,18 @@ const getKrakenWhitelistedAddresses = async (client = require_InvalidParamError.
|
|
|
2900
3374
|
const waitForClientInitialized = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
2901
3375
|
await require_InvalidParamError.getCore(client).initTrack.waitForAll();
|
|
2902
3376
|
};
|
|
3377
|
+
const __waitForClientInitialized_impl = waitForClientInitialized;
|
|
3378
|
+
const __waitForClientInitialized_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3379
|
+
fn: __waitForClientInitialized_impl,
|
|
3380
|
+
functionName: "waitForClientInitialized",
|
|
3381
|
+
getCore: () => {
|
|
3382
|
+
try {
|
|
3383
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3384
|
+
} catch {
|
|
3385
|
+
return;
|
|
3386
|
+
}
|
|
3387
|
+
}
|
|
3388
|
+
});
|
|
2903
3389
|
|
|
2904
3390
|
//#endregion
|
|
2905
3391
|
//#region src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts
|
|
@@ -2914,6 +3400,18 @@ const waitForClientInitialized = async (client = require_InvalidParamError.getDe
|
|
|
2914
3400
|
const setInstrumentationEnabled = (enabled, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2915
3401
|
require_InvalidParamError.getCore(client).instrumentation.setEnabled(enabled);
|
|
2916
3402
|
};
|
|
3403
|
+
const __setInstrumentationEnabled_impl = setInstrumentationEnabled;
|
|
3404
|
+
const __setInstrumentationEnabled_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3405
|
+
fn: __setInstrumentationEnabled_impl,
|
|
3406
|
+
functionName: "setInstrumentationEnabled",
|
|
3407
|
+
getCore: () => {
|
|
3408
|
+
try {
|
|
3409
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3410
|
+
} catch {
|
|
3411
|
+
return;
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
});
|
|
2917
3415
|
|
|
2918
3416
|
//#endregion
|
|
2919
3417
|
//#region src/modules/legacyWalletBook/getWalletBookCdnUrl/getWalletBookCdnUrl.ts
|
|
@@ -2973,7 +3471,7 @@ const fetchWithTimeout = async (client) => {
|
|
|
2973
3471
|
/**
|
|
2974
3472
|
* The schema to store the cached wallet book data.
|
|
2975
3473
|
*/
|
|
2976
|
-
const walletBookCacheStorageKeySchema = require_getNetworkProviderFromNetworkId.
|
|
3474
|
+
const walletBookCacheStorageKeySchema = require_getNetworkProviderFromNetworkId.__createStorageKeySchema_wrapped({
|
|
2977
3475
|
key: "legacyWalletBookCache",
|
|
2978
3476
|
schema: zod_mini.object({
|
|
2979
3477
|
groups: zod_mini.record(zod_mini.string(), zod_mini.any()),
|
|
@@ -3218,7 +3716,7 @@ const getChainFromWalletSchema = ({ wallet, walletKey }) => {
|
|
|
3218
3716
|
const firstChain = wallet.chains[0];
|
|
3219
3717
|
const chainPrefix = extractChainPrefix({ chainIdentifier: firstChain });
|
|
3220
3718
|
try {
|
|
3221
|
-
return require_InvalidParamError.
|
|
3719
|
+
return require_InvalidParamError.__getChainFromVerifiedCredentialChain_wrapped(chainPrefix);
|
|
3222
3720
|
} catch {}
|
|
3223
3721
|
}
|
|
3224
3722
|
if (walletKey) {
|
|
@@ -3298,6 +3796,18 @@ const transformWalletBook = ({ walletBook }) => {
|
|
|
3298
3796
|
const getWalletConnectCatalog = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
3299
3797
|
return transformWalletBook({ walletBook: await fetchLegacyWalletBook(client) });
|
|
3300
3798
|
};
|
|
3799
|
+
const __getWalletConnectCatalog_impl = getWalletConnectCatalog;
|
|
3800
|
+
const __getWalletConnectCatalog_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3801
|
+
fn: __getWalletConnectCatalog_impl,
|
|
3802
|
+
functionName: "getWalletConnectCatalog",
|
|
3803
|
+
getCore: () => {
|
|
3804
|
+
try {
|
|
3805
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3806
|
+
} catch {
|
|
3807
|
+
return;
|
|
3808
|
+
}
|
|
3809
|
+
}
|
|
3810
|
+
});
|
|
3301
3811
|
|
|
3302
3812
|
//#endregion
|
|
3303
3813
|
//#region src/modules/wallets/walletProvider/extractChainFromNormalizedName/extractChainFromNormalizedName.ts
|
|
@@ -3336,7 +3846,7 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3336
3846
|
let walletProviderName = normalizedWalletNameWithChain.toLowerCase();
|
|
3337
3847
|
if (walletProviderName.endsWith(chain.toLowerCase())) walletProviderName = walletProviderName.slice(0, -chain.length);
|
|
3338
3848
|
walletProviderName = walletProviderName.replace(/wallet/g, "");
|
|
3339
|
-
const walletConnectCatalog = await
|
|
3849
|
+
const walletConnectCatalog = await __getWalletConnectCatalog_wrapped(client);
|
|
3340
3850
|
for (const [walletKey, wallet] of Object.entries(walletConnectCatalog.wallets)) {
|
|
3341
3851
|
if (wallet.chain !== chain) continue;
|
|
3342
3852
|
const walletKeyLower = walletKey.toLowerCase();
|
|
@@ -3344,6 +3854,18 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3344
3854
|
if (walletKeyLower.includes(walletProviderName) || walletNameLower.includes(walletProviderName)) return wallet;
|
|
3345
3855
|
}
|
|
3346
3856
|
};
|
|
3857
|
+
const __getWalletConnectCatalogWalletByWalletProviderKey_impl = getWalletConnectCatalogWalletByWalletProviderKey;
|
|
3858
|
+
const __getWalletConnectCatalogWalletByWalletProviderKey_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3859
|
+
fn: __getWalletConnectCatalogWalletByWalletProviderKey_impl,
|
|
3860
|
+
functionName: "getWalletConnectCatalogWalletByWalletProviderKey",
|
|
3861
|
+
getCore: () => {
|
|
3862
|
+
try {
|
|
3863
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3864
|
+
} catch {
|
|
3865
|
+
return;
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3868
|
+
});
|
|
3347
3869
|
|
|
3348
3870
|
//#endregion
|
|
3349
3871
|
//#region src/modules/user/updateUser/updateUser.ts
|
|
@@ -3363,11 +3885,11 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3363
3885
|
*/
|
|
3364
3886
|
const updateUser = async ({ userFields }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
3365
3887
|
const core = require_InvalidParamError.getCore(client);
|
|
3366
|
-
const response = await require_InvalidParamError.
|
|
3888
|
+
const response = await require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client).updateSelf({
|
|
3367
3889
|
environmentId: core.environmentId,
|
|
3368
3890
|
userFields
|
|
3369
3891
|
});
|
|
3370
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
3892
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
3371
3893
|
if (response.emailVerification) return {
|
|
3372
3894
|
email: response.emailVerification.email,
|
|
3373
3895
|
verificationUUID: response.emailVerification.verificationUUID
|
|
@@ -3379,6 +3901,19 @@ const updateUser = async ({ userFields }, client = require_InvalidParamError.get
|
|
|
3379
3901
|
verificationUUID: response.smsVerification.verificationUUID
|
|
3380
3902
|
};
|
|
3381
3903
|
};
|
|
3904
|
+
const __updateUser_impl = updateUser;
|
|
3905
|
+
const __updateUser_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3906
|
+
fn: __updateUser_impl,
|
|
3907
|
+
functionName: "updateUser",
|
|
3908
|
+
getCore: () => {
|
|
3909
|
+
try {
|
|
3910
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3911
|
+
} catch {
|
|
3912
|
+
return;
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3915
|
+
redactAll: true
|
|
3916
|
+
});
|
|
3382
3917
|
|
|
3383
3918
|
//#endregion
|
|
3384
3919
|
//#region src/modules/mfa/acknowledgeRecoveryCodes/acknowledgeRecoveryCodes.ts
|
|
@@ -3393,8 +3928,20 @@ const updateUser = async ({ userFields }, client = require_InvalidParamError.get
|
|
|
3393
3928
|
* @instrumented
|
|
3394
3929
|
*/
|
|
3395
3930
|
const acknowledgeRecoveryCodes = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
3396
|
-
return
|
|
3931
|
+
return __updateUser_wrapped({ userFields: { mfaBackupCodeAcknowledgement: _dynamic_labs_sdk_api_core.MfaBackupCodeAcknowledgement.Complete } }, client);
|
|
3397
3932
|
};
|
|
3933
|
+
const __acknowledgeRecoveryCodes_impl = acknowledgeRecoveryCodes;
|
|
3934
|
+
const __acknowledgeRecoveryCodes_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3935
|
+
fn: __acknowledgeRecoveryCodes_impl,
|
|
3936
|
+
functionName: "acknowledgeRecoveryCodes",
|
|
3937
|
+
getCore: () => {
|
|
3938
|
+
try {
|
|
3939
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3940
|
+
} catch {
|
|
3941
|
+
return;
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
});
|
|
3398
3945
|
|
|
3399
3946
|
//#endregion
|
|
3400
3947
|
//#region src/modules/mfa/authenticateMfaRecoveryCode/authenticateMfaRecoveryCode.ts
|
|
@@ -3413,7 +3960,7 @@ const acknowledgeRecoveryCodes = async (client = require_InvalidParamError.getDe
|
|
|
3413
3960
|
*/
|
|
3414
3961
|
const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, requestedScopes }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
3415
3962
|
const core = require_InvalidParamError.getCore(client);
|
|
3416
|
-
const apiClient = require_InvalidParamError.
|
|
3963
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
3417
3964
|
try {
|
|
3418
3965
|
const response = await apiClient.authMfaRecovery({
|
|
3419
3966
|
environmentId: core.environmentId,
|
|
@@ -3423,7 +3970,7 @@ const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, reques
|
|
|
3423
3970
|
requestedScopes
|
|
3424
3971
|
}
|
|
3425
3972
|
});
|
|
3426
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
3973
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
3427
3974
|
require_getVerifiedCredentialForWalletAccount.emitEvent({
|
|
3428
3975
|
args: { mfaToken: response.mfaToken },
|
|
3429
3976
|
event: "mfaCompletionSuccess"
|
|
@@ -3437,13 +3984,25 @@ const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, reques
|
|
|
3437
3984
|
throw error;
|
|
3438
3985
|
}
|
|
3439
3986
|
};
|
|
3987
|
+
const __authenticateMfaRecoveryCode_impl = authenticateMfaRecoveryCode;
|
|
3988
|
+
const __authenticateMfaRecoveryCode_wrapped = require_InvalidParamError.instrumentFunction({
|
|
3989
|
+
fn: __authenticateMfaRecoveryCode_impl,
|
|
3990
|
+
functionName: "authenticateMfaRecoveryCode",
|
|
3991
|
+
getCore: () => {
|
|
3992
|
+
try {
|
|
3993
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
3994
|
+
} catch {
|
|
3995
|
+
return;
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
});
|
|
3440
3999
|
|
|
3441
4000
|
//#endregion
|
|
3442
4001
|
//#region src/modules/auth/passkeys/getPasskeyAuthenticationOptions/getPasskeyAuthenticationOptions.ts
|
|
3443
4002
|
/** @not-instrumented */
|
|
3444
4003
|
const getPasskeyAuthenticationOptions = async ({ relatedOriginRpId } = {}, client) => {
|
|
3445
4004
|
const core = require_InvalidParamError.getCore(client);
|
|
3446
|
-
return await require_InvalidParamError.
|
|
4005
|
+
return await require_InvalidParamError.__createApiClient_wrapped({}, client).getPasskeyAuthenticationOptions({
|
|
3447
4006
|
environmentId: core.environmentId,
|
|
3448
4007
|
relatedOriginRpId
|
|
3449
4008
|
});
|
|
@@ -3454,7 +4013,7 @@ const getPasskeyAuthenticationOptions = async ({ relatedOriginRpId } = {}, clien
|
|
|
3454
4013
|
/** @not-instrumented */
|
|
3455
4014
|
const serverAuthenticatePasskey = async ({ authentication, createMfaToken, requestedScopes }, client) => {
|
|
3456
4015
|
const core = require_InvalidParamError.getCore(client);
|
|
3457
|
-
return await require_InvalidParamError.
|
|
4016
|
+
return await require_InvalidParamError.__createApiClient_wrapped({}, client).authenticateMfaPasskeyDevice({
|
|
3458
4017
|
environmentId: core.environmentId,
|
|
3459
4018
|
passkeyAuthRequest: {
|
|
3460
4019
|
...authentication,
|
|
@@ -3503,7 +4062,7 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
|
|
|
3503
4062
|
createMfaToken,
|
|
3504
4063
|
requestedScopes
|
|
3505
4064
|
}, client);
|
|
3506
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
4065
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
3507
4066
|
require_getVerifiedCredentialForWalletAccount.emitEvent({
|
|
3508
4067
|
args: { mfaToken: response.mfaToken },
|
|
3509
4068
|
event: "mfaCompletionSuccess"
|
|
@@ -3517,6 +4076,18 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
|
|
|
3517
4076
|
throw error;
|
|
3518
4077
|
}
|
|
3519
4078
|
};
|
|
4079
|
+
const __authenticatePasskeyMFA_impl = authenticatePasskeyMFA;
|
|
4080
|
+
const __authenticatePasskeyMFA_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4081
|
+
fn: __authenticatePasskeyMFA_impl,
|
|
4082
|
+
functionName: "authenticatePasskeyMFA",
|
|
4083
|
+
getCore: () => {
|
|
4084
|
+
try {
|
|
4085
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4086
|
+
} catch {
|
|
4087
|
+
return;
|
|
4088
|
+
}
|
|
4089
|
+
}
|
|
4090
|
+
});
|
|
3520
4091
|
|
|
3521
4092
|
//#endregion
|
|
3522
4093
|
//#region src/modules/mfa/authenticateTotpMfaDevice/authenticateTotpMfaDevice.ts
|
|
@@ -3536,7 +4107,7 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
|
|
|
3536
4107
|
*/
|
|
3537
4108
|
const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions, requestedScopes }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
3538
4109
|
const core = require_InvalidParamError.getCore(client);
|
|
3539
|
-
const apiClient = require_InvalidParamError.
|
|
4110
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
3540
4111
|
try {
|
|
3541
4112
|
const response = await apiClient.authMfaTotpDevice({
|
|
3542
4113
|
environmentId: core.environmentId,
|
|
@@ -3547,7 +4118,7 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
3547
4118
|
requestedScopes
|
|
3548
4119
|
}
|
|
3549
4120
|
});
|
|
3550
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
4121
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
3551
4122
|
require_getVerifiedCredentialForWalletAccount.emitEvent({
|
|
3552
4123
|
args: {
|
|
3553
4124
|
deviceId,
|
|
@@ -3567,6 +4138,18 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
3567
4138
|
throw error;
|
|
3568
4139
|
}
|
|
3569
4140
|
};
|
|
4141
|
+
const __authenticateTotpMfaDevice_impl = authenticateTotpMfaDevice;
|
|
4142
|
+
const __authenticateTotpMfaDevice_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4143
|
+
fn: __authenticateTotpMfaDevice_impl,
|
|
4144
|
+
functionName: "authenticateTotpMfaDevice",
|
|
4145
|
+
getCore: () => {
|
|
4146
|
+
try {
|
|
4147
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4148
|
+
} catch {
|
|
4149
|
+
return;
|
|
4150
|
+
}
|
|
4151
|
+
}
|
|
4152
|
+
});
|
|
3570
4153
|
|
|
3571
4154
|
//#endregion
|
|
3572
4155
|
//#region src/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.ts
|
|
@@ -3582,8 +4165,20 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
3582
4165
|
*/
|
|
3583
4166
|
const createNewMfaRecoveryCodes = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
3584
4167
|
const core = require_InvalidParamError.getCore(client);
|
|
3585
|
-
return require_InvalidParamError.
|
|
4168
|
+
return require_InvalidParamError.__createApiClient_wrapped({}, client).createNewRecoveryCodes({ environmentId: core.environmentId });
|
|
3586
4169
|
};
|
|
4170
|
+
const __createNewMfaRecoveryCodes_impl = createNewMfaRecoveryCodes;
|
|
4171
|
+
const __createNewMfaRecoveryCodes_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4172
|
+
fn: __createNewMfaRecoveryCodes_impl,
|
|
4173
|
+
functionName: "createNewMfaRecoveryCodes",
|
|
4174
|
+
getCore: () => {
|
|
4175
|
+
try {
|
|
4176
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4177
|
+
} catch {
|
|
4178
|
+
return;
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
4181
|
+
});
|
|
3587
4182
|
|
|
3588
4183
|
//#endregion
|
|
3589
4184
|
//#region src/modules/mfa/deleteMfaDevice/deleteMfaDevice.ts
|
|
@@ -3604,16 +4199,28 @@ const createNewMfaRecoveryCodes = async (client = require_InvalidParamError.getD
|
|
|
3604
4199
|
const deleteMfaDevice = async ({ deviceId, mfaAuthToken }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
3605
4200
|
const core = require_InvalidParamError.getCore(client);
|
|
3606
4201
|
require_InvalidParamError.assertDefined(deviceId, "deviceId is required");
|
|
3607
|
-
if (!require_InvalidParamError.
|
|
4202
|
+
if (!require_InvalidParamError.__getElevatedAccessToken_wrapped({
|
|
3608
4203
|
consume: false,
|
|
3609
4204
|
scope: _dynamic_labs_sdk_api_core.TokenScope.Credentialunlink
|
|
3610
4205
|
}, client)) require_InvalidParamError.assertDefined(mfaAuthToken, "mfaAuthToken is required");
|
|
3611
|
-
return require_InvalidParamError.
|
|
4206
|
+
return require_InvalidParamError.__createApiClient_wrapped({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.Credentialunlink }, client).deleteMfaDevice({
|
|
3612
4207
|
environmentId: core.environmentId,
|
|
3613
4208
|
mfaDeviceId: deviceId,
|
|
3614
4209
|
xMfaAuthToken: mfaAuthToken ?? ""
|
|
3615
4210
|
});
|
|
3616
4211
|
};
|
|
4212
|
+
const __deleteMfaDevice_impl = deleteMfaDevice;
|
|
4213
|
+
const __deleteMfaDevice_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4214
|
+
fn: __deleteMfaDevice_impl,
|
|
4215
|
+
functionName: "deleteMfaDevice",
|
|
4216
|
+
getCore: () => {
|
|
4217
|
+
try {
|
|
4218
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4219
|
+
} catch {
|
|
4220
|
+
return;
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
});
|
|
3617
4224
|
|
|
3618
4225
|
//#endregion
|
|
3619
4226
|
//#region src/modules/mfa/getMfaDevices/getMfaDevices.ts
|
|
@@ -3629,9 +4236,21 @@ const deleteMfaDevice = async ({ deviceId, mfaAuthToken }, client = require_Inva
|
|
|
3629
4236
|
*/
|
|
3630
4237
|
const getMfaDevices = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
3631
4238
|
const core = require_InvalidParamError.getCore(client);
|
|
3632
|
-
const { devices } = await require_InvalidParamError.
|
|
4239
|
+
const { devices } = await require_InvalidParamError.__createApiClient_wrapped({}, client).getUserMfaDevices({ environmentId: core.environmentId });
|
|
3633
4240
|
return devices;
|
|
3634
4241
|
};
|
|
4242
|
+
const __getMfaDevices_impl = getMfaDevices;
|
|
4243
|
+
const __getMfaDevices_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4244
|
+
fn: __getMfaDevices_impl,
|
|
4245
|
+
functionName: "getMfaDevices",
|
|
4246
|
+
getCore: () => {
|
|
4247
|
+
try {
|
|
4248
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4249
|
+
} catch {
|
|
4250
|
+
return;
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
});
|
|
3635
4254
|
|
|
3636
4255
|
//#endregion
|
|
3637
4256
|
//#region src/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.ts
|
|
@@ -3649,8 +4268,20 @@ const getMfaDevices = async (client = require_InvalidParamError.getDefaultClient
|
|
|
3649
4268
|
*/
|
|
3650
4269
|
const getMfaRecoveryCodes = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
3651
4270
|
const core = require_InvalidParamError.getCore(client);
|
|
3652
|
-
return require_InvalidParamError.
|
|
4271
|
+
return require_InvalidParamError.__createApiClient_wrapped({}, client).getRecoveryCodes({ environmentId: core.environmentId });
|
|
3653
4272
|
};
|
|
4273
|
+
const __getMfaRecoveryCodes_impl = getMfaRecoveryCodes;
|
|
4274
|
+
const __getMfaRecoveryCodes_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4275
|
+
fn: __getMfaRecoveryCodes_impl,
|
|
4276
|
+
functionName: "getMfaRecoveryCodes",
|
|
4277
|
+
getCore: () => {
|
|
4278
|
+
try {
|
|
4279
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4280
|
+
} catch {
|
|
4281
|
+
return;
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
});
|
|
3654
4285
|
|
|
3655
4286
|
//#endregion
|
|
3656
4287
|
//#region src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts
|
|
@@ -3703,8 +4334,20 @@ const isUserMissingMfaAuth = (client = require_InvalidParamError.getDefaultClien
|
|
|
3703
4334
|
*/
|
|
3704
4335
|
const registerTotpMfaDevice = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
3705
4336
|
const core = require_InvalidParamError.getCore(client);
|
|
3706
|
-
return require_InvalidParamError.
|
|
4337
|
+
return require_InvalidParamError.__createApiClient_wrapped({ elevatedAccessTokenScope: _dynamic_labs_sdk_api_core.TokenScope.Credentiallink }, client).registerTotpMfaDevice({ environmentId: core.environmentId });
|
|
3707
4338
|
};
|
|
4339
|
+
const __registerTotpMfaDevice_impl = registerTotpMfaDevice;
|
|
4340
|
+
const __registerTotpMfaDevice_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4341
|
+
fn: __registerTotpMfaDevice_impl,
|
|
4342
|
+
functionName: "registerTotpMfaDevice",
|
|
4343
|
+
getCore: () => {
|
|
4344
|
+
try {
|
|
4345
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4346
|
+
} catch {
|
|
4347
|
+
return;
|
|
4348
|
+
}
|
|
4349
|
+
}
|
|
4350
|
+
});
|
|
3708
4351
|
|
|
3709
4352
|
//#endregion
|
|
3710
4353
|
//#region src/modules/mfa/setDefaultMfaDevice/setDefaultMfaDevice.ts
|
|
@@ -3721,13 +4364,25 @@ const registerTotpMfaDevice = async (client = require_InvalidParamError.getDefau
|
|
|
3721
4364
|
*/
|
|
3722
4365
|
const setDefaultMfaDevice = async ({ deviceId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
3723
4366
|
const core = require_InvalidParamError.getCore(client);
|
|
3724
|
-
const apiClient = require_InvalidParamError.
|
|
4367
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
3725
4368
|
require_InvalidParamError.assertDefined(deviceId, "deviceId is required");
|
|
3726
4369
|
return apiClient.updateUserMfaDevice({
|
|
3727
4370
|
environmentId: core.environmentId,
|
|
3728
4371
|
mfaDeviceId: deviceId
|
|
3729
4372
|
});
|
|
3730
4373
|
};
|
|
4374
|
+
const __setDefaultMfaDevice_impl = setDefaultMfaDevice;
|
|
4375
|
+
const __setDefaultMfaDevice_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4376
|
+
fn: __setDefaultMfaDevice_impl,
|
|
4377
|
+
functionName: "setDefaultMfaDevice",
|
|
4378
|
+
getCore: () => {
|
|
4379
|
+
try {
|
|
4380
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4381
|
+
} catch {
|
|
4382
|
+
return;
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
});
|
|
3731
4386
|
|
|
3732
4387
|
//#endregion
|
|
3733
4388
|
//#region src/modules/otp/sendEmailOTP/sendEmailOTP.ts
|
|
@@ -3745,9 +4400,9 @@ const setDefaultMfaDevice = async ({ deviceId }, client = require_InvalidParamEr
|
|
|
3745
4400
|
*/
|
|
3746
4401
|
const sendEmailOTP = async ({ email }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
3747
4402
|
const core = require_InvalidParamError.getCore(client);
|
|
3748
|
-
const { verificationUUID } = await require_InvalidParamError.
|
|
4403
|
+
const { verificationUUID } = await require_InvalidParamError.__createApiClient_wrapped({}, client).createEmailVerification({
|
|
3749
4404
|
emailVerificationCreateRequest: {
|
|
3750
|
-
captchaToken: require_getNetworkProviderFromNetworkId.
|
|
4405
|
+
captchaToken: require_getNetworkProviderFromNetworkId.__consumeCaptchaToken_wrapped(client),
|
|
3751
4406
|
email
|
|
3752
4407
|
},
|
|
3753
4408
|
environmentId: core.environmentId
|
|
@@ -3757,6 +4412,19 @@ const sendEmailOTP = async ({ email }, client = require_InvalidParamError.getDef
|
|
|
3757
4412
|
verificationUUID
|
|
3758
4413
|
};
|
|
3759
4414
|
};
|
|
4415
|
+
const __sendEmailOTP_impl = sendEmailOTP;
|
|
4416
|
+
const __sendEmailOTP_wrapped = require_InvalidParamError.instrumentFunction({
|
|
4417
|
+
fn: __sendEmailOTP_impl,
|
|
4418
|
+
functionName: "sendEmailOTP",
|
|
4419
|
+
getCore: () => {
|
|
4420
|
+
try {
|
|
4421
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
4422
|
+
} catch {
|
|
4423
|
+
return;
|
|
4424
|
+
}
|
|
4425
|
+
},
|
|
4426
|
+
redactAll: true
|
|
4427
|
+
});
|
|
3760
4428
|
|
|
3761
4429
|
//#endregion
|
|
3762
4430
|
//#region src/modules/otp/sendSmsOTP/supportedCountries.ts
|
|
@@ -4694,12 +5362,12 @@ const supportedCountries = {
|
|
|
4694
5362
|
*/
|
|
4695
5363
|
const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
4696
5364
|
const core = require_InvalidParamError.getCore(client);
|
|
4697
|
-
const apiClient = require_InvalidParamError.
|
|
5365
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
4698
5366
|
const phoneCountryCode = supportedCountries[isoCountryCode].code;
|
|
4699
5367
|
const { verificationUUID } = await apiClient.createSmsVerification({
|
|
4700
5368
|
environmentId: core.environmentId,
|
|
4701
5369
|
smsVerificationCreateRequest: {
|
|
4702
|
-
captchaToken: require_getNetworkProviderFromNetworkId.
|
|
5370
|
+
captchaToken: require_getNetworkProviderFromNetworkId.__consumeCaptchaToken_wrapped(client),
|
|
4703
5371
|
isoCountryCode,
|
|
4704
5372
|
phoneCountryCode,
|
|
4705
5373
|
phoneNumber
|
|
@@ -4712,13 +5380,26 @@ const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = require_Inva
|
|
|
4712
5380
|
verificationUUID
|
|
4713
5381
|
};
|
|
4714
5382
|
};
|
|
5383
|
+
const __sendSmsOTP_impl = sendSmsOTP;
|
|
5384
|
+
const __sendSmsOTP_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5385
|
+
fn: __sendSmsOTP_impl,
|
|
5386
|
+
functionName: "sendSmsOTP",
|
|
5387
|
+
getCore: () => {
|
|
5388
|
+
try {
|
|
5389
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5390
|
+
} catch {
|
|
5391
|
+
return;
|
|
5392
|
+
}
|
|
5393
|
+
},
|
|
5394
|
+
redactAll: true
|
|
5395
|
+
});
|
|
4715
5396
|
|
|
4716
5397
|
//#endregion
|
|
4717
5398
|
//#region src/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.ts
|
|
4718
5399
|
/** @not-instrumented */
|
|
4719
5400
|
const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, client) => {
|
|
4720
5401
|
const core = require_InvalidParamError.getCore(client);
|
|
4721
|
-
const apiClient = require_InvalidParamError.
|
|
5402
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
4722
5403
|
const verifyRequest = {
|
|
4723
5404
|
verificationToken,
|
|
4724
5405
|
verificationUUID: otpVerification.verificationUUID
|
|
@@ -4738,7 +5419,7 @@ const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, cl
|
|
|
4738
5419
|
/** @not-instrumented */
|
|
4739
5420
|
const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requestedScopes }, client) => {
|
|
4740
5421
|
const core = require_InvalidParamError.getCore(client);
|
|
4741
|
-
const apiClient = require_InvalidParamError.
|
|
5422
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
4742
5423
|
const verifyRequest = {
|
|
4743
5424
|
verificationToken,
|
|
4744
5425
|
verificationUUID: otpVerification.verificationUUID
|
|
@@ -4779,9 +5460,21 @@ const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }
|
|
|
4779
5460
|
otpVerification,
|
|
4780
5461
|
verificationToken
|
|
4781
5462
|
}, client);
|
|
4782
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
5463
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
4783
5464
|
return response;
|
|
4784
5465
|
};
|
|
5466
|
+
const __verifyOTP_impl = verifyOTP;
|
|
5467
|
+
const __verifyOTP_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5468
|
+
fn: __verifyOTP_impl,
|
|
5469
|
+
functionName: "verifyOTP",
|
|
5470
|
+
getCore: () => {
|
|
5471
|
+
try {
|
|
5472
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5473
|
+
} catch {
|
|
5474
|
+
return;
|
|
5475
|
+
}
|
|
5476
|
+
}
|
|
5477
|
+
});
|
|
4785
5478
|
|
|
4786
5479
|
//#endregion
|
|
4787
5480
|
//#region src/modules/swap/getSwapQuote/getSwapQuote.ts
|
|
@@ -4795,7 +5488,7 @@ const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }
|
|
|
4795
5488
|
*/
|
|
4796
5489
|
const getSwapQuote = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
4797
5490
|
const core = require_InvalidParamError.getCore(client);
|
|
4798
|
-
const apiClient = require_InvalidParamError.
|
|
5491
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
4799
5492
|
if (!params.from.amount && !params.to.amount) throw new require_InvalidParamError.InvalidParamError("Either from.amount or to.amount is required");
|
|
4800
5493
|
if (params.from.amount && params.to.amount) throw new require_InvalidParamError.InvalidParamError("Only one of from.amount or to.amount is allowed");
|
|
4801
5494
|
return await apiClient.swapQuote({
|
|
@@ -4817,6 +5510,18 @@ const getSwapQuote = async (params, client = require_InvalidParamError.getDefaul
|
|
|
4817
5510
|
}
|
|
4818
5511
|
});
|
|
4819
5512
|
};
|
|
5513
|
+
const __getSwapQuote_impl = getSwapQuote;
|
|
5514
|
+
const __getSwapQuote_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5515
|
+
fn: __getSwapQuote_impl,
|
|
5516
|
+
functionName: "getSwapQuote",
|
|
5517
|
+
getCore: () => {
|
|
5518
|
+
try {
|
|
5519
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5520
|
+
} catch {
|
|
5521
|
+
return;
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
});
|
|
4820
5525
|
|
|
4821
5526
|
//#endregion
|
|
4822
5527
|
//#region src/modules/swap/getSwapStatus/getSwapStatus.ts
|
|
@@ -4830,7 +5535,7 @@ const getSwapQuote = async (params, client = require_InvalidParamError.getDefaul
|
|
|
4830
5535
|
*/
|
|
4831
5536
|
const getSwapStatus = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
4832
5537
|
const core = require_InvalidParamError.getCore(client);
|
|
4833
|
-
const apiClient = require_InvalidParamError.
|
|
5538
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
4834
5539
|
let from;
|
|
4835
5540
|
if (params.from) from = {
|
|
4836
5541
|
chainId: params.from.networkId,
|
|
@@ -4861,6 +5566,18 @@ const getSwapStatus = async (params, client = require_InvalidParamError.getDefau
|
|
|
4861
5566
|
});
|
|
4862
5567
|
}
|
|
4863
5568
|
};
|
|
5569
|
+
const __getSwapStatus_impl = getSwapStatus;
|
|
5570
|
+
const __getSwapStatus_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5571
|
+
fn: __getSwapStatus_impl,
|
|
5572
|
+
functionName: "getSwapStatus",
|
|
5573
|
+
getCore: () => {
|
|
5574
|
+
try {
|
|
5575
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5576
|
+
} catch {
|
|
5577
|
+
return;
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
});
|
|
4864
5581
|
|
|
4865
5582
|
//#endregion
|
|
4866
5583
|
//#region src/modules/user/deleteUser/deleteUser.ts
|
|
@@ -4876,9 +5593,21 @@ const getSwapStatus = async (params, client = require_InvalidParamError.getDefau
|
|
|
4876
5593
|
*/
|
|
4877
5594
|
const deleteUser = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
4878
5595
|
const core = require_InvalidParamError.getCore(client);
|
|
4879
|
-
await require_InvalidParamError.
|
|
4880
|
-
await
|
|
4881
|
-
};
|
|
5596
|
+
await require_InvalidParamError.__createApiClient_wrapped({ includeMfaToken: true }, client).hardDeleteUser({ environmentId: core.environmentId });
|
|
5597
|
+
await __logout_wrapped(client);
|
|
5598
|
+
};
|
|
5599
|
+
const __deleteUser_impl = deleteUser;
|
|
5600
|
+
const __deleteUser_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5601
|
+
fn: __deleteUser_impl,
|
|
5602
|
+
functionName: "deleteUser",
|
|
5603
|
+
getCore: () => {
|
|
5604
|
+
try {
|
|
5605
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5606
|
+
} catch {
|
|
5607
|
+
return;
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
});
|
|
4882
5611
|
|
|
4883
5612
|
//#endregion
|
|
4884
5613
|
//#region src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts
|
|
@@ -4916,13 +5645,25 @@ const isUserOnboardingComplete = (client = require_InvalidParamError.getDefaultC
|
|
|
4916
5645
|
*/
|
|
4917
5646
|
const refreshUser = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
4918
5647
|
const core = require_InvalidParamError.getCore(client);
|
|
4919
|
-
const apiClient = require_InvalidParamError.
|
|
5648
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
4920
5649
|
const previousState = { ...core.state.get() };
|
|
4921
5650
|
const user = await apiClient.getAuthenticatedUser({ environmentId: core.environmentId });
|
|
4922
5651
|
core.state.set({ user });
|
|
4923
5652
|
require_getVerifiedCredentialForWalletAccount.checkAndRaiseWalletAccountsChangedEvent({ previousState }, client);
|
|
4924
5653
|
return user;
|
|
4925
5654
|
};
|
|
5655
|
+
const __refreshUser_impl = refreshUser;
|
|
5656
|
+
const __refreshUser_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5657
|
+
fn: __refreshUser_impl,
|
|
5658
|
+
functionName: "refreshUser",
|
|
5659
|
+
getCore: () => {
|
|
5660
|
+
try {
|
|
5661
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5662
|
+
} catch {
|
|
5663
|
+
return;
|
|
5664
|
+
}
|
|
5665
|
+
}
|
|
5666
|
+
});
|
|
4926
5667
|
|
|
4927
5668
|
//#endregion
|
|
4928
5669
|
//#region src/modules/wallets/assertWalletAccountSigningAvailability/assertWalletAccountSigningAvailability.ts
|
|
@@ -4942,7 +5683,7 @@ const refreshUser = async (client = require_InvalidParamError.getDefaultClient()
|
|
|
4942
5683
|
* @not-instrumented
|
|
4943
5684
|
*/
|
|
4944
5685
|
const assertWalletAccountSigningAvailability = async ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
4945
|
-
const { addresses } = await require_getVerifiedCredentialForWalletAccount.
|
|
5686
|
+
const { addresses } = await require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).getConnectedAddresses();
|
|
4946
5687
|
if (addresses.length > 0 && !addresses.includes(walletAccount.address)) throw new WalletAccountNotSelectedError({
|
|
4947
5688
|
expectedAddress: walletAccount.address,
|
|
4948
5689
|
selectedAddress: addresses[0]
|
|
@@ -4966,13 +5707,25 @@ const assertWalletAccountSigningAvailability = async ({ walletAccount }, client
|
|
|
4966
5707
|
* @instrumented
|
|
4967
5708
|
*/
|
|
4968
5709
|
const confirmTransaction = async ({ walletAccount, transactionHash }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
4969
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
5710
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
4970
5711
|
assertWalletProviderMethodDefined(walletProvider, "confirmTransaction");
|
|
4971
5712
|
await walletProvider.confirmTransaction({
|
|
4972
5713
|
transactionHash,
|
|
4973
5714
|
walletAccount
|
|
4974
5715
|
});
|
|
4975
5716
|
};
|
|
5717
|
+
const __confirmTransaction_impl = confirmTransaction;
|
|
5718
|
+
const __confirmTransaction_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5719
|
+
fn: __confirmTransaction_impl,
|
|
5720
|
+
functionName: "confirmTransaction",
|
|
5721
|
+
getCore: () => {
|
|
5722
|
+
try {
|
|
5723
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5724
|
+
} catch {
|
|
5725
|
+
return;
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5728
|
+
});
|
|
4976
5729
|
|
|
4977
5730
|
//#endregion
|
|
4978
5731
|
//#region src/utils/isMobile/isMobile.ts
|
|
@@ -5030,7 +5783,7 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
|
|
|
5030
5783
|
const walletProvider = require_getVerifiedCredentialForWalletAccount.getWalletProviderByKey({ walletProviderKey }, client);
|
|
5031
5784
|
assertWalletProviderMethodDefined(walletProvider, "connect");
|
|
5032
5785
|
const { addresses } = await walletProvider.connect();
|
|
5033
|
-
const currentAddresses = require_getVerifiedCredentialForWalletAccount.
|
|
5786
|
+
const currentAddresses = require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).map(({ address }) => address);
|
|
5034
5787
|
const mainAddress = addresses?.length ? addresses[0].address : null;
|
|
5035
5788
|
/**
|
|
5036
5789
|
* This error is thrown in case the wallet has no addresses connected
|
|
@@ -5054,12 +5807,24 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
|
|
|
5054
5807
|
};
|
|
5055
5808
|
if (currentAddresses.includes(mainAddress)) return walletAccount;
|
|
5056
5809
|
if (addToDynamicWalletAccounts) {
|
|
5057
|
-
require_getNetworkProviderFromNetworkId.
|
|
5810
|
+
require_getNetworkProviderFromNetworkId.__setUnverifiedWalletAccounts_wrapped({ unverifiedWalletAccountsToUpdate: [walletAccount] }, client);
|
|
5058
5811
|
require_getVerifiedCredentialForWalletAccount.emitWalletAccountsChangedEvent(client);
|
|
5059
|
-
require_getNetworkProviderFromNetworkId.
|
|
5812
|
+
require_getNetworkProviderFromNetworkId.__createVisit_wrapped({ walletAccount }, client);
|
|
5060
5813
|
}
|
|
5061
5814
|
return walletAccount;
|
|
5062
5815
|
};
|
|
5816
|
+
const __connectWithWalletProvider_impl = connectWithWalletProvider;
|
|
5817
|
+
const __connectWithWalletProvider_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5818
|
+
fn: __connectWithWalletProvider_impl,
|
|
5819
|
+
functionName: "connectWithWalletProvider",
|
|
5820
|
+
getCore: () => {
|
|
5821
|
+
try {
|
|
5822
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5823
|
+
} catch {
|
|
5824
|
+
return;
|
|
5825
|
+
}
|
|
5826
|
+
}
|
|
5827
|
+
});
|
|
5063
5828
|
|
|
5064
5829
|
//#endregion
|
|
5065
5830
|
//#region src/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/formatSignatureForHardwareWallet.ts
|
|
@@ -5090,14 +5855,14 @@ const getChainIdForAccountVerification = async ({ walletProvider }) => {
|
|
|
5090
5855
|
//#endregion
|
|
5091
5856
|
//#region src/modules/wallets/utils/getSignInMessage/getSignInMessage.ts
|
|
5092
5857
|
/** @not-instrumented */
|
|
5093
|
-
const getSignInMessage = async ({ walletAccount }, client) => {
|
|
5858
|
+
const getSignInMessage = async ({ nonce: nonceOverride, walletAccount }, client) => {
|
|
5094
5859
|
const core = require_InvalidParamError.getCore(client);
|
|
5095
5860
|
const universalLink = core.metadata?.universalLink;
|
|
5096
5861
|
require_InvalidParamError.assertDefined(universalLink, "Universal link is not set");
|
|
5097
5862
|
const url = new URL(universalLink);
|
|
5098
5863
|
const domain = url.host;
|
|
5099
|
-
const nonce = await require_InvalidParamError.
|
|
5100
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
5864
|
+
const nonce = nonceOverride ?? await require_InvalidParamError.__getNonce_wrapped(client);
|
|
5865
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5101
5866
|
if (walletProvider.chain === "STARK")
|
|
5102
5867
|
/**
|
|
5103
5868
|
* Starknet requires the strings to be 31 chars long
|
|
@@ -5108,7 +5873,7 @@ const getSignInMessage = async ({ walletAccount }, client) => {
|
|
|
5108
5873
|
domain: domain.substring(0, 31),
|
|
5109
5874
|
nonce
|
|
5110
5875
|
});
|
|
5111
|
-
const statement = require_getNetworkProviderFromNetworkId.
|
|
5876
|
+
const statement = require_getNetworkProviderFromNetworkId.__createSignInMessageStatement_wrapped(client);
|
|
5112
5877
|
return await require_getNetworkProviderFromNetworkId.formatSignInMessage({
|
|
5113
5878
|
address: walletAccount.address,
|
|
5114
5879
|
blockchainName: require_InvalidParamError.CHAINS_INFO_MAP[walletProvider.chain].blockchainName,
|
|
@@ -5136,9 +5901,12 @@ const getSignInMessage = async ({ walletAccount }, client) => {
|
|
|
5136
5901
|
* @instrumented
|
|
5137
5902
|
*/
|
|
5138
5903
|
const proveWalletAccountOwnership = async ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5139
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
5904
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5140
5905
|
assertWalletProviderMethodDefined(walletProvider, "signMessage");
|
|
5141
|
-
const messageToSign = await getSignInMessage({
|
|
5906
|
+
const messageToSign = await getSignInMessage({
|
|
5907
|
+
nonce: walletProvider.getConnectProofNonce?.(),
|
|
5908
|
+
walletAccount
|
|
5909
|
+
}, client);
|
|
5142
5910
|
const { signature } = await walletProvider.signMessage({
|
|
5143
5911
|
message: messageToSign,
|
|
5144
5912
|
walletAccount
|
|
@@ -5148,6 +5916,18 @@ const proveWalletAccountOwnership = async ({ walletAccount }, client = require_I
|
|
|
5148
5916
|
signature
|
|
5149
5917
|
};
|
|
5150
5918
|
};
|
|
5919
|
+
const __proveWalletAccountOwnership_impl = proveWalletAccountOwnership;
|
|
5920
|
+
const __proveWalletAccountOwnership_wrapped = require_InvalidParamError.instrumentFunction({
|
|
5921
|
+
fn: __proveWalletAccountOwnership_impl,
|
|
5922
|
+
functionName: "proveWalletAccountOwnership",
|
|
5923
|
+
getCore: () => {
|
|
5924
|
+
try {
|
|
5925
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
5926
|
+
} catch {
|
|
5927
|
+
return;
|
|
5928
|
+
}
|
|
5929
|
+
}
|
|
5930
|
+
});
|
|
5151
5931
|
|
|
5152
5932
|
//#endregion
|
|
5153
5933
|
//#region src/modules/wallets/utils/isSameAddress/isSameAddress.ts
|
|
@@ -5159,14 +5939,14 @@ const isSameAddress = (left, right, chain) => require_getVerifiedCredentialForWa
|
|
|
5159
5939
|
/** @not-instrumented */
|
|
5160
5940
|
const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfer, requestedScopes }, client) => {
|
|
5161
5941
|
if (walletAccount.verifiedCredentialId) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
|
|
5162
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
5163
|
-
const { messageToSign, signature } = await
|
|
5942
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5943
|
+
const { messageToSign, signature } = await __proveWalletAccountOwnership_wrapped({ walletAccount }, client);
|
|
5164
5944
|
const formattedSignature = walletAccount.hardwareWalletVendor ? formatSignatureForHardwareWallet({
|
|
5165
5945
|
hardwareWalletVendor: walletAccount.hardwareWalletVendor,
|
|
5166
5946
|
signature
|
|
5167
5947
|
}) : signature;
|
|
5168
5948
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
5169
|
-
const response = await require_getNetworkProviderFromNetworkId.
|
|
5949
|
+
const response = await require_getNetworkProviderFromNetworkId.__verifyMessageSignatureOwnership_wrapped({
|
|
5170
5950
|
addressesWithTypes: walletAccount.addressesWithTypes,
|
|
5171
5951
|
chain: walletAccount.chain,
|
|
5172
5952
|
isTransfer,
|
|
@@ -5180,17 +5960,17 @@ const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfe
|
|
|
5180
5960
|
}, client);
|
|
5181
5961
|
const walletVerifiedCredential = response.user?.verifiedCredentials.find((verifiedCredential) => isSameAddress(verifiedCredential.address ?? "", walletAccount.address, walletAccount.chain));
|
|
5182
5962
|
require_InvalidParamError.assertDefined(walletVerifiedCredential, `After verifying, still unable to find verified wallet credential for wallet account ${walletAccount.address} on chain ${walletAccount.chain}`);
|
|
5183
|
-
require_getNetworkProviderFromNetworkId.
|
|
5963
|
+
require_getNetworkProviderFromNetworkId.__updateWalletProviderKeysForVerifiedCredentials_wrapped({ keysToUpdate: { [walletVerifiedCredential.id]: walletProvider.key } }, client);
|
|
5184
5964
|
/**
|
|
5185
5965
|
* Adds the user with the new wallet verified credential
|
|
5186
5966
|
* This will add the new verified wallet account to the client`s state
|
|
5187
5967
|
*/
|
|
5188
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
5968
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response }, client);
|
|
5189
5969
|
/**
|
|
5190
5970
|
* Remove the now verified wallet account from the unverified wallet accounts
|
|
5191
5971
|
*/
|
|
5192
|
-
require_getNetworkProviderFromNetworkId.
|
|
5193
|
-
const verifiedWalletAccount = require_getVerifiedCredentialForWalletAccount.
|
|
5972
|
+
require_getNetworkProviderFromNetworkId.__removeUnverifiedWalletAccount_wrapped({ unverifiedWalletAccount: walletAccount }, client);
|
|
5973
|
+
const verifiedWalletAccount = require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).find(({ address }) => isSameAddress(address, walletAccount.address, walletAccount.chain));
|
|
5194
5974
|
require_InvalidParamError.assertDefined(verifiedWalletAccount, `Unable to find wallet account ${walletAccount.address} on chain ${walletAccount.chain} for verified credential ${walletVerifiedCredential.id}`);
|
|
5195
5975
|
return verifiedWalletAccount;
|
|
5196
5976
|
};
|
|
@@ -5217,6 +5997,18 @@ const verifyWalletAccount = async ({ walletAccount, requestedScopes }, client =
|
|
|
5217
5997
|
walletAccount
|
|
5218
5998
|
}, client);
|
|
5219
5999
|
};
|
|
6000
|
+
const __verifyWalletAccount_impl = verifyWalletAccount;
|
|
6001
|
+
const __verifyWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6002
|
+
fn: __verifyWalletAccount_impl,
|
|
6003
|
+
functionName: "verifyWalletAccount",
|
|
6004
|
+
getCore: () => {
|
|
6005
|
+
try {
|
|
6006
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6007
|
+
} catch {
|
|
6008
|
+
return;
|
|
6009
|
+
}
|
|
6010
|
+
}
|
|
6011
|
+
});
|
|
5220
6012
|
|
|
5221
6013
|
//#endregion
|
|
5222
6014
|
//#region src/modules/wallets/walletProvider/isDeeplinkWalletProvider/isDeeplinkWalletProvider.ts
|
|
@@ -5254,18 +6046,30 @@ const isDeeplinkWalletProvider = ({ walletProvider }) => walletProvider.walletPr
|
|
|
5254
6046
|
const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareWalletVendor }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5255
6047
|
const walletProvider = require_getVerifiedCredentialForWalletAccount.getWalletProviderByKey({ walletProviderKey }, client);
|
|
5256
6048
|
if (isMobile() && isDeeplinkWalletProvider({ walletProvider })) throw new DeeplinkConnectAndVerifyUnsupportedError({ walletProviderKey });
|
|
5257
|
-
const walletAccount = await
|
|
6049
|
+
const walletAccount = await __connectWithWalletProvider_wrapped({
|
|
5258
6050
|
addToDynamicWalletAccounts: false,
|
|
5259
6051
|
hardwareWalletVendor,
|
|
5260
6052
|
walletProviderKey
|
|
5261
6053
|
}, client);
|
|
5262
|
-
await
|
|
5263
|
-
require_getNetworkProviderFromNetworkId.
|
|
6054
|
+
await __verifyWalletAccount_wrapped({ walletAccount }, client);
|
|
6055
|
+
require_getNetworkProviderFromNetworkId.__createVisit_wrapped({
|
|
5264
6056
|
authMode: _dynamic_labs_sdk_api_core.AuthModeEnum.AndSign,
|
|
5265
6057
|
walletAccount
|
|
5266
6058
|
}, client);
|
|
5267
6059
|
return walletAccount;
|
|
5268
6060
|
};
|
|
6061
|
+
const __connectAndVerifyWithWalletProvider_impl = connectAndVerifyWithWalletProvider;
|
|
6062
|
+
const __connectAndVerifyWithWalletProvider_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6063
|
+
fn: __connectAndVerifyWithWalletProvider_impl,
|
|
6064
|
+
functionName: "connectAndVerifyWithWalletProvider",
|
|
6065
|
+
getCore: () => {
|
|
6066
|
+
try {
|
|
6067
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6068
|
+
} catch {
|
|
6069
|
+
return;
|
|
6070
|
+
}
|
|
6071
|
+
}
|
|
6072
|
+
});
|
|
5269
6073
|
|
|
5270
6074
|
//#endregion
|
|
5271
6075
|
//#region src/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.ts
|
|
@@ -5280,7 +6084,7 @@ const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareW
|
|
|
5280
6084
|
* @instrumented
|
|
5281
6085
|
*/
|
|
5282
6086
|
const getAvailableWalletProvidersData = (client = require_InvalidParamError.getDefaultClient()) => {
|
|
5283
|
-
return require_getVerifiedCredentialForWalletAccount.
|
|
6087
|
+
return require_getVerifiedCredentialForWalletAccount.__getWalletProviders_wrapped(client).filter((walletProvider) => Boolean(walletProvider.connect)).map((walletProvider) => ({
|
|
5284
6088
|
chain: walletProvider.chain,
|
|
5285
6089
|
groupKey: walletProvider.groupKey,
|
|
5286
6090
|
key: walletProvider.key,
|
|
@@ -5288,6 +6092,18 @@ const getAvailableWalletProvidersData = (client = require_InvalidParamError.getD
|
|
|
5288
6092
|
walletProviderType: walletProvider.walletProviderType
|
|
5289
6093
|
}));
|
|
5290
6094
|
};
|
|
6095
|
+
const __getAvailableWalletProvidersData_impl = getAvailableWalletProvidersData;
|
|
6096
|
+
const __getAvailableWalletProvidersData_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6097
|
+
fn: __getAvailableWalletProvidersData_impl,
|
|
6098
|
+
functionName: "getAvailableWalletProvidersData",
|
|
6099
|
+
getCore: () => {
|
|
6100
|
+
try {
|
|
6101
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6102
|
+
} catch {
|
|
6103
|
+
return;
|
|
6104
|
+
}
|
|
6105
|
+
}
|
|
6106
|
+
});
|
|
5291
6107
|
|
|
5292
6108
|
//#endregion
|
|
5293
6109
|
//#region src/modules/wallets/getConnectedAddresses/getConnectedAddresses.ts
|
|
@@ -5305,15 +6121,39 @@ const getAvailableWalletProvidersData = (client = require_InvalidParamError.getD
|
|
|
5305
6121
|
const getConnectedAddresses = ({ walletProviderKey }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5306
6122
|
return require_getVerifiedCredentialForWalletAccount.getWalletProviderByKey({ walletProviderKey }, client).getConnectedAddresses();
|
|
5307
6123
|
};
|
|
6124
|
+
const __getConnectedAddresses_impl = getConnectedAddresses;
|
|
6125
|
+
const __getConnectedAddresses_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6126
|
+
fn: __getConnectedAddresses_impl,
|
|
6127
|
+
functionName: "getConnectedAddresses",
|
|
6128
|
+
getCore: () => {
|
|
6129
|
+
try {
|
|
6130
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6131
|
+
} catch {
|
|
6132
|
+
return;
|
|
6133
|
+
}
|
|
6134
|
+
}
|
|
6135
|
+
});
|
|
5308
6136
|
|
|
5309
6137
|
//#endregion
|
|
5310
6138
|
//#region src/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.ts
|
|
5311
6139
|
/** @instrumented */
|
|
5312
6140
|
const getOwnerWalletAccountForSmartWalletAccount = ({ smartWalletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5313
|
-
const smartWalletVerifiedCredential = require_getVerifiedCredentialForWalletAccount.
|
|
6141
|
+
const smartWalletVerifiedCredential = require_getVerifiedCredentialForWalletAccount.__getVerifiedCredentialForWalletAccount_wrapped({ walletAccount: smartWalletAccount }, client);
|
|
5314
6142
|
require_InvalidParamError.assertDefined(smartWalletVerifiedCredential?.signerRefId, "Invalid smart wallet account");
|
|
5315
|
-
return require_getVerifiedCredentialForWalletAccount.
|
|
6143
|
+
return require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).find((walletAccount) => walletAccount.verifiedCredentialId === smartWalletVerifiedCredential.signerRefId);
|
|
5316
6144
|
};
|
|
6145
|
+
const __getOwnerWalletAccountForSmartWalletAccount_impl = getOwnerWalletAccountForSmartWalletAccount;
|
|
6146
|
+
const __getOwnerWalletAccountForSmartWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6147
|
+
fn: __getOwnerWalletAccountForSmartWalletAccount_impl,
|
|
6148
|
+
functionName: "getOwnerWalletAccountForSmartWalletAccount",
|
|
6149
|
+
getCore: () => {
|
|
6150
|
+
try {
|
|
6151
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6152
|
+
} catch {
|
|
6153
|
+
return;
|
|
6154
|
+
}
|
|
6155
|
+
}
|
|
6156
|
+
});
|
|
5317
6157
|
|
|
5318
6158
|
//#endregion
|
|
5319
6159
|
//#region src/modules/wallets/getWalletAccountAddressByType/getWalletAccountAddressByType.ts
|
|
@@ -5406,6 +6246,18 @@ const addNetwork = async ({ networkData, walletAccount }, client = require_Inval
|
|
|
5406
6246
|
});
|
|
5407
6247
|
return walletProvider.addNetwork({ networkData });
|
|
5408
6248
|
};
|
|
6249
|
+
const __addNetwork_impl = addNetwork;
|
|
6250
|
+
const __addNetwork_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6251
|
+
fn: __addNetwork_impl,
|
|
6252
|
+
functionName: "addNetwork",
|
|
6253
|
+
getCore: () => {
|
|
6254
|
+
try {
|
|
6255
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6256
|
+
} catch {
|
|
6257
|
+
return;
|
|
6258
|
+
}
|
|
6259
|
+
}
|
|
6260
|
+
});
|
|
5409
6261
|
|
|
5410
6262
|
//#endregion
|
|
5411
6263
|
//#region src/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.ts
|
|
@@ -5422,10 +6274,22 @@ const addNetwork = async ({ networkData, walletAccount }, client = require_Inval
|
|
|
5422
6274
|
* @instrumented
|
|
5423
6275
|
*/
|
|
5424
6276
|
const getActiveNetworkData = async ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5425
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
6277
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5426
6278
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
5427
|
-
return { networkData: require_getNetworkProviderFromNetworkId.
|
|
6279
|
+
return { networkData: require_getNetworkProviderFromNetworkId.__getNetworksData_wrapped(client).find((data) => data.networkId === networkId && data.chain === walletProvider.chain) };
|
|
5428
6280
|
};
|
|
6281
|
+
const __getActiveNetworkData_impl = getActiveNetworkData;
|
|
6282
|
+
const __getActiveNetworkData_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6283
|
+
fn: __getActiveNetworkData_impl,
|
|
6284
|
+
functionName: "getActiveNetworkData",
|
|
6285
|
+
getCore: () => {
|
|
6286
|
+
try {
|
|
6287
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6288
|
+
} catch {
|
|
6289
|
+
return;
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
});
|
|
5429
6293
|
|
|
5430
6294
|
//#endregion
|
|
5431
6295
|
//#region src/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.ts
|
|
@@ -5438,8 +6302,20 @@ const getActiveNetworkData = async ({ walletAccount }, client = require_InvalidP
|
|
|
5438
6302
|
* @instrumented
|
|
5439
6303
|
*/
|
|
5440
6304
|
const getActiveNetworkId = ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5441
|
-
return require_getVerifiedCredentialForWalletAccount.
|
|
6305
|
+
return require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).getActiveNetworkId();
|
|
5442
6306
|
};
|
|
6307
|
+
const __getActiveNetworkId_impl = getActiveNetworkId;
|
|
6308
|
+
const __getActiveNetworkId_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6309
|
+
fn: __getActiveNetworkId_impl,
|
|
6310
|
+
functionName: "getActiveNetworkId",
|
|
6311
|
+
getCore: () => {
|
|
6312
|
+
try {
|
|
6313
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6314
|
+
} catch {
|
|
6315
|
+
return;
|
|
6316
|
+
}
|
|
6317
|
+
}
|
|
6318
|
+
});
|
|
5443
6319
|
|
|
5444
6320
|
//#endregion
|
|
5445
6321
|
//#region src/modules/wallets/networks/getBalance/getBalance.ts
|
|
@@ -5455,13 +6331,25 @@ const getActiveNetworkId = ({ walletAccount }, client = require_InvalidParamErro
|
|
|
5455
6331
|
* @instrumented
|
|
5456
6332
|
*/
|
|
5457
6333
|
const getBalance = async ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5458
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
6334
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5459
6335
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
5460
|
-
return require_getNetworkProviderFromNetworkId.
|
|
6336
|
+
return require_getNetworkProviderFromNetworkId.__getNetworkProviderFromNetworkId_wrapped({
|
|
5461
6337
|
chain: walletProvider.chain,
|
|
5462
6338
|
networkId
|
|
5463
6339
|
}, client).getBalance({ address: walletAccount.address });
|
|
5464
6340
|
};
|
|
6341
|
+
const __getBalance_impl = getBalance;
|
|
6342
|
+
const __getBalance_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6343
|
+
fn: __getBalance_impl,
|
|
6344
|
+
functionName: "getBalance",
|
|
6345
|
+
getCore: () => {
|
|
6346
|
+
try {
|
|
6347
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6348
|
+
} catch {
|
|
6349
|
+
return;
|
|
6350
|
+
}
|
|
6351
|
+
}
|
|
6352
|
+
});
|
|
5465
6353
|
|
|
5466
6354
|
//#endregion
|
|
5467
6355
|
//#region src/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.ts
|
|
@@ -5479,13 +6367,25 @@ const getBalance = async ({ walletAccount }, client = require_InvalidParamError.
|
|
|
5479
6367
|
* @instrumented
|
|
5480
6368
|
*/
|
|
5481
6369
|
const getBalanceForAddress = async ({ address, chain, networkId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5482
|
-
const networkProvider = require_getNetworkProviderFromNetworkId.
|
|
6370
|
+
const networkProvider = require_getNetworkProviderFromNetworkId.__getNetworkProviderFromNetworkId_wrapped({
|
|
5483
6371
|
chain,
|
|
5484
6372
|
networkId
|
|
5485
6373
|
}, client);
|
|
5486
6374
|
require_InvalidParamError.assertDefined(networkProvider, `No network found for chain ${chain} and network id ${networkId}. Please ensure you've enabled this network in the Dashboard.`);
|
|
5487
6375
|
return networkProvider.getBalance({ address });
|
|
5488
6376
|
};
|
|
6377
|
+
const __getBalanceForAddress_impl = getBalanceForAddress;
|
|
6378
|
+
const __getBalanceForAddress_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6379
|
+
fn: __getBalanceForAddress_impl,
|
|
6380
|
+
functionName: "getBalanceForAddress",
|
|
6381
|
+
getCore: () => {
|
|
6382
|
+
try {
|
|
6383
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6384
|
+
} catch {
|
|
6385
|
+
return;
|
|
6386
|
+
}
|
|
6387
|
+
}
|
|
6388
|
+
});
|
|
5489
6389
|
|
|
5490
6390
|
//#endregion
|
|
5491
6391
|
//#region src/modules/wallets/networks/getTransactionHistory/getTransactionHistory.ts
|
|
@@ -5506,13 +6406,25 @@ const getBalanceForAddress = async ({ address, chain, networkId }, client = requ
|
|
|
5506
6406
|
*/
|
|
5507
6407
|
const getTransactionHistory = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5508
6408
|
const core = require_InvalidParamError.getCore(client);
|
|
5509
|
-
return await require_InvalidParamError.
|
|
6409
|
+
return await require_InvalidParamError.__createApiClient_wrapped({}, client).getWalletTransactions({
|
|
5510
6410
|
address: params.address,
|
|
5511
6411
|
chainName: params.chain,
|
|
5512
6412
|
environmentId: core.environmentId,
|
|
5513
6413
|
networkId: params.networkId
|
|
5514
6414
|
});
|
|
5515
6415
|
};
|
|
6416
|
+
const __getTransactionHistory_impl = getTransactionHistory;
|
|
6417
|
+
const __getTransactionHistory_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6418
|
+
fn: __getTransactionHistory_impl,
|
|
6419
|
+
functionName: "getTransactionHistory",
|
|
6420
|
+
getCore: () => {
|
|
6421
|
+
try {
|
|
6422
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6423
|
+
} catch {
|
|
6424
|
+
return;
|
|
6425
|
+
}
|
|
6426
|
+
}
|
|
6427
|
+
});
|
|
5516
6428
|
|
|
5517
6429
|
//#endregion
|
|
5518
6430
|
//#region src/modules/wallets/networks/isProgrammaticNetworkSwitchAvailable/isProgrammaticNetworkSwitchAvailable.ts
|
|
@@ -5555,6 +6467,18 @@ const switchActiveNetwork = async ({ networkId, walletAccount }, client = requir
|
|
|
5555
6467
|
});
|
|
5556
6468
|
return walletProvider.switchActiveNetwork({ networkId });
|
|
5557
6469
|
};
|
|
6470
|
+
const __switchActiveNetwork_impl = switchActiveNetwork;
|
|
6471
|
+
const __switchActiveNetwork_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6472
|
+
fn: __switchActiveNetwork_impl,
|
|
6473
|
+
functionName: "switchActiveNetwork",
|
|
6474
|
+
getCore: () => {
|
|
6475
|
+
try {
|
|
6476
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6477
|
+
} catch {
|
|
6478
|
+
return;
|
|
6479
|
+
}
|
|
6480
|
+
}
|
|
6481
|
+
});
|
|
5558
6482
|
|
|
5559
6483
|
//#endregion
|
|
5560
6484
|
//#region src/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.ts
|
|
@@ -5564,16 +6488,28 @@ const switchActiveNetwork = async ({ networkId, walletAccount }, client = requir
|
|
|
5564
6488
|
*/
|
|
5565
6489
|
const selectPrimaryWalletAccount = async ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5566
6490
|
const core = require_InvalidParamError.getCore(client);
|
|
5567
|
-
if (
|
|
5568
|
-
if (walletAccount.verifiedCredentialId) require_getVerifiedCredentialForWalletAccount.
|
|
6491
|
+
if (__getPrimaryWalletAccount_wrapped(client)?.id === walletAccount.id) return;
|
|
6492
|
+
if (walletAccount.verifiedCredentialId) require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response: await require_InvalidParamError.__createApiClient_wrapped({}, client).selectUserWallet({
|
|
5569
6493
|
environmentId: core.environmentId,
|
|
5570
6494
|
userWalletSelectionRequest: { walletId: walletAccount.verifiedCredentialId }
|
|
5571
6495
|
}) }, client);
|
|
5572
|
-
else require_getNetworkProviderFromNetworkId.
|
|
6496
|
+
else require_getNetworkProviderFromNetworkId.__setUnverifiedWalletAccounts_wrapped({ unverifiedWalletAccountsToUpdate: [{
|
|
5573
6497
|
...walletAccount,
|
|
5574
6498
|
lastSelectedAt: /* @__PURE__ */ new Date()
|
|
5575
6499
|
}] }, client);
|
|
5576
6500
|
};
|
|
6501
|
+
const __selectPrimaryWalletAccount_impl = selectPrimaryWalletAccount;
|
|
6502
|
+
const __selectPrimaryWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6503
|
+
fn: __selectPrimaryWalletAccount_impl,
|
|
6504
|
+
functionName: "selectPrimaryWalletAccount",
|
|
6505
|
+
getCore: () => {
|
|
6506
|
+
try {
|
|
6507
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6508
|
+
} catch {
|
|
6509
|
+
return;
|
|
6510
|
+
}
|
|
6511
|
+
}
|
|
6512
|
+
});
|
|
5577
6513
|
|
|
5578
6514
|
//#endregion
|
|
5579
6515
|
//#region src/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.ts
|
|
@@ -5586,7 +6522,7 @@ const selectPrimaryWalletAccount = async ({ walletAccount }, client = require_In
|
|
|
5586
6522
|
*/
|
|
5587
6523
|
const disconnectWalletAccount = async ({ walletAccount }, client) => {
|
|
5588
6524
|
try {
|
|
5589
|
-
await require_getVerifiedCredentialForWalletAccount.
|
|
6525
|
+
await require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).disconnectWalletAccount?.({ walletAccount });
|
|
5590
6526
|
} catch (error) {
|
|
5591
6527
|
if (error instanceof require_getVerifiedCredentialForWalletAccount.NoWalletProviderFoundError) return;
|
|
5592
6528
|
throw error;
|
|
@@ -5609,17 +6545,29 @@ const disconnectWalletAccount = async ({ walletAccount }, client) => {
|
|
|
5609
6545
|
*/
|
|
5610
6546
|
const removeWalletAccount = async ({ walletAccount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5611
6547
|
const core = require_InvalidParamError.getCore(client);
|
|
5612
|
-
const apiClient = require_InvalidParamError.
|
|
6548
|
+
const apiClient = require_InvalidParamError.__createApiClient_wrapped({}, client);
|
|
5613
6549
|
await disconnectWalletAccount({ walletAccount }, client);
|
|
5614
6550
|
if (!walletAccount.verifiedCredentialId) {
|
|
5615
|
-
require_getNetworkProviderFromNetworkId.
|
|
6551
|
+
require_getNetworkProviderFromNetworkId.__removeUnverifiedWalletAccount_wrapped({ unverifiedWalletAccount: walletAccount }, client);
|
|
5616
6552
|
return;
|
|
5617
6553
|
}
|
|
5618
|
-
require_getVerifiedCredentialForWalletAccount.
|
|
6554
|
+
require_getVerifiedCredentialForWalletAccount.__updateAuthFromVerifyResponse_wrapped({ response: await apiClient.verifyUnlink({
|
|
5619
6555
|
environmentId: core.environmentId,
|
|
5620
6556
|
verifyUnlinkRequest: { walletId: walletAccount.verifiedCredentialId }
|
|
5621
6557
|
}) }, client);
|
|
5622
6558
|
};
|
|
6559
|
+
const __removeWalletAccount_impl = removeWalletAccount;
|
|
6560
|
+
const __removeWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6561
|
+
fn: __removeWalletAccount_impl,
|
|
6562
|
+
functionName: "removeWalletAccount",
|
|
6563
|
+
getCore: () => {
|
|
6564
|
+
try {
|
|
6565
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6566
|
+
} catch {
|
|
6567
|
+
return;
|
|
6568
|
+
}
|
|
6569
|
+
}
|
|
6570
|
+
});
|
|
5623
6571
|
|
|
5624
6572
|
//#endregion
|
|
5625
6573
|
//#region src/modules/wallets/signMessage/signMessage.ts
|
|
@@ -5636,7 +6584,7 @@ const removeWalletAccount = async ({ walletAccount }, client = require_InvalidPa
|
|
|
5636
6584
|
* @instrumented
|
|
5637
6585
|
*/
|
|
5638
6586
|
const signMessage = async ({ walletAccount, message }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5639
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
6587
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5640
6588
|
assertWalletProviderMethodDefined(walletProvider, "signMessage");
|
|
5641
6589
|
const { signature } = await walletProvider.signMessage({
|
|
5642
6590
|
message,
|
|
@@ -5644,6 +6592,18 @@ const signMessage = async ({ walletAccount, message }, client = require_InvalidP
|
|
|
5644
6592
|
});
|
|
5645
6593
|
return { signature };
|
|
5646
6594
|
};
|
|
6595
|
+
const __signMessage_impl = signMessage;
|
|
6596
|
+
const __signMessage_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6597
|
+
fn: __signMessage_impl,
|
|
6598
|
+
functionName: "signMessage",
|
|
6599
|
+
getCore: () => {
|
|
6600
|
+
try {
|
|
6601
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6602
|
+
} catch {
|
|
6603
|
+
return;
|
|
6604
|
+
}
|
|
6605
|
+
}
|
|
6606
|
+
});
|
|
5647
6607
|
|
|
5648
6608
|
//#endregion
|
|
5649
6609
|
//#region src/modules/wallets/transferAmount/transferAmount.ts
|
|
@@ -5663,7 +6623,7 @@ const signMessage = async ({ walletAccount, message }, client = require_InvalidP
|
|
|
5663
6623
|
* @instrumented
|
|
5664
6624
|
*/
|
|
5665
6625
|
const transferAmount = async ({ walletAccount, amount, recipient, token }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5666
|
-
const walletProvider = require_getVerifiedCredentialForWalletAccount.
|
|
6626
|
+
const walletProvider = require_getVerifiedCredentialForWalletAccount.__getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
|
|
5667
6627
|
assertWalletProviderMethodDefined(walletProvider, "transferAmount");
|
|
5668
6628
|
const { transactionHash } = await walletProvider.transferAmount({
|
|
5669
6629
|
amount,
|
|
@@ -5673,6 +6633,18 @@ const transferAmount = async ({ walletAccount, amount, recipient, token }, clien
|
|
|
5673
6633
|
});
|
|
5674
6634
|
return { transactionHash };
|
|
5675
6635
|
};
|
|
6636
|
+
const __transferAmount_impl = transferAmount;
|
|
6637
|
+
const __transferAmount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6638
|
+
fn: __transferAmount_impl,
|
|
6639
|
+
functionName: "transferAmount",
|
|
6640
|
+
getCore: () => {
|
|
6641
|
+
try {
|
|
6642
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6643
|
+
} catch {
|
|
6644
|
+
return;
|
|
6645
|
+
}
|
|
6646
|
+
}
|
|
6647
|
+
});
|
|
5676
6648
|
|
|
5677
6649
|
//#endregion
|
|
5678
6650
|
//#region src/modules/wallets/transferWalletAccount/transferWalletAccount.ts
|
|
@@ -5690,12 +6662,24 @@ const transferAmount = async ({ walletAccount, amount, recipient, token }, clien
|
|
|
5690
6662
|
const transferWalletAccount = async ({ walletProviderKey }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5691
6663
|
return verifyWalletAccountForSignInOrTransfer({
|
|
5692
6664
|
isTransfer: true,
|
|
5693
|
-
walletAccount: await
|
|
6665
|
+
walletAccount: await __connectWithWalletProvider_wrapped({
|
|
5694
6666
|
addToDynamicWalletAccounts: false,
|
|
5695
6667
|
walletProviderKey
|
|
5696
6668
|
}, client)
|
|
5697
6669
|
}, client);
|
|
5698
6670
|
};
|
|
6671
|
+
const __transferWalletAccount_impl = transferWalletAccount;
|
|
6672
|
+
const __transferWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6673
|
+
fn: __transferWalletAccount_impl,
|
|
6674
|
+
functionName: "transferWalletAccount",
|
|
6675
|
+
getCore: () => {
|
|
6676
|
+
try {
|
|
6677
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6678
|
+
} catch {
|
|
6679
|
+
return;
|
|
6680
|
+
}
|
|
6681
|
+
}
|
|
6682
|
+
});
|
|
5699
6683
|
|
|
5700
6684
|
//#endregion
|
|
5701
6685
|
//#region src/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.ts
|
|
@@ -5712,7 +6696,7 @@ const transferWalletAccount = async ({ walletProviderKey }, client = require_Inv
|
|
|
5712
6696
|
* @not-instrumented
|
|
5713
6697
|
*/
|
|
5714
6698
|
const getWalletAccountFromAddress = ({ address, chain }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5715
|
-
return require_getVerifiedCredentialForWalletAccount.
|
|
6699
|
+
return require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped(client).find((walletAccount) => walletAccount.address === address && walletAccount.chain === chain);
|
|
5716
6700
|
};
|
|
5717
6701
|
|
|
5718
6702
|
//#endregion
|
|
@@ -5733,6 +6717,18 @@ const offWalletProviderEvent = ({ callback, event, walletProviderKey }, client =
|
|
|
5733
6717
|
assertWalletProviderMethodDefined(walletProvider, "events");
|
|
5734
6718
|
walletProvider.events.off(event, callback);
|
|
5735
6719
|
};
|
|
6720
|
+
const __offWalletProviderEvent_impl = offWalletProviderEvent;
|
|
6721
|
+
const __offWalletProviderEvent_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6722
|
+
fn: __offWalletProviderEvent_impl,
|
|
6723
|
+
functionName: "offWalletProviderEvent",
|
|
6724
|
+
getCore: () => {
|
|
6725
|
+
try {
|
|
6726
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6727
|
+
} catch {
|
|
6728
|
+
return;
|
|
6729
|
+
}
|
|
6730
|
+
}
|
|
6731
|
+
});
|
|
5736
6732
|
|
|
5737
6733
|
//#endregion
|
|
5738
6734
|
//#region src/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.ts
|
|
@@ -5754,6 +6750,18 @@ const onWalletProviderEvent = ({ callback, event, walletProviderKey }, client =
|
|
|
5754
6750
|
walletProvider.events.off(event, callback);
|
|
5755
6751
|
};
|
|
5756
6752
|
};
|
|
6753
|
+
const __onWalletProviderEvent_impl = onWalletProviderEvent;
|
|
6754
|
+
const __onWalletProviderEvent_wrapped = require_InvalidParamError.instrumentFunction({
|
|
6755
|
+
fn: __onWalletProviderEvent_impl,
|
|
6756
|
+
functionName: "onWalletProviderEvent",
|
|
6757
|
+
getCore: () => {
|
|
6758
|
+
try {
|
|
6759
|
+
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
6760
|
+
} catch {
|
|
6761
|
+
return;
|
|
6762
|
+
}
|
|
6763
|
+
}
|
|
6764
|
+
});
|
|
5757
6765
|
|
|
5758
6766
|
//#endregion
|
|
5759
6767
|
//#region src/utils/parseUserAgent/parseUserAgent.ts
|
|
@@ -5878,76 +6886,76 @@ exports.WalletAccountAlreadyVerifiedError = WalletAccountAlreadyVerifiedError;
|
|
|
5878
6886
|
exports.WalletAccountNotSelectedError = WalletAccountNotSelectedError;
|
|
5879
6887
|
exports.WalletAlreadyLinkedToAnotherUserError = require_getNetworkProviderFromNetworkId.WalletAlreadyLinkedToAnotherUserError;
|
|
5880
6888
|
exports.WalletProviderMethodUnavailableError = WalletProviderMethodUnavailableError;
|
|
5881
|
-
exports.acknowledgeRecoveryCodes =
|
|
5882
|
-
exports.addCoinbaseOnrampOrderEventListener =
|
|
5883
|
-
exports.addNetwork =
|
|
6889
|
+
exports.acknowledgeRecoveryCodes = __acknowledgeRecoveryCodes_wrapped;
|
|
6890
|
+
exports.addCoinbaseOnrampOrderEventListener = __addCoinbaseOnrampOrderEventListener_wrapped;
|
|
6891
|
+
exports.addNetwork = __addNetwork_wrapped;
|
|
5884
6892
|
exports.assertWalletAccountSigningAvailability = assertWalletAccountSigningAvailability;
|
|
5885
6893
|
exports.assertWalletProviderMethodDefined = assertWalletProviderMethodDefined;
|
|
5886
|
-
exports.attachCheckoutTransactionSource =
|
|
5887
|
-
exports.authenticateMfaRecoveryCode =
|
|
5888
|
-
exports.authenticatePasskeyMFA =
|
|
5889
|
-
exports.authenticateTotpMfaDevice =
|
|
5890
|
-
exports.authenticateWithSocial =
|
|
5891
|
-
exports.broadcastCheckoutTransaction =
|
|
6894
|
+
exports.attachCheckoutTransactionSource = __attachCheckoutTransactionSource_wrapped;
|
|
6895
|
+
exports.authenticateMfaRecoveryCode = __authenticateMfaRecoveryCode_wrapped;
|
|
6896
|
+
exports.authenticatePasskeyMFA = __authenticatePasskeyMFA_wrapped;
|
|
6897
|
+
exports.authenticateTotpMfaDevice = __authenticateTotpMfaDevice_wrapped;
|
|
6898
|
+
exports.authenticateWithSocial = __authenticateWithSocial_wrapped;
|
|
6899
|
+
exports.broadcastCheckoutTransaction = __broadcastCheckoutTransaction_wrapped;
|
|
5892
6900
|
exports.canConnectWithHardwareWallet = canConnectWithHardwareWallet;
|
|
5893
|
-
exports.cancelCheckoutTransaction =
|
|
5894
|
-
exports.checkStepUpAuth =
|
|
5895
|
-
exports.completeDeviceRegistration =
|
|
5896
|
-
exports.completeSocialAuthentication =
|
|
5897
|
-
exports.confirmTransaction =
|
|
5898
|
-
exports.connectAndVerifyWithWalletProvider =
|
|
5899
|
-
exports.connectWithWalletProvider =
|
|
5900
|
-
exports.consumeMfaToken = require_isMfaRequiredForAction.
|
|
5901
|
-
exports.createCheckoutTransaction =
|
|
5902
|
-
exports.createCoinbaseOnrampOrder =
|
|
5903
|
-
exports.createCryptoDotComPayment =
|
|
5904
|
-
exports.createDynamicClient =
|
|
5905
|
-
exports.createKrakenExchangeTransfer =
|
|
5906
|
-
exports.createNewMfaRecoveryCodes =
|
|
5907
|
-
exports.deleteMfaDevice =
|
|
5908
|
-
exports.deletePasskey =
|
|
5909
|
-
exports.deleteUser =
|
|
5910
|
-
exports.detectDeviceRegistrationRedirect =
|
|
5911
|
-
exports.detectOAuthRedirect =
|
|
5912
|
-
exports.executeSwapTransaction =
|
|
5913
|
-
exports.fetchProjectSettings =
|
|
5914
|
-
exports.getActiveNetworkData =
|
|
5915
|
-
exports.getActiveNetworkId =
|
|
5916
|
-
exports.getAvailableWalletProvidersData =
|
|
5917
|
-
exports.getBalance =
|
|
5918
|
-
exports.getBalanceForAddress =
|
|
5919
|
-
exports.getBalances =
|
|
5920
|
-
exports.getCheckoutTransaction =
|
|
5921
|
-
exports.getCheckoutTransactionQuote =
|
|
5922
|
-
exports.getCoinbaseBuyUrl =
|
|
5923
|
-
exports.getConnectedAddresses =
|
|
6901
|
+
exports.cancelCheckoutTransaction = __cancelCheckoutTransaction_wrapped;
|
|
6902
|
+
exports.checkStepUpAuth = __checkStepUpAuth_wrapped;
|
|
6903
|
+
exports.completeDeviceRegistration = __completeDeviceRegistration_wrapped;
|
|
6904
|
+
exports.completeSocialAuthentication = __completeSocialAuthentication_wrapped;
|
|
6905
|
+
exports.confirmTransaction = __confirmTransaction_wrapped;
|
|
6906
|
+
exports.connectAndVerifyWithWalletProvider = __connectAndVerifyWithWalletProvider_wrapped;
|
|
6907
|
+
exports.connectWithWalletProvider = __connectWithWalletProvider_wrapped;
|
|
6908
|
+
exports.consumeMfaToken = require_isMfaRequiredForAction.__consumeMfaToken_wrapped;
|
|
6909
|
+
exports.createCheckoutTransaction = __createCheckoutTransaction_wrapped;
|
|
6910
|
+
exports.createCoinbaseOnrampOrder = __createCoinbaseOnrampOrder_wrapped;
|
|
6911
|
+
exports.createCryptoDotComPayment = __createCryptoDotComPayment_wrapped;
|
|
6912
|
+
exports.createDynamicClient = __createDynamicClient_wrapped;
|
|
6913
|
+
exports.createKrakenExchangeTransfer = __createKrakenExchangeTransfer_wrapped;
|
|
6914
|
+
exports.createNewMfaRecoveryCodes = __createNewMfaRecoveryCodes_wrapped;
|
|
6915
|
+
exports.deleteMfaDevice = __deleteMfaDevice_wrapped;
|
|
6916
|
+
exports.deletePasskey = __deletePasskey_wrapped;
|
|
6917
|
+
exports.deleteUser = __deleteUser_wrapped;
|
|
6918
|
+
exports.detectDeviceRegistrationRedirect = __detectDeviceRegistrationRedirect_wrapped;
|
|
6919
|
+
exports.detectOAuthRedirect = __detectOAuthRedirect_wrapped;
|
|
6920
|
+
exports.executeSwapTransaction = __executeSwapTransaction_wrapped;
|
|
6921
|
+
exports.fetchProjectSettings = __fetchProjectSettings_wrapped;
|
|
6922
|
+
exports.getActiveNetworkData = __getActiveNetworkData_wrapped;
|
|
6923
|
+
exports.getActiveNetworkId = __getActiveNetworkId_wrapped;
|
|
6924
|
+
exports.getAvailableWalletProvidersData = __getAvailableWalletProvidersData_wrapped;
|
|
6925
|
+
exports.getBalance = __getBalance_wrapped;
|
|
6926
|
+
exports.getBalanceForAddress = __getBalanceForAddress_wrapped;
|
|
6927
|
+
exports.getBalances = __getBalances_wrapped;
|
|
6928
|
+
exports.getCheckoutTransaction = __getCheckoutTransaction_wrapped;
|
|
6929
|
+
exports.getCheckoutTransactionQuote = __getCheckoutTransactionQuote_wrapped;
|
|
6930
|
+
exports.getCoinbaseBuyUrl = __getCoinbaseBuyUrl_wrapped;
|
|
6931
|
+
exports.getConnectedAddresses = __getConnectedAddresses_wrapped;
|
|
5924
6932
|
exports.getDefaultClient = require_InvalidParamError.getDefaultClient;
|
|
5925
|
-
exports.getDeviceRegistrationTokenFromUrl =
|
|
5926
|
-
exports.getElevatedAccessToken = require_InvalidParamError.
|
|
5927
|
-
exports.getKrakenAccounts =
|
|
5928
|
-
exports.getKrakenWhitelistedAddresses =
|
|
5929
|
-
exports.getMfaDevices =
|
|
5930
|
-
exports.getMfaMethods = require_isMfaRequiredForAction.
|
|
5931
|
-
exports.getMfaRecoveryCodes =
|
|
5932
|
-
exports.getMissingVerificationForCoinbaseOnrampOrder =
|
|
5933
|
-
exports.getMultichainBalances =
|
|
5934
|
-
exports.getNetworksData = require_getNetworkProviderFromNetworkId.
|
|
5935
|
-
exports.getOwnerWalletAccountForSmartWalletAccount =
|
|
5936
|
-
exports.getPasskeys =
|
|
5937
|
-
exports.getPrimaryWalletAccount =
|
|
5938
|
-
exports.getRegisteredDevices =
|
|
5939
|
-
exports.getSwapQuote =
|
|
5940
|
-
exports.getSwapStatus =
|
|
5941
|
-
exports.getTransactionHistory =
|
|
5942
|
-
exports.getUserSocialAccounts =
|
|
6933
|
+
exports.getDeviceRegistrationTokenFromUrl = __getDeviceRegistrationTokenFromUrl_wrapped;
|
|
6934
|
+
exports.getElevatedAccessToken = require_InvalidParamError.__getElevatedAccessToken_wrapped;
|
|
6935
|
+
exports.getKrakenAccounts = __getKrakenAccounts_wrapped;
|
|
6936
|
+
exports.getKrakenWhitelistedAddresses = __getKrakenWhitelistedAddresses_wrapped;
|
|
6937
|
+
exports.getMfaDevices = __getMfaDevices_wrapped;
|
|
6938
|
+
exports.getMfaMethods = require_isMfaRequiredForAction.__getMfaMethods_wrapped;
|
|
6939
|
+
exports.getMfaRecoveryCodes = __getMfaRecoveryCodes_wrapped;
|
|
6940
|
+
exports.getMissingVerificationForCoinbaseOnrampOrder = __getMissingVerificationForCoinbaseOnrampOrder_wrapped;
|
|
6941
|
+
exports.getMultichainBalances = __getMultichainBalances_wrapped;
|
|
6942
|
+
exports.getNetworksData = require_getNetworkProviderFromNetworkId.__getNetworksData_wrapped;
|
|
6943
|
+
exports.getOwnerWalletAccountForSmartWalletAccount = __getOwnerWalletAccountForSmartWalletAccount_wrapped;
|
|
6944
|
+
exports.getPasskeys = __getPasskeys_wrapped;
|
|
6945
|
+
exports.getPrimaryWalletAccount = __getPrimaryWalletAccount_wrapped;
|
|
6946
|
+
exports.getRegisteredDevices = __getRegisteredDevices_wrapped;
|
|
6947
|
+
exports.getSwapQuote = __getSwapQuote_wrapped;
|
|
6948
|
+
exports.getSwapStatus = __getSwapStatus_wrapped;
|
|
6949
|
+
exports.getTransactionHistory = __getTransactionHistory_wrapped;
|
|
6950
|
+
exports.getUserSocialAccounts = __getUserSocialAccounts_wrapped;
|
|
5943
6951
|
exports.getWalletAccountAddressByType = getWalletAccountAddressByType;
|
|
5944
6952
|
exports.getWalletAccountFromAddress = getWalletAccountFromAddress;
|
|
5945
|
-
exports.getWalletAccounts = require_getVerifiedCredentialForWalletAccount.
|
|
5946
|
-
exports.getWalletConnectCatalog =
|
|
5947
|
-
exports.getWalletConnectCatalogWalletByWalletProviderKey =
|
|
6953
|
+
exports.getWalletAccounts = require_getVerifiedCredentialForWalletAccount.__getWalletAccounts_wrapped;
|
|
6954
|
+
exports.getWalletConnectCatalog = __getWalletConnectCatalog_wrapped;
|
|
6955
|
+
exports.getWalletConnectCatalogWalletByWalletProviderKey = __getWalletConnectCatalogWalletByWalletProviderKey_wrapped;
|
|
5948
6956
|
exports.getWalletProviderDataByKey = getWalletProviderDataByKey;
|
|
5949
6957
|
exports.hasExtension = require_getNetworkProviderFromNetworkId.hasExtension;
|
|
5950
|
-
exports.initializeClient =
|
|
6958
|
+
exports.initializeClient = __initializeClient_wrapped;
|
|
5951
6959
|
exports.isCaptchaRequired = require_getNetworkProviderFromNetworkId.isCaptchaRequired;
|
|
5952
6960
|
exports.isDeeplinkWalletProvider = isDeeplinkWalletProvider;
|
|
5953
6961
|
exports.isDeviceRegistrationRequired = isDeviceRegistrationRequired;
|
|
@@ -5960,41 +6968,41 @@ exports.isSignedIn = isSignedIn;
|
|
|
5960
6968
|
exports.isUserMissingMfaAuth = isUserMissingMfaAuth;
|
|
5961
6969
|
exports.isUserOnboardingComplete = isUserOnboardingComplete;
|
|
5962
6970
|
exports.isWalletAccountVerified = isWalletAccountVerified;
|
|
5963
|
-
exports.logout =
|
|
5964
|
-
exports.offEvent = require_getVerifiedCredentialForWalletAccount.
|
|
5965
|
-
exports.offWalletProviderEvent =
|
|
5966
|
-
exports.onEvent = require_getVerifiedCredentialForWalletAccount.
|
|
5967
|
-
exports.onWalletProviderEvent =
|
|
5968
|
-
exports.onceEvent = require_getVerifiedCredentialForWalletAccount.
|
|
6971
|
+
exports.logout = __logout_wrapped;
|
|
6972
|
+
exports.offEvent = require_getVerifiedCredentialForWalletAccount.__offEvent_wrapped;
|
|
6973
|
+
exports.offWalletProviderEvent = __offWalletProviderEvent_wrapped;
|
|
6974
|
+
exports.onEvent = require_getVerifiedCredentialForWalletAccount.__onEvent_wrapped;
|
|
6975
|
+
exports.onWalletProviderEvent = __onWalletProviderEvent_wrapped;
|
|
6976
|
+
exports.onceEvent = require_getVerifiedCredentialForWalletAccount.__onceEvent_wrapped;
|
|
5969
6977
|
exports.parseUserAgent = parseUserAgent;
|
|
5970
|
-
exports.prepareCheckoutTransaction =
|
|
5971
|
-
exports.proveWalletAccountOwnership =
|
|
5972
|
-
exports.refreshAuth = require_NotWaasWalletAccountError.
|
|
5973
|
-
exports.refreshUser =
|
|
5974
|
-
exports.registerPasskey =
|
|
5975
|
-
exports.registerTotpMfaDevice =
|
|
5976
|
-
exports.removeWalletAccount =
|
|
5977
|
-
exports.requestExternalAuthElevatedToken =
|
|
5978
|
-
exports.requiresConversion =
|
|
5979
|
-
exports.revokeAllRegisteredDevices =
|
|
5980
|
-
exports.revokeRegisteredDevice =
|
|
5981
|
-
exports.selectPrimaryWalletAccount =
|
|
5982
|
-
exports.sendEmailOTP =
|
|
5983
|
-
exports.sendSmsOTP =
|
|
5984
|
-
exports.setCaptchaToken = require_getNetworkProviderFromNetworkId.
|
|
5985
|
-
exports.setDefaultMfaDevice =
|
|
5986
|
-
exports.setInstrumentationEnabled =
|
|
5987
|
-
exports.signInWithExternalJwt =
|
|
5988
|
-
exports.signInWithPasskey =
|
|
5989
|
-
exports.signMessage =
|
|
5990
|
-
exports.submitCheckoutTransaction =
|
|
6978
|
+
exports.prepareCheckoutTransaction = __prepareCheckoutTransaction_wrapped;
|
|
6979
|
+
exports.proveWalletAccountOwnership = __proveWalletAccountOwnership_wrapped;
|
|
6980
|
+
exports.refreshAuth = require_NotWaasWalletAccountError.__refreshAuth_wrapped;
|
|
6981
|
+
exports.refreshUser = __refreshUser_wrapped;
|
|
6982
|
+
exports.registerPasskey = __registerPasskey_wrapped;
|
|
6983
|
+
exports.registerTotpMfaDevice = __registerTotpMfaDevice_wrapped;
|
|
6984
|
+
exports.removeWalletAccount = __removeWalletAccount_wrapped;
|
|
6985
|
+
exports.requestExternalAuthElevatedToken = __requestExternalAuthElevatedToken_wrapped;
|
|
6986
|
+
exports.requiresConversion = __requiresConversion_wrapped;
|
|
6987
|
+
exports.revokeAllRegisteredDevices = __revokeAllRegisteredDevices_wrapped;
|
|
6988
|
+
exports.revokeRegisteredDevice = __revokeRegisteredDevice_wrapped;
|
|
6989
|
+
exports.selectPrimaryWalletAccount = __selectPrimaryWalletAccount_wrapped;
|
|
6990
|
+
exports.sendEmailOTP = __sendEmailOTP_wrapped;
|
|
6991
|
+
exports.sendSmsOTP = __sendSmsOTP_wrapped;
|
|
6992
|
+
exports.setCaptchaToken = require_getNetworkProviderFromNetworkId.__setCaptchaToken_wrapped;
|
|
6993
|
+
exports.setDefaultMfaDevice = __setDefaultMfaDevice_wrapped;
|
|
6994
|
+
exports.setInstrumentationEnabled = __setInstrumentationEnabled_wrapped;
|
|
6995
|
+
exports.signInWithExternalJwt = __signInWithExternalJwt_wrapped;
|
|
6996
|
+
exports.signInWithPasskey = __signInWithPasskey_wrapped;
|
|
6997
|
+
exports.signMessage = __signMessage_wrapped;
|
|
6998
|
+
exports.submitCheckoutTransaction = __submitCheckoutTransaction_wrapped;
|
|
5991
6999
|
exports.supportedCountries = supportedCountries;
|
|
5992
|
-
exports.switchActiveNetwork =
|
|
5993
|
-
exports.transferAmount =
|
|
5994
|
-
exports.transferWalletAccount =
|
|
5995
|
-
exports.unlinkSocialAccount =
|
|
5996
|
-
exports.updateUser =
|
|
5997
|
-
exports.verifyOTP =
|
|
5998
|
-
exports.verifyWalletAccount =
|
|
5999
|
-
exports.waitForClientInitialized =
|
|
7000
|
+
exports.switchActiveNetwork = __switchActiveNetwork_wrapped;
|
|
7001
|
+
exports.transferAmount = __transferAmount_wrapped;
|
|
7002
|
+
exports.transferWalletAccount = __transferWalletAccount_wrapped;
|
|
7003
|
+
exports.unlinkSocialAccount = __unlinkSocialAccount_wrapped;
|
|
7004
|
+
exports.updateUser = __updateUser_wrapped;
|
|
7005
|
+
exports.verifyOTP = __verifyOTP_wrapped;
|
|
7006
|
+
exports.verifyWalletAccount = __verifyWalletAccount_wrapped;
|
|
7007
|
+
exports.waitForClientInitialized = __waitForClientInitialized_wrapped;
|
|
6000
7008
|
//# sourceMappingURL=index.cjs.js.map
|