eth_signTransaction

Signs a transaction that can be submitted to the network.

📘

Your account must be unlocked to use this endpoint.

🚧

Note that the interactive example in this page will not work, due to the fact that eth_signTransaction is used to modify the state of the blockchain, it is not possible to duplicate the same request.

Description

Signs a transaction that can be submitted to the network at a later time using with eth_sendRawTransaction.

Parameters

  1. Object - The transaction object
    • type:
    • from: DATA, 20 Bytes - The address the transaction is sent from.
    • to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.
    • gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
    • gasPrice: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas, in Wei.
    • value: QUANTITY - (optional) Integer of the value sent with this transaction, in Wei.
    • data: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
    • nonce: QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.

Returns

DATA, The RLP-encoded transaction object signed by the specified account.


Language
Authorization
Header
Click Try It! to start a request and see the response here!