- Description
- Possible use-cases
- Features
- Demo
- Supported OSs
- Dependencies
- Installation
- Config
- Usage
- Disclaimer
- Todo
This application shows a notification pop-up (+ optional sound effect), when a Monero transaction is received by your wallet.
It is also possible to receive messages linked via transaction id.
- Can be used by a streamer, to receive donations in Monero and display the donators name + message in a pop-up.
- If you're fancy, you could just get notifications for your mining (or even, depends on how fancy you are, regular) wallet.
Have a MessageReceiver
wait for messages in the format '<tx_id>:<message>'. If the tx_id
refers to a recently received transaction, the message is stored in a queue and gets displayed in a notification pop-up.
For now there is only one kind of MessageReceiver
, for what is planned/considered to be added see Todo.
Warning: Using this over clearnet exposes your IP. It is advised to use tor (see how to config).
The IRC-Bot is just hanging out in an arbitrary channel and waits for private messages.
/PRIVMSG <bot_name> <tx_id>:<msg>
The benefits of an IRC-Bot are:
- It's easy to use for everyone:
- Donation recipient: just change some settings in the config.
- Donator: can use one of many IRC clients or use a webchat.
- Developer: this was my first attempt to write a bot, and it went pretty well, I guess.
- Does not require to open ports on your router, because we rely on outgoing connections only and use the IRC network's infrastructure.
Play a custom sound effect, when notification pops up.
streamer_donation_wallet_demo.webm
- Should work on most ubuntu-like systems.
- Windows 10
- Get the latest monero release (v0.18.3.3 at the time of writing this).
- Python
- install
pip3 install pygame pysocks
- install
- Command line tools:
- install with
sudo apt install notify-send wmctrl xdotool xprop
- optional to be able to use
launch_script_linux.sh
installsudo apt install tmux
- install with
- Python
- install
pip3 install requests pygame pysocks pywin32
- install
git clone https://github.com/SNeedlewoods/xmr_tx_notify
Create a new Monero wallet, if you don't already have a wallet you want to use for this.
It's recommended to use a view-only wallet, this application does not check the actual balance, so there are no downsides.
Small overview of the most important settings:
Config xmr_tx_notify.py
- Set
IS_FANCY_NOTIFY
:True
(default): Uses dependencies for notification.False
: Uses system level notification.
- Set
MODE
:MODE_DONATION
(default): Uses a message receiver (and in some cases default messages).MODE_NOTIFICATION
: Uses default messages.
- Set default messages:
DEFAULT_NOTIFICATION_NAME
NOTIFICATION_PREFIX
DEFAULT_NOTIFICATION_MESSAGE
- RPC Settings:
- These need to match the settings you use to launch
monero-wallet-rpc
(see Usage)RPC_PORT
RPC_LOGIN_USERNAME
RPC_LOGIN_PASSWORD
- These need to match the settings you use to launch
- Set window position and notification pop-up display size (default is top left corner of screen 1 with size 600x300 pixels)
WINDOW_POS_X
,WINDOW_POS_Y
,WINDOW_WIDTH
,WINDOW_HEIGHT
- If you want to change the background image, or sound you can put the new files into
assets/
and make sure the names match.
Config irc_bot.py
- Set IRC network:
IRC_SERVER
IRC_PORT
- Set IRC user:
IRC_PASSWORD
IRC_BOTNICK
IRC_CHANNEL
- Set
USE_PROXY
:True
(default): Uses tor browser proxy (127.0.0.1:9150).False
: Use this if you don't want to use tor.
For Tor:
Open the Tor browser and connect to the tor network before you launch xmr_tx_notify.py
.
Config launch_script_linux.sh
Using this script is optional, change settings to the same that you would use in Usage.
- Launch monerod (with your usual settings)
cd <path_to_monerod>
./monerod
- Launch wallet rpc
cd <path_to_monero-wallet-rpc>
./monero-wallet-rpc --wallet-file <path_to_wallet>/<wallet_file> --password '<password>' --rpc-bind-port <RPC_PORT> --rpc-login <RPC_LOGIN_USERNAME>:<RPC_LOGIN_PASSWORD>
These need to match the settings you used to create the (view-only) wallet:
--wallet-file
--password
These need to match the settings from config:
--rpc-bind-port
(default: 18099)
--rpc-login
(default: notification_wallet:password)
- Launch main application
python3 xmr_tx_notify.py
If you have tmux
installed and configured launch_srcipt:
./launch_script_linux.sh
Then wait until monero-wallet-rpc
is running and press enter (fingers crossed, everything should work).
This was written by a noob in many subjects that this application touches and my initial intention was just to get a proof of concept. It is not reviewed by anyone with experience or expertise. So use it at you own risk (if you're using a view-only wallet for the monero-wallet-rpc
, there shouldn't be too much risk though AFAIK (don't quote me on this)). Don't sue me pls :)
- Add a
min_amount
for a tx to be displayed, to prevent getting spammed with messages.
- IRC-Bot
- Add feature to IRC-Bot to respond to private messages.
- At least if a possible <tx_id>:<message> pair is detected, so the donator/message sender knows the bot isn't dead.
- consider adding commands like:
- help - show what bot can do (and how)
- Add feature to IRC-Bot to respond to private messages.
- Alternatives:
- Twitch / YouTube / etc. bot, directly on the platform where streamer is streaming (probably best user experience from donator perspective).
- Email (not sure about this one)
-
Trust modes
trust_mode
(current default)- Just show the notification pop-up with the message.
- Works with one screen.
no_trust_mode
- First show the message on another (not live streamed) screen. Then, depending on the content you can decide to:
- decline and
- don't show a notification at all.
- show a notification, but don't show the message (could use default for that).
- accept and make it appear on the shared screen.
- decline and
- First show the message on another (not live streamed) screen. Then, depending on the content you can decide to:
-
Add the option to remember top donators and display them on screen
- either short-term per stream in memory
- or long-term all-time in a persistent file