Skip to main content

core-types package

Provides Agent implementation and defines IResolver, IDIDManager, IKeyManager, IDataStore, IMessageHandler plugin interfaces

Interfaces

Interface

Description

AuthorizedDIDContext

(BETA) This context can be used for Veramo Agents that are created behind an authorization mechanism, that attaches a DID as the authorized executor of certain actions. This authorized DID is used to further filter the data that is available for querying.

This does not constitute an authorization mechanism, but relies on an authorization mechanism existing before the Veramo Agent is created.

This API may change without a BREAKING CHANGE notice.

CredentialPayload

(BETA) Used as input when creating Verifiable Credentials

This API may change without prior notice.

CredentialStatusGenerateArgs

(BETA) Arguments for generating a credentialStatus property for a VerifiableCredential.

CredentialStatusUpdateArgs

(BETA) Input arguments for credentialStatusUpdate

FindArgs

(BETA) Represents an IDataStoreORM Query.

This API may change without a BREAKING CHANGE notice.

GetDIDComponentArgs

(BETA) Input arguments for getDIDComponentById This API may change without a BREAKING CHANGE notice.

IAgent

Agent that can execute methods

IAgentBase

Agent base interface

IAgentContext

Standard plugin method context interface

IAgentOptions

Agent configuration options.

This interface is used to describe the constellation of plugins that this agent will use and provide.

You will use this to attach plugins, to setup overrides for their methods and to explicitly set the methods that this agent instance is allowed to call. This permissioning method is also used for internal calls made by plugin code.

IAgentPlugin

Agent plugin interface

IAgentPluginSchema

Agent plugin schema

ICheckCredentialStatusArgs

(BETA) Arguments for calling checkCredentialStatus.

The credential whose status should be checked and the DID document of the credential issuer.

See Credential Status

This API may change without a BREAKING CHANGE notice.

ICreateVerifiableCredentialArgs

Encapsulates the parameters required to create a W3C Verifiable Credential

ICreateVerifiablePresentationArgs

Encapsulates the parameters required to create a W3C Verifiable Presentation

ICredentialIssuer

The interface definition for a plugin that can generate Verifiable Credentials and Presentations

ICredentialStatusManager

(BETA) Credential status manager interface

ICredentialStatusVerifier

(BETA) This interface defines a plugin that can check the status of a Verifiable Credential.

This is used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific credentialStatus type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.

The result provided by implementations of this plugin depend on whether the implementation of the StatusMethod is available.

ICredentialVerifier

The interface definition for a plugin that can generate Verifiable Credentials and Presentations

IDataStore

Basic data store interface

IDataStoreDeleteMessageArgs

Input arguments for dataStoreDeleteMessage

IDataStoreDeleteVerifiableCredentialArgs

Input arguments for IDataStoreDeleteVerifiableCredentialArgs

IDataStoreGetMessageArgs

Input arguments for dataStoreGetMessage

IDataStoreGetVerifiableCredentialArgs

Input arguments for dataStoreGetVerifiableCredential

IDataStoreGetVerifiablePresentationArgs

Input arguments for dataStoreGetVerifiablePresentation

IDataStoreORM

(BETA) This is the default query interface for the credential data stored by a Veramo agent.

Plugins implementing this interface are expected to implement this simple query functionality to filter the data that was saved using IDataStore.

If this interface is implemented by a different plugin than IDataStore, then both plugins MUST use the same media for data storage.

IDataStoreSaveMessageArgs

Input arguments for dataStoreSaveMessage

IDataStoreSaveVerifiableCredentialArgs

Input arguments for dataStoreSaveVerifiableCredential

IDataStoreSaveVerifiablePresentationArgs

Input arguments for dataStoreSaveVerifiablePresentation

IDIDManager

Identifier manager interface

IDIDManagerAddKeyArgs

Input arguments for didManagerAddKey

IDIDManagerAddServiceArgs

Input arguments for didManagerAddService

IDIDManagerCreateArgs

Input arguments for didManagerCreate

IDIDManagerDeleteArgs

Input arguments for didManagerDelete

IDIDManagerFindArgs

Input arguments for didManagerFind

IDIDManagerGetArgs

Input arguments for didManagerGet

IDIDManagerGetByAliasArgs

Input arguments for didManagerGetByAlias

IDIDManagerGetOrCreateArgs

Input arguments for didManagerGetOrCreate

IDIDManagerRemoveKeyArgs

Input arguments for didManagerRemoveKey

IDIDManagerRemoveServiceArgs

Input arguments for didManagerRemoveService

IDIDManagerSetAliasArgs

Input arguments for didManagerSetAlias

IDIDManagerUpdateArgs

(BETA) The arguments necessary to perform a full DID document update for a DID.

IError

(BETA) An error object, which can contain a code.

IEventListener

Describes a listener interface that needs to be implemented by components interested in listening to events emitted by an agent.

IHandleMessageArgs

Input arguments for handleMessage

IIdentifier

Identifier interface

