https://github.com/ohager/snr
Payment Application for the Signum Node Rewards (SNR)
https://github.com/ohager/snr
Last synced: about 1 month ago
JSON representation
Payment Application for the Signum Node Rewards (SNR)
- Host: GitHub
- URL: https://github.com/ohager/snr
- Owner: ohager
- License: mit
- Created: 2022-01-11T12:27:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T03:30:34.000Z (almost 3 years ago)
- Last Synced: 2025-02-22T03:44:12.330Z (over 1 year ago)
- Language: JavaScript
- Size: 239 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Signum Node Reward (SNR)
Payment Application for the Signum Node Rewards (SNR)
# Install
> NodeJS 14+ installed
Clone this repo and install the dependencies:
```bash
git clone https://github.com/ohager/snr.git
cd snr
npm i
```
# Initialize aka Configuration
Before using it you need to _configure_ the tool.
On installation the `.env.example` will be copied to `.env` automatically.
Just edit the `.env` file according your needs.
> Hint: You can always override the ENV vars on startup, i.e. `PAYING_ACCOUNT_PASSPHRASE=secret snr pay 100 -x`
> Another Hint: Once the `.env` file exists, it won't be overwritten by the `init` command anymore
# Usage
Just hit `./snr-cli.js --help` for detailed usage
```
14:35 $ ./snr-cli.js
Usage: snr-cli [options] [command]
@@@@@@@@ @@@@@@@
@@@@@ @@@@@ @@@@@
@@@ @@@ @@@ @@@@@
@@@ @@@@@ @@@@ @@@
@@@@@@@@ &@@@ @@@@@@@@ @@@@ @@@@@@@
@@@ @@@@ @@@ @@@@@ @@@
@@@ @@@ *@@@@ @@@ @@@ @@@@
@@@@@ @@@ @@@ @@@@@
@@@@ @@@ @@@ @@@@ @@@ @@@
@@@ @@@@@ @@@ @@@@ @@@
@@@@@@@ @@@ @@@@@@@@ @@@ @@@@@@@@
@@@ @@@@ @@@@@ @@@
@@@@ @@@ @@@ @@@
@@@@@ @@@@@ @@@@@
@@@@@@@ @@@@@@@@
Signum Node Rewards
Author: ohager
Version: 1.1.0
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
init Initializes the command. Use this before any other action
pay [options] [amount] Pays the rewards to eligible node operators
queue [options] [availability] Checks the node operators for payment eligibility, and queues them for
sending (need to use pay to execute payments)
help [command] display help for command
```
## Examples
### Queue
Queuing is the process to verify if an operator is eligible. It just sets the elgibile operator to 'Queued', such that the payment can be done afterwards.
This will simulate a queue simulation for all version above '3.2' and 95% of availability and last seen today
```bash
./snr-cli.js queue "3.2" 95
```
This will queue for all eligible operators with version above or equal '3.2' and 99% of availability
```bash
./snr-cli.js queue "3.2.2" 99 -x
```
### Payment
Pays out to all 'Queued' operators.
This will simulate a payment execution using the _entire_ balance of the payers account and disitributes to the operators
```bash
./snr-cli.js pay
```
This will simulate a payment execution of 10 Signa.
```bash
./snr-cli.js pay 10
```
This will run a real payment execution of 3.14159 Signa and alters state in the database also
```bash
./snr-cli.js pay 3.14159 -x
```