152 Commits
Author SHA1 Message Date
Oliver Gugger 01cd1c991e lnrpc: add additional REST binding for QueryRoutes
Lists with non-primitive members aren't supported in the query string of
a GET request with the current version of the grpc-gateway library. To
allow route_hints to be set through REST, we also offer a POST endpoint
for that call where the encoding of the request parameter can be
specified as JSON.
2022-09-19 10:18:34 +02:00
Oliver Gugger 2dac7ef35a lnrpc: add wallet output type for Taproot 2022-08-25 09:21:52 +02:00
eugene 4ab80b012d chanacceptor+lnrpc: update the commitmentTypes, send zero-conf to client
This updates the RPCAcceptor to send the correct commitment type
even if the zero-conf or scid-alias channel types are set. This also
adds two bools to the ChannelAcceptRequest struct that denotes whether
the funder set the zero-conf and scid-alias channel types.
2022-08-12 16:36:17 -04:00
eugene aa576adecc rpc+cli: add general ListAliases function to dump all aliases 2022-08-09 14:11:08 -04:00
eugene 48f270fe20 rpc: add zero-conf, alias information to {list,closed}channels 2022-08-09 14:09:41 -04:00
Olaoluwa Osuntokun e4b5aa94a3 Merge pull request #6770 from Roasbeef/co-op-close-with-more-spec-innit
lnwallet/chancloser: remove the commit fee clamp, introduce max fee
2022-08-08 18:14:22 -07:00
Oliver Gugger e86a69b815 Merge pull request #6748 from Kixunil/patch-3
doc: Deprecation reason of `settled` on `Invoice`
2022-08-02 12:38:08 +02:00
Martin Habovštiak b4647bc37f doc: Deprecation reason of settled on Invoice
This documents how to deal with `settled` being deprecated. It took me quite a bit of digging without such documentation.

[skip ci]
2022-08-02 11:04:01 +02:00
Olaoluwa Osuntokun c791b18cc0 lnrpc: add a new max_fee field to the CloseChannel RPC call
In this commit, we add a new max_fee field that we'll use to decide when
to bail out of a co-op close dance as the initiator.
2022-07-26 17:23:13 -07:00
Elle Mouton 25acb51ba3 multi: registration complete MW interceptor msg
In this commit, we change the flow of the rpc middleware registration
a bit. In order to allow a client to add rpc middleware interceptors in
a deterministic order, we now make the server send a "registration
complete" message to the client after compeleting the registration
process so that the client knows when it can go ahead and register the
next client.
2022-07-20 14:58:47 -05:00
Oliver Gugger 502542da60 lnrpc: add is_error to intercept message 2022-07-14 09:36:48 +02:00
Oliver Gugger d604055ccc lnrpc: describe request replacement in API docs
This commit updates the comments in the proto file to mention the new
behavior of also being able to replace request messages.
2022-07-14 09:36:36 +02:00
eugene 49dd4b9e34 multi: add zero-conf, scid-alias channel-types to rpc
This allows the open channel rpcs to use the zero-conf or scid-alias
channel types.
2022-07-07 17:10:30 -04:00
eugene 1aa9626606 server+funding: allow scid-alias, zero-conf chantypes, scid-alias
feature-bit channels

This allows opening zero-conf chan-type, scid-alias chan-type, and
scid-alias feature-bit channels. scid-alias chan-type channels are
required to be private. Two paths are available for opening a zero-conf
channel:

* explicit chan-type negotiation
* LDK carve-out where chan-types are not used, LND is on the
  receiving end, and a ChannelAcceptor is used to enable zero-conf

When a zero-conf channel is negotiated, the funding manager:
* sends a FundingLocked with an alias
* waits for a FundingLocked from the remote peer
* calls addToRouterGraph to persist the channel using our alias in
  the graph. The peer's alias is used to send them a ChannelUpdate.
* wait for six confirmations. If public, the alias edge in the
  graph is deleted and replaced (not atomically) with the confirmed
  edge. Our policy is also read-and-replaced, but the counterparty's
  policy won't exist until they send it to us.

