Skip to content

Near validator bot for alerts and notification about your validator, for example: total stake, who staked you and amount, uptime, etc.

License

Notifications You must be signed in to change notification settings

nearuaguild/near-validator-bot

Repository files navigation


Near Protocol Validator Bot

A working example of NodeJS telegram bot integration with Near Protocol api to get your validator statistic in notification like delegators count, total delegation, uptime and alerts

All bot commands . Explore other examples · Report Bug

Developed by

Near Ukrainians Guild cover

Near Ukrainians Guild is a fast-growing guild aimed at providing high-quality educational content and assistance to grow a strong community of Ukrainian developers/entrepreneurs in the Near Protocol ecosystem

Twitter Youtube Telegram Chat Telegram Channel Medium Github


About The Project

Built With


Getting Started

💡 Before you begin, make sure you have the following installed

Installation

Follow these simple instructions to set up a local development environment

  1. Clone the repo
    git clone https://github.com/nearuaguild/near-validator-bot.git
  2. Install NPM packages
    yarn
  3. Create bot via bot-father in telegram, add to your channel to get updates
  4. Copy the example env file to .env and change values for yours, like your channel id and bot id
    cp .env.example .env
  5. Build server
    yarn build
  6. Launch application
    yarn start
    or
    pm2 start dist/index.js
  7. Get updated about your bot

State check every 10 mins by default, but you can modify it in .env file

If everything is updated you will see next message:

Updated Fields:
- Pool earnings: 0.43 Near
- Updated total stake: 47314 Near
- Updated delegators count: 8
- Uptime: 100%
- Chunks produced: 0 / Chunks expected: 0
- Updated peers: 33
- Is node active: true

But in general case you will receive updates only things that have changed, like:

Updated Fields:
- Pool earnings: 7.19 Near
- Updated total stake: 47350 Near

Available telegram bot commands

Check here

TODO

  1. Add docker
  2. Add more commands
  3. Add database to subscribe to your bot directly from bot without setup your own
  4. Add Contribution rules
  5. Add version support

Please if you see errors or have ideas, just create PR

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

Near validator bot for alerts and notification about your validator, for example: total stake, who staked you and amount, uptime, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published