[ecash-lib] Add support for LEGACY sighash
Summary:
This is the OG pre-UAHF sighash from Bitcoin, which is invalid on eCash, but still can be used on Bitcoin, Dogecoin and others.
We don't have functional tests for this, as eCash regtest disables legacy signatures.
We could use the regtest of another blockchain node, but this introduces weird interdependencies. Instead, we just assert the preimage for the sighash matches expected contents, and that the correct signature algorithm (ECDSA, instead of Schnorr) is used.
In the future we either may wanna add a legacy mode to Bitcoin ABC or download binaries from other blockchains to test this.
Test Plan: npm test
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D17255