Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MangoGroup

Index

Constructors

constructor

Properties

admin

admin: PublicKey

dexProgramId

dexProgramId: PublicKey

feesVault

feesVault: PublicKey

insuranceVault

insuranceVault: PublicKey

mangoCache

mangoCache: PublicKey

maxMangoAccounts

maxMangoAccounts: BN

metaData

metaData: MetaData

msrmVault

msrmVault: PublicKey

numMangoAccounts

numMangoAccounts: BN

numOracles

numOracles: number

oracles

oracles: PublicKey[]

perpMarkets

perpMarkets: PerpMarketInfo[]

publicKey

publicKey: PublicKey

refMngoRequired

refMngoRequired: BN

refShareCentibpsTier1

refShareCentibpsTier1: BN

refShareCentibpsTier2

refShareCentibpsTier2: BN

refSurchargeCentibpsTier1

refSurchargeCentibpsTier1: BN

refSurchargeCentibpsTier2

refSurchargeCentibpsTier2: BN

rootBankAccounts

rootBankAccounts: (undefined | RootBank)[]

signerKey

signerKey: PublicKey

signerNonce

signerNonce: BN

spotMarkets

spotMarkets: SpotMarketInfo[]

srmVault

srmVault: PublicKey

tokens

tokens: TokenInfo[]

validInterval

validInterval: number[]

Methods

cachePriceToUi

  • cachePriceToUi(price: I80F48, tokenIndex: number): number

getBorrowRate

  • getBorrowRate(tokenIndex: number): I80F48

getDepositRate

  • getDepositRate(tokenIndex: number): I80F48

getOracleIndex

getPerpMarketIndex

  • getPerpMarketIndex(perpMarketPk: PublicKey): number

getPrice

getPriceNative

getPriceUi

  • getPriceUi(tokenIndex: number, mangoCache: MangoCache): number

getQuoteTokenInfo

  • getQuoteTokenInfo(): TokenInfo

getRootBankIndex

  • getRootBankIndex(rootBank: PublicKey): number

getSpotMarketIndex

  • getSpotMarketIndex(spotMarketPk: PublicKey): number

getTokenDecimals

  • getTokenDecimals(tokenIndex: number): number
  • Return the decimals in TokenInfo; If it's not QUOTE_INDEX and there is an oracle for this index but no SPL-Token, this will default to 6 Otherwise throw error

    Parameters

    • tokenIndex: number

    Returns number

getTokenIndex

getUiTotalBorrow

  • getUiTotalBorrow(tokenIndex: number): I80F48

getUiTotalDeposit

  • getUiTotalDeposit(tokenIndex: number): I80F48

loadCache

  • loadCache(connection: Connection): Promise<MangoCache>

loadPerpMarket

  • loadPerpMarket(connection: Connection, marketIndex: number, baseDecimals: number, quoteDecimals: number): Promise<PerpMarket>

loadRootBanks

  • loadRootBanks(connection: Connection): Promise<(undefined | RootBank)[]>

onCacheChange

  • onCacheChange(connection: Connection, cb: (c: MangoCache) => void): number

Generated using TypeDoc