[ecashaddrjs] Return address decode results ready for chronik
Summary:
T3063
cashaddr.decode can now return address hash as a string, which is accepted for chronik calls. However, it still returns address type in all uppercase, e.g. P2PKH. chronik-client only accepts input like p2pkh
ecashaddrjs is modified to return chronik-ready address information if a flag is passed to the cashaddr.decode function. It is handled this way to preserve backward compatibility (calling the function as it has always been called will still return the old format).
Unit tests are added for the case of chronik-ready input and output formats.
Test Plan:
Review change, unit test change, and npm test
Confirm README change makes sense
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13525