Documentation / @frak-labs/react-sdk / useSendTransactionAction
Function: useSendTransactionAction()
useSendTransactionAction(
args?):UseMutationResult<{hash:`0x${string}`; },FrakRpcError<undefined>, {metadata?:ModalRpcMetadata;tx:SendTransactionTxType|SendTransactionTxType[]; },unknown>
Defined in: react/src/hook/useSendTransaction.ts:45
Hook that return a mutation helping to send a transaction
It's a `tanstack` wrapper around the `sendTransaction()` action
Parameters
args?
Optional config object with mutations for customizing the underlying `useMutation()`
mutations?
MutationOptions
Optional mutation options, see `useMutation()` for more infos
Returns
UseMutationResult<{ hash: `0x${string}`; }, FrakRpcError<undefined>, { metadata?: ModalRpcMetadata; tx: SendTransactionTxType | SendTransactionTxType[]; }, unknown>
The mutation hook wrapping the sendTransaction() action
The mutate and mutateAsync argument is of type `SendTransactionParams`
The data result is a `SendTransactionReturnType`
See
- `sendTransaction()` for more info about the underlying action
- `useMutation()` for more info about the mutation options and response