• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Help! Integrating Dash into BitcoinJS lib...

nmarley

Administrator
Dash Core Group
This is just an underlying Bitcoin library that can be used for multiple projects, and can easily be extended to use Dash — that's what I'm trying to do.

But I'm not a crypto developer per-se, and I'm not sure what values to use in the 'networks' part, to use Dash values instead of Bitcoin/Litecoin/Doge, etc.

Can someone help me convert this, or at least confirm that I have the correct values?

Here's an example Litecoin section:

Code:
litecoin: {
    messagePrefix: '\x19Litecoin Signed Message:\n',
    bip32: {
      public: 0x019da462,
      private: 0x019d9cfe
    },
    pubKeyHash: 0x30,
    scriptHash: 0x05,
    wif: 0xb0,
    dustThreshold: 0 // https://github.com/litecoin-project/litecoin/blob/v0.8.7.2/src/main.cpp#L360-L365
  },


... and here's what I got so far for Dash:

Code:
dash: {
    messagePrefix: '\x19Dash Signed Message:\n',
    bip32: {
      public: 0x019da462,
      private: 0x019d9cfe
    },
    pubKeyHash: 0x4c,
    scriptHash: 0x05,
    wif: 0xcc,
    dustThreshold: 0
  },


Please answer only if you're actually a developer and know what values to use/where to find them. ("The code" is not an accurate response to where to find them, "line XX of file yy.zz" is.)


And if possible... can you also assist with Dash testnet values? (I think testnets really don't get the attention they deserve, and all new FinTech code should be tested using test currency anyway).

I have these values for Dash Testnet (which may be wrong):

Code:
address_version => "6f"
p2sh_version => "c4"
privkey_version => "ef"
 
Thanks Holger.

Do you know if there's any reason the developers of that lib won't integrate Dash into their repo, or has it just not been attempted?
 
Thanks Holger.

Do you know if there's any reason the developers of that lib won't integrate Dash into their repo, or has it just not been attempted?
I am just quessing that the original developer is keeping his repo "bitcoin only". No idea if UdjinM6 tried to submit a PR for Dash integration.
 
I am just quessing that the original developer is keeping his repo "bitcoin only". No idea if UdjinM6 tried to submit a PR for Dash integration.
Hmm... ok. Well, they have Litecoin and Dogecoin.

I will wait and see if UdjinM6 has anything to say, and if not, then I will try and submit a request to have Dash added to that as well — but if this is working and can be used for projects, then I will use it in the meantime.
 
I am just quessing that the original developer is keeping his repo "bitcoin only". No idea if UdjinM6 tried to submit a PR for Dash integration.
Haven't tried :oops:
Hmm... ok. Well, they have Litecoin and Dogecoin.

I will wait and see if UdjinM6 has anything to say, and if not, then I will try and submit a request to have Dash added to that as well — but if this is working and can be used for projects, then I will use it in the meantime.
Maybe that's a good idea, I'll give it a try https://github.com/bitcoinjs/bitcoinjs-lib/pull/518 :smile:
 
Back
Top