Skip to content

Commit 969573e

Browse files
committed
Update dependencies and fix doc
Signed-off-by: lovesh <lovesh.bond@gmail.com>
1 parent 34251a6 commit 969573e

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{matrix.os}}
1313
strategy:
1414
matrix:
15-
node-version: [14.x, 16.x, 17.x]
15+
node-version: [14.x, 16.x, 18.x]
1616
os: [ubuntu-latest, macos-latest]
1717
steps:
1818
- uses: actions/checkout@v1

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@docknetwork/crypto-wasm-ts",
3-
"version": "0.15.0",
3+
"version": "0.16.0",
44
"description": "Typescript abstractions over Dock's Rust crypto library's WASM wrapper",
55
"homepage": "https://github.com/docknetwork/crypto-wasm-ts",
66
"main": "lib/crypto-wasm-ts/src/index.js",
@@ -21,7 +21,7 @@
2121
"lib": "lib"
2222
},
2323
"dependencies": {
24-
"@docknetwork/crypto-wasm": "0.10.0"
24+
"@docknetwork/crypto-wasm": "0.11.0"
2525
},
2626
"devDependencies": {
2727
"eslint-config-prettier": "^8.3.0",

src/accumulator/accumulator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export abstract class Accumulator {
7373
this.params = params;
7474
}
7575

76-
setNew(value: any) {
76+
setNew(value: Uint8Array | object) {
7777
this.value = value;
7878
}
7979

src/accumulator/proof.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { VerifyResult } from '@docknetwork/crypto-wasm';
21
import {
32
accumulatorChallengeContributionFromNonMembershipProof,
43
accumulatorInitializeMembershipProof,
@@ -10,7 +9,8 @@ import {
109
accumulatorGenMembershipProof,
1110
accumulatorGenNonMembershipProof,
1211
accumulatorInitializeNonMembershipProof,
13-
accumulatorVerifyMembershipProof
12+
accumulatorVerifyMembershipProof,
13+
VerifyResult
1414
} from '@docknetwork/crypto-wasm';
1515
import { MembershipWitness, NonMembershipWitness } from './accumulatorWitness';
1616
import {

src/bbs-plus/proof.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
*/
44
import { SignatureG1 } from './signature';
55
import { SignatureParamsG1 } from './params';
6-
import { BbsPoKSigProtocol, VerifyResult } from '@docknetwork/crypto-wasm';
76
import {
87
bbsInitializeProofOfKnowledgeOfSignature,
98
bbsGenProofOfKnowledgeOfSignature,
109
bbsChallengeContributionFromProtocol,
1110
bbsChallengeContributionFromProof,
12-
bbsVerifyProofOfKnowledgeOfSignature
11+
bbsVerifyProofOfKnowledgeOfSignature,
12+
BbsPoKSigProtocol,
13+
VerifyResult
1314
} from '@docknetwork/crypto-wasm';
1415
import { BBSPlusPublicKeyG2 } from './keys';
1516
import { BytearrayWrapper } from '../bytearray-wrapper';

src/bbs-plus/signature.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { SignatureParamsG1 } from './params';
2-
import { fieldElementAsBytes, generateFieldElementFromNumber, VerifyResult } from '@docknetwork/crypto-wasm';
32
import {
43
bbsBlindSignG1,
54
bbsEncodeMessageForSigning,
65
bbsSignG1,
76
bbsUnblindSigG1,
87
bbsVerifyG1,
9-
generateRandomFieldElement
8+
generateRandomFieldElement,
9+
fieldElementAsBytes,
10+
generateFieldElementFromNumber,
11+
VerifyResult
1012
} from '@docknetwork/crypto-wasm';
1113
import { BBSPlusPublicKeyG2, BBSPlusSecretKey } from './keys';
12-
import { ensurePositiveIntegerOfSize } from '../util';
1314
import { BytearrayWrapper } from '../bytearray-wrapper';
1415

1516
export abstract class Signature extends BytearrayWrapper {

src/saver/decryptor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ export class SaverDecryptor {
154154

155155
/**
156156
* Decrypt the ciphertext using uncompressed public parameters.
157-
* @param ciphertext - Must be same as the one used during setup to create the parameters.
157+
* @param ciphertext
158158
* @param secretKey
159159
* @param decryptionKey
160160
* @param snarkVk
161-
* @param chunkBitSize
161+
* @param chunkBitSize - Must be same as the one used during setup to create the parameters.
162162
*/
163163
static decryptCiphertext(
164164
ciphertext: SaverCiphertext,
@@ -181,11 +181,11 @@ export class SaverDecryptor {
181181

182182
/**
183183
* Same as `decryptCiphertext` but uses compressed parameters.
184-
* @param ciphertext - Must be same as the one used during setup to create the parameters.
184+
* @param ciphertext
185185
* @param secretKey
186186
* @param decryptionKey
187187
* @param snarkVk
188-
* @param chunkBitSize
188+
* @param chunkBitSize - Must be same as the one used during setup to create the parameters.
189189
*/
190190
static decryptCiphertextUsingCompressedParams(
191191
ciphertext: SaverCiphertext,

0 commit comments

Comments
 (0)