feat: add encryption key support for ethr-did-documents #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's here
This adds explicit support for listing X25519 encryption keys in ethr-did documents
This extends the supported attribute values to include
X25519
key algorithm andenc
key purpose.(fixes #52)
Example Base64 encoded X25519 Encryption Key
A
DIDAttributeChanged
event for the identity0xf3beac30c498d9e26865f34fcaa57dbb935b0d74
with the namedid/pub/X25519/enc/base64
and the value of0x302a300506032b656e032100118557777ffb078774371a52b00fed75561dcf975e61c47553e664a617661052
generates a
PublicKey
entry like this:Note
Some key algorithms would not fit certain purposes (like encryption with secp256k1 or signing with X25519).
The DID resolver makes no assumptions here and does not enforce a match, nor does the registry contract where these attribute changes need to be sent.
It is up to the owners of the DIDs which attributes they list.