@dynamic-labs-sdk/client 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/{InvalidParamError-CIGCphfb.cjs.js → InvalidParamError-Z-OXIzF5.cjs.js} +506 -35
  2. package/dist/InvalidParamError-Z-OXIzF5.cjs.js.map +1 -0
  3. package/dist/{InvalidParamError-D7XZbzuT.esm.js → InvalidParamError-uk3RG_2n.esm.js} +458 -11
  4. package/dist/InvalidParamError-uk3RG_2n.esm.js.map +1 -0
  5. package/dist/{NotWaasWalletAccountError-BvzlkqKx.esm.js → NotWaasWalletAccountError-BNu0YC8I.esm.js} +18 -6
  6. package/dist/{NotWaasWalletAccountError-BvzlkqKx.esm.js.map → NotWaasWalletAccountError-BNu0YC8I.esm.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-DOi9OAsI.cjs.js → NotWaasWalletAccountError-TP-jawk1.cjs.js} +19 -7
  8. package/dist/NotWaasWalletAccountError-TP-jawk1.cjs.js.map +1 -0
  9. package/dist/client/defaultClient/defaultClient.d.ts.map +1 -1
  10. package/dist/core.cjs.js +121 -49
  11. package/dist/core.cjs.js.map +1 -1
  12. package/dist/core.esm.js +82 -10
  13. package/dist/core.esm.js.map +1 -1
  14. package/dist/errors/base/BaseError.d.ts.map +1 -1
  15. package/dist/exports/index.d.ts +1 -1
  16. package/dist/exports/index.d.ts.map +1 -1
  17. package/dist/{getNetworkProviderFromNetworkId-yH4_BUi0.esm.js → getNetworkProviderFromNetworkId-B0f3IebZ.esm.js} +264 -12
  18. package/dist/getNetworkProviderFromNetworkId-B0f3IebZ.esm.js.map +1 -0
  19. package/dist/{getNetworkProviderFromNetworkId-DcEjbjOm.cjs.js → getNetworkProviderFromNetworkId-TKiHxL8x.cjs.js} +321 -69
  20. package/dist/getNetworkProviderFromNetworkId-TKiHxL8x.cjs.js.map +1 -0
  21. package/dist/{getSignedSessionId-DPZjqpdm.cjs.js → getSignedSessionId-CMF56kGw.cjs.js} +33 -9
  22. package/dist/{getSignedSessionId-DPZjqpdm.cjs.js.map → getSignedSessionId-CMF56kGw.cjs.js.map} +1 -1
  23. package/dist/{getSignedSessionId-CADCZ36G.esm.js → getSignedSessionId-YLI28a3p.esm.js} +30 -6
  24. package/dist/{getSignedSessionId-CADCZ36G.esm.js.map → getSignedSessionId-YLI28a3p.esm.js.map} +1 -1
  25. package/dist/{getVerifiedCredentialForWalletAccount--OXuJ-DH.esm.js → getVerifiedCredentialForWalletAccount-BqymKhjg.esm.js} +118 -10
  26. package/dist/getVerifiedCredentialForWalletAccount-BqymKhjg.esm.js.map +1 -0
  27. package/dist/{getVerifiedCredentialForWalletAccount-nfQS96Xr.cjs.js → getVerifiedCredentialForWalletAccount-Dxasodsq.cjs.js} +164 -56
  28. package/dist/getVerifiedCredentialForWalletAccount-Dxasodsq.cjs.js.map +1 -0
  29. package/dist/index.cjs.js +1328 -320
  30. package/dist/index.cjs.js.map +1 -1
  31. package/dist/index.esm.js +1229 -221
  32. package/dist/index.esm.js.map +1 -1
  33. package/dist/{isMfaRequiredForAction-Bq5ETrIg.cjs.js → isMfaRequiredForAction-BH38Zggg.cjs.js} +32 -8
  34. package/dist/isMfaRequiredForAction-BH38Zggg.cjs.js.map +1 -0
  35. package/dist/{isMfaRequiredForAction-C4DOmn6q.esm.js → isMfaRequiredForAction-HXQXYFWo.esm.js} +29 -5
  36. package/dist/isMfaRequiredForAction-HXQXYFWo.esm.js.map +1 -0
  37. package/dist/modules/apiClient/utils/convertToApiErrorMiddleware/convertToApiErrorMiddleware.d.ts.map +1 -1
  38. package/dist/modules/checkout/checkout.types.d.ts +1 -1
  39. package/dist/modules/checkout/checkout.types.d.ts.map +1 -1
  40. package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts.map +1 -1
  41. package/dist/modules/clientEvents/clientEvents.d.ts.map +1 -1
  42. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts.map +1 -1
  43. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +1 -2
  44. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts.map +1 -1
  45. package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts +1 -1
  46. package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts.map +1 -1
  47. package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts +2 -1
  48. package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts.map +1 -1
  49. package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts +8 -1
  50. package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
  51. package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
  52. package/dist/services/instrumentation/createInstrumentation/createInstrumentation.d.ts.map +1 -1
  53. package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +1 -0
  54. package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
  55. package/dist/services/instrumentation/instrumentation.types.d.ts +13 -1
  56. package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
  57. package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts.map +1 -1
  58. package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts.map +1 -1
  59. package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts.map +1 -1
  60. package/dist/services/storage/createStorage/formatForStorage/storageFormat.d.ts.map +1 -1
  61. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  62. package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
  63. package/dist/waas.cjs.js +12 -11
  64. package/dist/waas.cjs.js.map +1 -1
  65. package/dist/waas.esm.js +11 -10
  66. package/dist/waas.esm.js.map +1 -1
  67. package/dist/waasCore.cjs.js +26 -26
  68. package/dist/waasCore.cjs.js.map +1 -1
  69. package/dist/waasCore.esm.js +25 -25
  70. package/dist/waasCore.esm.js.map +1 -1
  71. package/package.json +3 -3
  72. package/dist/InvalidParamError-CIGCphfb.cjs.js.map +0 -1
  73. package/dist/InvalidParamError-D7XZbzuT.esm.js.map +0 -1
  74. package/dist/NotWaasWalletAccountError-DOi9OAsI.cjs.js.map +0 -1
  75. package/dist/getNetworkProviderFromNetworkId-DcEjbjOm.cjs.js.map +0 -1
  76. package/dist/getNetworkProviderFromNetworkId-yH4_BUi0.esm.js.map +0 -1
  77. package/dist/getVerifiedCredentialForWalletAccount--OXuJ-DH.esm.js.map +0 -1
  78. package/dist/getVerifiedCredentialForWalletAccount-nfQS96Xr.cjs.js.map +0 -1
  79. package/dist/isMfaRequiredForAction-Bq5ETrIg.cjs.js.map +0 -1
  80. package/dist/isMfaRequiredForAction-C4DOmn6q.esm.js.map +0 -1
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as NONCE_POOL_SIZE, D as randomString, E as ValueMustBeDefinedError, F as getCore, I as name, L as version, M as setDefaultClient, O as CLIENT_SDK_NAME, P as BaseError, S as getElevatedAccessToken, T as assertDefined, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as getNonce, j as getDefaultClient, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as MfaInvalidOtpError, w as isCookieEnabled, x as APIError, y as LinkCredentialError } from "./InvalidParamError-D7XZbzuT.esm.js";
2
- import { A as getBuffer, C as CannotTrackError, D as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, E as GENERATE_SESSION_KEYS_TRACKER_KEY, F as createLocalStorageAdapter, I as subscribeWithSelector, L as isEqualShallow, M as createStorageKeySchema, N as createStorage, O as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, T as FETCH_PROJECT_SETTINGS_TRACKER_KEY, _ as NoNetworkProvidersError, a as updateWalletProviderKeysForVerifiedCredentials, b as createLogger, c as createSignInMessageStatement, d as createVisit, f as hasExtension, g as WalletAlreadyLinkedToAnotherUserError, h as isCaptchaRequired, i as getNetworksData, j as generateSessionKeys, k as isServerSideRendering, l as formatSignInMessage, m as consumeCaptchaToken, o as verifyMessageSignatureOwnership, p as setCaptchaToken, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as createRealtimeService, w as createDeferredPromise, x as createCrossTabBroadcast, y as createIndexedDBKeychainService } from "./getNetworkProviderFromNetworkId-yH4_BUi0.esm.js";
3
- import { A as setCookie, C as normalizeAddress, D as offEvent, E as emitEvent, O as onEvent, S as formatWalletAccountId, a as parseElevatedAccessToken, d as checkAndRaiseWalletAccountsChangedEvent, f as emitWalletAccountsChangedEvent, i as upsertElevatedAccessToken, k as onceEvent, m as getWalletProviderFromWalletAccount, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as DYNAMIC_AUTH_COOKIE_NAME, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders, v as NoWalletProviderFoundError, w as splitWalletProviderKey, y as getWalletAccounts } from "./getVerifiedCredentialForWalletAccount--OXuJ-DH.esm.js";
4
- import { n as refreshAuth, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BvzlkqKx.esm.js";
5
- import { n as getMfaMethods, r as consumeMfaToken, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-C4DOmn6q.esm.js";
1
+ import { A as ValueMustBeDefinedError, B as name, D as extractSessionId, E as getUserAgent, F as getDefaultClient, I as setDefaultClient, M as CLIENT_SDK_NAME, O as isCookieEnabled, P as NONCE_POOL_SIZE, R as BaseError, S as __getElevatedAccessToken_wrapped, T as DEFAULT_PII_FIELDS, V as version, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as __getNonce_wrapped, j as randomString, k as assertDefined, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as __getChainFromVerifiedCredentialChain_wrapped, t as InvalidParamError, u as __createApiClient_wrapped, v as MfaInvalidOtpError, w as instrumentFunction, x as APIError, y as LinkCredentialError, z as getCore } from "./InvalidParamError-uk3RG_2n.esm.js";
2
+ import { A as getBuffer, C as CannotTrackError, D as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, E as GENERATE_SESSION_KEYS_TRACKER_KEY, F as __createLocalStorageAdapter_wrapped, I as __subscribeWithSelector_wrapped, L as isEqualShallow, M as __createStorageKeySchema_wrapped, N as __createStorage_wrapped, O as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, T as FETCH_PROJECT_SETTINGS_TRACKER_KEY, _ as NoNetworkProvidersError, a as __updateWalletProviderKeysForVerifiedCredentials_wrapped, b as __createLogger_wrapped, c as __createSignInMessageStatement_wrapped, d as __createVisit_wrapped, f as hasExtension, g as WalletAlreadyLinkedToAnotherUserError, h as isCaptchaRequired, i as __getNetworksData_wrapped, j as __generateSessionKeys_wrapped, k as isServerSideRendering, l as formatSignInMessage, m as __consumeCaptchaToken_wrapped, o as __verifyMessageSignatureOwnership_wrapped, p as __setCaptchaToken_wrapped, s as __removeUnverifiedWalletAccount_wrapped, t as __getNetworkProviderFromNetworkId_wrapped, u as __setUnverifiedWalletAccounts_wrapped, v as __createRealtimeService_wrapped, w as __createDeferredPromise_wrapped, x as __createCrossTabBroadcast_wrapped, y as __createIndexedDBKeychainService_wrapped } from "./getNetworkProviderFromNetworkId-B0f3IebZ.esm.js";
3
+ import { A as setCookie, C as normalizeAddress, D as __onEvent_wrapped, E as __offEvent_wrapped, O as __onceEvent_wrapped, S as formatWalletAccountId, a as parseElevatedAccessToken, d as checkAndRaiseWalletAccountsChangedEvent, f as emitWalletAccountsChangedEvent, i as upsertElevatedAccessToken, k as emitEvent, m as __getWalletProviderFromWalletAccount_wrapped, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as DYNAMIC_AUTH_COOKIE_NAME, r as __updateAuthFromVerifyResponse_wrapped, t as __getVerifiedCredentialForWalletAccount_wrapped, u as __getWalletProviders_wrapped, v as NoWalletProviderFoundError, w as splitWalletProviderKey, y as __getWalletAccounts_wrapped } from "./getVerifiedCredentialForWalletAccount-BqymKhjg.esm.js";
4
+ import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BNu0YC8I.esm.js";
5
+ import { n as __getMfaMethods_wrapped, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-HXQXYFWo.esm.js";
6
6
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
7
7
  import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, TokenScope, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
8
8
  import * as z from "zod/mini";
@@ -80,14 +80,14 @@ const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
80
80
  * @returns True if the user is signed in, false otherwise.
81
81
  * @not-instrumented
82
82
  */
83
- const isSignedIn = (client = getDefaultClient()) => Boolean(client.user || getWalletAccounts(client).length > 0);
83
+ const isSignedIn = (client = getDefaultClient()) => Boolean(client.user || __getWalletAccounts_wrapped(client).length > 0);
84
84
 
85
85
  //#endregion
86
86
  //#region src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts
87
87
  /**
88
88
  * The schema to track the expiration time of the project settings.
89
89
  */
90
- const projectSettingsExpirationStorageKeySchema = createStorageKeySchema({
90
+ const projectSettingsExpirationStorageKeySchema = __createStorageKeySchema_wrapped({
91
91
  key: "projectSettingsExpiration",
92
92
  schema: z.number()
93
93
  });
@@ -96,7 +96,6 @@ const projectSettingsExpirationStorageKeySchema = createStorageKeySchema({
96
96
  //#region src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts
97
97
  /**
98
98
  * Expiration time of the project settings in milliseconds.
99
- * @instrumented
100
99
  */
101
100
  const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
102
101
  /**
@@ -108,13 +107,13 @@ const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
108
107
  *
109
108
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
110
109
  * @returns A promise that resolves to the updated project settings.
111
- * @not-instrumented
110
+ * @instrumented
112
111
  */
113
112
  const fetchProjectSettings = async (client = getDefaultClient()) => {
114
113
  const core = getCore(client);
115
114
  const currentExpiration = await core.storage.getItem(projectSettingsExpirationStorageKeySchema);
116
115
  if (Boolean(client.projectSettings) && !(currentExpiration && currentExpiration < Date.now()) && isSignedIn(client)) return client.projectSettings;
117
- const apiClient = createApiClient({}, client);
116
+ const apiClient = __createApiClient_wrapped({}, client);
118
117
  core.logger.debug("[fetchProjectSettings] Fetching project settings...");
119
118
  const doFetch = async () => apiClient.getEnvironmentSettings({
120
119
  environmentId: core.environmentId,
@@ -128,6 +127,18 @@ const fetchProjectSettings = async (client = getDefaultClient()) => {
128
127
  await core.storage.setItem(projectSettingsExpirationStorageKeySchema, Date.now() + PROJECT_SETTINGS_EXPIRATION_TIME);
129
128
  return projectSettings;
130
129
  };
130
+ const __fetchProjectSettings_impl = fetchProjectSettings;
131
+ const __fetchProjectSettings_wrapped = instrumentFunction({
132
+ fn: __fetchProjectSettings_impl,
133
+ functionName: "fetchProjectSettings",
134
+ getCore: () => {
135
+ try {
136
+ return getCore(getDefaultClient());
137
+ } catch {
138
+ return;
139
+ }
140
+ }
141
+ });
131
142
 
132
143
  //#endregion
133
144
  //#region src/services/runtimeServices/createRuntimeServices/createRuntimeServices.ts
@@ -152,10 +163,10 @@ const createRuntimeServices = () => {
152
163
  const getAvailableWalletProvidersFromWalletAccounts = (client) => {
153
164
  const core = getCore(client);
154
165
  const walletProvidersMap = /* @__PURE__ */ new Map();
155
- getWalletAccounts(client).forEach((walletAccount) => {
166
+ __getWalletAccounts_wrapped(client).forEach((walletAccount) => {
156
167
  if (walletProvidersMap.has(walletAccount.walletProviderKey)) return;
157
168
  try {
158
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
169
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
159
170
  walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);
160
171
  } catch (error) {
161
172
  core.logger.debug("Wallet provider not found for wallet account", {
@@ -199,7 +210,7 @@ const performLogout = async ({ reason }, client) => {
199
210
  core.logger.debug("[logout] Logging out...");
200
211
  await disconnectAndTerminateWalletProviders({ reason }, client);
201
212
  if (client.user !== null) {
202
- const apiClient = createApiClient({}, client);
213
+ const apiClient = __createApiClient_wrapped({}, client);
203
214
  try {
204
215
  await apiClient.revokeSession({ environmentId: core.environmentId });
205
216
  } catch (error) {
@@ -227,8 +238,8 @@ const performLogout = async ({ reason }, client) => {
227
238
  args: { reason },
228
239
  event: "logout"
229
240
  }, client);
230
- fetchProjectSettings(client);
231
- generateSessionKeys(client);
241
+ __fetchProjectSettings_wrapped(client);
242
+ __generateSessionKeys_wrapped(client);
232
243
  };
233
244
 
234
245
  //#endregion
@@ -244,6 +255,18 @@ const performLogout = async ({ reason }, client) => {
244
255
  const handleSessionExpiration = async (client) => {
245
256
  return performLogout({ reason: "token-expired" }, client);
246
257
  };
258
+ const __handleSessionExpiration_impl = handleSessionExpiration;
259
+ const __handleSessionExpiration_wrapped = instrumentFunction({
260
+ fn: __handleSessionExpiration_impl,
261
+ functionName: "handleSessionExpiration",
262
+ getCore: () => {
263
+ try {
264
+ return getCore(getDefaultClient());
265
+ } catch {
266
+ return;
267
+ }
268
+ }
269
+ });
247
270
 
248
271
  //#endregion
249
272
  //#region src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts
@@ -277,7 +300,7 @@ const setLongTimeout = (callback, delay) => {
277
300
  const initializeAuth = (client) => {
278
301
  const core = getCore(client);
279
302
  let clearExpirationTimeout = null;
280
- const onChangeExpiration = subscribeWithSelector(core.state, (state) => state.sessionExpiresAt);
303
+ const onChangeExpiration = __subscribeWithSelector_wrapped(core.state, (state) => state.sessionExpiresAt);
281
304
  const checkExpiration = () => {
282
305
  const expiration = core.state.get().sessionExpiresAt;
283
306
  clearExpirationTimeout?.();
@@ -285,7 +308,7 @@ const initializeAuth = (client) => {
285
308
  const now = /* @__PURE__ */ new Date();
286
309
  const timeUntilExpiration = expiration.getTime() - now.getTime();
287
310
  if (timeUntilExpiration <= 0) {
288
- handleSessionExpiration(client);
311
+ __handleSessionExpiration_wrapped(client);
289
312
  return;
290
313
  }
291
314
  clearExpirationTimeout = setLongTimeout(checkExpiration, timeUntilExpiration);
@@ -306,6 +329,18 @@ const initializeAuth = (client) => {
306
329
  const logout = async (client = getDefaultClient()) => {
307
330
  return performLogout({ reason: "user-intent" }, client);
308
331
  };
332
+ const __logout_impl = logout;
333
+ const __logout_wrapped = instrumentFunction({
334
+ fn: __logout_impl,
335
+ functionName: "logout",
336
+ getCore: () => {
337
+ try {
338
+ return getCore(getDefaultClient());
339
+ } catch {
340
+ return;
341
+ }
342
+ }
343
+ });
309
344
 
310
345
  //#endregion
311
346
  //#region src/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.ts
@@ -360,7 +395,7 @@ const walletProviderKeyMapSchema = z.record(z.string(), z.string());
360
395
 
361
396
  //#endregion
362
397
  //#region src/modules/storageSync/schema.ts
363
- const stateStorageKeySchema = createStorageKeySchema({
398
+ const stateStorageKeySchema = __createStorageKeySchema_wrapped({
364
399
  key: "state",
365
400
  schema: z.object({
366
401
  apiVersion: z.string(),
@@ -372,7 +407,7 @@ const stateStorageKeySchema = createStorageKeySchema({
372
407
  walletProviderKeyMap: walletProviderKeyMapSchema
373
408
  })
374
409
  });
375
- const sessionStorageKeySchema = createStorageKeySchema({
410
+ const sessionStorageKeySchema = __createStorageKeySchema_wrapped({
376
411
  key: "session",
377
412
  schema: z.object({
378
413
  captchaToken: z.nullable(z.string()),
@@ -597,10 +632,10 @@ const initializeClient = async (client = getDefaultClient()) => {
597
632
  logger: core.logger,
598
633
  state: core.state,
599
634
  storage: core.storage
600
- }).catch(() => logout(client));
601
- if (core.state.get().sessionKeys && !await core.keychain.hasKey("session")) await logout(client);
635
+ }).catch(() => __logout_wrapped(client));
636
+ if (core.state.get().sessionKeys && !await core.keychain.hasKey("session")) await __logout_wrapped(client);
602
637
  }).then(async () => {
603
- if (!core.state.get().projectSettings) await fetchProjectSettings(client);
638
+ if (!core.state.get().projectSettings) await __fetchProjectSettings_wrapped(client);
604
639
  });
605
640
  fetchProjectSettingsPromise.then(() => prefetchNoncesIfNeeded(client)).catch((error) => {
606
641
  core.logger.error("Failed to prefetch nonces:", error);
@@ -609,7 +644,7 @@ const initializeClient = async (client = getDefaultClient()) => {
609
644
  * Generate session keys if they don't exist
610
645
  */
611
646
  const generateSessionKeysPromise = fetchProjectSettingsPromise.then(async () => {
612
- if (!core.state.get().sessionKeys) await generateSessionKeys(client);
647
+ if (!core.state.get().sessionKeys) await __generateSessionKeys_wrapped(client);
613
648
  });
614
649
  /**
615
650
  * Refresh user state on initialization when cookie is enabled.
@@ -631,10 +666,10 @@ const initializeClient = async (client = getDefaultClient()) => {
631
666
  * This call can fail with a 401 error if the user is not logged in and the SDK should finish its initialization process
632
667
  * without throwing an error because that is an expected behavior.
633
668
  */
634
- if (isCookieEnabled(client)) await refreshAuth(client).catch(async (error) => {
669
+ if (isCookieEnabled(client)) await __refreshAuth_wrapped(client).catch(async (error) => {
635
670
  if (error.status === 401) {
636
671
  core.logger.error("Session expired during initialization", error);
637
- if (client.user) await logout(client);
672
+ if (client.user) await __logout_wrapped(client);
638
673
  } else throw error;
639
674
  });
640
675
  });
@@ -664,6 +699,18 @@ const initializeClient = async (client = getDefaultClient()) => {
664
699
  }
665
700
  if (client.user) restoreUserSharesForAllWalletAccounts(client);
666
701
  };
702
+ const __initializeClient_impl = initializeClient;
703
+ const __initializeClient_wrapped = instrumentFunction({
704
+ fn: __initializeClient_impl,
705
+ functionName: "initializeClient",
706
+ getCore: () => {
707
+ try {
708
+ return getCore(getDefaultClient());
709
+ } catch {
710
+ return;
711
+ }
712
+ }
713
+ });
667
714
 
668
715
  //#endregion
669
716
  //#region src/services/asyncTrack/createAsyncTrack.ts
@@ -680,7 +727,7 @@ const createAsyncTrack = () => {
680
727
  */
681
728
  let isTrackEnabled = true;
682
729
  const eventEmitter = new EventEmitter$1();
683
- const allSettledPromise = createDeferredPromise();
730
+ const allSettledPromise = __createDeferredPromise_wrapped();
684
731
  const tracker = /* @__PURE__ */ new Map();
685
732
  /**
686
733
  * Checks if all processes are initialized and resolves the main promise if they are.
@@ -753,47 +800,6 @@ const createWebFetch = () => {
753
800
  return window.fetch.bind(window);
754
801
  };
755
802
 
756
- //#endregion
757
- //#region src/utils/getUserAgent/getUserAgent.ts
758
- /**
759
- * Returns the browser's `navigator.userAgent` string for inclusion in
760
- * instrumentation events.
761
- *
762
- * Falls back to an empty string in environments where `navigator` is not
763
- * available (e.g., Node.js SSR, service workers) so that callers never need
764
- * to guard against undefined.
765
- * @not-instrumented
766
- */
767
- const getUserAgent = () => {
768
- try {
769
- return navigator.userAgent;
770
- } catch {
771
- return "";
772
- }
773
- };
774
-
775
- //#endregion
776
- //#region src/modules/auth/extractSessionId/extractSessionId.ts
777
- /**
778
- * Extracts the session ID (`sid` claim) from a JWT token string.
779
- *
780
- * Decodes the base64url-encoded payload segment of the token and reads the
781
- * `sid` field. This is used to correlate instrumentation events with the
782
- * authenticated session, without ever forwarding the full token.
783
- *
784
- * Returns `null` when no token is present, when the token is malformed, or
785
- * when the payload does not contain a `sid` claim.
786
- * @not-instrumented
787
- */
788
- const extractSessionId = (token) => {
789
- try {
790
- const payload = token.split(".")[1];
791
- return JSON.parse(atob(payload)).sid ?? null;
792
- } catch {
793
- return null;
794
- }
795
- };
796
-
797
803
  //#endregion
798
804
  //#region src/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.ts
799
805
  /**
@@ -817,6 +823,7 @@ const connectLoggerToInstrumentation = ({ environmentId, instrumentation, logger
817
823
  },
818
824
  sdkSessionId,
819
825
  sdkVersion,
826
+ status: "error",
820
827
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
821
828
  tokenSessionId: token ? extractSessionId(token) : null,
822
829
  userAgent: getUserAgent(),
@@ -825,22 +832,6 @@ const connectLoggerToInstrumentation = ({ environmentId, instrumentation, logger
825
832
  });
826
833
  };
827
834
 
828
- //#endregion
829
- //#region src/services/instrumentation/constants.ts
830
- const DEFAULT_PII_FIELDS = [
831
- "password",
832
- "token",
833
- "secret",
834
- "privateKey",
835
- "mnemonic",
836
- "seed",
837
- "email",
838
- "phone",
839
- "ssn",
840
- "address",
841
- "authorization"
842
- ];
843
-
844
835
  //#endregion
845
836
  //#region src/services/instrumentation/createInstrumentation/createInstrumentation.ts
846
837
  const buildPiiFields = (customFields = []) => {
@@ -866,7 +857,8 @@ const createInstrumentation = ({ config: inputConfig } = {}) => {
866
857
  piiFields: buildPiiFields(inputConfig?.piiFields)
867
858
  };
868
859
  const emit = (event) => {
869
- if (config.enabled) transport?.log(event);
860
+ if (!config.enabled || !transport) return;
861
+ transport.log(event);
870
862
  };
871
863
  return {
872
864
  config,
@@ -907,7 +899,8 @@ const createDynamicTransport = (params) => {
907
899
  flushScheduled = false;
908
900
  const events = queue.splice(0);
909
901
  if (events.length === 0) return;
910
- params.fetch(`${LOGS_BASE_URL}/${params.environmentId}`, {
902
+ const url = `${LOGS_BASE_URL}/${params.environmentId}`;
903
+ params.fetch(url, {
911
904
  body: JSON.stringify(events),
912
905
  headers: { "Content-Type": "application/json" },
913
906
  method: "POST"
@@ -981,7 +974,7 @@ const createWebPasskeyService = () => ({
981
974
  const createDebouncedMutex = () => {
982
975
  const mutexState = /* @__PURE__ */ new Map();
983
976
  return async ({ lockKey, callback, debounceTime = 0 }) => {
984
- const resolutionPromise = createDeferredPromise();
977
+ const resolutionPromise = __createDeferredPromise_wrapped();
985
978
  if (!mutexState.has(lockKey)) mutexState.set(lockKey, {
986
979
  nextCallback: null,
987
980
  queuePromise: Promise.resolve(),
@@ -1133,10 +1126,10 @@ const getInitialState = () => ({
1133
1126
  */
1134
1127
  const createCore = (config) => {
1135
1128
  const apiBaseUrl = config.coreConfig?.apiBaseUrl ?? DEFAULT_API_BASE_URL;
1136
- const logger = config.coreConfig?.logger ?? createLogger({ level: config.logLevel });
1137
- const storage = createStorage({
1129
+ const logger = config.coreConfig?.logger ?? __createLogger_wrapped({ level: config.logLevel });
1130
+ const storage = __createStorage_wrapped({
1138
1131
  prefix: `dynamic_${config.environmentId}`,
1139
- storageAdapter: config.coreConfig?.storageAdapter ?? createLocalStorageAdapter()
1132
+ storageAdapter: config.coreConfig?.storageAdapter ?? __createLocalStorageAdapter_wrapped()
1140
1133
  });
1141
1134
  const fetch = config.coreConfig?.fetch ?? createWebFetch();
1142
1135
  const openDeeplink = config.coreConfig?.openDeeplink ?? createWebDeeplinkOpener();
@@ -1161,12 +1154,12 @@ const createCore = (config) => {
1161
1154
  }));
1162
1155
  const runtimeServices = createRuntimeServices();
1163
1156
  const passkey = config.coreConfig?.passkey ?? createWebPasskeyService();
1164
- const realtime = config.coreConfig?.realtime ?? createRealtimeService();
1157
+ const realtime = config.coreConfig?.realtime ?? __createRealtimeService_wrapped();
1165
1158
  const deviceSigner = config.coreConfig?.deviceSigner;
1166
- const keychain = config.coreConfig?.keychain ?? createIndexedDBKeychainService({ dbName: `dynamic_${config.environmentId}_keychain` });
1159
+ const keychain = config.coreConfig?.keychain ?? __createIndexedDBKeychainService_wrapped({ dbName: `dynamic_${config.environmentId}_keychain` });
1167
1160
  return {
1168
1161
  apiBaseUrl,
1169
- crossTabBroadcast: config.coreConfig?.crossTabBroadcast ?? createCrossTabBroadcast({ channelName: `dynamic_${config.environmentId}_broadcast` }),
1162
+ crossTabBroadcast: config.coreConfig?.crossTabBroadcast ?? __createCrossTabBroadcast_wrapped({ channelName: `dynamic_${config.environmentId}_broadcast` }),
1170
1163
  debouncedMutex,
1171
1164
  deviceSigner,
1172
1165
  environmentId: config.environmentId,
@@ -1242,11 +1235,23 @@ const createDynamicClient = (config) => {
1242
1235
  core.logger.debug("[createDynamicClient] Creating client...");
1243
1236
  if (shouldAutoInitialize) {
1244
1237
  core.logger.debug("[createDynamicClient] Initializing client...");
1245
- initializeClient(client);
1238
+ __initializeClient_wrapped(client);
1246
1239
  }
1247
1240
  setDefaultClient(client);
1248
1241
  return client;
1249
1242
  };
1243
+ const __createDynamicClient_impl = createDynamicClient;
1244
+ const __createDynamicClient_wrapped = instrumentFunction({
1245
+ fn: __createDynamicClient_impl,
1246
+ functionName: "createDynamicClient",
1247
+ getCore: () => {
1248
+ try {
1249
+ return getCore(getDefaultClient());
1250
+ } catch {
1251
+ return;
1252
+ }
1253
+ }
1254
+ });
1250
1255
 
1251
1256
  //#endregion
1252
1257
  //#region src/errors/CheckoutSessionTokenMissingError.ts
@@ -1637,7 +1642,7 @@ const STEP_UP_REQUIRED_DEFAULT = {
1637
1642
  * @instrumented
1638
1643
  */
1639
1644
  const checkStepUpAuth = async ({ scope }, client = getDefaultClient()) => {
1640
- if (getElevatedAccessToken({
1645
+ if (__getElevatedAccessToken_wrapped({
1641
1646
  consume: false,
1642
1647
  scope
1643
1648
  }, client)) return {
@@ -1646,7 +1651,7 @@ const checkStepUpAuth = async ({ scope }, client = getDefaultClient()) => {
1646
1651
  };
1647
1652
  try {
1648
1653
  const core = getCore(client);
1649
- const response = await createApiClient({}, client).stepUpCheck({
1654
+ const response = await __createApiClient_wrapped({}, client).stepUpCheck({
1650
1655
  environmentId: core.environmentId,
1651
1656
  stepUpCheckRequest: { scope }
1652
1657
  });
@@ -1659,6 +1664,18 @@ const checkStepUpAuth = async ({ scope }, client = getDefaultClient()) => {
1659
1664
  return STEP_UP_REQUIRED_DEFAULT;
1660
1665
  }
1661
1666
  };
1667
+ const __checkStepUpAuth_impl = checkStepUpAuth;
1668
+ const __checkStepUpAuth_wrapped = instrumentFunction({
1669
+ fn: __checkStepUpAuth_impl,
1670
+ functionName: "checkStepUpAuth",
1671
+ getCore: () => {
1672
+ try {
1673
+ return getCore(getDefaultClient());
1674
+ } catch {
1675
+ return;
1676
+ }
1677
+ }
1678
+ });
1662
1679
 
1663
1680
  //#endregion
1664
1681
  //#region src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts
@@ -1679,7 +1696,7 @@ const checkStepUpAuth = async ({ scope }, client = getDefaultClient()) => {
1679
1696
  */
1680
1697
  const requestExternalAuthElevatedToken = async ({ externalJwt }, client = getDefaultClient()) => {
1681
1698
  const core = getCore(client);
1682
- const response = await createApiClient({}, client).externalAuthVerify({
1699
+ const response = await __createApiClient_wrapped({}, client).externalAuthVerify({
1683
1700
  environmentId: core.environmentId,
1684
1701
  externalAuthSigninRequest: { jwt: externalJwt }
1685
1702
  });
@@ -1693,6 +1710,18 @@ const requestExternalAuthElevatedToken = async ({ externalJwt }, client = getDef
1693
1710
  }
1694
1711
  return response;
1695
1712
  };
1713
+ const __requestExternalAuthElevatedToken_impl = requestExternalAuthElevatedToken;
1714
+ const __requestExternalAuthElevatedToken_wrapped = instrumentFunction({
1715
+ fn: __requestExternalAuthElevatedToken_impl,
1716
+ functionName: "requestExternalAuthElevatedToken",
1717
+ getCore: () => {
1718
+ try {
1719
+ return getCore(getDefaultClient());
1720
+ } catch {
1721
+ return;
1722
+ }
1723
+ }
1724
+ });
1696
1725
 
1697
1726
  //#endregion
1698
1727
  //#region src/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.ts
@@ -1711,16 +1740,29 @@ const requestExternalAuthElevatedToken = async ({ externalJwt }, client = getDef
1711
1740
  */
1712
1741
  const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, client = getDefaultClient()) => {
1713
1742
  const core = getCore(client);
1714
- const response = await createApiClient({}, client).externalAuthSignin({
1743
+ const response = await __createApiClient_wrapped({}, client).externalAuthSignin({
1715
1744
  environmentId: core.environmentId,
1716
1745
  externalAuthSigninRequest: {
1717
1746
  jwt: externalJwt,
1718
1747
  sessionPublicKey
1719
1748
  }
1720
1749
  });
1721
- updateAuthFromVerifyResponse({ response }, client);
1750
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
1722
1751
  return response;
1723
1752
  };
1753
+ const __signInWithExternalJwt_impl = signInWithExternalJwt;
1754
+ const __signInWithExternalJwt_wrapped = instrumentFunction({
1755
+ fn: __signInWithExternalJwt_impl,
1756
+ functionName: "signInWithExternalJwt",
1757
+ getCore: () => {
1758
+ try {
1759
+ return getCore(getDefaultClient());
1760
+ } catch {
1761
+ return;
1762
+ }
1763
+ },
1764
+ redactAll: true
1765
+ });
1724
1766
 
1725
1767
  //#endregion
1726
1768
  //#region src/modules/auth/passkeys/deletePasskey/deletePasskey.ts
@@ -1734,7 +1776,7 @@ const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, cli
1734
1776
  */
1735
1777
  const deletePasskey = async ({ passkeyId }, client = getDefaultClient()) => {
1736
1778
  const core = getCore(client);
1737
- await createApiClient({
1779
+ await __createApiClient_wrapped({
1738
1780
  elevatedAccessTokenScope: TokenScope.Credentialunlink,
1739
1781
  includeMfaToken: true
1740
1782
  }, client).deletePasskey({
@@ -1742,6 +1784,18 @@ const deletePasskey = async ({ passkeyId }, client = getDefaultClient()) => {
1742
1784
  environmentId: core.environmentId
1743
1785
  });
1744
1786
  };
1787
+ const __deletePasskey_impl = deletePasskey;
1788
+ const __deletePasskey_wrapped = instrumentFunction({
1789
+ fn: __deletePasskey_impl,
1790
+ functionName: "deletePasskey",
1791
+ getCore: () => {
1792
+ try {
1793
+ return getCore(getDefaultClient());
1794
+ } catch {
1795
+ return;
1796
+ }
1797
+ }
1798
+ });
1745
1799
 
1746
1800
  //#endregion
1747
1801
  //#region src/modules/auth/passkeys/getPasskeys/getPasskeys.ts
@@ -1757,15 +1811,27 @@ const deletePasskey = async ({ passkeyId }, client = getDefaultClient()) => {
1757
1811
  */
1758
1812
  const getPasskeys = async (client = getDefaultClient()) => {
1759
1813
  const core = getCore(client);
1760
- return (await createApiClient({}, client).getUserPasskeys({ environmentId: core.environmentId })).passkeys;
1814
+ return (await __createApiClient_wrapped({}, client).getUserPasskeys({ environmentId: core.environmentId })).passkeys;
1761
1815
  };
1816
+ const __getPasskeys_impl = getPasskeys;
1817
+ const __getPasskeys_wrapped = instrumentFunction({
1818
+ fn: __getPasskeys_impl,
1819
+ functionName: "getPasskeys",
1820
+ getCore: () => {
1821
+ try {
1822
+ return getCore(getDefaultClient());
1823
+ } catch {
1824
+ return;
1825
+ }
1826
+ }
1827
+ });
1762
1828
 
1763
1829
  //#endregion
1764
1830
  //#region src/modules/auth/passkeys/getPasskeyRegistrationOptions/getPasskeyRegistrationOptions.ts
1765
1831
  /** @not-instrumented */
1766
1832
  const getPasskeyRegistrationOptions = async (client) => {
1767
1833
  const core = getCore(client);
1768
- return await createApiClient({}, client).getPasskeyRegistrationOptions({ environmentId: core.environmentId });
1834
+ return await __createApiClient_wrapped({}, client).getPasskeyRegistrationOptions({ environmentId: core.environmentId });
1769
1835
  };
1770
1836
 
1771
1837
  //#endregion
@@ -1773,7 +1839,7 @@ const getPasskeyRegistrationOptions = async (client) => {
1773
1839
  /** @not-instrumented */
1774
1840
  const serverRegisterPasskey = async ({ registration, createMfaToken }, client) => {
1775
1841
  const core = getCore(client);
1776
- return await createApiClient({ elevatedAccessTokenScope: TokenScope.Credentiallink }, client).registerPasskey({
1842
+ return await __createApiClient_wrapped({ elevatedAccessTokenScope: TokenScope.Credentiallink }, client).registerPasskey({
1777
1843
  environmentId: core.environmentId,
1778
1844
  passkeyRegisterRequest: {
1779
1845
  ...registration,
@@ -1809,16 +1875,28 @@ const registerPasskey = async ({ createMfaToken } = {}, client = getDefaultClien
1809
1875
  createMfaToken,
1810
1876
  registration: await core.passkey.register({ optionsJSON: options })
1811
1877
  }, client);
1812
- updateAuthFromVerifyResponse({ response }, client);
1878
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
1813
1879
  return response;
1814
1880
  };
1881
+ const __registerPasskey_impl = registerPasskey;
1882
+ const __registerPasskey_wrapped = instrumentFunction({
1883
+ fn: __registerPasskey_impl,
1884
+ functionName: "registerPasskey",
1885
+ getCore: () => {
1886
+ try {
1887
+ return getCore(getDefaultClient());
1888
+ } catch {
1889
+ return;
1890
+ }
1891
+ }
1892
+ });
1815
1893
 
1816
1894
  //#endregion
1817
1895
  //#region src/modules/auth/passkeys/getPasskeyAuthenticationSignInOptions/getPasskeyAuthenticationSignInOptions.ts
1818
1896
  /** @not-instrumented */
1819
1897
  const getPasskeyAuthenticationSignInOptions = async ({ relatedOriginRpId } = {}, client) => {
1820
1898
  const core = getCore(client);
1821
- return await createApiClient({}, client).getPasskeyAuthenticationSigninOptions({
1899
+ return await __createApiClient_wrapped({}, client).getPasskeyAuthenticationSigninOptions({
1822
1900
  environmentId: core.environmentId,
1823
1901
  relatedOriginRpId
1824
1902
  });
@@ -1829,7 +1907,7 @@ const getPasskeyAuthenticationSignInOptions = async ({ relatedOriginRpId } = {},
1829
1907
  /** @not-instrumented */
1830
1908
  const serverSigninPasskey = async ({ authentication, createMfaToken }, client) => {
1831
1909
  const core = getCore(client);
1832
- return await createApiClient({}, client).signinWithPasskey({
1910
+ return await __createApiClient_wrapped({}, client).signinWithPasskey({
1833
1911
  environmentId: core.environmentId,
1834
1912
  passkeyAuthRequest: {
1835
1913
  ...authentication,
@@ -1861,9 +1939,21 @@ const signInWithPasskey = async ({ relatedOriginRpId } = {}, client = getDefault
1861
1939
  if (!core.passkey.isSupported()) throw new NoWebAuthNSupportError();
1862
1940
  const formattedOptions = { ...await getPasskeyAuthenticationSignInOptions({ relatedOriginRpId }, client) };
1863
1941
  const response = await serverSigninPasskey({ authentication: await core.passkey.authenticate({ optionsJSON: formattedOptions }) }, client);
1864
- updateAuthFromVerifyResponse({ response }, client);
1942
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
1865
1943
  return response;
1866
1944
  };
1945
+ const __signInWithPasskey_impl = signInWithPasskey;
1946
+ const __signInWithPasskey_wrapped = instrumentFunction({
1947
+ fn: __signInWithPasskey_impl,
1948
+ functionName: "signInWithPasskey",
1949
+ getCore: () => {
1950
+ try {
1951
+ return getCore(getDefaultClient());
1952
+ } catch {
1953
+ return;
1954
+ }
1955
+ }
1956
+ });
1867
1957
 
1868
1958
  //#endregion
1869
1959
  //#region src/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.ts
@@ -1887,6 +1977,18 @@ const getUserSocialAccounts = (client = getDefaultClient()) => {
1887
1977
  verifiedCredentialId: credential.id
1888
1978
  }));
1889
1979
  };
1980
+ const __getUserSocialAccounts_impl = getUserSocialAccounts;
1981
+ const __getUserSocialAccounts_wrapped = instrumentFunction({
1982
+ fn: __getUserSocialAccounts_impl,
1983
+ functionName: "getUserSocialAccounts",
1984
+ getCore: () => {
1985
+ try {
1986
+ return getCore(getDefaultClient());
1987
+ } catch {
1988
+ return;
1989
+ }
1990
+ }
1991
+ });
1890
1992
 
1891
1993
  //#endregion
1892
1994
  //#region src/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.ts
@@ -1901,7 +2003,7 @@ const removeDynamicOauthParamsFromUrl = (url) => {
1901
2003
  //#endregion
1902
2004
  //#region src/modules/auth/social/oauth/redirectStateStorageSchema/redirectStateStorageSchema.ts
1903
2005
  /** The schema to track the state of the OAuth flow. */
1904
- const redirectStateStorageKeySchema = createStorageKeySchema({
2006
+ const redirectStateStorageKeySchema = __createStorageKeySchema_wrapped({
1905
2007
  key: "redirectState",
1906
2008
  schema: z.object({
1907
2009
  codeVerifier: z.optional(z.string()),
@@ -2031,7 +2133,7 @@ const buildOAuthUrl = async (core, provider) => {
2031
2133
  */
2032
2134
  const authenticateWithSocial = async ({ provider, redirectUrl }, client = getDefaultClient()) => {
2033
2135
  const core = getCore(client);
2034
- const apiClient = createApiClient({}, client);
2136
+ const apiClient = __createApiClient_wrapped({}, client);
2035
2137
  await core.initTrack.waitForAll();
2036
2138
  const providerType = provider;
2037
2139
  const { url, state, codeVerifier } = await buildOAuthUrl(core, providerType);
@@ -2050,6 +2152,18 @@ const authenticateWithSocial = async ({ provider, redirectUrl }, client = getDef
2050
2152
  });
2051
2153
  await core.navigate(url.toString());
2052
2154
  };
2155
+ const __authenticateWithSocial_impl = authenticateWithSocial;
2156
+ const __authenticateWithSocial_wrapped = instrumentFunction({
2157
+ fn: __authenticateWithSocial_impl,
2158
+ functionName: "authenticateWithSocial",
2159
+ getCore: () => {
2160
+ try {
2161
+ return getCore(getDefaultClient());
2162
+ } catch {
2163
+ return;
2164
+ }
2165
+ }
2166
+ });
2053
2167
 
2054
2168
  //#endregion
2055
2169
  //#region src/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.ts
@@ -2069,7 +2183,7 @@ const authenticateWithSocial = async ({ provider, redirectUrl }, client = getDef
2069
2183
  */
2070
2184
  const completeSocialAuthentication = async ({ url, requestedScopes }, client = getDefaultClient()) => {
2071
2185
  const core = getCore(client);
2072
- const apiClient = createApiClient({}, client);
2186
+ const apiClient = __createApiClient_wrapped({}, client);
2073
2187
  await core.initTrack.waitForAll();
2074
2188
  const dynamicOauthState = url.searchParams.get("dynamicOauthState");
2075
2189
  const dynamicOauthCode = url.searchParams.get("dynamicOauthCode");
@@ -2094,16 +2208,28 @@ const completeSocialAuthentication = async ({ url, requestedScopes }, client = g
2094
2208
  else response = await apiClient.oauthSignIn({
2095
2209
  environmentId: core.environmentId,
2096
2210
  oauthRequest: {
2097
- captchaToken: consumeCaptchaToken(client),
2211
+ captchaToken: __consumeCaptchaToken_wrapped(client),
2098
2212
  code: dynamicOauthCode,
2099
2213
  codeVerifier,
2100
2214
  state: dynamicOauthState
2101
2215
  },
2102
2216
  providerType: provider
2103
2217
  });
2104
- updateAuthFromVerifyResponse({ response }, client);
2218
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
2105
2219
  return response.user;
2106
2220
  };
2221
+ const __completeSocialAuthentication_impl = completeSocialAuthentication;
2222
+ const __completeSocialAuthentication_wrapped = instrumentFunction({
2223
+ fn: __completeSocialAuthentication_impl,
2224
+ functionName: "completeSocialAuthentication",
2225
+ getCore: () => {
2226
+ try {
2227
+ return getCore(getDefaultClient());
2228
+ } catch {
2229
+ return;
2230
+ }
2231
+ }
2232
+ });
2107
2233
 
2108
2234
  //#endregion
2109
2235
  //#region src/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.ts
@@ -2128,6 +2254,18 @@ const detectOAuthRedirect = async ({ url }, client = getDefaultClient()) => {
2128
2254
  if (!storedSocialRedirectState || storedSocialRedirectState.state !== dynamicOauthState) return false;
2129
2255
  return true;
2130
2256
  };
2257
+ const __detectOAuthRedirect_impl = detectOAuthRedirect;
2258
+ const __detectOAuthRedirect_wrapped = instrumentFunction({
2259
+ fn: __detectOAuthRedirect_impl,
2260
+ functionName: "detectOAuthRedirect",
2261
+ getCore: () => {
2262
+ try {
2263
+ return getCore(getDefaultClient());
2264
+ } catch {
2265
+ return;
2266
+ }
2267
+ }
2268
+ });
2131
2269
 
2132
2270
  //#endregion
2133
2271
  //#region src/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.ts
@@ -2139,11 +2277,23 @@ const detectOAuthRedirect = async ({ url }, client = getDefaultClient()) => {
2139
2277
  * @instrumented
2140
2278
  */
2141
2279
  const getPrimaryWalletAccount = (client = getDefaultClient()) => {
2142
- const sortedLastSelectedWalletAccounts = getWalletAccounts(client).filter((walletAccount) => Boolean(walletAccount.lastSelectedAt)).sort((a, b) => b.lastSelectedAt.getTime() - a.lastSelectedAt.getTime());
2280
+ const sortedLastSelectedWalletAccounts = __getWalletAccounts_wrapped(client).filter((walletAccount) => Boolean(walletAccount.lastSelectedAt)).sort((a, b) => b.lastSelectedAt.getTime() - a.lastSelectedAt.getTime());
2143
2281
  if (sortedLastSelectedWalletAccounts.length === 0) return null;
2144
2282
  const [primaryWalletAccount] = sortedLastSelectedWalletAccounts;
2145
2283
  return primaryWalletAccount;
2146
2284
  };
2285
+ const __getPrimaryWalletAccount_impl = getPrimaryWalletAccount;
2286
+ const __getPrimaryWalletAccount_wrapped = instrumentFunction({
2287
+ fn: __getPrimaryWalletAccount_impl,
2288
+ functionName: "getPrimaryWalletAccount",
2289
+ getCore: () => {
2290
+ try {
2291
+ return getCore(getDefaultClient());
2292
+ } catch {
2293
+ return;
2294
+ }
2295
+ }
2296
+ });
2147
2297
 
2148
2298
  //#endregion
2149
2299
  //#region src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts
@@ -2157,8 +2307,8 @@ const getPrimaryWalletAccount = (client = getDefaultClient()) => {
2157
2307
  */
2158
2308
  const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefaultClient()) => {
2159
2309
  const core = getCore(client);
2160
- const apiClient = createApiClient({}, client);
2161
- const walletId = getPrimaryWalletAccount(client)?.verifiedCredentialId?.replace("-zerodev", "");
2310
+ const apiClient = __createApiClient_wrapped({}, client);
2311
+ const walletId = __getPrimaryWalletAccount_wrapped(client)?.verifiedCredentialId?.replace("-zerodev", "");
2162
2312
  const response = await apiClient.verifyUnlink({
2163
2313
  environmentId: core.environmentId,
2164
2314
  verifyUnlinkRequest: {
@@ -2166,9 +2316,21 @@ const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefault
2166
2316
  walletId: walletId ?? void 0
2167
2317
  }
2168
2318
  });
2169
- updateAuthFromVerifyResponse({ response }, client);
2319
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
2170
2320
  return response;
2171
2321
  };
2322
+ const __unlinkSocialAccount_impl = unlinkSocialAccount;
2323
+ const __unlinkSocialAccount_wrapped = instrumentFunction({
2324
+ fn: __unlinkSocialAccount_impl,
2325
+ functionName: "unlinkSocialAccount",
2326
+ getCore: () => {
2327
+ try {
2328
+ return getCore(getDefaultClient());
2329
+ } catch {
2330
+ return;
2331
+ }
2332
+ }
2333
+ });
2172
2334
 
2173
2335
  //#endregion
2174
2336
  //#region src/modules/balances/getBalances/getBalances.ts
@@ -2184,9 +2346,9 @@ const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefault
2184
2346
  */
2185
2347
  const getBalances = async ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
2186
2348
  const core = getCore(client);
2187
- const apiClient = createApiClient({}, client);
2349
+ const apiClient = __createApiClient_wrapped({}, client);
2188
2350
  if (!networkId) {
2189
- const activeNetworkId = await getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
2351
+ const activeNetworkId = await __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).getActiveNetworkId();
2190
2352
  networkId = Number(activeNetworkId.networkId);
2191
2353
  }
2192
2354
  return await apiClient.getAccountBalances({
@@ -2201,6 +2363,18 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
2201
2363
  whitelistedContracts
2202
2364
  });
2203
2365
  };
2366
+ const __getBalances_impl = getBalances;
2367
+ const __getBalances_wrapped = instrumentFunction({
2368
+ fn: __getBalances_impl,
2369
+ functionName: "getBalances",
2370
+ getCore: () => {
2371
+ try {
2372
+ return getCore(getDefaultClient());
2373
+ } catch {
2374
+ return;
2375
+ }
2376
+ }
2377
+ });
2204
2378
 
2205
2379
  //#endregion
2206
2380
  //#region src/modules/balances/getMultichainBalances/getMultichainBalances.ts
@@ -2217,17 +2391,29 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
2217
2391
  */
2218
2392
  const getMultichainBalances = async ({ balanceRequest }, client = getDefaultClient()) => {
2219
2393
  const core = getCore(client);
2220
- return (await createApiClient({}, client).postMultichainAccountBalances({
2394
+ return (await __createApiClient_wrapped({}, client).postMultichainAccountBalances({
2221
2395
  environmentId: core.environmentId,
2222
2396
  multichainAccountBalancesRequest: balanceRequest
2223
2397
  })).chainBalances;
2224
2398
  };
2399
+ const __getMultichainBalances_impl = getMultichainBalances;
2400
+ const __getMultichainBalances_wrapped = instrumentFunction({
2401
+ fn: __getMultichainBalances_impl,
2402
+ functionName: "getMultichainBalances",
2403
+ getCore: () => {
2404
+ try {
2405
+ return getCore(getDefaultClient());
2406
+ } catch {
2407
+ return;
2408
+ }
2409
+ }
2410
+ });
2225
2411
 
2226
2412
  //#endregion
2227
2413
  //#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
2228
2414
  /** @not-instrumented */
2229
2415
  const createCheckoutSessionTokenStorageKey = (transactionId) => {
2230
- return createStorageKeySchema({
2416
+ return __createStorageKeySchema_wrapped({
2231
2417
  key: `checkoutSessionToken:${transactionId}`,
2232
2418
  schema: z.string()
2233
2419
  });
@@ -2238,7 +2424,7 @@ const createCheckoutSessionTokenStorageKey = (transactionId) => {
2238
2424
  /** @not-instrumented */
2239
2425
  const createCheckoutApiClient = async ({ transactionId }, client) => {
2240
2426
  const core = getCore(client);
2241
- const apiClient = createApiClient({}, client);
2427
+ const apiClient = __createApiClient_wrapped({}, client);
2242
2428
  const sessionToken = await core.storage.getItem(createCheckoutSessionTokenStorageKey(transactionId));
2243
2429
  if (!sessionToken) throw new CheckoutSessionTokenMissingError({ transactionId });
2244
2430
  return {
@@ -2272,6 +2458,18 @@ const attachCheckoutTransactionSource = async ({ fromAddress, fromChainId, fromC
2272
2458
  xDynamicCheckoutSessionToken: sessionToken
2273
2459
  });
2274
2460
  };
2461
+ const __attachCheckoutTransactionSource_impl = attachCheckoutTransactionSource;
2462
+ const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
2463
+ fn: __attachCheckoutTransactionSource_impl,
2464
+ functionName: "attachCheckoutTransactionSource",
2465
+ getCore: () => {
2466
+ try {
2467
+ return getCore(getDefaultClient());
2468
+ } catch {
2469
+ return;
2470
+ }
2471
+ }
2472
+ });
2275
2473
 
2276
2474
  //#endregion
2277
2475
  //#region src/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.ts
@@ -2292,6 +2490,18 @@ const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client =
2292
2490
  xDynamicCheckoutSessionToken: sessionToken
2293
2491
  });
2294
2492
  };
2493
+ const __broadcastCheckoutTransaction_impl = broadcastCheckoutTransaction;
2494
+ const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
2495
+ fn: __broadcastCheckoutTransaction_impl,
2496
+ functionName: "broadcastCheckoutTransaction",
2497
+ getCore: () => {
2498
+ try {
2499
+ return getCore(getDefaultClient());
2500
+ } catch {
2501
+ return;
2502
+ }
2503
+ }
2504
+ });
2295
2505
 
2296
2506
  //#endregion
2297
2507
  //#region src/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.ts
@@ -2313,6 +2523,18 @@ const cancelCheckoutTransaction = async ({ transactionId }, client = getDefaultC
2313
2523
  await getCore(client).storage.removeItem(createCheckoutSessionTokenStorageKey(transactionId));
2314
2524
  return result;
2315
2525
  };
2526
+ const __cancelCheckoutTransaction_impl = cancelCheckoutTransaction;
2527
+ const __cancelCheckoutTransaction_wrapped = instrumentFunction({
2528
+ fn: __cancelCheckoutTransaction_impl,
2529
+ functionName: "cancelCheckoutTransaction",
2530
+ getCore: () => {
2531
+ try {
2532
+ return getCore(getDefaultClient());
2533
+ } catch {
2534
+ return;
2535
+ }
2536
+ }
2537
+ });
2316
2538
 
2317
2539
  //#endregion
2318
2540
  //#region src/modules/checkout/getCheckouts/getCheckouts.ts
@@ -2335,7 +2557,7 @@ const getCheckouts = async (client) => {
2335
2557
  */
2336
2558
  const createCheckoutTransaction = async (params, client = getDefaultClient()) => {
2337
2559
  const core = getCore(client);
2338
- const apiClient = createApiClient({}, client);
2560
+ const apiClient = __createApiClient_wrapped({}, client);
2339
2561
  const checkouts = await getCheckouts(client);
2340
2562
  const checkoutId = params.checkoutId || checkouts?.[0]?.id;
2341
2563
  assertDefined(checkoutId, "No checkout found. Please make sure you have a Checkout setup in the Dashboard.");
@@ -2356,6 +2578,18 @@ const createCheckoutTransaction = async (params, client = getDefaultClient()) =>
2356
2578
  await core.storage.setItem(createCheckoutSessionTokenStorageKey(result.transaction.id), result.sessionToken);
2357
2579
  return result;
2358
2580
  };
2581
+ const __createCheckoutTransaction_impl = createCheckoutTransaction;
2582
+ const __createCheckoutTransaction_wrapped = instrumentFunction({
2583
+ fn: __createCheckoutTransaction_impl,
2584
+ functionName: "createCheckoutTransaction",
2585
+ getCore: () => {
2586
+ try {
2587
+ return getCore(getDefaultClient());
2588
+ } catch {
2589
+ return;
2590
+ }
2591
+ }
2592
+ });
2359
2593
 
2360
2594
  //#endregion
2361
2595
  //#region src/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.ts
@@ -2369,11 +2603,23 @@ const createCheckoutTransaction = async (params, client = getDefaultClient()) =>
2369
2603
  */
2370
2604
  const getCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
2371
2605
  const core = getCore(client);
2372
- return createApiClient({}, client).getCheckoutTransaction({
2606
+ return __createApiClient_wrapped({}, client).getCheckoutTransaction({
2373
2607
  environmentId: core.environmentId,
2374
2608
  transactionId
2375
2609
  });
2376
2610
  };
2611
+ const __getCheckoutTransaction_impl = getCheckoutTransaction;
2612
+ const __getCheckoutTransaction_wrapped = instrumentFunction({
2613
+ fn: __getCheckoutTransaction_impl,
2614
+ functionName: "getCheckoutTransaction",
2615
+ getCore: () => {
2616
+ try {
2617
+ return getCore(getDefaultClient());
2618
+ } catch {
2619
+ return;
2620
+ }
2621
+ }
2622
+ });
2377
2623
 
2378
2624
  //#endregion
2379
2625
  //#region src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts
@@ -2397,6 +2643,18 @@ const getCheckoutTransactionQuote = async ({ fromTokenAddress, slippage, transac
2397
2643
  xDynamicCheckoutSessionToken: sessionToken
2398
2644
  });
2399
2645
  };
2646
+ const __getCheckoutTransactionQuote_impl = getCheckoutTransactionQuote;
2647
+ const __getCheckoutTransactionQuote_wrapped = instrumentFunction({
2648
+ fn: __getCheckoutTransactionQuote_impl,
2649
+ functionName: "getCheckoutTransactionQuote",
2650
+ getCore: () => {
2651
+ try {
2652
+ return getCore(getDefaultClient());
2653
+ } catch {
2654
+ return;
2655
+ }
2656
+ }
2657
+ });
2400
2658
 
2401
2659
  //#endregion
2402
2660
  //#region src/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.ts
@@ -2418,6 +2676,18 @@ const prepareCheckoutTransaction = async ({ transactionId }, client = getDefault
2418
2676
  xDynamicCheckoutSessionToken: sessionToken
2419
2677
  });
2420
2678
  };
2679
+ const __prepareCheckoutTransaction_impl = prepareCheckoutTransaction;
2680
+ const __prepareCheckoutTransaction_wrapped = instrumentFunction({
2681
+ fn: __prepareCheckoutTransaction_impl,
2682
+ functionName: "prepareCheckoutTransaction",
2683
+ getCore: () => {
2684
+ try {
2685
+ return getCore(getDefaultClient());
2686
+ } catch {
2687
+ return;
2688
+ }
2689
+ }
2690
+ });
2421
2691
 
2422
2692
  //#endregion
2423
2693
  //#region src/modules/wallets/utils/assertWalletProviderMethodDefined/assertWalletProviderMethodDefined.ts
@@ -2466,7 +2736,7 @@ const SWAP_SUPPORTED_CHAINS = [
2466
2736
  */
2467
2737
  const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange }, client = getDefaultClient()) => {
2468
2738
  if (!SWAP_SUPPORTED_CHAINS.includes(walletAccount.chain)) throw new InvalidParamError(`Chain ${walletAccount.chain} is not supported for swap transactions`);
2469
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
2739
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
2470
2740
  assertWalletProviderMethodDefined(walletProvider, "executeSwapTransaction");
2471
2741
  const requiredNetworkId = signingPayload.chainId;
2472
2742
  if (requiredNetworkId && walletProvider.switchActiveNetwork) {
@@ -2480,6 +2750,18 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
2480
2750
  });
2481
2751
  return { transactionHash };
2482
2752
  };
2753
+ const __executeSwapTransaction_impl = executeSwapTransaction;
2754
+ const __executeSwapTransaction_wrapped = instrumentFunction({
2755
+ fn: __executeSwapTransaction_impl,
2756
+ functionName: "executeSwapTransaction",
2757
+ getCore: () => {
2758
+ try {
2759
+ return getCore(getDefaultClient());
2760
+ } catch {
2761
+ return;
2762
+ }
2763
+ }
2764
+ });
2483
2765
 
2484
2766
  //#endregion
2485
2767
  //#region src/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.ts
@@ -2498,18 +2780,30 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
2498
2780
  * @instrumented
2499
2781
  */
2500
2782
  const submitCheckoutTransaction = async ({ onStepChange, transactionId, walletAccount }, client = getDefaultClient()) => {
2501
- const prepared = await prepareCheckoutTransaction({ transactionId }, client);
2502
- assertDefined(prepared.signingPayload, "No signing payload returned from prepare — quote may be missing transaction data");
2503
- const { transactionHash } = await executeSwapTransaction({
2783
+ const signingPayload = (await __prepareCheckoutTransaction_wrapped({ transactionId }, client)).quote?.signingPayload;
2784
+ assertDefined(signingPayload, "No signing payload returned from prepare — quote may be missing transaction data");
2785
+ const { transactionHash } = await __executeSwapTransaction_wrapped({
2504
2786
  onStepChange,
2505
- signingPayload: prepared.signingPayload,
2787
+ signingPayload,
2506
2788
  walletAccount
2507
- });
2508
- return broadcastCheckoutTransaction({
2789
+ }, client);
2790
+ return __broadcastCheckoutTransaction_wrapped({
2509
2791
  transactionId,
2510
2792
  txHash: transactionHash
2511
2793
  }, client);
2512
2794
  };
2795
+ const __submitCheckoutTransaction_impl = submitCheckoutTransaction;
2796
+ const __submitCheckoutTransaction_wrapped = instrumentFunction({
2797
+ fn: __submitCheckoutTransaction_impl,
2798
+ functionName: "submitCheckoutTransaction",
2799
+ getCore: () => {
2800
+ try {
2801
+ return getCore(getDefaultClient());
2802
+ } catch {
2803
+ return;
2804
+ }
2805
+ }
2806
+ });
2513
2807
 
2514
2808
  //#endregion
2515
2809
  //#region src/modules/checkout/utils/requiresConversion/requiresConversion.ts
@@ -2533,6 +2827,18 @@ const requiresConversion = async ({ transaction }, client = getDefaultClient())
2533
2827
  assertDefined(checkout, "Could not find checkout associated with transaction.");
2534
2828
  return !checkout.settlementConfig.settlements.some((settlement) => settlement.chainName === transaction.fromChainName && settlement.chainId === transaction.fromChainId && settlement.tokenAddress === transaction.fromToken);
2535
2829
  };
2830
+ const __requiresConversion_impl = requiresConversion;
2831
+ const __requiresConversion_wrapped = instrumentFunction({
2832
+ fn: __requiresConversion_impl,
2833
+ functionName: "requiresConversion",
2834
+ getCore: () => {
2835
+ try {
2836
+ return getCore(getDefaultClient());
2837
+ } catch {
2838
+ return;
2839
+ }
2840
+ }
2841
+ });
2536
2842
 
2537
2843
  //#endregion
2538
2844
  //#region src/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.ts
@@ -2541,11 +2847,23 @@ const DEVICE_REGISTRATION_TOKEN_HEADER = "x-dynamic-device-registration-token";
2541
2847
  const completeDeviceRegistration = async ({ deviceToken }, client = getDefaultClient()) => {
2542
2848
  assertDefined(deviceToken, "deviceToken is required");
2543
2849
  const core = getCore(client);
2544
- const response = await createApiClient({ headers: { [DEVICE_REGISTRATION_TOKEN_HEADER]: deviceToken } }, client).deviceRegistration({ environmentId: core.environmentId });
2545
- updateAuthFromVerifyResponse({ response }, client);
2850
+ const response = await __createApiClient_wrapped({ headers: { [DEVICE_REGISTRATION_TOKEN_HEADER]: deviceToken } }, client).deviceRegistration({ environmentId: core.environmentId });
2851
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
2546
2852
  emitEvent({ event: "deviceRegistrationCompleted" }, client);
2547
2853
  return response;
2548
2854
  };
2855
+ const __completeDeviceRegistration_impl = completeDeviceRegistration;
2856
+ const __completeDeviceRegistration_wrapped = instrumentFunction({
2857
+ fn: __completeDeviceRegistration_impl,
2858
+ functionName: "completeDeviceRegistration",
2859
+ getCore: () => {
2860
+ try {
2861
+ return getCore(getDefaultClient());
2862
+ } catch {
2863
+ return;
2864
+ }
2865
+ }
2866
+ });
2549
2867
 
2550
2868
  //#endregion
2551
2869
  //#region src/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.ts
@@ -2570,6 +2888,18 @@ const getDeviceRegistrationTokenFromUrl = ({ url }) => {
2570
2888
  if (!deviceRegistrationToken || deviceRegistrationToken.trim() === "") throw new InvalidDeviceRegistrationRedirectError();
2571
2889
  return deviceRegistrationToken;
2572
2890
  };
2891
+ const __getDeviceRegistrationTokenFromUrl_impl = getDeviceRegistrationTokenFromUrl;
2892
+ const __getDeviceRegistrationTokenFromUrl_wrapped = instrumentFunction({
2893
+ fn: __getDeviceRegistrationTokenFromUrl_impl,
2894
+ functionName: "getDeviceRegistrationTokenFromUrl",
2895
+ getCore: () => {
2896
+ try {
2897
+ return getCore(getDefaultClient());
2898
+ } catch {
2899
+ return;
2900
+ }
2901
+ }
2902
+ });
2573
2903
 
2574
2904
  //#endregion
2575
2905
  //#region src/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.ts
@@ -2584,19 +2914,31 @@ const getDeviceRegistrationTokenFromUrl = ({ url }) => {
2584
2914
  */
2585
2915
  const detectDeviceRegistrationRedirect = ({ url }) => {
2586
2916
  try {
2587
- getDeviceRegistrationTokenFromUrl({ url });
2917
+ __getDeviceRegistrationTokenFromUrl_wrapped({ url });
2588
2918
  return true;
2589
2919
  } catch {
2590
2920
  return false;
2591
2921
  }
2592
2922
  };
2923
+ const __detectDeviceRegistrationRedirect_impl = detectDeviceRegistrationRedirect;
2924
+ const __detectDeviceRegistrationRedirect_wrapped = instrumentFunction({
2925
+ fn: __detectDeviceRegistrationRedirect_impl,
2926
+ functionName: "detectDeviceRegistrationRedirect",
2927
+ getCore: () => {
2928
+ try {
2929
+ return getCore(getDefaultClient());
2930
+ } catch {
2931
+ return;
2932
+ }
2933
+ }
2934
+ });
2593
2935
 
2594
2936
  //#endregion
2595
2937
  //#region src/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.ts
2596
2938
  /** @instrumented */
2597
2939
  const getRegisteredDevices = async (client = getDefaultClient()) => {
2598
2940
  const core = getCore(client);
2599
- const apiClient = createApiClient({}, client);
2941
+ const apiClient = __createApiClient_wrapped({}, client);
2600
2942
  try {
2601
2943
  return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
2602
2944
  } catch (error) {
@@ -2608,6 +2950,18 @@ const getRegisteredDevices = async (client = getDefaultClient()) => {
2608
2950
  throw error;
2609
2951
  }
2610
2952
  };
2953
+ const __getRegisteredDevices_impl = getRegisteredDevices;
2954
+ const __getRegisteredDevices_wrapped = instrumentFunction({
2955
+ fn: __getRegisteredDevices_impl,
2956
+ functionName: "getRegisteredDevices",
2957
+ getCore: () => {
2958
+ try {
2959
+ return getCore(getDefaultClient());
2960
+ } catch {
2961
+ return;
2962
+ }
2963
+ }
2964
+ });
2611
2965
 
2612
2966
  //#endregion
2613
2967
  //#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
@@ -2628,9 +2982,21 @@ const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("dev
2628
2982
  /** @instrumented */
2629
2983
  const revokeAllRegisteredDevices = async (client = getDefaultClient()) => {
2630
2984
  const core = getCore(client);
2631
- await createApiClient({}, client).deleteAllDeviceRegistrations({ environmentId: core.environmentId });
2632
- await logout(client);
2633
- };
2985
+ await __createApiClient_wrapped({}, client).deleteAllDeviceRegistrations({ environmentId: core.environmentId });
2986
+ await __logout_wrapped(client);
2987
+ };
2988
+ const __revokeAllRegisteredDevices_impl = revokeAllRegisteredDevices;
2989
+ const __revokeAllRegisteredDevices_wrapped = instrumentFunction({
2990
+ fn: __revokeAllRegisteredDevices_impl,
2991
+ functionName: "revokeAllRegisteredDevices",
2992
+ getCore: () => {
2993
+ try {
2994
+ return getCore(getDefaultClient());
2995
+ } catch {
2996
+ return;
2997
+ }
2998
+ }
2999
+ });
2634
3000
 
2635
3001
  //#endregion
2636
3002
  //#region src/modules/deviceRegistration/revokeRegisteredDevice/revokeRegisteredDevice.ts
@@ -2638,11 +3004,23 @@ const revokeAllRegisteredDevices = async (client = getDefaultClient()) => {
2638
3004
  const revokeRegisteredDevice = async ({ deviceRegistrationId }, client = getDefaultClient()) => {
2639
3005
  assertDefined(deviceRegistrationId, "deviceRegistrationId is required");
2640
3006
  const core = getCore(client);
2641
- if ((await createApiClient({}, client).deleteDeviceRegistration({
3007
+ if ((await __createApiClient_wrapped({}, client).deleteDeviceRegistration({
2642
3008
  deviceRegistrationId,
2643
3009
  environmentId: core.environmentId
2644
- })).currentDeviceRevoked) await logout(client);
3010
+ })).currentDeviceRevoked) await __logout_wrapped(client);
2645
3011
  };
3012
+ const __revokeRegisteredDevice_impl = revokeRegisteredDevice;
3013
+ const __revokeRegisteredDevice_wrapped = instrumentFunction({
3014
+ fn: __revokeRegisteredDevice_impl,
3015
+ functionName: "revokeRegisteredDevice",
3016
+ getCore: () => {
3017
+ try {
3018
+ return getCore(getDefaultClient());
3019
+ } catch {
3020
+ return;
3021
+ }
3022
+ }
3023
+ });
2646
3024
 
2647
3025
  //#endregion
2648
3026
  //#region src/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.ts
@@ -2678,6 +3056,18 @@ const addCoinbaseOnrampOrderEventListener = ({ listener }, client = getDefaultCl
2678
3056
  window.removeEventListener("message", handleMessageEvent);
2679
3057
  };
2680
3058
  };
3059
+ const __addCoinbaseOnrampOrderEventListener_impl = addCoinbaseOnrampOrderEventListener;
3060
+ const __addCoinbaseOnrampOrderEventListener_wrapped = instrumentFunction({
3061
+ fn: __addCoinbaseOnrampOrderEventListener_impl,
3062
+ functionName: "addCoinbaseOnrampOrderEventListener",
3063
+ getCore: () => {
3064
+ try {
3065
+ return getCore(getDefaultClient());
3066
+ } catch {
3067
+ return;
3068
+ }
3069
+ }
3070
+ });
2681
3071
 
2682
3072
  //#endregion
2683
3073
  //#region src/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.ts
@@ -2730,6 +3120,18 @@ const getMissingVerificationForCoinbaseOnrampOrder = ({ paymentMethod }, client
2730
3120
  });
2731
3121
  return fieldsMissingVerification;
2732
3122
  };
3123
+ const __getMissingVerificationForCoinbaseOnrampOrder_impl = getMissingVerificationForCoinbaseOnrampOrder;
3124
+ const __getMissingVerificationForCoinbaseOnrampOrder_wrapped = instrumentFunction({
3125
+ fn: __getMissingVerificationForCoinbaseOnrampOrder_impl,
3126
+ functionName: "getMissingVerificationForCoinbaseOnrampOrder",
3127
+ getCore: () => {
3128
+ try {
3129
+ return getCore(getDefaultClient());
3130
+ } catch {
3131
+ return;
3132
+ }
3133
+ }
3134
+ });
2733
3135
 
2734
3136
  //#endregion
2735
3137
  //#region src/modules/funding/coinbase/utils/validateUserCredentialsForCoinbaseOnrampOrder/validateUserCredentialsForCoinbaseOnrampOrder.ts
@@ -2737,7 +3139,7 @@ const getMissingVerificationForCoinbaseOnrampOrder = ({ paymentMethod }, client
2737
3139
  const validateUserCredentialsForCoinbaseOnrampOrder = (client) => {
2738
3140
  const { user } = client;
2739
3141
  assertDefined(user, "User is not authenticated");
2740
- const fieldsMissingVerification = getMissingVerificationForCoinbaseOnrampOrder({ paymentMethod: "GUEST_CHECKOUT_APPLE_PAY" }, client);
3142
+ const fieldsMissingVerification = __getMissingVerificationForCoinbaseOnrampOrder_wrapped({ paymentMethod: "GUEST_CHECKOUT_APPLE_PAY" }, client);
2741
3143
  if (fieldsMissingVerification.find((field) => field.field === "email")) throw new MissingUserVerificationError({
2742
3144
  informationToVerify: "email",
2743
3145
  message: "User must have a verified email to create a Coinbase onramp order"
@@ -2768,7 +3170,7 @@ const validateUserCredentialsForCoinbaseOnrampOrder = (client) => {
2768
3170
  const createCoinbaseOnrampOrder = async (orderParams, client = getDefaultClient()) => {
2769
3171
  const user = validateUserCredentialsForCoinbaseOnrampOrder(client);
2770
3172
  const core = getCore(client);
2771
- const apiClient = createApiClient({ includeMfaToken: true }, client);
3173
+ const apiClient = __createApiClient_wrapped({ includeMfaToken: true }, client);
2772
3174
  const { isSandbox, ...restOrderParams } = orderParams;
2773
3175
  const orderResponse = await apiClient.createCoinbaseOnrampOrder({
2774
3176
  coinbaseOnrampOrderCreateRequest: {
@@ -2787,6 +3189,18 @@ const createCoinbaseOnrampOrder = async (orderParams, client = getDefaultClient(
2787
3189
  }
2788
3190
  };
2789
3191
  };
3192
+ const __createCoinbaseOnrampOrder_impl = createCoinbaseOnrampOrder;
3193
+ const __createCoinbaseOnrampOrder_wrapped = instrumentFunction({
3194
+ fn: __createCoinbaseOnrampOrder_impl,
3195
+ functionName: "createCoinbaseOnrampOrder",
3196
+ getCore: () => {
3197
+ try {
3198
+ return getCore(getDefaultClient());
3199
+ } catch {
3200
+ return;
3201
+ }
3202
+ }
3203
+ });
2790
3204
 
2791
3205
  //#endregion
2792
3206
  //#region src/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.ts
@@ -2800,11 +3214,23 @@ const createCoinbaseOnrampOrder = async (orderParams, client = getDefaultClient(
2800
3214
  */
2801
3215
  const getCoinbaseBuyUrl = async (buyUrlParams, client = getDefaultClient()) => {
2802
3216
  const core = getCore(client);
2803
- return await createApiClient({ includeMfaToken: true }, client).generateCoinbaseOnrampBuyUrl({
3217
+ return await __createApiClient_wrapped({ includeMfaToken: true }, client).generateCoinbaseOnrampBuyUrl({
2804
3218
  coinbaseOnrampGetBuyUrlRequest: buyUrlParams,
2805
3219
  environmentId: core.environmentId
2806
3220
  });
2807
3221
  };
3222
+ const __getCoinbaseBuyUrl_impl = getCoinbaseBuyUrl;
3223
+ const __getCoinbaseBuyUrl_wrapped = instrumentFunction({
3224
+ fn: __getCoinbaseBuyUrl_impl,
3225
+ functionName: "getCoinbaseBuyUrl",
3226
+ getCore: () => {
3227
+ try {
3228
+ return getCore(getDefaultClient());
3229
+ } catch {
3230
+ return;
3231
+ }
3232
+ }
3233
+ });
2808
3234
 
2809
3235
  //#endregion
2810
3236
  //#region src/modules/funding/cryptoDotCom/createCryptoDotComPayment/createCryptoDotComPayment.ts
@@ -2818,7 +3244,7 @@ const getCoinbaseBuyUrl = async (buyUrlParams, client = getDefaultClient()) => {
2818
3244
  */
2819
3245
  const createCryptoDotComPayment = async (paymentParams, client = getDefaultClient()) => {
2820
3246
  const core = getCore(client);
2821
- return await createApiClient({ includeMfaToken: true }, client).createCryptoDotComPayment({
3247
+ return await __createApiClient_wrapped({ includeMfaToken: true }, client).createCryptoDotComPayment({
2822
3248
  cryptoDotComPaymentCreateRequest: {
2823
3249
  ...paymentParams,
2824
3250
  chain: paymentParams.chain
@@ -2826,6 +3252,18 @@ const createCryptoDotComPayment = async (paymentParams, client = getDefaultClien
2826
3252
  environmentId: core.environmentId
2827
3253
  });
2828
3254
  };
3255
+ const __createCryptoDotComPayment_impl = createCryptoDotComPayment;
3256
+ const __createCryptoDotComPayment_wrapped = instrumentFunction({
3257
+ fn: __createCryptoDotComPayment_impl,
3258
+ functionName: "createCryptoDotComPayment",
3259
+ getCore: () => {
3260
+ try {
3261
+ return getCore(getDefaultClient());
3262
+ } catch {
3263
+ return;
3264
+ }
3265
+ }
3266
+ });
2829
3267
 
2830
3268
  //#endregion
2831
3269
  //#region src/modules/funding/kraken/createKrakenExchangeTransfer/createKrakenExchangeTransfer.ts
@@ -2839,7 +3277,7 @@ const createCryptoDotComPayment = async (paymentParams, client = getDefaultClien
2839
3277
  */
2840
3278
  const createKrakenExchangeTransfer = async (transferParams, client = getDefaultClient()) => {
2841
3279
  const core = getCore(client);
2842
- const apiClient = createApiClient({ includeMfaToken: true }, client);
3280
+ const apiClient = __createApiClient_wrapped({ includeMfaToken: true }, client);
2843
3281
  const { accountId, ...createExchangeTransferRequest } = transferParams;
2844
3282
  return await apiClient.postExchangeAccountTransfer({
2845
3283
  accountId,
@@ -2848,6 +3286,18 @@ const createKrakenExchangeTransfer = async (transferParams, client = getDefaultC
2848
3286
  exchangeKey: ExchangeKeyEnum.Kraken
2849
3287
  });
2850
3288
  };
3289
+ const __createKrakenExchangeTransfer_impl = createKrakenExchangeTransfer;
3290
+ const __createKrakenExchangeTransfer_wrapped = instrumentFunction({
3291
+ fn: __createKrakenExchangeTransfer_impl,
3292
+ functionName: "createKrakenExchangeTransfer",
3293
+ getCore: () => {
3294
+ try {
3295
+ return getCore(getDefaultClient());
3296
+ } catch {
3297
+ return;
3298
+ }
3299
+ }
3300
+ });
2851
3301
 
2852
3302
  //#endregion
2853
3303
  //#region src/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.ts
@@ -2861,13 +3311,25 @@ const createKrakenExchangeTransfer = async (transferParams, client = getDefaultC
2861
3311
  */
2862
3312
  const getKrakenAccounts = async (params, client = getDefaultClient()) => {
2863
3313
  const core = getCore(client);
2864
- return await createApiClient({ includeMfaToken: true }, client).getUserAccounts({
3314
+ return await __createApiClient_wrapped({ includeMfaToken: true }, client).getUserAccounts({
2865
3315
  chainName: params?.chainName,
2866
3316
  environmentId: core.environmentId,
2867
3317
  exchangeKey: ExchangeKeyEnum.Kraken,
2868
3318
  networkId: params?.networkId
2869
3319
  });
2870
3320
  };
3321
+ const __getKrakenAccounts_impl = getKrakenAccounts;
3322
+ const __getKrakenAccounts_wrapped = instrumentFunction({
3323
+ fn: __getKrakenAccounts_impl,
3324
+ functionName: "getKrakenAccounts",
3325
+ getCore: () => {
3326
+ try {
3327
+ return getCore(getDefaultClient());
3328
+ } catch {
3329
+ return;
3330
+ }
3331
+ }
3332
+ });
2871
3333
 
2872
3334
  //#endregion
2873
3335
  //#region src/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.ts
@@ -2880,11 +3342,23 @@ const getKrakenAccounts = async (params, client = getDefaultClient()) => {
2880
3342
  */
2881
3343
  const getKrakenWhitelistedAddresses = async (client = getDefaultClient()) => {
2882
3344
  const core = getCore(client);
2883
- return await createApiClient({ includeMfaToken: true }, client).getExchangeTransferDestinations({
3345
+ return await __createApiClient_wrapped({ includeMfaToken: true }, client).getExchangeTransferDestinations({
2884
3346
  environmentId: core.environmentId,
2885
3347
  exchangeKey: ExchangeKeyEnum.Kraken
2886
3348
  });
2887
3349
  };
3350
+ const __getKrakenWhitelistedAddresses_impl = getKrakenWhitelistedAddresses;
3351
+ const __getKrakenWhitelistedAddresses_wrapped = instrumentFunction({
3352
+ fn: __getKrakenWhitelistedAddresses_impl,
3353
+ functionName: "getKrakenWhitelistedAddresses",
3354
+ getCore: () => {
3355
+ try {
3356
+ return getCore(getDefaultClient());
3357
+ } catch {
3358
+ return;
3359
+ }
3360
+ }
3361
+ });
2888
3362
 
2889
3363
  //#endregion
2890
3364
  //#region src/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.ts
@@ -2898,6 +3372,18 @@ const getKrakenWhitelistedAddresses = async (client = getDefaultClient()) => {
2898
3372
  const waitForClientInitialized = async (client = getDefaultClient()) => {
2899
3373
  await getCore(client).initTrack.waitForAll();
2900
3374
  };
3375
+ const __waitForClientInitialized_impl = waitForClientInitialized;
3376
+ const __waitForClientInitialized_wrapped = instrumentFunction({
3377
+ fn: __waitForClientInitialized_impl,
3378
+ functionName: "waitForClientInitialized",
3379
+ getCore: () => {
3380
+ try {
3381
+ return getCore(getDefaultClient());
3382
+ } catch {
3383
+ return;
3384
+ }
3385
+ }
3386
+ });
2901
3387
 
2902
3388
  //#endregion
2903
3389
  //#region src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts
@@ -2912,6 +3398,18 @@ const waitForClientInitialized = async (client = getDefaultClient()) => {
2912
3398
  const setInstrumentationEnabled = (enabled, client = getDefaultClient()) => {
2913
3399
  getCore(client).instrumentation.setEnabled(enabled);
2914
3400
  };
3401
+ const __setInstrumentationEnabled_impl = setInstrumentationEnabled;
3402
+ const __setInstrumentationEnabled_wrapped = instrumentFunction({
3403
+ fn: __setInstrumentationEnabled_impl,
3404
+ functionName: "setInstrumentationEnabled",
3405
+ getCore: () => {
3406
+ try {
3407
+ return getCore(getDefaultClient());
3408
+ } catch {
3409
+ return;
3410
+ }
3411
+ }
3412
+ });
2915
3413
 
2916
3414
  //#endregion
2917
3415
  //#region src/modules/legacyWalletBook/getWalletBookCdnUrl/getWalletBookCdnUrl.ts
@@ -2971,7 +3469,7 @@ const fetchWithTimeout = async (client) => {
2971
3469
  /**
2972
3470
  * The schema to store the cached wallet book data.
2973
3471
  */
2974
- const walletBookCacheStorageKeySchema = createStorageKeySchema({
3472
+ const walletBookCacheStorageKeySchema = __createStorageKeySchema_wrapped({
2975
3473
  key: "legacyWalletBookCache",
2976
3474
  schema: z.object({
2977
3475
  groups: z.record(z.string(), z.any()),
@@ -3216,7 +3714,7 @@ const getChainFromWalletSchema = ({ wallet, walletKey }) => {
3216
3714
  const firstChain = wallet.chains[0];
3217
3715
  const chainPrefix = extractChainPrefix({ chainIdentifier: firstChain });
3218
3716
  try {
3219
- return getChainFromVerifiedCredentialChain(chainPrefix);
3717
+ return __getChainFromVerifiedCredentialChain_wrapped(chainPrefix);
3220
3718
  } catch {}
3221
3719
  }
3222
3720
  if (walletKey) {
@@ -3296,6 +3794,18 @@ const transformWalletBook = ({ walletBook }) => {
3296
3794
  const getWalletConnectCatalog = async (client = getDefaultClient()) => {
3297
3795
  return transformWalletBook({ walletBook: await fetchLegacyWalletBook(client) });
3298
3796
  };
3797
+ const __getWalletConnectCatalog_impl = getWalletConnectCatalog;
3798
+ const __getWalletConnectCatalog_wrapped = instrumentFunction({
3799
+ fn: __getWalletConnectCatalog_impl,
3800
+ functionName: "getWalletConnectCatalog",
3801
+ getCore: () => {
3802
+ try {
3803
+ return getCore(getDefaultClient());
3804
+ } catch {
3805
+ return;
3806
+ }
3807
+ }
3808
+ });
3299
3809
 
3300
3810
  //#endregion
3301
3811
  //#region src/modules/wallets/walletProvider/extractChainFromNormalizedName/extractChainFromNormalizedName.ts
@@ -3334,7 +3844,7 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
3334
3844
  let walletProviderName = normalizedWalletNameWithChain.toLowerCase();
3335
3845
  if (walletProviderName.endsWith(chain.toLowerCase())) walletProviderName = walletProviderName.slice(0, -chain.length);
3336
3846
  walletProviderName = walletProviderName.replace(/wallet/g, "");
3337
- const walletConnectCatalog = await getWalletConnectCatalog(client);
3847
+ const walletConnectCatalog = await __getWalletConnectCatalog_wrapped(client);
3338
3848
  for (const [walletKey, wallet] of Object.entries(walletConnectCatalog.wallets)) {
3339
3849
  if (wallet.chain !== chain) continue;
3340
3850
  const walletKeyLower = walletKey.toLowerCase();
@@ -3342,6 +3852,18 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
3342
3852
  if (walletKeyLower.includes(walletProviderName) || walletNameLower.includes(walletProviderName)) return wallet;
3343
3853
  }
3344
3854
  };
3855
+ const __getWalletConnectCatalogWalletByWalletProviderKey_impl = getWalletConnectCatalogWalletByWalletProviderKey;
3856
+ const __getWalletConnectCatalogWalletByWalletProviderKey_wrapped = instrumentFunction({
3857
+ fn: __getWalletConnectCatalogWalletByWalletProviderKey_impl,
3858
+ functionName: "getWalletConnectCatalogWalletByWalletProviderKey",
3859
+ getCore: () => {
3860
+ try {
3861
+ return getCore(getDefaultClient());
3862
+ } catch {
3863
+ return;
3864
+ }
3865
+ }
3866
+ });
3345
3867
 
3346
3868
  //#endregion
3347
3869
  //#region src/modules/user/updateUser/updateUser.ts
@@ -3361,11 +3883,11 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
3361
3883
  */
3362
3884
  const updateUser = async ({ userFields }, client = getDefaultClient()) => {
3363
3885
  const core = getCore(client);
3364
- const response = await createApiClient({ includeMfaToken: true }, client).updateSelf({
3886
+ const response = await __createApiClient_wrapped({ includeMfaToken: true }, client).updateSelf({
3365
3887
  environmentId: core.environmentId,
3366
3888
  userFields
3367
3889
  });
3368
- updateAuthFromVerifyResponse({ response }, client);
3890
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
3369
3891
  if (response.emailVerification) return {
3370
3892
  email: response.emailVerification.email,
3371
3893
  verificationUUID: response.emailVerification.verificationUUID
@@ -3377,6 +3899,19 @@ const updateUser = async ({ userFields }, client = getDefaultClient()) => {
3377
3899
  verificationUUID: response.smsVerification.verificationUUID
3378
3900
  };
3379
3901
  };
3902
+ const __updateUser_impl = updateUser;
3903
+ const __updateUser_wrapped = instrumentFunction({
3904
+ fn: __updateUser_impl,
3905
+ functionName: "updateUser",
3906
+ getCore: () => {
3907
+ try {
3908
+ return getCore(getDefaultClient());
3909
+ } catch {
3910
+ return;
3911
+ }
3912
+ },
3913
+ redactAll: true
3914
+ });
3380
3915
 
3381
3916
  //#endregion
3382
3917
  //#region src/modules/mfa/acknowledgeRecoveryCodes/acknowledgeRecoveryCodes.ts
@@ -3391,8 +3926,20 @@ const updateUser = async ({ userFields }, client = getDefaultClient()) => {
3391
3926
  * @instrumented
3392
3927
  */
3393
3928
  const acknowledgeRecoveryCodes = async (client = getDefaultClient()) => {
3394
- return updateUser({ userFields: { mfaBackupCodeAcknowledgement: MfaBackupCodeAcknowledgement.Complete } }, client);
3929
+ return __updateUser_wrapped({ userFields: { mfaBackupCodeAcknowledgement: MfaBackupCodeAcknowledgement.Complete } }, client);
3395
3930
  };
3931
+ const __acknowledgeRecoveryCodes_impl = acknowledgeRecoveryCodes;
3932
+ const __acknowledgeRecoveryCodes_wrapped = instrumentFunction({
3933
+ fn: __acknowledgeRecoveryCodes_impl,
3934
+ functionName: "acknowledgeRecoveryCodes",
3935
+ getCore: () => {
3936
+ try {
3937
+ return getCore(getDefaultClient());
3938
+ } catch {
3939
+ return;
3940
+ }
3941
+ }
3942
+ });
3396
3943
 
3397
3944
  //#endregion
3398
3945
  //#region src/modules/mfa/authenticateMfaRecoveryCode/authenticateMfaRecoveryCode.ts
@@ -3411,7 +3958,7 @@ const acknowledgeRecoveryCodes = async (client = getDefaultClient()) => {
3411
3958
  */
3412
3959
  const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, requestedScopes }, client = getDefaultClient()) => {
3413
3960
  const core = getCore(client);
3414
- const apiClient = createApiClient({}, client);
3961
+ const apiClient = __createApiClient_wrapped({}, client);
3415
3962
  try {
3416
3963
  const response = await apiClient.authMfaRecovery({
3417
3964
  environmentId: core.environmentId,
@@ -3421,7 +3968,7 @@ const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, reques
3421
3968
  requestedScopes
3422
3969
  }
3423
3970
  });
3424
- updateAuthFromVerifyResponse({ response }, client);
3971
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
3425
3972
  emitEvent({
3426
3973
  args: { mfaToken: response.mfaToken },
3427
3974
  event: "mfaCompletionSuccess"
@@ -3435,13 +3982,25 @@ const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, reques
3435
3982
  throw error;
3436
3983
  }
3437
3984
  };
3985
+ const __authenticateMfaRecoveryCode_impl = authenticateMfaRecoveryCode;
3986
+ const __authenticateMfaRecoveryCode_wrapped = instrumentFunction({
3987
+ fn: __authenticateMfaRecoveryCode_impl,
3988
+ functionName: "authenticateMfaRecoveryCode",
3989
+ getCore: () => {
3990
+ try {
3991
+ return getCore(getDefaultClient());
3992
+ } catch {
3993
+ return;
3994
+ }
3995
+ }
3996
+ });
3438
3997
 
3439
3998
  //#endregion
3440
3999
  //#region src/modules/auth/passkeys/getPasskeyAuthenticationOptions/getPasskeyAuthenticationOptions.ts
3441
4000
  /** @not-instrumented */
3442
4001
  const getPasskeyAuthenticationOptions = async ({ relatedOriginRpId } = {}, client) => {
3443
4002
  const core = getCore(client);
3444
- return await createApiClient({}, client).getPasskeyAuthenticationOptions({
4003
+ return await __createApiClient_wrapped({}, client).getPasskeyAuthenticationOptions({
3445
4004
  environmentId: core.environmentId,
3446
4005
  relatedOriginRpId
3447
4006
  });
@@ -3452,7 +4011,7 @@ const getPasskeyAuthenticationOptions = async ({ relatedOriginRpId } = {}, clien
3452
4011
  /** @not-instrumented */
3453
4012
  const serverAuthenticatePasskey = async ({ authentication, createMfaToken, requestedScopes }, client) => {
3454
4013
  const core = getCore(client);
3455
- return await createApiClient({}, client).authenticateMfaPasskeyDevice({
4014
+ return await __createApiClient_wrapped({}, client).authenticateMfaPasskeyDevice({
3456
4015
  environmentId: core.environmentId,
3457
4016
  passkeyAuthRequest: {
3458
4017
  ...authentication,
@@ -3501,7 +4060,7 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
3501
4060
  createMfaToken,
3502
4061
  requestedScopes
3503
4062
  }, client);
3504
- updateAuthFromVerifyResponse({ response }, client);
4063
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
3505
4064
  emitEvent({
3506
4065
  args: { mfaToken: response.mfaToken },
3507
4066
  event: "mfaCompletionSuccess"
@@ -3515,6 +4074,18 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
3515
4074
  throw error;
3516
4075
  }
3517
4076
  };
4077
+ const __authenticatePasskeyMFA_impl = authenticatePasskeyMFA;
4078
+ const __authenticatePasskeyMFA_wrapped = instrumentFunction({
4079
+ fn: __authenticatePasskeyMFA_impl,
4080
+ functionName: "authenticatePasskeyMFA",
4081
+ getCore: () => {
4082
+ try {
4083
+ return getCore(getDefaultClient());
4084
+ } catch {
4085
+ return;
4086
+ }
4087
+ }
4088
+ });
3518
4089
 
3519
4090
  //#endregion
3520
4091
  //#region src/modules/mfa/authenticateTotpMfaDevice/authenticateTotpMfaDevice.ts
@@ -3534,7 +4105,7 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
3534
4105
  */
3535
4106
  const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions, requestedScopes }, client = getDefaultClient()) => {
3536
4107
  const core = getCore(client);
3537
- const apiClient = createApiClient({}, client);
4108
+ const apiClient = __createApiClient_wrapped({}, client);
3538
4109
  try {
3539
4110
  const response = await apiClient.authMfaTotpDevice({
3540
4111
  environmentId: core.environmentId,
@@ -3545,7 +4116,7 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
3545
4116
  requestedScopes
3546
4117
  }
3547
4118
  });
3548
- updateAuthFromVerifyResponse({ response }, client);
4119
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
3549
4120
  emitEvent({
3550
4121
  args: {
3551
4122
  deviceId,
@@ -3565,6 +4136,18 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
3565
4136
  throw error;
3566
4137
  }
3567
4138
  };
4139
+ const __authenticateTotpMfaDevice_impl = authenticateTotpMfaDevice;
4140
+ const __authenticateTotpMfaDevice_wrapped = instrumentFunction({
4141
+ fn: __authenticateTotpMfaDevice_impl,
4142
+ functionName: "authenticateTotpMfaDevice",
4143
+ getCore: () => {
4144
+ try {
4145
+ return getCore(getDefaultClient());
4146
+ } catch {
4147
+ return;
4148
+ }
4149
+ }
4150
+ });
3568
4151
 
3569
4152
  //#endregion
3570
4153
  //#region src/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.ts
@@ -3580,8 +4163,20 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
3580
4163
  */
3581
4164
  const createNewMfaRecoveryCodes = async (client = getDefaultClient()) => {
3582
4165
  const core = getCore(client);
3583
- return createApiClient({}, client).createNewRecoveryCodes({ environmentId: core.environmentId });
4166
+ return __createApiClient_wrapped({}, client).createNewRecoveryCodes({ environmentId: core.environmentId });
3584
4167
  };
4168
+ const __createNewMfaRecoveryCodes_impl = createNewMfaRecoveryCodes;
4169
+ const __createNewMfaRecoveryCodes_wrapped = instrumentFunction({
4170
+ fn: __createNewMfaRecoveryCodes_impl,
4171
+ functionName: "createNewMfaRecoveryCodes",
4172
+ getCore: () => {
4173
+ try {
4174
+ return getCore(getDefaultClient());
4175
+ } catch {
4176
+ return;
4177
+ }
4178
+ }
4179
+ });
3585
4180
 
3586
4181
  //#endregion
3587
4182
  //#region src/modules/mfa/deleteMfaDevice/deleteMfaDevice.ts
@@ -3602,16 +4197,28 @@ const createNewMfaRecoveryCodes = async (client = getDefaultClient()) => {
3602
4197
  const deleteMfaDevice = async ({ deviceId, mfaAuthToken }, client = getDefaultClient()) => {
3603
4198
  const core = getCore(client);
3604
4199
  assertDefined(deviceId, "deviceId is required");
3605
- if (!getElevatedAccessToken({
4200
+ if (!__getElevatedAccessToken_wrapped({
3606
4201
  consume: false,
3607
4202
  scope: TokenScope.Credentialunlink
3608
4203
  }, client)) assertDefined(mfaAuthToken, "mfaAuthToken is required");
3609
- return createApiClient({ elevatedAccessTokenScope: TokenScope.Credentialunlink }, client).deleteMfaDevice({
4204
+ return __createApiClient_wrapped({ elevatedAccessTokenScope: TokenScope.Credentialunlink }, client).deleteMfaDevice({
3610
4205
  environmentId: core.environmentId,
3611
4206
  mfaDeviceId: deviceId,
3612
4207
  xMfaAuthToken: mfaAuthToken ?? ""
3613
4208
  });
3614
4209
  };
4210
+ const __deleteMfaDevice_impl = deleteMfaDevice;
4211
+ const __deleteMfaDevice_wrapped = instrumentFunction({
4212
+ fn: __deleteMfaDevice_impl,
4213
+ functionName: "deleteMfaDevice",
4214
+ getCore: () => {
4215
+ try {
4216
+ return getCore(getDefaultClient());
4217
+ } catch {
4218
+ return;
4219
+ }
4220
+ }
4221
+ });
3615
4222
 
3616
4223
  //#endregion
3617
4224
  //#region src/modules/mfa/getMfaDevices/getMfaDevices.ts
@@ -3627,9 +4234,21 @@ const deleteMfaDevice = async ({ deviceId, mfaAuthToken }, client = getDefaultCl
3627
4234
  */
3628
4235
  const getMfaDevices = async (client = getDefaultClient()) => {
3629
4236
  const core = getCore(client);
3630
- const { devices } = await createApiClient({}, client).getUserMfaDevices({ environmentId: core.environmentId });
4237
+ const { devices } = await __createApiClient_wrapped({}, client).getUserMfaDevices({ environmentId: core.environmentId });
3631
4238
  return devices;
3632
4239
  };
4240
+ const __getMfaDevices_impl = getMfaDevices;
4241
+ const __getMfaDevices_wrapped = instrumentFunction({
4242
+ fn: __getMfaDevices_impl,
4243
+ functionName: "getMfaDevices",
4244
+ getCore: () => {
4245
+ try {
4246
+ return getCore(getDefaultClient());
4247
+ } catch {
4248
+ return;
4249
+ }
4250
+ }
4251
+ });
3633
4252
 
3634
4253
  //#endregion
3635
4254
  //#region src/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.ts
@@ -3647,8 +4266,20 @@ const getMfaDevices = async (client = getDefaultClient()) => {
3647
4266
  */
3648
4267
  const getMfaRecoveryCodes = async (client = getDefaultClient()) => {
3649
4268
  const core = getCore(client);
3650
- return createApiClient({}, client).getRecoveryCodes({ environmentId: core.environmentId });
4269
+ return __createApiClient_wrapped({}, client).getRecoveryCodes({ environmentId: core.environmentId });
3651
4270
  };
4271
+ const __getMfaRecoveryCodes_impl = getMfaRecoveryCodes;
4272
+ const __getMfaRecoveryCodes_wrapped = instrumentFunction({
4273
+ fn: __getMfaRecoveryCodes_impl,
4274
+ functionName: "getMfaRecoveryCodes",
4275
+ getCore: () => {
4276
+ try {
4277
+ return getCore(getDefaultClient());
4278
+ } catch {
4279
+ return;
4280
+ }
4281
+ }
4282
+ });
3652
4283
 
3653
4284
  //#endregion
3654
4285
  //#region src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts
@@ -3701,8 +4332,20 @@ const isUserMissingMfaAuth = (client = getDefaultClient()) => {
3701
4332
  */
3702
4333
  const registerTotpMfaDevice = async (client = getDefaultClient()) => {
3703
4334
  const core = getCore(client);
3704
- return createApiClient({ elevatedAccessTokenScope: TokenScope.Credentiallink }, client).registerTotpMfaDevice({ environmentId: core.environmentId });
4335
+ return __createApiClient_wrapped({ elevatedAccessTokenScope: TokenScope.Credentiallink }, client).registerTotpMfaDevice({ environmentId: core.environmentId });
3705
4336
  };
4337
+ const __registerTotpMfaDevice_impl = registerTotpMfaDevice;
4338
+ const __registerTotpMfaDevice_wrapped = instrumentFunction({
4339
+ fn: __registerTotpMfaDevice_impl,
4340
+ functionName: "registerTotpMfaDevice",
4341
+ getCore: () => {
4342
+ try {
4343
+ return getCore(getDefaultClient());
4344
+ } catch {
4345
+ return;
4346
+ }
4347
+ }
4348
+ });
3706
4349
 
3707
4350
  //#endregion
3708
4351
  //#region src/modules/mfa/setDefaultMfaDevice/setDefaultMfaDevice.ts
@@ -3719,13 +4362,25 @@ const registerTotpMfaDevice = async (client = getDefaultClient()) => {
3719
4362
  */
3720
4363
  const setDefaultMfaDevice = async ({ deviceId }, client = getDefaultClient()) => {
3721
4364
  const core = getCore(client);
3722
- const apiClient = createApiClient({}, client);
4365
+ const apiClient = __createApiClient_wrapped({}, client);
3723
4366
  assertDefined(deviceId, "deviceId is required");
3724
4367
  return apiClient.updateUserMfaDevice({
3725
4368
  environmentId: core.environmentId,
3726
4369
  mfaDeviceId: deviceId
3727
4370
  });
3728
4371
  };
4372
+ const __setDefaultMfaDevice_impl = setDefaultMfaDevice;
4373
+ const __setDefaultMfaDevice_wrapped = instrumentFunction({
4374
+ fn: __setDefaultMfaDevice_impl,
4375
+ functionName: "setDefaultMfaDevice",
4376
+ getCore: () => {
4377
+ try {
4378
+ return getCore(getDefaultClient());
4379
+ } catch {
4380
+ return;
4381
+ }
4382
+ }
4383
+ });
3729
4384
 
3730
4385
  //#endregion
3731
4386
  //#region src/modules/otp/sendEmailOTP/sendEmailOTP.ts
@@ -3743,9 +4398,9 @@ const setDefaultMfaDevice = async ({ deviceId }, client = getDefaultClient()) =>
3743
4398
  */
3744
4399
  const sendEmailOTP = async ({ email }, client = getDefaultClient()) => {
3745
4400
  const core = getCore(client);
3746
- const { verificationUUID } = await createApiClient({}, client).createEmailVerification({
4401
+ const { verificationUUID } = await __createApiClient_wrapped({}, client).createEmailVerification({
3747
4402
  emailVerificationCreateRequest: {
3748
- captchaToken: consumeCaptchaToken(client),
4403
+ captchaToken: __consumeCaptchaToken_wrapped(client),
3749
4404
  email
3750
4405
  },
3751
4406
  environmentId: core.environmentId
@@ -3755,6 +4410,19 @@ const sendEmailOTP = async ({ email }, client = getDefaultClient()) => {
3755
4410
  verificationUUID
3756
4411
  };
3757
4412
  };
4413
+ const __sendEmailOTP_impl = sendEmailOTP;
4414
+ const __sendEmailOTP_wrapped = instrumentFunction({
4415
+ fn: __sendEmailOTP_impl,
4416
+ functionName: "sendEmailOTP",
4417
+ getCore: () => {
4418
+ try {
4419
+ return getCore(getDefaultClient());
4420
+ } catch {
4421
+ return;
4422
+ }
4423
+ },
4424
+ redactAll: true
4425
+ });
3758
4426
 
3759
4427
  //#endregion
3760
4428
  //#region src/modules/otp/sendSmsOTP/supportedCountries.ts
@@ -4692,12 +5360,12 @@ const supportedCountries = {
4692
5360
  */
4693
5361
  const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = getDefaultClient()) => {
4694
5362
  const core = getCore(client);
4695
- const apiClient = createApiClient({}, client);
5363
+ const apiClient = __createApiClient_wrapped({}, client);
4696
5364
  const phoneCountryCode = supportedCountries[isoCountryCode].code;
4697
5365
  const { verificationUUID } = await apiClient.createSmsVerification({
4698
5366
  environmentId: core.environmentId,
4699
5367
  smsVerificationCreateRequest: {
4700
- captchaToken: consumeCaptchaToken(client),
5368
+ captchaToken: __consumeCaptchaToken_wrapped(client),
4701
5369
  isoCountryCode,
4702
5370
  phoneCountryCode,
4703
5371
  phoneNumber
@@ -4710,13 +5378,26 @@ const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = getDefaultCl
4710
5378
  verificationUUID
4711
5379
  };
4712
5380
  };
5381
+ const __sendSmsOTP_impl = sendSmsOTP;
5382
+ const __sendSmsOTP_wrapped = instrumentFunction({
5383
+ fn: __sendSmsOTP_impl,
5384
+ functionName: "sendSmsOTP",
5385
+ getCore: () => {
5386
+ try {
5387
+ return getCore(getDefaultClient());
5388
+ } catch {
5389
+ return;
5390
+ }
5391
+ },
5392
+ redactAll: true
5393
+ });
4713
5394
 
4714
5395
  //#endregion
4715
5396
  //#region src/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.ts
4716
5397
  /** @not-instrumented */
4717
5398
  const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, client) => {
4718
5399
  const core = getCore(client);
4719
- const apiClient = createApiClient({}, client);
5400
+ const apiClient = __createApiClient_wrapped({}, client);
4720
5401
  const verifyRequest = {
4721
5402
  verificationToken,
4722
5403
  verificationUUID: otpVerification.verificationUUID
@@ -4736,7 +5417,7 @@ const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, cl
4736
5417
  /** @not-instrumented */
4737
5418
  const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requestedScopes }, client) => {
4738
5419
  const core = getCore(client);
4739
- const apiClient = createApiClient({}, client);
5420
+ const apiClient = __createApiClient_wrapped({}, client);
4740
5421
  const verifyRequest = {
4741
5422
  verificationToken,
4742
5423
  verificationUUID: otpVerification.verificationUUID
@@ -4777,9 +5458,21 @@ const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }
4777
5458
  otpVerification,
4778
5459
  verificationToken
4779
5460
  }, client);
4780
- updateAuthFromVerifyResponse({ response }, client);
5461
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
4781
5462
  return response;
4782
5463
  };
5464
+ const __verifyOTP_impl = verifyOTP;
5465
+ const __verifyOTP_wrapped = instrumentFunction({
5466
+ fn: __verifyOTP_impl,
5467
+ functionName: "verifyOTP",
5468
+ getCore: () => {
5469
+ try {
5470
+ return getCore(getDefaultClient());
5471
+ } catch {
5472
+ return;
5473
+ }
5474
+ }
5475
+ });
4783
5476
 
4784
5477
  //#endregion
4785
5478
  //#region src/modules/swap/getSwapQuote/getSwapQuote.ts
@@ -4793,7 +5486,7 @@ const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }
4793
5486
  */
4794
5487
  const getSwapQuote = async (params, client = getDefaultClient()) => {
4795
5488
  const core = getCore(client);
4796
- const apiClient = createApiClient({}, client);
5489
+ const apiClient = __createApiClient_wrapped({}, client);
4797
5490
  if (!params.from.amount && !params.to.amount) throw new InvalidParamError("Either from.amount or to.amount is required");
4798
5491
  if (params.from.amount && params.to.amount) throw new InvalidParamError("Only one of from.amount or to.amount is allowed");
4799
5492
  return await apiClient.swapQuote({
@@ -4815,6 +5508,18 @@ const getSwapQuote = async (params, client = getDefaultClient()) => {
4815
5508
  }
4816
5509
  });
4817
5510
  };
5511
+ const __getSwapQuote_impl = getSwapQuote;
5512
+ const __getSwapQuote_wrapped = instrumentFunction({
5513
+ fn: __getSwapQuote_impl,
5514
+ functionName: "getSwapQuote",
5515
+ getCore: () => {
5516
+ try {
5517
+ return getCore(getDefaultClient());
5518
+ } catch {
5519
+ return;
5520
+ }
5521
+ }
5522
+ });
4818
5523
 
4819
5524
  //#endregion
4820
5525
  //#region src/modules/swap/getSwapStatus/getSwapStatus.ts
@@ -4828,7 +5533,7 @@ const getSwapQuote = async (params, client = getDefaultClient()) => {
4828
5533
  */
4829
5534
  const getSwapStatus = async (params, client = getDefaultClient()) => {
4830
5535
  const core = getCore(client);
4831
- const apiClient = createApiClient({}, client);
5536
+ const apiClient = __createApiClient_wrapped({}, client);
4832
5537
  let from;
4833
5538
  if (params.from) from = {
4834
5539
  chainId: params.from.networkId,
@@ -4859,6 +5564,18 @@ const getSwapStatus = async (params, client = getDefaultClient()) => {
4859
5564
  });
4860
5565
  }
4861
5566
  };
5567
+ const __getSwapStatus_impl = getSwapStatus;
5568
+ const __getSwapStatus_wrapped = instrumentFunction({
5569
+ fn: __getSwapStatus_impl,
5570
+ functionName: "getSwapStatus",
5571
+ getCore: () => {
5572
+ try {
5573
+ return getCore(getDefaultClient());
5574
+ } catch {
5575
+ return;
5576
+ }
5577
+ }
5578
+ });
4862
5579
 
4863
5580
  //#endregion
4864
5581
  //#region src/modules/user/deleteUser/deleteUser.ts
@@ -4874,9 +5591,21 @@ const getSwapStatus = async (params, client = getDefaultClient()) => {
4874
5591
  */
4875
5592
  const deleteUser = async (client = getDefaultClient()) => {
4876
5593
  const core = getCore(client);
4877
- await createApiClient({ includeMfaToken: true }, client).hardDeleteUser({ environmentId: core.environmentId });
4878
- await logout(client);
4879
- };
5594
+ await __createApiClient_wrapped({ includeMfaToken: true }, client).hardDeleteUser({ environmentId: core.environmentId });
5595
+ await __logout_wrapped(client);
5596
+ };
5597
+ const __deleteUser_impl = deleteUser;
5598
+ const __deleteUser_wrapped = instrumentFunction({
5599
+ fn: __deleteUser_impl,
5600
+ functionName: "deleteUser",
5601
+ getCore: () => {
5602
+ try {
5603
+ return getCore(getDefaultClient());
5604
+ } catch {
5605
+ return;
5606
+ }
5607
+ }
5608
+ });
4880
5609
 
4881
5610
  //#endregion
4882
5611
  //#region src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts
@@ -4914,13 +5643,25 @@ const isUserOnboardingComplete = (client = getDefaultClient()) => {
4914
5643
  */
4915
5644
  const refreshUser = async (client = getDefaultClient()) => {
4916
5645
  const core = getCore(client);
4917
- const apiClient = createApiClient({}, client);
5646
+ const apiClient = __createApiClient_wrapped({}, client);
4918
5647
  const previousState = { ...core.state.get() };
4919
5648
  const user = await apiClient.getAuthenticatedUser({ environmentId: core.environmentId });
4920
5649
  core.state.set({ user });
4921
5650
  checkAndRaiseWalletAccountsChangedEvent({ previousState }, client);
4922
5651
  return user;
4923
5652
  };
5653
+ const __refreshUser_impl = refreshUser;
5654
+ const __refreshUser_wrapped = instrumentFunction({
5655
+ fn: __refreshUser_impl,
5656
+ functionName: "refreshUser",
5657
+ getCore: () => {
5658
+ try {
5659
+ return getCore(getDefaultClient());
5660
+ } catch {
5661
+ return;
5662
+ }
5663
+ }
5664
+ });
4924
5665
 
4925
5666
  //#endregion
4926
5667
  //#region src/modules/wallets/assertWalletAccountSigningAvailability/assertWalletAccountSigningAvailability.ts
@@ -4940,7 +5681,7 @@ const refreshUser = async (client = getDefaultClient()) => {
4940
5681
  * @not-instrumented
4941
5682
  */
4942
5683
  const assertWalletAccountSigningAvailability = async ({ walletAccount }, client = getDefaultClient()) => {
4943
- const { addresses } = await getWalletProviderFromWalletAccount({ walletAccount }, client).getConnectedAddresses();
5684
+ const { addresses } = await __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).getConnectedAddresses();
4944
5685
  if (addresses.length > 0 && !addresses.includes(walletAccount.address)) throw new WalletAccountNotSelectedError({
4945
5686
  expectedAddress: walletAccount.address,
4946
5687
  selectedAddress: addresses[0]
@@ -4964,13 +5705,25 @@ const assertWalletAccountSigningAvailability = async ({ walletAccount }, client
4964
5705
  * @instrumented
4965
5706
  */
4966
5707
  const confirmTransaction = async ({ walletAccount, transactionHash }, client = getDefaultClient()) => {
4967
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
5708
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
4968
5709
  assertWalletProviderMethodDefined(walletProvider, "confirmTransaction");
4969
5710
  await walletProvider.confirmTransaction({
4970
5711
  transactionHash,
4971
5712
  walletAccount
4972
5713
  });
4973
5714
  };
5715
+ const __confirmTransaction_impl = confirmTransaction;
5716
+ const __confirmTransaction_wrapped = instrumentFunction({
5717
+ fn: __confirmTransaction_impl,
5718
+ functionName: "confirmTransaction",
5719
+ getCore: () => {
5720
+ try {
5721
+ return getCore(getDefaultClient());
5722
+ } catch {
5723
+ return;
5724
+ }
5725
+ }
5726
+ });
4974
5727
 
4975
5728
  //#endregion
4976
5729
  //#region src/utils/isMobile/isMobile.ts
@@ -5028,7 +5781,7 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
5028
5781
  const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
5029
5782
  assertWalletProviderMethodDefined(walletProvider, "connect");
5030
5783
  const { addresses } = await walletProvider.connect();
5031
- const currentAddresses = getWalletAccounts(client).map(({ address }) => address);
5784
+ const currentAddresses = __getWalletAccounts_wrapped(client).map(({ address }) => address);
5032
5785
  const mainAddress = addresses?.length ? addresses[0].address : null;
5033
5786
  /**
5034
5787
  * This error is thrown in case the wallet has no addresses connected
@@ -5052,12 +5805,24 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
5052
5805
  };
5053
5806
  if (currentAddresses.includes(mainAddress)) return walletAccount;
5054
5807
  if (addToDynamicWalletAccounts) {
5055
- setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: [walletAccount] }, client);
5808
+ __setUnverifiedWalletAccounts_wrapped({ unverifiedWalletAccountsToUpdate: [walletAccount] }, client);
5056
5809
  emitWalletAccountsChangedEvent(client);
5057
- createVisit({ walletAccount }, client);
5810
+ __createVisit_wrapped({ walletAccount }, client);
5058
5811
  }
5059
5812
  return walletAccount;
5060
5813
  };
5814
+ const __connectWithWalletProvider_impl = connectWithWalletProvider;
5815
+ const __connectWithWalletProvider_wrapped = instrumentFunction({
5816
+ fn: __connectWithWalletProvider_impl,
5817
+ functionName: "connectWithWalletProvider",
5818
+ getCore: () => {
5819
+ try {
5820
+ return getCore(getDefaultClient());
5821
+ } catch {
5822
+ return;
5823
+ }
5824
+ }
5825
+ });
5061
5826
 
5062
5827
  //#endregion
5063
5828
  //#region src/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/formatSignatureForHardwareWallet.ts
@@ -5088,14 +5853,14 @@ const getChainIdForAccountVerification = async ({ walletProvider }) => {
5088
5853
  //#endregion
5089
5854
  //#region src/modules/wallets/utils/getSignInMessage/getSignInMessage.ts
5090
5855
  /** @not-instrumented */
5091
- const getSignInMessage = async ({ walletAccount }, client) => {
5856
+ const getSignInMessage = async ({ nonce: nonceOverride, walletAccount }, client) => {
5092
5857
  const core = getCore(client);
5093
5858
  const universalLink = core.metadata?.universalLink;
5094
5859
  assertDefined(universalLink, "Universal link is not set");
5095
5860
  const url = new URL(universalLink);
5096
5861
  const domain = url.host;
5097
- const nonce = await getNonce(client);
5098
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
5862
+ const nonce = nonceOverride ?? await __getNonce_wrapped(client);
5863
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5099
5864
  if (walletProvider.chain === "STARK")
5100
5865
  /**
5101
5866
  * Starknet requires the strings to be 31 chars long
@@ -5106,7 +5871,7 @@ const getSignInMessage = async ({ walletAccount }, client) => {
5106
5871
  domain: domain.substring(0, 31),
5107
5872
  nonce
5108
5873
  });
5109
- const statement = createSignInMessageStatement(client);
5874
+ const statement = __createSignInMessageStatement_wrapped(client);
5110
5875
  return await formatSignInMessage({
5111
5876
  address: walletAccount.address,
5112
5877
  blockchainName: CHAINS_INFO_MAP[walletProvider.chain].blockchainName,
@@ -5134,9 +5899,12 @@ const getSignInMessage = async ({ walletAccount }, client) => {
5134
5899
  * @instrumented
5135
5900
  */
5136
5901
  const proveWalletAccountOwnership = async ({ walletAccount }, client = getDefaultClient()) => {
5137
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
5902
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5138
5903
  assertWalletProviderMethodDefined(walletProvider, "signMessage");
5139
- const messageToSign = await getSignInMessage({ walletAccount }, client);
5904
+ const messageToSign = await getSignInMessage({
5905
+ nonce: walletProvider.getConnectProofNonce?.(),
5906
+ walletAccount
5907
+ }, client);
5140
5908
  const { signature } = await walletProvider.signMessage({
5141
5909
  message: messageToSign,
5142
5910
  walletAccount
@@ -5146,6 +5914,18 @@ const proveWalletAccountOwnership = async ({ walletAccount }, client = getDefaul
5146
5914
  signature
5147
5915
  };
5148
5916
  };
5917
+ const __proveWalletAccountOwnership_impl = proveWalletAccountOwnership;
5918
+ const __proveWalletAccountOwnership_wrapped = instrumentFunction({
5919
+ fn: __proveWalletAccountOwnership_impl,
5920
+ functionName: "proveWalletAccountOwnership",
5921
+ getCore: () => {
5922
+ try {
5923
+ return getCore(getDefaultClient());
5924
+ } catch {
5925
+ return;
5926
+ }
5927
+ }
5928
+ });
5149
5929
 
5150
5930
  //#endregion
5151
5931
  //#region src/modules/wallets/utils/isSameAddress/isSameAddress.ts
@@ -5157,14 +5937,14 @@ const isSameAddress = (left, right, chain) => normalizeAddress(left, chain) ===
5157
5937
  /** @not-instrumented */
5158
5938
  const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfer, requestedScopes }, client) => {
5159
5939
  if (walletAccount.verifiedCredentialId) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
5160
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
5161
- const { messageToSign, signature } = await proveWalletAccountOwnership({ walletAccount }, client);
5940
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5941
+ const { messageToSign, signature } = await __proveWalletAccountOwnership_wrapped({ walletAccount }, client);
5162
5942
  const formattedSignature = walletAccount.hardwareWalletVendor ? formatSignatureForHardwareWallet({
5163
5943
  hardwareWalletVendor: walletAccount.hardwareWalletVendor,
5164
5944
  signature
5165
5945
  }) : signature;
5166
5946
  const { networkId } = await walletProvider.getActiveNetworkId();
5167
- const response = await verifyMessageSignatureOwnership({
5947
+ const response = await __verifyMessageSignatureOwnership_wrapped({
5168
5948
  addressesWithTypes: walletAccount.addressesWithTypes,
5169
5949
  chain: walletAccount.chain,
5170
5950
  isTransfer,
@@ -5178,17 +5958,17 @@ const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfe
5178
5958
  }, client);
5179
5959
  const walletVerifiedCredential = response.user?.verifiedCredentials.find((verifiedCredential) => isSameAddress(verifiedCredential.address ?? "", walletAccount.address, walletAccount.chain));
5180
5960
  assertDefined(walletVerifiedCredential, `After verifying, still unable to find verified wallet credential for wallet account ${walletAccount.address} on chain ${walletAccount.chain}`);
5181
- updateWalletProviderKeysForVerifiedCredentials({ keysToUpdate: { [walletVerifiedCredential.id]: walletProvider.key } }, client);
5961
+ __updateWalletProviderKeysForVerifiedCredentials_wrapped({ keysToUpdate: { [walletVerifiedCredential.id]: walletProvider.key } }, client);
5182
5962
  /**
5183
5963
  * Adds the user with the new wallet verified credential
5184
5964
  * This will add the new verified wallet account to the client`s state
5185
5965
  */
5186
- updateAuthFromVerifyResponse({ response }, client);
5966
+ __updateAuthFromVerifyResponse_wrapped({ response }, client);
5187
5967
  /**
5188
5968
  * Remove the now verified wallet account from the unverified wallet accounts
5189
5969
  */
5190
- removeUnverifiedWalletAccount({ unverifiedWalletAccount: walletAccount }, client);
5191
- const verifiedWalletAccount = getWalletAccounts(client).find(({ address }) => isSameAddress(address, walletAccount.address, walletAccount.chain));
5970
+ __removeUnverifiedWalletAccount_wrapped({ unverifiedWalletAccount: walletAccount }, client);
5971
+ const verifiedWalletAccount = __getWalletAccounts_wrapped(client).find(({ address }) => isSameAddress(address, walletAccount.address, walletAccount.chain));
5192
5972
  assertDefined(verifiedWalletAccount, `Unable to find wallet account ${walletAccount.address} on chain ${walletAccount.chain} for verified credential ${walletVerifiedCredential.id}`);
5193
5973
  return verifiedWalletAccount;
5194
5974
  };
@@ -5215,6 +5995,18 @@ const verifyWalletAccount = async ({ walletAccount, requestedScopes }, client =
5215
5995
  walletAccount
5216
5996
  }, client);
5217
5997
  };
5998
+ const __verifyWalletAccount_impl = verifyWalletAccount;
5999
+ const __verifyWalletAccount_wrapped = instrumentFunction({
6000
+ fn: __verifyWalletAccount_impl,
6001
+ functionName: "verifyWalletAccount",
6002
+ getCore: () => {
6003
+ try {
6004
+ return getCore(getDefaultClient());
6005
+ } catch {
6006
+ return;
6007
+ }
6008
+ }
6009
+ });
5218
6010
 
5219
6011
  //#endregion
5220
6012
  //#region src/modules/wallets/walletProvider/isDeeplinkWalletProvider/isDeeplinkWalletProvider.ts
@@ -5252,18 +6044,30 @@ const isDeeplinkWalletProvider = ({ walletProvider }) => walletProvider.walletPr
5252
6044
  const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareWalletVendor }, client = getDefaultClient()) => {
5253
6045
  const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
5254
6046
  if (isMobile() && isDeeplinkWalletProvider({ walletProvider })) throw new DeeplinkConnectAndVerifyUnsupportedError({ walletProviderKey });
5255
- const walletAccount = await connectWithWalletProvider({
6047
+ const walletAccount = await __connectWithWalletProvider_wrapped({
5256
6048
  addToDynamicWalletAccounts: false,
5257
6049
  hardwareWalletVendor,
5258
6050
  walletProviderKey
5259
6051
  }, client);
5260
- await verifyWalletAccount({ walletAccount }, client);
5261
- createVisit({
6052
+ await __verifyWalletAccount_wrapped({ walletAccount }, client);
6053
+ __createVisit_wrapped({
5262
6054
  authMode: AuthModeEnum.AndSign,
5263
6055
  walletAccount
5264
6056
  }, client);
5265
6057
  return walletAccount;
5266
6058
  };
6059
+ const __connectAndVerifyWithWalletProvider_impl = connectAndVerifyWithWalletProvider;
6060
+ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
6061
+ fn: __connectAndVerifyWithWalletProvider_impl,
6062
+ functionName: "connectAndVerifyWithWalletProvider",
6063
+ getCore: () => {
6064
+ try {
6065
+ return getCore(getDefaultClient());
6066
+ } catch {
6067
+ return;
6068
+ }
6069
+ }
6070
+ });
5267
6071
 
5268
6072
  //#endregion
5269
6073
  //#region src/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.ts
@@ -5278,7 +6082,7 @@ const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareW
5278
6082
  * @instrumented
5279
6083
  */
5280
6084
  const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
5281
- return getWalletProviders(client).filter((walletProvider) => Boolean(walletProvider.connect)).map((walletProvider) => ({
6085
+ return __getWalletProviders_wrapped(client).filter((walletProvider) => Boolean(walletProvider.connect)).map((walletProvider) => ({
5282
6086
  chain: walletProvider.chain,
5283
6087
  groupKey: walletProvider.groupKey,
5284
6088
  key: walletProvider.key,
@@ -5286,6 +6090,18 @@ const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
5286
6090
  walletProviderType: walletProvider.walletProviderType
5287
6091
  }));
5288
6092
  };
6093
+ const __getAvailableWalletProvidersData_impl = getAvailableWalletProvidersData;
6094
+ const __getAvailableWalletProvidersData_wrapped = instrumentFunction({
6095
+ fn: __getAvailableWalletProvidersData_impl,
6096
+ functionName: "getAvailableWalletProvidersData",
6097
+ getCore: () => {
6098
+ try {
6099
+ return getCore(getDefaultClient());
6100
+ } catch {
6101
+ return;
6102
+ }
6103
+ }
6104
+ });
5289
6105
 
5290
6106
  //#endregion
5291
6107
  //#region src/modules/wallets/getConnectedAddresses/getConnectedAddresses.ts
@@ -5303,15 +6119,39 @@ const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
5303
6119
  const getConnectedAddresses = ({ walletProviderKey }, client = getDefaultClient()) => {
5304
6120
  return getWalletProviderByKey({ walletProviderKey }, client).getConnectedAddresses();
5305
6121
  };
6122
+ const __getConnectedAddresses_impl = getConnectedAddresses;
6123
+ const __getConnectedAddresses_wrapped = instrumentFunction({
6124
+ fn: __getConnectedAddresses_impl,
6125
+ functionName: "getConnectedAddresses",
6126
+ getCore: () => {
6127
+ try {
6128
+ return getCore(getDefaultClient());
6129
+ } catch {
6130
+ return;
6131
+ }
6132
+ }
6133
+ });
5306
6134
 
5307
6135
  //#endregion
5308
6136
  //#region src/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.ts
5309
6137
  /** @instrumented */
5310
6138
  const getOwnerWalletAccountForSmartWalletAccount = ({ smartWalletAccount }, client = getDefaultClient()) => {
5311
- const smartWalletVerifiedCredential = getVerifiedCredentialForWalletAccount({ walletAccount: smartWalletAccount }, client);
6139
+ const smartWalletVerifiedCredential = __getVerifiedCredentialForWalletAccount_wrapped({ walletAccount: smartWalletAccount }, client);
5312
6140
  assertDefined(smartWalletVerifiedCredential?.signerRefId, "Invalid smart wallet account");
5313
- return getWalletAccounts(client).find((walletAccount) => walletAccount.verifiedCredentialId === smartWalletVerifiedCredential.signerRefId);
6141
+ return __getWalletAccounts_wrapped(client).find((walletAccount) => walletAccount.verifiedCredentialId === smartWalletVerifiedCredential.signerRefId);
5314
6142
  };
6143
+ const __getOwnerWalletAccountForSmartWalletAccount_impl = getOwnerWalletAccountForSmartWalletAccount;
6144
+ const __getOwnerWalletAccountForSmartWalletAccount_wrapped = instrumentFunction({
6145
+ fn: __getOwnerWalletAccountForSmartWalletAccount_impl,
6146
+ functionName: "getOwnerWalletAccountForSmartWalletAccount",
6147
+ getCore: () => {
6148
+ try {
6149
+ return getCore(getDefaultClient());
6150
+ } catch {
6151
+ return;
6152
+ }
6153
+ }
6154
+ });
5315
6155
 
5316
6156
  //#endregion
5317
6157
  //#region src/modules/wallets/getWalletAccountAddressByType/getWalletAccountAddressByType.ts
@@ -5404,6 +6244,18 @@ const addNetwork = async ({ networkData, walletAccount }, client = getDefaultCli
5404
6244
  });
5405
6245
  return walletProvider.addNetwork({ networkData });
5406
6246
  };
6247
+ const __addNetwork_impl = addNetwork;
6248
+ const __addNetwork_wrapped = instrumentFunction({
6249
+ fn: __addNetwork_impl,
6250
+ functionName: "addNetwork",
6251
+ getCore: () => {
6252
+ try {
6253
+ return getCore(getDefaultClient());
6254
+ } catch {
6255
+ return;
6256
+ }
6257
+ }
6258
+ });
5407
6259
 
5408
6260
  //#endregion
5409
6261
  //#region src/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.ts
@@ -5420,10 +6272,22 @@ const addNetwork = async ({ networkData, walletAccount }, client = getDefaultCli
5420
6272
  * @instrumented
5421
6273
  */
5422
6274
  const getActiveNetworkData = async ({ walletAccount }, client = getDefaultClient()) => {
5423
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
6275
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5424
6276
  const { networkId } = await walletProvider.getActiveNetworkId();
5425
- return { networkData: getNetworksData(client).find((data) => data.networkId === networkId && data.chain === walletProvider.chain) };
6277
+ return { networkData: __getNetworksData_wrapped(client).find((data) => data.networkId === networkId && data.chain === walletProvider.chain) };
5426
6278
  };
6279
+ const __getActiveNetworkData_impl = getActiveNetworkData;
6280
+ const __getActiveNetworkData_wrapped = instrumentFunction({
6281
+ fn: __getActiveNetworkData_impl,
6282
+ functionName: "getActiveNetworkData",
6283
+ getCore: () => {
6284
+ try {
6285
+ return getCore(getDefaultClient());
6286
+ } catch {
6287
+ return;
6288
+ }
6289
+ }
6290
+ });
5427
6291
 
5428
6292
  //#endregion
5429
6293
  //#region src/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.ts
@@ -5436,8 +6300,20 @@ const getActiveNetworkData = async ({ walletAccount }, client = getDefaultClient
5436
6300
  * @instrumented
5437
6301
  */
5438
6302
  const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
5439
- return getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
6303
+ return __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).getActiveNetworkId();
5440
6304
  };
6305
+ const __getActiveNetworkId_impl = getActiveNetworkId;
6306
+ const __getActiveNetworkId_wrapped = instrumentFunction({
6307
+ fn: __getActiveNetworkId_impl,
6308
+ functionName: "getActiveNetworkId",
6309
+ getCore: () => {
6310
+ try {
6311
+ return getCore(getDefaultClient());
6312
+ } catch {
6313
+ return;
6314
+ }
6315
+ }
6316
+ });
5441
6317
 
5442
6318
  //#endregion
5443
6319
  //#region src/modules/wallets/networks/getBalance/getBalance.ts
@@ -5453,13 +6329,25 @@ const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
5453
6329
  * @instrumented
5454
6330
  */
5455
6331
  const getBalance = async ({ walletAccount }, client = getDefaultClient()) => {
5456
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
6332
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5457
6333
  const { networkId } = await walletProvider.getActiveNetworkId();
5458
- return getNetworkProviderFromNetworkId({
6334
+ return __getNetworkProviderFromNetworkId_wrapped({
5459
6335
  chain: walletProvider.chain,
5460
6336
  networkId
5461
6337
  }, client).getBalance({ address: walletAccount.address });
5462
6338
  };
6339
+ const __getBalance_impl = getBalance;
6340
+ const __getBalance_wrapped = instrumentFunction({
6341
+ fn: __getBalance_impl,
6342
+ functionName: "getBalance",
6343
+ getCore: () => {
6344
+ try {
6345
+ return getCore(getDefaultClient());
6346
+ } catch {
6347
+ return;
6348
+ }
6349
+ }
6350
+ });
5463
6351
 
5464
6352
  //#endregion
5465
6353
  //#region src/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.ts
@@ -5477,13 +6365,25 @@ const getBalance = async ({ walletAccount }, client = getDefaultClient()) => {
5477
6365
  * @instrumented
5478
6366
  */
5479
6367
  const getBalanceForAddress = async ({ address, chain, networkId }, client = getDefaultClient()) => {
5480
- const networkProvider = getNetworkProviderFromNetworkId({
6368
+ const networkProvider = __getNetworkProviderFromNetworkId_wrapped({
5481
6369
  chain,
5482
6370
  networkId
5483
6371
  }, client);
5484
6372
  assertDefined(networkProvider, `No network found for chain ${chain} and network id ${networkId}. Please ensure you've enabled this network in the Dashboard.`);
5485
6373
  return networkProvider.getBalance({ address });
5486
6374
  };
6375
+ const __getBalanceForAddress_impl = getBalanceForAddress;
6376
+ const __getBalanceForAddress_wrapped = instrumentFunction({
6377
+ fn: __getBalanceForAddress_impl,
6378
+ functionName: "getBalanceForAddress",
6379
+ getCore: () => {
6380
+ try {
6381
+ return getCore(getDefaultClient());
6382
+ } catch {
6383
+ return;
6384
+ }
6385
+ }
6386
+ });
5487
6387
 
5488
6388
  //#endregion
5489
6389
  //#region src/modules/wallets/networks/getTransactionHistory/getTransactionHistory.ts
@@ -5504,13 +6404,25 @@ const getBalanceForAddress = async ({ address, chain, networkId }, client = getD
5504
6404
  */
5505
6405
  const getTransactionHistory = async (params, client = getDefaultClient()) => {
5506
6406
  const core = getCore(client);
5507
- return await createApiClient({}, client).getWalletTransactions({
6407
+ return await __createApiClient_wrapped({}, client).getWalletTransactions({
5508
6408
  address: params.address,
5509
6409
  chainName: params.chain,
5510
6410
  environmentId: core.environmentId,
5511
6411
  networkId: params.networkId
5512
6412
  });
5513
6413
  };
6414
+ const __getTransactionHistory_impl = getTransactionHistory;
6415
+ const __getTransactionHistory_wrapped = instrumentFunction({
6416
+ fn: __getTransactionHistory_impl,
6417
+ functionName: "getTransactionHistory",
6418
+ getCore: () => {
6419
+ try {
6420
+ return getCore(getDefaultClient());
6421
+ } catch {
6422
+ return;
6423
+ }
6424
+ }
6425
+ });
5514
6426
 
5515
6427
  //#endregion
5516
6428
  //#region src/modules/wallets/networks/isProgrammaticNetworkSwitchAvailable/isProgrammaticNetworkSwitchAvailable.ts
@@ -5553,6 +6465,18 @@ const switchActiveNetwork = async ({ networkId, walletAccount }, client = getDef
5553
6465
  });
5554
6466
  return walletProvider.switchActiveNetwork({ networkId });
5555
6467
  };
6468
+ const __switchActiveNetwork_impl = switchActiveNetwork;
6469
+ const __switchActiveNetwork_wrapped = instrumentFunction({
6470
+ fn: __switchActiveNetwork_impl,
6471
+ functionName: "switchActiveNetwork",
6472
+ getCore: () => {
6473
+ try {
6474
+ return getCore(getDefaultClient());
6475
+ } catch {
6476
+ return;
6477
+ }
6478
+ }
6479
+ });
5556
6480
 
5557
6481
  //#endregion
5558
6482
  //#region src/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.ts
@@ -5562,16 +6486,28 @@ const switchActiveNetwork = async ({ networkId, walletAccount }, client = getDef
5562
6486
  */
5563
6487
  const selectPrimaryWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => {
5564
6488
  const core = getCore(client);
5565
- if (getPrimaryWalletAccount(client)?.id === walletAccount.id) return;
5566
- if (walletAccount.verifiedCredentialId) updateAuthFromVerifyResponse({ response: await createApiClient({}, client).selectUserWallet({
6489
+ if (__getPrimaryWalletAccount_wrapped(client)?.id === walletAccount.id) return;
6490
+ if (walletAccount.verifiedCredentialId) __updateAuthFromVerifyResponse_wrapped({ response: await __createApiClient_wrapped({}, client).selectUserWallet({
5567
6491
  environmentId: core.environmentId,
5568
6492
  userWalletSelectionRequest: { walletId: walletAccount.verifiedCredentialId }
5569
6493
  }) }, client);
5570
- else setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: [{
6494
+ else __setUnverifiedWalletAccounts_wrapped({ unverifiedWalletAccountsToUpdate: [{
5571
6495
  ...walletAccount,
5572
6496
  lastSelectedAt: /* @__PURE__ */ new Date()
5573
6497
  }] }, client);
5574
6498
  };
6499
+ const __selectPrimaryWalletAccount_impl = selectPrimaryWalletAccount;
6500
+ const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
6501
+ fn: __selectPrimaryWalletAccount_impl,
6502
+ functionName: "selectPrimaryWalletAccount",
6503
+ getCore: () => {
6504
+ try {
6505
+ return getCore(getDefaultClient());
6506
+ } catch {
6507
+ return;
6508
+ }
6509
+ }
6510
+ });
5575
6511
 
5576
6512
  //#endregion
5577
6513
  //#region src/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.ts
@@ -5584,7 +6520,7 @@ const selectPrimaryWalletAccount = async ({ walletAccount }, client = getDefault
5584
6520
  */
5585
6521
  const disconnectWalletAccount = async ({ walletAccount }, client) => {
5586
6522
  try {
5587
- await getWalletProviderFromWalletAccount({ walletAccount }, client).disconnectWalletAccount?.({ walletAccount });
6523
+ await __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client).disconnectWalletAccount?.({ walletAccount });
5588
6524
  } catch (error) {
5589
6525
  if (error instanceof NoWalletProviderFoundError) return;
5590
6526
  throw error;
@@ -5607,17 +6543,29 @@ const disconnectWalletAccount = async ({ walletAccount }, client) => {
5607
6543
  */
5608
6544
  const removeWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => {
5609
6545
  const core = getCore(client);
5610
- const apiClient = createApiClient({}, client);
6546
+ const apiClient = __createApiClient_wrapped({}, client);
5611
6547
  await disconnectWalletAccount({ walletAccount }, client);
5612
6548
  if (!walletAccount.verifiedCredentialId) {
5613
- removeUnverifiedWalletAccount({ unverifiedWalletAccount: walletAccount }, client);
6549
+ __removeUnverifiedWalletAccount_wrapped({ unverifiedWalletAccount: walletAccount }, client);
5614
6550
  return;
5615
6551
  }
5616
- updateAuthFromVerifyResponse({ response: await apiClient.verifyUnlink({
6552
+ __updateAuthFromVerifyResponse_wrapped({ response: await apiClient.verifyUnlink({
5617
6553
  environmentId: core.environmentId,
5618
6554
  verifyUnlinkRequest: { walletId: walletAccount.verifiedCredentialId }
5619
6555
  }) }, client);
5620
6556
  };
6557
+ const __removeWalletAccount_impl = removeWalletAccount;
6558
+ const __removeWalletAccount_wrapped = instrumentFunction({
6559
+ fn: __removeWalletAccount_impl,
6560
+ functionName: "removeWalletAccount",
6561
+ getCore: () => {
6562
+ try {
6563
+ return getCore(getDefaultClient());
6564
+ } catch {
6565
+ return;
6566
+ }
6567
+ }
6568
+ });
5621
6569
 
5622
6570
  //#endregion
5623
6571
  //#region src/modules/wallets/signMessage/signMessage.ts
@@ -5634,7 +6582,7 @@ const removeWalletAccount = async ({ walletAccount }, client = getDefaultClient(
5634
6582
  * @instrumented
5635
6583
  */
5636
6584
  const signMessage = async ({ walletAccount, message }, client = getDefaultClient()) => {
5637
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
6585
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5638
6586
  assertWalletProviderMethodDefined(walletProvider, "signMessage");
5639
6587
  const { signature } = await walletProvider.signMessage({
5640
6588
  message,
@@ -5642,6 +6590,18 @@ const signMessage = async ({ walletAccount, message }, client = getDefaultClient
5642
6590
  });
5643
6591
  return { signature };
5644
6592
  };
6593
+ const __signMessage_impl = signMessage;
6594
+ const __signMessage_wrapped = instrumentFunction({
6595
+ fn: __signMessage_impl,
6596
+ functionName: "signMessage",
6597
+ getCore: () => {
6598
+ try {
6599
+ return getCore(getDefaultClient());
6600
+ } catch {
6601
+ return;
6602
+ }
6603
+ }
6604
+ });
5645
6605
 
5646
6606
  //#endregion
5647
6607
  //#region src/modules/wallets/transferAmount/transferAmount.ts
@@ -5661,7 +6621,7 @@ const signMessage = async ({ walletAccount, message }, client = getDefaultClient
5661
6621
  * @instrumented
5662
6622
  */
5663
6623
  const transferAmount = async ({ walletAccount, amount, recipient, token }, client = getDefaultClient()) => {
5664
- const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
6624
+ const walletProvider = __getWalletProviderFromWalletAccount_wrapped({ walletAccount }, client);
5665
6625
  assertWalletProviderMethodDefined(walletProvider, "transferAmount");
5666
6626
  const { transactionHash } = await walletProvider.transferAmount({
5667
6627
  amount,
@@ -5671,6 +6631,18 @@ const transferAmount = async ({ walletAccount, amount, recipient, token }, clien
5671
6631
  });
5672
6632
  return { transactionHash };
5673
6633
  };
6634
+ const __transferAmount_impl = transferAmount;
6635
+ const __transferAmount_wrapped = instrumentFunction({
6636
+ fn: __transferAmount_impl,
6637
+ functionName: "transferAmount",
6638
+ getCore: () => {
6639
+ try {
6640
+ return getCore(getDefaultClient());
6641
+ } catch {
6642
+ return;
6643
+ }
6644
+ }
6645
+ });
5674
6646
 
5675
6647
  //#endregion
5676
6648
  //#region src/modules/wallets/transferWalletAccount/transferWalletAccount.ts
@@ -5688,12 +6660,24 @@ const transferAmount = async ({ walletAccount, amount, recipient, token }, clien
5688
6660
  const transferWalletAccount = async ({ walletProviderKey }, client = getDefaultClient()) => {
5689
6661
  return verifyWalletAccountForSignInOrTransfer({
5690
6662
  isTransfer: true,
5691
- walletAccount: await connectWithWalletProvider({
6663
+ walletAccount: await __connectWithWalletProvider_wrapped({
5692
6664
  addToDynamicWalletAccounts: false,
5693
6665
  walletProviderKey
5694
6666
  }, client)
5695
6667
  }, client);
5696
6668
  };
6669
+ const __transferWalletAccount_impl = transferWalletAccount;
6670
+ const __transferWalletAccount_wrapped = instrumentFunction({
6671
+ fn: __transferWalletAccount_impl,
6672
+ functionName: "transferWalletAccount",
6673
+ getCore: () => {
6674
+ try {
6675
+ return getCore(getDefaultClient());
6676
+ } catch {
6677
+ return;
6678
+ }
6679
+ }
6680
+ });
5697
6681
 
5698
6682
  //#endregion
5699
6683
  //#region src/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.ts
@@ -5710,7 +6694,7 @@ const transferWalletAccount = async ({ walletProviderKey }, client = getDefaultC
5710
6694
  * @not-instrumented
5711
6695
  */
5712
6696
  const getWalletAccountFromAddress = ({ address, chain }, client = getDefaultClient()) => {
5713
- return getWalletAccounts(client).find((walletAccount) => walletAccount.address === address && walletAccount.chain === chain);
6697
+ return __getWalletAccounts_wrapped(client).find((walletAccount) => walletAccount.address === address && walletAccount.chain === chain);
5714
6698
  };
5715
6699
 
5716
6700
  //#endregion
@@ -5731,6 +6715,18 @@ const offWalletProviderEvent = ({ callback, event, walletProviderKey }, client =
5731
6715
  assertWalletProviderMethodDefined(walletProvider, "events");
5732
6716
  walletProvider.events.off(event, callback);
5733
6717
  };
6718
+ const __offWalletProviderEvent_impl = offWalletProviderEvent;
6719
+ const __offWalletProviderEvent_wrapped = instrumentFunction({
6720
+ fn: __offWalletProviderEvent_impl,
6721
+ functionName: "offWalletProviderEvent",
6722
+ getCore: () => {
6723
+ try {
6724
+ return getCore(getDefaultClient());
6725
+ } catch {
6726
+ return;
6727
+ }
6728
+ }
6729
+ });
5734
6730
 
5735
6731
  //#endregion
5736
6732
  //#region src/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.ts
@@ -5752,6 +6748,18 @@ const onWalletProviderEvent = ({ callback, event, walletProviderKey }, client =
5752
6748
  walletProvider.events.off(event, callback);
5753
6749
  };
5754
6750
  };
6751
+ const __onWalletProviderEvent_impl = onWalletProviderEvent;
6752
+ const __onWalletProviderEvent_wrapped = instrumentFunction({
6753
+ fn: __onWalletProviderEvent_impl,
6754
+ functionName: "onWalletProviderEvent",
6755
+ getCore: () => {
6756
+ try {
6757
+ return getCore(getDefaultClient());
6758
+ } catch {
6759
+ return;
6760
+ }
6761
+ }
6762
+ });
5755
6763
 
5756
6764
  //#endregion
5757
6765
  //#region src/utils/parseUserAgent/parseUserAgent.ts
@@ -5834,5 +6842,5 @@ const parseUserAgent = ({ userAgent }) => {
5834
6842
  assertPackageVersion(name, version);
5835
6843
 
5836
6844
  //#endregion
5837
- export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, addNetwork, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, attachCheckoutTransactionSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, authenticateWithSocial, broadcastCheckoutTransaction, canConnectWithHardwareWallet, cancelCheckoutTransaction, checkStepUpAuth, completeDeviceRegistration, completeSocialAuthentication, confirmTransaction, connectAndVerifyWithWalletProvider, connectWithWalletProvider, consumeMfaToken, createCheckoutTransaction, createCoinbaseOnrampOrder, createCryptoDotComPayment, createDynamicClient, createKrakenExchangeTransfer, createNewMfaRecoveryCodes, deleteMfaDevice, deletePasskey, deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, executeSwapTransaction, fetchProjectSettings, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, getMultichainBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletProviderDataByKey, hasExtension, initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, prepareCheckoutTransaction, proveWalletAccountOwnership, refreshAuth, refreshUser, registerPasskey, registerTotpMfaDevice, removeWalletAccount, requestExternalAuthElevatedToken, requiresConversion, revokeAllRegisteredDevices, revokeRegisteredDevice, selectPrimaryWalletAccount, sendEmailOTP, sendSmsOTP, setCaptchaToken, setDefaultMfaDevice, setInstrumentationEnabled, signInWithExternalJwt, signInWithPasskey, signMessage, submitCheckoutTransaction, supportedCountries, switchActiveNetwork, transferAmount, transferWalletAccount, unlinkSocialAccount, updateUser, verifyOTP, verifyWalletAccount, waitForClientInitialized };
6845
+ export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, __addCoinbaseOnrampOrderEventListener_wrapped as addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __authenticateMfaRecoveryCode_wrapped as authenticateMfaRecoveryCode, __authenticatePasskeyMFA_wrapped as authenticatePasskeyMFA, __authenticateTotpMfaDevice_wrapped as authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, __createKrakenExchangeTransfer_wrapped as createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, __detectDeviceRegistrationRedirect_wrapped as detectDeviceRegistrationRedirect, __detectOAuthRedirect_wrapped as detectOAuthRedirect, __executeSwapTransaction_wrapped as executeSwapTransaction, __fetchProjectSettings_wrapped as fetchProjectSettings, __getActiveNetworkData_wrapped as getActiveNetworkData, __getActiveNetworkId_wrapped as getActiveNetworkId, __getAvailableWalletProvidersData_wrapped as getAvailableWalletProvidersData, __getBalance_wrapped as getBalance, __getBalanceForAddress_wrapped as getBalanceForAddress, __getBalances_wrapped as getBalances, __getCheckoutTransaction_wrapped as getCheckoutTransaction, __getCheckoutTransactionQuote_wrapped as getCheckoutTransactionQuote, __getCoinbaseBuyUrl_wrapped as getCoinbaseBuyUrl, __getConnectedAddresses_wrapped as getConnectedAddresses, getDefaultClient, __getDeviceRegistrationTokenFromUrl_wrapped as getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, __getKrakenAccounts_wrapped as getKrakenAccounts, __getKrakenWhitelistedAddresses_wrapped as getKrakenWhitelistedAddresses, __getMfaDevices_wrapped as getMfaDevices, __getMfaMethods_wrapped as getMfaMethods, __getMfaRecoveryCodes_wrapped as getMfaRecoveryCodes, __getMissingVerificationForCoinbaseOnrampOrder_wrapped as getMissingVerificationForCoinbaseOnrampOrder, __getMultichainBalances_wrapped as getMultichainBalances, __getNetworksData_wrapped as getNetworksData, __getOwnerWalletAccountForSmartWalletAccount_wrapped as getOwnerWalletAccountForSmartWalletAccount, __getPasskeys_wrapped as getPasskeys, __getPrimaryWalletAccount_wrapped as getPrimaryWalletAccount, __getRegisteredDevices_wrapped as getRegisteredDevices, __getSwapQuote_wrapped as getSwapQuote, __getSwapStatus_wrapped as getSwapStatus, __getTransactionHistory_wrapped as getTransactionHistory, __getUserSocialAccounts_wrapped as getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, __getWalletAccounts_wrapped as getWalletAccounts, __getWalletConnectCatalog_wrapped as getWalletConnectCatalog, __getWalletConnectCatalogWalletByWalletProviderKey_wrapped as getWalletConnectCatalogWalletByWalletProviderKey, getWalletProviderDataByKey, hasExtension, __initializeClient_wrapped as initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, __logout_wrapped as logout, __offEvent_wrapped as offEvent, __offWalletProviderEvent_wrapped as offWalletProviderEvent, __onEvent_wrapped as onEvent, __onWalletProviderEvent_wrapped as onWalletProviderEvent, __onceEvent_wrapped as onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, __requiresConversion_wrapped as requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, __waitForClientInitialized_wrapped as waitForClientInitialized };
5838
6846
  //# sourceMappingURL=index.esm.js.map