Struct snapps_txn_reference_impl::account::Account[][src]

pub struct Account<'a> {
    pub public_key: CompressedPublicKey,
    pub token_id: TokenID,
    pub balance: u64,
    pub nonce: u32,
    pub receipt_chain_hash: Hash,
    pub delegate: CompressedPublicKey,
    pub voting_for: StateHash,
    pub timing: AccountTiming,
    pub permissions: Permissions,
    pub snapp: Option<SnappAccount<'a>>,
}
Expand description

The type of accounts stored in the ledger.

Fields

public_key: CompressedPublicKey

Public key for the account.

token_id: TokenID

ID of the token whose balance is stored in this account.

balance: u64

Balance in tokens in this account.

nonce: u32

Nonce of the account. This is incremented by transactions with signatures to ensure that a signed transaction cannot be replayed more than once.

receipt_chain_hash: Hash

The hash of all previous signed transactions applied to this account.

delegate: CompressedPublicKey

Public key to delegate staking of the balance to.

voting_for: StateHash

The state hash of the Mina chain that this account is voting for.

timing: AccountTiming

Timing of the cliff and vesting for token unlock.

permissions: Permissions

Authorization kinds required for account actions.

snapp: Option<SnappAccount<'a>>

Optional information for use by snapp smart contracts.

Implementations

The ‘empty’ account, used for unused positions in the ledger.

empty() =
Account {
    public_key: CompressedPublicKey::empty(),
    token_id: 1,
    balance: 0,
    nonce: 0,
    receipt_chain_hash: Hash::empty_receipt_chain_hash(),
    delegate: CompressedPublicKey::empty(),
    voting_for: StateHash::invalid_hash(),
    timing: AccountTiming::Untimed,
    permissions: Permissions::default() ,
    snapp: None,
}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.