@dynamic-labs-sdk/react-hooks 1.18.0 → 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 (70) hide show
  1. package/dist/exports/index.d.ts +15 -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/useGetWalletRecoveryState/index.d.ts +2 -0
  28. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/index.d.ts.map +1 -0
  29. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.d.ts +48 -0
  30. package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.d.ts.map +1 -0
  31. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/index.d.ts +2 -0
  32. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/index.d.ts.map +1 -0
  33. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.d.ts +47 -0
  34. package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.d.ts.map +1 -0
  35. package/dist/hooks/wrappers/functions/useMergeUserAccounts/index.d.ts +3 -0
  36. package/dist/hooks/wrappers/functions/useMergeUserAccounts/index.d.ts.map +1 -0
  37. package/dist/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.d.ts +52 -0
  38. package/dist/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.d.ts.map +1 -0
  39. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/index.d.ts +2 -0
  40. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/index.d.ts.map +1 -0
  41. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.d.ts +50 -0
  42. package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.d.ts.map +1 -0
  43. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/index.d.ts +2 -0
  44. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/index.d.ts.map +1 -0
  45. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.d.ts +46 -0
  46. package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.d.ts.map +1 -0
  47. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/index.d.ts +2 -0
  48. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/index.d.ts.map +1 -0
  49. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.d.ts +46 -0
  50. package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.d.ts.map +1 -0
  51. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/index.d.ts +2 -0
  52. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/index.d.ts.map +1 -0
  53. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.d.ts +46 -0
  54. package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.d.ts.map +1 -0
  55. package/dist/hooks/wrappers/functions/useUnlockWallet/index.d.ts +2 -0
  56. package/dist/hooks/wrappers/functions/useUnlockWallet/index.d.ts.map +1 -0
  57. package/dist/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.d.ts +46 -0
  58. package/dist/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.d.ts.map +1 -0
  59. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/index.d.ts +2 -0
  60. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/index.d.ts.map +1 -0
  61. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.d.ts +47 -0
  62. package/dist/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.d.ts.map +1 -0
  63. package/dist/hooks/wrappers/functions/useVerifyOTP/useVerifyOTP.d.ts +1 -1
  64. package/dist/hooks/wrappers/functions/useVerifyOTP/useVerifyOTP.d.ts.map +1 -1
  65. package/dist/index.cjs +379 -1
  66. package/dist/index.cjs.map +1 -1
  67. package/dist/index.esm.js +366 -3
  68. package/dist/index.esm.js.map +1 -1
  69. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  70. package/package.json +4 -4
package/dist/index.esm.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
2
- import { BaseError, acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, addNetwork, assertWalletAccountSigningAvailability, attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, broadcastFlow, cancelFlow, checkStepUpAuth, completeDeviceRegistration, completeSocialRedirect, confirmTransaction, connectAndVerifyWithWalletProvider, connectWithWalletProvider, createCoinbaseOnrampOrder, createCryptoDotComPayment, createKrakenExchangeTransfer, createNewMfaRecoveryCodes, deleteMfaDevice, deletePasskey, deleteUser, executeSwapTransaction, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalanceForAddress, getCoinbaseBuyUrl, getConnectedAddresses, getFlow, getFlowQuote, getGoogleDriveBackupReadiness, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMoonPayCurrencies, getMoonPayUrl, getMultichainTokenBalances, getNativeBalance, getPasskeys, getRegisteredDevices, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, isDeviceRegistrationRequired, isMfaRequiredForAction, isPendingRecoveryCodesAcknowledgment, isUserMissingMfaAuth, isUserOnboardingComplete, logout, onEvent, onWalletProviderEvent, onceEvent, prepareFlowSigning, proveWalletAccountOwnership, refreshAuth, registerPasskey, registerTotpMfaDevice, removeWalletAccount, requestExternalAuthElevatedToken, revokeAllRegisteredDevices, revokeRegisteredDevice, sendEmailOTP, sendSmsOTP, setDefaultMfaDevice, signInWithExternalJwt, signInWithPasskey, signInWithSocialPopUp, signInWithSocialRedirect, signMessage, submitFlowTransaction, switchActiveNetwork, transferAmount, transferWalletAccount, unlinkSocialAccount, updateUser, verifyOTP, verifyWalletAccount, waitForClientInitialized } from "@dynamic-labs-sdk/client";
2
+ import { BaseError, acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, addNetwork, assertWalletAccountSigningAvailability, attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, broadcastFlow, cancelFlow, checkStepUpAuth, completeDeviceRegistration, completeSocialRedirect, confirmTransaction, connectAndVerifyWithWalletProvider, connectWithWalletProvider, createCoinbaseOnrampOrder, createCryptoDotComPayment, createKrakenExchangeTransfer, createNewMfaRecoveryCodes, deleteMfaDevice, deletePasskey, deleteUser, detectSocialRedirectUrl, executeSwapTransaction, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalanceForAddress, getCoinbaseBuyUrl, getConnectedAddresses, getFlow, getFlowQuote, getGoogleDriveBackupReadiness, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMoonPayCurrencies, getMoonPayUrl, getMultichainTokenBalances, getNativeBalance, getPasskeys, getRegisteredDevices, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, isDeviceRegistrationRequired, isMfaRequiredForAction, isPendingRecoveryCodesAcknowledgment, isUserMissingMfaAuth, isUserOnboardingComplete, logout, mergeUserAccounts, onEvent, onWalletProviderEvent, onceEvent, prepareFlowSigning, proveWalletAccountOwnership, refreshAuth, registerPasskey, registerTotpMfaDevice, removeWalletAccount, requestExternalAuthElevatedToken, revokeAllRegisteredDevices, revokeRegisteredDevice, sendEmailOTP, sendSmsOTP, setDefaultMfaDevice, signInWithExternalJwt, signInWithPasskey, signInWithSocialPopUp, signInWithSocialRedirect, signMessage, submitFlowTransaction, switchActiveNetwork, transferAmount, transferWalletAccount, unlinkSocialAccount, updateUser, verifyOTP, verifyWalletAccount, waitForClientInitialized } from "@dynamic-labs-sdk/client";
3
3
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
4
4
  import { createContext, useContext, useEffect, useMemo, useRef } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { getCore } from "@dynamic-labs-sdk/client/core";
