Metakit / @doeixd/metakit/artifact

machineHashes

function · packages/metakit/src/definitionHash.ts:238

function machineHashes(
  machine: MachineDefinition,
): Effect.Effect<DefinitionHashes<'machine'>, Failure>

A machine's executable and contract hashes. The executable hash (metakit/machine@1) is each message tag with its transition's executable hash, sorted by tag: a message's tag is part of what it means, as a field's name is. The contract hash (metakit/machine-contract@1) covers the executable hash, each tag with its transition's contract hash, the interface of the state Schema (its invariant) and the start, as its JSON encoding (null where there is none).