Zerobook.Block (zerobook v0.1.0)

Copy Markdown

A block in a Zerobook.Ledger chain.

Holds one transaction plus the SHA-256 of its own canonical content (hash) and the prev_hash of the previous block — the two fields that make the chain tamper-evident.

Summary

Types

t()

@type t() :: %Zerobook.Block{
  hash: binary(),
  index: non_neg_integer(),
  prev_hash: binary(),
  timestamp: DateTime.t(),
  transaction: Zerobook.Transaction.t()
}