Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StakePool

A StakePool in this context is any on-chain entity that accepts stake accounts in return for tokens

Classes that implement this should cache relevant on-chain accounts, none of the methods here should perform any rpc calls

Hierarchy

  • StakePool

Implemented by

Index

Properties

outputToken: PublicKey

Methods

  • Check if a stake pool can accept the given stake account

    Parameters

    Returns boolean

  • 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[]

  • getAccountsForUpdate(): PublicKey[]
  • Returns PublicKey[]

  • Assumes that the passed stake account has passed this.canAcceptStakeAccount()

    Parameters

    Returns StakeQuote

  • update(accountInfoMap: AccountInfoMap): void
  • Parameters

    • accountInfoMap: AccountInfoMap

    Returns void

Generated using TypeDoc