Skip to main content
Version: 2.4.0

memoizeWitness

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

Defined in: index.ts:161

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