Closed ukstv closed 4 years ago
Hi! There is indeed an issue with the BLS verification signature. It wasn't correctly creating the BLS public key from the address. I have push a PR. I have added some tests for it too.
Aww, sweet! Do I understand correctly, that (1) the signature from Lotus could be verified here, and (2, minor) I would have to transform from Lotus base32 signature to hex so that it is correctly verified?
Yes the lotus signature should be verified using this function and you can actually keep the base64 signature encoding. No need to convert to hex, both encoding should work.
Note: lotus signatures are returned as base64 not base32 if I am not mistaken.
It's all base-whatever-all-over-the-place. I might be mistaken here. This is really awesome I do not have to convert the formats, thanks!!
Trying to employ the library to verify BLS signatures. Do you guys have an example of how to do that? I have tried to call
verifySignature
based on one of the tests supplied with the library (tests_basic.js
), it reportsError verifying signature: bls error
:Kind of the same way I tried to verify signature made by Lotus, the same error. Check script below:
What
verifySignature
expects as input? If there is a test case in the codebase that could serve as a clue, that would be cool too.