Skip to content

Commit

Permalink
LNC: update protos to v0.18.4-beta +
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Dec 18, 2024
1 parent 090a969 commit d626c36
Show file tree
Hide file tree
Showing 38 changed files with 3,815 additions and 692 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -162,10 +213,21 @@ export interface Invoices {
request?: DeepPartial<SettleInvoiceMsg>
): Promise<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.
*/
lookupInvoiceV2(request?: DeepPartial<LookupInvoiceMsg>): Promise<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.
*/
htlcModifier(
request?: DeepPartial<HtlcModifyResponse>,
onMessage?: (msg: HtlcModifyRequest) => void,
onError?: (err: Error) => void
): void;
}

type Builtin =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down Expand Up @@ -1030,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 {
Expand Down Expand Up @@ -1359,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 {
Expand Down Expand Up @@ -1994,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 {
Expand Down Expand Up @@ -2215,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 {
Expand Down Expand Up @@ -2510,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 {
Expand Down Expand Up @@ -3093,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 {
Expand Down Expand Up @@ -3275,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 {
Expand All @@ -3295,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;
Expand Down
Loading

0 comments on commit d626c36

Please sign in to comment.