To request a transaction from a wallet, first find your desired wallet from the wallets array and get its EIP-1193 provider via its getEthereumProvider method:

const {wallets} = useWallets();
const wallet = wallets[0]; // Replace this with your desired wallet
const provider = await wallet.getEthereumProvider();

Then, using the provider’s request method, send a eth_sendTransaction JSON-RPC to the wallet. In the params array, include as the first entry an object containing the transaction’s parameters, such as to, value, data, gasLimit, maxPriorityFeePerGas, maxFeePerGas, and gasPrice.

const transactionRequest = {
  to: '0xTheRecipientAddress',
  value: 100000
};
const transactionHash = await provider.request({
  method: 'eth_sendTransaction',
  params: [transactionRequest]
});

See these docs for the parameters that can be passed in eth_sendTransaction.

You do not need to specify from as we populate it from the user’s connected wallet, and you can pass either a number, bigint, or a hexadecimal string into the value parameter.

If you’ve integrated Privy with another web3 library, you can also use that library’s syntax for requesting a transaction from the wallet:

LibraryMethod
ViemUse the wallet client’s sendTransaction method.
EthersUse the signer’s sendTransaction method.
WagmiUse the useSendTransaction hook.

When requesting a transaction from an embedded wallet, you can customize the transaction prompt by using Privy’s native sendTransaction method.