The beginnings of a block explorer-style API for bitcoind.
Supported API;
- GET /rest/tx/TX-HASH.{dat | txt | json}
Given a transaction hash, Returns a transaction, in binary, hex-encoded binary or JSON formats.
- GET /rest/block/BLOCK-HASH.{dat | txt | json}
Given a block hash, Returns a block, in binary, hex-encoded binary or JSON formats.
Select format by appending a “.json” (JSON) or “.txt” (hex-encoded binary serialization) or “.dat” (binary serialization) suffix to the URL.
0 GET /rest/block/BLOCK-HASH.dat
1 GET /rest/tx/TX-HASH.txt
2 GET /rest/tx/TX-HASH.json
The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 3MB (1 MB max block, plus hex encoding) per request.
This can be easily accessed via command line cURL/wget utilities.
The general goal of the HTTP REST interface is to access unauthenticated, public blockchain information. There is no plan to add wallet interfacing/manipulation via this API.
For full TX query capability, one must enable the transaction index via “txindex=1” command line / configuration option.