npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

signum-commit-my-balance

v1.0.2

Published

Commits part or all balance for mining Signum

Downloads

12

Readme

Security Rating Vulnerabilities Maintainability Rating npm npm

signum-commit-my-balance

Commits part or entire balance for mining in Signum

To boost your mining capacity you need to add so called `commitment' to your mining account. Think of it as kind of stake, signalizing that you not only leech the chain, but also are committed to Signum.

Read also: Optimizing Mining Income on Signum

This small tool makes adding commitment easy. Together with scheduled jobs of your OS you can automate the process.

DISCLAIMER: This software comes without any warranty. Keep in mind that you need to use your very secret passphrase to sign the transactions. Although, this software never ever stores or sends the secret to any server, you have to be conscious that you use this tool on your very own risk. The author assumes no responsibility for the use of this program.

Install

Prerequisites: Need NodeJS 14+ installed

To install just type: npm i signum-commit-my-balance -g

The tool will be installed as command line tool signumcmb

Usage

signumcmb --help to show the help options.

Usage: signumcmb [options]

Options:
  -V, --version              output the version number
  -s, --secret <yoursecret>  Your Signum accounts passphrase
  -a, --amount <amount>      Commit only amount, can be absolute in Signa, or percentage of balance, i.e. 50% (default: "100%")
  -n, --node <url>           Signum Node Host. Default: selects best node of reliable node list (default: "")
  -x, --exec                 Executes the command. If not set, the commitment will be only simulated (default: false)
  -f --fee <type>            Sets fee type by category (choices: "minimum", "cheap", "standard", "priority", default: "standard")
  -os, --onsuccess <script>  Executes a script on successful execution
  -oe, --onerror <script>    Executes a script on failed execution
  -h, --help                 display help for command

Examples

Running a test run

The following script runs a test (no commit at all) on committing all balance

$ signumcmb -s "<your very secret passphrase>"

Output: 

Selected Peer: https://brazil.signum.network
Address: S-K37B-9V85-FB95-793HN - (id: 6502115112683865257)
Available Balance: Ꞩ 1465170.08802094
Locked Balance: Ꞩ 41005
Current Commitment: Ꞩ 1005
Total Balance: Ꞩ 1506175.08802094
Fee: Ꞩ 0.0147
New Commitment: Ꞩ 1466175.07332094
Available Balance After Commitment: Ꞩ 0
🧪 Test Run: Commitment not applied (Run with -x to apply)
✅ Yay, all fine!

Running a balance commitment for real (Using -x)

The following script actually commits 50% of the accounts available balance as commitment

$ signumcmb -s "<your very secret passphrase>" -x -a "50%"

Output:

Selected Peer: https://brazil.signum.network
Address: S-K37B-9V85-FB95-793HN - (id: 6502115112683865257)
Available Balance: Ꞩ 1465170.08802094
Locked Balance: Ꞩ 41005
Current Commitment: Ꞩ 1005
Total Balance: Ꞩ 1506175.08802094
Fee: Ꞩ 0.0147
New Commitment: Ꞩ 733590.03666047
Available Balance After Commitment: Ꞩ 732585.03666047
Committing...
✅ Successfully committed
✅ Yay, all fine!

Adding additional run scripts (in case of success or failure)

signumcmb supports exit points for success or failures. This way you can add further processing, like sending emails, or other notifications (telegram, discord etc) in case of success or failure

Use the -os or --onsuccess option for successful commitments Use the -oe or --onerror option for failures

$ signumcmb -s "<your very secret passphrase>" -a "50%" -os ./onsuccess.sh -oe ./onerror.sh 

Script examples

./onerror.sh

#!/bin/bash
ERR="$1"
echo "Failed: ${ERR}"

./onsuccess.sh

#!/bin/bash
ACCOUNT="$1"
COMMITTED="$2"
echo "Committed ${COMMITTED} for ${ACCOUNT}"