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
8 changes: 8 additions & 0 deletions lib/types/proto/lnd/lightning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,8 @@ export interface Channel {
zeroConfConfirmedScid: string;
/** The configured alias name of our peer. */
peerAlias: string;
/** This is the peer SCID alias. */
peerScidAlias: string;
}

export interface ListChannelsRequest {
Expand Down Expand Up @@ -1600,6 +1602,12 @@ export interface OpenChannelRequest {
* capacity.
*/
remoteChanReserveSat: string;
/**
* If set, then lnd will attempt to commit all the coins under control of the
* internal wallet to open the channel, and the LocalFundingAmount field must
* be zero and is ignored.
*/
fundMax: boolean;
}

export interface OpenStatusUpdate {
Expand Down
61 changes: 61 additions & 0 deletions lib/types/proto/lnd/walletrpc/walletkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,67 @@ export enum WitnessType {
* transaction.
*/
COMMITMENT_ANCHOR = 'COMMITMENT_ANCHOR',
/**
* COMMITMENT_NO_DELAY_TWEAKLESS - A witness type that is similar to the COMMITMENT_NO_DELAY type,
* but it omits the tweak that randomizes the key we need to
* spend with a channel peer supplied set of randomness.
*/
COMMITMENT_NO_DELAY_TWEAKLESS = 'COMMITMENT_NO_DELAY_TWEAKLESS',
/**
* COMMITMENT_TO_REMOTE_CONFIRMED - A witness type that allows us to spend our output on the counterparty's
* commitment transaction after a confirmation.
*/
COMMITMENT_TO_REMOTE_CONFIRMED = 'COMMITMENT_TO_REMOTE_CONFIRMED',
/**
* HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED - A witness type that allows us to sweep an HTLC output that we extended
* to a party, but was never fulfilled. This _is_ the HTLC output directly
* on our commitment transaction, and the input to the second-level HTLC
* timeout transaction. It can only be spent after CLTV expiry, and
* commitment confirmation.
*/
HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED = 'HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED',
/**
* HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED - A witness type that allows us to sweep an HTLC output that was offered
* to us, and for which we have a payment preimage. This _is_ the HTLC
* output directly on our commitment transaction, and the input to the
* second-level HTLC success transaction. It can only be spent after the
* commitment has confirmed.
*/
HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED = 'HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED',
/**
* LEASE_COMMITMENT_TIME_LOCK - A witness type that allows us to spend our output on our local
* commitment transaction after a relative and absolute lock-time lockout as
* part of the script enforced lease commitment type.
*/
LEASE_COMMITMENT_TIME_LOCK = 'LEASE_COMMITMENT_TIME_LOCK',
/**
* LEASE_COMMITMENT_TO_REMOTE_CONFIRMED - A witness type that allows us to spend our output on the counterparty's
* commitment transaction after a confirmation and absolute locktime as part
* of the script enforced lease commitment type.
*/
LEASE_COMMITMENT_TO_REMOTE_CONFIRMED = 'LEASE_COMMITMENT_TO_REMOTE_CONFIRMED',
/**
* LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL - A witness type that allows us to sweep an HTLC output that we extended
* to a party, but was never fulfilled. This HTLC output isn't directly on
* the commitment transaction, but is the result of a confirmed second-level
* HTLC transaction. As a result, we can only spend this after a CSV delay
* and CLTV locktime as part of the script enforced lease commitment type.
*/
LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = 'LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL',
/**
* LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL - A witness type that allows us to sweep an HTLC output that was offered
* to us, and for which we have a payment preimage. This HTLC output isn't
* directly on our commitment transaction, but is the result of confirmed
* second-level HTLC transaction. As a result, we can only spend this after
* a CSV delay and CLTV locktime as part of the script enforced lease
* commitment type.
*/
LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = 'LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL',
/**
* TAPROOT_PUB_KEY_SPEND - A witness type that allows us to spend a regular p2tr output that's sent
* to an output which is under complete control of the backing wallet.
*/
TAPROOT_PUB_KEY_SPEND = 'TAPROOT_PUB_KEY_SPEND',
UNRECOGNIZED = 'UNRECOGNIZED'
}

Expand Down
41 changes: 41 additions & 0 deletions lib/types/proto/lnd/wtclientrpc/wtclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export interface GetTowerInfoRequest {
pubkey: Uint8Array | string;
/** Whether we should include sessions with the watchtower in the response. */
includeSessions: boolean;
/**
* Whether to exclude exhausted sessions in the response info. This option
* is only meaningful if include_sessions is true.
*/
excludeExhaustedSessions: boolean;
}

export interface TowerSession {
Expand Down Expand Up @@ -69,17 +74,53 @@ export interface Tower {
pubkey: Uint8Array | string;
/** The list of addresses the watchtower is reachable over. */
addresses: string[];
/**
* Deprecated, use the active_session_candidate field under the
* correct identifier in the client_type map.
* Whether the watchtower is currently a candidate for new sessions.
*
* @deprecated
*/
activeSessionCandidate: boolean;
/**
* Deprecated, use the num_sessions field under the correct identifier
* in the client_type map.
* The number of sessions that have been negotiated with the watchtower.
*
* @deprecated
*/
numSessions: number;
/**
* Deprecated, use the sessions field under the correct identifier in the
* client_type map.
* The list of sessions that have been negotiated with the watchtower.
*
* @deprecated
*/
sessions: TowerSession[];
/** A list sessions held with the tower. */
sessionInfo: TowerSessionInfo[];
}

export interface TowerSessionInfo {
/** Whether the watchtower is currently a candidate for new sessions. */
activeSessionCandidate: boolean;
/** The number of sessions that have been negotiated with the watchtower. */
numSessions: number;
/** The list of sessions that have been negotiated with the watchtower. */
sessions: TowerSession[];
/** The session's policy type. */
policyType: PolicyType;
}

export interface ListTowersRequest {
/** Whether we should include sessions with the watchtower in the response. */
includeSessions: boolean;
/**
* Whether to exclude exhausted sessions in the response info. This option
* is only meaningful if include_sessions is true.
*/
excludeExhaustedSessions: boolean;
}

export interface ListTowersResponse {
Expand Down
52 changes: 52 additions & 0 deletions lib/types/proto/loop/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,40 @@ export interface LsatToken {
storageName: string;
}

export interface LoopStats {
/** Number of currently pending swaps. */
pendingCount: string;
/** Number of succeeded swaps. */
successCount: string;
/** Number failed swaps. */
failCount: string;
/** The sum of all pending swap amounts. */
sumPendingAmt: string;
/** The sum of all succeeded swap amounts. */
sumSucceededAmt: string;
}

export interface GetInfoRequest {}

export interface GetInfoResponse {
/** The current daemon version. */
version: string;
/** The network the daemon is running on. */
network: string;
/** Host and port of the loopd grpc server. */
rpcListen: string;
/** Host and port of the loopd rest server. */
restListen: string;
/** Loop's macaroon path that clients use to talk to the daemon. */
macaroonPath: string;
/** Loop's tls cert path */
tlsCertPath: string;
/** Statistics about loop outs. */
loopOutStats: LoopStats | undefined;
/** Statistics about loop ins. */
loopInStats: LoopStats | undefined;
}

export interface GetLiquidityParamsRequest {}

export interface LiquidityParameters {
Expand Down Expand Up @@ -668,6 +702,19 @@ export interface LiquidityParameters {
* UNIX timestamp in seconds.
*/
autoloopBudgetLastRefresh: string;
/**
* Set to true to enable easy autoloop. If set, all channel/peer rules will be
* overridden and the client will automatically dispatch swaps in order to meet
* the configured local balance target size. Currently only loop out is
* supported, meaning that easy autoloop can only reduce the funds that are
* held as balance in channels.
*/
easyAutoloop: boolean;
/**
* The local balance target size, expressed in satoshis. This is used by easy
* autoloop to determine how much liquidity should be maintained in channels.
*/
easyAutoloopLocalTargetSat: string;
}

export interface LiquidityRule {
Expand Down Expand Up @@ -821,6 +868,11 @@ export interface SwapClient {
getLsatTokens(
request?: DeepPartial<TokensRequest>
): Promise<TokensResponse>;
/**
* loop: `getinfo`
* GetInfo gets basic information about the loop daemon.
*/
getInfo(request?: DeepPartial<GetInfoRequest>): Promise<GetInfoResponse>;
/**
* loop: `getparams`
* GetLiquidityParams gets the parameters that the daemon's liquidity manager
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"config": {
"lnd_release_tag": "v0.16.0-beta",
"loop_release_tag": "v0.22.0-beta",
"pool_release_tag": "v0.6.2-beta",
"faraday_release_tag": "v0.2.9-alpha",
"lnd_release_tag": "v0.16.3-beta",
"loop_release_tag": "v0.24.1-beta",
"pool_release_tag": "v0.6.4-beta",
"faraday_release_tag": "v0.2.11-alpha",
"tapd_release_tag": "v0.2.0-lit-0",
"lit_release_tag": "v0.9.0-alpha",
"lit_release_tag": "v0.10.1-alpha",
"protoc_version": "21.9"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,9 @@ message Channel {

// The configured alias name of our peer.
string peer_alias = 34;

// This is the peer SCID alias.
uint64 peer_scid_alias = 35 [jstype = JS_STRING];
}

message ListChannelsRequest {
Expand Down Expand Up @@ -2264,6 +2267,13 @@ message OpenChannelRequest {
capacity.
*/
uint64 remote_chan_reserve_sat = 25;

/*
If set, then lnd will attempt to commit all the coins under control of the
internal wallet to open the channel, and the LocalFundingAmount field must
be zero and is ignored.
*/
bool fund_max = 26;
}
message OpenStatusUpdate {
oneof update {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,76 @@ enum WitnessType {
transaction.
*/
COMMITMENT_ANCHOR = 13;

/*
A witness type that is similar to the COMMITMENT_NO_DELAY type,
but it omits the tweak that randomizes the key we need to
spend with a channel peer supplied set of randomness.
*/
COMMITMENT_NO_DELAY_TWEAKLESS = 14;

/*
A witness type that allows us to spend our output on the counterparty's
commitment transaction after a confirmation.
*/
COMMITMENT_TO_REMOTE_CONFIRMED = 15;

/*
A witness type that allows us to sweep an HTLC output that we extended
to a party, but was never fulfilled. This _is_ the HTLC output directly
on our commitment transaction, and the input to the second-level HTLC
timeout transaction. It can only be spent after CLTV expiry, and
commitment confirmation.
*/
HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED = 16;

/*
A witness type that allows us to sweep an HTLC output that was offered
to us, and for which we have a payment preimage. This _is_ the HTLC
output directly on our commitment transaction, and the input to the
second-level HTLC success transaction. It can only be spent after the
commitment has confirmed.
*/
HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED = 17;

/*
A witness type that allows us to spend our output on our local
commitment transaction after a relative and absolute lock-time lockout as
part of the script enforced lease commitment type.
*/
LEASE_COMMITMENT_TIME_LOCK = 18;

/*
A witness type that allows us to spend our output on the counterparty's
commitment transaction after a confirmation and absolute locktime as part
of the script enforced lease commitment type.
*/
LEASE_COMMITMENT_TO_REMOTE_CONFIRMED = 19;

/*
A witness type that allows us to sweep an HTLC output that we extended
to a party, but was never fulfilled. This HTLC output isn't directly on
the commitment transaction, but is the result of a confirmed second-level
HTLC transaction. As a result, we can only spend this after a CSV delay
and CLTV locktime as part of the script enforced lease commitment type.
*/
LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = 20;

/*
A witness type that allows us to sweep an HTLC output that was offered
to us, and for which we have a payment preimage. This HTLC output isn't
directly on our commitment transaction, but is the result of confirmed
second-level HTLC transaction. As a result, we can only spend this after
a CSV delay and CLTV locktime as part of the script enforced lease
commitment type.
*/
LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = 21;

/*
A witness type that allows us to spend a regular p2tr output that's sent
to an output which is under complete control of the backing wallet.
*/
TAPROOT_PUB_KEY_SPEND = 22;
}

message PendingSweep {
Expand Down
Loading