Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SplStakePool Abstract

Hierarchy

Implements

Index

Constructors

  • Parameters

    Returns SplStakePool

Properties

_depositAuth: PublicKey
label: "Socean" | "Eversol" | "JPool" | "SolBlaze" | "DAOPool" | "Jito" | "Laine" | "Cogent" | "Risk.lol" | "mrgn"
mustUseKeypairForSplitStake: boolean = false
outputToken: PublicKey
programId: PublicKey
stakePool: null | StakePool
stakePoolAddr: PublicKey
validatorList: null | ValidatorList
validatorListAddr: PublicKey
withdrawAuth: PublicKey
withdrawStakeToken: PublicKey

Accessors

  • get depositAuth(): PublicKey
  • Returns PublicKey

Methods

  • calcWithdrawalReceipt(withdrawStakeTokens: bigint): { lamportsReceived: bigint; withdrawStakeTokensFeePaid: bigint }
  • Assumes this.stakePool already fetched. Returns lamportsReceived and stakePoolToken fee paid for a given stakePoolToken withdrawal

    Parameters

    • withdrawStakeTokens: bigint

    Returns { lamportsReceived: bigint; withdrawStakeTokensFeePaid: bigint }

    • lamportsReceived: bigint
    • withdrawStakeTokensFeePaid: bigint
  • SPL stake pools only accept:

    • active stake accounts (can cancel deactivation in setup)
    • staked to validators in the validator list
    • no lockup

    Parameters

    Returns boolean

  • createCleanupInstruction(): TransactionInstruction[]
  • Commmon setup instructions:

    • un-deactivate stake account

    Common setup instructions that are not covered:

    • split stake. Why?
      • This involves generation and returning of a Keypair and Signer. Simpler to just handle this outside of this interface
    • creating outputToken ATA if user does not have it yet. Why?
      • This involves a RPC call to check if the user's ATA exists.

    Parameters

    Returns TransactionInstruction[]

  • Create the instructions for swapping the given stake account to outputToken assuming setup is done Only accepts entire stake accounts.

    Parameters

    Returns TransactionInstruction[]

  • findTransientStakeAccount(validatorStakeInfo: ValidatorStakeInfo): PublicKey
  • Parameters

    • validatorStakeInfo: ValidatorStakeInfo

    Returns PublicKey

  • findValidatorStakeAccount(stakeAccountVotePubkey: PublicKey): PublicKey
  • Parameters

    • stakeAccountVotePubkey: PublicKey

    Returns PublicKey

  • getAccountsForUpdate(): PublicKey[]
  • Assumes that the passed stake account has passed this.canAcceptStakeAccount()

    Parameters

    Returns StakeQuote

  • isUpdated(currentEpoch: number): boolean
  • Assumes this.stakePool is fetched

    Parameters

    • currentEpoch: number

    Returns boolean

  • update(accountInfoMap: AccountInfoMap): void
  • Parameters

    • accountInfoMap: AccountInfoMap

    Returns void

Generated using TypeDoc