@dynamic-labs-sdk/react-hooks 1.6.0 → 1.8.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 (144) hide show
  1. package/dist/exports/index.d.ts +35 -1
  2. package/dist/exports/index.d.ts.map +1 -1
  3. package/dist/hooks/useAcknowledgeRecoveryCodes/index.d.ts +2 -0
  4. package/dist/hooks/useAcknowledgeRecoveryCodes/index.d.ts.map +1 -0
  5. package/dist/hooks/useAcknowledgeRecoveryCodes/useAcknowledgeRecoveryCodes.d.ts +24 -0
  6. package/dist/hooks/useAcknowledgeRecoveryCodes/useAcknowledgeRecoveryCodes.d.ts.map +1 -0
  7. package/dist/hooks/useActiveNetworkData/index.d.ts +2 -0
  8. package/dist/hooks/useActiveNetworkData/index.d.ts.map +1 -0
  9. package/dist/hooks/useActiveNetworkData/useActiveNetworkData.d.ts +24 -0
  10. package/dist/hooks/useActiveNetworkData/useActiveNetworkData.d.ts.map +1 -0
  11. package/dist/hooks/useAddNetwork/index.d.ts +2 -0
  12. package/dist/hooks/useAddNetwork/index.d.ts.map +1 -0
  13. package/dist/hooks/useAddNetwork/useAddNetwork.d.ts +31 -0
  14. package/dist/hooks/useAddNetwork/useAddNetwork.d.ts.map +1 -0
  15. package/dist/hooks/useBalanceForAddress/index.d.ts +2 -0
  16. package/dist/hooks/useBalanceForAddress/index.d.ts.map +1 -0
  17. package/dist/hooks/useBalanceForAddress/useBalanceForAddress.d.ts +24 -0
  18. package/dist/hooks/useBalanceForAddress/useBalanceForAddress.d.ts.map +1 -0
  19. package/dist/hooks/useCheckStepUpAuth/index.d.ts +3 -0
  20. package/dist/hooks/useCheckStepUpAuth/index.d.ts.map +1 -0
  21. package/dist/hooks/useCheckStepUpAuth/useCheckStepUpAuth.d.ts +30 -0
  22. package/dist/hooks/useCheckStepUpAuth/useCheckStepUpAuth.d.ts.map +1 -0
  23. package/dist/hooks/useCoinbaseBuyUrl/index.d.ts +2 -0
  24. package/dist/hooks/useCoinbaseBuyUrl/index.d.ts.map +1 -0
  25. package/dist/hooks/useCoinbaseBuyUrl/useCoinbaseBuyUrl.d.ts +22 -0
  26. package/dist/hooks/useCoinbaseBuyUrl/useCoinbaseBuyUrl.d.ts.map +1 -0
  27. package/dist/hooks/useCoinbaseOnrampOrderEventListener/index.d.ts +3 -0
  28. package/dist/hooks/useCoinbaseOnrampOrderEventListener/index.d.ts.map +1 -0
  29. package/dist/hooks/useCoinbaseOnrampOrderEventListener/useCoinbaseOnrampOrderEventListener.d.ts +26 -0
  30. package/dist/hooks/useCoinbaseOnrampOrderEventListener/useCoinbaseOnrampOrderEventListener.d.ts.map +1 -0
  31. package/dist/hooks/useCompleteDeviceRegistration/index.d.ts +2 -0
  32. package/dist/hooks/useCompleteDeviceRegistration/index.d.ts.map +1 -0
  33. package/dist/hooks/useCompleteDeviceRegistration/useCompleteDeviceRegistration.d.ts +26 -0
  34. package/dist/hooks/useCompleteDeviceRegistration/useCompleteDeviceRegistration.d.ts.map +1 -0
  35. package/dist/hooks/useCompleteSocialRedirect/index.d.ts +2 -0
  36. package/dist/hooks/useCompleteSocialRedirect/index.d.ts.map +1 -0
  37. package/dist/hooks/useCompleteSocialRedirect/useCompleteSocialRedirect.d.ts +24 -0
  38. package/dist/hooks/useCompleteSocialRedirect/useCompleteSocialRedirect.d.ts.map +1 -0
  39. package/dist/hooks/useConfirmTransaction/index.d.ts +2 -0
  40. package/dist/hooks/useConfirmTransaction/index.d.ts.map +1 -0
  41. package/dist/hooks/useConfirmTransaction/useConfirmTransaction.d.ts +23 -0
  42. package/dist/hooks/useConfirmTransaction/useConfirmTransaction.d.ts.map +1 -0
  43. package/dist/hooks/useConnectAndVerifyWithWalletProvider/index.d.ts +3 -0
  44. package/dist/hooks/useConnectAndVerifyWithWalletProvider/index.d.ts.map +1 -0
  45. package/dist/hooks/useConnectAndVerifyWithWalletProvider/useConnectAndVerifyWithWalletProvider.d.ts +40 -0
  46. package/dist/hooks/useConnectAndVerifyWithWalletProvider/useConnectAndVerifyWithWalletProvider.d.ts.map +1 -0
  47. package/dist/hooks/useConnectWithWalletProvider/index.d.ts +3 -0
  48. package/dist/hooks/useConnectWithWalletProvider/index.d.ts.map +1 -0
  49. package/dist/hooks/useConnectWithWalletProvider/useConnectWithWalletProvider.d.ts +38 -0
  50. package/dist/hooks/useConnectWithWalletProvider/useConnectWithWalletProvider.d.ts.map +1 -0
  51. package/dist/hooks/useCreateCoinbaseOnrampOrder/index.d.ts +2 -0
  52. package/dist/hooks/useCreateCoinbaseOnrampOrder/index.d.ts.map +1 -0
  53. package/dist/hooks/useCreateCoinbaseOnrampOrder/useCreateCoinbaseOnrampOrder.d.ts +23 -0
  54. package/dist/hooks/useCreateCoinbaseOnrampOrder/useCreateCoinbaseOnrampOrder.d.ts.map +1 -0
  55. package/dist/hooks/useCreateCryptoDotComPayment/index.d.ts +2 -0
  56. package/dist/hooks/useCreateCryptoDotComPayment/index.d.ts.map +1 -0
  57. package/dist/hooks/useCreateCryptoDotComPayment/useCreateCryptoDotComPayment.d.ts +24 -0
  58. package/dist/hooks/useCreateCryptoDotComPayment/useCreateCryptoDotComPayment.d.ts.map +1 -0
  59. package/dist/hooks/useExecuteSwapTransaction/index.d.ts +2 -0
  60. package/dist/hooks/useExecuteSwapTransaction/index.d.ts.map +1 -0
  61. package/dist/hooks/useExecuteSwapTransaction/useExecuteSwapTransaction.d.ts +25 -0
  62. package/dist/hooks/useExecuteSwapTransaction/useExecuteSwapTransaction.d.ts.map +1 -0
  63. package/dist/hooks/useGoogleDriveBackupReadiness/index.d.ts +2 -0
  64. package/dist/hooks/useGoogleDriveBackupReadiness/index.d.ts.map +1 -0
  65. package/dist/hooks/useGoogleDriveBackupReadiness/useGoogleDriveBackupReadiness.d.ts +21 -0
  66. package/dist/hooks/useGoogleDriveBackupReadiness/useGoogleDriveBackupReadiness.d.ts.map +1 -0
  67. package/dist/hooks/useKrakenWhitelistedAddresses/index.d.ts +2 -0
  68. package/dist/hooks/useKrakenWhitelistedAddresses/index.d.ts.map +1 -0
  69. package/dist/hooks/useKrakenWhitelistedAddresses/useKrakenWhitelistedAddresses.d.ts +21 -0
  70. package/dist/hooks/useKrakenWhitelistedAddresses/useKrakenWhitelistedAddresses.d.ts.map +1 -0
  71. package/dist/hooks/useMoonPayCurrencies/index.d.ts +2 -0
  72. package/dist/hooks/useMoonPayCurrencies/index.d.ts.map +1 -0
  73. package/dist/hooks/useMoonPayCurrencies/useMoonPayCurrencies.d.ts +22 -0
  74. package/dist/hooks/useMoonPayCurrencies/useMoonPayCurrencies.d.ts.map +1 -0
  75. package/dist/hooks/useMoonPayUrl/index.d.ts +2 -0
  76. package/dist/hooks/useMoonPayUrl/index.d.ts.map +1 -0
  77. package/dist/hooks/useMoonPayUrl/useMoonPayUrl.d.ts +22 -0
  78. package/dist/hooks/useMoonPayUrl/useMoonPayUrl.d.ts.map +1 -0
  79. package/dist/hooks/useOnceEvent/index.d.ts +2 -0
  80. package/dist/hooks/useOnceEvent/index.d.ts.map +1 -0
  81. package/dist/hooks/useOnceEvent/useOnceEvent.d.ts +18 -0
  82. package/dist/hooks/useOnceEvent/useOnceEvent.d.ts.map +1 -0
  83. package/dist/hooks/useProveWalletAccountOwnership/index.d.ts +2 -0
  84. package/dist/hooks/useProveWalletAccountOwnership/index.d.ts.map +1 -0
  85. package/dist/hooks/useProveWalletAccountOwnership/useProveWalletAccountOwnership.d.ts +29 -0
  86. package/dist/hooks/useProveWalletAccountOwnership/useProveWalletAccountOwnership.d.ts.map +1 -0
  87. package/dist/hooks/useRefreshAuth/index.d.ts +2 -0
  88. package/dist/hooks/useRefreshAuth/index.d.ts.map +1 -0
  89. package/dist/hooks/useRefreshAuth/useRefreshAuth.d.ts +24 -0
  90. package/dist/hooks/useRefreshAuth/useRefreshAuth.d.ts.map +1 -0
  91. package/dist/hooks/useRequestExternalAuthElevatedToken/index.d.ts +2 -0
  92. package/dist/hooks/useRequestExternalAuthElevatedToken/index.d.ts.map +1 -0
  93. package/dist/hooks/useRequestExternalAuthElevatedToken/useRequestExternalAuthElevatedToken.d.ts +26 -0
  94. package/dist/hooks/useRequestExternalAuthElevatedToken/useRequestExternalAuthElevatedToken.d.ts.map +1 -0
  95. package/dist/hooks/useRevokeAllRegisteredDevices/index.d.ts +2 -0
  96. package/dist/hooks/useRevokeAllRegisteredDevices/index.d.ts.map +1 -0
  97. package/dist/hooks/useRevokeAllRegisteredDevices/useRevokeAllRegisteredDevices.d.ts +25 -0
  98. package/dist/hooks/useRevokeAllRegisteredDevices/useRevokeAllRegisteredDevices.d.ts.map +1 -0
  99. package/dist/hooks/useSignInWithExternalJwt/index.d.ts +2 -0
  100. package/dist/hooks/useSignInWithExternalJwt/index.d.ts.map +1 -0
  101. package/dist/hooks/useSignInWithExternalJwt/useSignInWithExternalJwt.d.ts +26 -0
  102. package/dist/hooks/useSignInWithExternalJwt/useSignInWithExternalJwt.d.ts.map +1 -0
  103. package/dist/hooks/useSignInWithSocialPopUp/index.d.ts +2 -0
  104. package/dist/hooks/useSignInWithSocialPopUp/index.d.ts.map +1 -0
  105. package/dist/hooks/useSignInWithSocialPopUp/useSignInWithSocialPopUp.d.ts +24 -0
  106. package/dist/hooks/useSignInWithSocialPopUp/useSignInWithSocialPopUp.d.ts.map +1 -0
  107. package/dist/hooks/useSignInWithSocialRedirect/index.d.ts +2 -0
  108. package/dist/hooks/useSignInWithSocialRedirect/index.d.ts.map +1 -0
  109. package/dist/hooks/useSignInWithSocialRedirect/useSignInWithSocialRedirect.d.ts +23 -0
  110. package/dist/hooks/useSignInWithSocialRedirect/useSignInWithSocialRedirect.d.ts.map +1 -0
  111. package/dist/hooks/useSwapQuote/index.d.ts +2 -0
  112. package/dist/hooks/useSwapQuote/index.d.ts.map +1 -0
  113. package/dist/hooks/useSwapQuote/useSwapQuote.d.ts +22 -0
  114. package/dist/hooks/useSwapQuote/useSwapQuote.d.ts.map +1 -0
  115. package/dist/hooks/useSwapStatus/index.d.ts +2 -0
  116. package/dist/hooks/useSwapStatus/index.d.ts.map +1 -0
  117. package/dist/hooks/useSwapStatus/useSwapStatus.d.ts +22 -0
  118. package/dist/hooks/useSwapStatus/useSwapStatus.d.ts.map +1 -0
  119. package/dist/hooks/useTransferAmount/index.d.ts +2 -0
  120. package/dist/hooks/useTransferAmount/index.d.ts.map +1 -0
  121. package/dist/hooks/useTransferAmount/useTransferAmount.d.ts +25 -0
  122. package/dist/hooks/useTransferAmount/useTransferAmount.d.ts.map +1 -0
  123. package/dist/hooks/useTransferWalletAccount/index.d.ts +2 -0
  124. package/dist/hooks/useTransferWalletAccount/index.d.ts.map +1 -0
  125. package/dist/hooks/useTransferWalletAccount/useTransferWalletAccount.d.ts +26 -0
  126. package/dist/hooks/useTransferWalletAccount/useTransferWalletAccount.d.ts.map +1 -0
  127. package/dist/hooks/useWalletConnectCatalog/index.d.ts +3 -0
  128. package/dist/hooks/useWalletConnectCatalog/index.d.ts.map +1 -0
  129. package/dist/hooks/useWalletConnectCatalog/useWalletConnectCatalog.d.ts +24 -0
  130. package/dist/hooks/useWalletConnectCatalog/useWalletConnectCatalog.d.ts.map +1 -0
  131. package/dist/hooks/useWalletOptionsCatalogue/index.d.ts +2 -0
  132. package/dist/hooks/useWalletOptionsCatalogue/index.d.ts.map +1 -0
  133. package/dist/hooks/useWalletOptionsCatalogue/useWalletOptionsCatalogue.d.ts +22 -0
  134. package/dist/hooks/useWalletOptionsCatalogue/useWalletOptionsCatalogue.d.ts.map +1 -0
  135. package/dist/hooks/useWalletProviderEvent/index.d.ts +2 -0
  136. package/dist/hooks/useWalletProviderEvent/index.d.ts.map +1 -0
  137. package/dist/hooks/useWalletProviderEvent/useWalletProviderEvent.d.ts +19 -0
  138. package/dist/hooks/useWalletProviderEvent/useWalletProviderEvent.d.ts.map +1 -0
  139. package/dist/index.cjs +709 -35
  140. package/dist/index.cjs.map +1 -1
  141. package/dist/index.esm.js +677 -37
  142. package/dist/index.esm.js.map +1 -1
  143. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  144. package/package.json +4 -4
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
2
- import { BaseError, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, consumeMfaToken, createNewMfaRecoveryCodes, deleteMfaDevice, deletePasskey, deleteUser, getAvailableWalletProvidersData, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMultichainTokenBalances, getNativeBalance, getNetworksData, getPasskeys, getRegisteredDevices, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccounts, isCaptchaRequired, isUserMissingMfaAuth, isUserOnboardingComplete, logout, onEvent, registerPasskey, registerTotpMfaDevice, removeWalletAccount, revokeRegisteredDevice, sendEmailOTP, sendSmsOTP, setDefaultMfaDevice, signInWithPasskey, signMessage, switchActiveNetwork, unlinkSocialAccount, updateUser, verifyOTP, verifyWalletAccount, waitForClientInitialized } from "@dynamic-labs-sdk/client";
2
+ import { BaseError, acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, addNetwork, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, checkStepUpAuth, completeDeviceRegistration, completeSocialRedirect, confirmTransaction, connectAndVerifyWithWalletProvider, connectWithWalletProvider, consumeMfaToken, createCoinbaseOnrampOrder, createCryptoDotComPayment, createNewMfaRecoveryCodes, deleteMfaDevice, deletePasskey, deleteUser, executeSwapTransaction, getActiveNetworkData, getAvailableWalletProvidersData, getBalanceForAddress, getCoinbaseBuyUrl, getGoogleDriveBackupReadiness, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMoonPayCurrencies, getMoonPayUrl, getMultichainTokenBalances, getNativeBalance, getNetworksData, getPasskeys, getRegisteredDevices, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccounts, getWalletConnectCatalog, getWalletOptionsCatalogue, isCaptchaRequired, isUserMissingMfaAuth, isUserOnboardingComplete, logout, onEvent, onWalletProviderEvent, onceEvent, proveWalletAccountOwnership, refreshAuth, registerPasskey, registerTotpMfaDevice, removeWalletAccount, requestExternalAuthElevatedToken, revokeAllRegisteredDevices, revokeRegisteredDevice, sendEmailOTP, sendSmsOTP, setDefaultMfaDevice, signInWithExternalJwt, signInWithPasskey, signInWithSocialPopUp, signInWithSocialRedirect, signMessage, 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";
@@ -7,7 +7,7 @@ import { getCore } from "@dynamic-labs-sdk/client/core";
7
7
 
8
8
  //#region package.json
9
9
  var name = "@dynamic-labs-sdk/react-hooks";
10
- var version = "1.6.0";
10
+ var version = "1.8.0";
11
11
 
12
12
  //#endregion
13
13
  //#region src/modules/DynamicContext/DynamicContext.ts
@@ -85,6 +85,95 @@ const useBaseMutation = ({ mutationFn, mutateParams }) => {
85
85
  });
