Skip to main content

ICreateVerifiableCredentialArgs interface

Encapsulates the parameters required to create a W3C Verifiable Credential

Signature:

export interface ICreateVerifiableCredentialArgs extends UsingResolutionOptions

Extends: UsingResolutionOptions

Properties

PropertyModifiersTypeDescription
credentialCredentialPayload

The JSON payload of the Credential according to the canonical model

The signer of the Credential is chosen based on the issuer.id property of the credential

@context, type and issuanceDate will be added automatically if omitted

fetchRemoteContexts?boolean

(Optional) When dealing with JSON-LD you also MUST provide the proper contexts. Set this to true ONLY if you want the @context URLs to be fetched in case they are not preloaded. The context definitions SHOULD rather be provided at startup instead of being fetched.

Defaults to false

keyRef?string(Optional) [Optional] The ID of the key that should sign this credential. If this is not specified, the first matching key will be used.
proofFormatProofFormatThe desired format for the VerifiableCredential to be created.
removeOriginalFields?boolean(Optional) Remove payload members during JWT-JSON transformation. Defaults to true. See https://www.w3.org/TR/vc-data-model/\#jwt-encoding
save?boolean(Optional) If this parameter is true, the resulting VerifiableCredential is sent to the storage plugin to be saved.