Skip to content

Commit

Permalink
Merge pull request #87 from lndk-org/send-invoice-req
Browse files Browse the repository at this point in the history
Offers: send invoice request
  • Loading branch information
carlaKC authored Mar 7, 2024
2 parents e4f5512 + b85cad4 commit 276c676
Show file tree
Hide file tree
Showing 13 changed files with 1,312 additions and 396 deletions.
74 changes: 35 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bitcoin = { version = "0.29.2", features = ["rand"] }
clap = { version = "4.4.6", features = ["derive"] }
futures = "0.3.26"
home = "0.5.5"
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "caafcedf3fc40fc6253261218c25b254dd955a82" }
lightning = { git = "https://github.com/orbitalturtle/rust-lightning", branch = "v0.0.118-custom", features = ["max_level_trace"] }
rand_chacha = "0.3.1"
rand_core = "0.6.4"
log = "0.4.17"
Expand All @@ -29,12 +29,13 @@ tonic_lnd = { git = "https://github.com/orbitalturtle/tonic_lnd", branch = "upda
hex = "0.4.3"
configure_me = "0.4.0"
bytes = "1.4.0"
triggered = "0.1.2"

[dev-dependencies]
bitcoincore-rpc = { package="core-rpc", version = "0.17.0" }
bitcoind = { version = "0.30.0", features = [ "22_0" ] }
chrono = { version = "0.4.26" }
ldk-sample = { git = "https://github.com/lndk-org/ldk-sample", branch = "onion-handler" }
ldk-sample = { git = "https://github.com/lndk-org/ldk-sample", branch = "change-node-announcement-interval" }
mockall = "0.11.3"
tempfile = "3.5.0"

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ endif
itest:
@$(call print, "Building lnd for itests.")
git submodule update --init --recursive
cd lnd/cmd/lnd; $(GO_BUILD) -tags="peersrpc signrpc dev" -o $(TMP_DIR)/lndk-tests/bin/lnd-itest$(EXEC_SUFFIX)
$(CARGO_TEST) -- -- test '*' --test-threads=1 --nocapture
cd lnd/cmd/lnd; $(GO_BUILD) -tags="peersrpc signrpc walletrpc dev" -o $(TMP_DIR)/lndk-tests/bin/lnd-itest$(EXEC_SUFFIX)
$(CARGO_TEST) --test '*' -- --test-threads=1 --nocapture

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ When you encounter a problem with `LNDK`, Feel free to file issues or start [a d

To run `LNDK`, you require access to a `LND` node running _at least_ [LND v0.17.0](https://github.com/lightningnetwork/lnd/releases/tag/v0.17.0-beta).

You will need to compile `LND` in `dev` mode (to enable protocol-level feature handling externally) and enable the `peersrpc` and `signerrpc` sub-servers:
You will need to compile `LND` in `dev` mode (to enable protocol-level feature handling externally) and enable the `peersrpc`, `signerrpc`, and `walletrpc` sub-servers:

`make install tags="peersrpc signrpc dev"`
`make install tags="peersrpc signrpc walletrpc dev"`

Note that this guide assumes some familiarity with setting up `LND`. If you're looking to get up to speed, try [this guide](https://docs.lightning.engineering/lightning-network-tools/lnd/run-lnd).

Expand Down Expand Up @@ -82,7 +82,7 @@ Or in a more concrete example:
Rather than use the admin.macaroon with unrestricted permission to an `LND` node, we can bake a macaroon using lncli with much more specific permissions for better security. With this command, generate a macaroon which will give `LNDK` only the specific grpc endpoints it's designed to hit:

```
lncli --save_to=<FILEPATH>/lndk.macaroon uri:/lnrpc.Lightning/GetInfo uri:/lnrpc.Lightning/ListPeers uri:/lnrpc.Lightning/SubscribePeerEvents uri:/lnrpc.Lightning/SendCustomMessage uri:/lnrpc.Lightning/SubscribeCustomMessages uri:/peersrpc.Peers/UpdateNodeAnnouncement uri:/signrpc.Signer/DeriveSharedKey
lncli bakemacaroon --save_to=<FILEPATH>/lndk.macaroon uri:/lnrpc.Lightning/GetInfo uri:/lnrpc.Lightning/ListPeers uri:/lnrpc.Lightning/SubscribePeerEvents uri:/lnrpc.Lightning/SendCustomMessage uri:/lnrpc.Lightning/SubscribeCustomMessages uri:/peersrpc.Peers/UpdateNodeAnnouncement uri:/signrpc.Signer/DeriveSharedKey
```

## Security
Expand Down
2 changes: 1 addition & 1 deletion lnd
Submodule lnd updated 240 files
6 changes: 6 additions & 0 deletions src/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ impl Clock for TokioClock {
Instant::now()
}
}

impl Default for TokioClock {
fn default() -> Self {
Self::new()
}
}
Loading

0 comments on commit 276c676

Please sign in to comment.