86
86
  };
87
87
 
88
+ //#endregion
89
+ //#region src/hooks/useAcknowledgeRecoveryCodes/useAcknowledgeRecoveryCodes.ts
90
+ /**
91
+ * Marks the current user's MFA recovery codes as acknowledged. Takes no arguments — call `mutate()` after the user confirms they have stored the codes shown by {@link useMfaRecoveryCodes}.
92
+ *
93
+ * @example
94
+ * ```tsx
95
+ * const { mutate: acknowledge, isPending } = useAcknowledgeRecoveryCodes();
96
+ * <button onClick={() => acknowledge()} disabled={isPending}>
97
+ * I've saved my recovery codes
98
+ * </button>
99
+ * ```
100
+ */
101
+ const useAcknowledgeRecoveryCodes = ({ mutateParams } = {}) => useBaseMutation({
102
+ mutateParams,
103
+ mutationFn: ({ client }) => acknowledgeRecoveryCodes(client)
104
+ });
105
+
106
+ //#endregion
107
+ //#region src/foundation/useBaseQuery/useBaseQuery.ts
108
+ /**
109
+ * Internal hook that wraps a react-query `useQuery` with the conventions used
110
+ * by every async-read hook in this package:
111
+ *
112
+ * - `queryFn` receives the resolved `DynamicClient` from context, and is
113
+ * gated behind `waitForClientInitialized` so customers never see "client
114
+ * not ready" errors on first render.
115
+ * - Callers pass `queryParams` to override any default `UseQueryOptions`,
116
+ * so consumers can opt into retries / custom staleTime / etc.
117
+ * - Callers pass `enabled: false` (typically derived from whether their
118
+ * pseudo-required arguments are present) to short-circuit fetches.
119
+ *
120
+ * Returns the full `useQuery` result — `data`, `error`, `isLoading`,
121
+ * `isFetching`, `isSuccess`, `refetch`, `status`, etc.
122
+ */
123
+ const useBaseQuery = ({ queryFn, queryKey, queryParams, enabled = true }) => {
124
+ const client = useDynamicClient();
125
+ return useQuery({
126
+ queryFn: async () => {
127
+ await waitForClientInitialized(client);
128
+ return queryFn(client);
129
+ },
130
+ queryKey: useMemo(() => [
131
+ "@dynamic-labs-sdk/react-hooks",
132
+ "query",
133
+ ...queryKey
134
+ ], [queryKey]),
135
+ ...queryParams,
136
+ enabled: enabled && queryParams?.enabled !== false
137
+ });
138
+ };
139
+
140
+ //#endregion
141
+ //#region src/hooks/useActiveNetworkData/useActiveNetworkData.ts
142
+ /**
143
+ * Wraps `getActiveNetworkData` from `@dynamic-labs-sdk/client`. Returns the network the given wallet account is currently on.
144
+ *
145
+ * @example
146
+ * ```tsx
147
+ * const { data: network, isLoading } = useActiveNetworkData({ walletAccount });
148
+ * ```
149
+ */
150
+ const useActiveNetworkData = ({ queryParams, ...args }) => useBaseQuery({
151
+ queryFn: (client) => getActiveNetworkData(args, client),
152
+ queryKey: ["useActiveNetworkData", args],
153
+ queryParams
154
+ });
155
+
156
+ //#endregion
157
+ //#region src/hooks/useAddNetwork/useAddNetwork.ts
158
+ /**
159
+ * Wraps `addNetwork` from `@dynamic-labs-sdk/client`. Call `mutate({ networkData, walletAccount })` to register a custom network on the given wallet account.
160
+ *
161
+ * @example
162
+ * ```tsx
163
+ * const { mutate: addNetwork, isPending } = useAddNetwork();
164
+ * <button
165
+ * onClick={() => addNetwork({ networkData, walletAccount })}
166
+ * disabled={isPending}
167
+ * >
168
+ * Add network
169
+ * </button>
170
+ * ```
171
+ */
172
+ const useAddNetwork = ({ mutateParams } = {}) => useBaseMutation({
173
+ mutateParams,
174
+ mutationFn: ({ client, variables }) => addNetwork(variables, client)
175
+ });
176
+
88
177
  //#endregion
