Hi, I created a 2 of 3 multisignature transaction with the following sequence of commands:
./multichain-cli virttestchain preparelockunspent '{"CHF":100}'
{
"txid" : "d534b5048ceabc7bee6a6f1f89a541ac381c920e5a89f8c4c7fbd624d995b18c",
"vout" : 1
}
./multichain-cli virttestchain createmultisig 2 '["1Xy5y7tVyXpttEgGpuXhqYExc8ad8uf1TXvZc1","1Eo3DFcAPDEEhqjspk2XW6P5grAeUGAY6SLKzN","02014bb27baaaeb06674903a7f62555db80edc46dc3abe97ccc26de516768c6295"]'
{
"address" : "4Af3ki83UgR5Qtup2DZo6LivRRm7LXhLRk7HEG",
"redeemScript" : "52210399ab7e452f277c827f418f5a9a538b80f6430345aff..."
}
./multichain-cli virttestchain createrawtransaction '[{"txid":"d534b5048ceabc7bee6a6f1f89a541ac381c920e5a89f8c4c7fbd624d995b18c","vout":1}]' '{"4Af3ki83UgR5Qtup2DZo6LivRRm7LXhLRk7HEG":{"CHF":100.0}}'
01000000018cb195d924d6fbc7c4f8895a0e921c38ac41a5891f6f6aee7bbcea...
./multichain-cli virttestchain signrawtransaction 01000000018cb195d924d6fbc7c4f8895a0e921c38ac41a5891f6f6aee7bbcea...
{
"hex" : "01000000018cb195d924d6fbc7c4f8895a0e921c38ac41a5891f6f6aee7bbcea...",
"complete" : true
}
./multichain-cli virttestchain decoderawtransaction 01000000018cb195d924d6fbc7c4f8895a0e921c38ac41a5891f6f6aee7bbcea...
{
"txid" : "ed1680144799a2fd3a3e3779c31a1c203d6707550cb778b29e767c4c91c211ba",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "d534b5048ceabc7bee6a6f1f89a541ac381c920e5a89f8c4c7fbd624d995b18c",
"vout" : 1,
...,
"vout" : [
{
"value" : 0.00000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_HASH160 4edb673c8d0f0596cf49153f9c54473e11c2235b OP_EQUAL 73706b71a70600001a020000b8046400000000000000 OP_DROP",
"hex" : "a9144edb673c8d0f0596cf49153f9c54473e11c2235b871673706b71a70600001a020000b804640000000000000075",
"reqSigs" : 1,
"type" : "scripthash",
"addresses" : [
"4Af3ki83UgR5Qtup2DZo6LivRRm7LXhLRk7HEG"
]
},
"assets" : [
{
"name" : "CHF",
"genesistxid" : "b804617eb762b0815c806a3a3b8769dd8dcc8d31bd3967846515096435908cb0",
"assetref" : "1703-538-1208",
"qty" : 100.00000000,
"raw" : 100
}
],
"permissions" : [
]
}
],
"data" : [
]
}
./multichain-cli virttestchain createrawtransaction '[{"txid":"ed1680144799a2fd3a3e3779c31a1c203d6707550cb778b29e767c4c91c211ba","vout":0,"scriptPubKey":"a9144edb673c8d0f0596cf49153f9c54473e11c2235b871673706b71a70600001a020000b804640000000000000075","redeemScript":"52210399ab7e452f277c827f418f5a9a538..."}]' '{"1Lb1VQh6TtdMyV5TR7gxdJ6Mff179ixz8w8w6K":{"CHF":100}}'
0100000001ba11c2914c7c769eb278b70c5507673d201c1ac379373e3afda29947148016ed...
./multichain-cli virttestchain signrawtransaction '0100000001ba11c2914c7c769eb278b70c5507673d201c1ac379373e3afda29947148016ed0...' '[{"txid":"ed1680144799a2fd3a3e3779c31a1c203d6707550cb778b29e767c4c91c211ba","vout":0,"scriptPubKey":"a9144edb673c8d0f0596cf49153f9c54473e11c2235b871673706b71a70600001a020000b804640000000000000075","redeemScript":"52210399ab7e452f277c827f418f5a9a538..."}]' '["VGLUoRxhPupDWCMegsX9xERqSAnGFvyKYBSMiNz2oKxUh4PFaabfnZUm"]'
{
"hex" : "0100000001ba11c2914c7c769eb278b70c5507673d201c1ac379373e3afda29947148016ed...",
"complete" : false
}
NODE 2
./multichain-cli virttestchain signrawtransaction '0100000001ba11c2914c7c769eb278b70c5507673d201c1ac379373e3afda29947148016ed...' '[{"txid":"ed1680144799a2fd3a3e3779c31a1c203d6707550cb778b29e767c4c91c211ba","vout":0,"scriptPubKey":"a9144edb673c8d0f0596cf49153f9c54473e11c2235b871673706b71a70600001a020000b804640000000000000075","redeemScript":"52210399ab7e452f277c827f418f5a9a538..."}]' '["V9ZFqg29YUFriDqpYy3PLgzYvNqutbp9FRRa1Sv9SxazmqnsBjVAsBKs"]'
{
"hex" : "0100000001ba11c2914c7c769eb278b70c5507673d201c1ac379373e3afda29947148016ed...",
"complete" : true
}
NODE 1
./multichain-cli virttestchain sendrawtransaction 01000000018cb195d924d6fbc7c4f8895a0e921c38ac41a5891f6f6aee7bbcea8c04b534d5...
ed1680144799a2fd3a3e3779c31a1c203d6707550cb778b29e767c4c91c211ba
NODE 2
./multichain-cli virttestchain sendrawtransaction 0100000001ba11c2914c7c769eb278b70c5507673d201c1ac379373e3afda29947148016ed...
As you can see, that spending transaction is marked as complete, however when I execute the last command I receive and error: {"code":-25,"message":""}
I think the last command fails because the multisig address does not have send permission. Also to be able to send the first (funding) transaction, I had to grant receive permission to the multisig address.
I have more problems with this:
Why the created multisig address does not have send, receive permission by default?
I cannot grant the multisig address send permission due to an error:
{"code":-4,"message":"Error: The transaction was rejected: 64: Permission script rejected - only receive permission can be set for P2SH"}
Can you help me with this?