← Linea overview
Linea · eth
eth_signTransaction
Returns an RLP encoded transaction signed by the specified account.
Parameters
TransactionrequiredSchema{ "type": "object", "title": "Transaction object generic to all types", "properties": { "accessList": { "type": "array", "title": "accessList", "description": "EIP-2930 access list", "items": { "type": "object", "title": "Access list entry", "properties": { "address": { "type": "string", "title": "hex encoded address", "pattern": "^0x[0-9a-fA-F]{40}$" }, "storageKeys": { "type": "array", "items": { "type": "string", "title": "32 byte hex value", "pattern": "^0x[0-9a-f]{64}$" } } }, "required": [ "address", "storageKeys" ] } }, "authorizationList": { "type": "array", "title": "authorizationList", "description": "EIP-7702 authorization list", "items": { "type": "object", "properties": { "address": { "type": "string", "title": "hex encoded address", "pattern": "^0x[0-9a-fA-F]{40}$" }, "chainId": { "type": "string", "title": "chainId", "description": "Chain ID on which this transaction is valid", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "nonce": { "type": "string", "title": "nonce", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "r": { "type": "string", "title": "r", "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$" }, "s": { "type": "string", "title": "s", "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$" }, "yParity": { "type": "string", "title": "yParity", "description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature", "pattern": "^0x[0-9a-f]{1,2}$" } }, "required": [ "chainId", "nonce", "address", "yParity", "r", "s" ] } }, "blobVersionedHashes": { "type": "array", "title": "blobVersionedHashes", "description": "List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.", "items": { "type": "string", "title": "32 byte hex value", "pattern": "^0x[0-9a-f]{64}$" } }, "blobs": { "type": "array", "title": "blobs", "description": "Raw blob data.", "items": { "type": "string", "title": "hex encoded bytes", "pattern": "^0x[0-9a-f]*$" } }, "chainId": { "type": "string", "title": "chainId", "description": "Chain ID that this transaction is valid on.", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "commitments": { "type": "array", "title": "commitments", "description": "List of blob commitments as per EIP-4844.", "items": { "type": "string", "title": "hex encoded bytes", "pattern": "^0x[0-9a-f]*$" } }, "from": { "type": "string", "title": "from address", "pattern": "^0x[0-9a-fA-F]{40}$" }, "gas": { "type": "string", "title": "gas limit", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "gasPrice": { "type": "string", "title": "gas price", "description": "The gas price willing to be paid by the sender in wei", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "input": { "type": "string", "title": "input data", "pattern": "^0x[0-9a-f]*$" }, "maxFeePerBlobGas": { "type": "string", "title": "max fee per blob gas", "description": "The maximum total fee per gas the sender is willing to pay for blob gas in wei", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "maxFeePerGas": { "type": "string", "title": "max fee per gas", "description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "maxPriorityFeePerGas": { "type": "string", "title": "max priority fee per gas", "description": "Maximum fee per gas the sender is willing to pay to miners in wei", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "nonce": { "type": "string", "title": "nonce", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" }, "proofs": { "type": "array", "title": "proofs", "description": "List of blob proofs. Pre-PeerDAS this contains one KZG proof per blob (length == len(blobs)). Post-PeerDAS this contains cell proofs with length == 128 * len(blobs).", "items": { "type": "string", "title": "hex encoded bytes", "pattern": "^0x[0-9a-f]*$" } }, "to": { "title": "to address", "oneOf": [ { "type": "null", "title": "Contract Creation (null)" }, { "type": "string", "title": "Address", "pattern": "^0x[0-9a-fA-F]{40}$" } ] }, "type": { "type": "string", "title": "type", "pattern": "^0x[0-9a-f]{1,2}$" }, "value": { "type": "string", "title": "value", "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$" } } }
Result
Transaction result
Schema
{
"type": "object",
"title": "Encoded and raw signed transaction object.",
"properties": {
"raw": {
"type": "string",
"title": "raw",
"pattern": "^0x[0-9a-f]*$"
},
"tx": {
"title": "tx",
"oneOf": [
{
"type": "object",
"title": "Signed 7702 Transaction",
"properties": {
"accessList": {
"type": "array",
"title": "accessList",
"description": "EIP-2930 access lists",
"items": {
"type": "object",
"title": "Access list entry",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"required": [
"address",
"storageKeys"
]
}
},
"authorizationList": {
"type": "array",
"title": "authorizationList",
"description": "List of authorizations for the transaction",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"chainId": {
"type": "string",
"title": "chainId",
"description": "Chain ID on which this transaction is valid",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"nonce": {
"type": "string",
"title": "nonce",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"type": "string",
"title": "r",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
},
"s": {
"type": "string",
"title": "s",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
},
"yParity": {
"type": "string",
"title": "yParity",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature",
"pattern": "^0x[0-9a-f]{1,2}$"
}
},
"required": [
"chainId",
"nonce",
"address",
"yParity",
"r",
"s"
]
}
},
"chainId": {
"type": "string",
"title": "chainId",
"description": "Chain ID that this transaction is valid on",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gas": {
"type": "string",
"title": "gas limit",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasPrice": {
"type": "string",
"title": "gas price",
"description": "The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"type": "string",
"title": "input data",
"pattern": "^0x[0-9a-f]*$"
},
"maxFeePerGas": {
"type": "string",
"title": "max fee per gas",
"description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxPriorityFeePerGas": {
"type": "string",
"title": "max priority fee per gas",
"description": "Maximum fee per gas the sender is willing to pay to miners in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"nonce": {
"type": "string",
"title": "nonce",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"type": "string",
"title": "r",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"type": "string",
"title": "s",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"type": "string",
"title": "to address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"type": {
"type": "string",
"title": "type",
"pattern": "^0x4$"
},
"v": {
"type": "string",
"title": "v",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.",
"pattern": "^0x[0-9a-f]{1,2}$"
},
"value": {
"type": "string",
"title": "value",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"yParity": {
"type": "string",
"title": "yParity",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.",
"pattern": "^0x[0-9a-f]{1,2}$"
}
},
"required": [
"accessList",
"authorizationList",
"chainId",
"gas",
"input",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"to",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed 4844 Transaction",
"properties": {
"accessList": {
"type": "array",
"title": "accessList",
"description": "EIP-2930 access list",
"items": {
"type": "object",
"title": "Access list entry",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"required": [
"address",
"storageKeys"
]
}
},
"blobVersionedHashes": {
"type": "array",
"title": "blobVersionedHashes",
"description": "List of versioned blob hashes associated with the transaction's EIP-4844 data blobs",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"chainId": {
"type": "string",
"title": "chainId",
"description": "Chain ID that this transaction is valid on",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gas": {
"type": "string",
"title": "gas limit",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasPrice": {
"type": "string",
"title": "gas price",
"description": "The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"type": "string",
"title": "input data",
"pattern": "^0x[0-9a-f]*$"
},
"maxFeePerBlobGas": {
"type": "string",
"title": "max fee per blob gas",
"description": "The maximum total fee per gas the sender is willing to pay for blob gas in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxFeePerGas": {
"type": "string",
"title": "max fee per gas",
"description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxPriorityFeePerGas": {
"type": "string",
"title": "max priority fee per gas",
"description": "Maximum fee per gas the sender is willing to pay to miners in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"nonce": {
"type": "string",
"title": "nonce",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"type": "string",
"title": "r",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"type": "string",
"title": "s",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"type": "string",
"title": "to address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"type": {
"type": "string",
"title": "type",
"pattern": "^0x3$"
},
"v": {
"type": "string",
"title": "v",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.",
"pattern": "^0x[0-9a-f]{1,2}$"
},
"value": {
"type": "string",
"title": "value",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"yParity": {
"type": "string",
"title": "yParity",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.",
"pattern": "^0x[0-9a-f]{1,2}$"
}
},
"required": [
"accessList",
"blobVersionedHashes",
"chainId",
"gas",
"input",
"maxFeePerBlobGas",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"to",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed 1559 Transaction",
"properties": {
"accessList": {
"type": "array",
"title": "accessList",
"description": "EIP-2930 access list",
"items": {
"type": "object",
"title": "Access list entry",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"required": [
"address",
"storageKeys"
]
}
},
"chainId": {
"type": "string",
"title": "chainId",
"description": "Chain ID that this transaction is valid on.",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gas": {
"type": "string",
"title": "gas limit",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasPrice": {
"type": "string",
"title": "gas price",
"description": "The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"type": "string",
"title": "input data",
"pattern": "^0x[0-9a-f]*$"
},
"maxFeePerGas": {
"type": "string",
"title": "max fee per gas",
"description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxPriorityFeePerGas": {
"type": "string",
"title": "max priority fee per gas",
"description": "Maximum fee per gas the sender is willing to pay to miners in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"nonce": {
"type": "string",
"title": "nonce",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"type": "string",
"title": "r",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"type": "string",
"title": "s",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"oneOf": [
{
"type": "null",
"title": "Contract Creation (null)"
},
{
"type": "string",
"title": "Address",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
]
},
"type": {
"type": "string",
"title": "type",
"pattern": "^0x2$"
},
"v": {
"type": "string",
"title": "v",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.",
"pattern": "^0x[0-9a-f]{1,2}$"
},
"value": {
"type": "string",
"title": "value",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"yParity": {
"type": "string",
"title": "yParity",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.",
"pattern": "^0x[0-9a-f]{1,2}$"
}
},
"required": [
"accessList",
"chainId",
"gas",
"gasPrice",
"input",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed 2930 Transaction",
"properties": {
"accessList": {
"type": "array",
"title": "accessList",
"description": "EIP-2930 access list",
"items": {
"type": "object",
"title": "Access list entry",
"properties": {
"address": {
"type": "string",
"title": "hex encoded address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"required": [
"address",
"storageKeys"
]
}
},
"chainId": {
"type": "string",
"title": "chainId",
"description": "Chain ID that this transaction is valid on.",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gas": {
"type": "string",
"title": "gas limit",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasPrice": {
"type": "string",
"title": "gas price",
"description": "The gas price willing to be paid by the sender in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"type": "string",
"title": "input data",
"pattern": "^0x[0-9a-f]*$"
},
"nonce": {
"type": "string",
"title": "nonce",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"type": "string",
"title": "r",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"type": "string",
"title": "s",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"oneOf": [
{
"type": "null",
"title": "Contract Creation (null)"
},
{
"type": "string",
"title": "Address",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
]
},
"type": {
"type": "string",
"title": "type",
"pattern": "^0x1$"
},
"v": {
"type": "string",
"title": "v",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.",
"pattern": "^0x[0-9a-f]{1,2}$"
},
"value": {
"type": "string",
"title": "value",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"yParity": {
"type": "string",
"title": "yParity",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.",
"pattern": "^0x[0-9a-f]{1,2}$"
}
},
"required": [
"accessList",
"chainId",
"gas",
"gasPrice",
"input",
"nonce",
"r",
"s",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed Legacy Transaction",
"properties": {
"chainId": {
"type": "string",
"title": "chainId",
"description": "Chain ID that this transaction is valid on.",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gas": {
"type": "string",
"title": "gas limit",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasPrice": {
"type": "string",
"title": "gas price",
"description": "The gas price willing to be paid by the sender in wei",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"type": "string",
"title": "input data",
"pattern": "^0x[0-9a-f]*$"
},
"nonce": {
"type": "string",
"title": "nonce",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"type": "string",
"title": "r",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"type": "string",
"title": "s",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"oneOf": [
{
"type": "null",
"title": "Contract Creation (null)"
},
{
"type": "string",
"title": "Address",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
]
},
"type": {
"type": "string",
"title": "type",
"pattern": "^0x0$"
},
"v": {
"type": "string",
"title": "v",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"type": "string",
"title": "value",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
},
"required": [
"gas",
"gasPrice",
"input",
"nonce",
"r",
"s",
"type",
"v",
"value"
]
}
]
}
},
"required": [
"raw",
"tx"
]
}Example request
Endpoint: https://your-linea-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_signTransaction",
"params": [
{
"from": "0x9d8a62f656a8d1615c1294fd71e9cfb3e4855a4f",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"input": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"nonce": "0x9",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"value": "0x9184e72a"
}
]
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"raw": "0xf892098609184e72a0008276c094d46e8dd67c5d32be8058bb8eb970870f07244567849184e72a…ca1652c91bb2b348d12b",
"tx": {
"chainId": "0x1",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"input": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"nonce": "0x9",
"r": "0x839ebaab7774ffdae60d418fc8b4192d2cb861ac31acbb5fef26027d1b8f10ae",
"s": "0x15396a78493395691c10fccc33ec13f2eeb96a3ba2b4ca1652c91bb2b348d12b",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"type": "0x0",
"v": "0x26",
"value": "0x9184e72a"
}
}
}cURL
curl -X POST https://your-linea-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_signTransaction","params":[{"from":"0x9d8a62f656a8d1615c1294fd71e9cfb3e4855a4f","gas":"0x76c0","gasPrice":"0x9184e72a000","input":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x9","to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","value":"0x9184e72a"}]}'