Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bool

Hierarchy

  • Bool

Index

Constructors

constructor

Properties

Static Unsafe

Unsafe: { ofField: any }

Type declaration

  • ofField:function
    • ofField(x: string | number | boolean | Field): Bool
    • Converts a Field into a Bool. This is a dangerous operation as it assumes that the field element is either 1 or 0 (which might not be true).

      Parameters

      Returns Bool

Methods

and

assertEquals

  • assertEquals(y: boolean | Bool): void

equals

not

or

sizeInFields

  • sizeInFields(): number

toBoolean

  • toBoolean(): boolean
  • This converts the Bool to a javascript [[boolean]]. This can only be called on non-witness values.

    Returns boolean

toField

toFields

toJSON

  • Serialize the Bool to a JSON string. This operation does NOT affect the circuit and can't be used to prove anything about the string representation of the Field.

    Returns JSONValue

toString

  • toString(): string
  • Serialize the Bool to a string, e.g. for printing. This operation does NOT affect the circuit and can't be used to prove anything about the string representation of the Field.

    Returns string

Static and

Static assertEqual

  • assertEqual(x: boolean | Bool, y: boolean | Bool): void

Static count

Static equal

Static fromJSON

Static not

Static ofFields

Static or

Static sizeInFields

  • sizeInFields(): number

Static toField

Static toFields

Static toJSON

Generated using TypeDoc