Sneaky-Ninja Update: Optimisation & Simplification

Hey guys, hope all is well.

The latest version of Sneaky-Ninja is now available! This update includes a critical bug fix, lots of optimizations & some simplification to user inputs.

Here is a full list of all changes:
=> Block stream now auto restarts on fail
=> Renamed .globalProps to .settings
=> Reduced the number of inputs needed
=> Sneaky-ninja now auto handles voting power % from vprangestart to vprangestop
=> Added SCALE / FIXED vote weight modes
=> Removed color text when logging
=> Fixed some calculation errors
=> RPC list & config applied to both libraries (hivejs - dhive)
=> Seperated vote, follow & reblog functions + harness the power of recursion.
=> ALOT of typo fixes >.<


1.Requirements:

  • Node.js (I recommend installing the latest version of node with nvm)
  • npm
  • (optional ) pm2

2.Installation:

  • Clone this repo & cd into it
    git clone https://github.com/louis23412/sneaky-ninja-hive.git && cd sneaky-ninja-hive

  • Install dependencies
    npm install

3.Configuring variables & running the bot:

  • Open settings.json & add your account(s) + key(s)

    Single account:
    "USERLIST" : [
        ["usernameHere", "privatePostingKeyHere"]
    ]
    
    Multiple accounts:
    "USERLIST" : [
        ["usernameHere", "privatePostingKeyHere"],
        ["usernameHere", "privatePostingKeyHere"],
        ["usernameHere", "privatePostingKeyHere"]
    ]
    

    For security reasons, only use your posting key(s)!

  • Change the variables as needed:

     "GLOBALVARS" : {
         "REBLOG" : false,
         "FOLLOW" : false,
         "RFMINWEIGHT" : 100,
    
         "MINREP" : 35,
         "MAXACTIVEPOSTS" : 7,
         "MINAVGPOST" : 3,
         "MAXVOTERS" : 5,
         "MINSCHEDULETIME" : 4.88,
    
         "MINRC" : 80,
         "VPRANGESTART" : 92,
         "VPRANGESTOP" : 97,
         "BASEWEIGHT" : 15,
         "VWSCALE" : true
     }
    

REBLOG : true to enable reblogs / false to disable.
FOLLOW : true to enable follow / false to disable.
RFMINWEIGHT : the minimum vote weight % needed to trigger reblogs / follow.

MINREP : the minimum reputation of the author.
MAXACTIVEPOSTS : the maximum allowed posts for the author over the last 7 days.
MINAVGPOST : the minimum average post value for the author over the last 7 days.
MAXVOTERS : the maximum number of voters allowed on the post at the time of voting.
MINSCHEDULETIME : the minimum age a post has to be to get an upvote.

MINRC : the minimum resource credit % needed to vote, follow & reblog. Helps to prevent RC drainage on small accounts.
VPRANGESTART : the minimum voting power % needed to vote
VPRANGESTOP : the script will automatically try to keep voting power % at this level. Voting power can dip in between start & stop. (Recommended : 92 - 97)
BASEWEIGHT : the voting weight % used to upvote posts.
VWSCALE : true to enable vote weight scaling. (Formula used: base weight x average post value) / false to use only BASEWEIGHT

  • The bot should work just fine with the default RPC list provided, but if it seems a bit slow or fails, you can view the status of all active nodes here.

    "RPCLIST" : [
          "https://anyx.io",
          "https://rpc.ausbit.dev",
          "https://api.hive.blog",
          "https://api.openhive.network"
    ]
    
  • Save the config file, then run the bot
    npm start
    or, if you want to use pm2:
    pm2 start sneaky-ninja.js
    to monitor (Ctrl + C to close)
    pm2 monit


That's all I have, for now, more updates coming soon.

--------------------------------------------------------------------------

Add me on Discord if you'd like to talk: CreepyPastaZ ψ(`∇´)ψ#1729

--------------------------------------------------------------------------

Sort:  

@gingerninja, thank you for supporting the HiveBuzz project by voting for our witness.

Here Is a small present to show our gratitude
Click on the badge to view your Board of Honor.

Once again, thanks for your support!

Check out the last post from @hivebuzz:

Hive Power Up Month Challenge 2022-01 - Winners List
Be ready for the next Hive Power Up Month!
Hive Power Up Day - February 1st 2022