Constructors
constructor
- new Fraction(numerator: number, denominator: number): Fraction
-
Parameters
-
numerator: number
-
denominator: number
Properties
denominator
denominator: Big
Methods
apply
- apply(to: number): Big
-
Returns Big
equals
- equals(rhs: Fraction): boolean
-
Returns boolean
toIDLFraction
- toIDLFraction(): AnchorTypeDef<Object, {
DaycountConvention: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
DealTranche: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
DistributionWaterfall: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
DistributionWaterfallType: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
Fraction: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
LpClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
RepaymentAllocation: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
RepaymentPeriod: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
RepaymentPeriodInput: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TimeFrame: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
Tranche: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheAmountsDue: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheAmountsRepaid: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheConfig: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheRates: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
WaterfallTier: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
}>
-
Returns AnchorTypeDef<Object, {
DaycountConvention: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
DealTranche: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
DistributionWaterfall: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
DistributionWaterfallType: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
Fraction: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
LpClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
RepaymentAllocation: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
RepaymentPeriod: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
RepaymentPeriodInput: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TimeFrame: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
Tranche: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheAmountsDue: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheAmountsRepaid: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheClaim: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheConfig: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
TrancheRates: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
WaterfallTier: AnchorTypeDef<Object, ({ Fraction: AnchorTypeDef<{ name: "Fraction"; type: { kind: "struct"; fields: [{ name: "numerator"; type: "u32"; }, { name: "denominator"; type: "u32"; }]; }; } & { name: "Fraction"; }, ...>; ... 15 more ...; TimeFrame: AnchorTypeDef<...>; })>;
}>
toNumber
- toNumber(): number
-
Returns number
Helper function to convert this into something that is understandable program side
Returns