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_sign7702Authorization",
"params": {
"contract": "0x1234567890abcdef1234567890abcdef12345678",
"chain_id": 1,
"nonce": 0
}
}'
{
"method": "eth_sign7702Authorization",
"data": {
"authorization": {
"contract": "0x1234567890abcdef1234567890abcdef12345678",
"chain_id": 1,
"nonce": 0,
"r": "0x0db9c7bd881045cbba28c347de6cc32a653e15d7f6f2f1cec21d645f402a6419",
"s": "0x6e877eb45d3041f8d2ab1a76f57f408b63894cfc6f339d8f584bd26efceae308",
"y_parity": 1
}
}
}
Ethereum
eth_sign7702Authorization
Signs an EIP-7702 authorization struct using the wallet’s private key.
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_sign7702Authorization",
"params": {
"contract": "0x1234567890abcdef1234567890abcdef12345678",
"chain_id": 1,
"nonce": 0
}
}'
{
"method": "eth_sign7702Authorization",
"data": {
"authorization": {
"contract": "0x1234567890abcdef1234567890abcdef12345678",
"chain_id": 1,
"nonce": 0,
"r": "0x0db9c7bd881045cbba28c347de6cc32a653e15d7f6f2f1cec21d645f402a6419",
"s": "0x6e877eb45d3041f8d2ab1a76f57f408b63894cfc6f339d8f584bd26efceae308",
"y_parity": 1
}
}
}
SDK methods
Learn more about signing EIP-7702 authorizations 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_sign7702Authorization",
"params": {
"contract": "0x1234567890abcdef1234567890abcdef12345678",
"chain_id": 1,
"nonce": 0
}
}'
{
"method": "eth_sign7702Authorization",
"data": {
"authorization": {
"contract": "0x1234567890abcdef1234567890abcdef12345678",
"chain_id": 1,
"nonce": 0,
"r": "0x0db9c7bd881045cbba28c347de6cc32a653e15d7f6f2f1cec21d645f402a6419",
"s": "0x6e877eb45d3041f8d2ab1a76f57f408b63894cfc6f339d8f584bd26efceae308",
"y_parity": 1
}
}
}
Headers
Request authorization signature. If multiple signatures are required, they should be comma
separated.
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
request must be processed.
Path Parameters
Body
The parameters for signing the EIP-7702 authorization.
Hide child properties
Hide child properties
Response
The response data containing the signed authorization.
Hide child properties
Hide child properties
The signed EIP-7702 authorization object.
Show authorization properties
Show authorization properties
Was this page helpful?

