MetaMask
Restricted
eth_signTypedData_v4
Summary: Presents a structured data message for the user to sign.
Presents a data message for the user to sign in a structured and readable format and returns the signed response. Introduced by EIP-712. This method requires that the user has granted permission to interact with their account first, so make sure to calleth_requestAccounts
(recommended) or wallet_requestPermissions
first.
Parameters
Address string
hex encoded address
TypedData object
requiredTypedData
Returns
Signature string
hex encoded bytes
Customize request
Connect your MetaMask wallet to run requests successfully.
Request
await window.ethereum.request({
"method": "eth_signTypedData_v4",
"params": [],
});