Circuit Types
Circuit Data Types
class CircuitValue {
// returns the value as a bigint
value(): bigint;
// returns the value as a number
number(): number;
// returns the value as an address string
address(): string;
// converts the CircuitValue to a CircuitValue256 inside the circuit
toCircuitValue256(): CircuitValue256;
}class CircuitValue256 {
// returns the value as a bigint
value(): bigint;
// returns the value as a hex string
hex(): string;
// returns the `hi` CircuitValue
hi(): CircuitValue
// returns the `lo` CircuitValue
lo(): CircuitValue
// constrains that the CircuitValue256 can fit in 253 bits
// and constrains out = 2**128 * hi + lo
toCircuitValue(): CircuitValue
}Last updated