0.1.7 • Published 6 years ago

thor-calculator v0.1.7

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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
0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.0.1

6 years ago

0.0.2

6 years ago