Something went wrong. Try again.
An Elixir implementation of AT Protocol-flavoured Merkle Search Trees (MST)
Something went wrong. Try again.
434 B · 19 lines
Elixir
at main
1234567891011121314151617181920defmodule MST.Diff.Op do @moduledoc """ A single key-level operation produced by `MST.Diff.compute/2`.
- `old_value: nil, new_value: cid` — create - `old_value: cid, new_value: cid` — update - `old_value: cid, new_value: nil` — delete """
use TypedStruct
alias DASL.CID
typedstruct enforce: true do field :key, binary() field :old_value, CID.t() | nil field :new_value, CID.t() | nil endend