Show / Hide Table of Contents

Class PaymentFlow

A Payment computed locally against a DexSnapshot, the way rippled 3.4.1 applies it: its paths turned into strands of trust lines, order books and AMM pools, run by the payment engine with SendMax, DeliverMin, partial payment and the limit quality, and the result the node would return.

Inheritance
object
PaymentFlow
Namespace: Xrpl.Amounts
Assembly: Xrpl.dll
Syntax
public static class PaymentFlow
Remarks

Repeated are Payment's checks (the tem codes of preflight, the destination checks of preclaim, the credentials it presents, the permissioned domain, deposit authorization by account or by credentials), RippleCalc and flow: toStrands with its implied steps and loop checks, direct steps with their qualities, limits, NoRipple and transfer fees, book steps - the domain's books for a payment in a domain - and AMM pools, StrandFlow, and the trust lines a balance back at zero releases or deletes. A direct XRP payment is checked against the reserve.

An MPT moves through MPTEndpointSteps and MPT books under MPTokensV2, and directly, with its transfer fee, before it. Not covered: sponsored reserves, and vault shares' underlying permissions. The paths come with the payment, as ripple_path_find returns them or PathFinding finds them. A result is exact only against the state it was given.

Methods

| Edit this page View Source

Evaluate(DexSnapshot, Payment, LedgerRules)

What payment would do against snapshot.

Declaration
public static PaymentFlowResult Evaluate(DexSnapshot snapshot, Payment payment, LedgerRules rules = null)
Parameters
Type Name Description
DexSnapshot snapshot

The ledger state; it must hold the sender, the accounts and lines on the paths, and the books they cross.

Payment payment

The payment, with its Fee set.

LedgerRules rules

The amendments in force; the current rules when null.

Returns
Type Description
PaymentFlowResult
Exceptions
Type Condition
ArgumentException

The sender is not in the snapshot, or the snapshot lists a trust line twice.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX