0

Most ethereum apps request signatures like this

enter image description here

How exactly do i recreate this signature in web3 py? Is there any way i can view the data that gets sent thru metamask?

I have tried the following code without success:

message = encode_defunct(text='Swap 0.04 ETH Minimum: 21.64184785 ZKS To: 0xc6f8a2d663250ad86c6c58fc310238e1e5e457d6 ChainId 10 Nonce: 14 Fee: 0.0 ETHAccount Id: 75463')
signed_message = w3.eth.account.sign_message(message, private_key=private_key)

1 Answer 1

1

Metamask has several api signatures.

There is a draft of the current specification at EIP 712.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.