Open mattcollier opened 3 months ago
https://github.com/digitalbazaar/ed25519-verification-key-2020/blob/main/lib/Ed25519VerificationKey2020.js#L405
The signer API returns a function that only later throws if there is no private key material present. Would it be better for the signer API to throw when there is no private key material instead of returning a non-operational sign function?
signer
sign
Yes, I think throwing earlier would be better.
Great, I believe this existing signer pattern has been used in several different key types and will need to be updated in those places as well.
https://github.com/digitalbazaar/ed25519-verification-key-2020/blob/main/lib/Ed25519VerificationKey2020.js#L405
The
signer
API returns a function that only later throws if there is no private key material present. Would it be better for thesigner
API to throw when there is no private key material instead of returning a non-operationalsign
function?