Closed sirdeggen closed 1 month ago
In order to keep compatibility with all other libraries which have implemented BSM, can verify use an address rather than a pubKey? Here's the function signatures from go:
func SignMessage(privateKey *ec.PrivateKey, message []byte) ([]byte, error)
func VerifyMessage(address string, sig, data []byte) error
moneybutton/bsv@1.5.6
Message.verify = function (message, address, signature)
@2.x
static verify (messageBuf, sigstr, address)
Summary
BSM implementation makes it awkward to match go-sdk and bsvjs Bsm implementations.
Motivation
It's deprecated so we didn't focus on making it good but now it's raised its head we should implement this under the hood.
Description
BSM.sign() should return the same base64 you'd expect from older libraries. We should be careful not to break ts-paymail in the process.
Additional References
Here's the solution