IKey

Cryptographic key, usually managed by the current Veramo instance.

IKeyManager

Key manager interface.

This defines an interface for a plugin that orchestrates various implementations of AbstractKeyManagementSystem.

See KeyManager for a reference implementation.

The methods of this plugin are used automatically by other plugins, such as DIDManager, CredentialPlugin, or DIDComm to perform their required cryptographic operations using the managed keys.

IKeyManagerCreateArgs

Input arguments for keyManagerCreate

IKeyManagerDecryptJWEArgs

(BETA) Input arguments for keyManagerDecryptJWE This API may change without a BREAKING CHANGE notice.

IKeyManagerDeleteArgs

Input arguments for keyManagerDelete

IKeyManagerEncryptJWEArgs

(BETA) Input arguments for keyManagerEncryptJWE This API may change without a BREAKING CHANGE notice.

IKeyManagerGetArgs

Input arguments for keyManagerGet

IKeyManagerSharedSecretArgs

Input arguments for keyManagerSharedSecret

IKeyManagerSignArgs

Input arguments for keyManagerSign

IKeyManagerSignEthTXArgs

Input arguments for keyManagerSignEthTX

IKeyManagerSignJWTArgs

Input arguments for keyManagerSignJWT

IMessage

Represents a DIDComm v1 message payload, with optionally decoded credentials and presentations.

IMessageAttachment

Message attachment

IMessageAttachmentData

(BETA) The DIDComm message structure for data in an attachment. See https://identity.foundation/didcomm-messaging/spec/\#attachments

This API may change without a BREAKING CHANGE notice.

IMessageHandler

Message handler plugin interface.

IMetaData

Message meta data

IPluginMethod

Agent plugin method interface

IPluginMethodMap

Plugin method map interface

IResolver

DID Resolver interface

IService

Identifier service

IVerifyCredentialArgs

Encapsulates the parameters required to verify a W3C Verifiable Credential

IVerifyPresentationArgs

Encapsulates the parameters required to verify a W3C Verifiable Presentation

IVerifyResult

(BETA) Encapsulates the response object to verifyPresentation method after verifying a W3C Verifiable Presentation

KeyMetadata

This encapsulates data about a key.

Implementations of AbstractKeyManagementSystem should populate this object, for each key, with the algorithms that can be performed using it.

This can also be used to add various tags to the keys under management.

Order

(BETA) Represents the sort order of results from a FindArgs query.

This API may change without a BREAKING CHANGE notice.

PresentationPayload

(BETA) Used as input when creating Verifiable Presentations

This API may change without prior notice.

ProofType

(BETA) A proof property of a VerifiableCredential or VerifiablePresentation

This API may change without a BREAKING CHANGE notice.

RemoveContext

Removes context parameter from plugin method interface

ResolveDidArgs

Input arguments for resolveDid

UniqueVerifiableCredential

(BETA) Represents the result of a Query for VerifiableCredentials

See IDataStoreORM.dataStoreORMGetVerifiableCredentials() See IDataStoreORM.dataStoreORMGetVerifiableCredentialsByClaims()

This API may change without a BREAKING CHANGE notice.

UniqueVerifiablePresentation

(BETA) Represents the result of a Query for VerifiablePresentations

See IDataStoreORM.dataStoreORMGetVerifiablePresentations()

This API may change without a BREAKING CHANGE notice.

UnsignedCredential

(BETA) Represents an unsigned W3C Credential payload. See VC data model

This API may change without a BREAKING CHANGE notice.

UnsignedPresentation

Represents an unsigned W3C Presentation payload. See VP data model

UsingResolutionOptions

Options that are forwarded to the DID resolver.

VerificationPolicies

(BETA) These optional settings can be used to override some default checks that are performed on Presentations during verification.

Where

(BETA) Represents a WHERE predicate for a FindArgs query. In situations where multiple WHERE predicates are present, they are combined with AND.

This API may change without a BREAKING CHANGE notice.

Variables

Variable

Description

CoreEvents

This collection defines the core event types.

KEY_ALG_MAPPING

Mapping of known key types(TKeyType) to the known algorithms(TAlg) they should support.

schema

Type Aliases

Type Alias

Description

CompactJWT

(BETA) Represents a Json Web Token in compact form. "header.payload.signature"

This API may change without a BREAKING CHANGE notice.

ContextType

(BETA) The data type for @context properties of credentials, presentations, etc.

This API may change without a BREAKING CHANGE notice.

CredentialStatus

(BETA) Represents the result of a status check.

Implementations MUST populate the revoked boolean property, but they can return additional metadata that is method-specific.

CredentialStatusReference

(BETA) Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information are determined by the specific credentialStatus type definition and vary depending on factors such as whether it is simple to implement or if it is privacy-enhancing.

See Credential Status

This API may change without a BREAKING CHANGE notice.

CredentialSubject

(BETA) The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.

See Credential Subject

This API may change without a BREAKING CHANGE notice.

DateType