When a scid-alias-feature channel is negotiated, the funding manager:
* sends a FundingLocked with an alias:
* calls addToRouterGraph, sends ChannelUpdate with the confirmed SCID
  since it exists.
* when six confirmations occurs, the edge is deleted and re-inserted
  since the peer may have sent us an alias ChannelUpdate that we are
  storing in the graph.

Since it is possible for a user to toggle the scid-alias-feature-bit
to on while channels exist in the funding manager, care has been taken
to ensure that an alias is ALWAYS sent in the funding_locked message
if this happens.
2022-07-07 17:10:28 -04:00
priyanshiiit 8578433b3d lnrpc+lnd: adds required reserve in walletbalance rpc 2022-06-28 23:31:51 +05:30
priyanshiiit 983d917d4a lnrpc: add previous_outpoints to listchaintxns 2022-06-27 15:57:57 +05:30
Oliver Gugger c492f367cd lnrpc: fix comment and formatting in ConnectPeerRequest [skip ci]
Fixes #6643.
2022-06-14 22:09:51 +02:00
priyanshiiit 1e0a271ddb lnrpc: improves invoice documentation [skip ci] 2022-06-14 15:56:36 +05:30
Tommy Volk a2db074eec lnrpc: remove confirmation_height from PendingOpenChannel proto 2022-05-06 17:28:43 +00:00
Oliver Gugger a44e56b51a lnrpc: add new request/response fields for payment count 2022-05-02 12:32:06 +02:00
Joost Jager caf11d2607 rpcserver: expose interceptor required flag on info call 2022-04-25 11:05:18 +02:00
Joost Jager 9195f29e61 routing+channeldb: send payment metadata from invoice 2022-04-13 22:55:40 +02:00
Joost Jager ba5abdc090 routing: add time_pref parameter to queryroutes and sendpayment 2022-04-13 20:26:46 +02:00
Oliver Gugger c73cf03a55 multi: add p2tr keyspend wallet support 2022-03-24 18:02:38 +01:00
Bjarne Magnussen 188b39268d lnrpc: add DestOutput to the protobuf 2022-03-23 11:29:09 +01:00
Olaoluwa Osuntokun 4ecd153be2 lnrpc: add new locked balance field for WalletBalance
In this commit, we add a new field to the WalletBalance call that
permits users to account for the set of outputs that may be locked due
to a pending transaction. Without this field any time users locked
outputs for things like PSBT signing, then they disappear from the
WalletBalance call, which may cause a panic.
2022-03-17 16:36:44 -07:00
Olaoluwa Osuntokun 80e304573c lnwallet: increase legacy fee limit threshold to 1k sats
In this commit, we increase the legacy fee limit threshold (the amount
below which we'll allow 100% of funds to go to fees for the non-v2 RPC
calls) from 50 sats to 1k sats.
2022-02-03 11:54:01 -08:00
Oliver Gugger d22f543906 lnrpc: use amount based default routing fee 2022-02-02 14:24:53 +01:00
ErikEk ef1eff1058 lnrpc: fix the existing routing fee inaccuracy
When updating the channel routing policy, we encounter an inaccurate
precision error when calculating the routing fee. The issue stems from
the way the IEEE 754 standard works.

