@abcpros/coininfo 中文文档教程

发布于 3年前 浏览 25 项目主页 更新于 3年前

coininfo

构建状态

用于加密货币特定信息(如版本号、DNS 种子等)的 JavaScript 组件。 适用于 Node.js 和浏览器。

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 } } }
*/

还可以:

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

coinkey硬币串

Want to Use With Bitcore or bitcoinjs-lib?

bitcoinjs-lib 示例:

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

Bitcore 示例:

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

Pull requests?

按照规范示例:

https

License

://github.com/cryptocoinjs/coininfo/blob/master/lib/coins/btc.js麻省理工学院

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

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文