Class LoanBrokerCoverOutcome
What a LoanBrokerCoverDeposit, LoanBrokerCoverWithdraw or
LoanBrokerCoverClawback did to the broker's first-loss cover, read from its metadata -
of a validated transaction, or of a simulate run
(PreviewLoanBrokerCoverDeposit(IXrplClient, LoanBrokerCoverDeposit, LedgerRules, CancellationToken),
PreviewLoanBrokerCoverWithdraw(IXrplClient, LoanBrokerCoverWithdraw, LedgerRules, CancellationToken),
PreviewLoanBrokerCoverClawback(IXrplClient, LoanBrokerCoverClawback, LedgerRules, CancellationToken)).
Inheritance
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public sealed class LoanBrokerCoverOutcome
Remarks
Amounts are in the vault asset's own unit - drops for XRP - as the LoanBroker fields
are. The vault is not in the metadata of these transactions, so the minimum cover takes it as
an argument.
Properties
| Edit this page View SourceAsset
The vault asset.
Declaration
public Common.IssuedCurrency Asset { get; init; }
Property Value
| Type | Description |
|---|---|
| Common.IssuedCurrency |
BrokerAfter
The LoanBroker as the transaction left it.
Declaration
public LOLoanBroker BrokerAfter { get; init; }
Property Value
| Type | Description |
|---|---|
| LOLoanBroker |
CoverAfter
The broker's CoverAvailable after the transaction.
Declaration
public decimal CoverAfter { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
CoverBefore
The broker's CoverAvailable before the transaction.
Declaration
public decimal CoverBefore { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
LoanBrokerId
The broker's ledger index.
Declaration
public string LoanBrokerId { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
MaxWithdrawable
The most the owner can withdraw after the transaction (MaxWithdrawable(LOLoanBroker, LOVault, LedgerRules)).
Declaration
public decimal MaxWithdrawable { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
MinimumCover
The minimum cover LoanBrokerCoverWithdraw requires after the transaction (MinimumCover(LOLoanBroker, LOVault, LedgerRules)).
Declaration
public decimal MinimumCover { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
Methods
| Edit this page View SourceFromMetadata(ITransactionCommon, ITransactionMetadata, LOVault, LedgerRules)
Reads the outcome of transaction from its metadata.
Declaration
public static LoanBrokerCoverOutcome FromMetadata(ITransactionCommon transaction, ITransactionMetadata metadata, LOVault vault, LedgerRules rules = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ITransactionCommon | transaction | The cover deposit, withdrawal or clawback. |
| ITransactionMetadata | metadata | Its metadata. |
| LOVault | vault | The broker's |
| LedgerRules | rules | The amendments in force; the current rules when null. |
Returns
| Type | Description |
|---|---|
| LoanBrokerCoverOutcome |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | The transaction is not a cover deposit, withdrawal or clawback, the metadata does not modify its broker, or the vault is not the broker's. |