pub struct TokenDelegate { /* private fields */ }Expand description
tokenDelegate: staking balance to a validator, or back. A delegation is locked for
delegation_lock_ms before it can be undelegated.
Implementations§
Source§impl TokenDelegate
impl TokenDelegate
Sourcepub fn delegate(
validator: Address,
hype: Dec,
nonce: u64,
) -> Result<TokenDelegate, BadUnits>
pub fn delegate( validator: Address, hype: Dec, nonce: u64, ) -> Result<TokenDelegate, BadUnits>
Delegates hype of the staking balance to validator, signed at nonce, refused rather than
rounded past eight places.
Sourcepub fn undelegate(
validator: Address,
hype: Dec,
nonce: u64,
) -> Result<TokenDelegate, BadUnits>
pub fn undelegate( validator: Address, hype: Dec, nonce: u64, ) -> Result<TokenDelegate, BadUnits>
Undelegates hype from validator back to the staking balance (isUndelegate true), signed at
nonce, refused rather than rounded past eight places.
Trait Implementations§
Source§impl Clone for TokenDelegate
impl Clone for TokenDelegate
impl Copy for TokenDelegate
Source§impl Debug for TokenDelegate
impl Debug for TokenDelegate
impl Eq for TokenDelegate
Source§impl PartialEq for TokenDelegate
impl PartialEq for TokenDelegate
impl StructuralPartialEq for TokenDelegate
Source§impl UserAction for TokenDelegate
validator is an address in the typed data, posted lowercase.
impl UserAction for TokenDelegate
validator is an address in the typed data, posted lowercase.
Source§fn user_signed(&self) -> UserSigned<'_>
fn user_signed(&self) -> UserSigned<'_>
The action’s type, EIP-712 name, fields and nonce.
Source§fn action(&self, network: Network) -> Map
fn action(&self, network: Network) -> Map
UserSigned::action: the action as posted on network.Source§fn typed(&self, network: Network) -> TypedStruct<'_>
fn typed(&self, network: Network) -> TypedStruct<'_>
UserSigned::typed: the struct the key signs.Source§fn wallet_json(&self, network: Network) -> String
fn wallet_json(&self, network: Network) -> String
UserSigned::wallet_json: the typed data for a browser wallet.Auto Trait Implementations§
impl Forget for TokenDelegate
impl Freeze for TokenDelegate
impl Move for TokenDelegate
impl RefUnwindSafe for TokenDelegate
impl Send for TokenDelegate
impl Sync for TokenDelegate
impl Unpin for TokenDelegate
impl UnsafeUnpin for TokenDelegate
impl UnwindSafe for TokenDelegate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.