Skip to main content

memoizeWitness

function memoizeWitness<T>(type: FlexibleProvable<T>, compute: () => T): T

Defined in: lib/provable/provable.ts:527

Like Provable.witness, but memoizes the witness during transaction construction for reuse by the prover. This is needed to witness non-deterministic values.

Type Parameters

T

Parameters

type

FlexibleProvable<T>

compute

() => T

Returns

T