Skip to content

Commit

Permalink
Docs and typedoc integration
Browse files Browse the repository at this point in the history
Signed-off-by: lovesh <lovesh.bond@gmail.com>
  • Loading branch information
lovesh committed Nov 18, 2024
1 parent c32072b commit b60a05d
Show file tree
Hide file tree
Showing 34 changed files with 1,728 additions and 91 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and deploy API docs

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1

- name: Build docs
run: yarn typedoc

- name: Deploy docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./__typedoc__
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
.lvimrc
/dist
/lib
/__typedoc__
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ the [WASM wrapper](https://github.com/docknetwork/crypto-wasm).
- [Social KYC](#social-kyc)
- [Verifiable encryption using SAVER](#verifiable-encryption-using-saver)
- [Encoding for verifiable encryption](#encoding-for-verifiable-encryption)
- [Bound check using LegoGroth16](#bound-check-using-legogroth16)
- [Bound check (range proof)](#bound-check-range-proof)
- [Encoding for negative or decimal numbers](#encoding-for-negative-or-decimal-numbers)
- [Optimization](#optimization)
- [Working with messages as JS objects](#working-with-messages-as-js-objects)
Expand Down Expand Up @@ -1312,3 +1312,5 @@ The Circom programs and corresponding R1CS and WASM files for the tests are [her
### Anonymous credentials

The composite proof system is used to implement anonymous credentials. See [here](src/anonymous-credentials/) for details.

[Slides](https://www.slideshare.net/SSIMeetup/anonymous-credentials-with-range-proofs-verifiable-encryption-zksnarks-circom-support-and-blinded-issuance-lovesh-harchandani) and [video](https://www.youtube.com/watch?v=e_E_6Fx5dro) for a presentation given at SSI meetup. Mostl of the presentation goes over the code, mostly anonymous credentials from this library.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"test-bbs+": "TEST_SIGNATURE_SCHEME=BBS+ yarn jest",
"test-ps": "TEST_SIGNATURE_SCHEME=PS yarn jest",
"test-bbdt16": "TEST_SIGNATURE_SCHEME=BBDT16 yarn jest",
"test-all": "TEST_SIGNATURE_SCHEME=BBS yarn jest; TEST_SIGNATURE_SCHEME=BBS+ yarn jest; TEST_SIGNATURE_SCHEME=PS yarn jest; TEST_SIGNATURE_SCHEME=BBDT16 yarn jest"
"test-all": "TEST_SIGNATURE_SCHEME=BBS yarn jest; TEST_SIGNATURE_SCHEME=BBS+ yarn jest; TEST_SIGNATURE_SCHEME=PS yarn jest; TEST_SIGNATURE_SCHEME=BBDT16 yarn jest",
"typedoc": "typedoc src --plugin typedoc-github-theme --out __typedoc__"
},
"license": "Apache-2.0",
"private": false,
Expand All @@ -40,7 +41,8 @@
"json-stringify-deterministic": "^1.0.11",
"lodash": "^4.17.21",
"lzutf8": "0.6.3",
"semver": "^7.6.0"
"semver": "^7.6.0",
"typedoc-github-theme": "^0.1.2"
},
"devDependencies": {
"@types/jest": "^29.1.0",
Expand All @@ -61,6 +63,7 @@
"r1csfile": "^0.0.41",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typedoc": "^0.26.11",
"typescript": "5.3.3"
}
}
6 changes: 3 additions & 3 deletions src/accumulator/kb-universal-accumulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import {

/**
* KB universal accumulator. Its composed of 2 accumulators, one for accumulating elements that are "members" and one
* for "non-members". But this detail is largely abstracted away from. All possible "members" and "non-members" of this
* accumulator are called its domain and during initialization, the domain needs to be decided passed. The domain can be
* extended at any point.
* for "non-members". But this detail is largely abstracted away. All possible "members" and "non-members" of this
* accumulator are called its domain and during initialization, the domain needs to be known/passed. The domain can be
* extended at any point and any number of times.
*/
export class KBUniversalAccumulator extends Accumulator<KBUniversalAccumulatorValue> {
// @ts-ignore
Expand Down
Loading

0 comments on commit b60a05d

Please sign in to comment.