Class Bool

Hierarchy

  • Bool

Constructors

Properties

Unsafe: { ofField: any }

Type declaration

  • ofField:function
    • 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

  • Proves that this Bool is equal to y.

    Parameters

    • y: boolean | Bool

      a Bool.

    • Optional message: string

    Returns void

  • Proves that this Bool is false.

    Parameters

    • Optional message: string

    Returns void

  • Proves that this Bool is true.

    Parameters

    • Optional message: string

    Returns void

  • Returns the size of this type.

    Returns number

  • This converts the Bool to a javascript boolean. This can only be called on non-witness values.

    Returns boolean

  • 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 boolean

  • 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

  • Asserts if both Bool are equal.

    Parameters

    Returns void

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

    Parameters

    • x: boolean

    Returns Bool

  • Parameters

    • bytes: number[]
    • offset: number

    Returns [value: Bool, offset: number]

  • Returns the size of this type.

    Returns number

  • Static method to serialize a Bool into its auxiliary data.

    Parameters

    Returns []

  • Serialize a 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.

    Parameters

    Returns boolean

Generated using TypeDoc