89
178
  //#region src/hooks/useAuthenticateMfaRecoveryCode/useAuthenticateMfaRecoveryCode.ts
90
179
  /**
@@ -280,6 +369,194 @@ const useAvailableWalletProvidersData = () => useBaseState({
280
369
  selector: (client) => getAvailableWalletProvidersData(client)
281
370
  });
282
371
 
372
+ //#endregion
373
+ //#region src/hooks/useBalanceForAddress/useBalanceForAddress.ts
374
+ /**
375
+ * Wraps `getBalanceForAddress` from `@dynamic-labs-sdk/client`. Returns the native-token balance for an arbitrary address on the given chain/network.
376
+ *
377
+ * @example
378
+ * ```tsx
379
+ * const { data, isLoading } = useBalanceForAddress({ address, chain, networkId });
380
+ * ```
381
+ */
382
+ const useBalanceForAddress = ({ queryParams, ...args }) => useBaseQuery({
383
+ queryFn: (client) => getBalanceForAddress(args, client),
384
+ queryKey: ["useBalanceForAddress", args],
385
+ queryParams
386
+ });
387
+
388
+ //#endregion
389
+ //#region src/hooks/useCheckStepUpAuth/useCheckStepUpAuth.ts
390
+ /**
391
+ * Checks whether step-up authentication is required for a given scope and
392
+ * returns the credentials available to satisfy it.
393
+ *
394
+ * Wraps `checkStepUpAuth` from `@dynamic-labs-sdk/client`. Use the returned
395
+ * `isRequired` to decide whether to show a step-up UI before a sensitive
396
+ * action (e.g. exporting a wallet).
397
+ *
398
+ * @example
399
+ * ```tsx
400
+ * const { data } = useCheckStepUpAuth({ scope: TokenScope.Walletexport });
401
+ * if (data?.isRequired) {
402
+ * // render step-up UI using data.credentials
403
+ * }
404
+ * ```
405
+ */
406
+ const useCheckStepUpAuth = ({ queryParams, ...args }) => useBaseQuery({
407
+ queryFn: (client) => checkStepUpAuth(args, client),
408
+ queryKey: ["useCheckStepUpAuth", args],
409
+ queryParams
410
+ });
411
+
412
+ //#endregion
413
+ //#region src/hooks/useCoinbaseBuyUrl/useCoinbaseBuyUrl.ts
414
+ /**
415
+ * Wraps `getCoinbaseBuyUrl` from `@dynamic-labs-sdk/client`. Returns a Coinbase onramp buy URL for the given parameters.
416
+ *
417
+ * @example
418
+ * ```tsx
419
+ * const { data: buyUrl, isLoading } = useCoinbaseBuyUrl(buyUrlParams);
420
+ * ```
421
+ */
422
+ const useCoinbaseBuyUrl = ({ queryParams, ...args }) => useBaseQuery({
423
+ queryFn: (client) => getCoinbaseBuyUrl(args, client),
424
+ queryKey: ["useCoinbaseBuyUrl", args],
425
+ queryParams
426
+ });
427
+
428
+ //#endregion
429
+ //#region src/hooks/useCoinbaseOnrampOrderEventListener/useCoinbaseOnrampOrderEventListener.ts
430
+ /**
431
+ * Subscribes to Coinbase onramp order events for the duration of the component.
432
+ *
433
+ * Wraps `addCoinbaseOnrampOrderEventListener` from `@dynamic-labs-sdk/client`.
434
+ * Uses a ref to always call the latest listener without re-subscribing, and
435
+ * removes the listener on unmount.
436
+ *
437
+ * @example
438
+ * ```tsx
439
+ * useCoinbaseOnrampOrderEventListener({
440
+ * listener: ({ eventName, data }) => console.log(eventName, data),
441
+ * });
442
+ * ```
443
+ */
444
+ const useCoinbaseOnrampOrderEventListener = ({ listener }) => {
445
+ const client = useDynamicClient();
446
+ const callbackRef = useRef(listener);
447
+ callbackRef.current = listener;
448
+ useEffect(() => addCoinbaseOnrampOrderEventListener({ listener: (...args) => {
449
+ callbackRef.current(...args);
450
+ } }, client), [client]);
451
+ };
452
+
453
+ //#endregion
454
+ //#region src/hooks/useCompleteDeviceRegistration/useCompleteDeviceRegistration.ts
455
+ /**
456
+ * Wraps `completeDeviceRegistration` from `@dynamic-labs-sdk/client`. Call `mutate({ deviceToken })` with the device token parsed from the redirect URL; the resolved `data` is a `VerifyResponse`.
457
+ *
458
+ * @example
459
+ * ```tsx
460
+ * const { mutate: completeRegistration, isPending } =
461
+ * useCompleteDeviceRegistration();
462
+ * completeRegistration({ deviceToken });
463
+ * ```
464
+ */
465
+ const useCompleteDeviceRegistration = ({ mutateParams } = {}) => useBaseMutation({
466
+ mutateParams,
467
+ mutationFn: ({ client, variables }) => completeDeviceRegistration(variables, client)
468
+ });
469
+
470
+ //#endregion
471
+ //#region src/hooks/useCompleteSocialRedirect/useCompleteSocialRedirect.ts
472
+ /**
473
+ * Wraps `completeSocialRedirect` from `@dynamic-labs-sdk/client`. Call `mutate(params)` with the OAuth callback URL once the provider has redirected back to finish the sign-in; the resolved `data` is the signed-in `User` (or `null`).
474
+ *
475
+ * @example
476
+ * ```tsx
477
+ * const { mutate: completeSocialRedirect, data: user } =
478
+ * useCompleteSocialRedirect();
479
+ * completeSocialRedirect({ url: new URL(window.location.href) });
480
+ * ```
481
+ */
482
+ const useCompleteSocialRedirect = ({ mutateParams } = {}) => useBaseMutation({
483
+ mutateParams,
484
+ mutationFn: ({ client, variables }) => completeSocialRedirect(variables, client)
485
+ });
486
+
487
+ //#endregion
488
+ //#region src/hooks/useConfirmTransaction/useConfirmTransaction.ts
489
+ /**
490
+ * Wraps `confirmTransaction` from `@dynamic-labs-sdk/client`. Call `mutate({ walletAccount, transactionHash })` to await confirmation of a submitted transaction; the resolved `data` is `void`.
491
+ *
492
+ * @example
493
+ * ```tsx
494
+ * const { mutate: confirmTransaction, isPending } = useConfirmTransaction();
495
+ * confirmTransaction({ walletAccount, transactionHash });
496
+ * ```
497
+ */
498
+ const useConfirmTransaction = ({ mutateParams } = {}) => useBaseMutation({
499
+ mutateParams,
500
+ mutationFn: ({ client, variables }) => confirmTransaction(variables, client)
501
+ });
502
+
503
+ //#endregion
504
+ //#region src/hooks/useConnectAndVerifyWithWalletProvider/useConnectAndVerifyWithWalletProvider.ts
505
+ /**
506
+ * Connects to a wallet provider and verifies ownership in a single step.
507
+ *
508
+ * Wraps `connectAndVerifyWithWalletProvider` from `@dynamic-labs-sdk/client`.
509
+ * Call `mutate({ walletProviderKey })` to connect and prompt the user to sign
510
+ * a verification message, adding the verified account to their profile.
511
+ *
512
+ * Throws `DeeplinkConnectAndVerifyUnsupportedError` on mobile with deeplink
513
+ * wallet providers — there, use `useConnectWithWalletProvider` followed by
514
+ * `useVerifyWalletAccount` from a fresh user gesture instead.
515
+ *
516
+ * @example
517
+ * ```tsx
518
+ * const { mutate: connectAndVerify, isPending } =
519
+ * useConnectAndVerifyWithWalletProvider();
520
+ * <button
521
+ * onClick={() => connectAndVerify({ walletProviderKey: 'metamaskevm' })}
522
+ * disabled={isPending}
523
+ * >
524
+ * Connect & verify
525
+ * </button>
526
+ * ```
527
+ */
528
+ const useConnectAndVerifyWithWalletProvider = ({ mutateParams } = {}) => useBaseMutation({
529
+ mutateParams,
530
+ mutationFn: ({ client, variables }) => connectAndVerifyWithWalletProvider(variables, client)
531
+ });
532
+
533
+ //#endregion
534
+ //#region src/hooks/useConnectWithWalletProvider/useConnectWithWalletProvider.ts
535
+ /**
536
+ * Connects to a wallet provider and returns the connected wallet account.
537
+ *
538
+ * Wraps `connectWithWalletProvider` from `@dynamic-labs-sdk/client`. Call
539
+ * `mutate({ walletProviderKey })` to trigger the connection — the wallet
540
+ * provider will prompt the user via its native UI. The connected account is
541
+ * not verified; pair with `useVerifyWalletAccount`, or use
542
+ * `useConnectAndVerifyWithWalletProvider` to do both in one step.
543
+ *
544
+ * @example
545
+ * ```tsx
546
+ * const { mutate: connect, data, isPending } = useConnectWithWalletProvider();
547
+ * <button
548
+ * onClick={() => connect({ walletProviderKey: 'metamaskevm' })}
549
+ * disabled={isPending}
550
+ * >
551
+ * Connect
552
+ * </button>
553
+ * ```
554
+ */
555
+ const useConnectWithWalletProvider = ({ mutateParams } = {}) => useBaseMutation({
556
+ mutateParams,
557
+ mutationFn: ({ client, variables }) => connectWithWalletProvider(variables, client)
558
+ });
559
+
283
560
  //#endregion
