TokenLendingProgram.repayObligationLiquidity constructor
TokenLendingProgram.repayObligationLiquidity({
- required SolAddress sourceLiquidity,
- required SolAddress destinationLiquidity,
- required SolAddress repayReserve,
- required SolAddress obligation,
- required SolAddress lendingMarket,
- required SolAddress transferAuthority,
- required TokenLendingRepayObligationLiquidityLayout layout,
Repay borrowed liquidity to a reserve. Requires a refreshed obligation and reserve.
Implementation
factory TokenLendingProgram.repayObligationLiquidity({
/// Source liquidity token account.
required SolAddress sourceLiquidity,
/// Destination repay reserve liquidity supply SPL Token account.
required SolAddress destinationLiquidity,
/// Repay reserve account.
required SolAddress repayReserve,
/// Obligation account.
required SolAddress obligation,
/// Lending market account.
required SolAddress lendingMarket,
/// User transfer authority
required SolAddress transferAuthority,
required TokenLendingRepayObligationLiquidityLayout layout,
}) {
return TokenLendingProgram(keys: [
sourceLiquidity.toWritable(),
destinationLiquidity.toWritable(),
repayReserve.toWritable(),
obligation.toWritable(),
lendingMarket.toReadOnly(),
transferAuthority.toSigner(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
SPLTokenProgramConst.tokenProgramId.toReadOnly(),
], programId: TokenLendingProgramConst.lendingProgramId, layout: layout);
}