pub struct StakeAccount {Show 14 fields
pub owner: Pubkey,
pub pool: Pubkey,
pub amount: u64,
pub stake_time: i64,
pub unlock_time: i64,
pub last_reward_time: i64,
pub pending_rewards: u64,
pub total_rewards_claimed: u64,
pub entropy_score: u64,
pub coherence: u64,
pub pool_id: u32,
pub last_entropy_update: i64,
pub unlock_probability: u64,
pub coherence_bonus: u64,
}Expand description
Individual stake account tracking one user’s stake in a pool. Each staker has one account per pool they’re participating in.
Fields§
§owner: PubkeyUser/owner of this stake
pool: PubkeyPool this stake belongs to
amount: u64Amount of tokens staked
stake_time: i64Timestamp when the stake was created
unlock_time: i64Timestamp when the stake can be withdrawn (after lock_duration)
last_reward_time: i64Last timestamp when rewards were calculated
pending_rewards: u64Rewards accumulated but not yet claimed
total_rewards_claimed: u64Total rewards claimed from this stake
entropy_score: u64Stake’s contribution to network entropy (1e6 scale)
coherence: u64Device’s ability to preserve quantum coherence (1e6 scale, 0-1000000)
pool_id: u32ID of the entanglement pool this stake belongs to (0 = not entangled)
last_entropy_update: i64Last timestamp when entropy metrics were calculated
unlock_probability: u64Probability of early unlock based on entropy (1e6 scale, 0-1000000)
coherence_bonus: u64Bonus multiplier from coherence contribution (1e6 scale)
Trait Implementations§
Source§impl AccountDeserialize for StakeAccount
impl AccountDeserialize for StakeAccount
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Source§impl AccountSerialize for StakeAccount
impl AccountSerialize for StakeAccount
Source§impl BorshDeserialize for StakeAccountwhere
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
u32: BorshDeserialize,
impl BorshDeserialize for StakeAccountwhere
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
u32: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for StakeAccount
impl BorshSerialize for StakeAccount
Source§impl Clone for StakeAccount
impl Clone for StakeAccount
Source§fn clone(&self) -> StakeAccount
fn clone(&self) -> StakeAccount
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Discriminator for StakeAccount
impl Discriminator for StakeAccount
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl Space for StakeAccount
impl Space for StakeAccount
const INIT_SPACE: usize
Auto Trait Implementations§
impl Freeze for StakeAccount
impl RefUnwindSafe for StakeAccount
impl Send for StakeAccount
impl Sync for StakeAccount
impl Unpin for StakeAccount
impl UnsafeUnpin for StakeAccount
impl UnwindSafe for StakeAccount
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more