Bitcoin multisig tutorial

This tutorial shows how to create a 2 of 2 multisig wallet. A common use-case for this is if you want to collaboratively control funds: maybe you and your friend run a company together and certain funds should only be spendable if you both agree. Another one is security: One of the wallets can be on your main machine, while the other one is on a bitcoin multisig tutorial machine.

That way you make it very hard for an attacker or malware to steal your coins. On the next screen, select 2 of 2. Put the master public key of the other wallet into the lower box. Of course when you create the other wallet, you put the master public key of this one. You will need to do this in parallel for the two wallets. Note that you can press cancel during this step, and reopen the file later. Check that both wallets generate the same set of Addresses.

To spend coins from a 2-of-2 wallet, two cosigners need to sign a transaction collaboratively. After signing, a window is shown with the transaction details. The transaction has to be sent to the second wallet. There’s also a button showing a qr-code icon. Note that the transaction is encrypted with your cosigner’s master public key. It will then be broadcast to the network. Built with Sphinx using a theme provided by Read the Docs.

Create a wallet on your protected machine, as you want to keep your cryptocurrency safe. Please notice that the potential intruder still will be able to see your addresses, transactions and balance, though. Now you are able to set up your electrum merchant daemon. SSL private key and a public certificate for your domain set up already. Create another file, file that contains your certificate, and the list of certificates it depends on, up to the root CA. Your certificate must be at the top of the list, and the root CA at the end. In order to display public URLs, we need to set another configuration variable, url_rewrite.

Install and run Electrum-Merchant configuration program. By default it installs a simple interface, other interfaces are in preparation and will be available in future. Please note that it is required to follow steps in previous paragraph before you will be able to successfuly run Electrum-Merchant. URL of the signed BIP70 request.

URL of a webpage displaying the request. Note that request_url and index_url use the domain name we defined in url_rewrite. The page shows the payment request. You can open the bitcoin: URI with a wallet, or scan the QR code. The bottom line displays the time remaining until the request expires. This page can already used to receive payments. Now, the page is fully interactive: it will update itself when the payment is received.

Commands to the Electrum daemon can be sent using JSONRPC. This is useful if you want to use electrum in a PHP script. Note that the daemon uses a random port number by default. 5, the JSON-RPC interface is authenticated using HTTP basic auth. The username and the password are config variables.