@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.
- package/dist/exports/index.d.ts +15 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/useBackupWaasKeySharesToGoogleDrive.d.ts +47 -0
- package/dist/hooks/wrappers/functions/useBackupWaasKeySharesToGoogleDrive/useBackupWaasKeySharesToGoogleDrive.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/useCreateWaasWalletAccounts.d.ts +47 -0
- package/dist/hooks/wrappers/functions/useCreateWaasWalletAccounts/useCreateWaasWalletAccounts.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/useDelegateWaasKeyShares.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useDelegateWaasKeyShares/useDelegateWaasKeyShares.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/useDetectSocialRedirectUrl.d.ts +48 -0
- package/dist/hooks/wrappers/functions/useDetectSocialRedirectUrl/useDetectSocialRedirectUrl.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/useExportWaasClientKeyshares.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useExportWaasClientKeyshares/useExportWaasClientKeyshares.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/useExportWaasPrivateKey.d.ts +47 -0
- package/dist/hooks/wrappers/functions/useExportWaasPrivateKey/useExportWaasPrivateKey.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.d.ts +48 -0
- package/dist/hooks/wrappers/functions/useGetWalletRecoveryState/useGetWalletRecoveryState.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.d.ts +47 -0
- package/dist/hooks/wrappers/functions/useImportWaasPrivateKey/useImportWaasPrivateKey.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useMergeUserAccounts/index.d.ts +3 -0
- package/dist/hooks/wrappers/functions/useMergeUserAccounts/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.d.ts +52 -0
- package/dist/hooks/wrappers/functions/useMergeUserAccounts/useMergeUserAccounts.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.d.ts +50 -0
- package/dist/hooks/wrappers/functions/useMigrateFromFireblocks/useMigrateFromFireblocks.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useRefreshWaasWalletAccountShares/useRefreshWaasWalletAccountShares.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useRevokeWaasDelegation/useRevokeWaasDelegation.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useSetWaasWalletAccountPassword/useSetWaasWalletAccountPassword.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useUnlockWallet/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useUnlockWallet/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useUnlockWallet/useUnlockWallet.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useUpdateWaasPassword/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useUpdateWaasPassword/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.d.ts +47 -0
- package/dist/hooks/wrappers/functions/useUpdateWaasPassword/useUpdateWaasPassword.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useVerifyOTP/useVerifyOTP.d.ts +1 -1
- package/dist/hooks/wrappers/functions/useVerifyOTP/useVerifyOTP.d.ts.map +1 -1
- package/dist/index.cjs +379 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +366 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- 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.
|
|
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 }) => (0, _dynamic_labs_sdk_client.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) => (0, _dynamic_labs_sdk_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 }) => (0, _dynamic_labs_sdk_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 }) => (0, _dynamic_labs_sdk_client.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 ? (0, _dynamic_labs_sdk_client.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 }) => (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
|
+
|
|
2358
2721
|
//#endregion
|
|
2359
2722
|
//#region src/hooks/wrappers/state/useInitStatus/useInitStatus.ts
|
|
2360
2723
|
/**
|
|
@@ -2440,6 +2803,7 @@ exports.useAttachFlowSource = useAttachFlowSource;
|
|
|
2440
2803
|
exports.useAuthenticateMfaRecoveryCode = useAuthenticateMfaRecoveryCode;
|
|
2441
2804
|
exports.useAuthenticatePasskeyMFA = useAuthenticatePasskeyMFA;
|
|
2442
2805
|
exports.useAuthenticateTotpMfaDevice = useAuthenticateTotpMfaDevice;
|
|
2806
|
+
exports.useBackupWaasKeySharesToGoogleDrive = useBackupWaasKeySharesToGoogleDrive;
|
|
2443
2807
|
exports.useBroadcastFlow = useBroadcastFlow;
|
|
2444
2808
|
exports.useCancelFlow = useCancelFlow;
|
|
2445
2809
|
exports.useCheckStepUpAuth = useCheckStepUpAuth;
|
|
@@ -2452,11 +2816,16 @@ exports.useCreateCoinbaseOnrampOrder = useCreateCoinbaseOnrampOrder;
|
|
|
2452
2816
|
exports.useCreateCryptoDotComPayment = useCreateCryptoDotComPayment;
|
|
2453
2817
|
exports.useCreateKrakenExchangeTransfer = useCreateKrakenExchangeTransfer;
|
|
2454
2818
|
exports.useCreateNewMfaRecoveryCodes = useCreateNewMfaRecoveryCodes;
|
|
2819
|
+
exports.useCreateWaasWalletAccounts = useCreateWaasWalletAccounts;
|
|
2820
|
+
exports.useDelegateWaasKeyShares = useDelegateWaasKeyShares;
|
|
2455
2821
|
exports.useDeleteMfaDevice = useDeleteMfaDevice;
|
|
2456
2822
|
exports.useDeletePasskey = useDeletePasskey;
|
|
2457
2823
|
exports.useDeleteUser = useDeleteUser;
|
|
2824
|
+
exports.useDetectSocialRedirectUrl = useDetectSocialRedirectUrl;
|
|
2458
2825
|
exports.useDynamicClient = useDynamicClient;
|
|
2459
2826
|
exports.useExecuteSwapTransaction = useExecuteSwapTransaction;
|
|
2827
|
+
exports.useExportWaasClientKeyshares = useExportWaasClientKeyshares;
|
|
2828
|
+
exports.useExportWaasPrivateKey = useExportWaasPrivateKey;
|
|
2460
2829
|
exports.useGetActiveNetworkData = useGetActiveNetworkData;
|
|
2461
2830
|
exports.useGetActiveNetworkId = useGetActiveNetworkId;
|
|
2462
2831
|
exports.useGetAvailableWalletProvidersData = useGetAvailableWalletProvidersData;
|
|
@@ -2487,6 +2856,8 @@ exports.useGetWalletConnectCatalog = useGetWalletConnectCatalog;
|
|
|
2487
2856
|
exports.useGetWalletConnectCatalogWalletByWalletProviderKey = useGetWalletConnectCatalogWalletByWalletProviderKey;
|
|
2488
2857
|
exports.useGetWalletOptionsCatalogue = useGetWalletOptionsCatalogue;
|
|
2489
2858
|
exports.useGetWalletProviderDataByKey = useGetWalletProviderDataByKey;
|
|
2859
|
+
exports.useGetWalletRecoveryState = useGetWalletRecoveryState;
|
|
2860
|
+
exports.useImportWaasPrivateKey = useImportWaasPrivateKey;
|
|
2490
2861
|
exports.useInitStatus = useInitStatus;
|
|
2491
2862
|
exports.useIsDeviceRegistrationRequired = useIsDeviceRegistrationRequired;
|
|
2492
2863
|
exports.useIsMfaRequiredForAction = useIsMfaRequiredForAction;
|
|
@@ -2494,22 +2865,27 @@ exports.useIsPendingRecoveryCodesAcknowledgment = useIsPendingRecoveryCodesAckno
|
|
|
2494
2865
|
exports.useIsUserMissingMfaAuth = useIsUserMissingMfaAuth;
|
|
2495
2866
|
exports.useIsUserOnboardingComplete = useIsUserOnboardingComplete;
|
|
2496
2867
|
exports.useLogout = useLogout;
|
|
2868
|
+
exports.useMergeUserAccounts = useMergeUserAccounts;
|
|
2869
|
+
exports.useMigrateFromFireblocks = useMigrateFromFireblocks;
|
|
2497
2870
|
exports.useOnEvent = useOnEvent;
|
|
2498
2871
|
exports.useOnWalletProviderEvent = useOnWalletProviderEvent;
|
|
2499
2872
|
exports.useOnceEvent = useOnceEvent;
|
|
2500
2873
|
exports.usePrepareFlowSigning = usePrepareFlowSigning;
|
|
2501
2874
|
exports.useProveWalletAccountOwnership = useProveWalletAccountOwnership;
|
|
2502
2875
|
exports.useRefreshAuth = useRefreshAuth;
|
|
2876
|
+
exports.useRefreshWaasWalletAccountShares = useRefreshWaasWalletAccountShares;
|
|
2503
2877
|
exports.useRegisterPasskey = useRegisterPasskey;
|
|
2504
2878
|
exports.useRegisterTotpMfaDevice = useRegisterTotpMfaDevice;
|
|
2505
2879
|
exports.useRemoveWalletAccount = useRemoveWalletAccount;
|
|
2506
2880
|
exports.useRequestExternalAuthElevatedToken = useRequestExternalAuthElevatedToken;
|
|
2507
2881
|
exports.useRevokeAllRegisteredDevices = useRevokeAllRegisteredDevices;
|
|
2508
2882
|
exports.useRevokeRegisteredDevice = useRevokeRegisteredDevice;
|
|
2883
|
+
exports.useRevokeWaasDelegation = useRevokeWaasDelegation;
|
|
2509
2884
|
exports.useSendEmailOTP = useSendEmailOTP;
|
|
2510
2885
|
exports.useSendSmsOTP = useSendSmsOTP;
|
|
2511
2886
|
exports.useSessionExpiresAt = useSessionExpiresAt;
|
|
2512
2887
|
exports.useSetDefaultMfaDevice = useSetDefaultMfaDevice;
|
|
2888
|
+
exports.useSetWaasWalletAccountPassword = useSetWaasWalletAccountPassword;
|
|
2513
2889
|
exports.useSignInWithExternalJwt = useSignInWithExternalJwt;
|
|
2514
2890
|
exports.useSignInWithPasskey = useSignInWithPasskey;
|
|
2515
2891
|
exports.useSignInWithSocialPopUp = useSignInWithSocialPopUp;
|
|
@@ -2520,7 +2896,9 @@ exports.useSwitchActiveNetwork = useSwitchActiveNetwork;
|
|
|
2520
2896
|
exports.useTransferAmount = useTransferAmount;
|
|
2521
2897
|
exports.useTransferWalletAccount = useTransferWalletAccount;
|
|
2522
2898
|
exports.useUnlinkSocialAccount = useUnlinkSocialAccount;
|
|
2899
|
+
exports.useUnlockWallet = useUnlockWallet;
|
|
2523
2900
|
exports.useUpdateUser = useUpdateUser;
|
|
2901
|
+
exports.useUpdateWaasPassword = useUpdateWaasPassword;
|
|
2524
2902
|
exports.useUser = useUser;
|
|
2525
2903
|
exports.useVerifyOTP = useVerifyOTP;
|
|
2526
2904
|
exports.useVerifyWalletAccount = useVerifyWalletAccount;
|