Skip to main content

Bool

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

Defined in: lib/provable/wrapped.ts:70

A boolean value. You can create it like this:

Examples

const b = Bool(true);

You can also combine multiple Bools with boolean operations:

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);