Interface DidCreateVerificationMethod<TKms>

Options for additional verification methods added to the DID Document during the creation of a new Decentralized Identifier (DID).

interface DidCreateVerificationMethod<TKms> {
    algorithm: TKms extends CryptoApi<KmsGenerateKeyParams, string, KmsGetPublicKeyParams, KmsDigestParams, KmsSignParams, KmsVerifyParams>
        ? InferKeyGeneratorAlgorithm<TKms<TKms>>
        : "Ed25519" | "secp256k1" | "secp256r1";
    controller?: string;
    id?: string;
    purposes?: (DidVerificationRelationship | "authentication" | "assertionMethod" | "keyAgreement" | "capabilityInvocation" | "capabilityDelegation")[];
    type?: string;
}

Type Parameters

  • TKms

Hierarchy

Properties

algorithm: TKms extends CryptoApi<KmsGenerateKeyParams, string, KmsGetPublicKeyParams, KmsDigestParams, KmsSignParams, KmsVerifyParams>
    ? InferKeyGeneratorAlgorithm<TKms<TKms>>
    : "Ed25519" | "secp256k1" | "secp256r1"

The name of the cryptographic algorithm to be used for key generation.

Examples might include Ed25519 and ES256K but will vary depending on the DID method specification and the key management system in use.

Example

const verificationMethod: DidCreateVerificationMethod = {
algorithm: 'Ed25519'
};
controller?: string

The DID of the entity that controls this verification method.

id?: string

The identifier of the verification method, which must be a URI.

purposes?: (DidVerificationRelationship | "authentication" | "assertionMethod" | "keyAgreement" | "capabilityInvocation" | "capabilityDelegation")[]

Optionally specify the purposes for which a verification method is intended to be used in a DID document.

The purposes property defines the specific verification relationships between the DID subject and the verification method. This enables the verification method to be utilized for distinct actions such as authentication, assertion, key agreement, capability delegation, and others. It is important for verifiers to recognize that a verification method must be associated with the relevant purpose in the DID document to be valid for that specific use case.

Example

const verificationMethod: DidCreateVerificationMethod = {
algorithm: 'Ed25519',
controller: 'did:example:1234',
purposes: ['authentication', 'assertionMethod']
};
type?: string

The type of the verification method.

To maximize interoperability this value SHOULD be one of the valid verification method types registered in the DID Specification Registries.