eth_signTransaction
Returns an RLP encoded transaction signed by the specified account.
https://api.1inch.com/web3/43114
Supported on: Avalanche
Parameters
Transaction (required)
Transaction
* object type
string nonce
string to
any oneOf[0]
null oneOf[1]
string from
string gas
string value
string input
string gasPrice
string The gas price willing to be paid by the sender in wei
maxPriorityFeePerGas
string Maximum fee per gas the sender is willing to pay to miners in wei
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
maxFeePerBlobGas
string The maximum total fee per gas the sender is willing to pay for blob gas in wei
accessList
array EIP-2930 access list
items
object address
* string storageKeys
* array items
string additionalProperties
none blobVersionedHashes
array List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.
items
string blobs
array Raw blob data.
items
string chainId
string Chain ID that this transaction is valid on.
authorizationList
array EIP-7702 authorization list
items
object chainId
* string Chain ID on which this transaction is valid
nonce
* string address
* string yParity
* string The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature
r
* string s
* string additionalProperties
none Request
Request
object jsonrpc
* string (Enum)JSON-RPC version
2.0
method
* string The method to call
params
array Method parameters
items
object type
string nonce
string to
any oneOf[0]
null oneOf[1]
string from
string gas
string value
string input
string gasPrice
string The gas price willing to be paid by the sender in wei
maxPriorityFeePerGas
string Maximum fee per gas the sender is willing to pay to miners in wei
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
maxFeePerBlobGas
string The maximum total fee per gas the sender is willing to pay for blob gas in wei
accessList
array EIP-2930 access list
items
object address
* string storageKeys
* array items
string additionalProperties
none blobVersionedHashes
array List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.
items
string blobs
array Raw blob data.
items
string chainId
string Chain ID that this transaction is valid on.
authorizationList
array EIP-7702 authorization list
items
object chainId
* string Chain ID on which this transaction is valid
nonce
* string address
* string yParity
* string The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature
r
* string s
* string additionalProperties
none id
* number Request ID
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const response = await fetch('https://api.1inch.com/web3/43114', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${API_KEY}`,
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_signTransaction',
params: [
{
type: 'string',
nonce: 'string',
to: null,
from: 'string',
gas: 'string',
value: 'string',
input: 'string',
gasPrice: 'string',
maxPriorityFeePerGas: 'string',
maxFeePerGas: 'string',
maxFeePerBlobGas: 'string',
accessList: [
{
address: 'string',
storageKeys: ['string'],
},
],
blobVersionedHashes: ['string'],
blobs: ['string'],
chainId: 'string',
authorizationList: [
{
chainId: 'string',
nonce: 'string',
address: 'string',
yParity: 'string',
r: 'string',
s: 'string',
},
],
},
],
id: 1,
}),
});
const data = await response.json();
console.log(data);
Response
Encoded transaction
Encoded transaction
string JSON
Copy
1
2
"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"