[chronik] Create a new optional JSON RPC interface
Summary:
This will be used to serve the result in an Electrum compliant way if possible.
Note that the Electrum protocol is not 100% compliant with the JSON RPC standard as it enforces the use of a newline as a delimiter.
This diff also updates ElectrumABC so it is compatible with both versions.
Test Plan:
./src/bitcoind -regtest -chronik -chronikelectrumbind="[::1]:50001" -chronikelectrumbind="127.0.0.1:50001"
then:
echo '{"jsonrpc": "2.0", "method": "server.ping", "id": "test"}' | nc 127.0.0.1 50001 ninja all check-all
Reviewers: #bitcoin_abc, tobias_ruck, PiRK
Reviewed By: #bitcoin_abc, tobias_ruck, PiRK
Subscribers: tobias_ruck, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17185