Skip to main content

AccountInterfaceExt

Trait AccountInterfaceExt 

Source
pub trait AccountInterfaceExt {
    // Required methods
    fn from_code(
        account_id: AccountId,
        auth: Vec<AuthScheme>,
        code: &AccountCode,
    ) -> Self;
    fn from_account(account: &Account) -> Self;
    fn is_compatible_with(&self, note: &Note) -> NoteAccountCompatibility;
    fn get_procedure_digests(&self) -> BTreeSet<Word>;
}
Expand description

An extension for AccountInterface that allows instantiation from higher-level types.

Required Methods§

Source

fn from_code( account_id: AccountId, auth: Vec<AuthScheme>, code: &AccountCode, ) -> Self

Creates a new AccountInterface instance from the provided account ID, authentication schemes and account code.

Source

fn from_account(account: &Account) -> Self

Creates a new AccountInterface instance from the provided Account.

Source

fn is_compatible_with(&self, note: &Note) -> NoteAccountCompatibility

Returns NoteAccountCompatibility::Maybe if the provided note is compatible with the current AccountInterface, and NoteAccountCompatibility::No otherwise.

Source

fn get_procedure_digests(&self) -> BTreeSet<Word>

Returns the set of digests of all procedures from all account component interfaces.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§