Barq, ( بَرْق - meaning "lightning" in Arabic), is a Rust plugin for Core Lightning designed to provide a simple and extensible interface for paying invoices on the Lightning Network.
Barq is organized into multiple crates:
Crate Name | Purpose |
---|---|
barq-common |
Contains core logic and implements the strategy design pattern |
barq-plugin |
Plugin with RPC commands for interacting with Core Lightning |
The strategy design pattern is used to create a flexible routing mechanism. This allows for different routing strategies to be implemented and selected at runtime, which enhances the modularity and maintainability of the codebase.
Each strategy follows a common interface, making it easy to add new strategies without changing existing code for the plugin.
A user guide for this plugin can be found here: https://github.com/tareknaser/barq/blob/main/USER_GUIDE.md
To run integration tests, we use nix
. After installing nix, run the following commands:
nix develop
make check
Alternatively, you can run:
nix develop --command bash -c 'make check'
Contributions to Barq are highly appreciated. Please follow the guidelines in CONTRIBUTING.md
for details on linting, formatting, testing, and commit message conventions.