Skip to content

Library needs to implement Options from did:key v0.7 spec #48

@aljones15

Description

@aljones15

The did:key 0.7 spec introduces some options (with defaults) in the document creation algorithm.

The options are:

  • publicKeyFormat (should be multiKey or Ed25519VerificationKey2020)
  • enableExperimentalPublicKeyTypes (defaults to false)
  • defaultContext (defaults to [https://www.w3.org/ns/did/v1])
  • enableEncryptionKeyDerivation (should be true to enable keyAgreementKey )

These options should be passed in on didDocument creation regardless of if creating from from privateKey or publicKey seed.

These options also have some validation rules behind them:

  • If publicKeyFormat is not known to the implementation, an unsupportedPublicKeyType error MUST be raised.
  • If options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or Ed25519VerificationKey2020, an invalidPublicKeyType error MUST be raised.
  • If options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or X25519KeyAgreementKey2020, an invalidPublicKeyType error MUST be raised.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions