Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/types/proto/authmailboxrpc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './tapd/authmailboxrpc/mailbox';
4 changes: 4 additions & 0 deletions lib/types/proto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as autopilotrpc from './autopilotrpc';
import * as chainrpc from './chainrpc';
import * as invoicesrpc from './invoicesrpc';
import * as lnrpc from './lnrpc';
import * as peersrpc from './peersrpc';
import * as routerrpc from './routerrpc';
import * as signrpc from './signrpc';
import * as walletrpc from './walletrpc';
Expand All @@ -12,6 +13,7 @@ import * as wtclientrpc from './wtclientrpc';
import * as looprpc from './looprpc';
import * as poolrpc from './poolrpc';
import * as assetwalletrpc from './assetwalletrpc';
import * as authmailboxrpc from './authmailboxrpc';
import * as mintrpc from './mintrpc';
import * as priceoraclerpc from './priceoraclerpc';
import * as rfqrpc from './rfqrpc';
Expand All @@ -26,6 +28,7 @@ export {
chainrpc,
invoicesrpc,
lnrpc,
peersrpc,
routerrpc,
signrpc,
walletrpc,
Expand All @@ -34,6 +37,7 @@ export {
looprpc,
poolrpc,
assetwalletrpc,
authmailboxrpc,
mintrpc,
priceoraclerpc,
rfqrpc,
Expand Down
177 changes: 165 additions & 12 deletions lib/types/proto/lnd/lightning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1236,13 +1236,15 @@ export interface Peer {
*/
errors: TimestampedError[];
/**
* This field is populated when the peer has at least one channel with us.
* The number of times we have recorded this peer going offline or coming
* online, recorded across restarts. Note that this value is decreased over
* time if the peer has not recently flapped, so that we can forgive peers
* with historically high flap counts.
*/
flapCount: number;
/**
* This field is populated when the peer has at least one channel with us.
* The timestamp of the last flap we observed for this peer. If this value is
* zero, we have not observed any flaps for this peer.
*/
Expand Down Expand Up @@ -1400,12 +1402,6 @@ export interface Chain {
network: string;
}

export interface ConfirmationUpdate {
blockSha: Uint8Array | string;
blockHeight: number;
numConfsLeft: number;
}

export interface ChannelOpenUpdate {
channelPoint: ChannelPoint | undefined;
}
Expand Down Expand Up @@ -2123,6 +2119,27 @@ export interface PendingChannelsResponse_PendingOpenChannel {
* fully operational.
*/
fundingExpiryBlocks: number;
/**
* The number of blocks remaining until the channel status changes from
* pending to active. A value of 0 indicates that the channel is now
* active.
*
* "Active" here means both channel peers have the channel marked OPEN
* and can immediately start using it. For public channels, this does
* not imply a channel_announcement has been gossiped. It only becomes
* public on the network after 6 on‐chain confirmations.
* See BOLT07 "Routing Gossip":
* https://github.com/lightning/bolts/blob/master/07-routing-gossip.md
*
* ZeroConf channels bypass the pending state entirely: they are marked
* active immediately upon creation, so they never show up as "pending".
*/
confirmationsUntilActive: number;
/**
* The confirmation height records the block height at which the funding
* transaction was first confirmed.
*/
confirmationHeight: number;
}

export interface PendingChannelsResponse_WaitingCloseChannel {
Expand Down Expand Up @@ -2220,6 +2237,7 @@ export interface ChannelEventUpdate {
inactiveChannel: ChannelPoint | undefined;
pendingOpenChannel: PendingUpdate | undefined;
fullyResolvedChannel: ChannelPoint | undefined;
channelFundingTimeout: ChannelPoint | undefined;
type: ChannelEventUpdate_UpdateType;
}

Expand All @@ -2230,6 +2248,7 @@ export enum ChannelEventUpdate_UpdateType {
INACTIVE_CHANNEL = 'INACTIVE_CHANNEL',
PENDING_OPEN_CHANNEL = 'PENDING_OPEN_CHANNEL',
FULLY_RESOLVED_CHANNEL = 'FULLY_RESOLVED_CHANNEL',
CHANNEL_FUNDING_TIMEOUT = 'CHANNEL_FUNDING_TIMEOUT',
UNRECOGNIZED = 'UNRECOGNIZED'
}

Expand Down Expand Up @@ -2391,8 +2410,10 @@ export interface QueryRoutesRequest {
*/
destCustomRecords: { [key: string]: Uint8Array | string };
/**
* The channel id of the channel that must be taken to the first hop. If zero,
* any channel may be used.
* Deprecated, use outgoing_chan_ids. The channel id of the channel that must
* be taken to the first hop. If zero, any channel may be used.
*
* @deprecated
*/
outgoingChanId: string;
/** The pubkey of the last hop of the route. If empty, any hop may be used. */
Expand Down Expand Up @@ -2420,6 +2441,11 @@ export interface QueryRoutesRequest {
* only, to 1 to optimize for reliability only or a value inbetween for a mix.
*/
timePref: number;
/**
* The channel ids of the channels allowed for the first hop. If empty, any
* channel may be used.
*/
outgoingChanIds: string[];
}

export interface QueryRoutesRequest_DestCustomRecordsEntry {
Expand Down Expand Up @@ -2628,6 +2654,11 @@ export interface NodeInfoRequest {
pubKey: string;
/** If true, will include all known channels associated with the node. */
includeChannels: boolean;
/**
* If true, will include announcements' signatures into ChannelEdge.
* Depends on include_channels.
*/
includeAuthProof: boolean;
}

export interface NodeInfo {
Expand Down Expand Up @@ -2686,7 +2717,10 @@ export interface RoutingPolicy {
disabled: boolean;
maxHtlcMsat: string;
lastUpdate: number;
/** Custom channel update tlv records. */
/**
* Custom channel update tlv records. These are customized fields that are
* not defined by LND and cannot be extracted.
*/
customRecords: { [key: string]: Uint8Array | string };
inboundFeeBaseMsat: number;
inboundFeeRateMilliMsat: number;
Expand All @@ -2697,6 +2731,36 @@ export interface RoutingPolicy_CustomRecordsEntry {
value: Uint8Array | string;
}

/**
* ChannelAuthProof is the authentication proof (the signature portion) for a
* channel. Using the four signatures contained in the struct, and some
* auxiliary knowledge (the funding script, node identities, and outpoint) nodes
* on the network are able to validate the authenticity and existence of a
* channel.
*/
export interface ChannelAuthProof {
/**
* node_sig1 are the raw bytes of the first node signature encoded
* in DER format.
*/
nodeSig1: Uint8Array | string;
/**
* bitcoin_sig1 are the raw bytes of the first bitcoin signature of the
* MultiSigKey key of the channel encoded in DER format.
*/
bitcoinSig1: Uint8Array | string;
/**
* node_sig2 are the raw bytes of the second node signature encoded
* in DER format.
*/
nodeSig2: Uint8Array | string;
/**
* bitcoin_sig2 are the raw bytes of the second bitcoin signature of the
* MultiSigKey key of the channel encoded in DER format.
*/
bitcoinSig2: Uint8Array | string;
}

/**
* A fully authenticated channel along with all its unique attributes.
* Once an authenticated channel announcement has been processed on the network,
Expand All @@ -2721,6 +2785,14 @@ export interface ChannelEdge {
node2Policy: RoutingPolicy | undefined;
/** Custom channel announcement tlv records. */
customRecords: { [key: string]: Uint8Array | string };
/**
* Authentication proof for this channel. This proof contains a set of
* signatures binding four identities, which attests to the legitimacy of
* the advertised channel. This only is available for advertised channels.
* This field is not filled by default. Pass include_auth_proof flag to
* DescribeGraph, GetNodeInfo or GetChanInfo to get this data.
*/
authProof: ChannelAuthProof | undefined;
}

export interface ChannelEdge_CustomRecordsEntry {
Expand All @@ -2735,6 +2807,8 @@ export interface ChannelGraphRequest {
* channels, and public channels that are not yet announced to the network.
*/
includeUnannounced: boolean;
/** If true, will include announcements' signatures into ChannelEdge. */
includeAuthProof: boolean;
}

/** Returns a new instance of the directed channel graph. */
Expand Down Expand Up @@ -2785,6 +2859,8 @@ export interface ChanInfoRequest {
* chan_id is specified, this field is ignored.
*/
chanPoint: string;
/** If true, will include announcements' signatures into ChannelEdge. */
includeAuthProof: boolean;
}

export interface NetworkInfoRequest {}
Expand Down Expand Up @@ -3181,6 +3257,11 @@ export interface BlindedPathConfig {
* blinded paths.
*/
nodeOmissionList: Uint8Array | string[];
/**
* The chained channels list specified via channel id (separated by commas),
* starting from a channel owned by the receiver node.
*/
incomingChannelList: string[];
}

/** Details of an HTLC that paid to an invoice */
Expand Down Expand Up @@ -3345,6 +3426,16 @@ export interface InvoiceSubscription {
settleIndex: string;
}

export interface DelCanceledInvoiceReq {
/** Invoice payment hash to delete. */
invoiceHash: string;
}

export interface DelCanceledInvoiceResp {
/** The status of the delete operation. */
status: string;
}

export interface Payment {
/** The payment hash */
paymentHash: string;
Expand Down Expand Up @@ -3749,6 +3840,16 @@ export interface ForwardingHistoryRequest {
* forwarding event.
*/
peerAliasLookup: boolean;
/**
* List of incoming channel ids to filter htlcs received from a
* particular channel
*/
incomingChanIds: string[];
/**
* List of outgoing channel ids to filter htlcs being forwarded to a
* particular channel
*/
outgoingChanIds: string[];
}

export interface ForwardingEvent {
Expand Down Expand Up @@ -3799,6 +3900,16 @@ export interface ForwardingEvent {
peerAliasIn: string;
/** The peer alias of the outgoing channel. */
peerAliasOut: string;
/**
* The ID of the incoming HTLC in the payment circuit. This field is
* optional and is unset for forwarding events happened before v0.20.
*/
incomingHtlcId?: string | undefined;
/**
* The ID of the outgoing HTLC in the payment circuit. This field is
* optional and may be unset for legacy forwarding events.
*/
outgoingHtlcId?: string | undefined;
}

export interface ForwardingHistoryResponse {
Expand Down Expand Up @@ -4087,9 +4198,42 @@ export interface Op {
}

export interface CheckMacPermRequest {
/**
* The macaroon to check permissions for, serialized in binary format. For
* a macaroon to be valid, it must have been issued by lnd, must succeed all
* caveat conditions, and must contain all of the permissions specified in
* the permissions field.
*/
macaroon: Uint8Array | string;
/**
* The list of permissions the macaroon should be checked against. Only if
* the macaroon contains all of these permissions, it is considered valid.
* If the list of permissions given is empty, then the macaroon is
* considered valid only based on issuance authority and caveat validity.
* An empty list of permissions is therefore equivalent to saying "skip
* checking permissions" (unless check_default_perms_from_full_method is
* specified).
*/
permissions: MacaroonPermission[];
/**
* The RPC method to check the macaroon against. This is only used if there
* are custom `uri:<rpcpackage>.<ServiceName>/<MethodName>` permissions in
* the permission list above. To check a macaroon against the list of
* permissions of a certain RPC method, query the `ListPermissions` RPC
* first, extract the permissions for the method, and then pass them in the
* `permissions` field above.
*/
fullMethod: string;
/**
* If this field is set to true, then the permissions list above MUST be
* empty. The default permissions for the provided fullMethod will be used
* to check the macaroon. This is equivalent to looking up the permissions
* for a method in the `ListPermissions` RPC and then calling this RPC with
* the permission list returned from that call. Without this flag, the list
* of permissions must be non-empty for the check to actually perform a
* permission check.
*/
checkDefaultPermsFromFullMethod: boolean;
}

export interface CheckMacPermResponse {
Expand Down Expand Up @@ -4675,6 +4819,14 @@ export interface Lightning {
onMessage?: (msg: Invoice) => void,
onError?: (err: Error) => void
): void;
/**
* lncli: `deletecanceledinvoice`
* DeleteCanceledInvoice removes a canceled invoice from the database. If the
* invoice is not in the canceled state, an error will be returned.
*/
deleteCanceledInvoice(
request?: DeepPartial<DelCanceledInvoiceReq>
): Promise<DelCanceledInvoiceResp>;
/**
* lncli: `decodepayreq`
* DecodePayReq takes an encoded payment request string and attempts to decode
Expand Down Expand Up @@ -4913,9 +5065,10 @@ export interface Lightning {
request?: DeepPartial<ListPermissionsRequest>
): Promise<ListPermissionsResponse>;
/**
* CheckMacaroonPermissions checks whether a request follows the constraints
* imposed on the macaroon and that the macaroon is authorized to follow the
* provided permissions.
* CheckMacaroonPermissions checks whether the provided macaroon contains all
* the provided permissions. If the macaroon is valid (e.g. all caveats are
* satisfied), and all permissions provided in the request are met, then
* this RPC returns true.
*/
checkMacaroonPermissions(
request?: DeepPartial<CheckMacPermRequest>
Expand Down
Loading