Skip to content

Commit

Permalink
Merge pull request #88 from lightningj-org/support_lnd_0_17_0
Browse files Browse the repository at this point in the history
Support lnd 0 17 0
  • Loading branch information
herrvendil committed Oct 8, 2023
2 parents 8701948 + 888190d commit 93a3c5f
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.gradle
build
.idea
.idea
bin
1 change: 1 addition & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ to the license agreement can be found link:LICENSE.txt[here].

== Whats New

* 0.17.0-Beta : Generated against LND 0.17.0 API, upgraded to Gradle 8.1
* 0.16.2-Beta : Generated against LND 0.16.2 API, added support for ChainKit RPC Service.
* 0.16.0-Beta : Generated against LND 0.16.0 API
* 0.15.5-Beta : Generated against LND 0.15.5 and fix for NaN issue #79
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
151 changes: 138 additions & 13 deletions src/main/proto/lightning.api.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto
* And is distributed under LNDs MIT License.
* LND (444bbfa) tag : Downloaded 2023-04-27
* LND (d94ae3f) tag : Downloaded 2023-10-07
*/
syntax = "proto3";

Expand All @@ -10,6 +10,7 @@ package lnrpc;
option java_package = "org.lightningj.lnd.proto";
option go_package = "github.com/lightningnetwork/lnd/lnrpc";


/*
* Comments in this file will be directly parsed into the API
* Documentation as descriptions of the associated method, message, or field.
Expand Down Expand Up @@ -107,8 +108,10 @@ service Lightning {
rpc SignMessage (SignMessageRequest) returns (SignMessageResponse);

/* lncli: `verifymessage`
VerifyMessage verifies a signature over a msg. The signature must be
zbase32 encoded and signed by an active node in the resident node's
VerifyMessage verifies a signature over a message and recovers the signer's
public key. The signature is only deemed valid if the recovered public key
corresponds to a node key in the public Lightning network. The signature
must be zbase32 encoded and signed by an active node in the resident node's
channel database. In addition to returning the validity of the signature,
VerifyMessage also returns the recovered pubkey from the signature.
*/
Expand Down Expand Up @@ -1356,6 +1359,13 @@ enum CommitmentType {
channel before its maturity date.
*/
SCRIPT_ENFORCED_LEASE = 4;

/*
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;
}

message ChannelConstraints {
Expand Down Expand Up @@ -1551,6 +1561,13 @@ message Channel {

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

/*
An optional note-to-self to go along with the channel containing some
useful information. This is only ever stored locally and in no way impacts
the channel's operation.
*/
string memo = 36;
}

