Skip to main content
Defined in the Ethereum JSON-RPC Specification
Creates new message call transaction or a contract creation, if the data field contains code. This method submits the transaction to the network and returns the transaction hash once it’s been accepted by the network.

Parameters

transaction
object
required
The transaction object to send.

Returns

result
string
The transaction hash (32 bytes) as a hexadecimal string.

Error Handling

Make sure to validate transaction parameters before sending, especially the to address and value to prevent loss of funds.