Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/niteshbalusu11/lightning-probing


https://github.com/niteshbalusu11/lightning-probing

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# lightning-probing

A package to probe the lightning network.

# Add a dependency

```
cargo add lightning-probing
```

## Installation locally for testing

- Install Rust https://www.rust-lang.org/

- Set env variables for running tests
```
# Update as necessary

cp .env.example .env
```

- Build
```
cargo build
```

- Test
```
# To test with log printing
cargo test -- --nocapture
```

- For using the repo, here's what it takes as inputs and outputs.

```rust
// For examples check the tests folder

// @Input

// For LndClient use https://github.com/yzernik/tonic_openssl_lnd
// OR my fork https://github.com/niteshbalusu11/lnd-grpc-rust

pub struct ProbeDestination {
pub client: LndClient,
pub probe_amount_sat: Option,
pub destination_pubkey: Option,
pub timeout_seconds: Option,
pub fee_limit_sat: i64,
pub payment_request: Option,
pub outgoing_pubkeys: Option>,
pub last_hop_pubkey: Option,
pub max_paths: Option,
}

// @Returns

#[derive(Debug)]
pub struct ReturnValue {
pub payment: lnrpc::Payment,
pub is_probe_success: bool,
pub failure_reason: FailureReason,
}
```

# License
MIT