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.
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.
To give developers and users more information about the current state of
the trader daemon, we add a new GetInfo RPC that shows a summary of all
accounts and orders known to the system.
And because there currently is no other way than to <ctrl>+c or kill the
daemon, we add a StopDaemon RPC as well for proper shutdown.
To give any CLI or UI the option to identify themselves, an initiator
field is added that will be appended to the binary's user agent string
before sending it to the server.
In this commit, we make a series of RPC changes to do away with the
min/max order preference and instead replace that with a single unified
field for the duration of a lease. The Terms method has been extended to
return the current set of active leases. Things have been done in this
way to allow us to announce a new duration, accept orders, but not yet
enable market clearing for it.
The changes in this commit were intended to be non-breaking, which is
why the Bid/Ask message distinction still exists, even though with this
commit they nearly share all the same fields. In the future further
fields may be added that still make both messages asymmetric.
We add a new verbose flag to the ListOrdersRequest message that causes
the RPC server to include all events of an order in the response.
The orders are now also returned sorted by their creation timestamp.