@@ -341,6 +341,13 @@ service Lightning {
341341 */
342342 rpc SubscribeInvoices (InvoiceSubscription ) returns (stream Invoice );
343343
344+ /* lncli: `deletecanceledinvoice`
345+ DeleteCanceledInvoice removes a canceled invoice from the database. If the
346+ invoice is not in the canceled state, an error will be returned.
347+ */
348+ rpc DeleteCanceledInvoice (DelCanceledInvoiceReq )
349+ returns (DelCanceledInvoiceResp );
350+
344351 /* lncli: `decodepayreq`
345352 DecodePayReq takes an encoded payment request string and attempts to decode
346353 it, returning a full description of the conditions encoded within the
@@ -548,9 +555,10 @@ service Lightning {
548555 returns (ListPermissionsResponse );
549556
550557 /*
551- CheckMacaroonPermissions checks whether a request follows the constraints
552- imposed on the macaroon and that the macaroon is authorized to follow the
553- provided permissions.
558+ CheckMacaroonPermissions checks whether the provided macaroon contains all
559+ the provided permissions. If the macaroon is valid (e.g. all caveats are
560+ satisfied), and all permissions provided in the request are met, then
561+ this RPC returns true.
554562 */
555563 rpc CheckMacaroonPermissions (CheckMacPermRequest )
556564 returns (CheckMacPermResponse );
@@ -1911,6 +1919,7 @@ message Peer {
19111919 repeated TimestampedError errors = 12 ;
19121920
19131921 /*
1922+ This field is populated when the peer has at least one channel with us.
19141923 The number of times we have recorded this peer going offline or coming
19151924 online, recorded across restarts. Note that this value is decreased over
19161925 time if the peer has not recently flapped, so that we can forgive peers
@@ -1919,6 +1928,7 @@ message Peer {
19191928 int32 flap_count = 13 ;
19201929
19211930 /*
1931+ This field is populated when the peer has at least one channel with us.
19221932 The timestamp of the last flap we observed for this peer. If this value is
19231933 zero, we have not observed any flaps for this peer.
19241934 */
@@ -2074,13 +2084,6 @@ message Chain {
20742084 string network = 2 ;
20752085}
20762086
2077- message ConfirmationUpdate {
2078- bytes block_sha = 1 ;
2079- int32 block_height = 2 ;
2080-
2081- uint32 num_confs_left = 3 ;
2082- }
2083-
20842087message ChannelOpenUpdate {
20852088 ChannelPoint channel_point = 1 ;
20862089}
@@ -2847,6 +2850,25 @@ message PendingChannelsResponse {
28472850 // very likely canceled the funding and the channel will never become
28482851 // fully operational.
28492852 int32 funding_expiry_blocks = 3 ;
2853+
2854+ // The number of blocks remaining until the channel status changes from
2855+ // pending to active. A value of 0 indicates that the channel is now
2856+ // active.
2857+ //
2858+ // "Active" here means both channel peers have the channel marked OPEN
2859+ // and can immediately start using it. For public channels, this does
2860+ // not imply a channel_announcement has been gossiped. It only becomes
2861+ // public on the network after 6 on‐chain confirmations.
2862+ // See BOLT07 "Routing Gossip":
2863+ // https://github.com/lightning/bolts/blob/master/07-routing-gossip.md
2864+ //
2865+ // ZeroConf channels bypass the pending state entirely: they are marked
2866+ // active immediately upon creation, so they never show up as "pending".
2867+ uint32 confirmations_until_active = 7 ;
2868+
2869+ // The confirmation height records the block height at which the funding
2870+ // transaction was first confirmed.
2871+ uint32 confirmation_height = 8 ;
28502872 }
28512873
28522874 message WaitingCloseChannel {
@@ -3165,10 +3187,10 @@ message QueryRoutesRequest {
31653187 map <uint64 , bytes > dest_custom_records = 13 ;
31663188
31673189 /*
3168- The channel id of the channel that must be taken to the first hop. If zero,
3169- any channel may be used.
3190+ Deprecated, use outgoing_chan_ids. The channel id of the channel that must
3191+ be taken to the first hop. If zero, any channel may be used.
31703192 */
3171- uint64 outgoing_chan_id = 14 [jstype = JS_STRING ];
3193+ uint64 outgoing_chan_id = 14 [jstype = JS_STRING , deprecated = true ];
31723194
31733195 /*
31743196 The pubkey of the last hop of the route. If empty, any hop may be used.
@@ -3203,6 +3225,12 @@ message QueryRoutesRequest {
32033225 only, to 1 to optimize for reliability only or a value inbetween for a mix.
32043226 */
32053227 double time_pref = 18 ;
3228+
3229+ /*
3230+ The channel ids of the channels allowed for the first hop. If empty, any
3231+ channel may be used.
3232+ */
3233+ repeated uint64 outgoing_chan_ids = 20 ;
32063234}
32073235
32083236message NodePair {
@@ -3423,6 +3451,10 @@ message NodeInfoRequest {
34233451
34243452 // If true, will include all known channels associated with the node.
34253453 bool include_channels = 2 ;
3454+
3455+ // If true, will include announcements' signatures into ChannelEdge.
3456+ // Depends on include_channels.
3457+ bool include_auth_proof = 3 ;
34263458}
34273459
34283460message NodeInfo {
@@ -3476,13 +3508,39 @@ message RoutingPolicy {
34763508 uint64 max_htlc_msat = 6 ;
34773509 uint32 last_update = 7 ;
34783510
3479- // Custom channel update tlv records.
3511+ // Custom channel update tlv records. These are customized fields that are
3512+ // not defined by LND and cannot be extracted.
34803513 map <uint64 , bytes > custom_records = 8 ;
34813514
34823515 int32 inbound_fee_base_msat = 9 ;
34833516 int32 inbound_fee_rate_milli_msat = 10 ;
34843517}
34853518
3519+ /*
3520+ ChannelAuthProof is the authentication proof (the signature portion) for a
3521+ channel. Using the four signatures contained in the struct, and some
3522+ auxiliary knowledge (the funding script, node identities, and outpoint) nodes
3523+ on the network are able to validate the authenticity and existence of a
3524+ channel.
3525+ */
3526+ message ChannelAuthProof {
3527+ // node_sig1 are the raw bytes of the first node signature encoded
3528+ // in DER format.
3529+ bytes node_sig1 = 1 ;
3530+
3531+ // bitcoin_sig1 are the raw bytes of the first bitcoin signature of the
3532+ // MultiSigKey key of the channel encoded in DER format.
3533+ bytes bitcoin_sig1 = 2 ;
3534+
3535+ // node_sig2 are the raw bytes of the second node signature encoded
3536+ // in DER format.
3537+ bytes node_sig2 = 3 ;
3538+
3539+ // bitcoin_sig2 are the raw bytes of the second bitcoin signature of the
3540+ // MultiSigKey key of the channel encoded in DER format.
3541+ bytes bitcoin_sig2 = 4 ;
3542+ }
3543+
34863544/*
34873545A fully authenticated channel along with all its unique attributes.
34883546Once an authenticated channel announcement has been processed on the network,
@@ -3511,6 +3569,13 @@ message ChannelEdge {
35113569
35123570 // Custom channel announcement tlv records.
35133571 map <uint64 , bytes > custom_records = 9 ;
3572+
3573+ // Authentication proof for this channel. This proof contains a set of
3574+ // signatures binding four identities, which attests to the legitimacy of
3575+ // the advertised channel. This only is available for advertised channels.
3576+ // This field is not filled by default. Pass include_auth_proof flag to
3577+ // DescribeGraph, GetNodeInfo or GetChanInfo to get this data.
3578+ ChannelAuthProof auth_proof = 10 ;
35143579}
35153580
35163581message ChannelGraphRequest {
@@ -3520,6 +3585,9 @@ message ChannelGraphRequest {
35203585 channels, and public channels that are not yet announced to the network.
35213586 */
35223587 bool include_unannounced = 1 ;
3588+
3589+ // If true, will include announcements' signatures into ChannelEdge.
3590+ bool include_auth_proof = 2 ;
35233591}
35243592
35253593// Returns a new instance of the directed channel graph.
@@ -3571,6 +3639,9 @@ message ChanInfoRequest {
35713639 // The channel point of the channel in format funding_txid:output_index. If
35723640 // chan_id is specified, this field is ignored.
35733641 string chan_point = 2 ;
3642+
3643+ // If true, will include announcements' signatures into ChannelEdge.
3644+ bool include_auth_proof = 3 ;
35743645}
35753646
35763647message NetworkInfoRequest {
@@ -4004,6 +4075,12 @@ message BlindedPathConfig {
40044075 blinded paths.
40054076 */
40064077 repeated bytes node_omission_list = 4 ;
4078+
4079+ /*
4080+ The chained channels list specified via channel id (separated by commas),
4081+ starting from a channel owned by the receiver node.
4082+ */
4083+ repeated uint64 incoming_channel_list = 5 ;
40074084}
40084085
40094086enum InvoiceHTLCState {
@@ -4185,6 +4262,16 @@ message InvoiceSubscription {
41854262 uint64 settle_index = 2 ;
41864263}
41874264
4265+ message DelCanceledInvoiceReq {
4266+ // Invoice payment hash to delete.
4267+ string invoice_hash = 1 ;
4268+ }
4269+
4270+ message DelCanceledInvoiceResp {
4271+ // The status of the delete operation.
4272+ string status = 1 ;
4273+ }
4274+
41884275enum PaymentFailureReason {
41894276 /*
41904277 Payment isn't failed (yet).
@@ -4667,6 +4754,14 @@ message ForwardingHistoryRequest {
46674754 // Informs the server if the peer alias should be looked up for each
46684755 // forwarding event.
46694756 bool peer_alias_lookup = 5 ;
4757+
4758+ // List of incoming channel ids to filter htlcs received from a
4759+ // particular channel
4760+ repeated uint64 incoming_chan_ids = 6 ;
4761+
4762+ // List of outgoing channel ids to filter htlcs being forwarded to a
4763+ // particular channel
4764+ repeated uint64 outgoing_chan_ids = 7 ;
46704765}
46714766message ForwardingEvent {
46724767 // Timestamp is the time (unix epoch offset) that this circuit was
@@ -5051,9 +5146,37 @@ message Op {
50515146}
50525147
50535148message CheckMacPermRequest {
5149+ // The macaroon to check permissions for, serialized in binary format. For
5150+ // a macaroon to be valid, it must have been issued by lnd, must succeed all
5151+ // caveat conditions, and must contain all of the permissions specified in
5152+ // the permissions field.
50545153 bytes macaroon = 1 ;
5154+
5155+ // The list of permissions the macaroon should be checked against. Only if
5156+ // the macaroon contains all of these permissions, it is considered valid.
5157+ // If the list of permissions given is empty, then the macaroon is
5158+ // considered valid only based on issuance authority and caveat validity.
5159+ // An empty list of permissions is therefore equivalent to saying "skip
5160+ // checking permissions" (unless check_default_perms_from_full_method is
5161+ // specified).
50555162 repeated MacaroonPermission permissions = 2 ;
5163+
5164+ // The RPC method to check the macaroon against. This is only used if there
5165+ // are custom `uri:<rpcpackage>.<ServiceName>/<MethodName>` permissions in
5166+ // the permission list above. To check a macaroon against the list of
5167+ // permissions of a certain RPC method, query the `ListPermissions` RPC
5168+ // first, extract the permissions for the method, and then pass them in the
5169+ // `permissions` field above.
50565170 string fullMethod = 3 ;
5171+
5172+ // If this field is set to true, then the permissions list above MUST be
5173+ // empty. The default permissions for the provided fullMethod will be used
5174+ // to check the macaroon. This is equivalent to looking up the permissions
5175+ // for a method in the `ListPermissions` RPC and then calling this RPC with
5176+ // the permission list returned from that call. Without this flag, the list
5177+ // of permissions must be non-empty for the check to actually perform a
5178+ // permission check.
5179+ bool check_default_perms_from_full_method = 4 ;
50575180}
50585181
50595182message CheckMacPermResponse {
0 commit comments