    import {StakeProgram} from '@solana/web3'

public class | source

# StakeProgram

Factory class for transactions to interact with the Stake program

## Static Member Summary

Static Public Members
public static get | programId: PublicKey Public key that identifies the Stake program |
public static get | space: number 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 | authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction 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 | createAccountWithSeed(params: CreateStakeAccountWithSeedParams): Transaction Generate a Transaction that creates a new Stake account at an address generated with `from`, a seed, and the Stake programId |
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 | initialize(params: InitializeStakeParams): TransactionInstruction 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

### public static get programId: PublicKey source

Public key that identifies the Stake program

### public static get space: number source

Max space of a Stake account

This is generated from the solana-stake-program StakeState struct as `std::mem::size_of::<StakeState>()`: https://docs.rs/solana-stake-program/1.4.4/solana_stake_program/stake_state/enum.StakeState.html

## 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 |  |

#### Return:

Transaction

### 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 |  |

#### Return:

Transaction

### public static createAccount(params: CreateStakeAccountParams): Transaction source

Generate a Transaction that creates a new Stake account

#### Params:

Name | Type | Attribute | Description
params | CreateStakeAccountParams |  |

#### Return:

Transaction

### 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 |  |

#### Return:

Transaction

### public static deactivate(params: DeactivateStakeParams): Transaction source

Generate a Transaction that deactivates Stake tokens.

#### Params:

Name | Type | Attribute | Description
params | DeactivateStakeParams |  |

#### Return:

Transaction

### 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 |  |

#### Return:

Transaction

### 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 |  |

#### Return:

TransactionInstruction

### 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 |  |

#### Return:

Transaction

### public static withdraw(params: WithdrawStakeParams): Transaction source

Generate a Transaction that withdraws deactivated Stake tokens.

#### Params:

Name | Type | Attribute | Description
params | WithdrawStakeParams |  |

#### Return:

Transaction