@dynamic-labs-sdk/react-hooks 1.17.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/exports/index.d.ts +20 -0
  2. package/dist/exports/index.d.ts.map +1 -1
  3. package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/index.d.ts +2 -0
  4. package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/index.d.ts.map +1 -0
  5. package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/useBackupWaasKeySharesToGoogleDrive.d.ts +47 -0
  6. package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/useBackupWaasKeySharesToGoogleDrive.d.ts.map +1 -0
  7. package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/index.d.ts +2 -0
  8. package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/index.d.ts.map +1 -0
  9. package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/useCreateWaasWalletAccounts.d.ts +47 -0
  10. package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/useCreateWaasWalletAccounts.d.ts.map +1 -0
  11. package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/index.d.ts +2 -0
  12. package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/index.d.ts.map +1 -0
  13. package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/useDelegateWaasKeyShares.d.ts +46 -0
  14. package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/useDelegateWaasKeyShares.d.ts.map +1 -0
  15. package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/index.d.ts +2 -0
  16. package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/index.d.ts.map +1 -0
  17. package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/useDetectSocialRedirectUrl.d.ts +48 -0
  18. package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/useDetectSocialRedirectUrl.d.ts.map +1 -0
  19. package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/index.d.ts +2 -0
  20. package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/index.d.ts.map +1 -0
  21. package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/useExportWaasClientKeyshares.d.ts +46 -0
  22. package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/useExportWaasClientKeyshares.d.ts.map +1 -0
  23. package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/index.d.ts +2 -0
  24. package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/index.d.ts.map +1 -0
  25. package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/useExportWaasPrivateKey.d.ts +47 -0
  26. package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/useExportWaasPrivateKey.d.ts.map +1 -0
  27. package/dist/hooks/wrappers/functions/useGetUserSocialAccounts/useGetUserSocialAccounts.d.ts +3 -1
  28. package/dist/hooks/wrappers/functions/useGetUserSocialAccounts/useGetUserSocialAccounts.d.ts.map +1 -1
  29. package/dist/hooks/wrappers/functions/useGetWalletProviderDataByKey/index.d.ts +2 -0
  30. package/dist/hooks/wrappers/functions/useGetWalletProviderDataByKey/index.d.ts.map +1 -0
  31. package/dist/hooks/wrappers/functions/useGetWalletProviderDataByKey/useGetWalletProviderDataByKey.d.ts +37 -0
  32. package/dist/hooks/wrappers/functions/useGetWalletProviderDataByKey/useGetWalletProviderDataByKey.d.ts.map +1 -0
  33. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/index.d.ts +2 -0
  34. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/index.d.ts.map +1 -0
  35. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.d.ts +48 -0
  36. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.d.ts.map +1 -0
  37. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/index.d.ts +2 -0
  38. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/index.d.ts.map +1 -0
  39. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.d.ts +47 -0
  40. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.d.ts.map +1 -0
  41. package/dist/hooks/wrappers/functions/useIsDeviceRegistrationRequired/index.d.ts +2 -0
  42. package/dist/hooks/wrappers/functions/useIsDeviceRegistrationRequired/index.d.ts.map +1 -0
  43. package/dist/hooks/wrappers/functions/useIsDeviceRegistrationRequired/useIsDeviceRegistrationRequired.d.ts +8 -0
  44. package/dist/hooks/wrappers/functions/useIsDeviceRegistrationRequired/useIsDeviceRegistrationRequired.d.ts.map +1 -0
  45. package/dist/hooks/wrappers/functions/useIsPendingRecoveryCodesAcknowledgment/index.d.ts +2 -0
  46. package/dist/hooks/wrappers/functions/useIsPendingRecoveryCodesAcknowledgment/index.d.ts.map +1 -0
  47. package/dist/hooks/wrappers/functions/useIsPendingRecoveryCodesAcknowledgment/useIsPendingRecoveryCodesAcknowledgment.d.ts +9 -0
  48. package/dist/hooks/wrappers/functions/useIsPendingRecoveryCodesAcknowledgment/useIsPendingRecoveryCodesAcknowledgment.d.ts.map +1 -0
  49. package/dist/hooks/wrappers/functions/useIsUserMissingMfaAuth/index.d.ts +2 -0
  50. package/dist/hooks/wrappers/functions/useIsUserMissingMfaAuth/index.d.ts.map +1 -0
  51. package/dist/hooks/wrappers/functions/useIsUserMissingMfaAuth/useIsUserMissingMfaAuth.d.ts +8 -0
  52. package/dist/hooks/wrappers/functions/useIsUserMissingMfaAuth/useIsUserMissingMfaAuth.d.ts.map +1 -0
  53. package/dist/hooks/wrappers/functions/useIsUserOnboardingComplete/index.d.ts +2 -0
  54. package/dist/hooks/wrappers/functions/useIsUserOnboardingComplete/index.d.ts.map +1 -0
  55. package/dist/hooks/wrappers/functions/useIsUserOnboardingComplete/useIsUserOnboardingComplete.d.ts +9 -0
  56. package/dist/hooks/wrappers/functions/useIsUserOnboardingComplete/useIsUserOnboardingComplete.d.ts.map +1 -0
  57. package/dist/hooks/wrappers/functions/useMergeUserAccounts/index.d.ts +3 -0
  58. package/dist/hooks/wrappers/functions/useMergeUserAccounts/index.d.ts.map +1 -0
  59. package/dist/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.d.ts +52 -0
  60. package/dist/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.d.ts.map +1 -0
  61. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/index.d.ts +2 -0
  62. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/index.d.ts.map +1 -0
  63. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.d.ts +50 -0
  64. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.d.ts.map +1 -0
  65. package/dist/hooks/wrappers/functions/useOnWalletProviderEvent/useOnWalletProviderEvent.d.ts +4 -1
  66. package/dist/hooks/wrappers/functions/useOnWalletProviderEvent/useOnWalletProviderEvent.d.ts.map +1 -1
  67. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/index.d.ts +2 -0
  68. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/index.d.ts.map +1 -0
  69. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.d.ts +46 -0
  70. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.d.ts.map +1 -0
  71. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/index.d.ts +2 -0
  72. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/index.d.ts.map +1 -0
  73. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.d.ts +46 -0
  74. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.d.ts.map +1 -0
  75. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/index.d.ts +2 -0
  76. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/index.d.ts.map +1 -0
  77. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.d.ts +46 -0
  78. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.d.ts.map +1 -0
  79. package/dist/hooks/wrappers/functions/useUnlockWallet/index.d.ts +2 -0
  80. package/dist/hooks/wrappers/functions/useUnlockWallet/index.d.ts.map +1 -0
  81. package/dist/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.d.ts +46 -0
  82. package/dist/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.d.ts.map +1 -0
  83. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/index.d.ts +2 -0
  84. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/index.d.ts.map +1 -0
  85. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.d.ts +47 -0
  86. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.d.ts.map +1 -0
  87. package/dist/hooks/wrappers/functions/useVerifyOTP/useVerifyOTP.d.ts +1 -1
  88. package/dist/hooks/wrappers/functions/useVerifyOTP/useVerifyOTP.d.ts.map +1 -1
  89. package/dist/index.cjs +502 -11
  90. package/dist/index.cjs.map +1 -1
  91. package/dist/index.esm.js +484 -13
  92. package/dist/index.esm.js.map +1 -1
  93. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  94. package/package.json +4 -4
