Giter Club home page Giter Club logo

thor-calculator's Introduction

Thor Calculator

This is a small package calculating thor generation rate based on

installation

Install from NPM

$ npm i thor-calculator -g    // for CLI tool
$ npm i thor-calculator -save // for node_modules usage

Install from yarn

$ yarn add thor-calculator

Demo

Usage

Use it in CLI

$ thor <your VET amount> <X node status(true/false - default to false)>
$ thor 1550000 true     // sample, is X Node
$ thor 3450000 false    // sample, is not X Node
$ thor 1235000          // sample, default is not X Node

Note you can also use Million(M) shorthand

$ thor 1.55M true

Sample Respond

⡏ calculating...

╔═══════════════╤═══════════════════════╤═══════════════════════════════════════════════════════╗
║ VET Amount    │ 1550000 VET($12074.5) │                                                       ║
╟───────────────┼───────────────────────╢                                                       ║
║ Node Type     │ VeThor X Node         │                                                       ║
╟───────────────┼───────────────────────┼───────────────────────────╤───────────────────────────╢
║ Generation    │ 898.05355620 vtho/day │ 26941.60668600 vtho/month │ 327789.54801296 vtho/year ║
╟───────────────┼───────────────────────┼───────────────────────────┼───────────────────────────╢
║ Profits       │ $1.542/day            │ $46.254/month             │ $562.762/year             ║
╟───────────────┼───────────────────────┼───────────────────────────╧───────────────────────────╢
║ Annual Return │ 4.66%                 │                                                       ║
╚═══════════════╧═══════════════════════╧═══════════════════════════════════════════════════════╝
> VET's current price at $0.00779 on LBank
> VTHO's current price at $0.00171684 on LBank
> resource: https://github.com/VechainCommunity/thor-calculator
> current time: 2018-8-15 18:52:00

Use it as a Nodejs Module(sample code)

snippets

const thorCalculator = require('./index');
const info = thorCalculator(1000000, false);
console.log(info);

print out

{ 
  user: { 
     amount: 1000000,
     is_x_node: false,
     node_config: {},
     node_type: 'Strength Node',
     thor_generation_rate_per_vet: 0.0008605594405594406,
     thor_amount_per_day: 860.5594405594406 
  },
  blockain: { 
     nodes: { 
        Mjolnir_Nodes_Number: 200,
        Thunder_Nodes_Number: 300,
        Strnegth_Nodes_Number: 1000,
        Vethor_Nodes_Number: 2000 
     },
     baseRate: 0.0004405594405594406 
  } 
}

Author

Amazingandyyy

License

MIT

Help

  • PR
  • issues
  • stars
  • forks

thor-calculator's People

Contributors

amazingandyyy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

thor-calculator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.