forked from lightningdevkit/rust-lightning
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
lightning-dns-resolver
crate which answers bLIP 32 queries
When a lightning node wishes to send payments to a BIP 353 human readable name (using BOLT 12), it first has to resolve that name to a DNS TXT record. bLIP 32 defines a way to do so over onion messages, and this completes our implementation thereof by adding the server side. It operates by simply accepting new messages and spawning tokio tasks to do DNS lookups using the `dnsse_prover` crate. It also contains full end-to-end tests of the BIP 353 -> BOLT 12 -> payment logic using the new server code to do the resolution. Note that because we now have a workspace crate which sets the "lightning/dnssec" feature in its `dev-dependencies`, a naive `cargo test` will test the "dnssec" feature.
- Loading branch information
1 parent
aa45eaf
commit 93efbec
Showing
7 changed files
with
431 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "lightning-resolver" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
lightning = { version = "0.0.124-rc1", path = "../lightning", default-features = false } | ||
dnssec-prover = { version = "0.6", default-features = false, features = [ "std", "tokio" ] } | ||
tokio = { version = "1.0", default-features = false, features = ["rt"] } | ||
|
||
[dev-dependencies] | ||
bitcoin = { version = "0.32" } | ||
tokio = { version = "1.0", default-features = false, features = ["macros", "time"] } | ||
lightning = { version = "0.0.124-rc1", path = "../lightning", features = ["dnssec", "_test_utils"] } |
Oops, something went wrong.