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(params: AuthorizeStakeParams): Transaction Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account. |
|
public static |
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account. |
|
public static |
createAccount(params: CreateStakeAccountParams): Transaction Generate a Transaction that creates a new Stake account |
|
public static |
Generate a Transaction that creates a new Stake account at
an address generated with |
|
public static |
deactivate(params: DeactivateStakeParams): Transaction Generate a Transaction that deactivates Stake tokens. |
|
public static |
delegate(params: DelegateStakeParams): Transaction Generate a Transaction that delegates Stake tokens to a validator Vote PublicKey. |
|
public static |
Generate an Initialize instruction to add to a Stake Create transaction |
|
public static |
split(params: SplitStakeParams): Transaction Generate a Transaction that splits Stake tokens into another stake account |
|
public static |
withdraw(params: WithdrawStakeParams): Transaction Generate a Transaction that withdraws deactivated Stake tokens. |
Static Public Members
Static Public Methods
public static authorize(params: AuthorizeStakeParams): Transaction source
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account.
Params:
Name | Type | Attribute | Description |
params | AuthorizeStakeParams |
public static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction source
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account.
Params:
Name | Type | Attribute | Description |
params | AuthorizeWithSeedStakeParams |
public static createAccount(params: CreateStakeAccountParams): Transaction source
Generate a Transaction that creates a new Stake account
Params:
Name | Type | Attribute | Description |
params | CreateStakeAccountParams |
public static createAccountWithSeed(params: CreateStakeAccountWithSeedParams): Transaction source
Generate a Transaction that creates a new Stake account at
an address generated with from
, a seed, and the Stake programId
Params:
Name | Type | Attribute | Description |
params | CreateStakeAccountWithSeedParams |
public static deactivate(params: DeactivateStakeParams): Transaction source
Generate a Transaction that deactivates Stake tokens.
Params:
Name | Type | Attribute | Description |
params | DeactivateStakeParams |
public static delegate(params: DelegateStakeParams): 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.
Params:
Name | Type | Attribute | Description |
params | DelegateStakeParams |
public static initialize(params: InitializeStakeParams): TransactionInstruction source
Generate an Initialize instruction to add to a Stake Create transaction
Params:
Name | Type | Attribute | Description |
params | InitializeStakeParams |
public static split(params: SplitStakeParams): Transaction source
Generate a Transaction that splits Stake tokens into another stake account
Params:
Name | Type | Attribute | Description |
params | SplitStakeParams |
public static withdraw(params: WithdrawStakeParams): Transaction source
Generate a Transaction that withdraws deactivated Stake tokens.
Params:
Name | Type | Attribute | Description |
params | WithdrawStakeParams |