data-store-json package
Agent plugin that implements IDataStore and IDataStoreORMinterfaces and uses a JSON tree as a backend.
The JSON tree backend can be persisted to any JSON compatible media using a callback that gets called when the agent data is updated.
Classes
Class | Description |
---|---|
BrowserLocalStorageStore | Implementation of VeramoJsonStore that uses browser localStorage to store data. |
DataStoreJson | (BETA) A Veramo agent storage plugin that implements the IDataStore and IDataStoreORM methods using one big JSON object as a backend. Each update operation triggers a callback that can be used to either save the latest state of the agent data or compute a diff and log only the changes. This plugin must be initialized with a VeramoJsonStore, which serves as the JSON object storing data in memory as well as providing an update notification callback to persist this data. The JSON object can be pre-populated with data from previous sessions. This API may change without a BREAKING CHANGE notice. |
DIDStoreJson | (BETA) An implementation of AbstractDIDStore that uses a JSON object 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. This class must be initialized with a VeramoJsonStore, which serves as the JSON object storing data in memory as well as providing an update notification callback to persist this data. For correct usage, this MUST use the same VeramoJsonStore instance as the one used by KeyManager. This API may change without a BREAKING CHANGE notice. |
KeyStoreJson | (BETA) An implementation of AbstractKeyStore that uses a JSON object 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. This class must be initialized with a VeramoJsonStore, which serves as the JSON object storing data in memory as well as providing an update notification callback to persist this data. For correct usage, this MUST use the same VeramoJsonStore instance as the one used by DIDManager. This API may change without a BREAKING CHANGE notice. |
PrivateKeyStoreJson | (BETA) An implementation of AbstractPrivateKeyStore that uses a JSON object to store the private key material needed by KeyManagementSystem. This class must be initialized with a VeramoJsonStore, which serves as the JSON object storing data in memory as well as providing an update notification callback to persist this data. The JSON object does not have to be shared with other users of VeramoJsonStore, but it can be. If an AbstractSecretBox is used, then key material is encrypted, even in memory. This API may change without a BREAKING CHANGE notice. |
Interfaces
Interface | Description |
---|---|
ClaimTableEntry | (BETA) This is used internally by DataStoreJson to represent the claims contained in a Verifiable Credential in a way that facilitates querying using the IDataStoreORM interface. This API may change in future versions without a BREAKING CHANGE notice. |
CredentialTableEntry | (BETA) This is used internally by DataStoreJson to represent a Verifiable Credential in a way that facilitates querying using the IDataStoreORM interface. This API may change in future versions without a BREAKING CHANGE notice. |
PresentationTableEntry | (BETA) This is used internally by DataStoreJson to represent a Verifiable Presentation in a way that facilitates querying using the IDataStoreORM interface. This API may change in future versions without a BREAKING CHANGE notice. |
VeramoJsonCache | (BETA) A JSON data layout for data-store-json implementations. This API may change in future versions without a BREAKING CHANGE notice. |
VeramoJsonStore | (BETA) An extension to VeramoJsonCache that bundles an update notification callback that allows implementors to persist the VeramoJsonCache and any other data it may contain to another storage medium. This API may change in future versions without a BREAKING CHANGE notice. |
Type Aliases
Type Alias | Description |
---|---|
DiffCallback | (BETA) A callback method that is called when the data stored in a VeramoJsonCache is updated. |