This is separated into 2 modules and a set of scripts:
- Database scripts
- Bitcoin Indexer
- Endpoint
The database scripts are used to built the database and the table to store the transaction data matching the specifications.
For further details, see the README in the database_scripts directory.
The Bitcoin Indexer's job is to connect to the Bitcoin RPC server, index data matching the specifications into the Postgres database server.
For further details, see the README in the Indexer's directory.
The Endpoint's job is to connect to the Postgres database server, and return data matching specifications given in the specifications.
For further details, see the README in the Endpoint's directory.
Once the scriptPubKeyAsm field starts with the OP_RETURN, the following data needs to be indexed, and returned in the endpoint.
- OP_RETURN
- Transaction ID
- Transaction Hash
- Block Hash
The endpoint should listen on /opreturn/${opReturnData} and then return data matching ${opReturnData}.
There's a bitcoin.conf in the root directory. This is the configuration that is backing the bitcoind server that I'm running.
Bitcoind from Bitcoin Core version v25.0.0
Node 18.17.1
Postgres 16.1-1
Chee-Wee, Chua
18 Nov 2023.