Skip to main content

data-store package

TypeORM backed plugins. Agent plugin that implements IDataStore interface. Agent plugin that implements IDataStoreORM interface. Provides KeyStore for KeyManager and DIDStore for DIDManager

Classes

ClassDescription
Claim(BETA) Represents the properties of a claim extracted from a Verifiable Credential credentialSubject, and stored in a TypeORM database for querying.
Credential_2(BETA) Represents some common properties of a Verifiable Credential that are stored in a TypeORM database for querying.
DataStore

(BETA) This class implements the IDataStore interface using a TypeORM compatible database.

This allows you to store and retrieve Verifiable Credentials, Presentations and Messages by their IDs.

For more complex queries you should use DataStoreORM which is the default way to query the stored data by some common properties. These two classes MUST also share the same database connection.

DataStoreDiscoveryProvider

(BETA) This implementation of AbstractDidDiscoveryProvider helps you discover DIDs based on data that is stored by a local plugin that implements IDataStoreORM.

DIDs can be discovered by partial matches of name from Profile credentials, by partial matches of alias of managed DIDs as well as partial matches of DIDs that are issuer or subject of credentials.

This API may change without a BREAKING CHANGE notice.

DataStoreORM

(BETA) This class implements the IDataStoreORM query interface using a TypeORM compatible database.

This allows you to filter Verifiable Credentials, Presentations and Messages by some common properties that are parsed and stored in database tables.

This class is designed to work with DataStore which is the default way to populate the database with Credentials, Presentations and Messages in such a way that they can be queried by this class. These two classes MUST also share the same database connection.

DIDStore

An implementation of AbstractDIDStore that uses a TypeORM database to store the relationships between DIDs, their providers and controllers and their keys and services as they are known and managed by a Veramo agent.

An instance of this class can be used by DIDManager as the data storage layer.

To make full use of this class, it should use the same database as the one used by KeyStore.

Identifier(BETA) Represents some properties and relationships of an IIdentifier that are stored in a TypeORM database for the purpose of keeping track of keys and services associated with a DID managed by a Veramo agent.
Key(BETA) Represents some properties of a IKey that are stored in a TypeORM database for the purpose of keeping track of the AbstractKeyManagementSystem implementations and the keys they are able to use.
KeyStore

An implementation of AbstractKeyStore that uses a TypeORM database to store the relationships between keys, their IDs, aliases and KMS implementations, as they are known and managed by a Veramo agent.

An instance of this class can be used by KeyManager as the data storage layer.

To make full use of this class, it should use the same database as the one used by DIDStore.

Message(BETA) Represents some common properties of an IMessage that are stored in a TypeORM database for querying.
PreMigrationKey

(BETA) This represents the private key data of keys that were stored by KeyStore before Veramo 3.0. During database migration this key material is moved to a different table and accessible by PrivateKeyStore.

This API may change without a BREAKING CHANGE notice.

Presentation(BETA) Represents some common properties of a Verifiable Presentation that are stored in a TypeORM database for querying.
PrivateKey(BETA) Represents some properties of a ManagedPrivateKey that are stored in a TypeORM database when using a PrivateKeyStore to store private key data.
PrivateKeyStore

An implementation of AbstractPrivateKeyStore that uses a TypeORM database connection to store private key material.

The keys can be encrypted while at rest if this class is initialized with an AbstractSecretBox implementation.

Service

(BETA) Represents some properties of a as it is stored in a TypeORM database. This is used by DIDStore to provide information to DIDManager when DID management information is stored in a local TypeORM database.

This API may change without a BREAKING CHANGE notice.

Functions

FunctionDescription
entitiesConcat(entityArrays)

Helper function to concatenate multiple arrays of TypeORM entities.

This array CAN be used when creating a TypeORM connection.

migrationConcat(migrationArrays)The migrations helper that allows migrations from multiple sources to be combined into a single array.

Interfaces

InterfaceDescription
MetaData

(BETA) Represents message metadata as it is stored by DataStore.

This metadata is most often used by MessageHandler and IMessageHandler implementations to decorate messages that are interpreted and decoded, but not returned as final, as they pass through the message handler chain.

- This API may change without a BREAKING CHANGE notice.

Variables

VariableDescription
Entities

The TypeORM entities used by this package.

This array SHOULD be used when creating a TypeORM connection.

migrations

The migrations array that SHOULD be used when initializing a TypeORM database connection.

These ensure the correct creation of tables and the proper migrations of data when tables change between versions.

Type Aliases

Type AliasDescription
KeyType_2

(BETA) Mirrors TKeyType

- This API may change without a BREAKING CHANGE notice.