Skip to main content

ProvablePure

type ProvablePure<T, TValue>: Omit<Provable<T, TValue>, "fromFields"> & {
"fromFields": (fields: Field[]) => T;
};

ProvablePure<T> is a special kind of Provable interface, where the "auxiliary" (non-provable) data is empty. This means the type consists only of field elements, in that sense it is "pure". Any instance of ProvablePure<T> is also an instance of Provable<T> where the "auxiliary" data is empty.

Examples where ProvablePure<T> is required are types of on-chain state, events and actions.

Type declaration

fromFields()

fromFields: (fields: Field[]) => T;

Parameters

fields: Field[]

Returns

T

Type parameters

T

TValue = any

Source

lib/provable/types/provable-intf.ts:114