Skip to content

Reference

tilttek/secret-rolls
TypeRole
SecretRollsRolls out of sight, reveals, closes a scene, gives the journal and the sealed rolls
HiddenRollA sealed roll: its opening, who rolled it and when; written and read back as plain values
RollOpeningEverything a roll is: identifier, scene, position, expression, rounding, seed, result and context
RollCommitmentThe SHA-256 of an opening, compared in constant time
RollVerifierChecks an opening against its commitment and rolls it again from its seed
Journal\SceneJournalThe public journal of a scene: its state, its withheld rolls, its check and its JSON export
Journal\JournalEntryOne entry of the journal, chained to the one before by its hash
Journal\EntryKindCommitted, Revealed or Closed
Contract\SecretRollStoreWhere the journals and the sealed rolls are kept
Contract\JournalPublisherTold of each entry appended
Store\InMemorySecretRollStoreThe store in memory, for tests and scripts
Store\NoPublisherThe publisher that pushes nothing
Exception\SecretRollsExceptionThe interface of every exception of the library
Exception\InvalidSecretRollA value or a document the library refuses
Exception\SecretRollRefusedA step the journal of a scene does not allow
Exception\JournalConflictTwo writers appended to a journal at once

Encoding and Instant are internal: the checks, the canonical JSON and the one way the library writes a time.