(BETA) Represents an issuance or expiration date for Credentials / Presentations. This is used as input when creating them.

This API may change without prior notice.

DIDDocComponent

(BETA) Return type of getDIDComponentById represents a VerificationMethod or a ServiceEndpoint entry from a This API may change without a BREAKING CHANGE notice.

DIDDocumentSection

Refers to a section of a DID document. Either the list of verification methods or services or one of the verification relationships.

See verification relationships

FindClaimsArgs

(BETA) The filter that can be used to find VerifiableCredentials in the data store, based on the types and values of their claims.

See IDataStoreORM.dataStoreORMGetVerifiableCredentialsByClaims() This API may change without a BREAKING CHANGE notice.

FindCredentialsArgs

(BETA) The filter that can be used to find VerifiableCredentials in the data store. See IDataStoreORM.dataStoreORMGetVerifiableCredentials()

This API may change without a BREAKING CHANGE notice.

FindIdentifiersArgs

(BETA) The filter that can be used to find IIdentifiers in the data store.

This API may change without a BREAKING CHANGE notice.

FindMessagesArgs

(BETA) The filter that can be used to find IMessages in the data store. See IDataStoreORM.dataStoreORMGetMessages()

This API may change without a BREAKING CHANGE notice.

FindPresentationsArgs

(BETA) The filter that can be used to find VerifiablePresentations in the data store. See IDataStoreORM.dataStoreORMGetVerifiablePresentations()

This API may change without a BREAKING CHANGE notice.

ICredentialPlugin

The interface definition for a plugin that can generate and verify Verifiable Credentials and Presentations

ICredentialStatus

(BETA) Veramo plugin interface for plugins implementing both the manager and the verifier aspects of Credential Status flow.

IServiceEndpoint

Represents a service endpoint URL or a map of URLs

IssuerAgentContext

(BETA) Represents the requirements that this plugin has. The agent using this plugin is expected to provide these methods.

This interface can be used for static type checks to make sure your application is properly initialized.

IssuerType

(BETA) The issuer of a VerifiableCredential or the holder of a VerifiablePresentation.

The value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if de-referenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.

See Issuer data model

This API may change without a BREAKING CHANGE notice.

ManagedKeyInfo

Represents information about a managed key. Private or secret key material is NOT present.

MinimalImportableIdentifier

Represents the minimum amount of information needed to import an IIdentifier.

MinimalImportableKey

Represents the properties required to import a key.

PartialIdentifier

(BETA) The result of a IDataStoreORM.dataStoreORMGetIdentifiers() query.

This API may change without a BREAKING CHANGE notice.

ProofFormat

Represents a format for a particular type of verifiable data. This is an extensible union of several known formats implemented by Veramo

RequireOnly

Represents an object type where a subset of keys is required and everything else is optional.

TAgent

Utility type for constructing agent type that has a list of available methods

TAlg

Known algorithms supported by some of the above key types defined by TKeyType.

Actual implementations of Key Management Systems can support more. One should check the IKey.meta.algorithms property to see what is possible for a particular managed key.

TClaimsColumns

(BETA) The columns that can be searched for the claims of a VerifiableCredential

See IDataStoreORM.dataStoreORMGetVerifiableCredentialsByClaims() See IDataStoreORM.dataStoreORMGetVerifiableCredentialsByClaimsCount()

This API may change without a BREAKING CHANGE notice.

TCredentialColumns

(BETA) The columns that can be searched for a VerifiableCredential

See IDataStoreORM.dataStoreORMGetVerifiableCredentials() See IDataStoreORM.dataStoreORMGetVerifiableCredentialsCount()

This API may change without a BREAKING CHANGE notice.

TIdentifiersColumns

(BETA) The columns that can be queried for an IIdentifier

TKeyType

Cryptographic key type.

TMessageColumns

(BETA) The columns that can be queried for an IMessage

See IDataStoreORM.dataStoreORMGetMessagesCount() This API may change without a BREAKING CHANGE notice.

TPresentationColumns

(BETA) The columns that can be searched for a VerifiablePresentation

See IDataStoreORM.dataStoreORMGetVerifiablePresentations() See IDataStoreORM.dataStoreORMGetVerifiablePresentationsCount()

This API may change without a BREAKING CHANGE notice.

VerifiableCredential

(BETA) Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See VC data model

This API may change without a BREAKING CHANGE notice.

VerifiablePresentation

Represents a signed Verifiable Presentation (includes proof), using a JSON representation. See VP data model

VerifierAgentContext

(BETA) Represents the requirements that this plugin has. The agent that is using this plugin is expected to provide these methods.

This interface can be used for static type checks, to make sure your application is properly initialized.

W3CVerifiableCredential

(BETA) Represents a signed Verifiable Credential (includes proof), in either JSON or compact JWT format. See VC data model See proof formats

This API may change without a BREAKING CHANGE notice.

W3CVerifiablePresentation

Represents a signed Verifiable Presentation (includes proof) in either JSON or compact JWT format. See VC data model