Metakit / @doeixd/metakit/artifact

transitionHashes

function · packages/metakit/src/transitionHash.ts:168

function transitionHashes(
  transition: TransitionDefinition,
): Effect.Effect<DefinitionHashes<'transition'>, Unhashable | EncodeError>

A transition's executable and contract hashes. The executable hash (metakit/transition@4) covers its guard, writes and emits, and the interface of each path they read and the hash of each derived operation they call; a bundle's fingerprint is this hash. The contract hash (metakit/transition-contract@1) covers the executable hash, ensures, and the interfaces of the state, input and supplied Schemas a proof assumes.

Fails with Unhashable where either holds what has no hash (an Opaque node, a Schema check with no identity, …), and with the encoder's other errors.