To keep this change minimal, both TxIn/TxOut still use the parameter
object for initialization. TxOut accepts only the types it uses
internally, and not hex or byte arrays for scripts.
The clone is unnecessary as a TransactionOut is never mutated after its
creation.
This resulted in TransactionOut.scriptPubKey no longer being needed,
and was removed. To access the scriptPubKey as a byte buffer, a user
can simply use:
TransactionOut.script.toBuffer()
Unfortunately, this leaves TransactionOut in a sorry state of test.
Something that needs to be fixed.
Default-ize the sequence rather than use a number, and default to bytes
for input. I doubt anybody ever uses this anyways.
Remove weird convenience code, and remove wallet logic. Checking a TX's
affects on a wallet should be managed by the wallet object.
Remove parsing for the weirder SIGHASH types. People use this library
for creating SIGHASH_ALL transactions, and I don't see the need to
support these other types at the moment since this library's more used
for wallets than for hardcore bitcoin tx analysis/creation. They weren't
tested anyways.
Add note about potentially improving performance by providing
pubkey/address. Deriving from the private key is slower, that
information should probably be cached by the end user.