Open kripa432 opened 4 months ago
EIP-712: https://eips.ethereum.org/EIPS/eip-712
EIP-712 add support to sign typed data. There are three format to encode the data
encode(transaction : π) = RLP_encode(transaction) encode(message : πΉβΈβΏ) = "\x19Ethereum Signed Message:\n" β len(message) β message encode(domainSeparator : πΉΒ²β΅βΆ, message : π) = "\x19\x01" β domainSeparator β hashStruct(message)
\x19Ethereum Signed Message:\n
Running the curl command given in documentation, gives the following error.
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_signTypedData","params":["0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826", {"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"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"}]},"primaryType":"Mail","domain":{"name":"Ether Mail","version":"1","chainId":1,"verifyingContract":"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},"message":{"from":{"name":"Cow","wallet":"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},"to":{"name":"Bob","wallet":"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},"contents":"Hello, Bob!"}}],"id":1}' http://localhost:9000
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Internal error"}}
Does the web3signer, supports 3rd format with prefix \x19\x01?
\x19\x01
@kripa432 Thank you for reporting this, let me try to reproduce and analyse it and will report back.
EIP-712: https://eips.ethereum.org/EIPS/eip-712
EIP-712 add support to sign typed data. There are three format to encode the data
893 add support to sign typed data, but the documentation states it signs with prefix
\x19Ethereum Signed Message:\n
Running the curl command given in documentation, gives the following error.
Command
Result
Does the web3signer, supports 3rd format with prefix
\x19\x01
?