API reference
Changelogs
- SDK changelogs
Wallets
Transactions
User signers
Ethereum
eth_signTypedData_v4
Sign a message using the eth_signTypedData_v4 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_signTypedData_v4",
"params": {
"typed_data": {
"types": {
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint160" },
{ "name": "verifyingContract", "type": "address" }
],
"Person": [
{ "name": "name", "type": "string" },
{ "name": "wallet", "type": "address" }
],
"Mail": [
{ "name": "from", "type": "Person" },
{ "name": "to", "type": "Person" },
{ "name": "contents", "type": "string" }
]
},
"message": {
"from": {
"name": "Alice",
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
},
"to": {
"name": "Bob",
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"
},
"contents": "Hello, Bob!"
},
"primary_type": "Mail",
"domain": {
"name": "DApp Mail",
"version": "1",
"chainId": "0x3e8",
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
}
}
}
}'
{
"method": "eth_signTypedData_v4",
"data": {
"signature": "0x1754782aea15e96189c3a85a7b7ac2f6339f6f4f3b29b1d3200a4c9907ef53e4776a84387583896b0a074cbc6de1a1c2a1eb53aba199da6ada8c99b0266171c41b",
"encoding": "hex"
}
}
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_signTypedData_v4",
"params": {
"typed_data": {
"types": {
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint160" },
{ "name": "verifyingContract", "type": "address" }
],
"Person": [
{ "name": "name", "type": "string" },
{ "name": "wallet", "type": "address" }
],
"Mail": [
{ "name": "from", "type": "Person" },
{ "name": "to", "type": "Person" },
{ "name": "contents", "type": "string" }
]
},
"message": {
"from": {
"name": "Alice",
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
},
"to": {
"name": "Bob",
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"
},
"contents": "Hello, Bob!"
},
"primary_type": "Mail",
"domain": {
"name": "DApp Mail",
"version": "1",
"chainId": "0x3e8",
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
}
}
}
}'
{
"method": "eth_signTypedData_v4",
"data": {
"signature": "0x1754782aea15e96189c3a85a7b7ac2f6339f6f4f3b29b1d3200a4c9907ef53e4776a84387583896b0a074cbc6de1a1c2a1eb53aba199da6ada8c99b0266171c41b",
"encoding": "hex"
}
}
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_signTypedData_v4
Response
Available options: eth_signTypedData_v4
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_signTypedData_v4",
"params": {
"typed_data": {
"types": {
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint160" },
{ "name": "verifyingContract", "type": "address" }
],
"Person": [
{ "name": "name", "type": "string" },
{ "name": "wallet", "type": "address" }
],
"Mail": [
{ "name": "from", "type": "Person" },
{ "name": "to", "type": "Person" },
{ "name": "contents", "type": "string" }
]
},
"message": {
"from": {
"name": "Alice",
"wallet": "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"
},
"to": {
"name": "Bob",
"wallet": "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"
},
"contents": "Hello, Bob!"
},
"primary_type": "Mail",
"domain": {
"name": "DApp Mail",
"version": "1",
"chainId": "0x3e8",
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
}
}
}
}'
{
"method": "eth_signTypedData_v4",
"data": {
"signature": "0x1754782aea15e96189c3a85a7b7ac2f6339f6f4f3b29b1d3200a4c9907ef53e4776a84387583896b0a074cbc6de1a1c2a1eb53aba199da6ada8c99b0266171c41b",
"encoding": "hex"
}
}