Preparelockunspentfrom on a Multisig address

+1 vote

I create a multitsig address and imported address in Node 1 and Node 2. Now I'm trying to do a getaddress true. I get the following result.    

{
        "address" : "4959EiF1S9ecS7sXQ1fq4jKEmzhVQkbthZ86iw",
        "ismine" : false,
        "iswatchonly" : true,
        "isscript" : true,
        "script" : "nonstandard",
        "hex" : "",
        "addresses" : [
        ],
        "account" : "",
        "synchronized" : true
    }

My query is how do I perform a preparelockunspentfrom on this Multisig address.

asked Jan 17, 2017 by rahulkumargr

1 Answer

0 votes

You cannot call preparelockunspentfrom for a multi signature address – not least because each node will not have both private keys required to sign the transaction. Instead you should use createrawsendfrom to prepare the transaction, sending the appropriate asset quantity back to the same address, and pass sign in the final action parameter. Then take this partially signed transaction to the other nodes who have the other keys required, calling signrawtransaction, and then on the last node call sendrawtransaction with the fully signed transaction.

answered Jan 17, 2017 by MultiChain
Thanks. I tried the following command,

Step - 1 (Node 1)

multichain-cli abc createrawsendfrom "4959EiF1S9ecS7sXQ1fq4jKEmzhVQkbthZ86iw" {\"03d17cef9b4351b851e0df0810896e6233abb768286196e3f13b7b46bab959cb1a\":"{\"asset1\":20}"}" '[]' sign

I got a Hex Blob.

Step - 2 (Node 2)
multichain-cli -datadir=multi2 -port=10255 -rpcport=10254 abc sign
rawtransaction <<Hex-Blob received from Step-1>>

It complete execution with "complete" : false

Any idea why this is happening?

Step - 3 (Node 1)
multichain-cli abc sendrawtransaction <<Hex Blob received from Step 2 on Node 2)

Error:
error code: -26
error message:
64: Nonstandard transaction input
Signrawtransaction issue
...