Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • UnstakeIt

Implements

Index

Constructors

  • new UnstakeIt(poolAddress: PublicKey, poolAccountInfo: AccountInfo<Buffer>): UnstakeIt
  • Parameters

    • poolAddress: PublicKey
    • poolAccountInfo: AccountInfo<Buffer>

    Returns UnstakeIt

Properties

fee: null | Fee
feeAddr: PublicKey
label: StakePoolLabel = "unstake.it"
outputToken: PublicKey = WRAPPED_SOL_MINT
pool: null | TypeDef<never & never & { name: "pool"; type: { fields: [{ docs: ["The authority authorized to set fees"]; name: "feeAuthority"; type: "publicKey" }, { docs: ["The pool's lp token mint"]; name: "lpMint"; type: "publicKey" }, { docs: ["The last known value of total number of lamports in stake accounts", "owned by the pool that have not been reclaimed yet.", "The total SOL owned by a pool accounted for can be calculated by taking", "incoming_stake + pool_sol_reserves.lamports"]; name: "incomingStake"; type: "u64" }]; kind: "struct" } } & { name: "pool" } & never & never, Record<string, never>>
poolAddr: PublicKey
poolSolReservesAddr: PublicKey
poolSolReservesLamports: null | number
program: Program<Unstake>
protocolFee: null | ProtocolFeeAccount
protocolFeeAddr: PublicKey

Methods

  • createSetupInstructions(): 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.

    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[]
  • update(accountInfoMap: AccountInfoMap): void
  • Parameters

    • accountInfoMap: AccountInfoMap

    Returns void

Generated using TypeDoc