pub struct APIStaking {
pub stakes: BTreeMap<Identity, u128>,
pub delegations: BTreeMap<ValidatorPublicKey, Vec<Identity>>,
pub rewarded: BTreeMap<ValidatorPublicKey, Vec<BlockHeight>>,
pub bonded: Vec<ValidatorPublicKey>,
pub total_bond: u128,
pub fees: APIFees,
}Expand description
Copy from Staking contract
Fields§
§stakes: BTreeMap<Identity, u128>§delegations: BTreeMap<ValidatorPublicKey, Vec<Identity>>§rewarded: BTreeMap<ValidatorPublicKey, Vec<BlockHeight>>When a validator distribute rewards, it is added in this list to avoid distributing twice the rewards for a same block
bonded: Vec<ValidatorPublicKey>List of validators that are part of consensus
total_bond: u128§fees: APIFeesStruct to handle fees
Trait Implementations§
Source§impl Clone for APIStaking
impl Clone for APIStaking
Source§impl ComposeSchema for APIStaking
impl ComposeSchema for APIStaking
Source§impl Debug for APIStaking
impl Debug for APIStaking
Source§impl Default for APIStaking
impl Default for APIStaking
Source§impl<'de> Deserialize<'de> for APIStaking
impl<'de> Deserialize<'de> for APIStaking
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for APIStaking
Source§impl PartialEq for APIStaking
impl PartialEq for APIStaking
Source§impl Serialize for APIStaking
impl Serialize for APIStaking
impl StructuralPartialEq for APIStaking
Auto Trait Implementations§
impl Freeze for APIStaking
impl RefUnwindSafe for APIStaking
impl Send for APIStaking
impl Sync for APIStaking
impl Unpin for APIStaking
impl UnsafeUnpin for APIStaking
impl UnwindSafe for APIStaking
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.