Skip to content

Commit

Permalink
gossip_map: add meta information
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed Jul 29, 2024
1 parent 143a30e commit 34a7387
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gossip_map/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
[package]
name = "clightningrpc_gossip_map"
version = "0.1.0"
version = "0.0.1-beta.2"
edition = "2021"
description = "Crate that provides a plugin API to give the possibility to implement a plugin in Rust"
license = "CC0-1.0"
homepage = "https://github.com/laanwj/rust-clightning-rpc"
repository = "https://github.com/laanwj/rust-clightning-rpc.git"
keywords = [ "plugin", "cln", "rpc", "lightning", "bitcoin" ]
readme = "README.md"

[dependencies]
anyhow = "1"
log = "0.4.21"
byteorder = "1.4.3"
hex = "0.4.3"
bitcoin = { version = "0.30.0" }
fundamentals = { git = "https://github.com/lnspec-tools/ln-fundamentals.git", branch = "macros/fix_fixed_read" }
fundamentals-derive = { git = "https://github.com/lnspec-tools/ln-fundamentals.git", branch = "macros/fix_fixed_read" }
fundamentals = { version = "0.0.1-alpha.4" }
fundamentals-derive = { version = "0.0.1-alpha.2"}

[dev-dependencies]
anyhow = "1.0.70"
Expand Down
16 changes: 16 additions & 0 deletions gossip_map/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# gossip map

Core Lightning Gossip Map parser to access the gossip map with rust.

## Example

``` rust
fn main() {
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../contrib/gossip_store");
let pubkey = "03e2408a49f07d2f4083a47344138ef89e7617e63919202c92aa8d49b574a560ae";
let map = GossipMap::from_file(path);
assert!(map.is_ok(), "{:?}", map);
let map = map.unwrap();
assert!(map.get_node(pubkey).is_some(), "node with id `{pubkey}` not found!");
}
```

0 comments on commit 34a7387

Please sign in to comment.