Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: HappMacDonald on February 21, 2013, 11:48:17 AM



Title: Playing with createmultisig. Is there a procedure from the cli to spend?
Post by: HappMacDonald on February 21, 2013, 11:48:17 AM
I'm just getting used to the ropes of the JSON API, finding my way around, and could use some guidance. :3

I used brainwallet.org to create 3 test addresses, and I recorded each of their Bitcoin Address, Public Key (130 characters [0-9A-F]), and Private Key WIF (starts with a 5).

I used bitcoind command "createmultisig" to generate a multisig address (36n5JExRtsHJrU9SrdqBLkucZyUdsdGN3s) and coupled redeemScript for 2-of-3 escrow on those three public keys, and spent a few millis into that address for testing. I noticed that the blockchain.info wallet refused to spend there (said the address was invalid) so I attempted to withdraw the fumes from my coinbase wallet, and that seemed to do the trick.

Now I cannot find any documentation detailing how one might go about creating and/or signing a transaction to spend back out of this beast again. :J How can I build a raw transaction, or where might one find docs on how to play with that process? What role does the redeemScript play? How can I sign the transaction blob with two different private keys I've stowed concurrently?

Any clues, ideas, or encouragement along this journey?

I'm hoping to learn enough about the process to work out the logic to code an API or GUI to automate it, or else to gain a greater appreciation for the challenges in the way.

Thank you, fellas. :D

- - Happ


Title: Re: Playing with createmultisig. Is there a procedure from the cli to spend?
Post by: garyrowe on February 27, 2013, 09:29:18 AM
Not sure, but the following might help: https://people.xiph.org/~greg/escrowexample.txt


Title: Re: Playing with createmultisig. Is there a procedure from the cli to spend?
Post by: HappMacDonald on March 07, 2013, 03:02:30 PM
That is some very good intel, thank you. :3

In my tests I guess I'm having some trouble now, after building the raw transaction in getting it signed properly. I've got my test private keys in a text file, I haven't created them or added them directly to bitcoind but the signrawtransaction docs make it sound like you can just enter the private keys as an argument.

All I know is this is going to take some work! xD