package/dist/index.cjs CHANGED
@@ -4,10 +4,11 @@ let _tanstack_react_query = require("@tanstack/react-query");
4
4
  let react = require("react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _dynamic_labs_sdk_client_core = require("@dynamic-labs-sdk/client/core");
7
+ let _dynamic_labs_sdk_client_waas = require("@dynamic-labs-sdk/client/waas");
7
8
 
8
9
  //#region package.json
9
10
  var name = "@dynamic-labs-sdk/react-hooks";
10
- var version = "1.17.1";
11
+ var version = "1.19.0";
11
12
 
12
13
  //#endregion
13
14
  //#region src/modules/DynamicContext/DynamicContext.ts
@@ -176,7 +177,10 @@ const useBaseQuery = ({ enabled = true, middlewares = EMPTY_MIDDLEWARES, queryFn
176
177
  * Wraps `onWalletProviderEvent` from `@dynamic-labs-sdk/client`. Uses a ref to
177
178
  * always call the latest callback without re-subscribing, and cleans up the
178
179
  * subscription on unmount or when `event` / `walletProviderKey` change. When
179
- * `walletProviderKey` is `undefined` the hook subscribes to nothing.
180
+ * `walletProviderKey` is `undefined` the hook subscribes to nothing. When the
181
+ * provider cannot be subscribed to (not registered on this client, or it does
182
+ * not expose `events`), the hook logs and subscribes to nothing rather than
183
+ * throwing — an effect throw would unmount the entire app.
180
184
  *
181
185
  * @example
182
186
  * ```tsx
@@ -193,13 +197,22 @@ const useOnWalletProviderEvent = ({ callback, event, walletProviderKey }) => {
193
197
  callbackRef.current = callback;
194
198
  (0, react.useEffect)(() => {
195
199
  if (walletProviderKey === void 0) return;
196
- return (0, _dynamic_labs_sdk_client.onWalletProviderEvent)({
197
- callback: ((...args) => {
198
- callbackRef.current(...args);
199
- }),
200
- event,
201
- walletProviderKey
202
- }, client);
200
+ try {
201
+ return (0, _dynamic_labs_sdk_client.onWalletProviderEvent)({
202
+ callback: ((...args) => {
203
+ callbackRef.current(...args);
204
+ }),
205
+ event,
206
+ walletProviderKey
207
+ }, client);
208
+ } catch (error) {
209
+ (0, _dynamic_labs_sdk_client_core.getCore)(client).logger.debug("[useOnWalletProviderEvent] failed to subscribe to wallet provider event", {
210
+ error,
211
+ event,
212
+ walletProviderKey
213
+ });
214
+ return;
215
+ }
203
216
  }, [
204
217
  event,
205
218
  walletProviderKey,
@@ -747,6 +760,35 @@ const useCompleteSocialRedirect = ({ mutateParams } = {}) => useBaseMutation({
747
760
  mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client.completeSocialRedirect)(variables, client)
748
761
  });
749
762
 
763
+ //#endregion
764
+ //#region src/hooks/wrappers/functions/useDetectSocialRedirectUrl/useDetectSocialRedirectUrl.ts
765
+ /**
766
+ * Wraps `detectSocialRedirectUrl` from `@dynamic-labs-sdk/client`. Resolves to
767
+ * `true` when the given URL is an OAuth redirect back from a social provider
768
+ * (started by `signInWithSocialRedirect`), so you can decide whether to run
769
+ * `completeSocialRedirect`.
770
+ *
771
+ * @param params - See {@link UseDetectSocialRedirectUrlParams}.
772
+ * @returns A react-query result whose `data` is `true` when the URL is a social
773
+ * OAuth callback, plus the usual `isLoading`/`error` fields.
774
+ *
775
+ * @example
776
+ * ```tsx
777
+ * const { data: isReturningFromProvider, isLoading } =
778
+ * useDetectSocialRedirectUrl({ url });
779
+ * ```
780
+ *
781
+ * @see {@link useCompleteSocialRedirect} to finish the redirect sign-in once
782
+ * this returns `true`.
783
+ * @see {@link clearSocialRedirectParams} to clean the OAuth parameters from the
784
+ * URL after completion.
785
+ */
786
+ const useDetectSocialRedirectUrl = ({ queryParams, ...args }) => useBaseQuery({
787
+ queryFn: (client) => (0, _dynamic_labs_sdk_client.detectSocialRedirectUrl)(args, client),
788
+ queryKey: ["useDetectSocialRedirectUrl", { url: args.url.href }],
789
+ queryParams
790
+ });
791
+
750
792
  //#endregion
751
793
  //#region src/hooks/wrappers/functions/useConfirmTransaction/useConfirmTransaction.ts
752
794
  /**
@@ -1267,6 +1309,38 @@ const useLogout = ({ mutateParams } = {}) => useBaseMutation({
1267
1309
  mutationFn: ({ client }) => (0, _dynamic_labs_sdk_client.logout)(client)
1268
1310
  });
1269
1311
 
1312
+ //#endregion
1313
+ //#region src/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.ts
1314
+ /**
1315
+ * Completes an account merge after a credential was found to already belong to
1316
+ * another user (surfaced as `MergeAccountsConfirmationError` during
1317
+ * verification / linking).
1318
+ *
1319
+ * Wraps `mergeUserAccounts` from `@dynamic-labs-sdk/client`. Call `mutate()`
1320
+ * with no arguments to merge directly when there are no conflicts, or
1321
+ * `mutate({ conflictResolutions })` with the user's per-field choices when the
1322
+ * merge surfaced conflicts. The resolved `data` is the merged user.
1323
+ *
1324
+ * @example
1325
+ * ```tsx
1326
+ * const { mutate: mergeAccounts, isPending } = useMergeUserAccounts();
1327
+ *
1328
+ * // No conflicts — merge directly:
1329
+ * mergeAccounts({});
1330
+ *
1331
+ * // With conflicts the user resolved:
1332
+ * mergeAccounts({ conflictResolutions });
1333
+ * ```
1334
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` completes the
1335
+ * merge and whose `data` is the merged user.
1336
+ * @see mergeUserAccounts
1337
+ * @see UseMergeUserAccountsParams
1338
+ */
1339
+ const useMergeUserAccounts = ({ mutateParams } = {}) => useBaseMutation({
1340
+ mutateParams,
1341
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client.mergeUserAccounts)(variables, client)
1342
+ });
1343
+
1270
1344
  //#endregion
1271
1345
  //#region src/hooks/wrappers/functions/useGetMfaDevices/useGetMfaDevices.ts
1272
1346
  /**
@@ -2090,13 +2164,15 @@ const useUpdateUser = ({ mutateParams } = {}) => useBaseMutation({
2090
2164
  /**
2091
2165
  * Returns the current user's linked social accounts.
2092
2166
  *
2093
- * Re-renders when the user changes.
2167
+ * Re-renders when the user changes. Resolves to an empty list while no user is
2168
+ * authenticated — the guard is required because the selector runs synchronously
2169
+ * and `getUserSocialAccounts` throws (`assertDefined`) when there is no user.
2094
2170
  */
2095
2171
  const useGetUserSocialAccounts = () => useBaseState({
2096
2172
  defaultValue: [],
2097
2173
  event: "userChanged",
2098
2174
  queryKey: ["useGetUserSocialAccounts"],
2099
- selector: (client) => (0, _dynamic_labs_sdk_client.getUserSocialAccounts)(client)
2175
+ selector: (client) => client.user ? (0, _dynamic_labs_sdk_client.getUserSocialAccounts)(client) : []
2100
2176
  });
2101
2177
 
2102
2178
  //#endregion
@@ -2247,6 +2323,401 @@ const useGetWalletOptionsCatalogue = ({ queryParams, ...args } = {}) => useBaseQ
2247
2323
  }
2248
2324
  });
