#plugin #lightning #bitcoin #cln #rpc #plugin-api

clightningrpc_gossip_map

Crate that provides a plugin API to give the possibility to implement a plugin in Rust

5 releases

0.0.1-beta.5 Aug 4, 2024
0.0.1-beta.2 Jul 29, 2024
0.0.1-beta.1 Jul 26, 2024

#7 in #cln

22 downloads per month

CC0 license

26KB
573 lines

gossip map

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

Example

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!");
}

Dependencies

~7.5MB
~93K SLoC