Defines the set of options available when creating a new Decentralized Identifier (DID) with the
'did:jwk' method.
Either the algorithm or verificationMethods option can be specified, but not both.
A new key will be generated using the algorithm identifier specified in either the algorithm
property or the verificationMethods object's algorithm property.
If verificationMethods is given, it must contain exactly one entry since DID JWK only
supports a single verification method.
If neither is given, the default is to generate a new Ed25519 key.
Example
// DID Creation
// By default, when no options are given, a new Ed25519 key will be generated. constdid = awaitDidJwk.create();
// The algorithm to use for key generation can be specified as a top-level option. constdid = awaitDidJwk.create({ options: { algorithm = 'ES256K' } });
// Or, alternatively as a property of the verification method. constdid = awaitDidJwk.create({ options: { verificationMethods: [{ algorithm = 'ES256K' }] } });
// DID Creation with a KMS constkeyManager = newLocalKeyManager(); constdid = awaitDidJwk.create({ keyManager });
// DID Resolution constresolutionResult = awaitDidJwk.resolve({ did:did.uri });
Defines the set of options available when creating a new Decentralized Identifier (DID) with the 'did:jwk' 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 JWK only supports a single verification method.Example