Constructors
constructor
- new RepaymentSchedule(programVersion: AnchorTypeDef<Object, AnchorDefined<Credix, {
DealTranche: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
Fraction: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
LpClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
RepaymentPeriod: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
RepaymentPeriodInput: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
TrancheClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
TrancheConfig: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
}>>, address: PublicKey): RepaymentSchedule
-
Parameters
-
programVersion: AnchorTypeDef<Object, AnchorDefined<Credix, {
DealTranche: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
Fraction: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
LpClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
RepaymentPeriod: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
RepaymentPeriodInput: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
TrancheClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
TrancheConfig: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 5 more ...; TrancheClaim: AnchorTypeDef<...>; })>;
}>>
-
address: PublicKey
Properties
address
address: PublicKey
Accessors
daysInYear
- get daysInYear(): number
-
Returns number
duration
- get duration(): number
-
Returns number
periodDuration
- get periodDuration(): number
-
Returns number
totalInterest
- get totalInterest(): TokenAmount
-
Returns TokenAmount
totalPeriods
- get totalPeriods(): number
-
Returns number
totalPrincipal
- get totalPrincipal(): TokenAmount
-
Returns TokenAmount
Methods
currentPeriodIndex
- currentPeriodIndex(deal: Deal): null | number
-
Returns null | number
currentlyMissing
- currentlyMissing(deal: Deal): null | TokenAmount
-
Returns null | TokenAmount
interestMissing
- interestMissing(): TokenAmount
-
Returns TokenAmount
interestRepaid
- interestRepaid(): TokenAmount
-
Returns TokenAmount
isRepaid
- isRepaid(): boolean
-
Returns boolean
principalMissing
- principalMissing(): TokenAmount
-
Returns TokenAmount
principalRepaid
- principalRepaid(): TokenAmount
-
Returns TokenAmount
toRepaymentScheduleConfig
Static
generatePDA
- generatePDA(deal: Deal): Promise<[PublicKey, number]>
-
Returns Promise<[PublicKey, number]>
The first unrepaid period