Interface DidIonVerificationMethod

Represents a DID verification method in the context of DID ION create, update, deactivate, and resolve operations.

Unlike the DID Core standard DidVerificationMethod interface, this type is specific to the ION method operations and only includes the id, publicKeyJwk, and purposes properties:

  • The id property is optional and specifies the identifier fragment of the verification method.
  • The publicKeyJwk property is required and represents the public key in JWK format.
  • The purposes property is required and specifies the purposes for which the verification method can be used.

Example

const verificationMethod: DidIonVerificationMethod = {
id : 'sig',
publicKeyJwk : {
kty : 'OKP',
crv : 'Ed25519',
x : 'o40shZrsco-CfEqk6mFsXfcP94ly3Az3gm84PzAUsXo',
kid : 'BDp0xim82GswlxnPV8TPtBdUw80wkGIF8gjFbw1x5iQ',
},
purposes: ['authentication', 'assertionMethod']
};
interface DidIonVerificationMethod {
    id?: string;
    publicKeyJwk: Jwk;
    purposes: (DidVerificationRelationship | "authentication" | "assertionMethod" | "keyAgreement" | "capabilityInvocation" | "capabilityDelegation")[];
}

Properties

id?: string

Optionally specify the identifier fragment of the verification method.

If not specified, the method's ID will be generated from the key's ID or thumbprint.

Example

const verificationMethod: DidIonVerificationMethod = {
id: 'sig',
...
};
publicKeyJwk: Jwk

A public key in JWK format.

A JSON Web Key (JWK) that conforms to RFC 7517.

Example

const verificationMethod: DidIonVerificationMethod = {
publicKeyJwk: {
kty : "OKP",
crv : "X25519",
x : "7XdJtNmJ9pV_O_3mxWdn6YjiHJ-HhNkdYQARzVU_mwY",
kid : "xtsuKULPh6VN9fuJMRwj66cDfQyLaxuXHkMlmAe_v6I"
},
...
};
purposes: (DidVerificationRelationship | "authentication" | "assertionMethod" | "keyAgreement" | "capabilityInvocation" | "capabilityDelegation")[]

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: DidIonVerificationMethod = {
purposes: ['authentication', 'assertionMethod'],
...
};