Skip to content

Commit

Permalink
Add README usage text.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Dec 29, 2023
1 parent fe6753a commit 8c00a98
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# isomorphic-lib-template Changelog
# issuer-registry-client Changelog

## 1.0.0 - TBD

Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Example Isomorphic TS/JS Lib Template _(@digitalcredentials/isomorphic-lib-template)_
# Known Issuer Registry Client _(@digitalcredentials/issuer-registry-client)_

[![Build status](https://img.shields.io/github/workflow/status/digitalcredentials/isomorphic-lib-template/Node.js%20CI)](https://github.com/digitalcredentials/isomorphic-lib-template/actions?query=workflow%3A%22Node.js+CI%22)
[![NPM Version](https://img.shields.io/npm/v/@digitalcredentials/isomorphic-lib-template.svg)](https://npm.im/@digitalcredentials/isomorphic-lib-template)
[![Build status](https://img.shields.io/github/workflow/status/digitalcredentials/issuer-registry-client/Node.js%20CI)](https://github.com/digitalcredentials/issuer-registry-client/actions?query=workflow%3A%22Node.js+CI%22)
[![NPM Version](https://img.shields.io/npm/v/@digitalcredentials/issuer-registry-client.svg)](https://npm.im/@digitalcredentials/issuer-registry-client)

> A Typescript/Javascript isomorphic library template, for use in the browser, Node.js, and React Native.
> Isomorphic client for fetching Known Issuer/Known Verifier registries for Node, browser and React Native.
## Table of Contents

Expand All @@ -24,29 +24,43 @@ TBD

## Install

- Node.js 14+ is recommended.
- Node.js 18+ is recommended.

### NPM

To install via NPM:

```
npm install @digitalcredentials/isomorphic-lib-template
npm install @digitalcredentials/issuer-registry-client
```

### Development

To install locally (for development):

```
git clone https://github.com/digitalcredentials/isomorphic-lib-template.git
cd isomorphic-lib-template
git clone https://github.com/digitalcredentials/issuer-registry-client.git
cd issuer-registry-client
npm install
```

## Usage

TBD
The library exports two main things: a global `registryCollection`, containing
an instance of registry collections, and a loading function.

```js
import { registryCollections, loadRegistryCollections } from '@digitalcredentials/issuer-registry-client'

// registryCollections is empty, when first exported

// Load the registries from the web (typically done at app startup).
await loadRegistryCollections()

// You can now query to see if a given DID is in a registry
isInRegistryCollection('did:example:123')
// false
```

## Contribute

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"alliance"
],
"engines": {
"node": ">=16.0"
"node": ">=18.0"
},
"author": {
"name": "Digital Credentials Consortium",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2022 Digital Credentials Consortium. All rights reserved.
*/

import { RegistryRaw } from '../types/registry';
import { RegistryRaw } from '../types';

export class Registry<Entry> implements RegistryRaw<Entry> {
entries;
Expand Down

0 comments on commit 8c00a98

Please sign in to comment.