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.
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.
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.
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.
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
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.
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.