To send a transaction from a wallet using the React SDK, use the
sendTransaction
method from the useSendTransaction
hook:Usage
Parameters
The details of the transaction to send on the chain.
The options for the UI of the send transaction modal. Learn
more.
To hide confirmation modals, set
options.uiOptions.showWalletUIs
to false
. Learn more about
configuring modal prompts here.The configuration for funding the wallet.
The address of the wallet to use for sending the transaction. Recommended when working with
external wallets to ensure reliable functionality. If not provided, the first wallet will be
used.
Returns
The hash for the broadcasted transaction.
For a complete example of sending USDC with Privy’s SDKs, see our Sending USDC
recipe.