Use case

+1 vote
Knowing that Multichain is built for bank usage, could you explain to me how exactly would we use it since it has only one wallet?

My assumption is that a bank would represent a wallet, a customer would represent account, and asset would represent a total of some currency, just like Bitcoin?

Tell me if I am wrong, any suggestions are welcome, thanks !

FYI You could best explain to me with an example :)
asked May 18, 2016 by bojan.radulovic

1 Answer

+1 vote
You can have multiple addresses in the wallet, and there are APIs available to separate out the activity for each address. So it would be one address per customer. You should not use the "accounts" mechanism inherited from Bitcoin Core.
answered May 18, 2016 by MultiChain
Dear Multichain,

I have a question related with this. I you want to have many customers, one address for each. I think that you cannot use the node wallet, because there is no security: one user and password for RPC connection. And you can use any address in the wallet, can't you?

I have read in white paper, that for this case you need to develop a lightweight wallet generating its own key and address. But I don't understand exactly how to generate this key/address and how to use it to send and receive assets using the JSON-RPC API.

Thanks for your help,
   Fernando
Yes, you could have the users' addresses as watch-only addresses (importaddress API) in the node, and then have users sign their transactions externally (see createrawtransaction and sendrawtransaction APIs). There's a ton of open source code out there for key/address generation and transaction signing for bitcoin, and it will all work with MultiChain without modification. For best results set up bitcoin-compatible addresses in your blockchain parameters:

address-pubkeyhash-version=00
address-scripthash-version=05
private-key-version=80
address-checksum-value=00000000
Thank you very much for your answer.

Then, for all of these lightweight wallets, I must configure a node (at least one), and they must connect with RPC credentials to the node wallet. My doubt is what does this wallet need? Only one address with connect permissions? This node address is used for anything? This aproach is secure in the sense that the users with lightweight wallets cannot do anything unauthorized  using the node wallet (because they must have the RPC credentials).

Thanks in advance
You can also have lightweight wallets connect with the network in general, rather than a specific node, in which case they will hold their own keys. If you read up on how SPV wallets work in bitcoin, it's exactly the same principle.
Thank you very much for your answer.

Yes, I understand how SPV wallets work, and I have seen BitcoinJ Multichain patch.

But we need very light clients (for Android phones) and very fast development, so I think we will do it with the watch-only approach, because it is simplier.

May be in the future we will consider an SPV wallet.

Thank you very much,
  Fernando
...