pub struct MiningAccount {
pub address: String,
pub security_level: SecurityLevel,
pub total_earned: u128,
pub pending_rewards: u128,
pub claimed_rewards: u128,
pub teleported_rewards: HashMap<TeleportDestination, u128>,
pub active_transfers: Vec<String>,
pub registered_at: u64,
}Expand description
Mining account state
Fields§
§address: StringQuantum-safe wallet address
security_level: SecurityLevelSecurity level used
total_earned: u128Total rewards earned (in wei)
pending_rewards: u128Pending rewards to claim
claimed_rewards: u128Rewards already claimed
teleported_rewards: HashMap<TeleportDestination, u128>Rewards teleported to EVM by chain
active_transfers: Vec<String>Active teleport transfers
registered_at: u64Registration timestamp
Implementations§
Source§impl MiningAccount
impl MiningAccount
pub fn new(address: String, security_level: SecurityLevel) -> Self
Sourcepub fn available_balance(&self) -> u128
pub fn available_balance(&self) -> u128
Available balance (claimed but not teleported)
Trait Implementations§
Source§impl Clone for MiningAccount
impl Clone for MiningAccount
Source§fn clone(&self) -> MiningAccount
fn clone(&self) -> MiningAccount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MiningAccount
impl Debug for MiningAccount
Source§impl<'de> Deserialize<'de> for MiningAccount
impl<'de> Deserialize<'de> for MiningAccount
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
Auto Trait Implementations§
impl Freeze for MiningAccount
impl RefUnwindSafe for MiningAccount
impl Send for MiningAccount
impl Sync for MiningAccount
impl Unpin for MiningAccount
impl UnsafeUnpin for MiningAccount
impl UnwindSafe for MiningAccount
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