EIP712 signatures can generated using the https://eth-account.readthedocs.io/en/stable/eth_account.html#eth_account.messages.encode_structured_data function to encode the EIP712 message, and use web3 to sign it.
msg = { "types":
{ "EIP712Domain": [], "Type": []},
"domain":domain,
"primaryType": 'Type',
"message":message }
encoded_data=encode_structured_data(msg)
web3.eth.account.sign_message(encoded_data,privateKey)
版权属于:区块链中文技术社区 / 转载原创者
本文链接:https://bcskill.com/index.php/archives/1580.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!