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

Add relative DID URL DID Document example #874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4525,6 +4525,35 @@ <h2>DID Documents</h2>
}
</pre>

<pre class="example" title="DID Document that uses relative DID URLs">
{
"@context": "https://www.w3.org/ns/did/v1.1",
"id": "did:example:123",
"verificationMethod": [
{
<span class="comment">// A relative DID URL, that will be transformed to the absolute DID URL value did:example:123#key-1</span>
"id": "#key-1",
"type": "Ed25519VerificationKey2020",
"controller": "did:example:123",
"publicKeyMultibase": "z6MkmM42vxfqZQsv4ehtTjFFxQ4sQKS2w6WR7emozFAn5cxu"
}
],
"authentication": [
"#key-1"
],
"capabilityInvocation": [
"#key-1"
],
"capabilityDelegation": [
"#key-1"
],
"assertionMethod": [
<span class="comment">// Using relative DID URL #key-1 is equivalent to using the absolute DID URL value did:example:123#key-1</span>
"did:example:123#key-1"
]
}
</pre>

</section>

<section class="informative">
Expand Down