lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.7k stars 2.09k forks source link

[feature request] callback for keysend-hold #4632

Open nicolasburtey opened 4 years ago

nicolasburtey commented 4 years ago

Currency, keysend-hold take an argument from lnd:

      --keysend-hold-time=                                    If non-zero, keysend payments are accepted but not immediately settled. If the payment isn't settled manually after the specified time, it is canceled automatically. [experimental]

Having a KeysendHoldAcceptance API would allow for interactive/real-time settlement without having to poll the node constantly to see if a keysend payment is pending

This PR is related to: https://github.com/lightningnetwork/lnd/pull/4167

joostjager commented 4 years ago

Discussed on Slack, see https://github.com/joostjager/tlvshop.com for a non-polling solution.

halseth commented 4 years ago

@nicolasburtey Can be closed per https://github.com/lightningnetwork/lnd/issues/4632#issuecomment-695011445 ?

nicolasburtey commented 4 years ago

I managed to do it by listening with the invoice_updated event, then get the detail of the invoice, then call settleHoldInvoice. it feels kind of a hack and I feel it could make sense to have an acceptance API dedicated for this, but if you think that doesn't make sense, feel free to close the issue.

cfromknecht commented 4 years ago

@nicolasburtey having a more full featured API for this sort of thing is on the roadmap as we roll out AMP, since AMP and keysend are very related. We can keep the issue open as a way to track this feature.