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_signUserOperation",
"params": {
"contract": "0x69007702764179f14F51cdce752f4f775d74E139",
"user_operation": {
"sender": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"nonce": "0x0",
"call_data": "0x",
"call_gas_limit": "0x30d40",
"verification_gas_limit": "0x30d40",
"pre_verification_gas": "0x5208",
"max_fee_per_gas": "0xf4240",
"max_priority_fee_per_gas": "0xf4240",
"paymaster": "0x0000000000000000000000000000000000000000",
"paymaster_data": "0x",
"paymaster_verification_gas_limit": "0x0",
"paymaster_post_op_gas_limit": "0x0"
},
"chain_id": "11155111"
}
}'
{
"method": "eth_signUserOperation",
"data": {
"signature": "0x1754782aea15e96189c3a85a7b7ac2f6339f6f4f3b29b1d3200a4c9907ef53e4776a84387583896b0a074cbc6de1a1c2a1eb53aba199da6ada8c99b0266171c41b",
"encoding": "hex"
}
}
Sign a user operation using the eth_signUserOperation method.
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_signUserOperation",
"params": {
"contract": "0x69007702764179f14F51cdce752f4f775d74E139",
"user_operation": {
"sender": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"nonce": "0x0",
"call_data": "0x",
"call_gas_limit": "0x30d40",
"verification_gas_limit": "0x30d40",
"pre_verification_gas": "0x5208",
"max_fee_per_gas": "0xf4240",
"max_priority_fee_per_gas": "0xf4240",
"paymaster": "0x0000000000000000000000000000000000000000",
"paymaster_data": "0x",
"paymaster_verification_gas_limit": "0x0",
"paymaster_post_op_gas_limit": "0x0"
},
"chain_id": "11155111"
}
}'
{
"method": "eth_signUserOperation",
"data": {
"signature": "0x1754782aea15e96189c3a85a7b7ac2f6339f6f4f3b29b1d3200a4c9907ef53e4776a84387583896b0a074cbc6de1a1c2a1eb53aba199da6ada8c99b0266171c41b",
"encoding": "hex"
}
}
0x69007702764179f14F51cdce752f4f775d74E139.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_signUserOperation",
"params": {
"contract": "0x69007702764179f14F51cdce752f4f775d74E139",
"user_operation": {
"sender": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"nonce": "0x0",
"call_data": "0x",
"call_gas_limit": "0x30d40",
"verification_gas_limit": "0x30d40",
"pre_verification_gas": "0x5208",
"max_fee_per_gas": "0xf4240",
"max_priority_fee_per_gas": "0xf4240",
"paymaster": "0x0000000000000000000000000000000000000000",
"paymaster_data": "0x",
"paymaster_verification_gas_limit": "0x0",
"paymaster_post_op_gas_limit": "0x0"
},
"chain_id": "11155111"
}
}'
{
"method": "eth_signUserOperation",
"data": {
"signature": "0x1754782aea15e96189c3a85a7b7ac2f6339f6f4f3b29b1d3200a4c9907ef53e4776a84387583896b0a074cbc6de1a1c2a1eb53aba199da6ada8c99b0266171c41b",
"encoding": "hex"
}
}
eth_signUserOperationHide child attributes
0x69007702764179f14F51cdce752f4f775d74E139.Hide child attributes
eth_signUserOperationWas this page helpful?