7
+ import { backupWaasKeySharesToGoogleDrive, createWaasWalletAccounts, delegateWaasKeyShares, exportWaasClientKeyshares, exportWaasPrivateKey, getWalletRecoveryState, importWaasPrivateKey, migrateFromFireblocks, refreshWaasWalletAccountShares, revokeWaasDelegation, setWaasWalletAccountPassword, unlockWallet, updateWaasPassword } from "@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.18.0";
11
+ var version = "1.19.0";
11
12
 
12
13
  //#endregion
13
14
  //#region src/modules/DynamicContext/DynamicContext.ts
@@ -759,6 +760,35 @@ const useCompleteSocialRedirect = ({ mutateParams } = {}) => useBaseMutation({
759
760
  mutationFn: ({ client, variables }) => completeSocialRedirect(variables, client)
760
761
  });
761
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) => detectSocialRedirectUrl(args, client),
788
+ queryKey: ["useDetectSocialRedirectUrl", { url: args.url.href }],
789
+ queryParams
790
+ });
791
+
762
792
  //#endregion
763
793
  //#region src/hooks/wrappers/functions/useConfirmTransaction/useConfirmTransaction.ts
764
794
  /**
@@ -1279,6 +1309,38 @@ const useLogout = ({ mutateParams } = {}) => useBaseMutation({
1279
1309
  mutationFn: ({ client }) => logout(client)
1280
1310
  });
1281
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 }) => mergeUserAccounts(variables, client)
1342
+ });
1343
+
1282
1344
  //#endregion
1283
1345
  //#region src/hooks/wrappers/functions/useGetMfaDevices/useGetMfaDevices.ts
1284
1346
  /**
@@ -2355,6 +2417,307 @@ const useIsUserOnboardingComplete = () => useBaseState({
2355
2417
  selector: (client) => client.user ? isUserOnboardingComplete(client) : false
2356
2418
  });
2357
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 }) => 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 }) => 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 }) => 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 }) => 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 }) => 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) => 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 }) => 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 }) => 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 }) => 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 }) => 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 }) => 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 }) => 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 }) => updateWaasPassword(variables, client)
2719
+ });
2720
+
2358
2721
  //#endregion
2359
2722
  //#region src/hooks/wrappers/state/useInitStatus/useInitStatus.ts
2360
2723
  /**
@@ -2431,5 +2794,5 @@ const useUser = () => useBaseState({
2431
2794
  assertPackageVersion(name, version);
2432
2795
 
2433
2796
  //#endregion
2434
- export { DynamicProvider, useAcknowledgeRecoveryCodes, useAddCoinbaseOnrampOrderEventListener, useAddNetwork, useAssertWalletAccountSigningAvailability, useAttachFlowSource, useAuthenticateMfaRecoveryCode, useAuthenticatePasskeyMFA, useAuthenticateTotpMfaDevice, useBroadcastFlow, useCancelFlow, useCheckStepUpAuth, useCompleteDeviceRegistration, useCompleteSocialRedirect, useConfirmTransaction, useConnectAndVerifyWithWalletProvider, useConnectWithWalletProvider, useCreateCoinbaseOnrampOrder, useCreateCryptoDotComPayment, useCreateKrakenExchangeTransfer, useCreateNewMfaRecoveryCodes, useDeleteMfaDevice, useDeletePasskey, useDeleteUser, useDynamicClient, useExecuteSwapTransaction, useGetActiveNetworkData, useGetActiveNetworkId, useGetAvailableWalletProvidersData, useGetBalanceForAddress, useGetCoinbaseBuyUrl, useGetConnectedAddresses, useGetFlow, useGetFlowQuote, useGetGoogleDriveBackupReadiness, useGetKrakenAccounts, useGetKrakenWhitelistedAddresses, useGetMfaDevices, useGetMfaMethods, useGetMfaRecoveryCodes, useGetMoonPayCurrencies, useGetMoonPayUrl, useGetMultichainTokenBalances, useGetNativeBalance, useGetPasskeys, useGetRegisteredDevices, useGetSwapQuote, useGetSwapStatus, useGetTokenBalances, useGetTransactionHistory, useGetUserSocialAccounts, useGetWalletAccounts, useGetWalletConnectCatalog, useGetWalletConnectCatalogWalletByWalletProviderKey, useGetWalletOptionsCatalogue, useGetWalletProviderDataByKey, useInitStatus, useIsDeviceRegistrationRequired, useIsMfaRequiredForAction, useIsPendingRecoveryCodesAcknowledgment, useIsUserMissingMfaAuth, useIsUserOnboardingComplete, useLogout, useOnEvent, useOnWalletProviderEvent, useOnceEvent, usePrepareFlowSigning, useProveWalletAccountOwnership, useRefreshAuth, useRegisterPasskey, useRegisterTotpMfaDevice, useRemoveWalletAccount, useRequestExternalAuthElevatedToken, useRevokeAllRegisteredDevices, useRevokeRegisteredDevice, useSendEmailOTP, useSendSmsOTP, useSessionExpiresAt, useSetDefaultMfaDevice, useSignInWithExternalJwt, useSignInWithPasskey, useSignInWithSocialPopUp, useSignInWithSocialRedirect, useSignMessage, useSubmitFlowTransaction, useSwitchActiveNetwork, useTransferAmount, useTransferWalletAccount, useUnlinkSocialAccount, useUpdateUser, useUser, useVerifyOTP, useVerifyWalletAccount };
2797
+ export { DynamicProvider, useAcknowledgeRecoveryCodes, useAddCoinbaseOnrampOrderEventListener, useAddNetwork, useAssertWalletAccountSigningAvailability, useAttachFlowSource, useAuthenticateMfaRecoveryCode, useAuthenticatePasskeyMFA, useAuthenticateTotpMfaDevice, useBackupWaasKeySharesToGoogleDrive, useBroadcastFlow, useCancelFlow, useCheckStepUpAuth, useCompleteDeviceRegistration, useCompleteSocialRedirect, useConfirmTransaction, useConnectAndVerifyWithWalletProvider, useConnectWithWalletProvider, useCreateCoinbaseOnrampOrder, useCreateCryptoDotComPayment, useCreateKrakenExchangeTransfer, useCreateNewMfaRecoveryCodes, useCreateWaasWalletAccounts, useDelegateWaasKeyShares, useDeleteMfaDevice, useDeletePasskey, useDeleteUser, useDetectSocialRedirectUrl, useDynamicClient, useExecuteSwapTransaction, useExportWaasClientKeyshares, useExportWaasPrivateKey, useGetActiveNetworkData, useGetActiveNetworkId, useGetAvailableWalletProvidersData, useGetBalanceForAddress, useGetCoinbaseBuyUrl, useGetConnectedAddresses, useGetFlow, useGetFlowQuote, useGetGoogleDriveBackupReadiness, useGetKrakenAccounts, useGetKrakenWhitelistedAddresses, useGetMfaDevices, useGetMfaMethods, useGetMfaRecoveryCodes, useGetMoonPayCurrencies, useGetMoonPayUrl, useGetMultichainTokenBalances, useGetNativeBalance, useGetPasskeys, useGetRegisteredDevices, useGetSwapQuote, useGetSwapStatus, useGetTokenBalances, useGetTransactionHistory, useGetUserSocialAccounts, useGetWalletAccounts, useGetWalletConnectCatalog, useGetWalletConnectCatalogWalletByWalletProviderKey, useGetWalletOptionsCatalogue, useGetWalletProviderDataByKey, useGetWalletRecoveryState, useImportWaasPrivateKey, useInitStatus, useIsDeviceRegistrationRequired, useIsMfaRequiredForAction, useIsPendingRecoveryCodesAcknowledgment, useIsUserMissingMfaAuth, useIsUserOnboardingComplete, useLogout, useMergeUserAccounts, useMigrateFromFireblocks, useOnEvent, useOnWalletProviderEvent, useOnceEvent, usePrepareFlowSigning, useProveWalletAccountOwnership, useRefreshAuth, useRefreshWaasWalletAccountShares, useRegisterPasskey, useRegisterTotpMfaDevice, useRemoveWalletAccount, useRequestExternalAuthElevatedToken, useRevokeAllRegisteredDevices, useRevokeRegisteredDevice, useRevokeWaasDelegation, useSendEmailOTP, useSendSmsOTP, useSessionExpiresAt, useSetDefaultMfaDevice, useSetWaasWalletAccountPassword, useSignInWithExternalJwt, useSignInWithPasskey, useSignInWithSocialPopUp, useSignInWithSocialRedirect, useSignMessage, useSubmitFlowTransaction, useSwitchActiveNetwork, useTransferAmount, useTransferWalletAccount, useUnlinkSocialAccount, useUnlockWallet, useUpdateUser, useUpdateWaasPassword, useUser, useVerifyOTP, useVerifyWalletAccount };
2435
2798
  //# sourceMappingURL=index.esm.js.map