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
CommitBalance- balance management and reconciliation.CommitDeposit- low-level deposit operations.CommitWithdraw- low-level withdrawal operations.CommitOps- placing, raising, and resolving commitments.CommitInspect- inspection and auditing of committed values.PoolOps- operations for pooled commitments.IndexOps- operations for indexed digest commitments.
§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§
- Commit
Balance - Provides low-level balance management and reconciliation behavior
for
Commitmentsystems. - Commit
Deposit - Provides low-level deposit operations for commitment systems, enabling assets to be recorded against digests, indexes, and pools for a given proprietor.
- Commit
Inspect - Provides inspection and querying capabilities for committed values across digests, indexes, and pools for a given proprietor.
- Commit
Ops - Defines the core operations for managing commitments within digest models.
- Commit
Withdraw - Provides low-level withdrawal operations for commitment systems, enabling proprietors to extract committed assets from digests, indexes, and pools for a given reason.
- Index
Ops - Defines operational behavior for managing indexed digests within a commitment system.
- PoolOps
- Defines operational behavior for managing pooled balances within a commitment system.