For a chain with multichain protocol, to make a bitcoin SPV wallet to connect what all changes do I need to make?

+1 vote

I've already forked sample-BitcoinWallet and connected to a multichain blockchain with bitcoin protocol. I just need to know what all changes I've to make so that it works with the multichain protocol as well. And also which SPV wallet application is recommended for connecting easily with multichain?

asked Aug 8, 2018 by Jesho Carmel
edited Aug 8, 2018

1 Answer

0 votes

For making a bitcoin SPV wallet compatible with MultiChain there are the main things to look out for:

  1. If anyone-can-connect=false in your chain, you need to handle MultiChain's handshaking for permissioned networks. Please contact us and we can send you documentation on this. But you might want to start with anyone-can-connect=true to avoid this challenge at first.
  2. You need to ensure the wallet is not hard-coded to bitcoin's ports, protocol version, network message start (magic number), or to the content of bitcoin's genesis block, since your MultiChain network will have different values for these.
  3. Your life will be easier if you configure your MultiChain network with bitcoin-compatible addressing, as described here:
  4. If you're using MultiChain's enhancements to the bitcoin protocol, such as assets or streams, you'll need to adjust the wallet to read/write the appropriate metadata in transaction outputs. This is all described in detail in pages linked from here:
answered Aug 8, 2018 by MultiChain
Thanks for the info. I've done the following in my SPV wallet in terms of the points you had mentioned earlier

1)  I'll start with anyone-can-connect=true in order to make it easy. I would be needing the documentation as well, as we are looking to have a permissioned multichain network. I'll drop you guys an email.

2) We have made the wallet to look for environmental variables for genesis block and other blockchain params needed by the wallet rather than the harcoded values in their code. So this is sorted out.

3) We have enabled bitcoin address style by editing the params.dat file. So this is also sorted out.

4) We will be using assets issued by multichain rather than the native currency and let me try to adjust the wallet to read/write the metadata. I'm planning to use the adjust the wallet code for this. Let me try first and then get back to you. Any particular documentation on this would be really helpful
The exact page you want to understand how native assets are represented in transaction outputs:
Noted with thanks