This repository provides the necessary infrastructure to develop dynamic plugins for CLN. It includes a Nix environment and scripts to set up a local regtest instance of CLN.
To begin, enter the Nix shell with nix-shell to gain access to rustup, rustc, and cargo. This shell serves as the development environment for the Rust components.
One should follow the following steps to test resulting plugin (these scripts doesn't require calling nix-shell before them):
- Run
./start-cln-regtestin a separate terminal to start the regtest bitcoind daemon and CLN instance. - Execute
./start-pluginto add the Rust plugin to the node started in the previous step. - Use
./stop-pluginto remove the plugin. - Utilize
./cln-cliand./btc-clias shortcut scripts to execute the corresponding CLI commands.