message ListChannelsRequest {
Expand Down Expand Up @@ -2125,6 +2142,76 @@ message BatchOpenChannel {
the remote peer supports explicit channel negotiation.
*/
CommitmentType commitment_type = 9;

/*
The maximum amount of coins in millisatoshi that can be pending within
the channel. It only applies to the remote party.
*/
uint64 remote_max_value_in_flight_msat = 10;

/*
The maximum number of concurrent HTLCs we will allow the remote party to add
to the commitment transaction.
*/
uint32 remote_max_htlcs = 11;

/*
Max local csv is the maximum csv delay we will allow for our own commitment
transaction.
*/
uint32 max_local_csv = 12;

/*
If this is true, then a zero-conf channel open will be attempted.
*/
bool zero_conf = 13;

/*
If this is true, then an option-scid-alias channel-type open will be
attempted.
*/
bool scid_alias = 14;

/*
The base fee charged regardless of the number of milli-satoshis sent.
*/
uint64 base_fee = 15;

/*
The fee rate in ppm (parts per million) that will be charged in
proportion of the value of each forwarded HTLC.
*/
uint64 fee_rate = 16;

/*
If use_base_fee is true the open channel announcement will update the
channel base fee with the value specified in base_fee. In the case of
a base_fee of 0 use_base_fee is needed downstream to distinguish whether
to use the default base fee value specified in the config or 0.
*/
bool use_base_fee = 17;

/*
If use_fee_rate is true the open channel announcement will update the
channel fee rate with the value specified in fee_rate. In the case of
a fee_rate of 0 use_fee_rate is needed downstream to distinguish whether
to use the default fee rate value specified in the config or 0.
*/
bool use_fee_rate = 18;

/*
The number of satoshis we require the remote peer to reserve. This value,
if specified, must be above the dust limit and below 20% of the channel
capacity.
*/
uint64 remote_chan_reserve_sat = 19;

/*
An optional note-to-self to go along with the channel containing some
useful information. This is only ever stored locally and in no way impacts
the channel's operation.
*/
string memo = 20;
}

message BatchOpenChannelResponse {
Expand Down Expand Up @@ -2280,6 +2367,18 @@ message OpenChannelRequest {
be zero and is ignored.
*/
bool fund_max = 26;

/*
An optional note-to-self to go along with the channel containing some
useful information. This is only ever stored locally and in no way impacts
the channel's operation.
*/
string memo = 27;

/*
A list of selected outpoints that are allocated for channel funding.
*/
repeated OutPoint outpoints = 28;
}
message OpenStatusUpdate {
oneof update {
Expand Down Expand Up @@ -2361,6 +2460,11 @@ message ChanPointShim {
the value is less than 500,000, or as an absolute height otherwise.
*/
uint32 thaw_height = 6;

/*
Indicates that the funding output is using a MuSig2 multi-sig output.
*/
bool musig2 = 7;
}

message PsbtShim {
Expand Down Expand Up @@ -2546,6 +2650,13 @@ message PendingChannelsResponse {

// Whether this channel is advertised to the network or not.
bool private = 12;

/*
An optional note-to-self to go along with the channel containing some
useful information. This is only ever stored locally and in no way
impacts the channel's operation.
*/
string memo = 13;
}

message PendingOpenChannel {
Expand Down Expand Up @@ -2573,6 +2684,17 @@ message PendingChannelsResponse {

// Previously used for confirmation_height. Do not reuse.
reserved 2;

// The number of blocks until the funding transaction is considered
// expired. If this value gets close to zero, there is a risk that the
// channel funding will be canceled by the channel responder. The
// channel should be fee bumped using CPFP (see walletrpc.BumpFee) to
// ensure that the channel confirms in time. Otherwise a force-close
// will be necessary if the channel confirms after the funding
// transaction expires. A negative value means the channel responder has
// very likely canceled the funding and the channel will never become
// fully operational.
int32 funding_expiry_blocks = 3;
}

message WaitingCloseChannel {
Expand Down Expand Up @@ -2725,6 +2847,9 @@ message WalletAccountBalance {
}

message WalletBalanceRequest {
// The wallet account the balance is shown for.
// If this is not specified, the balance of the "default" account is shown.
string account = 1;
}

message WalletBalanceResponse {
Expand Down Expand Up @@ -3472,22 +3597,22 @@ message Invoice {

/*
The amount that was accepted for this invoice, in satoshis. This will ONLY
be set if this invoice has been settled. We provide this field as if the
invoice was created with a zero value, then we need to record what amount
was ultimately accepted. Additionally, it's possible that the sender paid
MORE that was specified in the original invoice. So we'll record that here
as well.
be set if this invoice has been settled or accepted. We provide this field
as if the invoice was created with a zero value, then we need to record what
amount was ultimately accepted. Additionally, it's possible that the sender
paid MORE that was specified in the original invoice. So we'll record that
here as well.
Note: Output only, don't specify for creating an invoice.
*/
int64 amt_paid_sat = 19;

/*
The amount that was accepted for this invoice, in millisatoshis. This will
ONLY be set if this invoice has been settled. We provide this field as if
the invoice was created with a zero value, then we need to record what
amount was ultimately accepted. Additionally, it's possible that the sender
paid MORE that was specified in the original invoice. So we'll record that
here as well.
ONLY be set if this invoice has been settled or accepted. We provide this
field as if the invoice was created with a zero value, then we need to
record what amount was ultimately accepted. Additionally, it's possible that
the sender paid MORE that was specified in the original invoice. So we'll
record that here as well.
Note: Output only, don't specify for creating an invoice.
*/
int64 amt_paid_msat = 20;
Expand Down
7 changes: 5 additions & 2 deletions src/main/proto/neutrino.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto
* And is distributed under LNDs MIT License.
* LND (74023fe) tag : Downloaded 2023-02-25
* LND (9ce02b9) tag : Downloaded 2023-09-22
*/
syntax = "proto3";

Expand Down Expand Up @@ -55,9 +55,12 @@ service NeutrinoKit {
rpc GetCFilter (GetCFilterRequest) returns (GetCFilterResponse);

/*
Deprecated, use chainrpc.GetBlockHash instead.
GetBlockHash returns the header hash of a block at a given height.
*/
rpc GetBlockHash (GetBlockHashRequest) returns (GetBlockHashResponse);
rpc GetBlockHash (GetBlockHashRequest) returns (GetBlockHashResponse) {
option deprecated = true;
}
}

message StatusRequest {
Expand Down

0 comments on commit 93a3c5f

Please sign in to comment.