-
Requires:
- Macaroon with the
/getinfopermissions (readonly will do fine) - Clearnet url of the node to use (normally on port :8080)
- Folder
.configat the root of this repo with the macaroon file placed inside Configuration/local.yamlwill need the following added:
lnd: url: "https://<node alias>.t.voltageapp.io:8080" #NOTE: `t` is for testnet, `m` would be needed for mainnet macaroonpath: ".config/readonly.macaroon" - Macaroon with the
-
What this bot does:
- Calls out to the configured lnd node over clearnet and calls the node's
/getinfoendpoint as a "fake" ping call to the node (lnd does not provide a/pingendpoint at this time) - This "ping" will repeate until the bot is killed, the wait time between "pings" is configure with the
pingfreqsecsvalue (default wait time is 30 seconds)
- Calls out to the configured lnd node over clearnet and calls the node's
-
NOTE: The interesting peice of code for connecting to lnd can be found in /src/lnd/lnd_manager.rs The benfit of using the REST API over grpc comes down to how much of the lightning client do you actually need? If it's only a handful of endpoints, it may be easier to maintain standard REST instead of having to deal with lnd's proto and the issues that can arise with grpc in rust. This is a decision only the developer of a project can make for themselves. If you're looking for a way to connect using grpc in rust, tonic_lnd is a good crate to try: tonic_lnd.
-
Notifications
You must be signed in to change notification settings - Fork 0
Small project holding code showing how to interact with an LND node's API in rust
License
tee8z/lnd-example-bot
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Small project holding code showing how to interact with an LND node's API in rust
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published