Commit graph

37 commits

Author SHA1 Message Date
Orbital
5acb051643
offers: don't choose unadvertised node as introduction node 2024-08-28 12:55:41 -05:00
Orbital
3bd831af90
multi: move to derive_new_key for key gen
We should use a new key to sign each invoice request to improve sender privacy
and to ensure we can pay a particular CLN offer more than once.
2024-08-12 21:09:27 -05:00
Maurice Poirrier Chuden
856eb68c1f
multi: Configurable timeout for receiving invoice
This commit introduces a parameter in the RPC to allow users to modify
the timeout when receiving an invoice from the offer creator.

Additionally, it adds a configuration parameter for the server to set
up a default value if no parameter is used.

The default timeout value is also decreased from 100 seconds to 20
seconds.
2024-08-09 22:41:11 +02:00
Orbital
f499cdd602
multi: allow passing in a payer note 2024-07-31 16:29:43 -05:00
UK
691363ee21 Add skip-version-check option.
LNDK verifies that the version of LND running alongside it is compatible with LNDK.
If users need to bypass this version check for any reason, they can use the skip-version-check option.
2024-07-16 10:18:06 +09:00
jbesraa
aae75418c9
Remove wait_to_receive_onion_message test 2024-07-09 10:51:22 +03:00
Orbital
1d48f29812
offers: track active payments instead of offers
Instead of tracking the offers we're paying, we move to instead track active
payments by PaymentId through their lifecycle.

This makes it easier for us to track whether we've already received an invoice
for the payment or not. If we have, we ignore the second invoice so we don't
try to pay it again.

As a byproduct, this change also allows us to pay the same offer multiple at
once, which we didn't allow for before.
2024-07-02 17:57:30 -05:00
Orbital
1e774d2050
tests: split out setup_lndk fn for reuse 2024-07-02 17:57:29 -05:00
Orbital
ccb1ebaa56
tests: split off connect_network fn for reuse 2024-07-02 17:57:29 -05:00
Orbital
8d41e91d66
offers: split create_invoice_request from send_invoice_request
Splitting create_invoice_request out makes it easier for us to access the
PaymentId through the duration of the payment's lifecycle.
2024-07-02 17:54:46 -05:00
Orbital
0d1a417aae
multi: format comments to 100 width 2024-06-07 21:50:38 -05:00
Orbital
d9ef3dbae4
multi: setup grpc server 2024-05-29 17:04:47 -05:00
Orbital
d858e0983e
multi: delete started channel
With the grpc server, we don't need to check whether the onion messenger has
started before we pay an offer - we know it's already running.
2024-05-28 21:09:14 -05:00
Orbital
94b6b719af
main+lib: move logger out of run method
We move logger setup into main, so we're able to access the logger when we
start up the server.
2024-05-28 21:09:14 -05:00
Orbital
9904ee0f9c
lib: move and Arc-ify OffersHandler
This commit Arc-ifies the reference to OffersHandler, which is necessary
because once we set up the grpc server, we'll need a second thread-safe
reference to it.
2024-05-28 21:09:13 -05:00
Orbital
9735c2c95f
multi: add option to pass cert/macaroon in directly to lndk 2024-05-21 14:23:21 -05:00
Orbital
fe1601cf47
main: add config option for specifying log level 2024-03-19 15:54:31 -05:00
Orbital
4b491cc7ff
multi: send offer payment 2024-03-06 15:27:46 -06:00
Orbital
16847c03ab
multi: Upgrade to ldk v20
We update to ldk v20 for the latest blinded route updates, namely being
able to create a blinded route that's more than one hop. On top of that we use
a custom versoin with a small change, which we need in order to send an onion
message along a specified path for LNDK's integration tests:
lightningdevkit/rust-lightning#2868
2024-03-06 15:27:45 -06:00
Orbital
b9fdec5f9e
itests: add lnd new_address api call 2024-03-06 15:27:44 -06:00
Orbital
bc88608e8d
itests: set more granular lnd logs 2024-03-06 15:27:43 -06:00
Orbital
b85cad4d8c
offers: send invoice request 2024-03-06 15:21:02 -06:00
Orbital
8af07f48b6
itests: advertise ldk node address 2024-03-06 15:21:02 -06:00
Orbital
491e42eaf8
itests: export bitcoind for tests 2024-03-06 15:21:01 -06:00
Orbital
df50a92166
itests: add lnd API calls needed to set up channels 2024-03-06 15:21:01 -06:00
Orbital
f97bd3d000
offers: wait for onion messenger ready signal before sending request
Before we can send an invoice request, LNDK's onion messenger needs to be fully
started and running. We use a channel close to signal when the messenger is
ready.
2024-03-06 15:21:00 -06:00
Orbital
780d0fbf34
offers: add logic for connecting to the introduction node peer 2024-03-06 15:20:59 -06:00
Orbital
6de424f2a2
tests: specify log level in ldk nodes 2024-03-06 15:20:58 -06:00
Carla Kirk-Cohen
b104164bf2
multi: refactor to create OfferHandler and LndkOnionMessenger
Provides the end user with something to interact with when they want to
pay offers.
2024-03-06 15:17:57 -06:00
Carla Kirk-Cohen
a4ad1ccb22
multi: propagate shutdown signal from caller to lndk
To allow external callers to shutdown lndk, we provide a shutdown
trigger and listener to the onion messenger, replacing the single use
channels that we previously used. This is useful for itests, so that
we can cleanly shut down and for callers of the library to manage
execution.
2024-03-06 15:17:55 -06:00
Orbital
a46a9016cc
tests: test that lndk forwards onion messages 2023-11-08 13:02:48 -06:00
Orbital
c51022cad6
tests: add lnd to integration tests 2023-10-31 23:10:54 -05:00
Orbital
8e2aa13baf
tests: add a utility for retrying grpc calls 2023-10-31 23:10:53 -05:00
Orbital
ba1f1092fe
tests: clean up directory structure 2023-10-31 23:10:53 -05:00
Orbital
f392e190e4
tests: organize needed bitcoind data in a struct 2023-10-31 23:10:53 -05:00
Orbital
3b9539ab5d
tests: test that ldk node can send onion message 2023-09-13 16:00:50 -05:00
Orbital
0af0e34659
tests: add bitcoind node setup for testing 2023-09-13 16:00:50 -05:00