### Example verification method structure Source: https://www.w3.org/TR/did Example 12 shows the structure of a verification method map in a DID document. It includes the @context, id, and a verificationMethod array with two example entries, each having id, type, controller, and either publicKeyJwk or publicKeyMultibase. This snippet is used to illustrate how verification methods are expressed. ```json { "@context": [ "https://www.w3.org/ns/did/v1", "https://w3id.org/security/suites/jws-2020/v1" "https://w3id.org/security/suites/ed25519-2020/v1" ] "id": "did:example:123456789abcdefghi", ... "verificationMethod": [{ "id": ..., "type": ..., "controller": ..., "publicKeyJwk": ... }, { "id": ..., "type": ..., "controller": ..., "publicKeyMultibase": ... }] } ``` -------------------------------- ### Simple DID document example Source: https://www.w3.org/TR/did A simple DID document example showing the structure of a DID document with @context, id, and authentication. Note the missing comma after the @context array, which is a syntax error in the source. The authentication section uses an Ed25519VerificationKey2020 key with a publicKeyMultibase value. ```json { "@context": [ "https://www.w3.org/ns/did/v1", "https://w3id.org/security/suites/ed25519-2020/v1" ] "id": "did:example:123456789abcdefghi", "authentication": [{ // used to authenticate as did:...fghi "id": "did:example:123456789abcdefghi#keys-1", "type": "Ed25519VerificationKey2020", "controller": "did:example:123456789abcdefghi", "publicKeyMultibase": "zH3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" }] } ``` -------------------------------- ### Example 21: DID Document in JSON Representation Source: https://www.w3.org/TR/did Example 21: Example DID document in JSON representation, showing a DID document with an authentication verification method. This is a conforming producer output with media type application/did+json. ```JSON { "id": "did:example:123456789abcdefghi", "authentication": [{ "id": "did:example:123456789abcdefghi#keys-1", "type": "Ed25519VerificationKey2018", "controller": "did:example:123456789abcdefghi", "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" }] } ``` -------------------------------- ### Verifiable Credential with JsonWebKey2020 Source: https://www.w3.org/TR/did A verifiable credential example that uses a proof of type JsonWebSignature2020 and links to a verification method of type JsonWebKey2020. The credential represents a UniversityDegreeCredential with a BachelorDegree subject. This example is non-normative and for information purposes only. ```json { // external (all terms in this example) "@context": [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ], "id": "http://example.gov/credentials/3732", "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": { "id": "did:example:123" }, "issuanceDate": "2020-03-10T04:24:12.164Z", "credentialSubject": { "id": "did:example:456", "degree": { "type": "BachelorDegree", "name": "Bachelor of Science and Arts" } }, "proof": { "type": "JsonWebSignature2020", "created": "2020-02-15T17:13:18Z", "verificationMethod": "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A", "proofPurpose": "assertionMethod", "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..Y0KqovWCPAeeFhkJxfQ22pbVl43Z7UI-X-1JX32CA9MkFHkmNprcNj9Da4Q4QOl0cY3obF8cdDRdnKr0IwNrAw" } } ``` -------------------------------- ### Example 9: Relative DID URL in a DID document Source: https://www.w3.org/TR/did Shows a DID document with a relative DID URL '#key-1' in the authentication array, which resolves to 'did:example:123456789abcdefghi#key-1'. The example includes a verification method with an external property value and a comment indicating the relative URL usage. ```json { "@context": [ "https://www.w3.org/ns/did/v1", "https://w3id.org/security/suites/ed25519-2020/v1" ] "id": "did:example:123456789abcdefghi", "verificationMethod": [{ "id": "did:example:123456789abcdefghi#key-1", "type": "Ed25519VerificationKey2020", // external (property value) "controller": "did:example:123456789abcdefghi", "publicKeyMultibase": "zH3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" }, ...], "authentication": [ // a relative DID URL used to reference a verification method above "#key-1" ] } ``` -------------------------------- ### DID Document in application/did+ld+json Source: https://www.w3.org/TR/did Example DID document in the application/did+ld+json representation, showing the JSON-LD serialization with the @context entry. This is the output of the production rules for the JSON-LD representation. ```JSON-LD { "@context": ["https://www.w3.org/ns/did/v1"], "id": "did:example:123", "verificationMethod": [{ "id": "did:example:123#keys-1", "controller": "did:example:123", "type": "Ed25519VerificationKey2018", "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVA" }], "authentication": [ "did:example:123#keys-1" ] } ``` -------------------------------- ### DID Document with 1 verification method type Source: https://www.w3.org/TR/did Example DID document with a single verification method of type Ed25519VerificationKey2020. The example is for information purposes only; best practice is to avoid using the same verification method for multiple purposes. ```json { "@context": [ "https://www.w3.org/ns/did/v1", "https://w3id.org/security/suites/ed25519-2020/v1" ], "id": "did:example:123456789abcdefghi", "verificationMethod": [ { "id": "did:example:123456789abcdefghi#keys-1", "type": "Ed25519VerificationKey2020", "controller": "did:example:123456789abcdefghi", "publicKeyMultibase": "z6Mkf5rGMawsr5cHp3p1vG8vP7vJ7vJ7vJ7vJ7vJ7vJ7vJ7vJ7vJ7vJ7vJ7" } ] } ``` -------------------------------- ### Verifiable Credential with BLS12381 Verification Method Source: https://www.w3.org/TR/did A verifiable credential example that uses a BLS12381 verification method. The credential includes a @context with the BBS security suite and schema.org mappings for name and birthDate. This example is non-normative and for information purposes only. ```json { // external (all terms in this example) "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/bbs/v1", { "name": "https://schema.org/name", "birthDate": "https://schema.org/birthDate" } ], "id": "urn:uuid:c499e122-3ba9-4e95-8d4d-c0ebfcf8c51a", "type": ["VerifiableCredential"], "issuanceDate": "2021-02-07T16:02:08.571Z", "issuer": { "id": "did:example:123" }, ```