284
561
  //#region src/hooks/useConsumeMfaToken/useConsumeMfaToken.ts
285
562
  /**
@@ -301,6 +578,39 @@ const useConsumeMfaToken = ({ mutateParams } = {}) => useBaseMutation({
301
578
  mutationFn: ({ client }) => Promise.resolve(consumeMfaToken(client))
302
579
  });
303
580
 
581
+ //#endregion
582
+ //#region src/hooks/useCreateCoinbaseOnrampOrder/useCreateCoinbaseOnrampOrder.ts
583
+ /**
584
+ * Wraps `createCoinbaseOnrampOrder` from `@dynamic-labs-sdk/client`. Call `mutate(orderParams)` to create a Coinbase onramp order; the resolved `data` is the order response.
585
+ *
586
+ * @example
587
+ * ```tsx
588
+ * const { mutate: createOrder, data: order } = useCreateCoinbaseOnrampOrder();
589
+ * createOrder(orderParams);
590
+ * ```
591
+ */
592
+ const useCreateCoinbaseOnrampOrder = ({ mutateParams } = {}) => useBaseMutation({
593
+ mutateParams,
594
+ mutationFn: ({ client, variables }) => createCoinbaseOnrampOrder(variables, client)
595
+ });
596
+
597
+ //#endregion
598
+ //#region src/hooks/useCreateCryptoDotComPayment/useCreateCryptoDotComPayment.ts
599
+ /**
600
+ * Wraps `createCryptoDotComPayment` from `@dynamic-labs-sdk/client`. Call `mutate(paymentParams)` to create a Crypto.com Pay payment; the resolved `data` is the payment response.
601
+ *
602
+ * @example
603
+ * ```tsx
604
+ * const { mutate: createPayment, data: payment } =
605
+ * useCreateCryptoDotComPayment();
606
+ * createPayment(paymentParams);
607
+ * ```
608
+ */
609
+ const useCreateCryptoDotComPayment = ({ mutateParams } = {}) => useBaseMutation({
610
+ mutateParams,
611
+ mutationFn: ({ client, variables }) => createCryptoDotComPayment(variables, client)
612
+ });
613
+
304
614
  //#endregion
