Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalidDid or notFound if method-specific ID doesn't start with z? #21

Open
peacekeeper opened this issue Aug 18, 2022 · 1 comment
Open

Comments

@peacekeeper
Copy link
Member

I see that one of the tests is:

MUST raise invalidDid if the multibaseValue does not begin with the letter z.

I have been assuming so far that the invalidDid error would be returned only if the DID doesn't conform to the generic DID Core syntax. So if you try to resolve did:key:12345, the error would actually be notFound, since the DID does conform to the generic DID Core syntax, but the method-specific ID "12345" doesn't exist within the did:key method.

But maybe my assumption was wrong. I also understand the rationale that invalidDid would cover not only the generic DID Core syntax, but also method-specific syntax requirements (starting with z, in this case). So, just opening this issue to talk about it. We could define this in more detail in the DID Resolution spec: https://w3c-ccg.github.io/did-resolution/#errors

@aljones15
Copy link
Collaborator

I actually agree with you here and think that invalidDid should only be used for dids that don't meet the requirements from did core. There is an issue on the spec itself about this: w3c-ccg/did-method-key#60

I think invalidDidKey would be a better error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants