Multiple keys signing a stream item

+2 votes
I was looking at your tutorial for external key management. https://www.multichain.com/developers/external-key-management/

How can multiple addresses sign a publish transaction?
asked Aug 13, 2017 by StevenChan

1 Answer

+2 votes

If you want to use a multisignature address for publication, follow this tutorial: https://www.multichain.com/developers/multisignature-transactions/

If you want to sign an item with two different addresses, there are many options, but the simplest is to use preparelockunspentfrom with both addresses and a zero asset quantity. This will give you a pair of (txid,vout) tuples representing unspent transaction outputs. Use both of these together with createrawtransaction, with a single data output containing the stream item – something like this on the node owning one address:

createrawtransaction '[{"txid":"a1b2...","vout":999},{"txid":"a1b2...","vout":999}]' '{}' '[{"for":"stream1","key":"key1","data":"012345"}]' sign

Then pass that for signing on the other node using signrawtransaction, then transmit with sendrawtransaction on either node. If the same node owns both addresses, you can substitute sign with send above and it should all be done in a single step.

answered Aug 13, 2017 by MultiChain
...