Module traits

Source
Expand description

Defines helper traits for implementing a concrete Commitment system. All operations are low-level and unchecked - callers must ensure validity, equilibrium, and invariants before invoking these functions.

§Requirements

This module additionally requires the balance primitive LazyBalance provided via the implementing pallet. All balance interactions and accounting are expected to be handled through this abstraction.

§Traits

§Design Principles

  • Explicit imbalance handling for auditability and safety.
  • Composability to build full commitment systems (direct, index, pool).
  • Separation of low-level operations from higher-level safety.
  • Equillibrium in Queriable values maintained.

Traits§

CommitBalance
Provides low-level balance management and reconciliation behavior for Commitment systems.
CommitDeposit
Provides low-level deposit operations for commitment systems, enabling assets to be recorded against digests, indexes, and pools for a given proprietor.
CommitInspect
Provides inspection and querying capabilities for committed values across digests, indexes, and pools for a given proprietor.
CommitOps
Defines the core operations for managing commitments within digest models.
CommitWithdraw
Provides low-level withdrawal operations for commitment systems, enabling proprietors to extract committed assets from digests, indexes, and pools for a given reason.
IndexOps
Defines operational behavior for managing indexed digests within a commitment system.
PoolOps
Defines operational behavior for managing pooled balances within a commitment system.