Open kss-espeo opened 4 years ago
It seems that the only way of instantiating a Transaction
that correctly classifies concrete implementation of Input
s is Transaction.prototype._fromNonP2SH
All other methods, like passing hex to a constructor will only create abstract Input
s , therefore some Transaction
's features (like Transaction.applySignature
) will not be available. This could probably be fixed by addressing a TODO in Input.fromBufferReader
.
Please, confirm that I'm right and there is no workaround for that.
Facing same issue while adding Signatures using addSignatures from Inputs.
Transaction
's interface has aapplySignature
method that referencesInput
'saddSignature
method. Therefore, callingTransaction.applySignature
results in a following error:And not surprisingly, since
Input
was implemented to do exactly that: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib-cash/lib/transaction/input/input.js#L179 .Is this a correct method to apply an existing signature to a
Transaction
? If not - how do I do this?Please note that I am not after signing a transaction. I have no access to a private key, I only have an existing signature.