Options
All
  • Public
  • Public/Protected
  • All
Menu

Wrapper class around a specific marginfi group.

Hierarchy

  • Bank

Index

Constructors

  • new Bank(label: string, address: PublicKey, rawData: BankData, priceData: PriceData): Bank
  • Parameters

    • label: string
    • address: PublicKey
    • rawData: BankData
    • priceData: PriceData

    Returns Bank

Properties

assetShareValue: BigNumber
collectedGroupFeesOutstanding: BigNumber
collectedInsuranceFeesOutstanding: BigNumber
config: BankConfig
feeVault: PublicKey
feeVaultAuthorityBump: number
feeVaultBump: number
group: PublicKey
insuranceVault: PublicKey
insuranceVaultAuthorityBump: number
insuranceVaultBump: number
label: string
liabilityShareValue: BigNumber
liquidityVault: PublicKey
liquidityVaultAuthorityBump: number
liquidityVaultBump: number
mint: PublicKey
mintDecimals: number
priceData: PriceData
publicKey: PublicKey
totalAssetShares: BigNumber
totalLiabilityShares: BigNumber

Accessors

  • get totalAssets(): BigNumber
  • get totalLiabilities(): BigNumber

Methods

  • getAssetQuantity(assetShares: BigNumber): BigNumber
  • Parameters

    • assetShares: BigNumber

    Returns BigNumber

  • getAssetShares(assetValue: BigNumber): BigNumber
  • Parameters

    • assetValue: BigNumber

    Returns BigNumber

  • getInterestRates(): { borrowingRate: BigNumber; lendingRate: BigNumber }
  • Returns { borrowingRate: BigNumber; lendingRate: BigNumber }

    • borrowingRate: BigNumber
    • lendingRate: BigNumber
  • getLiabilityQuantity(liabilityShares: BigNumber): BigNumber
  • Parameters

    • liabilityShares: BigNumber

    Returns BigNumber

  • getLiabilityShares(liabilityValue: BigNumber): BigNumber
  • Parameters

    • liabilityValue: BigNumber

    Returns BigNumber

  • getQuantityFromUsdValue(usdValue: BigNumber, priceBias: PriceBias): BigNumber
  • getUsdValue(quantity: BigNumber, priceBias: PriceBias, weight?: BigNumber, scaleToBase?: boolean): BigNumber
  • Parameters

    • quantity: BigNumber
    • priceBias: PriceBias
    • Optional weight: BigNumber
    • scaleToBase: boolean = true

    Returns BigNumber

  • getUtilizationRate(): BigNumber
  • interestRateCurve(): BigNumber
  • reloadPriceData(connection: Connection): Promise<void>
  • Parameters

    • connection: Connection

    Returns Promise<void>

Generated using TypeDoc