Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SolendAction

Index

Constructors

Private constructor

  • new SolendAction(programId: PublicKey, connection: Connection, reserve: ReserveConfigType, lendingMarket: MarketConfigType, publicKey: PublicKey, obligationAddress: PublicKey, obligationAccountInfo: null | Obligation, userTokenAccountAddress: PublicKey, userCollateralAccountAddress: PublicKey, seed: string, symbol: string, positions: number, amount: string | BN, depositReserves: PublicKey[], borrowReserves: PublicKey[], hostAta?: PublicKey): SolendAction
  • Parameters

    • programId: PublicKey
    • connection: Connection
    • reserve: ReserveConfigType
    • lendingMarket: MarketConfigType
    • publicKey: PublicKey
    • obligationAddress: PublicKey
    • obligationAccountInfo: null | Obligation
    • userTokenAccountAddress: PublicKey
    • userCollateralAccountAddress: PublicKey
    • seed: string
    • symbol: string
    • positions: number
    • amount: string | BN
    • depositReserves: PublicKey[]
    • borrowReserves: PublicKey[]
    • Optional hostAta: PublicKey

    Returns SolendAction

Properties

amount

amount: BN

borrowReserves

borrowReserves: PublicKey[]

cleanupIxs

cleanupIxs: TransactionInstruction[]

connection

connection: Connection

depositReserves

depositReserves: PublicKey[]

Optional hostAta

hostAta?: PublicKey

lendingIxs

lendingIxs: TransactionInstruction[]

lendingMarket

lendingMarket: MarketConfigType

obligationAccountInfo

obligationAccountInfo: null | Obligation

obligationAddress

obligationAddress: PublicKey

Optional positions

positions?: number

postTxnIxs

postTxnIxs: TransactionInstruction[]

preTxnIxs

preTxnIxs: TransactionInstruction[]

programId

programId: PublicKey

publicKey

publicKey: PublicKey

reserve

seed

seed: string

setupIxs

setupIxs: TransactionInstruction[]

symbol

symbol: string

userCollateralAccountAddress

userCollateralAccountAddress: PublicKey

userTokenAccountAddress

userTokenAccountAddress: PublicKey

Methods

Private addAtaIxs

addBorrowIx

  • addBorrowIx(): void

addDepositIx

  • addDepositIx(): void

addDepositObligationCollateralIx

  • addDepositObligationCollateralIx(): void

addDepositReserveLiquidityIx

  • addDepositReserveLiquidityIx(): void

Private addObligationIxs

  • addObligationIxs(): Promise<void>

addRedeemReserveCollateralIx

  • addRedeemReserveCollateralIx(): void

Private addRefreshIxs

  • addRefreshIxs(): Promise<void>

addRepayIx

  • addRepayIx(): Promise<void>

addSupportIxs

addWithdrawIx

  • addWithdrawIx(): Promise<void>

getTransactions

  • getTransactions(): Promise<{ lendingTxn: null | Transaction; postLendingTxn: null | Transaction; preLendingTxn: null | Transaction }>
  • Returns Promise<{ lendingTxn: null | Transaction; postLendingTxn: null | Transaction; preLendingTxn: null | Transaction }>

Private sendSingleTransaction

  • sendSingleTransaction(txn: null | Transaction, sendTransaction: (txn: Transaction, connection: Connection) => Promise<string>): Promise<string>
  • Parameters

    • txn: null | Transaction
    • sendTransaction: (txn: Transaction, connection: Connection) => Promise<string>
        • (txn: Transaction, connection: Connection): Promise<string>
        • Parameters

          • txn: Transaction
          • connection: Connection

          Returns Promise<string>

    Returns Promise<string>

sendTransactions

  • sendTransactions(sendTransaction: (txn: Transaction, connection: Connection) => Promise<string>): Promise<string>
  • Parameters

    • sendTransaction: (txn: Transaction, connection: Connection) => Promise<string>
        • (txn: Transaction, connection: Connection): Promise<string>
        • Parameters

          • txn: Transaction
          • connection: Connection

          Returns Promise<string>

    Returns Promise<string>

Private updateWSOLAccount

  • updateWSOLAccount(action: ActionType): Promise<void>

Static buildBorrowTxns

  • buildBorrowTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", hostAta?: PublicKey, lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional hostAta: PublicKey
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static buildDepositObligationCollateralTxns

  • buildDepositObligationCollateralTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static buildDepositReserveLiquidityTxns

  • buildDepositReserveLiquidityTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static buildDepositTxns

  • buildDepositTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static buildRedeemReserveCollateralTxns

  • buildRedeemReserveCollateralTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static buildRepayTxns

  • buildRepayTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static buildWithdrawTxns

  • buildWithdrawTxns(connection: Connection, amount: string | BN, symbol: string, publicKey: PublicKey, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey): Promise<SolendAction>
  • Parameters

    • connection: Connection
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey

    Returns Promise<SolendAction>

Static initialize

  • initialize(action: ActionType, amount: string | BN, symbol: string, publicKey: PublicKey, connection: Connection, environment?: "production" | "devnet", lendingMarketAddress?: PublicKey, hostAta?: PublicKey): Promise<SolendAction>
  • Parameters

    • action: ActionType
    • amount: string | BN
    • symbol: string
    • publicKey: PublicKey
    • connection: Connection
    • environment: "production" | "devnet" = "production"
    • Optional lendingMarketAddress: PublicKey
    • Optional hostAta: PublicKey

    Returns Promise<SolendAction>

Generated using TypeDoc