Skip to content

Commit

Permalink
improve doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivo25 committed Oct 18, 2023
1 parent a24bc2d commit fd91ab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/gadgets/gadgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ const Gadgets = {
*
* This gadget builds a chain of XOR gates recursively. Each XOR gate can verify 16 bit at most. If your input elements exceed 16 bit, another XOR gate will be added to the chain.
*
* The `length` parameter lets you define how many bits should be compared. The output is not constrained to the length.
* The `length` parameter lets you define how many bits should be compared.
*
* **Note:** Specifying a larger `length` parameter adds additional constraints.
*
* **Note:** Both {@link Field} elements need to fit into `2^length - 1`, or the operation will fail.
* For example, for `length = 2` ( 2² = 4), `.xor` will fail for any element that is larger than `> 3`.
* If either input element exceeds the maximum bit length, an error is thrown and no proof can be generated because the method fails to properly constrain the operation.
*
* ```typescript
* let a = Field(5); // ... 000101
Expand Down

0 comments on commit fd91ab1

Please sign in to comment.