multisig transaction for stream

+2 votes

I am adding data to a stream if multiple signature authorised.

I am getting false status even authorised by both private keys.

I am adding a stream with following steps.

Created 2 keypair

multichain-cli chain1 createkeypairs

[
    {
        "address" : "1DkYUjFdTSBt9GJAWhX78FbUWt9yMfqdsDWr9u",
        "pubkey" : "03764b08491b531e0105f12051786becd07e4dcc77b19df015424bf6b4de645a7e",
        "privkey" : "V98iNUDowjmHW1fzd4fkojrS46myeLo6ZacMD24sjHM54LXXG4p7M2LC"
    }
]
[
    {
        "address" : "1MVx82St1NVXdu61peG56LUtbGN1LjQaKr2C2o",
        "pubkey" : "0217b728ebc3a845552635bc51f03c24424c8f8c04e35e830f3f4a6939f7ed8c82",
        "privkey" : "V7eaGp8VYkv7UDMcwzVk7j4d98hMi3fkCTQYWhkoVW7c2stF6vRr89Mb"
    }
]

multichain-cli chain1 importaddress 1MVx82St1NVXdu61peG56LUtbGN1LjQaKr2C2o

multichain-cli chain1 importaddress 1DkYUjFdTSBt9GJAWhX78FbUWt9yMfqdsDWr9u

 

multichain-cli chain1 createmultisig 2 '["0217b728ebc3a845552635bc51f03c24424c8f8c04e35e830f3f4a6939f7ed8c82", "03764b08491b531e0105f12051786becd07e4dcc77b19df015424bf6b4de645a7e"]'

{
    "address" : "4ZzG6nhVJsjScGCvdW9BXEhD1VLBmeUc3RQKi2",
    "redeemScript" : "52210217b728ebc3a845552635bc51f03c24424c8f8c04e35e830f3f4a6939f7ed8c822103764b08491b531e0105f12051786becd07e4dcc77b19df015424bf6b4de645a7e52ae"
}

 

multichain-cli chain1 createrawsendfrom 4ZzG6nhVJsjScGCvdW9BXEhD1VLBmeUc3RQKi2 '{}' '[{"for":"User","key":"17147714","data":"45787465726e616c20697320736166657374"}]'

 

I don't know what parameters should i use during signrawtransaction and sendrawtransaction

 

 

asked Aug 6 by Tariq

1 Answer

0 votes

First you should use addmultisigaddress rather than createmultisig, otherwise the multisig address will not be added to your wallet and you cannot use this address in the createrawsendfrom command.

Second you can sign and send the transaction directly from createrawsendfrom by passing send in the action parameter, so you don't need signrawtransaction or sendrawtransaction.

You may also find this tutorial very helpful:

https://www.multichain.com/developers/multisignature-transactions/

answered Aug 6 by MultiChain
...