API reference
Changelogs
- SDK changelogs
Wallets
Transactions
User signers
Ethereum
eth_signTransaction
Sign a transaction using the eth_signTransaction method.
POST
/
v1
/
wallets
/
{wallet_id}
/
rpc
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "eth_signTransaction",
"params": {
"transaction": {
"to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"value": 5000000000,
"chain_id": 11155111,
"data": "0x",
"gas": 50000,
"nonce": 0,
"max_fee_per_gas": 1000308,
"max_priority_fee_per_gas": 1000000
}
}
}'
{
"method": "eth_signTransaction",
"data": {
"signed_transaction": "0x02f870830138de80830f4240830f437480940b81418147df37155d643b5cb65ba6c8cb7aba76872000000000000480c080a05c11a2166ec56189d993dec477477d962ce0d4c466ab7ed8982110621ec87a57a003c796590c0c62eac30acd412f2aa0e8ad740c4ded86fb64d3326ee4c0ea804c",
"encoding": "rlp"
}
}
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "eth_signTransaction",
"params": {
"transaction": {
"to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"value": 5000000000,
"chain_id": 11155111,
"data": "0x",
"gas": 50000,
"nonce": 0,
"max_fee_per_gas": 1000308,
"max_priority_fee_per_gas": 1000000
}
}
}'
{
"method": "eth_signTransaction",
"data": {
"signed_transaction": "0x02f870830138de80830f4240830f437480940b81418147df37155d643b5cb65ba6c8cb7aba76872000000000000480c080a05c11a2166ec56189d993dec477477d962ce0d4c466ab7ed8982110621ec87a57a003c796590c0c62eac30acd412f2aa0e8ad740c4ded86fb64d3326ee4c0ea804c",
"encoding": "rlp"
}
}
Headers
ID of your Privy app.
Request authorization signature. If multiple signatures are required, they should be comma separated.
Path Parameters
ID of the wallet to get.
Body
Available options: eth_signTransaction
Response
Available options: eth_signTransaction
Was this page helpful?
curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "eth_signTransaction",
"params": {
"transaction": {
"to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"value": 5000000000,
"chain_id": 11155111,
"data": "0x",
"gas": 50000,
"nonce": 0,
"max_fee_per_gas": 1000308,
"max_priority_fee_per_gas": 1000000
}
}
}'
{
"method": "eth_signTransaction",
"data": {
"signed_transaction": "0x02f870830138de80830f4240830f437480940b81418147df37155d643b5cb65ba6c8cb7aba76872000000000000480c080a05c11a2166ec56189d993dec477477d962ce0d4c466ab7ed8982110621ec87a57a003c796590c0c62eac30acd412f2aa0e8ad740c4ded86fb64d3326ee4c0ea804c",
"encoding": "rlp"
}
}