Expand description
The store LIFECYCLE (SPEC §3): a store is a coin that gets SPENT.
A DIG store is a CHIP-0035 DataLayer singleton. Three operations span its life, each a spend of
that coin, composed directly over dig-merkle (the byte-source-of-truth for every DataLayer
spend, INV-4):
create_store— launch the store coin from a funding parent, anchoring the first root + its size bucket + optional metadata (→dig_merkle::mint_datastore_with_kind).modify_store— spend the tip coin to recreate the store with a NEW root, preserving the rest of the anchored metadata (→dig_merkle::update_root).melt_store— terminally spend the coin, closing the store with no successor (→ [dig_merkle::melt]).
Every operation returns an UNSIGNED MerkleCoinSpend (inherited boundary INV-2/INV-3 from
dig-merkle): dig-store never holds a key, never signs, never broadcasts. The wallet-backend /
node feeds the reported spends to dig_merkle::required_signatures, signs, assembles the
SpendBundle, and submits it. The on-chain encoding is minimal (NC-8) — delegated wholesale to
dig-merkle, which owns the byte layout.
modify_store / melt_store take the already-hydrated tip DataStore (from
crate::get_store_singleton_tip, which does the single chain read) rather than a chain source,
so these builders stay pure transforms of their inputs (INV-1).
Structs§
- Create
Store Params - The parameters that describe a store’s on-chain metadata at creation (SPEC §3.1).
Enums§
- Store
Owner - Who is authorized to spend a store coin — the p2 (“inner”) puzzle that guards it.
Functions§
- create_
store - Launches a new store coin from a funding parent, anchoring the first root (SPEC §3.1).
- melt_
store - Terminally spends (melts) the store’s tip coin, leaving no successor (SPEC §3.3).
- modify_
store - Spends the store’s tip coin to recreate it anchoring
new_root— a new generation (SPEC §3.2).