Trait casper_types::system::auction::RuntimeProvider
source ·
[−]pub trait RuntimeProvider {
fn get_caller(&self) -> AccountHash;
fn is_allowed_session_caller(&self, account_hash: &AccountHash) -> bool;
fn named_keys_get(&self, name: &str) -> Option<Key>;
fn get_keys(&mut self, key_tag: &KeyTag) -> Result<BTreeSet<Key>, Error>;
fn blake2b<T: AsRef<[u8]>>(&self, data: T) -> [u8; 32];
}
Expand description
Provider of runtime host functionality.
Required methods
fn get_caller(&self) -> AccountHash
fn get_caller(&self) -> AccountHash
This method should return the caller of the current context.
fn is_allowed_session_caller(&self, account_hash: &AccountHash) -> bool
fn is_allowed_session_caller(&self, account_hash: &AccountHash) -> bool
Checks if account_hash matches the active session’s account.
fn named_keys_get(&self, name: &str) -> Option<Key>
fn named_keys_get(&self, name: &str) -> Option<Key>
Gets named key under a name
.
Gets keys in a given keyspace