https://github.com/sadoprotocol/utxo-parser
Dedicated parser for eventually replacing BlockCypher ...
https://github.com/sadoprotocol/utxo-parser
Last synced: 2 months ago
JSON representation
Dedicated parser for eventually replacing BlockCypher ...
- Host: GitHub
- URL: https://github.com/sadoprotocol/utxo-parser
- Owner: sadoprotocol
- Created: 2023-04-17T05:29:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T03:12:14.000Z (almost 2 years ago)
- Last Synced: 2024-11-03T03:30:30.362Z (7 months ago)
- Language: JavaScript
- Size: 1.41 MB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UTXO Parser
## Requirement
1. NodeJS
2. Bitcoin Full Node + Index
3. Bitcoin RPC
4. MongoDB## Setup
Enable `-txindex`. For example, `.bitcoin/bitcoin.conf`:
```
rpcauth=:
server=1
txindex=1
```Set the following
```sh
# Set the environment to proper values
$ cp dotenv .env# Install dependencies
$ npm install
```## Usage
> Perform all commands below from the root directory of the program
### Indexer
```sh
# Start
$ npm run indexer# From a specific block height
$ echo 2590 > data/block_n && node bin/index.js# Re-index
$ rm data/block_n
$ npm run indexer
```### Repeater
> Continue updating cache transactions
```sh
# Start
$ npm run repeater
```### Lookup functions
```sh
# Balance
$ node bin/index.js balance# Transactions
$ node bin/index.js transactions# Unconfirmed Transactions
$ node bin/index.js unconfirmed_transactions# Unspents
$ node bin/index.js unspents# Transaction
$ node bin/index.js transaction# Unconfirmed Transaction
$ node bin/index.js unconfirmed_transaction# Relay Transaction
$ node bin/index.js relay# Mempool Information
$ node bin/index.js mempool_info true# Ord Inscriptions
$ node bin/index.js inscriptions# Is Ord indexing
$ node bin/index.js indexing
```### Monitor block progress
```sh
# Watch the index
$ watch -n 1 cat data/block_n
```