Socket
Socket
Sign inDemoInstall

coininfo

Package Overview
Dependencies
1
Maintainers
8
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coininfo

JavaScript component for crypto currency specific information.


Version published
Weekly downloads
6.3K
decreased by-22.37%
Maintainers
8
Install size
65.3 kB
Created
Weekly downloads
 

Readme

Source

coininfo

build status

JavaScript component for crypto currency specific information such as version numbers, DNS seeds, etc. Works in Node.js and the browser.

Installation

npm i coininfo

Usage

var coininfo = require('coininfo')

console.dir(coininfo('LTC')) //use LTC-TEST for testnet
// =>
/*
{ versions:
   { public: 48,
     private: 176,
     scripthash: 5,
     bip32: { public: 27108450, private: 27106558 } } }
*/

Could also:

var litecoin = coininfo.litecoin.main
var litecoinTest = coininfo.litecoin.test

Useful to use in conjunction with coinkey and coinstring.

Want to Use With Bitcore or bitcoinjs-lib?

bitcoinjs-lib example:

var coininfo = require('coininfo')
var bitcoin = coininfo.bitcoin.main
var bitcoinBitcoinJSLib = bitcoin.toBitcoinJS()

Bitcore example:

var coininfo = require('coininfo')
var bitcoin = coininfo.bitcoin.main
var bitcoinBitcoreLib = bitcoin.toBitcore()

Pull requests?

Follow the canonical example:

https://github.com/cryptocoinjs/coininfo/blob/master/lib/coins/btc.js

License

MIT

Keywords

FAQs

Last updated on 08 Mar 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc