Options
All
  • Public
  • Public/Protected
  • All
Menu

TODO:

export
implements

{JetUserData}

Hierarchy

  • JetUser

Implements

Index

Properties

address: PublicKey
client: JetClient
market: JetMarket
obligation: DerivedAccount
reserves: JetReserve[]

Methods

  • borrow(reserve: JetReserve, receiver: PublicKey, amount: Amount): Promise<string>
  • closeCollateralAccount(reserve: JetReserve): Promise<string>
  • closeCollateralAccountTx(reserve: JetReserve): Promise<Transaction>
  • closeDepositAccount(reserve: JetReserve, receiver: PublicKey): Promise<string>
  • closeDepositAccountTx(reserve: JetReserve, receiver: PublicKey): Promise<Transaction>
  • closeLoanAccount(reserve: JetReserve): Promise<string>
  • closeLoanAccountTx(reserve: JetReserve): Promise<Transaction>
  • closeObligationAccount(): Promise<string>
  • closeObligationAccountTx(): Promise<Transaction>
  • deposit(reserve: JetReserve, tokenAccount: PublicKey, amount: Amount): Promise<string>
  • liquidate(loanReserve: JetReserve, collateralReserve: JetReserve, payerAccount: PublicKey, receiverAccount: PublicKey, amount: Amount, minCollateral: BN): Promise<string>
  • TODO:

    memberof

    JetUser

    Parameters

    • loanReserve: JetReserve
    • collateralReserve: JetReserve
    • payerAccount: PublicKey
    • receiverAccount: PublicKey
    • amount: Amount
    • minCollateral: BN

    Returns Promise<string>

  • makeBorrowTx(reserve: JetReserve, receiver: PublicKey, amount: Amount): Promise<Transaction>
  • Create the populated transaction instruction for depositCollateral.

    memberof

    JetUser

    Parameters

    Returns TransactionInstruction

  • makeDepositCollateralTx(reserve: JetReserve, amount: Amount): Promise<Transaction>
  • makeDepositTx(reserve: JetReserve, tokenAccount: PublicKey, amount: Amount): Promise<Transaction>
  • makeLiquidateTx(loanReserve: JetReserve, collateralReserve: JetReserve, payerAccount: PublicKey, receiverAccount: PublicKey, amount: Amount, minCollateral: BN): Promise<Transaction>
  • TODO:

    memberof

    JetUser

    Parameters

    • loanReserve: JetReserve
    • collateralReserve: JetReserve
    • payerAccount: PublicKey
    • receiverAccount: PublicKey
    • amount: Amount
    • minCollateral: BN

    Returns Promise<Transaction>

  • makeRepayTx(reserve: JetReserve, tokenAccount: PublicKey, amount: Amount): Promise<Transaction>
  • Create the populated transaction instructions for withdrawCollateral.

    memberof

    JetUser

    Parameters

    Returns TransactionInstruction

  • makeWithdrawCollateralTx(reserve: JetReserve, amount: Amount): Promise<Transaction>
  • makeWithdrawTx(reserve: JetReserve, tokenAccount: PublicKey, amount: Amount): Promise<Transaction>
  • refresh(): Promise<void>
  • repay(reserve: JetReserve, tokenAccount: PublicKey, amount: Amount): Promise<string>
  • subscribeToObligation(address?: Address, commitment?: Commitment): EventEmitter<string | symbol, any>
  • Establish an event emitter subscription to the argued Obligation account on-chain which listens for the "change" event from the publisher. If no obligation address is provided, it defaults to the user instance's obligation that was set at instantiation.

    memberof

    JetClient

    Parameters

    • Optional address: Address
    • Optional commitment: Commitment

    Returns EventEmitter<string | symbol, any>

  • unsubscribeFromObligation(address?: Address): Promise<void>
  • Unsubscribes from the argued Obligation account address on-chain. If no obligation address is provided, it defaults to the user instance's obligation that was set at instantiation.

    memberof

    JetClient

    Parameters

    • Optional address: Address

    Returns Promise<void>

  • withdraw(reserve: JetReserve, tokenAccount: PublicKey, amount: Amount): Promise<string>

Generated using TypeDoc