Signs and submits a transaction.
Request Format
{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"input": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
Parameters
- Transaction (
GenericTransaction
): The transaction object containing:from
(address
): The sender's Ethereum address.to
(address
): The recipient's Ethereum address.gas
(uint
): The gas limit for the transaction.gasPrice
(uint
): The gas price in wei.value
(uint
): The amount of ETH to send.input
(bytes
): The transaction input data.
Return Value
- Transaction Hash (
hash32
): The hash of the submitted transaction.
Example
Request
{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"input": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
Notes
- The transaction is signed by the sender and broadcasted to the network.
- Requires the sender's private key to be available within the Ethereum client.
- The transaction hash can be used to track the transaction status on the blockchain.