Add support for websocket subscriptions to txid
Note: changes to chronik.ts from running the script npm run build-proto
This is a tricky one to test. Would be nice to have just one new file for testing txid ws subscriptions. However, I'm not able to figure out how to make the txids deterministic in tests that finalize blocks with avalanche. We want to show that we can subscribe to a txid before it is broadcast and see it through its various lifecycle stages.
To do this, we
- Show we can get a tx finalized notification in websockets.ts
- Show we can get added and removed from mempool notifications in ws_txid.ts, which is an almost-exact-recreation of mempool_conflicts.ts but refactored for txid subs
We could also duplicate websockets.ts and refactor for txid subs. I think this is a bit overkill for the feature introduced here. The issue is that the existing subs tested in websockets.ts would conflict with txid subs. If we subscribe to a txid and also to a script that receives that txid, we only expect one msg to come in for txid events. So we can't really test "both" subscriptions in the same script / test file.