Building a Bitcoin API and query system.



Summary:

There is currently no protocol API to fetch a single transaction over the p2p network. While peers can be queried for mempool transactions, once they are part of a block, there is no way to obtain them without fetching the entire block. However, spruned, which uses both the electrum and p2p networks, serves the data by emulating some of the bitcoind RPC API, making it suitable for bitcoind backed applications.Furthermore, Bitcore, a bitcoin indexing API server built using Node.js, offers several modules including a block explorer and a wallet module. Electrum servers also have the capability to quickly answer queries of light clients, making it possible to sync up an electrum server or use an existing public one and send queries to it with JSON-RPC.In proposing a new Bitcoin API that supports fast querying of Bitcoin blocks and transactions without the need for syncing with all previous nodes, a unified method of finding/querying blockchain data with a standardized template containing minimal information about the actual mined block or transaction is being developed on Node.js. This proposal aims to provide a support mechanism and template that will satisfy the needs of web developers who want to build full-fledged Bitcoin explorer cum wallet systems on their end, while being proposed as an improvement (BIP).


Updated on: 2023-06-13T14:16:18.088010+00:00