Class LoanOrigination
The terms of a loan before LoanSet, computed offline from the transaction and the
vault and broker entries, the way rippled's LoanSet and computeLoanProperties
compute them.
Inheritance
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public static class LoanOrigination
Remarks
The result feeds Project(LOLoan, IssuedCurrency, ushort, LedgerRules) directly, so a loan's full schedule is known before anyone signs, without a node. PreviewLoanSet(IXrplClient, LoanSet, CancellationToken) asks the node instead and covers every check.
Repeated here are the checks that depend on the amounts: the vault's available assets
(tecINSUFFICIENT_FUNDS), a value the asset cannot hold or that has more precision
than the loan's scale, and the amortization guards (tecPRECISION_LOSS). The
transaction's own validation, the vault's and broker's limits and cover, reserves and
authorization are not.
Methods
| Edit this page View SourceCompute(LoanSet, LOVault, LOLoanBroker, DateTime?, LedgerRules)
Computes what loanSet would create.
Declaration
public static LoanOriginationTerms Compute(LoanSet loanSet, LOVault vault, LOLoanBroker broker, DateTime? startDate = null, LedgerRules options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| LoanSet | loanSet | The transaction: |
| LOVault | vault | The broker's vault, which gives the asset and the scale of its |
| LOLoanBroker | broker | The |
| Nullable | startDate | The close time of the ledger the loan would be created in, which sets |
| LedgerRules | options | The amendments in force; the current rules when null. |
Returns
| Type | Description |
|---|---|
| LoanOriginationTerms |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | The transaction carries no |