Hello,
Tried to create and spend from multi signature address
1) Create 2of3
./bitcoind createmultisig 2 '["04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD","041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F","04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1"]'
{
"address" : "2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC",
"redeemScript" : "524104d9546728bb1d1bf309ef3c2c7278d8d306052ecf7dc81443f16e75ae607099dfcfc573a3e 71553bd8321d91c209bab03aa999befa6e77734c0f4dd34ef78ebfd41041050ff637a97fa462dff a19d0bc013869f6231895019bd9f263a0a55a067665cfca4473aab1dc38e8aecf359e23ce6bb35f f900bc84fdd890a3b982ea50dd92f4104e086dce7893384cbfa89fbbf7d33de3f1ee01279a1e981 0d952f1c440e91fc7ee7cb9cf070dfbdee397e123c363d140221e81610b7bd695905fbf198edfd7 1a153ae"
}
2) Send a few coins to the address
3) Checked txId for my new address
https://www.blocktrail.com/tBTC/address/2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC/transactions fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06Created
and created RawTX
createrawtransaction '''
[
{
"txid": "'fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06'",
"vout": '1'
}
]
''' '''
{
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY": 0.0001
}'''
0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000
3) Decoded raw TX and get scriptPubKey hex
decoderawtransaction
0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000
{
"txid" : "6b4e025d8a063994401f1de33ab58156f8002a71f74cdf039a1aede84c70af90",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06",
"vout" : 1,
"scriptSig" : {
"asm" : "",
"hex" : ""
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 0.00010000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY"
]
}
}
]
}
4) Tried to signature
signrawtransaction '0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000'
'[{"txid":"fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06","vout":1,"scriptPubKey":"76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac"}]' '["91gFomEpagA1ETnqsfAK5VFeuaR3YnanbfK2L2FfR1yKdcFjmvG","92cDL4Nvw8jvfkrVJYLFVSENY4NPk9NTELQ2CWzPQ6FKmUb2y5t"]'
5) Have got error
Previous output scriptPubKey mismatch:
OP_HASH160 e8fa0f97c663ba132bd81e6d657c46825d390e6c OP_EQUAL
vs:
OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG (code -22)
Which scriptPubKey should I use? How can I get it?
BR!