{"action":"created","issue":{"url":"https://api.github.com/repos/spesmilo/electrum/issues/1519","labels_url":"https://api.github.com/repos/spesmilo/electrum/issues/1519/labels{/name}","comments_url":"https://api.github.com/repos/spesmilo/electrum/issues/1519/comments","events_url":"https://api.github.com/repos/spesmilo/electrum/issues/1519/events","html_url":"https://github.com/spesmilo/electrum/issues/1519","id":113479696,"number":1519,"title":"Feature request: p2sh (multisig) create and watch","user":{"login":"gits7r","id":6549887,"avatar_url":"https://avatars.githubusercontent.com/u/6549887?v=3","gravatar_id":"","url":"https://api.github.com/users/gits7r","html_url":"https://github.com/gits7r","followers_url":"https://api.github.com/users/gits7r/followers","following_url":"https://api.github.com/users/gits7r/following{/other_user}","gists_url":"https://api.github.com/users/gits7r/gists{/gist_id}","starred_url":"https://api.github.com/users/gits7r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gits7r/subscriptions","organizations_url":"https://api.github.com/users/gits7r/orgs","repos_url":"https://api.github.com/users/gits7r/repos","events_url":"https://api.github.com/users/gits7r/events{/privacy}","received_events_url":"https://api.github.com/users/gits7r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-27T00:32:35Z","updated_at":"2015-10-30T18:03:47Z","closed_at":null,"body":"Currently electrum supports setting up entire multisig wallets (with multiple master keys (xpub)). This is nice and useful for cases where the user and all the cosigners use electrum wallet, but very ugly when an electrum user tries to use a third party escrow service or something which doesn't use electrum.\r\n\r\nIt would be nice to have something like Armory provides (lockboxes). Simple implementation:\r\n\r\nAdd a link to \"Tools\" tab labeled \"Create P2SH (Multisig)\". When clicked, a pop-up will appear where the user can select:\r\n1) m of n signatures required (e.g. 2/3, 3/4, 3/5, etc)\r\n2) depending on n value selected, have fields to enter the pubkeys:\r\n   - signer[n-(n-1)] <pubkey field> with options: import from own wallet (where the user can select the pubkey of a certain address at user's choice and use it); import from file; paste from clipboard or have electrum generate a deterministic new pubkey (like newaddress) for this p2sh address for users who want to avoid using a non-fresh pubkey. When a pubkey is used in a p2sh address, mark that pubkey and move its normal address (ripemd160 p2pkh) to 'Used'.\r\nThe participants in a P2SH address (not the creator) can simply right click on an address and click \"Public Key\" to get a pubkey that can be used with a third party, or we can add another link under the \"Tools\" tab labeled \"Generate new P2SH pubkey\".\r\n3) export the p2sh entire address to a file or copy to clipboard and have a clear warning that in case wallet will be restored from seed, p2sh cannot be generated deterministic so separate backup is needed.\r\n4) add option in electrum to export (save to file, copy to clipboard, etc.) the p2sh addresses (pubkeys in their order) only. These need to be backed up separately and who wants to use this feature will understand. The privkeys required for partially unlocking these p2sh addresses will be restored from the main seed along with the wallet, since they will be privkeys of electrum's deterministic addresses.\r\n\r\nThe P2Sh addresses will appear under a separate group in Addresses tab named \"P2SH\" with additional info which states the number of signatures required to spend from that address (m) and how many privkeys available for signing the wallet holds (most probably 1). They will be seen by the wallet as partially watch only and also be included in the history tab.\r\n\r\nWhen an user wants to spend from a p2sh address, electrum will just allow to partially sign and copy to clipboard or save to file that tx so it can be sent to the cosigner(s). Electrum will read the number of signatures required and when last one required is there, it shows the option to broadcast tx."},"comment":{"url":"https://api.github.com/repos/spesmilo/electrum/issues/comments/152604025","html_url":"https://github.com/spesmilo/electrum/issues/1519#issuecomment-152604025","issue_url":"https://api.github.com/repos/spesmilo/electrum/issues/1519","id":152604025,"user":{"login":"gits7r","id":6549887,"avatar_url":"https://avatars.githubusercontent.com/u/6549887?v=3","gravatar_id":"","url":"https://api.github.com/users/gits7r","html_url":"https://github.com/gits7r","followers_url":"https://api.github.com/users/gits7r/followers","following_url":"https://api.github.com/users/gits7r/following{/other_user}","gists_url":"https://api.github.com/users/gits7r/gists{/gist_id}","starred_url":"https://api.github.com/users/gits7r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gits7r/subscriptions","organizations_url":"https://api.github.com/users/gits7r/orgs","repos_url":"https://api.github.com/users/gits7r/repos","events_url":"https://api.github.com/users/gits7r/events{/privacy}","received_events_url":"https://api.github.com/users/gits7r/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T18:03:46Z","updated_at":"2015-10-30T18:03:46Z","body":"At least we should make all these features available via the python console included in the gui, until we extend the ImportedWallet gui a little bit. Does this sound like a good idea? restore() doesn't work in the python console currently.\r\n\r\n1. Create multisig addresses and defining the n-of-m signatures required to spend.\r\n2. Add a p2sh address as watch only.\r\n3. Sign partially signed or unsigned txes in p2sh, being able to track how many signers have signed, how many / which are left, etc. "}}