This change narrows the import scope for lightning-node-connect (LNC).
Instead of importing the entire pool package, LNC now only needs to
import poolrpc.
It also brings pool in line with the structure used in our other
projects.
For unannounced channels:
Bids can decide if they are interested in announced or unannounced
channels (exclusive or).
Asks can decide in what market they want to provide liquidity:
announced channels, unannounced channels or both.
For zero conf channels:
New constraints based on how many blocks are needed before considering a
channel "confirmed".
With this commit we add two new RPCs for handling sidecar tickets.
ListSidecars will show all sidecar tickets known to the local database,
including those where our node is on the receiving end of a sidecar
channel.
CancelSidecar will cancel a specific sidecar ticket. If an order was
created for it, that bid order will be canceled. Doing so will make sure
the ticket isn't executed any further.
When manually submitting an order, we want to update the state of the
ticket in the main database to the same state that we update the ticket
that's stored within the orders's TLV data.
To make it possible to decode a sidecar ticket through RPC instead of
only relying on the output of the CLI, we add the DecodeSidecarTicket
RPC method to the trader daemon.
Update leases to include the nonce of the order that the match was
with. This is required to match a lease with the event list provided
by an order in the case of multiple matches (and thus get a timestamp
for that lease).
In this commit, we modify the `OfferSidecarRequest` to instead embed the
entire bid order. This makes parsing on the command line a bit easier,
and sets us up for auto negotiation, as we'll need to have the entire
bid ahead of time so we can submit it during ticket negotiation.
When trying to enable a single unified REST proxy in LiT, we noticed
that one URI collides between Loop and Pool (/v1/lsat/tokens).
We change the URI in Pool to fix the collision.
This is a potentially breaking change! Though we do not use REST in LiT
and are not aware of other projects using Pool's REST API yet so it
should impact a small number of users (or nobody really in the best
case).
We create an RPC wrapper around the new order.NewQuote function with the
goal of replacing the calculation that currently only exists in the CLI
with an actual RPC call.
A sidecar channel uses different multisig keys than a normal order so we
need to fix the lookup in the batch transaction. While we're at it, we
might as well return the self chan balance and whether it was a sidecar
channel in the leases response.
With this commit we add the ability to both create/expect a sidecar offer as a
provider as well as registering an offer as the recipient to the main
RPC server.
The local database can now store a sidecar ticket with a bid order. We
now also need to accept it on the local RPC interface and forward it to
the auctioneer.
With the server now exposing this new RPC, we want to add the output of
it to the getinfo call to give users an idea what the current market
situation looks like.