Let me talk about how I got to the situation I'm in right now. I am using PHP and the JSON library to control bitcoind. And doing so.....
I created a multisignature address requiring 2 of 3 signatures with createmultisig.
I then sent funds to the multisignature address and was able to confirm the transactions sent to this address with using getrawtransaction and decoderawtransaction.
Next, I wanted to release those funds to a specific address (because I control all the keys, this is just a test run)
So I created a raw transaction in which I entered the transaction ID that I used for one of the transactions to send funds to the multisignature wallet. I also added the desired address and amount. After this, it spit out a raw transaction hex.
My next step is to sign the raw transaction. This is where I am stuck.
The parameters for signrawtransaction are confusing to me, and I need it explained to me as if I was 5 years old.
hexstring - assuming this is the hex string that createrawtransaction spit out
transaction id - is this the transaction id from when I transferred in the amount to the multisig wallet?
scriptPubKey - no idea what this is
redeemScript - no idea what this is
I grabbed scriptPubKey and redeemScript from the transaction I used to transfer funds into the multisig wallet, but the resulting output was the exact input of the hex string, so it is obviously not signing it correctly. I am not sure what these 2 paramters are.
Can somebody please help me with this. I need it explained to me like I am retarded because none of the explanations I have read online have helped.
Thanks.
EDIT to RE: Jonathan
Here is what I have done so far.
1) Created a multisig address using 3 public keys that I generated. I took note of the private keys as well, and the outputted multisig address (ABC) and redeemScript (redeem1)
2) Sent coins to the multisig address and by searching through the blockchain found that the transactions exist. I had multiple transaction IDs, to send to this address but I am focusing on one that I am trying to use as an output. We will call it (txid1). In txid1, when I called getrawtransaction, it also had a 46 byte hexed pubkey attached to the output, I will call that (pubkey1)
3) Next I created a raw transaction which included the paramters;
txid1, vout=0, address (address to spend to) and amount (matches the same amount transferred to the multsig address with txid1) and it spits out a hexstring, which I will call (hex1)
4) SignRawTransaction - here is where I am stuck. The parameters it asks for are;
[{"txid":txid,"vout":n,"scriptPubKey":hex, "redeemScript":hex},...] [,...]
So I am inputting signrawtransaction(hex1, ["txid"=>txid1, "vout"=>0, "scriptPubKey"=>pubkey1, "redeemScript"=>redeem1, array(oneofmyprivatekeys))
But the resulting output is just the hex1, without a single change to it. I am not getting any error messages, just an outputed string identical to hex1.
Can you give me an idea of what I am doing wrong? Thank you so much!