bitcoinクローンのchainパラメータを取得する

# インストール

```
npm i coininfo
```

## サンプル - bitcoinjs-lib形式

```
const coin = require("coininfo")
console.log(coin("LTC").toBitcoinJS())
console.log(coin("DOGE").toBitcoinJS())
```

### 結果

```
{ hashGenesisBlock: '12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2',
  port: 9333,
  protocol: { magic: 3686187259 },
  seedsDns: 
   [ 'dnsseed.litecointools.com',
     'dnsseed.litecoinpool.org',
     'dnsseed.ltc.xurious.com',
     'dnsseed.koin-project.com',
     'dnsseed.weminemnc.com' ],
  versions: 
   { bip32: { private: 27106558, public: 27108450 },
     bip44: 2,
     private: 176,
     public: 48,
     scripthash: 50,
     scripthash2: 5 },
  name: 'Litecoin',
  unit: 'LTC',
  testnet: false,
  toBitcoinJS: [Function: bound toBitcoinJS],
  toBitcore: [Function: bound toBitcore],
  messagePrefix: null,
  bip32: { public: 27108450, private: 27106558 },
  pubKeyHash: 48,
  scriptHash: 50,
  wif: 176,
  dustThreshold: null }
{ hashGenesisBlock: '1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691',
  port: 22556,
  protocol: { magic: 3233857728 },
  seedsDns: 
   [ 'seed.dogecoin.com',
     'seed.multidoge.org',
     'seed2.multidoge.org',
     'seed.doger.dogecoin.com' ],
  versions: 
   { bip32: { private: 49988504, public: 49990397 },
     bip44: 3,
     private: 158,
     public: 30,
     scripthash: 22 },
  name: 'Dogecoin',
  unit: 'DOGE',
  testnet: false,
  toBitcoinJS: [Function: bound toBitcoinJS],
  toBitcore: [Function: bound toBitcore],
  messagePrefix: null,
  bip32: { public: 49990397, private: 49988504 },
  pubKeyHash: 30,
  scriptHash: 22,
  wif: 158,
  dustThreshold: null }
```


## サンプル - bitcore形式

```
const coin = require("coininfo")
console.log(coin("LTC").toBitcore())
console.log(coin("DOGE").toBitcore())
```

### 結果

```
{ hashGenesisBlock: '12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2',
  port: 9333,
  protocol: { magic: 3686187259 },
  seedsDns: 
   [ 'dnsseed.litecointools.com',
     'dnsseed.litecoinpool.org',
     'dnsseed.ltc.xurious.com',
     'dnsseed.koin-project.com',
     'dnsseed.weminemnc.com' ],
  versions: 
   { bip32: { private: 27106558, public: 27108450 },
     bip44: 2,
     private: 176,
     public: 48,
     scripthash: 50,
     scripthash2: 5 },
  name: 'livenet',
  unit: 'LTC',
  testnet: false,
  toBitcoinJS: [Function: bound toBitcoinJS],
  toBitcore: [Function: bound toBitcore],
  alias: 'mainnet',
  pubkeyhash: 48,
  privatekey: 176,
  scripthash: 50,
  xpubkey: 27108450,
  xprivkey: 27106558,
  networkMagic: 4223710939,
  dnsSeeds: 
   [ 'dnsseed.litecointools.com',
     'dnsseed.litecoinpool.org',
     'dnsseed.ltc.xurious.com',
     'dnsseed.koin-project.com',
     'dnsseed.weminemnc.com' ] }
{ hashGenesisBlock: '1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691',
  port: 22556,
  protocol: { magic: 3233857728 },
  seedsDns: 
   [ 'seed.dogecoin.com',
     'seed.multidoge.org',
     'seed2.multidoge.org',
     'seed.doger.dogecoin.com' ],
  versions: 
   { bip32: { private: 49988504, public: 49990397 },
     bip44: 3,
     private: 158,
     public: 30,
     scripthash: 22 },
  name: 'livenet',
  unit: 'DOGE',
  testnet: false,
  toBitcoinJS: [Function: bound toBitcoinJS],
  toBitcore: [Function: bound toBitcore],
  alias: 'mainnet',
  pubkeyhash: 30,
  privatekey: 158,
  scripthash: 22,
  xpubkey: 49990397,
  xprivkey: 49988504,
  networkMagic: 3233857728,
  dnsSeeds: 
   [ 'seed.dogecoin.com',
     'seed.multidoge.org',
     'seed2.multidoge.org',
     'seed.doger.dogecoin.com' ] }
```


# ps

[cryptocoinjs](http://cryptocoinjs.com/)の成果物なので利用リスクは低いです
Monacoinもそのうち使えるようになります（[プルリク](https://github.com/cryptocoinjs/coininfo/pull/36)出して取り込まれたので）