StakeProgram
Factory class for transactions to interact with the Stake program
Static Member Summary
Static Public Members | ||
public static get |
Public key that identifies the Stake program |
|
public static get |
Max space of a Stake account |
Static Method Summary
Static Public Methods | ||
public static |
authorize(stakeAccount: PublicKey, authorizedPubkey: PublicKey, newAuthorized: PublicKey, stakeAuthorizationType: StakeAuthorizationType): Transaction Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account. |
|
public static |
createAccount(from: PublicKey, stakeAccount: PublicKey, authorized: Authorized, lockup: Lockup, lamports: number): Transaction Generate a Transaction that creates a new Stake account |
|
public static |
createAccountWithSeed(from: PublicKey, stakeAccount: PublicKey, base: PublicKey, seed: string, authorized: Authorized, lockup: Lockup, lamports: number): Transaction Generate a Transaction that creates a new Stake account at
an address generated with |
|
public static |
deactivate(stakeAccount: PublicKey, authorizedPubkey: PublicKey): Transaction Generate a Transaction that deactivates Stake tokens. |
|
public static |
delegate(stakeAccount: PublicKey, authorizedPubkey: PublicKey, votePubkey: PublicKey): Transaction Generate a Transaction that delegates Stake tokens to a validator Vote PublicKey. |
|
public static |
initialize(stakeAccount: PublicKey, authorized: Authorized, lockup: Lockup): TransactionInstruction Generate an Initialize instruction to add to a Stake Create transaction |
|
public static |
redeemVoteCredits(stakeAccount: PublicKey, votePubkey: PublicKey): Transaction Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account. |
|
public static |
split(stakeAccount: PublicKey, authorizedPubkey: PublicKey, lamports: number, splitStakePubkey: PublicKey): Transaction Generate a Transaction that splits Stake tokens into another stake account |
|
public static |
withdraw(stakeAccount: PublicKey, withdrawerPubkey: PublicKey, to: PublicKey, lamports: number): Transaction Generate a Transaction that withdraws deactivated Stake tokens. |
Static Public Members
Static Public Methods
public static authorize(stakeAccount: PublicKey, authorizedPubkey: PublicKey, newAuthorized: PublicKey, stakeAuthorizationType: StakeAuthorizationType): Transaction source
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account.
Params:
Name | Type | Attribute | Description |
stakeAccount | PublicKey | ||
authorizedPubkey | PublicKey | ||
newAuthorized | PublicKey | ||
stakeAuthorizationType | StakeAuthorizationType |
public static createAccount(from: PublicKey, stakeAccount: PublicKey, authorized: Authorized, lockup: Lockup, lamports: number): Transaction source
Generate a Transaction that creates a new Stake account
Params:
Name | Type | Attribute | Description |
from | PublicKey | ||
stakeAccount | PublicKey | ||
authorized | Authorized | ||
lockup | Lockup | ||
lamports | number |
public static createAccountWithSeed(from: PublicKey, stakeAccount: PublicKey, base: PublicKey, seed: string, authorized: Authorized, lockup: Lockup, lamports: number): Transaction source
Generate a Transaction that creates a new Stake account at
an address generated with from
, a seed, and the Stake programId
public static deactivate(stakeAccount: PublicKey, authorizedPubkey: PublicKey): Transaction source
Generate a Transaction that deactivates Stake tokens.
public static delegate(stakeAccount: PublicKey, authorizedPubkey: PublicKey, votePubkey: PublicKey): Transaction source
Generate a Transaction that delegates Stake tokens to a validator Vote PublicKey. This transaction can also be used to redelegate Stake to a new validator Vote PublicKey.
public static initialize(stakeAccount: PublicKey, authorized: Authorized, lockup: Lockup): TransactionInstruction source
Generate an Initialize instruction to add to a Stake Create transaction
Params:
Name | Type | Attribute | Description |
stakeAccount | PublicKey | ||
authorized | Authorized | ||
lockup | Lockup |
public static redeemVoteCredits(stakeAccount: PublicKey, votePubkey: PublicKey): Transaction source
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account.
public static split(stakeAccount: PublicKey, authorizedPubkey: PublicKey, lamports: number, splitStakePubkey: PublicKey): Transaction source
Generate a Transaction that splits Stake tokens into another stake account