@bedrock/web-vc-store
Version:
A Javascript library for storing Verifiable Credentials for Bedrock web apps.
64 lines (39 loc) • 1.44 kB
Markdown
> A Javascript library for storing Verifiable Credentials for Bedrock web apps
- [Background](
- [Install](
- [Usage](
- [Contribute](
- [Commercial Support](
- [License](
TBD
See also (related specs):
* [Verifiable Credentials Data Model](https://w3c.github.io/vc-data-model/)
## Install
To install locally (for development):
```
git clone https://github.com/digitalbazaar/bedrock-web-vc-store.git
cd bedrock-web-vc-store
npm install
```
## Usage
```js
import {getRemoteStorage} from 'bedrock-web-data-hub';
import VerifiableCredentialStore from 'bedrock-web-vc-store';
const hub = await getRemoteStorage({accountId: 'test'});
const vcStore = new VerifiableCredentialStore({hub});
vcStore.init(); // create necessary indexes
await vcStore.insert({credential});
```
See [the contribute file](https://github.com/digitalbazaar/bedrock/blob/master/CONTRIBUTING.md)!
PRs accepted.
Small note: If editing the Readme, please conform to the
[](https://github.com/RichardLitt/standard-readme) specification.
Commercial support for this library is available upon request from
Digital Bazaar: support@digitalbazaar.com
[](LICENSE.md) © Digital Bazaar