Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tangoalpha

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tangoalpha

The TangoAlpha Node.js API

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

TangoAlpha Node.js API

JavaScript Style Guide

Notice: This module and API is in early development and may change in the future.

TangoAlpha Official Website

Getting Started

Install the tangoalpha NPM Package with:

npm i tangoalpha

Also, require the module in your Node.js application with:

var tango = require("tangoalpha")

Using the API

Blocktime

tango.blocktime().then(result => { //Result is a float
  console.log(result) // Logs the average blocktime in seconds
})

Blockdrift

tango.blockdrift().then(result => { // Result is an Array
  console.log(JSON.stringify(result)) // Logs the 'drift' of the past 1000 blocks
})

Getdb - (Warning! Very resource intensive, please do not spam this!)

tango.getdb().then(result => { // Result is an Array
  console.log(JSON.stringify(result)) // Logs the entire DB of TangoAlpha
})

mnstcount

tango.mnstcount().then(result => { // Result is an Object
  console.log(JSON.stringify(result)) // Logs the blocks and votes betweeen Stakers and MNs
})

Getblock

var block = 1685805
tango.getblock(block).then(result => { // "Block" is an integer of the desired block. Result is an Object
  console.log(JSON.stringify(result)) // Logs the block and it's winners
})

Getaddress

var address = 1685805
tango.address(address).then(result => { // "Address" is a string of the desired coin address. Result is an Object
  console.log(JSON.stringify(result)) // Logs the address and it's TangoAlpha stats (voteweight, balance, blocksseen)
})

Keywords

FAQs

Package last updated on 06 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc