From 952b0da8df767da1b2554810b0ac2b1ee6f759a6 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:28:00 -0500 Subject: [PATCH] lib+protos: bump lnd to v0.18.4-beta --- lib/types/proto/lnd/invoicesrpc/invoices.ts | 64 +++++++- lib/types/proto/lnd/lightning.ts | 122 +++++++++++++++- lib/types/proto/lnd/routerrpc/router.ts | 126 ++++++++++++++++ lib/types/proto/lnd/walletrpc/walletkit.ts | 2 + lib/types/proto/schema.ts | 1 + lib/types/proto/tapd/lightning.ts | 122 +++++++++++++++- lib/types/proto/tapd/routerrpc/router.ts | 126 ++++++++++++++++ package.json | 2 +- .../autopilotrpc/autopilot.proto | 0 .../chainrpc/chainnotifier.proto | 0 .../invoicesrpc/invoices.proto | 59 +++++++- .../lightning.proto | 137 +++++++++++++++++- .../routerrpc/router.proto | 100 +++++++++++++ .../signrpc/signer.proto | 0 .../walletrpc/walletkit.proto | 3 + .../walletunlocker.proto | 0 .../watchtowerrpc/watchtower.proto | 0 .../wtclientrpc/wtclient.proto | 0 18 files changed, 849 insertions(+), 15 deletions(-) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/autopilotrpc/autopilot.proto (100%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/chainrpc/chainnotifier.proto (100%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/invoicesrpc/invoices.proto (73%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/lightning.proto (97%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/routerrpc/router.proto (88%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/signrpc/signer.proto (100%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/walletrpc/walletkit.proto (99%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/walletunlocker.proto (100%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/watchtowerrpc/watchtower.proto (100%) rename protos/lnd/{v0.18.2-beta => v0.18.4-beta.rc2}/wtclientrpc/wtclient.proto (100%) diff --git a/lib/types/proto/lnd/invoicesrpc/invoices.ts b/lib/types/proto/lnd/invoicesrpc/invoices.ts index f326b4f..61d2fa2 100644 --- a/lib/types/proto/lnd/invoicesrpc/invoices.ts +++ b/lib/types/proto/lnd/invoicesrpc/invoices.ts @@ -121,6 +121,57 @@ export interface LookupInvoiceMsg { lookupModifier: LookupModifier; } +/** CircuitKey is a unique identifier for an HTLC. */ +export interface CircuitKey { + /** The id of the channel that the is part of this circuit. */ + chanId: string; + /** The index of the incoming htlc in the incoming channel. */ + htlcId: string; +} + +export interface HtlcModifyRequest { + /** + * The invoice the intercepted HTLC is attempting to settle. The HTLCs in + * the invoice are only HTLCs that have already been accepted or settled, + * not including the current intercepted HTLC. + */ + invoice: Invoice | undefined; + /** The unique identifier of the HTLC of this intercepted HTLC. */ + exitHtlcCircuitKey: CircuitKey | undefined; + /** The amount in milli-satoshi that the exit HTLC is attempting to pay. */ + exitHtlcAmt: string; + /** The absolute expiry height of the exit HTLC. */ + exitHtlcExpiry: number; + /** The current block height. */ + currentHeight: number; + /** The wire message custom records of the exit HTLC. */ + exitHtlcWireCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface HtlcModifyRequest_ExitHtlcWireCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + +export interface HtlcModifyResponse { + /** The circuit key of the HTLC that the client wants to modify. */ + circuitKey: CircuitKey | undefined; + /** + * The modified amount in milli-satoshi that the exit HTLC is paying. This + * value can be different from the actual on-chain HTLC amount, in case the + * HTLC carries other valuable items, as can be the case with custom channel + * types. + */ + amtPaid?: string | undefined; + /** + * This flag indicates whether the HTLCs associated with the invoices should + * be cancelled. The interceptor client may set this field if some + * unexpected behavior is encountered. Setting this will ignore the amt_paid + * field. + */ + cancelSet: boolean; +} + /** * Invoices is a service that can be used to create, accept, settle and cancel * invoices. @@ -162,10 +213,21 @@ export interface Invoices { request?: DeepPartial ): Promise; /** - * LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced + * LookupInvoiceV2 attempts to look up at invoice. An invoice can be referenced * using either its payment hash, payment address, or set ID. */ lookupInvoiceV2(request?: DeepPartial): Promise; + /** + * HtlcModifier is a bidirectional streaming RPC that allows a client to + * intercept and modify the HTLCs that attempt to settle the given invoice. The + * server will send HTLCs of invoices to the client and the client can modify + * some aspects of the HTLC in order to pass the invoice acceptance tests. + */ + htlcModifier( + request?: DeepPartial, + onMessage?: (msg: HtlcModifyRequest) => void, + onError?: (err: Error) => void + ): void; } type Builtin = diff --git a/lib/types/proto/lnd/lightning.ts b/lib/types/proto/lnd/lightning.ts index 9867fd2..de8a03c 100644 --- a/lib/types/proto/lnd/lightning.ts +++ b/lib/types/proto/lnd/lightning.ts @@ -73,8 +73,17 @@ export enum CommitmentType { * channel before its maturity date. */ SCRIPT_ENFORCED_LEASE = 'SCRIPT_ENFORCED_LEASE', - /** SIMPLE_TAPROOT - TODO(roasbeef): need script enforce mirror type for the above as well? */ + /** + * SIMPLE_TAPROOT - A channel that uses musig2 for the funding output, and the new tapscript + * features where relevant. + */ SIMPLE_TAPROOT = 'SIMPLE_TAPROOT', + /** + * SIMPLE_TAPROOT_OVERLAY - Identical to the SIMPLE_TAPROOT channel type, but with extra functionality. + * This channel type also commits to additional meta data in the tapscript + * leaves for the scripts in a channel. + */ + SIMPLE_TAPROOT_OVERLAY = 'SIMPLE_TAPROOT_OVERLAY', UNRECOGNIZED = 'UNRECOGNIZED' } @@ -164,6 +173,8 @@ export enum PaymentFailureReason { FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 'FAILURE_REASON_INCORRECT_PAYMENT_DETAILS', /** FAILURE_REASON_INSUFFICIENT_BALANCE - Insufficient local balance. */ FAILURE_REASON_INSUFFICIENT_BALANCE = 'FAILURE_REASON_INSUFFICIENT_BALANCE', + /** FAILURE_REASON_CANCELED - The payment was canceled. */ + FAILURE_REASON_CANCELED = 'FAILURE_REASON_CANCELED', UNRECOGNIZED = 'UNRECOGNIZED' } @@ -729,9 +740,8 @@ export interface SendCoinsRequest { */ satPerByte: string; /** - * If set, then the amount field will be ignored, and lnd will attempt to - * send all the coins under control of the internal wallet to the specified - * address. + * If set, the amount field should be unset. It indicates lnd will send all + * wallet coins or all selected coins to the specified address. */ sendAll: boolean; /** An optional label for the transaction, limited to 500 characters. */ @@ -745,6 +755,8 @@ export interface SendCoinsRequest { spendUnconfirmed: boolean; /** The strategy to use for selecting coins. */ coinSelectionStrategy: CoinSelectionStrategy; + /** A list of selected outpoints as inputs for the transaction. */ + outpoints: OutPoint[]; } export interface SendCoinsResponse { @@ -1027,6 +1039,8 @@ export interface Channel { * the channel's operation. */ memo: string; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface ListChannelsRequest { @@ -1356,9 +1370,39 @@ export interface ChannelOpenUpdate { channelPoint: ChannelPoint | undefined; } +export interface CloseOutput { + /** + * The amount in satoshi of this close output. This amount is the final + * commitment balance of the channel and the actual amount paid out on chain + * might be smaller due to subtracted fees. + */ + amountSat: string; + /** The pkScript of the close output. */ + pkScript: Uint8Array | string; + /** Whether this output is for the local or remote node. */ + isLocal: boolean; + /** + * The TLV encoded custom channel data records for this output, which might + * be set for custom channels. + */ + customChannelData: Uint8Array | string; +} + export interface ChannelCloseUpdate { closingTxid: Uint8Array | string; success: boolean; + /** + * The local channel close output. If the local channel balance was dust to + * begin with, this output will not be set. + */ + localCloseOutput: CloseOutput | undefined; + /** + * The remote channel close output. If the remote channel balance was dust + * to begin with, this output will not be set. + */ + remoteCloseOutput: CloseOutput | undefined; + /** Any additional outputs that might be added for custom channel types. */ + additionalOutputs: CloseOutput[]; } export interface CloseChannelRequest { @@ -1991,6 +2035,8 @@ export interface PendingChannelsResponse_PendingChannel { * impacts the channel's operation. */ memo: string; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface PendingChannelsResponse_PendingOpenChannel { @@ -2212,6 +2258,11 @@ export interface ChannelBalanceResponse { pendingOpenLocalBalance: Amount | undefined; /** Sum of channels pending remote balances. */ pendingOpenRemoteBalance: Amount | undefined; + /** + * Custom channel data that might be populated if there are custom channels + * present. + */ + customChannelData: Uint8Array | string; } export interface QueryRoutesRequest { @@ -2507,6 +2558,16 @@ export interface Route { totalFeesMsat: string; /** The total amount in millisatoshis. */ totalAmtMsat: string; + /** + * The actual on-chain amount that was sent out to the first hop. This value is + * only different from the total_amt_msat field if this is a custom channel + * payment and the value transported in the HTLC is different from the BTC + * amount in the HTLC. If this value is zero, then this is an old payment that + * didn't have this value yet and can be ignored. + */ + firstHopAmountMsat: string; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface NodeInfoRequest { @@ -2666,6 +2727,11 @@ export interface ChanInfoRequest { * output index for the channel. */ chanId: string; + /** + * The channel point of the channel in format funding_txid:output_index. If + * chan_id is specified, this field is ignored. + */ + chanPoint: string; } export interface NetworkInfoRequest {} @@ -3006,6 +3072,17 @@ export interface Invoice { * Note: Output only, don't specify for creating an invoice. */ ampInvoiceState: { [key: string]: AMPInvoiceState }; + /** + * Signals that the invoice should include blinded paths to hide the true + * identity of the recipient. + */ + isBlinded: boolean; + /** + * Config values to use when creating blinded paths for this invoice. These + * can be used to override the defaults config values provided in by the + * global config. This field is only used if is_blinded is true. + */ + blindedPathConfig: BlindedPathConfig | undefined; } export enum Invoice_InvoiceState { @@ -3026,6 +3103,30 @@ export interface Invoice_AmpInvoiceStateEntry { value: AMPInvoiceState | undefined; } +export interface BlindedPathConfig { + /** + * The minimum number of real hops to include in a blinded path. This doesn't + * include our node, so if the minimum is 1, then the path will contain at + * minimum our node along with an introduction node hop. If it is zero then + * the shortest path will use our node as an introduction node. + */ + minNumRealHops?: number | undefined; + /** + * The number of hops to include in a blinded path. This doesn't include our + * node, so if it is 1, then the path will contain our node along with an + * introduction node or dummy node hop. If paths shorter than NumHops is + * found, then they will be padded using dummy hops. + */ + numHops?: number | undefined; + /** The maximum number of blinded paths to select and add to an invoice. */ + maxNumPaths?: number | undefined; + /** + * A list of node IDs of nodes that should not be used in any of our generated + * blinded paths. + */ + nodeOmissionList: Uint8Array | string[]; +} + /** Details of an HTLC that paid to an invoice */ export interface InvoiceHTLC { /** Short channel id over which the htlc was received. */ @@ -3050,6 +3151,8 @@ export interface InvoiceHTLC { mppTotalAmtMsat: string; /** Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. */ amp: AMP | undefined; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface InvoiceHTLC_CustomRecordsEntry { @@ -3232,6 +3335,11 @@ export interface Payment { */ paymentIndex: string; failureReason: PaymentFailureReason; + /** + * The custom TLV records that were sent to the first hop as part of the HTLC + * wire message for this payment. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; } export enum Payment_PaymentStatus { @@ -3252,6 +3360,11 @@ export enum Payment_PaymentStatus { UNRECOGNIZED = 'UNRECOGNIZED' } +export interface Payment_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + export interface HTLCAttempt { /** The unique ID that is used for this attempt. */ attemptId: string; @@ -3408,6 +3521,7 @@ export interface PayReq { paymentAddr: Uint8Array | string; numMsat: string; features: { [key: number]: Feature }; + blindedPaths: BlindedPaymentPath[]; } export interface PayReq_FeaturesEntry { diff --git a/lib/types/proto/lnd/routerrpc/router.ts b/lib/types/proto/lnd/routerrpc/router.ts index dd5904e..9a1be56 100644 --- a/lib/types/proto/lnd/routerrpc/router.ts +++ b/lib/types/proto/lnd/routerrpc/router.ts @@ -8,6 +8,7 @@ import type { Failure, HTLCAttempt, ChannelPoint, + AliasMap, Payment } from '../lightning'; @@ -63,9 +64,20 @@ export enum PaymentState { } export enum ResolveHoldForwardAction { + /** + * SETTLE - SETTLE is an action that is used to settle an HTLC instead of forwarding + * it. + */ SETTLE = 'SETTLE', + /** FAIL - FAIL is an action that is used to fail an HTLC backwards. */ FAIL = 'FAIL', + /** RESUME - RESUME is an action that is used to resume a forward HTLC. */ RESUME = 'RESUME', + /** + * RESUME_MODIFIED - RESUME_MODIFIED is an action that is used to resume a hold forward HTLC + * with modifications specified during interception. + */ + RESUME_MODIFIED = 'RESUME_MODIFIED', UNRECOGNIZED = 'UNRECOGNIZED' } @@ -202,6 +214,22 @@ export interface SendPaymentRequest { * only, to 1 to optimize for reliability only or a value inbetween for a mix. */ timePref: number; + /** + * If set, the payment loop can be interrupted by manually canceling the + * payment context, even before the payment timeout is reached. Note that the + * payment may still succeed after cancellation, as in-flight attempts can + * still settle afterwards. Canceling will only prevent further attempts from + * being sent. + */ + cancelable: boolean; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to the first hop peer of this payment. This can be used to pass application + * specific data during the payment attempt. Record types are required to be in + * the custom range >= 65536. When using REST, the values must be encoded as + * base64. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; } export interface SendPaymentRequest_DestCustomRecordsEntry { @@ -209,6 +237,11 @@ export interface SendPaymentRequest_DestCustomRecordsEntry { value: Uint8Array | string; } +export interface SendPaymentRequest_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + export interface TrackPaymentRequest { /** The hash of the payment to look up. */ paymentHash: Uint8Array | string; @@ -292,6 +325,19 @@ export interface SendToRouteRequest { * routes, incorrect payment details, or insufficient funds. */ skipTempErr: boolean; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to the first hop peer of this payment. This can be used to pass application + * specific data during the payment attempt. Record types are required to be in + * the custom range >= 65536. When using REST, the values must be encoded as + * base64. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface SendToRouteRequest_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; } export interface SendToRouteResponse { @@ -528,6 +574,19 @@ export interface BuildRouteRequest { * This is also called payment secret in specifications (e.g. BOLT 11). */ paymentAddr: Uint8Array | string; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to the first hop peer of this payment. This can be used to pass application + * specific data during the payment attempt. Record types are required to be in + * the custom range >= 65536. When using REST, the values must be encoded as + * base64. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface BuildRouteRequest_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; } export interface BuildRouteResponse { @@ -685,6 +744,8 @@ export interface ForwardHtlcInterceptRequest { * channel from force-closing. */ autoFailHeight: number; + /** The custom records of the peer's incoming p2p wire message. */ + inWireCustomRecords: { [key: string]: Uint8Array | string }; } export interface ForwardHtlcInterceptRequest_CustomRecordsEntry { @@ -692,10 +753,17 @@ export interface ForwardHtlcInterceptRequest_CustomRecordsEntry { value: Uint8Array | string; } +export interface ForwardHtlcInterceptRequest_InWireCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + /** * ForwardHtlcInterceptResponse enables the caller to resolve a previously hold * forward. The caller can choose either to: * - `Resume`: Execute the default behavior (usually forward). + * - `ResumeModified`: Execute the default behavior (usually forward) with HTLC + * field modifications. * - `Reject`: Fail the htlc backwards. * - `Settle`: Settle this htlc with a given preimage. */ @@ -726,6 +794,28 @@ export interface ForwardHtlcInterceptResponse { * default value for this field. */ failureCode: Failure_FailureCode; + /** + * The amount that was set on the p2p wire message of the incoming HTLC. + * This field is ignored if the action is not RESUME_MODIFIED or the amount + * is zero. + */ + inAmountMsat: string; + /** + * The amount to set on the p2p wire message of the resumed HTLC. This field + * is ignored if the action is not RESUME_MODIFIED or the amount is zero. + */ + outAmountMsat: string; + /** + * Any custom records that should be set on the p2p wire message message of + * the resumed HTLC. This field is ignored if the action is not + * RESUME_MODIFIED. + */ + outWireCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface ForwardHtlcInterceptResponse_OutWireCustomRecordsEntry { + key: string; + value: Uint8Array | string; } export interface UpdateChanStatusRequest { @@ -735,6 +825,22 @@ export interface UpdateChanStatusRequest { export interface UpdateChanStatusResponse {} +export interface AddAliasesRequest { + aliasMaps: AliasMap[]; +} + +export interface AddAliasesResponse { + aliasMaps: AliasMap[]; +} + +export interface DeleteAliasesRequest { + aliasMaps: AliasMap[]; +} + +export interface DeleteAliasesResponse { + aliasMaps: AliasMap[]; +} + /** * Router is a service that offers advanced interaction with the router * subsystem of the daemon. @@ -922,6 +1028,26 @@ export interface Router { updateChanStatus( request?: DeepPartial ): Promise; + /** + * XAddLocalChanAliases is an experimental API that creates a set of new + * channel SCID alias mappings. The final total set of aliases in the manager + * after the add operation is returned. This is only a locally stored alias, + * and will not be communicated to the channel peer via any message. Therefore, + * routing over such an alias will only work if the peer also calls this same + * RPC on their end. If an alias already exists, an error is returned + */ + xAddLocalChanAliases( + request?: DeepPartial + ): Promise; + /** + * XDeleteLocalChanAliases is an experimental API that deletes a set of alias + * mappings. The final total set of aliases in the manager after the delete + * operation is returned. The deletion will not be communicated to the channel + * peer via any message. + */ + xDeleteLocalChanAliases( + request?: DeepPartial + ): Promise; } type Builtin = diff --git a/lib/types/proto/lnd/walletrpc/walletkit.ts b/lib/types/proto/lnd/walletrpc/walletkit.ts index 007d7d4..f232f2f 100644 --- a/lib/types/proto/lnd/walletrpc/walletkit.ts +++ b/lib/types/proto/lnd/walletrpc/walletkit.ts @@ -682,6 +682,8 @@ export interface EstimateFeeResponse { * confirmation target in the request. */ satPerKw: string; + /** The current minimum relay fee based on our chain backend in sat/kw. */ + minRelayFeeSatPerKw: string; } export interface PendingSweep { diff --git a/lib/types/proto/schema.ts b/lib/types/proto/schema.ts index a3a0168..63be91f 100644 --- a/lib/types/proto/schema.ts +++ b/lib/types/proto/schema.ts @@ -52,6 +52,7 @@ export const subscriptionMethods = [ 'chainrpc.ChainNotifier.RegisterSpendNtfn', 'chainrpc.ChainNotifier.RegisterBlockEpochNtfn', 'invoicesrpc.Invoices.SubscribeSingleInvoice', + 'invoicesrpc.Invoices.HtlcModifier', 'lnrpc.Lightning.SubscribeTransactions', 'lnrpc.Lightning.SubscribePeerEvents', 'lnrpc.Lightning.SubscribeChannelEvents', diff --git a/lib/types/proto/tapd/lightning.ts b/lib/types/proto/tapd/lightning.ts index 9867fd2..de8a03c 100644 --- a/lib/types/proto/tapd/lightning.ts +++ b/lib/types/proto/tapd/lightning.ts @@ -73,8 +73,17 @@ export enum CommitmentType { * channel before its maturity date. */ SCRIPT_ENFORCED_LEASE = 'SCRIPT_ENFORCED_LEASE', - /** SIMPLE_TAPROOT - TODO(roasbeef): need script enforce mirror type for the above as well? */ + /** + * SIMPLE_TAPROOT - A channel that uses musig2 for the funding output, and the new tapscript + * features where relevant. + */ SIMPLE_TAPROOT = 'SIMPLE_TAPROOT', + /** + * SIMPLE_TAPROOT_OVERLAY - Identical to the SIMPLE_TAPROOT channel type, but with extra functionality. + * This channel type also commits to additional meta data in the tapscript + * leaves for the scripts in a channel. + */ + SIMPLE_TAPROOT_OVERLAY = 'SIMPLE_TAPROOT_OVERLAY', UNRECOGNIZED = 'UNRECOGNIZED' } @@ -164,6 +173,8 @@ export enum PaymentFailureReason { FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 'FAILURE_REASON_INCORRECT_PAYMENT_DETAILS', /** FAILURE_REASON_INSUFFICIENT_BALANCE - Insufficient local balance. */ FAILURE_REASON_INSUFFICIENT_BALANCE = 'FAILURE_REASON_INSUFFICIENT_BALANCE', + /** FAILURE_REASON_CANCELED - The payment was canceled. */ + FAILURE_REASON_CANCELED = 'FAILURE_REASON_CANCELED', UNRECOGNIZED = 'UNRECOGNIZED' } @@ -729,9 +740,8 @@ export interface SendCoinsRequest { */ satPerByte: string; /** - * If set, then the amount field will be ignored, and lnd will attempt to - * send all the coins under control of the internal wallet to the specified - * address. + * If set, the amount field should be unset. It indicates lnd will send all + * wallet coins or all selected coins to the specified address. */ sendAll: boolean; /** An optional label for the transaction, limited to 500 characters. */ @@ -745,6 +755,8 @@ export interface SendCoinsRequest { spendUnconfirmed: boolean; /** The strategy to use for selecting coins. */ coinSelectionStrategy: CoinSelectionStrategy; + /** A list of selected outpoints as inputs for the transaction. */ + outpoints: OutPoint[]; } export interface SendCoinsResponse { @@ -1027,6 +1039,8 @@ export interface Channel { * the channel's operation. */ memo: string; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface ListChannelsRequest { @@ -1356,9 +1370,39 @@ export interface ChannelOpenUpdate { channelPoint: ChannelPoint | undefined; } +export interface CloseOutput { + /** + * The amount in satoshi of this close output. This amount is the final + * commitment balance of the channel and the actual amount paid out on chain + * might be smaller due to subtracted fees. + */ + amountSat: string; + /** The pkScript of the close output. */ + pkScript: Uint8Array | string; + /** Whether this output is for the local or remote node. */ + isLocal: boolean; + /** + * The TLV encoded custom channel data records for this output, which might + * be set for custom channels. + */ + customChannelData: Uint8Array | string; +} + export interface ChannelCloseUpdate { closingTxid: Uint8Array | string; success: boolean; + /** + * The local channel close output. If the local channel balance was dust to + * begin with, this output will not be set. + */ + localCloseOutput: CloseOutput | undefined; + /** + * The remote channel close output. If the remote channel balance was dust + * to begin with, this output will not be set. + */ + remoteCloseOutput: CloseOutput | undefined; + /** Any additional outputs that might be added for custom channel types. */ + additionalOutputs: CloseOutput[]; } export interface CloseChannelRequest { @@ -1991,6 +2035,8 @@ export interface PendingChannelsResponse_PendingChannel { * impacts the channel's operation. */ memo: string; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface PendingChannelsResponse_PendingOpenChannel { @@ -2212,6 +2258,11 @@ export interface ChannelBalanceResponse { pendingOpenLocalBalance: Amount | undefined; /** Sum of channels pending remote balances. */ pendingOpenRemoteBalance: Amount | undefined; + /** + * Custom channel data that might be populated if there are custom channels + * present. + */ + customChannelData: Uint8Array | string; } export interface QueryRoutesRequest { @@ -2507,6 +2558,16 @@ export interface Route { totalFeesMsat: string; /** The total amount in millisatoshis. */ totalAmtMsat: string; + /** + * The actual on-chain amount that was sent out to the first hop. This value is + * only different from the total_amt_msat field if this is a custom channel + * payment and the value transported in the HTLC is different from the BTC + * amount in the HTLC. If this value is zero, then this is an old payment that + * didn't have this value yet and can be ignored. + */ + firstHopAmountMsat: string; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface NodeInfoRequest { @@ -2666,6 +2727,11 @@ export interface ChanInfoRequest { * output index for the channel. */ chanId: string; + /** + * The channel point of the channel in format funding_txid:output_index. If + * chan_id is specified, this field is ignored. + */ + chanPoint: string; } export interface NetworkInfoRequest {} @@ -3006,6 +3072,17 @@ export interface Invoice { * Note: Output only, don't specify for creating an invoice. */ ampInvoiceState: { [key: string]: AMPInvoiceState }; + /** + * Signals that the invoice should include blinded paths to hide the true + * identity of the recipient. + */ + isBlinded: boolean; + /** + * Config values to use when creating blinded paths for this invoice. These + * can be used to override the defaults config values provided in by the + * global config. This field is only used if is_blinded is true. + */ + blindedPathConfig: BlindedPathConfig | undefined; } export enum Invoice_InvoiceState { @@ -3026,6 +3103,30 @@ export interface Invoice_AmpInvoiceStateEntry { value: AMPInvoiceState | undefined; } +export interface BlindedPathConfig { + /** + * The minimum number of real hops to include in a blinded path. This doesn't + * include our node, so if the minimum is 1, then the path will contain at + * minimum our node along with an introduction node hop. If it is zero then + * the shortest path will use our node as an introduction node. + */ + minNumRealHops?: number | undefined; + /** + * The number of hops to include in a blinded path. This doesn't include our + * node, so if it is 1, then the path will contain our node along with an + * introduction node or dummy node hop. If paths shorter than NumHops is + * found, then they will be padded using dummy hops. + */ + numHops?: number | undefined; + /** The maximum number of blinded paths to select and add to an invoice. */ + maxNumPaths?: number | undefined; + /** + * A list of node IDs of nodes that should not be used in any of our generated + * blinded paths. + */ + nodeOmissionList: Uint8Array | string[]; +} + /** Details of an HTLC that paid to an invoice */ export interface InvoiceHTLC { /** Short channel id over which the htlc was received. */ @@ -3050,6 +3151,8 @@ export interface InvoiceHTLC { mppTotalAmtMsat: string; /** Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. */ amp: AMP | undefined; + /** Custom channel data that might be populated in custom channels. */ + customChannelData: Uint8Array | string; } export interface InvoiceHTLC_CustomRecordsEntry { @@ -3232,6 +3335,11 @@ export interface Payment { */ paymentIndex: string; failureReason: PaymentFailureReason; + /** + * The custom TLV records that were sent to the first hop as part of the HTLC + * wire message for this payment. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; } export enum Payment_PaymentStatus { @@ -3252,6 +3360,11 @@ export enum Payment_PaymentStatus { UNRECOGNIZED = 'UNRECOGNIZED' } +export interface Payment_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + export interface HTLCAttempt { /** The unique ID that is used for this attempt. */ attemptId: string; @@ -3408,6 +3521,7 @@ export interface PayReq { paymentAddr: Uint8Array | string; numMsat: string; features: { [key: number]: Feature }; + blindedPaths: BlindedPaymentPath[]; } export interface PayReq_FeaturesEntry { diff --git a/lib/types/proto/tapd/routerrpc/router.ts b/lib/types/proto/tapd/routerrpc/router.ts index dd5904e..9a1be56 100644 --- a/lib/types/proto/tapd/routerrpc/router.ts +++ b/lib/types/proto/tapd/routerrpc/router.ts @@ -8,6 +8,7 @@ import type { Failure, HTLCAttempt, ChannelPoint, + AliasMap, Payment } from '../lightning'; @@ -63,9 +64,20 @@ export enum PaymentState { } export enum ResolveHoldForwardAction { + /** + * SETTLE - SETTLE is an action that is used to settle an HTLC instead of forwarding + * it. + */ SETTLE = 'SETTLE', + /** FAIL - FAIL is an action that is used to fail an HTLC backwards. */ FAIL = 'FAIL', + /** RESUME - RESUME is an action that is used to resume a forward HTLC. */ RESUME = 'RESUME', + /** + * RESUME_MODIFIED - RESUME_MODIFIED is an action that is used to resume a hold forward HTLC + * with modifications specified during interception. + */ + RESUME_MODIFIED = 'RESUME_MODIFIED', UNRECOGNIZED = 'UNRECOGNIZED' } @@ -202,6 +214,22 @@ export interface SendPaymentRequest { * only, to 1 to optimize for reliability only or a value inbetween for a mix. */ timePref: number; + /** + * If set, the payment loop can be interrupted by manually canceling the + * payment context, even before the payment timeout is reached. Note that the + * payment may still succeed after cancellation, as in-flight attempts can + * still settle afterwards. Canceling will only prevent further attempts from + * being sent. + */ + cancelable: boolean; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to the first hop peer of this payment. This can be used to pass application + * specific data during the payment attempt. Record types are required to be in + * the custom range >= 65536. When using REST, the values must be encoded as + * base64. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; } export interface SendPaymentRequest_DestCustomRecordsEntry { @@ -209,6 +237,11 @@ export interface SendPaymentRequest_DestCustomRecordsEntry { value: Uint8Array | string; } +export interface SendPaymentRequest_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + export interface TrackPaymentRequest { /** The hash of the payment to look up. */ paymentHash: Uint8Array | string; @@ -292,6 +325,19 @@ export interface SendToRouteRequest { * routes, incorrect payment details, or insufficient funds. */ skipTempErr: boolean; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to the first hop peer of this payment. This can be used to pass application + * specific data during the payment attempt. Record types are required to be in + * the custom range >= 65536. When using REST, the values must be encoded as + * base64. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface SendToRouteRequest_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; } export interface SendToRouteResponse { @@ -528,6 +574,19 @@ export interface BuildRouteRequest { * This is also called payment secret in specifications (e.g. BOLT 11). */ paymentAddr: Uint8Array | string; + /** + * An optional field that can be used to pass an arbitrary set of TLV records + * to the first hop peer of this payment. This can be used to pass application + * specific data during the payment attempt. Record types are required to be in + * the custom range >= 65536. When using REST, the values must be encoded as + * base64. + */ + firstHopCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface BuildRouteRequest_FirstHopCustomRecordsEntry { + key: string; + value: Uint8Array | string; } export interface BuildRouteResponse { @@ -685,6 +744,8 @@ export interface ForwardHtlcInterceptRequest { * channel from force-closing. */ autoFailHeight: number; + /** The custom records of the peer's incoming p2p wire message. */ + inWireCustomRecords: { [key: string]: Uint8Array | string }; } export interface ForwardHtlcInterceptRequest_CustomRecordsEntry { @@ -692,10 +753,17 @@ export interface ForwardHtlcInterceptRequest_CustomRecordsEntry { value: Uint8Array | string; } +export interface ForwardHtlcInterceptRequest_InWireCustomRecordsEntry { + key: string; + value: Uint8Array | string; +} + /** * ForwardHtlcInterceptResponse enables the caller to resolve a previously hold * forward. The caller can choose either to: * - `Resume`: Execute the default behavior (usually forward). + * - `ResumeModified`: Execute the default behavior (usually forward) with HTLC + * field modifications. * - `Reject`: Fail the htlc backwards. * - `Settle`: Settle this htlc with a given preimage. */ @@ -726,6 +794,28 @@ export interface ForwardHtlcInterceptResponse { * default value for this field. */ failureCode: Failure_FailureCode; + /** + * The amount that was set on the p2p wire message of the incoming HTLC. + * This field is ignored if the action is not RESUME_MODIFIED or the amount + * is zero. + */ + inAmountMsat: string; + /** + * The amount to set on the p2p wire message of the resumed HTLC. This field + * is ignored if the action is not RESUME_MODIFIED or the amount is zero. + */ + outAmountMsat: string; + /** + * Any custom records that should be set on the p2p wire message message of + * the resumed HTLC. This field is ignored if the action is not + * RESUME_MODIFIED. + */ + outWireCustomRecords: { [key: string]: Uint8Array | string }; +} + +export interface ForwardHtlcInterceptResponse_OutWireCustomRecordsEntry { + key: string; + value: Uint8Array | string; } export interface UpdateChanStatusRequest { @@ -735,6 +825,22 @@ export interface UpdateChanStatusRequest { export interface UpdateChanStatusResponse {} +export interface AddAliasesRequest { + aliasMaps: AliasMap[]; +} + +export interface AddAliasesResponse { + aliasMaps: AliasMap[]; +} + +export interface DeleteAliasesRequest { + aliasMaps: AliasMap[]; +} + +export interface DeleteAliasesResponse { + aliasMaps: AliasMap[]; +} + /** * Router is a service that offers advanced interaction with the router * subsystem of the daemon. @@ -922,6 +1028,26 @@ export interface Router { updateChanStatus( request?: DeepPartial ): Promise; + /** + * XAddLocalChanAliases is an experimental API that creates a set of new + * channel SCID alias mappings. The final total set of aliases in the manager + * after the add operation is returned. This is only a locally stored alias, + * and will not be communicated to the channel peer via any message. Therefore, + * routing over such an alias will only work if the peer also calls this same + * RPC on their end. If an alias already exists, an error is returned + */ + xAddLocalChanAliases( + request?: DeepPartial + ): Promise; + /** + * XDeleteLocalChanAliases is an experimental API that deletes a set of alias + * mappings. The final total set of aliases in the manager after the delete + * operation is returned. The deletion will not be communicated to the channel + * peer via any message. + */ + xDeleteLocalChanAliases( + request?: DeepPartial + ): Promise; } type Builtin = diff --git a/package.json b/package.json index a108abd..efd842e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "config": { - "lnd_release_tag": "v0.18.2-beta", + "lnd_release_tag": "v0.18.4-beta.rc2", "loop_release_tag": "v0.28.5-beta", "pool_release_tag": "v0.6.5-beta", "faraday_release_tag": "v0.2.13-alpha", diff --git a/protos/lnd/v0.18.2-beta/autopilotrpc/autopilot.proto b/protos/lnd/v0.18.4-beta.rc2/autopilotrpc/autopilot.proto similarity index 100% rename from protos/lnd/v0.18.2-beta/autopilotrpc/autopilot.proto rename to protos/lnd/v0.18.4-beta.rc2/autopilotrpc/autopilot.proto diff --git a/protos/lnd/v0.18.2-beta/chainrpc/chainnotifier.proto b/protos/lnd/v0.18.4-beta.rc2/chainrpc/chainnotifier.proto similarity index 100% rename from protos/lnd/v0.18.2-beta/chainrpc/chainnotifier.proto rename to protos/lnd/v0.18.4-beta.rc2/chainrpc/chainnotifier.proto diff --git a/protos/lnd/v0.18.2-beta/invoicesrpc/invoices.proto b/protos/lnd/v0.18.4-beta.rc2/invoicesrpc/invoices.proto similarity index 73% rename from protos/lnd/v0.18.2-beta/invoicesrpc/invoices.proto rename to protos/lnd/v0.18.4-beta.rc2/invoicesrpc/invoices.proto index 7afffba..d9d3bc1 100644 --- a/protos/lnd/v0.18.2-beta/invoicesrpc/invoices.proto +++ b/protos/lnd/v0.18.4-beta.rc2/invoicesrpc/invoices.proto @@ -55,10 +55,19 @@ service Invoices { rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp); /* - LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced + LookupInvoiceV2 attempts to look up at invoice. An invoice can be referenced using either its payment hash, payment address, or set ID. */ rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice); + + /* + HtlcModifier is a bidirectional streaming RPC that allows a client to + intercept and modify the HTLCs that attempt to settle the given invoice. The + server will send HTLCs of invoices to the client and the client can modify + some aspects of the HTLC in order to pass the invoice acceptance tests. + */ + rpc HtlcModifier (stream HtlcModifyResponse) + returns (stream HtlcModifyRequest); } message CancelInvoiceMsg { @@ -192,3 +201,51 @@ message LookupInvoiceMsg { LookupModifier lookup_modifier = 4; } + +// CircuitKey is a unique identifier for an HTLC. +message CircuitKey { + // The id of the channel that the is part of this circuit. + uint64 chan_id = 1; + + // The index of the incoming htlc in the incoming channel. + uint64 htlc_id = 2; +} + +message HtlcModifyRequest { + // The invoice the intercepted HTLC is attempting to settle. The HTLCs in + // the invoice are only HTLCs that have already been accepted or settled, + // not including the current intercepted HTLC. + lnrpc.Invoice invoice = 1; + + // The unique identifier of the HTLC of this intercepted HTLC. + CircuitKey exit_htlc_circuit_key = 2; + + // The amount in milli-satoshi that the exit HTLC is attempting to pay. + uint64 exit_htlc_amt = 3; + + // The absolute expiry height of the exit HTLC. + uint32 exit_htlc_expiry = 4; + + // The current block height. + uint32 current_height = 5; + + // The wire message custom records of the exit HTLC. + map exit_htlc_wire_custom_records = 6; +} + +message HtlcModifyResponse { + // The circuit key of the HTLC that the client wants to modify. + CircuitKey circuit_key = 1; + + // The modified amount in milli-satoshi that the exit HTLC is paying. This + // value can be different from the actual on-chain HTLC amount, in case the + // HTLC carries other valuable items, as can be the case with custom channel + // types. + optional uint64 amt_paid = 2; + + // This flag indicates whether the HTLCs associated with the invoices should + // be cancelled. The interceptor client may set this field if some + // unexpected behavior is encountered. Setting this will ignore the amt_paid + // field. + bool cancel_set = 3; +} diff --git a/protos/lnd/v0.18.2-beta/lightning.proto b/protos/lnd/v0.18.4-beta.rc2/lightning.proto similarity index 97% rename from protos/lnd/v0.18.2-beta/lightning.proto rename to protos/lnd/v0.18.4-beta.rc2/lightning.proto index 6356a6b..6449305 100644 --- a/protos/lnd/v0.18.2-beta/lightning.proto +++ b/protos/lnd/v0.18.4-beta.rc2/lightning.proto @@ -1190,9 +1190,8 @@ message SendCoinsRequest { int64 sat_per_byte = 5 [deprecated = true]; /* - If set, then the amount field will be ignored, and lnd will attempt to - send all the coins under control of the internal wallet to the specified - address. + If set, the amount field should be unset. It indicates lnd will send all + wallet coins or all selected coins to the specified address. */ bool send_all = 6; @@ -1208,6 +1207,9 @@ message SendCoinsRequest { // The strategy to use for selecting coins. CoinSelectionStrategy coin_selection_strategy = 10; + + // A list of selected outpoints as inputs for the transaction. + repeated OutPoint outpoints = 11; } message SendCoinsResponse { // The transaction ID of the transaction @@ -1386,8 +1388,14 @@ enum CommitmentType { A channel that uses musig2 for the funding output, and the new tapscript features where relevant. */ - // TODO(roasbeef): need script enforce mirror type for the above as well? SIMPLE_TAPROOT = 5; + + /* + Identical to the SIMPLE_TAPROOT channel type, but with extra functionality. + This channel type also commits to additional meta data in the tapscript + leaves for the scripts in a channel. + */ + SIMPLE_TAPROOT_OVERLAY = 6; } message ChannelConstraints { @@ -1590,6 +1598,11 @@ message Channel { the channel's operation. */ string memo = 36; + + /* + Custom channel data that might be populated in custom channels. + */ + bytes custom_channel_data = 37; } message ListChannelsRequest { @@ -2026,10 +2039,38 @@ message ChannelOpenUpdate { ChannelPoint channel_point = 1; } +message CloseOutput { + // The amount in satoshi of this close output. This amount is the final + // commitment balance of the channel and the actual amount paid out on chain + // might be smaller due to subtracted fees. + int64 amount_sat = 1; + + // The pkScript of the close output. + bytes pk_script = 2; + + // Whether this output is for the local or remote node. + bool is_local = 3; + + // The TLV encoded custom channel data records for this output, which might + // be set for custom channels. + bytes custom_channel_data = 4; +} + message ChannelCloseUpdate { bytes closing_txid = 1; bool success = 2; + + // The local channel close output. If the local channel balance was dust to + // begin with, this output will not be set. + CloseOutput local_close_output = 3; + + // The remote channel close output. If the remote channel balance was dust + // to begin with, this output will not be set. + CloseOutput remote_close_output = 4; + + // Any additional outputs that might be added for custom channel types. + repeated CloseOutput additional_outputs = 5; } message CloseChannelRequest { @@ -2707,6 +2748,11 @@ message PendingChannelsResponse { impacts the channel's operation. */ string memo = 13; + + /* + Custom channel data that might be populated in custom channels. + */ + bytes custom_channel_data = 34; } message PendingOpenChannel { @@ -2966,6 +3012,12 @@ message ChannelBalanceResponse { // Sum of channels pending remote balances. Amount pending_open_remote_balance = 8; + + /* + Custom channel data that might be populated if there are custom channels + present. + */ + bytes custom_channel_data = 9; } message QueryRoutesRequest { @@ -3291,6 +3343,20 @@ message Route { The total amount in millisatoshis. */ int64 total_amt_msat = 6; + + /* + The actual on-chain amount that was sent out to the first hop. This value is + only different from the total_amt_msat field if this is a custom channel + payment and the value transported in the HTLC is different from the BTC + amount in the HTLC. If this value is zero, then this is an old payment that + didn't have this value yet and can be ignored. + */ + int64 first_hop_amount_msat = 7; + + /* + Custom channel data that might be populated in custom channels. + */ + bytes custom_channel_data = 8; } message NodeInfoRequest { @@ -3443,6 +3509,10 @@ message ChanInfoRequest { output index for the channel. */ uint64 chan_id = 1 [jstype = JS_STRING]; + + // The channel point of the channel in format funding_txid:output_index. If + // chan_id is specified, this field is ignored. + string chan_point = 2; } message NetworkInfoRequest { @@ -3832,6 +3902,48 @@ message Invoice { Note: Output only, don't specify for creating an invoice. */ map amp_invoice_state = 28; + + /* + Signals that the invoice should include blinded paths to hide the true + identity of the recipient. + */ + bool is_blinded = 29; + + /* + Config values to use when creating blinded paths for this invoice. These + can be used to override the defaults config values provided in by the + global config. This field is only used if is_blinded is true. + */ + BlindedPathConfig blinded_path_config = 30; +} + +message BlindedPathConfig { + /* + The minimum number of real hops to include in a blinded path. This doesn't + include our node, so if the minimum is 1, then the path will contain at + minimum our node along with an introduction node hop. If it is zero then + the shortest path will use our node as an introduction node. + */ + optional uint32 min_num_real_hops = 1; + + /* + The number of hops to include in a blinded path. This doesn't include our + node, so if it is 1, then the path will contain our node along with an + introduction node or dummy node hop. If paths shorter than NumHops is + found, then they will be padded using dummy hops. + */ + optional uint32 num_hops = 2; + + /* + The maximum number of blinded paths to select and add to an invoice. + */ + optional uint32 max_num_paths = 3; + + /* + A list of node IDs of nodes that should not be used in any of our generated + blinded paths. + */ + repeated bytes node_omission_list = 4; } enum InvoiceHTLCState { @@ -3874,6 +3986,11 @@ message InvoiceHTLC { // Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. AMP amp = 11; + + /* + Custom channel data that might be populated in custom channels. + */ + bytes custom_channel_data = 12; } // Details specific to AMP HTLCs. @@ -4040,6 +4157,11 @@ enum PaymentFailureReason { Insufficient local balance. */ FAILURE_REASON_INSUFFICIENT_BALANCE = 5; + + /* + The payment was canceled. + */ + FAILURE_REASON_CANCELED = 6; } message Payment { @@ -4109,6 +4231,12 @@ message Payment { uint64 payment_index = 15; PaymentFailureReason failure_reason = 16; + + /* + The custom TLV records that were sent to the first hop as part of the HTLC + wire message for this payment. + */ + map first_hop_custom_records = 17; } message HTLCAttempt { @@ -4285,6 +4413,7 @@ message PayReq { bytes payment_addr = 11; int64 num_msat = 12; map features = 13; + repeated BlindedPaymentPath blinded_paths = 14; } enum FeatureBit { diff --git a/protos/lnd/v0.18.2-beta/routerrpc/router.proto b/protos/lnd/v0.18.4-beta.rc2/routerrpc/router.proto similarity index 88% rename from protos/lnd/v0.18.2-beta/routerrpc/router.proto rename to protos/lnd/v0.18.4-beta.rc2/routerrpc/router.proto index a909828..92da751 100644 --- a/protos/lnd/v0.18.2-beta/routerrpc/router.proto +++ b/protos/lnd/v0.18.4-beta.rc2/routerrpc/router.proto @@ -176,6 +176,25 @@ service Router { */ rpc UpdateChanStatus (UpdateChanStatusRequest) returns (UpdateChanStatusResponse); + + /* + XAddLocalChanAliases is an experimental API that creates a set of new + channel SCID alias mappings. The final total set of aliases in the manager + after the add operation is returned. This is only a locally stored alias, + and will not be communicated to the channel peer via any message. Therefore, + routing over such an alias will only work if the peer also calls this same + RPC on their end. If an alias already exists, an error is returned + */ + rpc XAddLocalChanAliases (AddAliasesRequest) returns (AddAliasesResponse); + + /* + XDeleteLocalChanAliases is an experimental API that deletes a set of alias + mappings. The final total set of aliases in the manager after the delete + operation is returned. The deletion will not be communicated to the channel + peer via any message. + */ + rpc XDeleteLocalChanAliases (DeleteAliasesRequest) + returns (DeleteAliasesResponse); } message SendPaymentRequest { @@ -330,6 +349,24 @@ message SendPaymentRequest { only, to 1 to optimize for reliability only or a value inbetween for a mix. */ double time_pref = 23; + + /* + If set, the payment loop can be interrupted by manually canceling the + payment context, even before the payment timeout is reached. Note that the + payment may still succeed after cancellation, as in-flight attempts can + still settle afterwards. Canceling will only prevent further attempts from + being sent. + */ + bool cancelable = 24; + + /* + An optional field that can be used to pass an arbitrary set of TLV records + to the first hop peer of this payment. This can be used to pass application + specific data during the payment attempt. Record types are required to be in + the custom range >= 65536. When using REST, the values must be encoded as + base64. + */ + map first_hop_custom_records = 25; } message TrackPaymentRequest { @@ -423,6 +460,15 @@ message SendToRouteRequest { routes, incorrect payment details, or insufficient funds. */ bool skip_temp_err = 3; + + /* + An optional field that can be used to pass an arbitrary set of TLV records + to the first hop peer of this payment. This can be used to pass application + specific data during the payment attempt. Record types are required to be in + the custom range >= 65536. When using REST, the values must be encoded as + base64. + */ + map first_hop_custom_records = 4; } message SendToRouteResponse { @@ -698,6 +744,15 @@ message BuildRouteRequest { This is also called payment secret in specifications (e.g. BOLT 11). */ bytes payment_addr = 5; + + /* + An optional field that can be used to pass an arbitrary set of TLV records + to the first hop peer of this payment. This can be used to pass application + specific data during the payment attempt. Record types are required to be in + the custom range >= 65536. When using REST, the values must be encoded as + base64. + */ + map first_hop_custom_records = 6; } message BuildRouteResponse { @@ -954,12 +1009,17 @@ message ForwardHtlcInterceptRequest { // The block height at which this htlc will be auto-failed to prevent the // channel from force-closing. int32 auto_fail_height = 10; + + // The custom records of the peer's incoming p2p wire message. + map in_wire_custom_records = 11; } /** ForwardHtlcInterceptResponse enables the caller to resolve a previously hold forward. The caller can choose either to: - `Resume`: Execute the default behavior (usually forward). +- `ResumeModified`: Execute the default behavior (usually forward) with HTLC + field modifications. - `Reject`: Fail the htlc backwards. - `Settle`: Settle this htlc with a given preimage. */ @@ -990,12 +1050,36 @@ message ForwardHtlcInterceptResponse { // For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the // default value for this field. lnrpc.Failure.FailureCode failure_code = 5; + + // The amount that was set on the p2p wire message of the incoming HTLC. + // This field is ignored if the action is not RESUME_MODIFIED or the amount + // is zero. + uint64 in_amount_msat = 6; + + // The amount to set on the p2p wire message of the resumed HTLC. This field + // is ignored if the action is not RESUME_MODIFIED or the amount is zero. + uint64 out_amount_msat = 7; + + // Any custom records that should be set on the p2p wire message message of + // the resumed HTLC. This field is ignored if the action is not + // RESUME_MODIFIED. + map out_wire_custom_records = 8; } enum ResolveHoldForwardAction { + // SETTLE is an action that is used to settle an HTLC instead of forwarding + // it. SETTLE = 0; + + // FAIL is an action that is used to fail an HTLC backwards. FAIL = 1; + + // RESUME is an action that is used to resume a forward HTLC. RESUME = 2; + + // RESUME_MODIFIED is an action that is used to resume a hold forward HTLC + // with modifications specified during interception. + RESUME_MODIFIED = 3; } message UpdateChanStatusRequest { @@ -1012,3 +1096,19 @@ enum ChanStatusAction { message UpdateChanStatusResponse { } + +message AddAliasesRequest { + repeated lnrpc.AliasMap alias_maps = 1; +} + +message AddAliasesResponse { + repeated lnrpc.AliasMap alias_maps = 1; +} + +message DeleteAliasesRequest { + repeated lnrpc.AliasMap alias_maps = 1; +} + +message DeleteAliasesResponse { + repeated lnrpc.AliasMap alias_maps = 1; +} \ No newline at end of file diff --git a/protos/lnd/v0.18.2-beta/signrpc/signer.proto b/protos/lnd/v0.18.4-beta.rc2/signrpc/signer.proto similarity index 100% rename from protos/lnd/v0.18.2-beta/signrpc/signer.proto rename to protos/lnd/v0.18.4-beta.rc2/signrpc/signer.proto diff --git a/protos/lnd/v0.18.2-beta/walletrpc/walletkit.proto b/protos/lnd/v0.18.4-beta.rc2/walletrpc/walletkit.proto similarity index 99% rename from protos/lnd/v0.18.2-beta/walletrpc/walletkit.proto rename to protos/lnd/v0.18.4-beta.rc2/walletrpc/walletkit.proto index b861803..ec33024 100644 --- a/protos/lnd/v0.18.2-beta/walletrpc/walletkit.proto +++ b/protos/lnd/v0.18.4-beta.rc2/walletrpc/walletkit.proto @@ -839,6 +839,9 @@ message EstimateFeeResponse { confirmation target in the request. */ int64 sat_per_kw = 1; + + // The current minimum relay fee based on our chain backend in sat/kw. + int64 min_relay_fee_sat_per_kw = 2; } enum WitnessType { diff --git a/protos/lnd/v0.18.2-beta/walletunlocker.proto b/protos/lnd/v0.18.4-beta.rc2/walletunlocker.proto similarity index 100% rename from protos/lnd/v0.18.2-beta/walletunlocker.proto rename to protos/lnd/v0.18.4-beta.rc2/walletunlocker.proto diff --git a/protos/lnd/v0.18.2-beta/watchtowerrpc/watchtower.proto b/protos/lnd/v0.18.4-beta.rc2/watchtowerrpc/watchtower.proto similarity index 100% rename from protos/lnd/v0.18.2-beta/watchtowerrpc/watchtower.proto rename to protos/lnd/v0.18.4-beta.rc2/watchtowerrpc/watchtower.proto diff --git a/protos/lnd/v0.18.2-beta/wtclientrpc/wtclient.proto b/protos/lnd/v0.18.4-beta.rc2/wtclientrpc/wtclient.proto similarity index 100% rename from protos/lnd/v0.18.2-beta/wtclientrpc/wtclient.proto rename to protos/lnd/v0.18.4-beta.rc2/wtclientrpc/wtclient.proto