Skip to content

Instantly share code, notes, and snippets.

@apemon
Created March 11, 2018 17:22
Show Gist options
  • Save apemon/d20ebef31da5cb15e447dd782f74a963 to your computer and use it in GitHub Desktop.
Save apemon/d20ebef31da5cb15e447dd782f74a963 to your computer and use it in GitHub Desktop.

Create a lightning-cli shortcut to interface with the node

#!/usr/bin/env bash
docker run --rm -v /scratch/bitcoin/testnet/clightning:/root/.lightning --entrypoint /usr/bin/lightning-cli cdecker/lightningd:latest "$@"

Grant permission to shortcut

chmod +x /usr/local/bin/lightning-cli

Test

lightning-cli getinfo
{ "id" : "0312218a791e4ace394338b02d351d5e589bde419ef9294bc73b391e72274c0d3a", "port" : 9735, "address" :
        [
                { "type" : "ipv4", "address" : "159.89.198.232", "port" : 9735 } ], "version" : "v0.5.2-2016-11-21-2092-g7c8883a", "blockheight" : 67416, "network" : "testnet" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment