AutoZap is a bot for the Nostr network designed to monitor reposts of specific notes and automatically send small Lightning Network payments (zaps) to users who engage with these notes. It's powered by Python, Nostr libraries, and LNbits for Lightning transactions.
- Monitors Nostr relays for reposts of specific notes.
- Automatically sends payments (zaps) to users when they engage.
- Uses LNbits API for handling Lightning payments.
- Python 3.10 or higher
- Virtual Environment (optional but recommended)
- Nostr Account with relays
- LNbits Account for handling Lightning payments
-
Clone the repository:
git clone https://github.com/NOSTR-HUB/AutoZap.git cd AutoZap
-
Set up the virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Configuration:
Create a
.env
file in the root directory to configure environment variables:cp config/.env.example .env
Edit
.env
with your preferred editor to include the following values:LNBITS_API_KEY
: Your LNbits API key.LNBITS_URL
: Your LNbits instance URL for creating invoices.NOSTR_RELAY_URLS
: Comma-separated list of Nostr relay URLs.PAYMENT_AMOUNT
: The amount in satoshis to send for each qualifying repost.
-
Activate the virtual environment (if not already active):
source venv/bin/activate
-
Run the bot:
PYTHONPATH=$(pwd)/src python3 -m backend.nostr_bot.bot
The bot will connect to configured Nostr relays, listen for reposts of the specified note, and trigger payments.
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are welcome.
This project is licensed under the MIT License.
- LNbits Payment Error: Ensure that the
LNBITS_API_KEY
andLNBITS_URL
are correctly set in your.env
file. - Nostr Relay Connection Issues: Verify that the relays listed in
NOSTR_RELAY_URLS
are reachable.