2249
2325
 
2326
+ //#endregion
2327
+ //#region src/hooks/wrappers/functions/useGetWalletProviderDataByKey/useGetWalletProviderDataByKey.ts
2328
+ /**
2329
+ * Wraps `getWalletProviderDataByKey` from `@dynamic-labs-sdk/client`. Returns
2330
+ * the display/connection data for a single wallet provider, by key.
2331
+ *
2332
+ * The underlying data is read from the in-memory wallet provider registry,
2333
+ * which EIP-6963 wallets fill asynchronously after mount. The registry emits
2334
+ * `walletProviderChanged` on register / priority update, so wiring it keeps the
2335
+ * provider data in sync without consumers pairing the hook with a manual
2336
+ * `useOnEvent` + `refetch` listener.
2337
+ *
2338
+ * `walletProviderUnregistered` is intentionally not wired here: this hook reads
2339
+ * a single key, and once that key is removed there is no replacement data to
2340
+ * fetch — refetching would only make `getWalletProviderDataByKey` throw
2341
+ * `NoWalletProviderFoundError`. Skipping it keeps the last-known data instead of
2342
+ * forcing the query into an error state.
2343
+ *
2344
+ * @example
2345
+ * ```tsx
2346
+ * const { data: walletProviderData } = useGetWalletProviderDataByKey({
2347
+ * walletProviderKey,
2348
+ * });
2349
+ * ```
2350
+ */
2351
+ const useGetWalletProviderDataByKey = ({ queryParams, ...args }) => useBaseQuery({
2352
+ middlewares: [invalidateOnEvent({ event: "walletProviderChanged" })],
2353
+ queryFn: (client) => Promise.resolve((0, _dynamic_labs_sdk_client.getWalletProviderDataByKey)(args, client)),
2354
+ queryKey: ["useGetWalletProviderDataByKey", args],
2355
+ queryParams
2356
+ });
2357
+
2358
+ //#endregion
2359
+ //#region src/hooks/wrappers/functions/useIsDeviceRegistrationRequired/useIsDeviceRegistrationRequired.ts
2360
+ /**
2361
+ * Returns whether the current user still needs to register this device.
2362
+ *
2363
+ * Re-renders when the user changes (login, logout, completing device
2364
+ * registration). Resolves to `false` while no user is authenticated.
2365
+ */
2366
+ const useIsDeviceRegistrationRequired = () => useBaseState({
2367
+ defaultValue: false,
2368
+ event: "userChanged",
2369
+ queryKey: ["useIsDeviceRegistrationRequired"],
2370
+ selector: (client) => client.user ? (0, _dynamic_labs_sdk_client.isDeviceRegistrationRequired)(client.user) : false
2371
+ });
2372
+
2373
+ //#endregion
2374
+ //#region src/hooks/wrappers/functions/useIsUserMissingMfaAuth/useIsUserMissingMfaAuth.ts
2375
+ /**
2376
+ * Returns whether the current user still needs to complete an MFA challenge.
2377
+ *
2378
+ * Re-renders when the user changes (login, logout, completing the MFA
2379
+ * challenge). Resolves to `false` while no user is authenticated.
2380
+ */
2381
+ const useIsUserMissingMfaAuth = () => useBaseState({
2382
+ defaultValue: false,
2383
+ event: "userChanged",
2384
+ queryKey: ["useIsUserMissingMfaAuth"],
2385
+ selector: (client) => client.user ? (0, _dynamic_labs_sdk_client.isUserMissingMfaAuth)(client) : false
2386
+ });
2387
+
2388
+ //#endregion
2389
+ //#region src/hooks/wrappers/functions/useIsPendingRecoveryCodesAcknowledgment/useIsPendingRecoveryCodesAcknowledgment.ts
2390
+ /**
2391
+ * Returns whether the current user still needs to acknowledge their MFA
2392
+ * recovery codes.
2393
+ *
2394
+ * Re-renders when the user changes (login, logout, acknowledging the recovery
2395
+ * codes). Resolves to `false` while no user is authenticated.
2396
+ */
2397
+ const useIsPendingRecoveryCodesAcknowledgment = () => useBaseState({
2398
+ defaultValue: false,
2399
+ event: "userChanged",
2400
+ queryKey: ["useIsPendingRecoveryCodesAcknowledgment"],
2401
+ selector: (client) => client.user ? (0, _dynamic_labs_sdk_client.isPendingRecoveryCodesAcknowledgment)(client) : false
2402
+ });
2403
+
2404
+ //#endregion
2405
+ //#region src/hooks/wrappers/functions/useIsUserOnboardingComplete/useIsUserOnboardingComplete.ts
2406
+ /**
2407
+ * Returns whether the current user has completed every onboarding requirement
2408
+ * (KYC fields, MFA, recovery codes acknowledgment, device registration).
2409
+ *
2410
+ * Re-renders when the user changes (login, logout, completing any onboarding
2411
+ * step). Resolves to `false` while no user is authenticated.
2412
+ */
2413
+ const useIsUserOnboardingComplete = () => useBaseState({
2414
+ defaultValue: false,
2415
+ event: "userChanged",
2416
+ queryKey: ["useIsUserOnboardingComplete"],
2417
+ selector: (client) => client.user ? (0, _dynamic_labs_sdk_client.isUserOnboardingComplete)(client) : false
2418
+ });
2419
+
2420
+ //#endregion
2421
+ //#region src/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/useBackupWaasKeySharesToGoogleDrive.ts
2422
+ /**
2423
+ * Wraps `backupWaasKeySharesToGoogleDrive` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2424
+ * back up an embedded wallet's key shares to the user's Google Drive.
2425
+ *
2426
+ * @example
2427
+ * ```tsx
2428
+ * const { mutate, isPending } = useBackupWaasKeySharesToGoogleDrive();
2429
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2430
+ * Continue
2431
+ * </button>
2432
+ * ```
2433
+ *
2434
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `backupWaasKeySharesToGoogleDrive` and whose `data` is its resolved value.
2435
+ * @see backupWaasKeySharesToGoogleDrive
2436
+ * @see UseBackupWaasKeySharesToGoogleDriveParams
2437
+ */
2438
+ const useBackupWaasKeySharesToGoogleDrive = ({ mutateParams } = {}) => useBaseMutation({
2439
+ mutateParams,
2440
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.backupWaasKeySharesToGoogleDrive)(variables, client)
2441
+ });
2442
+
2443
+ //#endregion
2444
+ //#region src/hooks/wrappers/functions/useCreateWaasWalletAccounts/useCreateWaasWalletAccounts.ts
2445
+ /**
2446
+ * Wraps `createWaasWalletAccounts` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2447
+ * create embedded wallet accounts for the signed-in user.
2448
+ *
2449
+ * @example
2450
+ * ```tsx
2451
+ * const { mutate, isPending } = useCreateWaasWalletAccounts();
2452
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2453
+ * Continue
2454
+ * </button>
2455
+ * ```
2456
+ *
2457
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `createWaasWalletAccounts` and whose `data` is its resolved value.
2458
+ * @see createWaasWalletAccounts
2459
+ * @see UseCreateWaasWalletAccountsParams
2460
+ */
2461
+ const useCreateWaasWalletAccounts = ({ mutateParams } = {}) => useBaseMutation({
2462
+ mutateParams,
2463
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.createWaasWalletAccounts)(variables, client)
2464
+ });
2465
+
2466
+ //#endregion
2467
+ //#region src/hooks/wrappers/functions/useDelegateWaasKeyShares/useDelegateWaasKeyShares.ts
2468
+ /**
2469
+ * Wraps `delegateWaasKeyShares` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2470
+ * delegate signing access for an embedded wallet to your server.
2471
+ *
2472
+ * @example
2473
+ * ```tsx
2474
+ * const { mutate, isPending } = useDelegateWaasKeyShares();
2475
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2476
+ * Continue
2477
+ * </button>
2478
+ * ```
2479
+ *
2480
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `delegateWaasKeyShares` and whose `data` is its resolved value.
2481
+ * @see delegateWaasKeyShares
2482
+ * @see UseDelegateWaasKeySharesParams
2483
+ */
2484
+ const useDelegateWaasKeyShares = ({ mutateParams } = {}) => useBaseMutation({
2485
+ mutateParams,
2486
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.delegateWaasKeyShares)(variables, client)
2487
+ });
2488
+
2489
+ //#endregion
2490
+ //#region src/hooks/wrappers/functions/useExportWaasClientKeyshares/useExportWaasClientKeyshares.ts
2491
+ /**
2492
+ * Wraps `exportWaasClientKeyshares` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2493
+ * export an embedded wallet's client key shares.
2494
+ *
2495
+ * @example
2496
+ * ```tsx
2497
+ * const { mutate, isPending } = useExportWaasClientKeyshares();
2498
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2499
+ * Continue
2500
+ * </button>
2501
+ * ```
2502
+ *
2503
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `exportWaasClientKeyshares` and whose `data` is its resolved value.
2504
+ * @see exportWaasClientKeyshares
2505
+ * @see UseExportWaasClientKeysharesParams
2506
+ */
2507
+ const useExportWaasClientKeyshares = ({ mutateParams } = {}) => useBaseMutation({
2508
+ mutateParams,
2509
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.exportWaasClientKeyshares)(variables, client)
2510
+ });
2511
+
2512
+ //#endregion
2513
+ //#region src/hooks/wrappers/functions/useExportWaasPrivateKey/useExportWaasPrivateKey.ts
2514
+ /**
2515
+ * Wraps `exportWaasPrivateKey` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2516
+ * export an embedded wallet's private key.
2517
+ *
2518
+ * @example
2519
+ * ```tsx
2520
+ * const { mutate, isPending } = useExportWaasPrivateKey();
2521
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2522
+ * Continue
2523
+ * </button>
2524
+ * ```
2525
+ *
2526
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `exportWaasPrivateKey` and whose `data` is its resolved value.
2527
+ * @see exportWaasPrivateKey
2528
+ * @see UseExportWaasPrivateKeyParams
2529
+ */
2530
+ const useExportWaasPrivateKey = ({ mutateParams } = {}) => useBaseMutation({
2531
+ mutateParams,
2532
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.exportWaasPrivateKey)(variables, client)
2533
+ });
2534
+
2535
+ //#endregion
2536
+ //#region src/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.ts
2537
+ /**
2538
+ * Returns the recovery state of an embedded wallet account — whether the user
2539
+ * still needs to set a password, back up their key shares, etc.
2540
+ *
2541
+ * Wraps `getWalletRecoveryState` from `@dynamic-labs-sdk/client/waas`. The hook
2542
+ * stays disabled until `walletAccount` is defined.
2543
+ *
2544
+ * @example
2545
+ * ```tsx
2546
+ * const { data, isLoading } = useGetWalletRecoveryState({ walletAccount });
2547
+ * ```
2548
+ *
2549
+ * @returns A react-query result whose `data` is the wallet account's recovery state; it stays disabled until `walletAccount` is defined.
2550
+ * @see getWalletRecoveryState
2551
+ * @see UseGetWalletRecoveryStateParams
2552
+ */
2553
+ const useGetWalletRecoveryState = ({ queryParams, walletAccount }) => useBaseQuery({
2554
+ enabled: walletAccount !== void 0,
2555
+ queryFn: (client) => (0, _dynamic_labs_sdk_client_waas.getWalletRecoveryState)({ walletAccount }, client),
2556
+ queryKey: ["useGetWalletRecoveryState", walletAccount?.id],
2557
+ queryParams
2558
+ });
2559
+
2560
+ //#endregion
2561
+ //#region src/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.ts
2562
+ /**
2563
+ * Wraps `importWaasPrivateKey` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2564
+ * import a private key into a new embedded wallet account.
2565
+ *
2566
+ * @example
2567
+ * ```tsx
2568
+ * const { mutate, isPending } = useImportWaasPrivateKey();
2569
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2570
+ * Continue
2571
+ * </button>
2572
+ * ```
2573
+ *
2574
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `importWaasPrivateKey` and whose `data` is its resolved value.
2575
+ * @see importWaasPrivateKey
2576
+ * @see UseImportWaasPrivateKeyParams
2577
+ */
2578
+ const useImportWaasPrivateKey = ({ mutateParams } = {}) => useBaseMutation({
2579
+ mutateParams,
2580
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.importWaasPrivateKey)(variables, client)
2581
+ });
2582
+
2583
+ //#endregion
2584
+ //#region src/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.ts
2585
+ /**
2586
+ * Wraps `migrateFromFireblocks` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2587
+ * migrate a user's legacy Fireblocks wallet to an embedded wallet.
2588
+ *
2589
+ * @example
2590
+ * ```tsx
2591
+ * const { mutate, isPending } = useMigrateFromFireblocks();
2592
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2593
+ * Continue
2594
+ * </button>
2595
+ * ```
2596
+ *
2597
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `migrateFromFireblocks` and whose `data` is its resolved value.
2598
+ * @see migrateFromFireblocks
2599
+ * @see UseMigrateFromFireblocksParams
2600
+ */
2601
+ const useMigrateFromFireblocks = ({ mutateParams } = {}) => useBaseMutation({
2602
+ mutateParams,
2603
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.migrateFromFireblocks)(variables, client)
2604
+ });
2605
+
2606
+ //#endregion
2607
+ //#region src/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.ts
2608
+ /**
2609
+ * Wraps `refreshWaasWalletAccountShares` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2610
+ * refresh an embedded wallet account's key shares.
2611
+ *
2612
+ * @example
2613
+ * ```tsx
2614
+ * const { mutate, isPending } = useRefreshWaasWalletAccountShares();
2615
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2616
+ * Continue
2617
+ * </button>
2618
+ * ```
2619
+ *
2620
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `refreshWaasWalletAccountShares` and whose `data` is its resolved value.
2621
+ * @see refreshWaasWalletAccountShares
2622
+ * @see UseRefreshWaasWalletAccountSharesParams
2623
+ */
2624
+ const useRefreshWaasWalletAccountShares = ({ mutateParams } = {}) => useBaseMutation({
2625
+ mutateParams,
2626
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.refreshWaasWalletAccountShares)(variables, client)
2627
+ });
2628
+
2629
+ //#endregion
2630
+ //#region src/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.ts
2631
+ /**
2632
+ * Wraps `revokeWaasDelegation` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2633
+ * revoke an embedded wallet's previously granted delegated signing access.
2634
+ *
2635
+ * @example
2636
+ * ```tsx
2637
+ * const { mutate, isPending } = useRevokeWaasDelegation();
2638
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2639
+ * Continue
2640
+ * </button>
2641
+ * ```
2642
+ *
2643
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `revokeWaasDelegation` and whose `data` is its resolved value.
2644
+ * @see revokeWaasDelegation
2645
+ * @see UseRevokeWaasDelegationParams
2646
+ */
2647
+ const useRevokeWaasDelegation = ({ mutateParams } = {}) => useBaseMutation({
2648
+ mutateParams,
2649
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.revokeWaasDelegation)(variables, client)
2650
+ });
2651
+
2652
+ //#endregion
2653
+ //#region src/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.ts
2654
+ /**
2655
+ * Wraps `setWaasWalletAccountPassword` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2656
+ * set a password on an embedded wallet account.
2657
+ *
2658
+ * @example
2659
+ * ```tsx
2660
+ * const { mutate, isPending } = useSetWaasWalletAccountPassword();
2661
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2662
+ * Continue
2663
+ * </button>
2664
+ * ```
2665
+ *
2666
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `setWaasWalletAccountPassword` and whose `data` is its resolved value.
2667
+ * @see setWaasWalletAccountPassword
2668
+ * @see UseSetWaasWalletAccountPasswordParams
2669
+ */
2670
+ const useSetWaasWalletAccountPassword = ({ mutateParams } = {}) => useBaseMutation({
2671
+ mutateParams,
2672
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.setWaasWalletAccountPassword)(variables, client)
2673
+ });
2674
+
2675
+ //#endregion
2676
+ //#region src/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.ts
2677
+ /**
2678
+ * Wraps `unlockWallet` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2679
+ * unlock an embedded wallet account with its password.
2680
+ *
2681
+ * @example
2682
+ * ```tsx
2683
+ * const { mutate, isPending } = useUnlockWallet();
2684
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2685
+ * Continue
2686
+ * </button>
2687
+ * ```
2688
+ *
2689
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `unlockWallet` and whose `data` is its resolved value.
2690
+ * @see unlockWallet
2691
+ * @see UseUnlockWalletParams
2692
+ */
2693
+ const useUnlockWallet = ({ mutateParams } = {}) => useBaseMutation({
2694
+ mutateParams,
2695
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.unlockWallet)(variables, client)
2696
+ });
2697
+
2698
+ //#endregion
2699
+ //#region src/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.ts
2700
+ /**
2701
+ * Wraps `updateWaasPassword` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
2702
+ * update the password protecting an embedded wallet account.
2703
+ *
2704
+ * @example
2705
+ * ```tsx
2706
+ * const { mutate, isPending } = useUpdateWaasPassword();
2707
+ * <button onClick={() => mutate(variables)} disabled={isPending}>
2708
+ * Continue
2709
+ * </button>
2710
+ * ```
2711
+ *
2712
+ * @returns A react-query mutation whose `mutate`/`mutateAsync` calls `updateWaasPassword` and whose `data` is its resolved value.
2713
+ * @see updateWaasPassword
2714
+ * @see UseUpdateWaasPasswordParams
2715
+ */
2716
+ const useUpdateWaasPassword = ({ mutateParams } = {}) => useBaseMutation({
2717
+ mutateParams,
2718
+ mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.updateWaasPassword)(variables, client)
2719
+ });
2720
+
2250
2721
  //#endregion
2251
2722
  //#region src/hooks/wrappers/state/useInitStatus/useInitStatus.ts
2252
2723
  /**
@@ -2332,6 +2803,7 @@ exports.useAttachFlowSource = useAttachFlowSource;
2332
2803
  exports.useAuthenticateMfaRecoveryCode = useAuthenticateMfaRecoveryCode;
2333
2804
  exports.useAuthenticatePasskeyMFA = useAuthenticatePasskeyMFA;
2334
2805
  exports.useAuthenticateTotpMfaDevice = useAuthenticateTotpMfaDevice;
2806
+ exports.useBackupWaasKeySharesToGoogleDrive = useBackupWaasKeySharesToGoogleDrive;
2335
2807
  exports.useBroadcastFlow = useBroadcastFlow;
2336
2808
  exports.useCancelFlow = useCancelFlow;
2337
2809
  exports.useCheckStepUpAuth = useCheckStepUpAuth;
@@ -2344,11 +2816,16 @@ exports.useCreateCoinbaseOnrampOrder = useCreateCoinbaseOnrampOrder;
2344
2816
  exports.useCreateCryptoDotComPayment = useCreateCryptoDotComPayment;
2345
2817
  exports.useCreateKrakenExchangeTransfer = useCreateKrakenExchangeTransfer;
2346
2818
  exports.useCreateNewMfaRecoveryCodes = useCreateNewMfaRecoveryCodes;
2819
+ exports.useCreateWaasWalletAccounts = useCreateWaasWalletAccounts;
2820
+ exports.useDelegateWaasKeyShares = useDelegateWaasKeyShares;
2347
2821
  exports.useDeleteMfaDevice = useDeleteMfaDevice;
2348
2822
  exports.useDeletePasskey = useDeletePasskey;
2349
2823
  exports.useDeleteUser = useDeleteUser;
2824
+ exports.useDetectSocialRedirectUrl = useDetectSocialRedirectUrl;
2350
2825
  exports.useDynamicClient = useDynamicClient;
2351
2826
  exports.useExecuteSwapTransaction = useExecuteSwapTransaction;
2827
+ exports.useExportWaasClientKeyshares = useExportWaasClientKeyshares;
2828
+ exports.useExportWaasPrivateKey = useExportWaasPrivateKey;
2352
2829
  exports.useGetActiveNetworkData = useGetActiveNetworkData;
2353
2830
  exports.useGetActiveNetworkId = useGetActiveNetworkId;
2354
2831
  exports.useGetAvailableWalletProvidersData = useGetAvailableWalletProvidersData;
@@ -2378,25 +2855,37 @@ exports.useGetWalletAccounts = useGetWalletAccounts;
2378
2855
  exports.useGetWalletConnectCatalog = useGetWalletConnectCatalog;
2379
2856
  exports.useGetWalletConnectCatalogWalletByWalletProviderKey = useGetWalletConnectCatalogWalletByWalletProviderKey;
2380
2857
  exports.useGetWalletOptionsCatalogue = useGetWalletOptionsCatalogue;
2858
+ exports.useGetWalletProviderDataByKey = useGetWalletProviderDataByKey;
2859
+ exports.useGetWalletRecoveryState = useGetWalletRecoveryState;
2860
+ exports.useImportWaasPrivateKey = useImportWaasPrivateKey;
2381
2861
  exports.useInitStatus = useInitStatus;
2862
+ exports.useIsDeviceRegistrationRequired = useIsDeviceRegistrationRequired;
2382
2863
  exports.useIsMfaRequiredForAction = useIsMfaRequiredForAction;
2864
+ exports.useIsPendingRecoveryCodesAcknowledgment = useIsPendingRecoveryCodesAcknowledgment;
2865
+ exports.useIsUserMissingMfaAuth = useIsUserMissingMfaAuth;
2866
+ exports.useIsUserOnboardingComplete = useIsUserOnboardingComplete;
2383
2867
  exports.useLogout = useLogout;
2868
+ exports.useMergeUserAccounts = useMergeUserAccounts;
2869
+ exports.useMigrateFromFireblocks = useMigrateFromFireblocks;
2384
2870
  exports.useOnEvent = useOnEvent;
2385
2871
  exports.useOnWalletProviderEvent = useOnWalletProviderEvent;
2386
2872
  exports.useOnceEvent = useOnceEvent;
2387
2873
  exports.usePrepareFlowSigning = usePrepareFlowSigning;
2388
2874
  exports.useProveWalletAccountOwnership = useProveWalletAccountOwnership;
2389
2875
  exports.useRefreshAuth = useRefreshAuth;
2876
+ exports.useRefreshWaasWalletAccountShares = useRefreshWaasWalletAccountShares;
2390
2877
  exports.useRegisterPasskey = useRegisterPasskey;
2391
2878
  exports.useRegisterTotpMfaDevice = useRegisterTotpMfaDevice;
2392
2879
  exports.useRemoveWalletAccount = useRemoveWalletAccount;
2393
2880
  exports.useRequestExternalAuthElevatedToken = useRequestExternalAuthElevatedToken;
2394
2881
  exports.useRevokeAllRegisteredDevices = useRevokeAllRegisteredDevices;
2395
2882
  exports.useRevokeRegisteredDevice = useRevokeRegisteredDevice;
2883
+ exports.useRevokeWaasDelegation = useRevokeWaasDelegation;
2396
2884
  exports.useSendEmailOTP = useSendEmailOTP;
2397
2885
  exports.useSendSmsOTP = useSendSmsOTP;
2398
2886
  exports.useSessionExpiresAt = useSessionExpiresAt;
2399
2887
  exports.useSetDefaultMfaDevice = useSetDefaultMfaDevice;
2888
+ exports.useSetWaasWalletAccountPassword = useSetWaasWalletAccountPassword;
2400
2889
  exports.useSignInWithExternalJwt = useSignInWithExternalJwt;
2401
2890
  exports.useSignInWithPasskey = useSignInWithPasskey;
2402
2891
  exports.useSignInWithSocialPopUp = useSignInWithSocialPopUp;
@@ -2407,7 +2896,9 @@ exports.useSwitchActiveNetwork = useSwitchActiveNetwork;
2407
2896
  exports.useTransferAmount = useTransferAmount;
2408
2897
  exports.useTransferWalletAccount = useTransferWalletAccount;
2409
2898
  exports.useUnlinkSocialAccount = useUnlinkSocialAccount;
2899
+ exports.useUnlockWallet = useUnlockWallet;
2410
2900
  exports.useUpdateUser = useUpdateUser;
2901
+ exports.useUpdateWaasPassword = useUpdateWaasPassword;
2411
2902
  exports.useUser = useUser;
2412
2903
  exports.useVerifyOTP = useVerifyOTP;
2413
2904
  exports.useVerifyWalletAccount = useVerifyWalletAccount;