Expand description
Core types and aliases for the Commitment system.
This module defines the primary structures and type aliases used by
pallet_commitment. These types are publicly exposed and used across
the pallet’s APIs for representing Commitment-related data.
Trait implementations provided by this crate’s crate::Pallet can use these types
via trait-bound equality constraints to ensure type alignment with this pallet’s
concrete implementations if necessary.
§Invariants & Access
All structures in this module encapsulate their fields as private to enforce invariants during creation, mutation, and access. As a result, interaction with these types is performed exclusively through inherent methods, which provide both internal mutation capabilities and safe external (read/query) access.
§Example
mod pallet {
use pallet_commitment::types::IndexInfo;
pub trait Config<I: 'static>: frame_system::Config {
type CommitmentAdapter: CommitIndex<Index = IndexInfo<Self, I>>;
}
}Structs§
- Asset
Delta 🔒 - Represents a net change (delta) in assets for a particular operation.
- Commit
Info - Represents a commitment associated with a specific digest and reason.
- Commits
- Represents a collection of individual commit instances of a proprietor for a specific digest (direct/index/pool) and commitment reason.
- Digest
Info - Stores balance information for each variant of a digest.
- Entries
- Represents a collection of entries within an index.
- Entry
Info - Represents a single entry within an index.
- Index
Info - Represents an index containing multiple entries.
- Index
OfReason - A composite structure combining a commit reason with an index.
- Pool
Info - Represents a managed pool derived from an index.
- Pool
OfReason - A composite structure combining a commit reason with a pool.
- Slot
Info - Represents a slot within a pool, derived from an index entry.
- Slots
- Represents a collection of slots within a pool.
Enums§
- Choose
Digest - Choose a valid digest model for
ChooseDigest::digest_modelsafe construction. - Digest
Variant - Represents a generic digest variant in the commitment system.
- Precision
Wrapper - Wrapper type for [
Precision] used in extrinsics.
Type Aliases§
- AssetOf
- The fungible balance type for assets handled by the pallet.
- Balance
Context - Alias to the pallet-defined balance execution context.
- Balance
Model Context - Concrete
plugin-model/family context derived fromBalanceContext. - Commit
Instance - Represents a single commit instance created by a commit operation.
- Commit
Reason - Combined identifier representing the reason for freezing or locking a balance.
- Digest
- The primary digest type used to uniquely identify a commitment entity.
- Digest
Source - Represents the source for generating a digest,
typically the runtime-caller’s
AccountIdthat seeds it. - Direct
Digest - Represents the unique identifier for a direct digest.
- Entry
Digest - Represents the unique identifier for an entry within an index.
- Index
Digest - Represents the unique identifier for an index.
- Lazy
Balance Of - Represents a lazy-evaluated balance for commitments.
- Lazy
Virtual - A generic
virtualstructure. It acts as the core building block for all lazy balance-related virtual types. - Pool
Digest - Represents the unique identifier for a pool.
- Proprietor
- Represents the owner of an asset or commitment.
- Slot
Digest - Represents the unique identifier for a slot within a pool.
- Virtual
Balance - Virtual representation of a live lazy-balance.
- Virtual
Receipt - Virtual representation of a receipt (claim).
- Virtual
Snap Shot - Virtual representation of a balance snapshot.