Is there a recommended process to add signatures to a partially signed multisig transaction received in raw bitcoind hex format?
var tx = new Transaction(hexTx); tx.sign(myPrivKey, sighash);
This falls over because the inputs don’t have output objects when the transaction is constructed from bitcoind hex format.
This fails because the input objects on the transaction are instances of the Input base class (which does not implement .getSignatures()) instead of something more appropriate like Multiscriphashinput.
Surfing around in the bitcore code a bit I can guess that if the transaction object were built by Bitcore and/or serialized using toObject() or toJson(), the output properties of the transaction inputs would probably be filled in and carried across json serialization. However, I don’t have the luxury of working with Bitcore specific data formats. I have to work with a bitcoind hex transaction.
So, given a partially-signed multisig transaction received from a third party serialized in bitcoind hex format, how do I add my signatures to the appropriate inputs using Bitcore?