[ecash-herald] Implement typescript
Summary:
Convert ecash-herald to typescript
There was not a clear path to doing this incrementally so just did it all. It's messy. Uncovered some bugs that had to be fixed in line with this diff.
Assurance of consistent app performance with passing tests. Will be much easier to work with going forward.
Test Plan:
npm test
There's really no way to review this diff.
But, the tests confirm that mocks are the same (only change being a bugfix where tokenDocumentUrl was coming in undefined, since it's url in post-nng chronik).
I also have this version running in the Herald Dev channel as of block 869,177 -- so you can confirm expected behavior there.
the options were basically mothball herald and write a new app in typescript or convert it all in one go.
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D17060