Expand referenced keys to inline keys
Opened this issue · 3 comments
This issue tracks hyperledger/aries-rfcs#117 by @mitfik:
When DID resolver resolves DID url with service query it provides the block for whole service with keys references.
Does it make sens that DID resolver can already compile all keys inline so the requester does not have to resolve each key separately?
@peacekeeper what would this look like? A JWK in compact form?
I think what @mitfik is looking at are service endpoints like this:
{
"service": [{
"id": "did:example:123456789abcdefghi#did-communication",
"type": "did-communication",
"recipientKeys" : [ "did:example:123456789abcdefghi#1" ],
"serviceEndpoint": "https://agent.example.com/"
}],
"publicKeys": [{
"id": "did:example:123456789abcdefghi#1",
"type": "Ed25519VerificationKey2018",
"controller": "did:example:123456789abcdefghi",
"publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
}]
}
You can see that the service
block references the public key did:example:123456789abcdefghi#1
.
I believe he is suggesting that a DID Resolver could automatically expand that referenced public key inside the service
block, i.e.:
{
"service": [{
"id": "did:example:123456789abcdefghi#did-communication",
"type": "did-communication",
"recipientKeys" : [{
"id": "did:example:123456789abcdefghi#1",
"type": "Ed25519VerificationKey2018",
"controller": "did:example:123456789abcdefghi",
"publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
}],
"serviceEndpoint": "https://agent.example.com/"
}]
}
My feedback in that other original issue is that I think a standard JSON-LD processor could have built-in support for transformations like this.
+1 to this I think this is a great addition!