Skip to content

Commit

Permalink
bytes -> bits
Browse files Browse the repository at this point in the history
  • Loading branch information
45930 committed Jan 28, 2025
1 parent f8fe27d commit afb26c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/provable/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,11 @@ class Field {
*
* The method throws if the given bits do not fit in a single Field element. In this case, no more than 254 bits are allowed because some 255 bit integers do not fit into a single Field element.
*
* **Important**: If the given `bytes` array is an array of `booleans` or {@link Bool} elements that all are `constant`, the resulting {@link Field} element will be a constant as well. Or else, if the given array is a mixture of constants and variables of {@link Bool} type, the resulting {@link Field} will be a variable as well.
* **Important**: If the given `bits` array is an array of `booleans` or {@link Bool} elements that all are `constant`, the resulting {@link Field} element will be a constant as well. Or else, if the given array is a mixture of constants and variables of {@link Bool} type, the resulting {@link Field} will be a variable as well.
*
* @param bits - An array of {@link Bool} or `boolean` type.
*
* @return A {@link Field} element matching the [little endian binary representation](https://en.wikipedia.org/wiki/Endianness) of the given `bytes` array.
* @return A {@link Field} element matching the [little endian binary representation](https://en.wikipedia.org/wiki/Endianness) of the given `bits` array.
*/
static fromBits(bits: (Bool | boolean)[]) {
const length = bits.length;
Expand Down

0 comments on commit afb26c7

Please sign in to comment.