Bitcoin Insight API for Altcoin (Litecoin or Dogecoin)

1. Update the config file:
insight/node_modules/insight-bitcore-api/config/config.js

change the port number and dataDir.

2. Update the exports.livenet sections in file networks.js:
insight/node_modules/bitcore/networks.js

For Litecoin:

exports.livenet = {
  name: 'livenet',
  magic: hex('fbc0b6db'),
  addressVersion: 0x30,
  privKeyVersion: 0xb0,
  P2SHVersion: 5,
  hkeyPublicVersion: 0x0488c42e,
  hkeyPrivateVersion: 0x0488e1f4,
  genesisBlock: {
    hash: hex('E2BF047E7E5A191AA4EF34D314979DC9986E0F19251EDABA5940FD1FE365A712'),
    merkle_root: hex('D9CED4ED1130F7B7FAAD9BE25323FFAFA33232A17C3EDF6CFD97BEE6BAFBDD97'),
    height: 0,
    nonce: 2084524493,
    version: 1,
    prev_hash: buffertools.fill(new Buffer(32), 0),
    timestamp: 1317972665,
    bits: 504365040,
  },
  dnsSeeds: [
    'dnsseed.litecointools.com',
    'dnsseed.litecoinpool.org',
    'dnsseed.ltc.xurious.com',
    'dnsseed.koin-project.com',
    'dnsseed.weminemnc.com'
  ],
  defaultClientPort: 9333
};

For Dogecoin:

exports.livenet = {
  name: 'livenet',
  magic: hex('c0c0c0c0'),
  addressVersion: 0x1e,
  privKeyVersion: 0x9e,
  P2SHVersion: 5,
  hkeyPublicVersion: 0x0488c42e,
  hkeyPrivateVersion: 0x0488e1f4,
  genesisBlock: {
    hash: hex('9156352c1818b32e90c9e792efd6a11a82fe7956a630f03bbee236cedae3911a'),
    merkle_root: hex('696ad20e2dd4365c7459b4a4a5af743d5e92c6da3229e6532cd605f6533f2a5b'),
    height: 0,
    nonce: 99943,
    version: 1,
    prev_hash: buffertools.fill(new Buffer(32), 0),
    timestamp: 1386325540,
    bits: 504365040,
  },
  dnsSeeds: [
    'seed.dogecoin.com',
    'seed.mophides.com',
    'seed.dglibrary.org',
    'seed.dogechain.info'
  ],
  defaultClientPort: 22556
};

3. update PROTOCOL_VERSION to accept RPC connections.

Open the following file:
insight/node_modules/bitcore/lib/Connection.js

change:
var PROTOCOL_VERSION = 70000;

to:
var PROTOCOL_VERSION = 70003;

Dogecoin blockchain explorer Live: http://dogecoin.biteast.com
Bitcoin blockchain explorer Live: http://bitcoin.biteast.com

7 thoughts on “Bitcoin Insight API for Altcoin (Litecoin or Dogecoin)

  • Saturday January 30th, 2016 at 16:20
    Permalink

    Calculator Hash for Dogecoin config:
    echo -n ‘1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691’ | dd conv=swab | rev

    Output: 9156352c1818b32e90c9e792efd6a11a82fe7956a630f03bbee236cedae3911a

    Reply
  • Saturday January 30th, 2016 at 16:23
    Permalink

    Calculator merkle_root for Dogecoin config:
    echo -n ‘5b2a3f53f605d62c53e62932dac6925e3d74afa5a4b459745c36d42d0ed26a69’ | dd conv=swab | rev

    Output: 696ad20e2dd4365c7459b4a4a5af743d5e92c6da3229e6532cd605f6533f2a5b

    Reply
  • Saturday January 30th, 2016 at 16:26
    Permalink

    magic number for Dogecoin config:

    located at src/chainparams.cpp

    pchMessageStart[0] = 0xc0;
    pchMessageStart[1] = 0xc0;
    pchMessageStart[2] = 0xc0;
    pchMessageStart[3] = 0xc0;

    Reply
  • Saturday January 30th, 2016 at 16:28
    Permalink

    addressVersion for Dogecoin config:

    located at src/chainparams.cpp

    base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,30); // 0x1e

    Reply
  • Saturday January 30th, 2016 at 16:29
    Permalink

    privKeyVersion for Dogecoin config:

    addressVersion + 128 = 0x1e + 0x80 = 0x9e

    Reply
  • Friday September 23rd, 2016 at 04:52
    Permalink

    Hi,
    I’m new to this, now i’m trying to setup litecoin full node with insight api, I finished litecoin node setup, but no luck with insight api, please some one help me on this, Thanks in advance.

    Reply
    • Thursday April 6th, 2017 at 23:53
      Permalink

      Hi Ananth,

      I am also trying to make isight API work for dogecoin, i found few solutions but none of them is working for me. If I get some solution, I will definitely let you know.

      Thank you,

      Reply

Leave a Reply to Jack Huang Cancel reply

Your email address will not be published. Required fields are marked *