Checks (RIPD-1487):

Introduce a new ledger type: ltCHECK
Introduce three new transactions that operate on checks:

- "CheckCreate" which adds the check entry to the ledger.  The
  check is a promise from the source of the check that the
  destination of the check may cash the check and receive up to
  the SendMax specified on the check.  The check may have an
  expiration, after which the check may no longer be cashed.

- "CheckCash" is a request by the destination of the check to
  transfer a requested amount of funds, up to the check's SendMax,
  from the source to the destination.  The destination may receive
  less than the SendMax due to transfer fees.

  When cashing a check, the destination specifies the smallest
  amount of funds that will be acceptable.  If the transfer
  completes and delivers the requested amount, then the check is
  considered cashed and removed from the ledger.  If enough funds
  cannot be delivered, then the transaction fails and the check
  remains in the ledger.

  Attempting to cash the check after its expiration will fail.

- "CheckCancel" removes the check from the ledger without
  transferring funds.  Either the check's source or destination
  can cancel the check at any time.  After a check has expired,
  any account can cancel the check.

Facilities related to checks are on the "Checks" amendment.
This commit is contained in:
Scott Schurr
2017-10-13 13:52:41 -07:00
parent 76ad06ef47
commit 2d5ddbf1bf
31 changed files with 2981 additions and 107 deletions

View File

@@ -50,6 +50,9 @@ enum TxType
ttPAYCHAN_CREATE = 13,
ttPAYCHAN_FUND = 14,
ttPAYCHAN_CLAIM = 15,
ttCHECK_CREATE = 16,
ttCHECK_CASH = 17,
ttCHECK_CANCEL = 18,
ttTRUST_SET = 20,