c-lightning-plugin-collection
c-lightning-plugin-collection copied to clipboard
Plugin request: a 'pay' command that acknowledges internal invoices
I'm just leaving this here so maybe someone will find it and create the plugin later, because I don't want to.
Say you generate an invoice, then you later try to pay that invoice on the same node. This pay command should succeed with zero fees and that's it.
This is useful for services that hold other people's money and allow then to generate invoices and pay invoices, so they them can pay each other in the same service without requiring complicated code.
I don't think you can pay your own invoice in c-lightning, at least not currently.
That's what the plugin would do: just exclude the invoice and reply with a success message to the pay command.
Would you want something like:
if senderID == recipientID:
deleteInvoice
return "Payment successful."
else:
pay(bolt11)
Yes.
I crated some code for my custodial wallet experiments that was able to pay onself. Can be combined with channel rebalancing