You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,13 +21,13 @@ The **ordhook** is an indexer designed to help developers build new re-org-resis
22
21
23
22
The **ordhook** uses [Chainhook SDK](https://github.com/hirosystems/chainhook/tree/develop/components/chainhook-sdk) from the [Chainhook](https://github.com/hirosystems/chainhook/tree/develop) project, which is a re-org-aware transaction indexing engine for Stacks and Bitcoin. The SDK is designed with first-class event-driven principles, so it helps developers extract transactions from blocks efficiently and keeps a consistent view of the chain state.
24
23
25
-
With **ordhook**, Bitcoin developers can reliably implement feature-rich protocols and business models utilizing _near-real-time_ Ordinals inscriptions and transfers events.
24
+
With **ordhook**, Bitcoin developers can reliably implement feature-rich protocols and business models utilizing _near-real-time_ Ordinals inscriptions and transfers events.
Inscription 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 revealed at block #767430 (ordinal_number 1252201400444387, inscription_number 0)
45
-
Inscription 26482871f33f1051f450f2da9af275794c0b5f1c61ebf35e4467fb42c2813403i0 revealed at block #767753 (ordinal_number 727624168684699, inscription_number 1)
45
+
Inscription 26482871f33f1051f450f2da9af275794c0b5f1c61ebf35e4467fb42c2813403i0 revealed at block #767753 (ordinal_number 727624168684699, inscription_number 1)
46
46
```
47
47
48
-
In this command, an interval of blocks to scan (starting at block `767430`, ending at block `767753`) is being provided. `ordhook` will display inscriptions and transfers activities occurring in the range of the specified blocks.
48
+
In this command, an interval of blocks to scan (starting at block `767430`, ending at block `767753`) is being provided. `ordhook` will display inscriptions and transfers activities occurring in the range of the specified blocks.
49
49
50
50
The activity for a given inscription can be retrieved using the following command:
51
51
@@ -56,19 +56,20 @@ Transferred in transaction bc4c30829a9564c0d58e6287195622b53ced54a25711d1b86be7c
56
56
```
57
57
58
58
---
59
+
59
60
### Stream Ordinal activities to an indexer
60
61
61
62
`ordhook` is designed to help developers extract ordinals activities (inscriptions and transfers) from the Bitcoin chain and streaming these activities to their indexer / web application.
62
63
63
64
In order to get started, a `bitcoind` instance with access to the RPC methods `getblockhash` and `getblock` must be running. The RPC calls latency will directly impact the speed of the scans.
64
65
65
-
*Note: the configuration of a `bitcoind` instance is out of scope for this guide.*
66
+
_Note: the configuration of a `bitcoind` instance is out of scope for this guide._
66
67
67
-
Assuming:
68
+
Assuming:
68
69
69
-
`1)` a `bitcoind` node correctly configured and
70
+
`1)` a `bitcoind` node correctly configured and
70
71
71
-
`2)` a local HTTP server running on port `3000` exposing a `POST /api/events` endpoint,
72
+
`2)` a local HTTP server running on port `3000` exposing a `POST /api/events` endpoint,
72
73
73
74
A configuration file `Ordhook.toml` can be generated using the command:
74
75
@@ -77,15 +78,16 @@ $ ordhook config new --mainnet
77
78
✔ Generated config file Ordhook.toml
78
79
```
79
80
80
-
After adjusting the `Ordhook.toml` settings to make them match the `bitcoind` configuration, the following command can be ran:
81
+
After adjusting the `Ordhook.toml` settings to make them match the `bitcoind` configuration, the following command can be ran:
`ordhook` will retrieve the full Ordinals activities (including the inscriptions content) and send all these informations to the `http://localhost:3000/api/events` HTTP POST endpoint.
87
+
`ordhook` will retrieve the full Ordinals activities (including the inscriptions content) and send all these informations to the `http://localhost:3000/api/events` HTTP POST endpoint.
87
88
88
89
---
90
+
89
91
### Run `ordhook` as a service for streaming blocks
90
92
91
93
`ordhook` can be ran as a service for streaming and processing new blocks appended to the Bitcoin blockchain.
@@ -112,6 +114,7 @@ will spin up a HTTP API for managing events destinations.
112
114
A comprehensive OpenAPI specification explaining how to interact with this HTTP REST API can be found [here](https://github.com/hirosystems/chainhook/blob/develop/docs/chainhook-openapi.json).
113
115
114
116
---
117
+
115
118
### Troubleshooting: Performance and System Requirements
116
119
117
120
The Ordinals Theory protocol is resource-intensive, demanding significant CPU, memory, and disk capabilities. As we continue to refine and optimize, keep in mind the following system requirements and recommendations to ensure optimal performance:
0 commit comments