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(stakePubkey: 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, stakePubkey: PublicKey, authorized: Authorized, lockup: Lockup, lamports: number): Transaction Generate a Transaction that creates a new Stake account |
|
public static |
createAccountWithSeed(from: PublicKey, stakePubkey: 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(stakePubkey: PublicKey, authorizedPubkey: PublicKey): Transaction Generate a Transaction that deactivates Stake tokens. |
|
public static |
delegate(stakePubkey: PublicKey, authorizedPubkey: PublicKey, votePubkey: PublicKey): Transaction Generate a Transaction that delegates Stake tokens to a validator Vote PublicKey. |
|
public static |
initialize(stakePubkey: PublicKey, authorized: Authorized, lockup: Lockup): TransactionInstruction Generate an Initialize instruction to add to a Stake Create transaction |
|
public static |
split(stakePubkey: PublicKey, authorizedPubkey: PublicKey, lamports: number, splitStakePubkey: PublicKey): Transaction Generate a Transaction that splits Stake tokens into another stake account |
|
public static |
withdraw(stakePubkey: PublicKey, authorizedPubkey: PublicKey, to: PublicKey, lamports: number): Transaction Generate a Transaction that withdraws deactivated Stake tokens. |
Static Public Members
Static Public Methods
public static authorize(stakePubkey: 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 |
stakePubkey | PublicKey | ||
authorizedPubkey | PublicKey | ||
newAuthorized | PublicKey | ||
stakeAuthorizationType | StakeAuthorizationType |
public static createAccount(from: PublicKey, stakePubkey: 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 | ||
stakePubkey | PublicKey | ||
authorized | Authorized | ||
lockup | Lockup | ||
lamports | number |
public static createAccountWithSeed(from: PublicKey, stakePubkey: 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(stakePubkey: PublicKey, authorizedPubkey: PublicKey): Transaction source
Generate a Transaction that deactivates Stake tokens.
public static delegate(stakePubkey: 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(stakePubkey: PublicKey, authorized: Authorized, lockup: Lockup): TransactionInstruction source
Generate an Initialize instruction to add to a Stake Create transaction
Params:
Name | Type | Attribute | Description |
stakePubkey | PublicKey | ||
authorized | Authorized | ||
lockup | Lockup |
public static split(stakePubkey: PublicKey, authorizedPubkey: PublicKey, lamports: number, splitStakePubkey: PublicKey): Transaction source
Generate a Transaction that splits Stake tokens into another stake account