[][src]Trait solana_stake_program::stake_state::StakeAccount

pub trait StakeAccount {
    fn initialize(
        &mut self,
        authorized: &Authorized,
        lockup: &Lockup,
        rent: &Rent
    ) -> Result<(), InstructionError>;
fn authorize(
        &mut self,
        authority: &Pubkey,
        stake_authorize: StakeAuthorize,
        signers: &HashSet<Pubkey>
    ) -> Result<(), InstructionError>;
fn delegate_stake(
        &mut self,
        vote_account: &KeyedAccount,
        clock: &Clock,
        config: &Config,
        signers: &HashSet<Pubkey>
    ) -> Result<(), InstructionError>;
fn deactivate_stake(
        &mut self,
        clock: &Clock,
        signers: &HashSet<Pubkey>
    ) -> Result<(), InstructionError>;
fn redeem_vote_credits(
        &mut self,
        vote_account: &mut KeyedAccount,
        rewards_account: &mut KeyedAccount,
        rewards: &Rewards,
        stake_history: &StakeHistory
    ) -> Result<(), InstructionError>;
fn split(
        &mut self,
        lamports: u64,
        split_stake: &mut KeyedAccount,
        signers: &HashSet<Pubkey>
    ) -> Result<(), InstructionError>;
fn withdraw(
        &mut self,
        lamports: u64,
        to: &mut KeyedAccount,
        clock: &Clock,
        stake_history: &StakeHistory,
        signers: &HashSet<Pubkey>
    ) -> Result<(), InstructionError>; }

Required methods

fn initialize(
    &mut self,
    authorized: &Authorized,
    lockup: &Lockup,
    rent: &Rent
) -> Result<(), InstructionError>

fn authorize(
    &mut self,
    authority: &Pubkey,
    stake_authorize: StakeAuthorize,
    signers: &HashSet<Pubkey>
) -> Result<(), InstructionError>

fn delegate_stake(
    &mut self,
    vote_account: &KeyedAccount,
    clock: &Clock,
    config: &Config,
    signers: &HashSet<Pubkey>
) -> Result<(), InstructionError>

fn deactivate_stake(
    &mut self,
    clock: &Clock,
    signers: &HashSet<Pubkey>
) -> Result<(), InstructionError>

fn redeem_vote_credits(
    &mut self,
    vote_account: &mut KeyedAccount,
    rewards_account: &mut KeyedAccount,
    rewards: &Rewards,
    stake_history: &StakeHistory
) -> Result<(), InstructionError>

fn split(
    &mut self,
    lamports: u64,
    split_stake: &mut KeyedAccount,
    signers: &HashSet<Pubkey>
) -> Result<(), InstructionError>

fn withdraw(
    &mut self,
    lamports: u64,
    to: &mut KeyedAccount,
    clock: &Clock,
    stake_history: &StakeHistory,
    signers: &HashSet<Pubkey>
) -> Result<(), InstructionError>

Loading content...

Implementations on Foreign Types

impl<'a> StakeAccount for KeyedAccount<'a>[src]

fn authorize(
    &mut self,
    authority: &Pubkey,
    stake_authorize: StakeAuthorize,
    signers: &HashSet<Pubkey>
) -> Result<(), InstructionError>
[src]

Authorize the given pubkey to manage stake (deactivate, withdraw). This may be called multiple times, but will implicitly withdraw authorization from the previously authorized staker. The default staker is the owner of the stake account's pubkey.

Loading content...

Implementors

Loading content...