UNPKG

@kamino-finance/klend-sdk

Version:

Typescript SDK for interacting with the Kamino Lending (klend) protocol

72 lines 3.09 kB
import { PublicKey } from "@solana/web3.js"; import BN from "bn.js"; import * as types from "../types"; export interface ObligationCollateralFields { /** Reserve collateral is deposited to */ depositReserve: PublicKey; /** Amount of collateral deposited */ depositedAmount: BN; /** Collateral market value in quote currency (scaled fraction) */ marketValueSf: BN; /** * Debt amount (lamport) taken against this collateral. * (only meaningful if this obligation is part of an elevation group, otherwise 0) * This is only indicative of the debt computed on the last refresh obligation. * If the obligation have multiple collateral this value is the same for all of them. */ borrowedAmountAgainstThisCollateralInElevationGroup: BN; padding: Array<BN>; } export interface ObligationCollateralJSON { /** Reserve collateral is deposited to */ depositReserve: string; /** Amount of collateral deposited */ depositedAmount: string; /** Collateral market value in quote currency (scaled fraction) */ marketValueSf: string; /** * Debt amount (lamport) taken against this collateral. * (only meaningful if this obligation is part of an elevation group, otherwise 0) * This is only indicative of the debt computed on the last refresh obligation. * If the obligation have multiple collateral this value is the same for all of them. */ borrowedAmountAgainstThisCollateralInElevationGroup: string; padding: Array<string>; } /** Obligation collateral state */ export declare class ObligationCollateral { /** Reserve collateral is deposited to */ readonly depositReserve: PublicKey; /** Amount of collateral deposited */ readonly depositedAmount: BN; /** Collateral market value in quote currency (scaled fraction) */ readonly marketValueSf: BN; /** * Debt amount (lamport) taken against this collateral. * (only meaningful if this obligation is part of an elevation group, otherwise 0) * This is only indicative of the debt computed on the last refresh obligation. * If the obligation have multiple collateral this value is the same for all of them. */ readonly borrowedAmountAgainstThisCollateralInElevationGroup: BN; readonly padding: Array<BN>; constructor(fields: ObligationCollateralFields); static layout(property?: string): any; static fromDecoded(obj: any): types.ObligationCollateral; static toEncodable(fields: ObligationCollateralFields): { depositReserve: PublicKey; depositedAmount: BN; marketValueSf: BN; borrowedAmountAgainstThisCollateralInElevationGroup: BN; padding: BN[]; }; toJSON(): ObligationCollateralJSON; static fromJSON(obj: ObligationCollateralJSON): ObligationCollateral; toEncodable(): { depositReserve: PublicKey; depositedAmount: BN; marketValueSf: BN; borrowedAmountAgainstThisCollateralInElevationGroup: BN; padding: BN[]; }; } //# sourceMappingURL=ObligationCollateral.d.ts.map