[ecashaddrjs] Convert to typescript
Summary:
Typescript is "implemented" in ecashaddrjs by a script-generated types file that at least allows typescript apps to use the module without throwing errors.
However, have been running into some issues that are potentially caused by this implementation in the chronik docs website.
With increasingly complex types coming into XEC app development through ecash-lib, ecash-agora, and chronik-client, keeping typescript out of ecash modules is much more difficult than putting it in. Will need to get into Cashtab soon as well.
So, even if this does not fix the docusaurus issue, we should just implement typescript here anyway.
Test Plan: npm test
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack
Differential Revision: https://reviews.bitcoinabc.org/D16744