TokenLendingProgram.initObligation constructor
TokenLendingProgram.initObligation({
- required SolAddress obligation,
- required SolAddress lendingMarket,
- required SolAddress obligationOwner,
Initializes a new lending market obligation.
Implementation
factory TokenLendingProgram.initObligation({
/// Obligation account
required SolAddress obligation,
/// Lending market account.
required SolAddress lendingMarket,
/// Obligation owner.
required SolAddress obligationOwner,
}) {
return TokenLendingProgram(
keys: [
obligation.toWritable(),
lendingMarket.toReadOnly(),
obligationOwner.toSigner(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
SystemProgramConst.sysvarRentPubkey.toReadOnly(),
SPLTokenProgramConst.tokenProgramId.toReadOnly(),
],
programId: TokenLendingProgramConst.lendingProgramId,
layout: const TokenLendingInitObligationLayout());
}