The solution here is to add a uint64 parameter (as mentioned in the
issue) and keep the float64 fee_rate parameter but rounding the product
of the base and fee rate.
2022-01-25 15:42:57 -08:00
mads krogh 1e3c05399c lnd+lnrpc: add private status to pendingchannels response 2022-01-18 09:42:14 +01:00
yyforyongyu 99378b22c3 rpcserver: add closing txid in WaitingCloseChannel 2022-01-07 18:21:02 +08:00
yyforyongyu 53e02fa83d rpcserver: expose ChanStatusFlags in pending close
This commit exposes the ChanStatusFlags inside waitingCloseResp such
that the channel close type is exposed.
2021-12-08 04:50:23 +08:00
Oliver Gugger 9a28a4a9ff lnrpc+rpcperms+lntest: add unique MW message ID
This commit adds a new unique intercept message ID that is different for
each message sent to an RPC middleware. This will allow us to re-purpose
the existing request ID field into its original intention, which was to
have a unique ID for a full gRPC request/response pair or gRPC stream as
a whole.
2021-11-08 15:00:29 +01:00
Olaoluwa Osuntokun 698b5a8079 lnrpc: populate new AmpInvoiceState field in CreateRPCInvoice 2021-10-28 15:50:20 -07:00
Wilmer Paulino e15ad026d4 chanacceptor: include commitment type in channel acceptor requests 2021-10-19 18:30:45 -07:00
Wilmer Paulino c9f6d788e2 lnrpc: add new CommitmentType for script enforced leased channels 2021-10-19 18:30:43 -07:00
Joost Jager ade50d0b2c lnrpc: receive custom message 2021-10-15 17:08:55 +02:00
Joost Jager ae959b16ae lnrpc: send custom message 2021-10-15 17:08:53 +02:00
Oliver Gugger 8b7c88537c multi: refactor SignDigestCompact into SignMessageCompact
To make it possible to use a remote lnrpc server as a signer for our
wallet, we need to change our main interface to sign the message instead
of the message's digest. Otherwise we'd need to alter the
lnrpc.SignMessage RPC to accept a digest instead of only the message
which has security implications.
2021-10-08 12:06:52 +02:00
Oliver Gugger 1608faf199 multi: allow skipping the PSBT finalize step
The FundingPsbtFinalize step is a safety measure that assures the final
signed funding transaction has the same TXID as was registered during
the funding flow and was used for the commitment transactions.
This step is cumbersome to use if the whole funding process is completed
external to lnd. We allow the finalize step to be skipped for such
cases. The API user/script will need to make sure things are verified
(and possibly cleaned up) properly.
2021-10-04 11:17:08 +02:00
yyforyongyu 16f97e6f41 rpcserver: return total num of fwdPkgs in PendingChannels
This commit adds a new field, NumForwardingPackages, in the
PendingChannels RPC response to specify how many forwarding packages the
channel has.
2021-09-23 13:23:13 +08:00
Oliver Gugger efe5f6ae90 multi: add RPC middleware interception
With the middleware handler in place, we now need to add a new gRPC
interceptor to the interceptor chain that will send messages to the
registered middlewares for each event that could be of interest to them.
2021-09-20 17:04:29 +02:00
ErikEk 46e9481e6c routing: invalid channels updatechanpolicy call 2021-09-15 10:20:49 +02:00
Turtle 72a46b8673 rpcserver: Add flag to BakeMacaroonRequest for allowing external permissions 2021-09-14 16:27:01 -05:00
Turtle d10a682fa9 macaroons+rpcserver: Add new RPC call for checking macaroon permissions 2021-09-14 16:26:28 -05:00
Bjarne Magnussen 7f53656753 lnd: add DeletePayment to the RPC
The RPC DeletePayment allows deleteing  single payment from its ID. When calling with `FailedHtlcsOnly` set in the request only failed HTLCs of this payment will be deleted.
2021-09-13 12:50:40 +02:00
Andras Banki-Horvath c5c956bbef lnrpc: add BatchOpenChannel RPC 2021-09-02 12:13:47 +02:00
Olaoluwa Osuntokun 5a9f499dd5 rpc: add new commitment_type field to OpenChannelRequest
This field will be examined later down the stack along with the set of
feature bits to determine if explicit channel commitment type
negotiation is possible or not.
2021-08-30 19:17:28 -07:00
Olaoluwa Osuntokun 00d275d9f0 lnrpc+rpc: expose last ping message received by peer over ListPeers resp 2021-08-25 16:47:17 -07:00
Oliver Gugger 06a693f10e lnrpc+rpcserver: add new fully resolved chan update event
This commit adds the new channel update event for a channel that is now
fully resolved to the event subscription RPC.
2021-08-09 13:55:34 +02:00