Rusty Russell
d867fab3a7
sendinvoice: call waitinvoice directly to on invoice payment.
Suggested-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
55983827b6
fetchinvoice: try direct peers if we can't route.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
bdfcec3eb6
fetchinvoice: check we're in the period before attempting to fetch.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
dae477175c
fetchinvoice: implement timeout.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
075c25fc08
plugins/fetchinvoice: handle sendinvoice timeout, error or payment.
If they pay the invoice, they don't bother replying; that's just for
errors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
dc2ba6f9d9
plugins/fetchinvoice: implement `sendinvoice` command.
As fetchinvoice handles normal offers, sendinvoice handles
send_invoice offers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
09b18bf64f
libplugin: replace rpc_delve with rpc_scan.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
52af729641
plugins/offer and plugins/fetchinvoice: send and recv errors.
This also lets us extend our testing to cover error cases.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
96caf9f4ab
fetchinvoice: return the next period for recurring offers.
This is useful for the caller to know when to call again.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
69ddf818c7
plugins/fetchinvoice: catch invoice_request reply.
Using onionmessage hook, we get the response and either present it
to the user (invoice) or return the error to the user.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago
Rusty Russell
3eada358e9
plugins/fetchinvoice: plugin to send an invoice_request for a given offer
Doesn't catch the reply yet, but prepares the invoice request based on
the offer and sends it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
4 years ago