Skip to main content

eth_signTransaction

Returns an RLP encoded transaction signed by the specified account.

Parameters (by position)

Transaction object required

Transaction object generic to all types


Show Transaction object

Transaction fields

  • type string

    type

    Match pattern: ^0x([0-9a-fA-F]?){1,2}$


  • nonce string

    nonce

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • to null or string


    Show Option 1 Contract Creation (null) null

    Contract Creation (null) fields

    to null

    Contract Creation (null)


    Show Option 2 Address string

    Address fields

    to string

    Address

    Match pattern: ^0x[0-9a-fA-F]{40}$


  • from string

    from address

    Match pattern: ^0x[0-9a-fA-F]{40}$


  • gas string

    gas limit

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • value string

    value

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • input string

    input data

    Match pattern: ^0x[0-9a-f]*$


  • gasPrice string

    The gas price willing to be paid by the sender in wei

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • maxPriorityFeePerGas string

    Maximum fee per gas the sender is willing to pay to miners in wei

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • maxFeePerGas string

    The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • maxFeePerBlobGas string

    The maximum total fee per gas the sender is willing to pay for blob gas in wei

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • accessList array<object>

    EIP-2930 access list


    Show accessList object

    accessList fields

    EIP-2930 access list

    • address string required

      hex encoded address

      Match pattern: ^0x[0-9a-fA-F]{40}$


    • storageKeys array<string> required

      32 byte hex value

      Match pattern: ^0x[0-9a-f]{64}$


    • additionalProperties false


  • blobVersionedHashes array<string>

    List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.

    Match pattern: ^0x[0-9a-f]{64}$


  • blobs array<string>

    Raw blob data.

    Match pattern: ^0x[0-9a-f]*$


  • chainId string

    Chain ID that this transaction is valid on.

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • authorizationList array<object>

    EIP-7702 authorization list


    Show authorizationList object

    authorizationList fields

    EIP-7702 authorization list

    • chainId string required

      Chain ID on which this transaction is valid

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


    • nonce string required

      nonce

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


    • address string required

      hex encoded address

      Match pattern: ^0x[0-9a-fA-F]{40}$


    • yParity string required

      The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature

      Match pattern: ^0x([0-9a-fA-F]?){1,2}$


    • r string required

      r

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]{0,63})$


    • s string required

      s

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]{0,63})$


    • additionalProperties true


  • additionalProperties false


Result

Encoded transaction string

hex encoded bytes

Match pattern: ^0x[0-9a-f]*$


Examples

eth_signTransaction example

Request

{
"params": [
{
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"value": "0x9184e72a"
}
]
}

Response

"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"