Skip to content

monerobot/monerobot

Repository files navigation

MoneroBot Build Passing

Your friendly neighbourhood monero bounty bot!

Overview

This a C# re-implementation of the original monero bounty bot which used with the Fider frontend to power bounties.monero.social. This C# implementation was made because the existing code stopped working and is no longer maintained.

Architecture Diagram

Featues

  • A single executable whose behaviour can be configured easily by editing the appsettings.json file.
  • Stable donation address selection for posts which prevents posts from using an address which has already recieved funds.
  • Donation scanning updates comments depending on their status (unconfirmed, confirmed, sent).
  • Extensive structured logging used in the background services to simplify deployment maintenance.
  • More robust error handling and tolerance of faults in the consumed Fider API and Wallet RPC.
  • Supports configuring the account number used for donation addresses.
  • Automatically labels subaddresses in the wallet for ease of use.
  • Allows Fider API requests to use an impersonated user.

Usage

Build/download the monero bounty bot daemon binaries appropriate to your platform and then modify the appsettings.json file as appropriate. The daemon program itself expects you to have configured/have running the following APIs/services:

  1. A Fider instance.
  2. A Monero Wallet RPC Server instance which was launched with the --wallet-file argument pointing to the managed donation wallet.

Configuration

The appsettings.json file can be modified and placed alongside the executable to configure the daemon. The following settings are available:

{
    "ConnectionStrings": {
        // The sqlite database in which the state of the bot is stored.
        "MoneroBotContext": null
    },
    // Settings related to the daemon program itself.
    "DaemonOptions": {
        // The account index to use when registering new bounties.
        "WalletAccountIndex": 0,
        // The delay which background processes wait for before starting the
        // background action again.
        "PollingInterval": "00:00:10",
        // The Fider user ID of the Monero Bot account - only comments by this
        // user will be considered when attempting to restore the database
        // from fider state.
        "FiderMoneroBotUserId": null
    },
    "Fider": {
    // The Fider API key to use when creating or updating posts/comments.
        "ApiKey": null,
        // The address where the Fider instance is accessible (i.e https://localhost:38080).
        "BaseAddress": null,
        // If set the value will be used to set the X-Fider-UserID header allowing
        // the user to be impersonated.
        "ImpersonationUserId": null
    },
    "MoneroWalletRpc": {
        // The address where a running instance of the Monero Wallet RPC server is accessible (i.e https://localhost:28083).
        "BaseAddress": "https://localhost:28083",
        // If provided configures the username to use when logging into the RPC server.
        "RpcUsername": null,
        // Can be provided along with `RpcUsername` when logging into the RPC server requires
        // a password.
        "RpcPassword": null,
        // Configures whether the daemon program should accept self-signed HTTPS certificates
        // from the Monero Wallet RPC server.
        "AcceptSelfSignedCerts": true
    }
}

Releases

No releases published

Packages

No packages published