[−][src]Struct casperlabs_engine_shared::account::Account
Implementations
impl Account[src]
pub fn new(
public_key: PublicKey,
named_keys: BTreeMap<String, Key>,
main_purse: URef,
associated_keys: AssociatedKeys,
action_thresholds: ActionThresholds
) -> Self[src]
public_key: PublicKey,
named_keys: BTreeMap<String, Key>,
main_purse: URef,
associated_keys: AssociatedKeys,
action_thresholds: ActionThresholds
) -> Self
pub fn create(
account: PublicKey,
named_keys: BTreeMap<String, Key>,
main_purse: URef
) -> Self[src]
account: PublicKey,
named_keys: BTreeMap<String, Key>,
main_purse: URef
) -> Self
pub fn named_keys_append(&mut self, keys: &mut BTreeMap<String, Key>)[src]
pub fn named_keys(&self) -> &BTreeMap<String, Key>[src]
pub fn named_keys_mut(&mut self) -> &mut BTreeMap<String, Key>[src]
pub fn public_key(&self) -> PublicKey[src]
pub fn main_purse(&self) -> URef[src]
pub fn main_purse_add_only(&self) -> URef[src]
Returns an AccessRights::ADD-only version of the URef.
pub fn get_associated_keys(&self) -> impl Iterator<Item = (&PublicKey, &Weight)>[src]
pub fn action_thresholds(&self) -> &ActionThresholds[src]
pub fn add_associated_key(
&mut self,
public_key: PublicKey,
weight: Weight
) -> Result<(), AddKeyFailure>[src]
&mut self,
public_key: PublicKey,
weight: Weight
) -> Result<(), AddKeyFailure>
pub fn remove_associated_key(
&mut self,
public_key: PublicKey
) -> Result<(), RemoveKeyFailure>[src]
&mut self,
public_key: PublicKey
) -> Result<(), RemoveKeyFailure>
pub fn update_associated_key(
&mut self,
public_key: PublicKey,
weight: Weight
) -> Result<(), UpdateKeyFailure>[src]
&mut self,
public_key: PublicKey,
weight: Weight
) -> Result<(), UpdateKeyFailure>
pub fn get_associated_key_weight(
&self,
public_key: PublicKey
) -> Option<&Weight>[src]
&self,
public_key: PublicKey
) -> Option<&Weight>
pub fn set_action_threshold(
&mut self,
action_type: ActionType,
weight: Weight
) -> Result<(), SetThresholdFailure>[src]
&mut self,
action_type: ActionType,
weight: Weight
) -> Result<(), SetThresholdFailure>
pub fn can_set_threshold(
&self,
new_threshold: Weight
) -> Result<(), SetThresholdFailure>[src]
&self,
new_threshold: Weight
) -> Result<(), SetThresholdFailure>
Verifies if user can set action threshold
pub fn can_authorize(&self, authorization_keys: &BTreeSet<PublicKey>) -> bool[src]
Checks whether all authorization keys are associated with this account
pub fn can_deploy_with(&self, authorization_keys: &BTreeSet<PublicKey>) -> bool[src]
Checks whether the sum of the weights of all authorization keys is greater or equal to deploy threshold.
pub fn can_manage_keys_with(
&self,
authorization_keys: &BTreeSet<PublicKey>
) -> bool[src]
&self,
authorization_keys: &BTreeSet<PublicKey>
) -> bool
Checks whether the sum of the weights of all authorization keys is greater or equal to key management threshold.
Trait Implementations
impl Clone for Account[src]
impl Debug for Account[src]
impl Eq for Account[src]
impl FromBytes for Account[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>[src]
impl PartialEq<Account> for Account[src]
impl StructuralEq for Account[src]
impl StructuralPartialEq for Account[src]
impl ToBytes for Account[src]
fn to_bytes(&self) -> Result<Vec<u8>, Error>[src]
fn serialized_length(&self) -> usize[src]
fn into_bytes(self) -> Result<Vec<u8>, Error>[src]
impl TryFrom<StoredValue> for Account[src]
type Error = TypeMismatch
The type returned in the event of a conversion error.
fn try_from(stored_value: StoredValue) -> Result<Self, Self::Error>[src]
Auto Trait Implementations
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> FromBits<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,