docs.rs failed to build embedded-lnd-0.1.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
embedded-lnd 🦀
embedded-lndis a Rust library that provides a high-level, safe interface for interacting with an embedded LND node.- You can compile LND using CGO for Linux, MacOS and Windows and embed it into your application and interact with it.
- At compile time,
build.rstakes theliblnd.hfile and generates abindings.rsfile for Rust <-> C FFI. - You can then import protobuf types and LND grpc methods from the library and just call them.
- Refer to LND API docs for methods and types.
Installation
cargo add embedded-lnd
# In your app, set the env variable LND_LIB_DIR=/path/to/static/lnd/binary
Usage
Here's a basic example of how to use embedded-lnd:
use ;
use Arc;
Examples
Creating an Invoice
use ;
let client = new;
let invoice = Invoice ;
let response: AddInvoiceResponse = client.call_lnd_method?;
println!;
Subscribing to Events
use ;
let client = new;
client.
.on_event
.with_request
.subscribe?;
Setting up a Bidirectional Stream
use ;
let client = new;
let acceptor = client
.
.on_request
.get_response
.build?;
API Documentation
For detailed API documentation, run cargo doc --open in your project directory.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Disclaimer
This software is in beta and should not be used in production environments without proper review and testing.
Contact
If you have any questions or feedback, please open an issue on the GitHub repository.