[ecash-herald] Cleaner OP_RETURN parsing
Summary:
Some OP_RETURN txs of unknown schema are printed to the channel in an unintelligible way. Many times, assuming an unknown OP_RETURN is ascii can make it readable (existing test vector for unknown tx is like this).
Other times, decoding a random non-ascii hex string as ascii creates jargon.
Add a function containsOnlyPrintableAscii to determine if a given OP_RETURN hex string contains only non-control ascii characters. If a given OP_RETURN stack array does not, print each push as a hex value.
Test Plan: npm test
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14381