Author

Topic: bitcoind RCP multi-signature issue (Read 903 times)

sr. member
Activity: 412
Merit: 287
June 30, 2015, 08:36:25 AM
#4
Might be out of date since the watch only address support, but AFAIK bitcoind won't notify you about transactions that it doesn't have all keys for. I'm not sure if watch only supports p2sh. If it does, I'd use that, otherwise, maybe use an API or bitcoind patched with an address index. https://github.com/btcdrak/bitcoin/tree/addrindex
jr. member
Activity: 43
Merit: 7
June 30, 2015, 07:52:42 AM
#3
Hello!
Thanks you for your answer

Not so clear about this step, could you please explain and link more details

Code:
getrawtransaction 1 //Gets scriptPubKey and vout

How can I get txid ? in the previous steps ?

I debuged it
Code:
getnewaddress   //Generates new bitcoin address
validateaddress
  //Gets publicKey address
dumpprivkey
   //Gets the privatekey

Could not find txid.

RB!
legendary
Activity: 1442
Merit: 1186
June 28, 2015, 11:07:56 PM
#2
Yes you can using
Code:
listreceivedbyaddress

This will give you a JSON format output listing transaction IDs:

Code:
{
"address" : "1DmSyCK1jm5twEe61aqyTPb6wmBNctaTxL",
"account" : "",
"amount" : 0.03368750,
"confirmations" : 21348,
"txids" : [
"10a02647a678ca4a9eaf5259ef277ad7741c72188c936bdc22e6ab3cbe17c12f",
"3a3efe97e6df33aefc1ffb55169c8e8c70ab4cc5d6c9665a46a36865c003d42e",
"b29948f6e452ecd9f027d38de9388950f47f53ee1f20eb292f5d29cc573ebda0",
"b2b63e054e5417a40099b5ead2b9ecdce43c71e71c66a1a4a3436ae4192bd9c2",
"ef13aaad12e675ef7e2bc901fcedd981e3160a5e11e75fe28597f4fc80614e4e",
"fbc4cb561bfaa861fe3ff208a31e009c40edeeaa4fde8f7d9284f93a071f3ed4"
]
}

Plug in the TX ID into the getrawtransaction, remember to add the 1 after the txid to get it in JSON format :

Code:
getrawtransaction 1 //Gets scriptPubKey and vout

Then you can create the raw transaction with the outputs you choose, then sign them and lastly send.

Here's a little cheat sheet I use for raw multi-sig:

Code:
getnewaddress   //Generates new bitcoin address
validateaddress
 //Gets publicKey address
dumpprivkey
  //Gets the privatekey
getrawtransaction 1 //Gets scriptPubKey and vout

createmultisig 2 '["","",""]'    //Creates the multisig address

createrawtransaction '[{"txid":"","vout":}]' '{"receive_address":0.0008}'
signrawtransaction 'hash_from_createraw' '[{"txid":"","vout":,"scriptPubKey":"","redeemScript":""}]' '["priv_key"]'
signrawtransaction 'hash_from_signraw' '[{"txid":"","vout":,"scriptPubKey":"","redeemScript":""}]' '["priv_key2"]'
sendrawtransaction

jr. member
Activity: 43
Merit: 7
June 28, 2015, 01:02:49 PM
#1
Hello!

I want to create 2 of 3 address and spend from it

1) According to API_calls_list, created 2 of 3 address end send to the address a few coins by http://faucet.haskoin.com

Code:
createMultiSig(2, publicKeys);

Now can check positive balance
https://www.blocktrail.com/tBTC/address/2MuEh1XHKQNKQfzoGTNK2hpr8rLy42WsAbm

2) How can I spend coins from this multi-signature address ?
I have red for spending coins need to create output/input, and create raw transaction

Code:
txOutputIds = [b]txID[/b]
input  = "mmVDgckWdBY4JRabxXBRsWC7yeGZPk8uVk", BigDecimal.valueOf(0.0001));

createRawTransaction(txOutputIds, input);

how cah I get TXid by address 2MuEh1XHKQNKQfzoGTNK2hpr8rLy42WsAbm ?
Can I get TXid by bitciond RCP ?


BR!
Jump to: