Skip to main content

Module types

Module types 

Source
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§

CommitInfo
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.
DigestInfo
Stores balance information for each variant of a digest.
Entries
Represents a collection of entries within an index.
EntryInfo
Represents a single entry within an index.
IndexInfo
Represents an index containing multiple entries.
IndexOfReason
A composite structure combining a commit reason with an index.
PoolInfo
Represents a managed pool derived from an index.
PoolOfReason
A composite structure combining a commit reason with a pool.
SlotInfo
Represents a slot within a pool, derived from an index entry.
Slots
Represents a collection of slots within a pool.

Enums§

ChooseDigest
Choose a valid digest model for ChooseDigest::digest_model safe construction.
DigestVariant
Represents a generic digest variant in the commitment system.
PrecisionWrapper
Wrapper type for Precision used in extrinsics.

Type Aliases§

AssetOf
The fungible balance type for assets handled by the pallet.
BalanceContext
Alias to the pallet-defined balance execution context.
BalanceModelContext
Concrete plugin-model/family context derived from BalanceContext.
CommitInstance
Represents a single commit instance created by a commit operation.
CommitReason
Combined identifier representing the reason for freezing or locking a balance.
Digest
The primary digest type used to uniquely identify a commitment entity.
DigestSource
Represents the source for generating a digest, typically the runtime-caller’s AccountId that seeds it.
DirectDigest
Represents the unique identifier for a direct digest.
EntryDigest
Represents the unique identifier for an entry within an index.
IndexDigest
Represents the unique identifier for an index.
LazyBalanceOf
Represents a lazy-evaluated balance for commitments.
LazyVirtual
A generic virtual structure. It acts as the core building block for all lazy balance-related virtual types.
PoolDigest
Represents the unique identifier for a pool.
Proprietor
Represents the owner of an asset or commitment.
SlotDigest
Represents the unique identifier for a slot within a pool.
VirtualBalance
Virtual representation of a live lazy-balance.
VirtualReceipt
Virtual representation of a receipt (claim).
VirtualSnapShot
Virtual representation of a balance snapshot.