niteshbalusu11 / cln-lightning-liquidity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cln-lightning-liquidity

Buy lightning channels on a core-lightning node from any node on the network selling using lsps1 protocol.

Installation

  • You need to install Rust
# Clone the repo
git clone https://github.com/niteshbalusu11/cln-lightning-liquidity.git

# Go into it
cd cln-lightning-liquidity

# Build
cargo build --release

# In your core lightning config
plugin=/path/to/cln-lightning-liquidity

# Start the plugin

Usage

Help command:

  • lightning-cli buy-inbound-channel method=help
{   "cli_params": {
      "amount": "<number> enter the channel size you want to buy",
      "blocks": "<number> enter the number of blocks you want to wait for the channel to be confirmed",
      "method": "Method can be one of the following: (help, buy, getinfo, getorder)",
      "orderid": "<orderid> returns the status of the order",
      "type": "<private/public> the type of channel you want to buy",
      "uri": "<uri> pubkey@host:port"
   }
}

Example getinfo

  • lightning-cli buy-inbound-channel method=getinfo uri="pubkey@ip:port"

Example buy a channel

  • lightning-cli buy-inbound-channel method=buy uri="pubkey@ip:port" amount=100000 blocks=144 method=buy type=private

Example getorder

  • lightning-cli buy-inbound-channel method=getorder uri="pubkey@ip:port" orderid="orderid"

Everything gets logged to cln log file. Yeah, I have no idea how to print it to the console yet.

About

License:MIT License


Languages

Language:Rust 95.3%Language:Shell 4.7%