Payments Db
Functions
Simultaneously add and receive a payment. Use this method when receiving a spontaneous payment, for example a swap-in payment.
Add a new expected incoming payment (not yet received).
Add new partial payments to a pending outgoing payment.
Add a new pending outgoing payment (not yet settled).
Mark an outgoing payment as completed (failed, succeeded, mined).
Get information about an incoming payment (paid or not) for the given payment hash, if any.
Get information about an outgoing payment from the id of one of its parts.
Get information about an outgoing payment (settled or not).
List expired unpaid normal payments created within specified time range (with the most recent payments first).
List incoming payments (with the most recent payments first).
List all the outgoing payment attempts that tried to pay the given payment hash.
List outgoing payments (with most recent payments first).
List sent and received payments (with most recent payments first).
List received payments (with most recent payments first).
Mark an incoming payment as received (paid). Note that this function assumes that there is a matching payment request in the DB, otherwise it will be a no-op.
Remove a pending incoming payment.
Update the channel id of the payments parts that have been received with a new channel, for a given payment hash. If there is no payments for this payment hash, or if the payment has not received any payment parts yet, then this method is a no-op.
Mark an outgoing payment part as succeeded. This should not update the parent payment, since some parts may still be pending.
Mark an outgoing payment part as failed.