Skip to content

Commit

Permalink
bump until v0.18.3
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshbalusu11 committed Sep 6, 2024
1 parent 6304ab7 commit a0fa295
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 15 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Apart from being up-to-date at the time of writing (:D) it also allows `async` u
It contains vendored `*.proto` files so LND source code is not *required*
but accepts an environment variable `LND_REPO_DIR` which overrides the vendored `*.proto` files.
This can be used to test new features in non-released `lnd`.
(Actually, the motivating project using this library was that case. :))

## Adding to your Rust 🦀 project
```
Expand All @@ -34,14 +33,12 @@ async fn main() {
// Read the contents of the file into a vector of bytes
let cert_bytes = fs::read("/path/to/tls.cert").expect("FailedToReadTlsCertFile");
let mac_bytes = fs::read("path/to/macaroon").expect("FailedToReadMacaroonFile");


// Convert the bytes to a hex string

// Convert the bytes to a hex string
let cert = buffer_as_hex(cert_bytes);
let macaroon = buffer_as_hex(mac_bytes);

let socket = "localhost:10001".to_string();

let mut client = lnd_grpc_rust::connect(cert, macaroon, socket)
.await
.expect("failed to connect");
Expand All @@ -53,8 +50,9 @@ async fn main() {
.await
.expect("failed to get info");

// We only print it here, note that in real-life code you may want to call `.into_inner()` on
// the response to get the message.
// We only print it here, note that in real-life code
// you may want to call `.into_inner()`
// on the response to get the message.
println!("{:#?}", info);
}

Expand Down
62 changes: 58 additions & 4 deletions vendor/lightning.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down Expand Up @@ -3443,6 +3445,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 {
Expand Down Expand Up @@ -3832,6 +3838,48 @@ message Invoice {
Note: Output only, don't specify for creating an invoice.
*/
map<string, AMPInvoiceState> 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 {
Expand Down Expand Up @@ -4040,6 +4088,11 @@ enum PaymentFailureReason {
Insufficient local balance.
*/
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;

/*
The payment was canceled.
*/
FAILURE_REASON_CANCELED = 6;
}

message Payment {
Expand Down Expand Up @@ -4285,6 +4338,7 @@ message PayReq {
bytes payment_addr = 11;
int64 num_msat = 12;
map<uint32, Feature> features = 13;
repeated BlindedPaymentPath blinded_paths = 14;
}

enum FeatureBit {
Expand Down Expand Up @@ -5054,4 +5108,4 @@ message InterceptFeedback {
binary serialized gRPC message in the protobuf format.
*/
bytes replacement_serialized = 3;
}
}
11 changes: 10 additions & 1 deletion vendor/routerrpc/router.proto
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,15 @@ 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;
}

message TrackPaymentRequest {
Expand Down Expand Up @@ -1011,4 +1020,4 @@ enum ChanStatusAction {
}

message UpdateChanStatusResponse {
}
}
2 changes: 1 addition & 1 deletion vendor/signrpc/signer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -706,4 +706,4 @@ message MuSig2CleanupRequest {
}

message MuSig2CleanupResponse {
}
}
5 changes: 4 additions & 1 deletion vendor/walletrpc/walletkit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -1500,4 +1503,4 @@ message ListLeasesRequest {
message ListLeasesResponse {
// The list of currently leased utxos.
repeated UtxoLease locked_utxos = 1;
}
}

0 comments on commit a0fa295

Please sign in to comment.