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": "0x2386F26FC10000",
"chain_id": 11155111,
"data": "0x",
"gas_limit": 50000,
"nonce": 0,
"max_fee_per_gas": 1000308,
"max_priority_fee_per_gas": "1000000"
}
}
}'
{
"method": "eth_signTransaction",
"data": {
"signed_transaction": "0x02f870830138de80830f4240830f437480940b81418147df37155d643b5cb65ba6c8cb7aba76872000000000000480c080a05c11a2166ec56189d993dec477477d962ce0d4c466ab7ed8982110621ec87a57a003c796590c0c62eac30acd412f2aa0e8ad740c4ded86fb64d3326ee4c0ea804c",
"encoding": "rlp"
}
}
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": "0x2386F26FC10000",
"chain_id": 11155111,
"data": "0x",
"gas_limit": 50000,
"nonce": 0,
"max_fee_per_gas": 1000308,
"max_priority_fee_per_gas": "1000000"
}
}
}'
{
"method": "eth_signTransaction",
"data": {
"signed_transaction": "0x02f870830138de80830f4240830f437480940b81418147df37155d643b5cb65ba6c8cb7aba76872000000000000480c080a05c11a2166ec56189d993dec477477d962ce0d4c466ab7ed8982110621ec87a57a003c796590c0c62eac30acd412f2aa0e8ad740c4ded86fb64d3326ee4c0ea804c",
"encoding": "rlp"
}
}
SDK methods
Learn more about signing transactions using our SDKs here.Idempotency on errors: On 4xx or 5xx, Privy caches the response and replays it for the same
key. Generate a new key to retry after a server error. Policy violations are an exception and
allow same-key retries.
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": "0x2386F26FC10000",
"chain_id": 11155111,
"data": "0x",
"gas_limit": 50000,
"nonce": 0,
"max_fee_per_gas": 1000308,
"max_priority_fee_per_gas": "1000000"
}
}
}'
{
"method": "eth_signTransaction",
"data": {
"signed_transaction": "0x02f870830138de80830f4240830f437480940b81418147df37155d643b5cb65ba6c8cb7aba76872000000000000480c080a05c11a2166ec56189d993dec477477d962ce0d4c466ab7ed8982110621ec87a57a003c796590c0c62eac30acd412f2aa0e8ad740c4ded86fb64d3326ee4c0ea804c",
"encoding": "rlp"
}
}
Headers
string
required
ID of your Privy app.
string
Request authorization signature. If multiple signatures are required, they should be comma
separated.
string
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
request must be processed.
Path Parameters
string
required
ID of the wallet to get.
Body
string
required
Available options:
eth_signTransactionobject
required
Hide child attributes
Hide child attributes
object
required
Hide child attributes
Hide child attributes
string
string | number
string | number
number
Available options:
0, 1, 2, 4.string | number
string | number
string | number
string
string
string | number
string | number
Response
enum<string>
required
Available options:
eth_signTransactionWas this page helpful?

