@@ -1236,13 +1236,15 @@ export interface Peer {
12361236 */
12371237 errors : TimestampedError [ ] ;
12381238 /**
1239+ * This field is populated when the peer has at least one channel with us.
12391240 * The number of times we have recorded this peer going offline or coming
12401241 * online, recorded across restarts. Note that this value is decreased over
12411242 * time if the peer has not recently flapped, so that we can forgive peers
12421243 * with historically high flap counts.
12431244 */
12441245 flapCount : number ;
12451246 /**
1247+ * This field is populated when the peer has at least one channel with us.
12461248 * The timestamp of the last flap we observed for this peer. If this value is
12471249 * zero, we have not observed any flaps for this peer.
12481250 */
@@ -1400,12 +1402,6 @@ export interface Chain {
14001402 network : string ;
14011403}
14021404
1403- export interface ConfirmationUpdate {
1404- blockSha : Uint8Array | string ;
1405- blockHeight : number ;
1406- numConfsLeft : number ;
1407- }
1408-
14091405export interface ChannelOpenUpdate {
14101406 channelPoint : ChannelPoint | undefined ;
14111407}
@@ -2123,6 +2119,27 @@ export interface PendingChannelsResponse_PendingOpenChannel {
21232119 * fully operational.
21242120 */
21252121 fundingExpiryBlocks : number ;
2122+ /**
2123+ * The number of blocks remaining until the channel status changes from
2124+ * pending to active. A value of 0 indicates that the channel is now
2125+ * active.
2126+ *
2127+ * "Active" here means both channel peers have the channel marked OPEN
2128+ * and can immediately start using it. For public channels, this does
2129+ * not imply a channel_announcement has been gossiped. It only becomes
2130+ * public on the network after 6 on‐chain confirmations.
2131+ * See BOLT07 "Routing Gossip":
2132+ * https://github.com/lightning/bolts/blob/master/07-routing-gossip.md
2133+ *
2134+ * ZeroConf channels bypass the pending state entirely: they are marked
2135+ * active immediately upon creation, so they never show up as "pending".
2136+ */
2137+ confirmationsUntilActive : number ;
2138+ /**
2139+ * The confirmation height records the block height at which the funding
2140+ * transaction was first confirmed.
2141+ */
2142+ confirmationHeight : number ;
21262143}
21272144
21282145export interface PendingChannelsResponse_WaitingCloseChannel {
@@ -2220,6 +2237,7 @@ export interface ChannelEventUpdate {
22202237 inactiveChannel : ChannelPoint | undefined ;
22212238 pendingOpenChannel : PendingUpdate | undefined ;
22222239 fullyResolvedChannel : ChannelPoint | undefined ;
2240+ channelFundingTimeout : ChannelPoint | undefined ;
22232241 type : ChannelEventUpdate_UpdateType ;
22242242}
22252243
@@ -2230,6 +2248,7 @@ export enum ChannelEventUpdate_UpdateType {
22302248 INACTIVE_CHANNEL = 'INACTIVE_CHANNEL' ,
22312249 PENDING_OPEN_CHANNEL = 'PENDING_OPEN_CHANNEL' ,
22322250 FULLY_RESOLVED_CHANNEL = 'FULLY_RESOLVED_CHANNEL' ,
2251+ CHANNEL_FUNDING_TIMEOUT = 'CHANNEL_FUNDING_TIMEOUT' ,
22332252 UNRECOGNIZED = 'UNRECOGNIZED'
22342253}
22352254
@@ -2391,8 +2410,10 @@ export interface QueryRoutesRequest {
23912410 */
23922411 destCustomRecords : { [ key : string ] : Uint8Array | string } ;
23932412 /**
2394- * The channel id of the channel that must be taken to the first hop. If zero,
2395- * any channel may be used.
2413+ * Deprecated, use outgoing_chan_ids. The channel id of the channel that must
2414+ * be taken to the first hop. If zero, any channel may be used.
2415+ *
2416+ * @deprecated
23962417 */
23972418 outgoingChanId : string ;
23982419 /** The pubkey of the last hop of the route. If empty, any hop may be used. */
@@ -2420,6 +2441,11 @@ export interface QueryRoutesRequest {
24202441 * only, to 1 to optimize for reliability only or a value inbetween for a mix.
24212442 */
24222443 timePref : number ;
2444+ /**
2445+ * The channel ids of the channels allowed for the first hop. If empty, any
2446+ * channel may be used.
2447+ */
2448+ outgoingChanIds : string [ ] ;
24232449}
24242450
24252451export interface QueryRoutesRequest_DestCustomRecordsEntry {
@@ -2628,6 +2654,11 @@ export interface NodeInfoRequest {
26282654 pubKey : string ;
26292655 /** If true, will include all known channels associated with the node. */
26302656 includeChannels : boolean ;
2657+ /**
2658+ * If true, will include announcements' signatures into ChannelEdge.
2659+ * Depends on include_channels.
2660+ */
2661+ includeAuthProof : boolean ;
26312662}
26322663
26332664export interface NodeInfo {
@@ -2686,7 +2717,10 @@ export interface RoutingPolicy {
26862717 disabled : boolean ;
26872718 maxHtlcMsat : string ;
26882719 lastUpdate : number ;
2689- /** Custom channel update tlv records. */
2720+ /**
2721+ * Custom channel update tlv records. These are customized fields that are
2722+ * not defined by LND and cannot be extracted.
2723+ */
26902724 customRecords : { [ key : string ] : Uint8Array | string } ;
26912725 inboundFeeBaseMsat : number ;
26922726 inboundFeeRateMilliMsat : number ;
@@ -2697,6 +2731,36 @@ export interface RoutingPolicy_CustomRecordsEntry {
26972731 value : Uint8Array | string ;
26982732}
26992733
2734+ /**
2735+ * ChannelAuthProof is the authentication proof (the signature portion) for a
2736+ * channel. Using the four signatures contained in the struct, and some
2737+ * auxiliary knowledge (the funding script, node identities, and outpoint) nodes
2738+ * on the network are able to validate the authenticity and existence of a
2739+ * channel.
2740+ */
2741+ export interface ChannelAuthProof {
2742+ /**
2743+ * node_sig1 are the raw bytes of the first node signature encoded
2744+ * in DER format.
2745+ */
2746+ nodeSig1 : Uint8Array | string ;
2747+ /**
2748+ * bitcoin_sig1 are the raw bytes of the first bitcoin signature of the
2749+ * MultiSigKey key of the channel encoded in DER format.
2750+ */
2751+ bitcoinSig1 : Uint8Array | string ;
2752+ /**
2753+ * node_sig2 are the raw bytes of the second node signature encoded
2754+ * in DER format.
2755+ */
2756+ nodeSig2 : Uint8Array | string ;
2757+ /**
2758+ * bitcoin_sig2 are the raw bytes of the second bitcoin signature of the
2759+ * MultiSigKey key of the channel encoded in DER format.
2760+ */
2761+ bitcoinSig2 : Uint8Array | string ;
2762+ }
2763+
27002764/**
27012765 * A fully authenticated channel along with all its unique attributes.
27022766 * Once an authenticated channel announcement has been processed on the network,
@@ -2721,6 +2785,14 @@ export interface ChannelEdge {
27212785 node2Policy : RoutingPolicy | undefined ;
27222786 /** Custom channel announcement tlv records. */
27232787 customRecords : { [ key : string ] : Uint8Array | string } ;
2788+ /**
2789+ * Authentication proof for this channel. This proof contains a set of
2790+ * signatures binding four identities, which attests to the legitimacy of
2791+ * the advertised channel. This only is available for advertised channels.
2792+ * This field is not filled by default. Pass include_auth_proof flag to
2793+ * DescribeGraph, GetNodeInfo or GetChanInfo to get this data.
2794+ */
2795+ authProof : ChannelAuthProof | undefined ;
27242796}
27252797
27262798export interface ChannelEdge_CustomRecordsEntry {
@@ -2735,6 +2807,8 @@ export interface ChannelGraphRequest {
27352807 * channels, and public channels that are not yet announced to the network.
27362808 */
27372809 includeUnannounced : boolean ;
2810+ /** If true, will include announcements' signatures into ChannelEdge. */
2811+ includeAuthProof : boolean ;
27382812}
27392813
27402814/** Returns a new instance of the directed channel graph. */
@@ -2785,6 +2859,8 @@ export interface ChanInfoRequest {
27852859 * chan_id is specified, this field is ignored.
27862860 */
27872861 chanPoint : string ;
2862+ /** If true, will include announcements' signatures into ChannelEdge. */
2863+ includeAuthProof : boolean ;
27882864}
27892865
27902866export interface NetworkInfoRequest { }
@@ -3181,6 +3257,11 @@ export interface BlindedPathConfig {
31813257 * blinded paths.
31823258 */
31833259 nodeOmissionList : Uint8Array | string [ ] ;
3260+ /**
3261+ * The chained channels list specified via channel id (separated by commas),
3262+ * starting from a channel owned by the receiver node.
3263+ */
3264+ incomingChannelList : string [ ] ;
31843265}
31853266
31863267/** Details of an HTLC that paid to an invoice */
@@ -3345,6 +3426,16 @@ export interface InvoiceSubscription {
33453426 settleIndex : string ;
33463427}
33473428
3429+ export interface DelCanceledInvoiceReq {
3430+ /** Invoice payment hash to delete. */
3431+ invoiceHash : string ;
3432+ }
3433+
3434+ export interface DelCanceledInvoiceResp {
3435+ /** The status of the delete operation. */
3436+ status : string ;
3437+ }
3438+
33483439export interface Payment {
33493440 /** The payment hash */
33503441 paymentHash : string ;
@@ -3749,6 +3840,16 @@ export interface ForwardingHistoryRequest {
37493840 * forwarding event.
37503841 */
37513842 peerAliasLookup : boolean ;
3843+ /**
3844+ * List of incoming channel ids to filter htlcs received from a
3845+ * particular channel
3846+ */
3847+ incomingChanIds : string [ ] ;
3848+ /**
3849+ * List of outgoing channel ids to filter htlcs being forwarded to a
3850+ * particular channel
3851+ */
3852+ outgoingChanIds : string [ ] ;
37523853}
37533854
37543855export interface ForwardingEvent {
@@ -3799,6 +3900,16 @@ export interface ForwardingEvent {
37993900 peerAliasIn : string ;
38003901 /** The peer alias of the outgoing channel. */
38013902 peerAliasOut : string ;
3903+ /**
3904+ * The ID of the incoming HTLC in the payment circuit. This field is
3905+ * optional and is unset for forwarding events happened before v0.20.
3906+ */
3907+ incomingHtlcId ?: string | undefined ;
3908+ /**
3909+ * The ID of the outgoing HTLC in the payment circuit. This field is
3910+ * optional and may be unset for legacy forwarding events.
3911+ */
3912+ outgoingHtlcId ?: string | undefined ;
38023913}
38033914
38043915export interface ForwardingHistoryResponse {
@@ -4087,9 +4198,42 @@ export interface Op {
40874198}
40884199
40894200export interface CheckMacPermRequest {
4201+ /**
4202+ * The macaroon to check permissions for, serialized in binary format. For
4203+ * a macaroon to be valid, it must have been issued by lnd, must succeed all
4204+ * caveat conditions, and must contain all of the permissions specified in
4205+ * the permissions field.
4206+ */
40904207 macaroon : Uint8Array | string ;
4208+ /**
4209+ * The list of permissions the macaroon should be checked against. Only if
4210+ * the macaroon contains all of these permissions, it is considered valid.
4211+ * If the list of permissions given is empty, then the macaroon is
4212+ * considered valid only based on issuance authority and caveat validity.
4213+ * An empty list of permissions is therefore equivalent to saying "skip
4214+ * checking permissions" (unless check_default_perms_from_full_method is
4215+ * specified).
4216+ */
40914217 permissions : MacaroonPermission [ ] ;
4218+ /**
4219+ * The RPC method to check the macaroon against. This is only used if there
4220+ * are custom `uri:<rpcpackage>.<ServiceName>/<MethodName>` permissions in
4221+ * the permission list above. To check a macaroon against the list of
4222+ * permissions of a certain RPC method, query the `ListPermissions` RPC
4223+ * first, extract the permissions for the method, and then pass them in the
4224+ * `permissions` field above.
4225+ */
40924226 fullMethod : string ;
4227+ /**
4228+ * If this field is set to true, then the permissions list above MUST be
4229+ * empty. The default permissions for the provided fullMethod will be used
4230+ * to check the macaroon. This is equivalent to looking up the permissions
4231+ * for a method in the `ListPermissions` RPC and then calling this RPC with
4232+ * the permission list returned from that call. Without this flag, the list
4233+ * of permissions must be non-empty for the check to actually perform a
4234+ * permission check.
4235+ */
4236+ checkDefaultPermsFromFullMethod : boolean ;
40934237}
40944238
40954239export interface CheckMacPermResponse {
@@ -4675,6 +4819,14 @@ export interface Lightning {
46754819 onMessage ?: ( msg : Invoice ) => void ,
46764820 onError ?: ( err : Error ) => void
46774821 ) : void ;
4822+ /**
4823+ * lncli: `deletecanceledinvoice`
4824+ * DeleteCanceledInvoice removes a canceled invoice from the database. If the
4825+ * invoice is not in the canceled state, an error will be returned.
4826+ */
4827+ deleteCanceledInvoice (
4828+ request ?: DeepPartial < DelCanceledInvoiceReq >
4829+ ) : Promise < DelCanceledInvoiceResp > ;
46784830 /**
46794831 * lncli: `decodepayreq`
46804832 * DecodePayReq takes an encoded payment request string and attempts to decode
@@ -4913,9 +5065,10 @@ export interface Lightning {
49135065 request ?: DeepPartial < ListPermissionsRequest >
49145066 ) : Promise < ListPermissionsResponse > ;
49155067 /**
4916- * CheckMacaroonPermissions checks whether a request follows the constraints
4917- * imposed on the macaroon and that the macaroon is authorized to follow the
4918- * provided permissions.
5068+ * CheckMacaroonPermissions checks whether the provided macaroon contains all
5069+ * the provided permissions. If the macaroon is valid (e.g. all caveats are
5070+ * satisfied), and all permissions provided in the request are met, then
5071+ * this RPC returns true.
49195072 */
49205073 checkMacaroonPermissions (
49215074 request ?: DeepPartial < CheckMacPermRequest >
0 commit comments