UNPKG

@kamino-finance/klend-sdk

Version:

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

38 lines 1.54 kB
import Decimal from 'decimal.js'; import { KaminoMarket, KaminoObligation, KaminoReserve } from '../classes'; import { PublicKey } from '@solana/web3.js'; export declare function calcRepayAmountWithSlippage(kaminoMarket: KaminoMarket, debtReserve: KaminoReserve, currentSlot: number, obligation: KaminoObligation, amount: Decimal, referrer: PublicKey): { repayAmount: Decimal; repayAmountLamports: Decimal; flashRepayAmountLamports: Decimal; }; export declare const calcFlashRepayAmount: (props: { reserve: KaminoReserve; referralFeeBps: number; hasReferral: boolean; flashBorrowAmountLamports: Decimal; }) => { flashRepayAmountLamports: Decimal; }; export declare function calcMaxWithdrawCollateral(market: KaminoMarket, obligation: KaminoObligation, collReserveAddr: PublicKey, debtReserveAddr: PublicKey, repayAmountLamports: Decimal): { maxWithdrawableCollLamports: Decimal; canWithdrawAllColl: boolean; repayingAllDebt: boolean; }; export declare function estimateDebtRepaymentWithColl(props: { collAmount: Decimal; priceDebtToColl: Decimal; slippagePct: Decimal; flashLoanFeePct: Decimal; kaminoMarket: KaminoMarket; debtTokenMint: PublicKey; obligation: KaminoObligation; currentSlot: number; }): Decimal; export declare function estimateCollNeededForDebtRepayment(props: { debtAmount: Decimal; priceDebtToColl: Decimal; slippagePct: Decimal; flashLoanFeePct: Decimal; }): Decimal; //# sourceMappingURL=repay_with_collateral_calcs.d.ts.map