There are several kinds of APIs, the RPC, the http. From what I know, the rpc was created for the 'backward compatibility' with bitcoin core.
The outputs have different sets of fields presented, different names for the same fields, and even different naming conventions (camelCase vs lowcase).
There are several kinds of APIs, the RPC, the http. From what I know, the rpc was created for the 'backward compatibility' with bitcoin core.
The outputs have different sets of fields presented, different names for the same fields, and even different naming conventions (camelCase vs lowcase).
For example, here is the output of rpc
curl 127.0.0.1:12037/ -X POST -d '{ "method": "getblockbyheight", "params": [ 1, true, true ] }
.And here is the output of
curl 127.0.0.1:12037/block/1
.The outputs use these functions: RPC: https://github.com/handshake-org/hsd/blob/1a086e44b5b60e1ebb01955b0e1b2a0ebd00b42d/lib/node/rpc.js#L2819 HTTP: https://github.com/handshake-org/hsd/blob/1a086e44b5b60e1ebb01955b0e1b2a0ebd00b42d/lib/primitives/tx.js#L1726 and their analogues for the block presentation.
From what I think, the http api (which is stateless) is more useful and important and should contain full information.
So the questions/suggestions:
txid
, etc.