305
615
  //#region src/hooks/useCreateNewMfaRecoveryCodes/useCreateNewMfaRecoveryCodes.ts
306
616
  /**
@@ -410,6 +720,38 @@ const useEvent = ({ event, listener }) => {
410
720
  }, client), [event, client]);
411
721
  };
412
722
 
723
+ //#endregion
724
+ //#region src/hooks/useExecuteSwapTransaction/useExecuteSwapTransaction.ts
725
+ /**
726
+ * Wraps `executeSwapTransaction` from `@dynamic-labs-sdk/client`. Call `mutate({ walletAccount, signingPayload })` (using a payload from {@link useSwapQuote}) to execute a swap; the resolved `data` is `{ transactionHash }`.
727
+ *
728
+ * @example
729
+ * ```tsx
730
+ * const { mutate: executeSwap, data } = useExecuteSwapTransaction();
731
+ * executeSwap({ walletAccount, signingPayload });
732
+ * ```
733
+ */
734
+ const useExecuteSwapTransaction = ({ mutateParams } = {}) => useBaseMutation({
735
+ mutateParams,
736
+ mutationFn: ({ client, variables }) => executeSwapTransaction(variables, client)
737
+ });
738
+
739
+ //#endregion
740
+ //#region src/hooks/useGoogleDriveBackupReadiness/useGoogleDriveBackupReadiness.ts
741
+ /**
742
+ * Wraps `getGoogleDriveBackupReadiness` from `@dynamic-labs-sdk/client`. Reports whether the user's Google Drive backup is set up and available.
743
+ *
744
+ * @example
745
+ * ```tsx
746
+ * const { data: readiness, isLoading } = useGoogleDriveBackupReadiness();
747
+ * ```
748
+ */
749
+ const useGoogleDriveBackupReadiness = ({ queryParams } = {}) => useBaseQuery({
750
+ queryFn: (client) => getGoogleDriveBackupReadiness(client),
751
+ queryKey: ["useGoogleDriveBackupReadiness"],
752
+ queryParams
753
+ });
754
+
413
755
  //#endregion
414
756
  //#region src/hooks/useInitStatus/useInitStatus.ts
415
757
  /**
@@ -489,6 +831,22 @@ const useIsUserOnboardingComplete = () => useBaseState({
489
831
  selector: (client) => client.user === null ? false : isUserOnboardingComplete(client)
490
832
  });
491
833
 
834
+ //#endregion
835
+ //#region src/hooks/useKrakenWhitelistedAddresses/useKrakenWhitelistedAddresses.ts
836
+ /**
837
+ * Wraps `getKrakenWhitelistedAddresses` from `@dynamic-labs-sdk/client`. Returns the destination addresses whitelisted for Kraken withdrawals.
838
+ *
839
+ * @example
840
+ * ```tsx
841
+ * const { data: addresses, isLoading } = useKrakenWhitelistedAddresses();
842
+ * ```
843
+ */
844
+ const useKrakenWhitelistedAddresses = ({ queryParams } = {}) => useBaseQuery({
845
+ queryFn: (client) => getKrakenWhitelistedAddresses(client),
846
+ queryKey: ["useKrakenWhitelistedAddresses"],
847
+ queryParams
848
+ });
849
+
492
850
  //#endregion
493
851
  //#region src/hooks/useLogout/useLogout.ts
494
852
  /**
@@ -508,40 +866,6 @@ const useLogout = ({ mutateParams } = {}) => useBaseMutation({
508
866
  mutationFn: ({ client }) => logout(client)
509
867
  });
510
868
 
511
- //#endregion
512
- //#region src/foundation/useBaseQuery/useBaseQuery.ts
513
- /**
514
- * Internal hook that wraps a react-query `useQuery` with the conventions used
515
- * by every async-read hook in this package:
516
- *
517
- * - `queryFn` receives the resolved `DynamicClient` from context, and is
518
- * gated behind `waitForClientInitialized` so customers never see "client
519
- * not ready" errors on first render.
520
- * - Callers pass `queryParams` to override any default `UseQueryOptions`,
521
- * so consumers can opt into retries / custom staleTime / etc.
522
- * - Callers pass `enabled: false` (typically derived from whether their
523
- * pseudo-required arguments are present) to short-circuit fetches.
524
- *
525
- * Returns the full `useQuery` result — `data`, `error`, `isLoading`,
526
- * `isFetching`, `isSuccess`, `refetch`, `status`, etc.
527
- */
528
- const useBaseQuery = ({ queryFn, queryKey, queryParams, enabled = true }) => {
529
- const client = useDynamicClient();
530
- return useQuery({
531
- queryFn: async () => {
532
- await waitForClientInitialized(client);
533
- return queryFn(client);
534
- },
535
- queryKey: useMemo(() => [
536
- "@dynamic-labs-sdk/react-hooks",
537
- "query",
538
- ...queryKey
539
- ], [queryKey]),
540
- ...queryParams,
541
- enabled: enabled && queryParams?.enabled !== false
542
- });
543
- };
544
-
545
869
  //#endregion
546
870
  //#region src/hooks/useMfaDevices/useMfaDevices.ts
547
871
  /**
@@ -598,6 +922,38 @@ const useMfaRecoveryCodes = ({ queryParams } = {}) => useBaseQuery({
598
922
  queryParams
599
923
  });
600
924
 
925
+ //#endregion
926
+ //#region src/hooks/useMoonPayCurrencies/useMoonPayCurrencies.ts
927
+ /**
928
+ * Wraps `getMoonPayCurrencies` from `@dynamic-labs-sdk/client`. Returns the list of currencies MoonPay supports for the given parameters.
929
+ *
930
+ * @example
931
+ * ```tsx
932
+ * const { data: currencies, isLoading } = useMoonPayCurrencies(params);
933
+ * ```
934
+ */
935
+ const useMoonPayCurrencies = ({ queryParams, ...args }) => useBaseQuery({
936
+ queryFn: (client) => getMoonPayCurrencies(args, client),
937
+ queryKey: ["useMoonPayCurrencies", args],
938
+ queryParams
939
+ });
940
+
941
+ //#endregion
942
+ //#region src/hooks/useMoonPayUrl/useMoonPayUrl.ts
943
+ /**
944
+ * Wraps `getMoonPayUrl` from `@dynamic-labs-sdk/client`. Returns a MoonPay widget URL for the given parameters.
945
+ *
946
+ * @example
947
+ * ```tsx
948
+ * const { data: moonPayUrl, isLoading } = useMoonPayUrl(params);
949
+ * ```
950
+ */
951
+ const useMoonPayUrl = ({ queryParams, ...args }) => useBaseQuery({
952
+ queryFn: (client) => getMoonPayUrl(args, client),
953
+ queryKey: ["useMoonPayUrl", args],
954
+ queryParams
955
+ });
956
+
601
957
  //#endregion
602
958
  //#region src/hooks/useMultichainTokenBalances/useMultichainTokenBalances.ts
603
959
  /**
@@ -657,6 +1013,35 @@ const useNetworksData = () => useBaseState({
657
1013
  selector: (client) => getNetworksData(client)
658
1014
  });
659
1015
 
1016
+ //#endregion
1017
+ //#region src/hooks/useOnceEvent/useOnceEvent.ts
1018
+ /**
1019
+ * Subscribes to a Dynamic client event for a single occurrence.
1020
+ *
1021
+ * Wraps `onceEvent` from `@dynamic-labs-sdk/client` — the one-shot sibling of
1022
+ * `useEvent`. The listener fires at most once. Uses a ref to always call the
1023
+ * latest listener, and cleans up the subscription on unmount or event change.
1024
+ *
1025
+ * @example
1026
+ * ```tsx
1027
+ * useOnceEvent({
1028
+ * event: 'authFlowCancelled',
1029
+ * listener: () => console.log('auth flow cancelled'),
1030
+ * });
1031
+ * ```
1032
+ */
1033
+ const useOnceEvent = ({ event, listener }) => {
1034
+ const client = useDynamicClient();
1035
+ const callbackRef = useRef(listener);
1036
+ callbackRef.current = listener;
1037
+ useEffect(() => onceEvent({
1038
+ event,
1039
+ listener: (...args) => {
1040
+ callbackRef.current(...args);
1041
+ }
1042
+ }, client), [event, client]);
1043
+ };
1044
+
660
1045
  //#endregion
661
1046
  //#region src/hooks/usePasskeys/usePasskeys.ts
662
1047
  /**
@@ -675,6 +1060,41 @@ const usePasskeys = ({ queryParams } = {}) => useBaseQuery({
675
1060
  queryParams
676
1061
  });
677
1062
 
1063
+ //#endregion
1064
+ //#region src/hooks/useProveWalletAccountOwnership/useProveWalletAccountOwnership.ts
1065
+ /**
1066
+ * Wraps `proveWalletAccountOwnership` from `@dynamic-labs-sdk/client`. Call `mutate({ walletAccount })` to prove ownership of a connected wallet account by signing a challenge.
1067
+ *
1068
+ * @example
1069
+ * ```tsx
1070
+ * const { mutate: proveOwnership, isPending } =
1071
+ * useProveWalletAccountOwnership();
1072
+ * proveOwnership({ walletAccount });
1073
+ * ```
1074
+ */
1075
+ const useProveWalletAccountOwnership = ({ mutateParams } = {}) => useBaseMutation({
1076
+ mutateParams,
1077
+ mutationFn: ({ client, variables }) => proveWalletAccountOwnership(variables, client)
1078
+ });
1079
+
1080
+ //#endregion
1081
+ //#region src/hooks/useRefreshAuth/useRefreshAuth.ts
1082
+ /**
1083
+ * Wraps `refreshAuth` from `@dynamic-labs-sdk/client`. Takes no arguments — call `mutate()` to refresh the session/JWT; the resolved `data` is a `VerifyResponse`.
1084
+ *
1085
+ * @example
1086
+ * ```tsx
1087
+ * const { mutate: refreshAuth, isPending } = useRefreshAuth();
1088
+ * <button onClick={() => refreshAuth()} disabled={isPending}>
1089
+ * Refresh session
1090
+ * </button>
1091
+ * ```
1092
+ */
1093
+ const useRefreshAuth = ({ mutateParams } = {}) => useBaseMutation({
1094
+ mutateParams,
1095
+ mutationFn: ({ client }) => refreshAuth(client)
1096
+ });
1097
+
678
1098
  //#endregion
679
1099
  //#region src/hooks/useRegisteredDevices/useRegisteredDevices.ts
680
1100
  /**
@@ -764,6 +1184,42 @@ const useRemoveWalletAccount = ({ mutateParams } = {}) => useBaseMutation({
764
1184
  mutationFn: ({ client, variables }) => removeWalletAccount(variables, client)
765
1185
  });
766
1186
 
1187
+ //#endregion
1188
+ //#region src/hooks/useRequestExternalAuthElevatedToken/useRequestExternalAuthElevatedToken.ts
1189
+ /**
1190
+ * Wraps `requestExternalAuthElevatedToken` from `@dynamic-labs-sdk/client`. Call `mutate({ externalJwt })` to exchange an externally issued JWT for an elevated-access token.
1191
+ *
1192
+ * @example
1193
+ * ```tsx
1194
+ * const { mutate: requestElevatedToken } =
1195
+ * useRequestExternalAuthElevatedToken();
1196
+ * requestElevatedToken({ externalJwt });
1197
+ * ```
1198
+ */
1199
+ const useRequestExternalAuthElevatedToken = ({ mutateParams } = {}) => useBaseMutation({
1200
+ mutateParams,
1201
+ mutationFn: ({ client, variables }) => requestExternalAuthElevatedToken(variables, client)
1202
+ });
1203
+
1204
+ //#endregion
1205
+ //#region src/hooks/useRevokeAllRegisteredDevices/useRevokeAllRegisteredDevices.ts
1206
+ /**
1207
+ * Wraps `revokeAllRegisteredDevices` from `@dynamic-labs-sdk/client`. Takes no arguments — call `mutate()` to revoke every device registered to the current user; the resolved `data` is `void`.
1208
+ *
1209
+ * @example
1210
+ * ```tsx
1211
+ * const { mutate: revokeAllDevices, isPending } =
1212
+ * useRevokeAllRegisteredDevices();
1213
+ * <button onClick={() => revokeAllDevices()} disabled={isPending}>
1214
+ * Revoke all devices
1215
+ * </button>
1216
+ * ```
1217
+ */
1218
+ const useRevokeAllRegisteredDevices = ({ mutateParams } = {}) => useBaseMutation({
1219
+ mutateParams,
1220
+ mutationFn: ({ client }) => revokeAllRegisteredDevices(client)
1221
+ });
1222
+
767
1223
  //#endregion
