Optional
algorithmOptionally specify the algorithm to be used for key generation.
Optional
defaultOptionally specify an array of JSON-LD context links for the
property of the DID document.
The
property provides a JSON-LD processor with the information necessary to interpret the DID document JSON. The default context URL is 'https://www.w3.org/ns/did/v1'.
Optional
enableOptionally enable encryption key derivation during DID creation.
By default, this option is set to false
, which means encryption key derivation is not
performed unless explicitly enabled.
When set to true
, an X25519
key will be derived from the Ed25519
public key used to
create the DID. This feature enables the same DID to be used for encrypted communication, in
addition to signature verification.
Notes:
algorithm
of the DID's public key is Ed25519
.Optional
enableOptionally enable experimental public key types during DID creation.
By default, this option is set to false
, which means experimental public key types are not
supported.
Note: This implementation of the DID Key method does not support any experimental public key types.
Optional
publicOptionally specify the format of the public key to be used for DID creation.
Optional
verificationAlternatively, specify the algorithm to be used for key generation of the single verification method in the DID Document.
Defines the set of options available when creating a new Decentralized Identifier (DID) with the 'did:key' method.
Either the
algorithm
orverificationMethods
option can be specified, but not both.algorithm
property or theverificationMethods
object'salgorithm
property.verificationMethods
is given, it must contain exactly one entry since DID Key only supports a single verification method.Example