Meeco / hedera-did-sdk-js

Javascript SDK for managing DID Documents & Verifiable Credentials
Apache License 2.0
1 stars 4 forks source link

Update did resolve result to be more inline with https://w3c-ccg.gith… #21

Closed linasi closed 2 years ago

linasi commented 2 years ago

Change DID resolve result to be more inline with:

In addition to that we'll have to change resolve(r) logic to enable handling errors properly. That work is for the future.

New resolve result looks more like:

{
    "@context": "https://w3id.org/did-resolution/v1",
    "didDocument": {
        "@context": "https://www.w3.org/ns/did/v1",
        "id": "did:example:123456789abcdefghi",
        "authentication": [{
            "id": "did:example:123456789abcdefghi#keys-1",
            "type": "Ed25519VerificationKey2018",
            "controller": "did:example:123456789abcdefghi",
            "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
        }],
        "service": [{
            "id":"did:example:123456789abcdefghi#vcs",
            "type": "VerifiableCredentialService",
            "serviceEndpoint": "https://example.com/vc/"
        }]
    },
    "didResolutionMetadata": {
        "contentType": "application/did+ld+json"
    },
    "didDocumentMetadata": {
    ...
        }
}