768
1224
  //#region src/hooks/useRevokeRegisteredDevice/useRevokeRegisteredDevice.ts
769
1225
  /**
@@ -881,6 +1337,22 @@ const useSetDefaultMfaDevice = ({ mutateParams } = {}) => useBaseMutation({
881
1337
  mutationFn: ({ client, variables }) => setDefaultMfaDevice(variables, client)
882
1338
  });
883
1339
 
1340
+ //#endregion
1341
+ //#region src/hooks/useSignInWithExternalJwt/useSignInWithExternalJwt.ts
1342
+ /**
1343
+ * Wraps `signInWithExternalJwt` from `@dynamic-labs-sdk/client`. Call `mutate({ externalJwt })` to authenticate the user with a JWT issued by an external auth provider.
1344
+ *
1345
+ * @example
1346
+ * ```tsx
1347
+ * const { mutate: signInWithJwt, isPending } = useSignInWithExternalJwt();
1348
+ * signInWithJwt({ externalJwt });
1349
+ * ```
1350
+ */
1351
+ const useSignInWithExternalJwt = ({ mutateParams } = {}) => useBaseMutation({
1352
+ mutateParams,
1353
+ mutationFn: ({ client, variables }) => signInWithExternalJwt(variables, client)
1354
+ });
1355
+
884
1356
  //#endregion
885
1357
  //#region src/hooks/useSignInWithPasskey/useSignInWithPasskey.ts
886
1358
  /**
@@ -903,6 +1375,39 @@ const useSignInWithPasskey = ({ mutateParams } = {}) => useBaseMutation({
903
1375
  mutationFn: ({ client, variables }) => signInWithPasskey(variables, client)
904
1376
  });
905
1377
 
1378
+ //#endregion
1379
+ //#region src/hooks/useSignInWithSocialPopUp/useSignInWithSocialPopUp.ts
1380
+ /**
1381
+ * Wraps `signInWithSocialPopUp` from `@dynamic-labs-sdk/client`. Call `mutate({ provider })` to open the provider's OAuth popup; the resolved `data` is the signed-in `User` (or `null`).
1382
+ *
1383
+ * @example
1384
+ * ```tsx
1385
+ * const { mutate: signInWithPopUp, data: user } =
1386
+ * useSignInWithSocialPopUp();
1387
+ * signInWithPopUp({ provider: 'google' });
1388
+ * ```
1389
+ */
1390
+ const useSignInWithSocialPopUp = ({ mutateParams } = {}) => useBaseMutation({
1391
+ mutateParams,
1392
+ mutationFn: ({ client, variables }) => signInWithSocialPopUp(variables, client)
1393
+ });
1394
+
1395
+ //#endregion
1396
+ //#region src/hooks/useSignInWithSocialRedirect/useSignInWithSocialRedirect.ts
1397
+ /**
1398
+ * Wraps `signInWithSocialRedirect` from `@dynamic-labs-sdk/client`. Call `mutate({ provider, redirectUrl })` to redirect the user to the provider's OAuth page; complete the flow with {@link useCompleteSocialAuthentication}.
1399
+ *
1400
+ * @example
1401
+ * ```tsx
1402
+ * const { mutate: signInWithRedirect } = useSignInWithSocialRedirect();
1403
+ * signInWithRedirect({ provider: 'google', redirectUrl });
1404
+ * ```
1405
+ */
1406
+ const useSignInWithSocialRedirect = ({ mutateParams } = {}) => useBaseMutation({
1407
+ mutateParams,
1408
+ mutationFn: ({ client, variables }) => signInWithSocialRedirect(variables, client)
1409
+ });
1410
+
906
1411
  //#endregion
907
1412
  //#region src/hooks/useSignMessage/useSignMessage.ts
908
1413
  /**
@@ -928,6 +1433,38 @@ const useSignMessage = ({ mutateParams } = {}) => useBaseMutation({
928
1433
  mutationFn: ({ client, variables }) => signMessage(variables, client)
929
1434
  });
930
1435
 
1436
+ //#endregion
1437
+ //#region src/hooks/useSwapQuote/useSwapQuote.ts
1438
+ /**
1439
+ * Wraps `getSwapQuote` from `@dynamic-labs-sdk/client`. Returns a swap quote (including the signing payload consumed by {@link useExecuteSwapTransaction}).
1440
+ *
1441
+ * @example
1442
+ * ```tsx
1443
+ * const { data: quote, isLoading } = useSwapQuote(params);
1444
+ * ```
1445
+ */
1446
+ const useSwapQuote = ({ queryParams, ...args }) => useBaseQuery({
1447
+ queryFn: (client) => getSwapQuote(args, client),
1448
+ queryKey: ["useSwapQuote", args],
1449
+ queryParams
1450
+ });
1451
+
1452
+ //#endregion
1453
+ //#region src/hooks/useSwapStatus/useSwapStatus.ts
1454
+ /**
1455
+ * Wraps `getSwapStatus` from `@dynamic-labs-sdk/client`. Returns the current status of a previously submitted swap.
1456
+ *
1457
+ * @example
1458
+ * ```tsx
1459
+ * const { data: status, isLoading } = useSwapStatus(params);
1460
+ * ```
1461
+ */
1462
+ const useSwapStatus = ({ queryParams, ...args }) => useBaseQuery({
1463
+ queryFn: (client) => getSwapStatus(args, client),
1464
+ queryKey: ["useSwapStatus", args],
1465
+ queryParams
1466
+ });
1467
+
931
1468
  //#endregion
932
1469
  //#region src/hooks/useSwitchActiveNetwork/useSwitchActiveNetwork.ts
933
1470
  /**
@@ -1024,6 +1561,39 @@ const useTransactionHistory = ({ address, chain, networkId, queryParams, ...rest
1024
1561
  queryParams
1025
1562
  });
1026
1563
 
1564
+ //#endregion
1565
+ //#region src/hooks/useTransferAmount/useTransferAmount.ts
1566
+ /**
1567
+ * Wraps `transferAmount` from `@dynamic-labs-sdk/client`. Call `mutate({ walletAccount, amount, recipient, token })` to send tokens; the resolved `data` is `{ transactionHash }`.
1568
+ *
1569
+ * @example
1570
+ * ```tsx
1571
+ * const { mutate: transfer, data } = useTransferAmount();
1572
+ * transfer({ walletAccount, amount, recipient, token });
1573
+ * ```
1574
+ */
1575
+ const useTransferAmount = ({ mutateParams } = {}) => useBaseMutation({
1576
+ mutateParams,
1577
+ mutationFn: ({ client, variables }) => transferAmount(variables, client)
1578
+ });
1579
+
1580
+ //#endregion
1581
+ //#region src/hooks/useTransferWalletAccount/useTransferWalletAccount.ts
1582
+ /**
1583
+ * Wraps `transferWalletAccount` from `@dynamic-labs-sdk/client`. Call `mutate({ walletProviderKey })` to transfer (hand off) a wallet account to the given provider.
1584
+ *
1585
+ * @example
1586
+ * ```tsx
1587
+ * const { mutate: transferWalletAccount, isPending } =
1588
+ * useTransferWalletAccount();
1589
+ * transferWalletAccount({ walletProviderKey });
1590
+ * ```
1591
+ */
1592
+ const useTransferWalletAccount = ({ mutateParams } = {}) => useBaseMutation({
1593
+ mutateParams,
1594
+ mutationFn: ({ client, variables }) => transferWalletAccount(variables, client)
1595
+ });
1596
+
1027
1597
  //#endregion
