Skip to content

Commit

Permalink
doc: add option parameter for verify function
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebulis committed Feb 13, 2020
1 parent b06bd3b commit e7d1fb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install @govtechsg/oa-verify
import { documentRopstenValidWithToken } from "./test/fixtures/v2/documentRopstenValidWithToken";
import { verify, isValid } from "@govtechsg/oa-verify";

verify(documentRopstenValidWithToken).then(console.log); // see below
verify(documentRopstenValidWithToken, { network: "ropsten" }).then(console.log); // see below
console.log(isValid(results)); // display true
```

Expand Down Expand Up @@ -123,7 +123,7 @@ The function allow to specify as a second parameters the list of types on which
import { documentRopstenValidWithCertificateStore } from "./test/fixtures/v2/documentRopstenValidWithCertificateStore";
import { verify, isValid } from "@govtechsg/oa-verify";

const fragments = verify(documentRopstenValidWithCertificateStore);
const fragments = verify(documentRopstenValidWithCertificateStore, { network: "ropsten" });
isValid(fragments); // display false because ISSUER_IDENTITY is INVALID
isValid(fragments, ["DOCUMENT_INTEGRITY", "DOCUMENT_STATUS"]); // display true because those types are VALID
```
Expand Down

0 comments on commit e7d1fb8

Please sign in to comment.