Constructors
Private constructor
Parameters
connection: Connection
programId: PublicKey
Properties
Private connection
connection: Connection
programId
programId: PublicKey
Methods
Private getLatestRewardRate
- getLatestRewardRate(rewardRates: { beginningSlot: number; name?: string; rewardRate: string }[], slot: number): { beginningSlot: number; name?: string; rewardRate: string }
Parameters
rewardRates: { beginningSlot: number; name?: string; rewardRate: string }[]
slot: number
Returns { beginningSlot: number; name?: string; rewardRate: string }
beginningSlot: number
Optional name?: string
rewardRate: string
Private loadExternalRewardData
- loadExternalRewardData(): Promise<({ lastSlot: number; rewardRates: { beginningSlot: number; name?: string; rewardRate: string }[]; rewardsPerShare: string; totalBalance: string } & { reserveID: string; rewardMint: string; rewardSymbol: string; side: "borrow" | "supply" })[]>
Returns Promise<({ lastSlot: number; rewardRates: { beginningSlot: number; name?: string; rewardRate: string }[]; rewardsPerShare: string; totalBalance: string } & { reserveID: string; rewardMint: string; rewardSymbol: string; side: "borrow" | "supply" })[]>
Private loadPriceData
- loadPriceData(symbols: string[]): Promise<{}>
Parameters
Returns Promise<{}>
loadReserves
- loadReserves(): Promise<void>
loadRewards
- loadRewards(): Promise<void>
refreshAll
- refreshAll(): Promise<void>
Static initialize
- initialize(connection: Connection, environment?: "production" | "devnet" | "beta", marketAddress?: string): Promise<SolendMarket>
Parameters
connection: Connection
environment: "production" | "devnet" | "beta" = "production"
Optional marketAddress: string