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
The did:key spec now contains multiple normative statements about did:key. While we do throw many errors related to those statements, we don't throw them in a way that conforms to the spec.
I'm proposing that checks that can be made at the general level of any did:key be made here and then checks related to key material be made in their respective libraries.
That means the following checks need to be made in this library:
MUST raise invalidDid error if scheme is not did (NOTE: this check might be needed elsewhere)
MUST raise invalidDid error if method is not key (this check is did:key specific)
MUST raise invalidDid if version is not convertible to a positive integer value.
MUST raise invalidDid if the multibaseValue does not begin with the letter z.
The errors might be specific to the didResolver:
If "didDocument.id" is not a valid DID, an invalidDid error MUST be raised
If verificationMethod.id is not a valid DID URL, an invalidDidUrl error MUST be raised.
For Signature Verification Methods, if options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or Ed25519VerificationKey2020, an invalidPublicKeyType error MUST be raised.
For Encryption Verification Methods, if options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or X25519KeyAgreementKey2020, an invalidPublicKeyType error MUST be raised.
If verificationMethod.controller is not a valid DID, an invalidDid error MUST be raised.
The
did:key
spec now contains multiple normative statements aboutdid:key
. While we do throw many errors related to those statements, we don't throw them in a way that conforms to the spec.I'm proposing that checks that can be made at the general level of any
did:key
be made here and then checks related to key material be made in their respective libraries.That means the following checks need to be made in this library:
did:key
specific)The errors might be specific to the
didResolver
:We can throw an error like this:
Related:
digitalbazaar/ed25519-verification-key-2020#18
w3c-ccg/did-method-key#60
The text was updated successfully, but these errors were encountered: