-
Notifications
You must be signed in to change notification settings - Fork 0
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
Multicode DID encoding #3
Comments
DID URLs are a thing that exist-- they haven't gotten too much play in did v1 but i think some people are starting to use them in prod these days, such as the cheqd.io guys who are currently exploring and specifying using DID URLs to address immutable and in some cases content-addressed resources needed for some fancy VC use cases in the VCs themselves... A DID URL combines all the chaos of a URN (the did part) with all the chaos of a URL (after the ? or #) so supporting them may take a little creativity on the processing. I like Joel's approach of prefixing the easy-to-parse, ?/#-free dids like Sidenote, the easiest way to get answers about DID URLs if you have questions is to ask markus sabadello, @ / peacekeeper, he is lead editor on the DID Resolution spec (which includes all the parsing rules for ? and # params) and, coincidentally, also co-editor of the dnslink spec, active everywhere, very good dood and generous with his time on such matters. |
New proposal that takes DID URLs into consideration. All DIDs are represented as:
Where:
Examples:
A nice thing about this approach is that all DIDs will be prefixed by |
nothing like looking into the binary for clues and seeing a D1D pop out right near the front 🤣 |
TBH I'm kind of a binary ignoramus and defer to people with binary buidling/sniffing/needing experience but at least from my safe perch miles above the binary it seems elegant? |
Following up from #2:
Currently Prinicipal is defined as follows:
A few observations:
did:key
special treatment here. Ideally I'd like a completely self describing byte level description formats for DIDs that can be used anywhereI would suggest we do something like this:
did:*
:0xd1d
followed by utf8 encoded string as suggested abovedid:key
:0xd1e
followed by public key multicodec + raw public key bytesdid:pkh
:0xd1f
followed by ...something...This would allow us to have a generalizable approach to representing a DID as a bytestring.
Note however that ideally we'd also include a generalizable way to represent an entire DID URL
The text was updated successfully, but these errors were encountered: