Skip to content

Commit

Permalink
Add documentation for verify and verifyMultiProof
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Jan 12, 2023
1 parent 1139791 commit 61f1d67
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,23 @@ Also accepts values instead of indices, but this will be less efficient. It will
const proof = tree.getProof([[alice, '100'], [bob, '200']]);
```

### `tree.verify`

```typescript
tree.verify(i, proof);
tree.verify([alice, '100'], proof);
```

Returns a boolean that is `true` when the proof verifies that the value is contained in the tree.

### `tree.verifyMultiProof`

```typescript
tree.verifyMultiProof({ proof, proofFlags, leaves });
```

Returns a boolean that is `true` when the multi-proof verifies that the values are contained in the tree.

### `tree.entries`

```typescript
Expand Down

0 comments on commit 61f1d67

Please sign in to comment.