Web Application with Multichain

+2 votes
I'm trying to build a Web Application that uses Multichain in the background. In a real BlockChain based application, the user is supposed to sign the transaction by his/her private key. How would that happen in case of Web application. Should there be a node on the machine where the browser is running or should the browser have the capability to sign the transaction? I'm not completely understanding how multichain can be used in a WebApplications where users are spread across the world and still be able to sign the transactions. Of course, the registration needs to happen first. Any clues on how this can be done without centralizing the private keys and still use the web browsers?

asked Jan 19, 2019 by spregpal

1 Answer

0 votes

Your ideal solution here is to generate the private keys (and calculate the corresponding address) on the client side, and only import the address into the node running behind the web application using the importaddress command.

Then use createrawsendfrom to prepare transactions for signing on the server side, and pass them to the client side for actual signing with the private key, before they go back to the server side for sending with sendrawtransaction. So the private keys stays on the client side.

You will find various JavaScript libraries built that can do this for bitcoin, and these can be used immediately with MultiChain if you set up bitcoin-compatible addressing as described here: https://www.multichain.com/developers/address-key-format/

More on external key management: https://www.multichain.com/developers/external-key-management/

answered Jan 20, 2019 by MultiChain
Thank you for your response. I'll look at these links.