Skip to main content

@midnight-ntwrk/compact-runtime v0.7.0Readme | API


@midnight-ntwrk/compact-runtime v0.7.0 / transientCommit

Function: transientCommit()

transientCommit<a>(
rt_type,
value,
opening): bigint

The Compact builtin transient_commit function

This function is a circuit-efficient commitment function from arbitrary values representable in Compact, and a field element commitment opening, to field elements, which is not guaranteed to persist between upgrades. It should not be used to derive state data, but can be used for consistency checks.

Type parameters

a

Parameters

rt_type: CompactType<a>

value: a

opening: bigint

Returns

bigint

Throws

If opening is out of range for field elements