blockchain-core
blockchain-core copied to clipboard
Support balance clearing / closing payments
Spec: A payment_v2 transaction can contain a single payment instruction with a specified payee
, an empty amount
, and a max
boolean set to true (default: false) in order to perform a balance clearing transaction. This transaction would implicit burn the appropriate amount of HNT for the fee and send the remaining balance to the payee.
Some Edge cases:
-
What if multiple payees exist? Transfer the specified
amount
s to their respectivepayee
s and send the remainder to thepayee
with the unspecifiedamount
. - What if multiple payees exist with unspecified amounts? Reject the transaction.
- What about HST? Defer. Only support HNT clearing transactions.