mykeylab / keyid-eth-contracts

KEY ID contracts on Ethereum
GNU General Public License v3.0
13 stars 2 forks source link

How do I use isValidSignature #1

Closed adamchen0510 closed 4 years ago

adamchen0510 commented 4 years ago

We are trying to call isValidSignature to verify the signature form mykey app but can not get success result. How do I pass the parameters, just pass the hash(msg) and signature is ok? (the msg is signed by mykey app(passed by our application) and the signature is returned from mykey app)

adamchen0510 commented 4 years ago

our test flow: 1 Use mykey connect to our website via WalletConnect 2 Our website pass some msg to let mykey app sign the msg by personal_sign 3 mykey app return the signature 4 we call the isValidSignature(bytes32 _msgHash, bytes memory _signature) pass the hash(msg) and the signature but it don't return ERC1271_ISVALIDSIGNATURE_BYTES32.

clar commented 4 years ago

Your test flow is correct. We are still in the progress of upgrading the contract to support EIP1271. Currently you need to follow the instructions here(https://docs.mykey.org/v/English/sign-in-with-mykey/verify-signature-on-server-backend) to verify the signature.

adamchen0510 commented 4 years ago

Got it, thanks!