Support for in-node instance of chronik with new ChronikClientNode class
A number of factors led me to refactor this library to support two distinct classes, one for working with an NNG chronik server, and one for working with an in-node chronik server.
- The proto files proto/chronik.ts and proto/chronik_nng.ts are generated by a script and correspond exactly with proto files of the respective chronik server. It would be messy and thankless to combine these files.
- Since the ChronikClient class supports an array of server URLs -- imo the complication of validating each array for a different server type is not worth the expected benefit. Writing an app to use one type of server and then fall back on the other type would be a bad idea.
- User (app developer) should be aware of the methods exposed by each chronik server type. The distinct proto files support this. The distinct class definitions also support this, as there are some intricacies in how the chronik-client user must shape requests.
Note: Websocket has been tested with https://chronik.be.cash/xec2 and gets good results there. The websocket from https://chronik-native.fabien.cash is not available, potentially an issue with nginx setup.
Note: The chronik-info endpoint is not currently tested as it is not available on a public server.