Skip to main content

Bool

const Bool: typeof Bool & (...args: [boolean | FieldVar | Bool]) => Bool;

A boolean value. You can create it like this:

Example

const b = Bool(true);

You can also combine multiple Bools with boolean operations:

Example

const c = Bool(false);

const d = b.or(c).and(false).not();

d.assertTrue();

Bools are often created by methods on other types such as Field.equals():

const b: Bool = Field(5).equals(6);

Source

lib/provable/wrapped.ts:70