@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
90 lines • 3.5 kB
TypeScript
import { PublicKey, Connection } from "@solana/web3.js";
import BN from "bn.js";
import * as types from "../types";
export interface ReserveFields {
/** Version of the reserve */
version: BN;
/** Last slot when supply and rates updated */
lastUpdate: types.LastUpdateFields;
/** Lending market address */
lendingMarket: PublicKey;
farmCollateral: PublicKey;
farmDebt: PublicKey;
/** Reserve liquidity */
liquidity: types.ReserveLiquidityFields;
reserveLiquidityPadding: Array<BN>;
/** Reserve collateral */
collateral: types.ReserveCollateralFields;
reserveCollateralPadding: Array<BN>;
/** Reserve configuration values */
config: types.ReserveConfigFields;
configPadding: Array<BN>;
borrowedAmountOutsideElevationGroup: BN;
/**
* Amount of token borrowed in lamport of debt asset in the given
* elevation group when this reserve is part of the collaterals.
*/
borrowedAmountsAgainstThisReserveInElevationGroups: Array<BN>;
padding: Array<BN>;
}
export interface ReserveJSON {
/** Version of the reserve */
version: string;
/** Last slot when supply and rates updated */
lastUpdate: types.LastUpdateJSON;
/** Lending market address */
lendingMarket: string;
farmCollateral: string;
farmDebt: string;
/** Reserve liquidity */
liquidity: types.ReserveLiquidityJSON;
reserveLiquidityPadding: Array<string>;
/** Reserve collateral */
collateral: types.ReserveCollateralJSON;
reserveCollateralPadding: Array<string>;
/** Reserve configuration values */
config: types.ReserveConfigJSON;
configPadding: Array<string>;
borrowedAmountOutsideElevationGroup: string;
/**
* Amount of token borrowed in lamport of debt asset in the given
* elevation group when this reserve is part of the collaterals.
*/
borrowedAmountsAgainstThisReserveInElevationGroups: Array<string>;
padding: Array<string>;
}
export declare class Reserve {
/** Version of the reserve */
readonly version: BN;
/** Last slot when supply and rates updated */
readonly lastUpdate: types.LastUpdate;
/** Lending market address */
readonly lendingMarket: PublicKey;
readonly farmCollateral: PublicKey;
readonly farmDebt: PublicKey;
/** Reserve liquidity */
readonly liquidity: types.ReserveLiquidity;
readonly reserveLiquidityPadding: Array<BN>;
/** Reserve collateral */
readonly collateral: types.ReserveCollateral;
readonly reserveCollateralPadding: Array<BN>;
/** Reserve configuration values */
readonly config: types.ReserveConfig;
readonly configPadding: Array<BN>;
readonly borrowedAmountOutsideElevationGroup: BN;
/**
* Amount of token borrowed in lamport of debt asset in the given
* elevation group when this reserve is part of the collaterals.
*/
readonly borrowedAmountsAgainstThisReserveInElevationGroups: Array<BN>;
readonly padding: Array<BN>;
static readonly discriminator: Buffer;
static readonly layout: any;
constructor(fields: ReserveFields);
static fetch(c: Connection, address: PublicKey, programId?: PublicKey): Promise<Reserve | null>;
static fetchMultiple(c: Connection, addresses: PublicKey[], programId?: PublicKey): Promise<Array<Reserve | null>>;
static decode(data: Buffer): Reserve;
toJSON(): ReserveJSON;
static fromJSON(obj: ReserveJSON): Reserve;
}
//# sourceMappingURL=Reserve.d.ts.map