Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joelklabo/nostrify
Core Lightning plugin that sends events to Nostr
https://github.com/joelklabo/nostrify
bitcoin cln core-lightning lightning nostr
Last synced: 24 days ago
JSON representation
Core Lightning plugin that sends events to Nostr
- Host: GitHub
- URL: https://github.com/joelklabo/nostrify
- Owner: joelklabo
- Created: 2023-01-22T23:17:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-02T19:22:45.000Z (over 1 year ago)
- Last Synced: 2024-04-14T16:06:52.870Z (8 months ago)
- Topics: bitcoin, cln, core-lightning, lightning, nostr
- Language: Python
- Homepage:
- Size: 125 KB
- Stars: 15
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nostr - nostrify - A Core Lightning plugin that sends events (forwards, connect, disconnect, etc.) to nostr. (Tools / Client reviews and/or comparisons)
README
# Use [nostr-control](https://github.com/joelklabo/nostr-control) Instead, this is no longer maintained.
[![CI Tests](https://github.com/joelklabo/nostrify/actions/workflows/ci.yml/badge.svg)](https://github.com/joelklabo/nostrify/actions/workflows/ci.yml)
Tested on Bitcoin Core `24.0.1`, `23.1`
Core Lightning `master`, `23.02`, `22.11.1`# Nostrify
Core Lightning plugin that sends events to Nostr# Quickstart
Clone this repo into your `/plugins` folder. You'll need to run `pip3 install -r requirements.txt`
By default `Nostrify` uses `lightning-cli makesecret string=nostr` to generate a Nostr key for you. This generates a psuedorandom secret based off of your `HSM_secret`.
See the documentation for `makesecret` [here](https://lightning.readthedocs.io/lightning-makesecret.7.html?highlight=makesecret)
To find the pubkey of your node run:
```bash
$ lightning-cli nostrifypubkey
"npub1sqqres47s8x9ztva4nn525j5w72l23tvw0rh04t49h3gg5xccq7spvtqzs"
```## Required Settings (`nostr_relay`, `nostr_pubkey`)
`Nostrify` sends events as DMs. To receive events as an encrypted DM you must set a pubkey in your config file.
You will also need to set some relays with the `nostr_relay` option, you can set multiple if you like. For example:
```
# Nostrify
nostr_relay=wss://nostr.klabo.blog
nostr_relay=wss://relay.damus.io
nostr_pubkey=2f4fa408d85b962d1fe717daae148a4c98424ab2e10c7dd11927e101ed3257b2
```## Disabling Events
You can disable certain events from being sent by setting `nostr_disable_event` (you can set this multiple times). For example if you wanted to disable connection events and forwards that didn't succeed you could add this to your config file:
Events you can disable:
- connect
- disconnect
- forward_offered
- forward_failed```
nostr_disable_event=connect
nostr_disable_event=disconnect
nostr_disable_event=forward_offered
nostr_disable_event=forward_failed
```If there are others you want to disable open and issue and I'll try and add them.
### Example of Nostrify messages in Damus DM:
![IMG_537E93ECED3E-1](https://user-images.githubusercontent.com/264977/226097495-f598913c-9a82-4654-a802-aacb8bd315a9.jpeg)
### Optional last step
Follow me on nostr `npub19a86gzxctwtz68l8zld2u9y2fjvyyj4juyx8m5geylssrmfj27eqs22ckt` and send me a Zap or tip at `[email protected]` 🤙
# Contribute
If you find a bug or have feature requests file an issue. PRs are also welcomed 🤙