A tiny ExpressJS server that indexes Bitcoin inscriptions made by multisig-backup so they can be quickly found using any pair of master fingerprints.
The server connects to a BITCOIN_NODE
and downloads each block beginning with START_HEIGHT
. Each block is scanned for inscriptions that
represent an encrypted multisig descriptor, following the format in multisig-backup.
This descriptor format includes the first four bytes of the SHA256 hash of each pair of master fingerprints (the xfpPairFingerprint
). The
server extracts each xfpPairFingerprint
and builds an index mapping xfpPairFingerprints
to inscriptionIds. Users can then easily find all inscriptionIds
linked to a pair of master fingerprints.
- Install Node.js version 8.0.0
- A Bitcoin full node with the
-rest
option enabled
This project uses the following environment variables:
Name | Description | Default Value |
---|---|---|
PORT | Specifies the port number on which the server listens for incoming HTTP requests | 3000 |
START_HEIGHT | Specifies the block height at which indexing begins | 870525 |
REINDEX_IF_REORG | Specifies the number of blocks to reindex when a reorg is detected | 6 |
BITCOIN_NODE | Specifies the URL of the attached Bitcoin node | http://localhost:8332 |
DATA_DIR | Specifies the directory where the indexed data will be persisted | ./data |
- Clone the repository
git clone https://github.com/joshdoman/multisig-recovery
- Install dependencies
cd multisig-recovery
npm install
- Build and run the project
npm start
Navigate to http://localhost:3000
-
API endpoints
Cached Block Height : http://localhost:3000/height
Cached Inscription Count : http://localhost:3000/count
Cached Inscription Ids : http://localhost:3000/inscriptionIds
Cached Inscription Ids at
xfpPairFingerprint
: http://localhost:3000/inscriptionIds/:xfpPairFingerprint
If you encounter any issues, try the following:
- Clear your browser cache and restart the development server.
- Delete the
node_modules
folder and runnpm install
again. - Make sure your Node.js version is compatible with the project requirements.
- Check for any error messages in the console and search for solutions online.
If problems persist, please open an issue on this project's GitHub repository.
This project is open source and available under the MIT License.