You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run the following and leave out the message from the second to last line you'll see a ValidationError: Invalid ed25519 signature error. It should instead tell you that you need to pass in a message.
constcc=require('five-bells-condition')consted25519=require('ed25519')constseed=Buffer.from('833fe62409237b9d62ec77587520911e9a759cec1d19755b7da901b96dca3d42','hex')constkeypair=ed25519.MakeKeypair(seed)constedff=newcc.Ed25519()edff.setPublicKey(keypair.publicKey)constcondition=edff.getConditionUri()constmessage=newBuffer('Hello World! Conditions are here!')edff.sign(message,seed)constfulfillment=edff.serializeUri()constvalid=cc.validateFulfillment(fulfillment,condition,message)console.log('valid',valid)
The text was updated successfully, but these errors were encountered:
I just realized that it's throwing this error because it's validating against the empty buffer. For something like a signature condition type I think it should probably require that you pass a proper message. It seems likely that it would be a bug causing the user to request validating a signature on no message.
Found by @inacali in #51
If you run the following and leave out the message from the second to last line you'll see a
ValidationError: Invalid ed25519 signature
error. It should instead tell you that you need to pass in a message.The text was updated successfully, but these errors were encountered: