/solana-cord

Solana's JSON RPC API wrapped for discord bots

Primary LanguagePythonMIT LicenseMIT

Solana Cord

MIT License Version PR's Welcome

Overview

Solana Cord is an implementation of Solana's JSON RPC API, wrapped for discord bots - meaning all features can be customized to your liking. Currently, this bot supports Solana Epoch tracking and custom settings for epoch updates. This project is meant to be a self-hosted bot, but you can contact me and we can work together to set it up.

Currently, the RPC wrapper supports multiple API methods that are useful for discord bots/members. However, the wrapper is modular by nature and easily expandable. Feel free to build on top of it. There's also an additional sample discord bot code that allow you to customize for your own server. The bot currently supports epoch tracking and notification updates when a staking cycle is about to end.

Demo

epoch_demo

Features - JSON RPC API Wrapper

  • getBlock
  • getBlockHeight
  • getBlockTime
  • getEpochInfo
  • getEpochSchedule
  • getLeaderSchedule
  • getInflationRate

Features - Sample bot

  • Epoch Tracking Information
  • Notification when an epoch is about to end (1 hour)

Installation

Installation is very easy. Simply follow the procedures listed below:

git clone https://github.com/jaloo555/solana-cord.git
pip install -r requirements.txt

Configuration:

The bot extracts configuration information from /config/options.ini, add a discord bot account token under credentials to get started.

To run:

python3 run.py

License

Released under MIT License.

Work is done by a Solana newb kekw.