Multichain Address generation library

+2 votes
Is there an open source libarary (in any language- although swift or JS would be ideal) that generates valid multichain addresses + private keys without having to use getnewaddress?
asked Jun 16, 2016 by anonymous

1 Answer

0 votes

Yea, there are a number of javascript libraries you can use to generate bitcoin addresses which you can use with multichain configured to utilise bitcoin style addresses rather than a multichain native address.  I've used both http://bitcoinjs.org/ and https://github.com/bitpay/bitcore-lib to generate keys and addresses.

Marty

answered Jun 17, 2016 by marty
Thanks a lot. I want to add more explanation for "using bitcoin style addresses". Hope it helps people.
refer here. http://www.multichain.com/developers/peer-handshaking/#bitcoin
You need modify the params.dat file. It’s usually in the path. ~/.multichain/chainName/params.dat.
The bitcoin wallet will choke on MultiChain addresses, so you should also configure the chain to use bitcoin-style addresses by setting address-pubkeyhash-version=00, address-scripthash-version=05, private-key-version=80, address-checksum-value=00000000 in the blockchain parameters.
...