Module persistence

Source
Expand description

Module defines API used by providers of persistent data for RGB contracts.

These data include:

  1. Stash: a consensus-critical data for client-side-validation which must be preserved and backed up.
  2. rgb::ContractState, updated with each enclosed consignment and disclosure.
  3. Index over stash, which simplifies construction of a new consignments.
  4. Inventory, which abstracts stash, contract states and index for complex operations requiring participation of all of them.

2-4 data can be re-computed from the stash in case of loss or corruption.

Re-exports§

pub use hoard::Hoard;
pub use stock::Stock;

Modules§

hoard
stock

Enums§

ConsignerError
InventoryDataError
InventoryError
InventoryInconsistency
These errors indicate internal business logic error. We report them instead of panicking to make sure that the software doesn’t crash and gracefully handles situation, allowing users to report the problem back to the devs.
StashError
StashInconsistency

Traits§

Inventory
Stash