1028
1598
  //#region src/hooks/useUnlinkSocialAccount/useUnlinkSocialAccount.ts
1029
1599
  /**
@@ -1181,10 +1751,80 @@ const useWalletAccounts = () => useBaseState({
1181
1751
  selector: (client) => getWalletAccounts(client)
1182
1752
  });
1183
1753
 
1754
+ //#endregion
1755
+ //#region src/hooks/useWalletConnectCatalog/useWalletConnectCatalog.ts
1756
+ /**
1757
+ * Returns the WalletConnect catalog (groups and wallets) used for displaying
1758
+ * wallet information and building mobile wallet deeplinks.
1759
+ *
1760
+ * Wraps `getWalletConnectCatalog` from `@dynamic-labs-sdk/client`.
1761
+ *
1762
+ * @example
1763
+ * ```tsx
1764
+ * const { data: catalog, isLoading } = useWalletConnectCatalog();
1765
+ * ```
1766
+ */
1767
+ const useWalletConnectCatalog = ({ queryParams } = {}) => useBaseQuery({
1768
+ queryFn: (client) => getWalletConnectCatalog(client),
1769
+ queryKey: ["useWalletConnectCatalog"],
1770
+ queryParams
1771
+ });
1772
+
1773
+ //#endregion
1774
+ //#region src/hooks/useWalletOptionsCatalogue/useWalletOptionsCatalogue.ts
1775
+ /**
1776
+ * Wraps `getWalletOptionsCatalogue` from `@dynamic-labs-sdk/client`. Returns the catalogue of wallet options the project supports.
1777
+ *
1778
+ * @example
1779
+ * ```tsx
1780
+ * const { data: catalogue, isLoading } = useWalletOptionsCatalogue();
1781
+ * ```
1782
+ */
1783
+ const useWalletOptionsCatalogue = ({ queryParams, ...args } = {}) => useBaseQuery({
1784
+ queryFn: (client) => getWalletOptionsCatalogue(args, client),
1785
+ queryKey: ["useWalletOptionsCatalogue", args],
1786
+ queryParams
1787
+ });
1788
+
1789
+ //#endregion
1790
+ //#region src/hooks/useWalletProviderEvent/useWalletProviderEvent.ts
1791
+ /**
1792
+ * Subscribes to an event emitted by a specific wallet provider.
1793
+ *
1794
+ * Wraps `onWalletProviderEvent` from `@dynamic-labs-sdk/client`. Uses a ref to
1795
+ * always call the latest callback without re-subscribing, and cleans up the
1796
+ * subscription on unmount or when `event` / `walletProviderKey` change.
1797
+ *
1798
+ * @example
1799
+ * ```tsx
1800
+ * useWalletProviderEvent({
1801
+ * walletProviderKey: 'metamaskevm',
1802
+ * event: 'accountsChanged',
1803
+ * callback: ({ addresses }) => console.log(addresses),
1804
+ * });
1805
+ * ```
1806
+ */
1807
+ const useWalletProviderEvent = ({ callback, event, walletProviderKey }) => {
1808
+ const client = useDynamicClient();
1809
+ const callbackRef = useRef(callback);
1810
+ callbackRef.current = callback;
1811
+ useEffect(() => onWalletProviderEvent({
1812
+ callback: ((...args) => {
1813
+ callbackRef.current(...args);
1814
+ }),
1815
+ event,
1816
+ walletProviderKey
1817
+ }, client), [
1818
+ event,
1819
+ walletProviderKey,
1820
+ client
1821
+ ]);
1822
+ };
1823
+
1184
1824
  //#endregion
1185
1825
  //#region src/exports/index.ts
1186
1826
  assertPackageVersion(name, version);
1187
1827
 
1188
1828
  //#endregion
1189
- export { DynamicProvider, useAuthenticateMfaRecoveryCode, useAuthenticatePasskeyMfa, useAuthenticateTotpMfaDevice, useAvailableWalletProvidersData, useConsumeMfaToken, useCreateNewMfaRecoveryCodes, useDeleteMfaDevice, useDeletePasskey, useDeleteUser, useDynamicClient, useEvent, useInitStatus, useIsCaptchaRequired, useIsUserMissingMfaAuth, useIsUserOnboardingComplete, useLogout, useMfaDevices, useMfaMethods, useMfaRecoveryCodes, useMultichainTokenBalances, useNativeBalance, useNetworksData, usePasskeys, useRegisterPasskey, useRegisterTotpMfaDevice, useRegisteredDevices, useRemoveWalletAccount, useRevokeRegisteredDevice, useSendEmailOtp, useSendSmsOtp, useSessionExpiresAt, useSetDefaultMfaDevice, useSignInWithPasskey, useSignMessage, useSwitchActiveNetwork, useTokenBalances, useTransactionHistory, useUnlinkSocialAccount, useUpdateUser, useUser, useUserSocialAccounts, useVerifyOtp, useVerifyWalletAccount, useWalletAccounts };
1829
+ export { DynamicProvider, useAcknowledgeRecoveryCodes, useActiveNetworkData, useAddNetwork, useAuthenticateMfaRecoveryCode, useAuthenticatePasskeyMfa, useAuthenticateTotpMfaDevice, useAvailableWalletProvidersData, useBalanceForAddress, useCheckStepUpAuth, useCoinbaseBuyUrl, useCoinbaseOnrampOrderEventListener, useCompleteDeviceRegistration, useCompleteSocialRedirect, useConfirmTransaction, useConnectAndVerifyWithWalletProvider, useConnectWithWalletProvider, useConsumeMfaToken, useCreateCoinbaseOnrampOrder, useCreateCryptoDotComPayment, useCreateNewMfaRecoveryCodes, useDeleteMfaDevice, useDeletePasskey, useDeleteUser, useDynamicClient, useEvent, useExecuteSwapTransaction, useGoogleDriveBackupReadiness, useInitStatus, useIsCaptchaRequired, useIsUserMissingMfaAuth, useIsUserOnboardingComplete, useKrakenWhitelistedAddresses, useLogout, useMfaDevices, useMfaMethods, useMfaRecoveryCodes, useMoonPayCurrencies, useMoonPayUrl, useMultichainTokenBalances, useNativeBalance, useNetworksData, useOnceEvent, usePasskeys, useProveWalletAccountOwnership, useRefreshAuth, useRegisterPasskey, useRegisterTotpMfaDevice, useRegisteredDevices, useRemoveWalletAccount, useRequestExternalAuthElevatedToken, useRevokeAllRegisteredDevices, useRevokeRegisteredDevice, useSendEmailOtp, useSendSmsOtp, useSessionExpiresAt, useSetDefaultMfaDevice, useSignInWithExternalJwt, useSignInWithPasskey, useSignInWithSocialPopUp, useSignInWithSocialRedirect, useSignMessage, useSwapQuote, useSwapStatus, useSwitchActiveNetwork, useTokenBalances, useTransactionHistory, useTransferAmount, useTransferWalletAccount, useUnlinkSocialAccount, useUpdateUser, useUser, useUserSocialAccounts, useVerifyOtp, useVerifyWalletAccount, useWalletAccounts, useWalletConnectCatalog, useWalletOptionsCatalogue, useWalletProviderEvent };
1190
1830
  //# sourceMappingURL=index.esm.js.map