Learn how to scan the Bitcoin blockchain for Ordinals activity.
In this quickstart guide, you will set up ordhook to explore and index Ordinal activity on the Bitcoin blockchain. You will learn how to install, configure, and run basic commands to scan and stream Ordinal inscriptions and transfers.
Before starting, ensure you have ordhook installed. If you haven't already, check out the installation guide.
Scanning for Ordinal activity
To scan blocks for Ordinal activity, you can use the scan blocks command. The output will show details of the inscription, including the block number it was revealed at, ordinal_number, and inscription_number.
The --interval flag is used to specify a block range. The range is inclusive, meaning both the start and end blocks will be included in the scan. And the --mainnet flag is used to specify the Bitcoin network to scan.
When running scan for the first time, an archive of Bitcoin blockchain data will be downloaded. The subsequent scans will use the cached chainstate if already present, speeding up iterations and the overall feedback loop. To learn more, check out the Hiro Archive section.
Inspecting a specific inscription
To inspect a specific inscription, you can run a similar command, scan inscription and pass in the inscription's ID.
The output will show where and when the inscription was revealed and any subsequent transfer events.