Coinbase Wallet SDK
eth_signTypedData_v4
Sign structured data according to EIP-712
Defined in EIP-712
Signs structured data according to EIP-712, which provides a more secure way to sign data by providing context and structure to the data being signed.
Parameters
The address that should sign the data (20 bytes).
The typed structured data to be signed.
Returns
The signature as a hexadecimal string.
Error Handling
Code | Message | Description |
---|---|---|
4001 | User rejected the request | User denied the signing request |
4100 | Requested method not supported | The method is not supported by the wallet |
-32602 | Invalid params | Invalid typed data structure |
Always validate the domain and verifying contract address to prevent signature replay attacks.
EIP-712 signatures provide better security than personal_sign by giving users context about what they’re signing.