Home

Awesome

nostr-control

Formatter Tests

Planned Features:

Description

nostr-control is a Core Lightning plugin that allows you talk to your node over Nostr DM. It also will send you events from your node over Nostr DMs.

Requirements

Tested with Core Lightning v23.02.2 and Node 18. nostr-control uses the sql lightning-cli method so any version that supports that should work.

Screenshots

InfoChannel SummaryCreate InvoicePay InvoiceGet AddressSee ForwardsNew Blocks (etc.)
IMG_2262IMG_2348IMG_2258IMG_2352IMG_2261IMG_9AF1D5254260-1IMG_2258

What can I do with it?

When you first set up nostr-control you will start recieving DMs from your node about events that are happening. By default you will receive all events, but you can change this in the config file.

The events you can receive are:

The most interesting thing about nostr-control is that you can communicate with your node. You can respond to it in your DMs and get information about your node. /help will give you a list of commands you can use.

Available Commands:

How do I set it up?

nostr-control uses Node.js and npm. You can install them from here.

  1. Clone the repo into your plugins directory (DO NOT RUN npm install packages are checked in and there is a modification needed for this to run.)
  2. Set up a config file (config.json) in this project's directory (see below)
  3. Register the plugin with lightningd (https://docs.corelightning.org/docs/a-day-in-the-life-of-a-plugin)

Config File

nostr-control needs some Nostr information to work. Specifically these items:

Required

Optional

There is an example config in the root directory example-config.json it looks like this. Input your information there and nostr-control will pick it up.

{
  relay: "some_relay",
  bot_secret: "some_secret_key_hex",
  your_pubkey: "your_pub_key_hex",
  verbosity: "verbose",
  show_failed_forwards: true
}

nostr-control also keeps track of it's own settings so you can update things on the fly. Create your config.json in the root directory and it will be picked up.

You probably won't need to change that but that's where things you set while running will be stored.

How do I get my bot secret?

Just create an account on any Nostr app and use the secret key (hex). You can also update the profile picture etc. this way.

Contribute ( please do )

PRs and Issues are welcome. Follow me on Nostr npub19a86gzxctwtz68l8zld2u9y2fjvyyj4juyx8m5geylssrmfj27eqs22ckt or leave me a tip at my lightning address: joel@klabo.blog. Can also leave a tip on my site: Klabo.blog