Skip to content

Commit bba9521

Browse files
authored
Merge pull request #975 from hirosystems/develop
release v2.5.9
2 parents 0f5cc1d + fde7cdd commit bba9521

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+469
-483
lines changed

app/(home)/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function HomePage(): JSX.Element {
6767
</div>
6868
<div className="flex flex-wrap gap-2">
6969
<Badge className="bg-[#f6f5f3] dark:bg-[#181717] text-primary dark:text-[#8c877d]">
70-
ORDHOOK
70+
BITCOIN INDEXER
7171
</Badge>
7272
<Badge className="bg-[#f6f5f3] dark:bg-[#181717] text-primary dark:text-[#8c877d]">
7373
ORDINALS API

app/cookbook/[id]/page.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,24 @@ import {
1616
AccordionItem,
1717
AccordionTrigger,
1818
} from "@/components/ui/accordion";
19+
import { Metadata } from "next/types";
20+
import { getRouteMetadata, createMetadata } from "@/utils/metadata";
1921

2022
interface Param {
2123
id: string;
2224
}
2325

2426
export const dynamicParams = false;
2527

28+
export async function generateMetadata({
29+
params,
30+
}: {
31+
params: { id: string };
32+
}): Promise<Metadata> {
33+
const routeMetadata = getRouteMetadata("/cookbook");
34+
return createMetadata(routeMetadata);
35+
}
36+
2637
export default async function Page({
2738
params,
2839
}: {

app/cookbook/page.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { Recipe } from "@/types/recipes";
55
import Link from "next/link";
66
import { Badge } from "@/components/ui/badge";
77
import { CopyButton } from "@/components/docskit/copy-button";
8+
import { Metadata } from "next/types";
9+
import { getRouteMetadata, createMetadata } from "@/utils/metadata";
810

911
function RecipeCard({
1012
recipe,
@@ -49,6 +51,11 @@ function RecipeCard({
4951
);
5052
}
5153

54+
export async function generateMetadata(): Promise<Metadata> {
55+
const routeMetadata = getRouteMetadata("/cookbook");
56+
return createMetadata(routeMetadata);
57+
}
58+
5259
export default async function Page() {
5360
// Pre-render the recipe cards with Code components on the server
5461
const recipes = await loadRecipes();

content/docs/bitcoin/get-started.mdx

+3-22
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import { API, Container, Chainhook, BitcoinIcon } from '@/components/ui/icon';
2222
<SecondaryCard
2323
className="group"
2424
icon={<Chainhook className='transition-colors duration-500 ease-in-out group-hover:text-primary' />}
25-
href="/bitcoin/ordinals/ordhook/quickstart"
25+
href="/bitcoin/indexer"
2626
title="Stream custom blockchain events"
27-
description="Use Ordhook to filter and stream for contract deployments."
28-
tag='Ordhook'
27+
description="Use the Bitcoin Indexer to filter and stream for contract deployments."
28+
tag='Bitcoin Indexer'
2929
/>
3030
<SecondaryCard
3131
className="group"
@@ -37,25 +37,6 @@ import { API, Container, Chainhook, BitcoinIcon } from '@/components/ui/icon';
3737
/>
3838
</Cards>
3939

40-
<div className='flex flex-col'>
41-
42-
<h4 id="installation-guides" className="text-[#595650] dark:text-[#8c877d] scroll-m-20">
43-
<a href="#installation-guides" className="not-prose group text-sm uppercase">Installation guides</a>
44-
</h4>
45-
46-
---
47-
48-
<Cards>
49-
<SmallCard
50-
icon={<BitcoinIcon />}
51-
href="/guides/sync-a-bitcoin-node"
52-
title="Sync a Bitcoin node"
53-
description="Set up and run a Bitcoin node to use tools like Ordhook."
54-
/>
55-
</Cards>
56-
57-
</div>
58-
5940
<Callout type="tip">
6041
For more, check out our [guides](/guides) section.
6142
</Callout>

content/docs/bitcoin/index.mdx

+7-20
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ import heroImage from '@/public/bitcoin-hero.svg';
4949

5050
<div className='flex flex-col'>
5151

52-
<h4 id="explore-ordinals" className="text-[#595650] dark:text-[#8c877d] scroll-m-20">
53-
<a href="#explore-ordinals" className="not-prose group text-sm uppercase">Explore Ordinals</a>
52+
<h4 id="explore-bitcoin" className="text-[#595650] dark:text-[#8c877d] scroll-m-20">
53+
<a href="#explore-bitcoin" className="not-prose group text-sm uppercase">Explore Bitcoin</a>
5454
</h4>
5555

5656
---
5757

5858
<Cards>
5959
<SmallCard
6060
icon={<Ordinals />}
61-
href="/bitcoin/ordinals/api"
62-
title="Ordinals API"
63-
description="Fetch on-chain data for Ordinals and meta-protocols with our hosted API."
61+
href="/bitcoin/indexer"
62+
title="Bitcoin Indexer"
63+
description="Use the Bitcoin Indexer to index and query Bitcoin blockchain data."
6464
/>
6565
<SmallCard
6666
icon={<API />}
@@ -70,23 +70,10 @@ import heroImage from '@/public/bitcoin-hero.svg';
7070
/>
7171
<SmallCard
7272
icon={<Play />}
73-
href="/ordinals/explorer"
74-
title="Explorer"
73+
href="https://ordinals.hiro.so/"
74+
title="Ordinals Explorer"
7575
description="View on-chain data for Ordinals and meta-protocols with our explorer."
7676
/>
77-
</Cards>
78-
79-
</div>
80-
81-
<div className='flex flex-col'>
82-
83-
<h4 id="explore-runes" className="text-[#595650] dark:text-[#8c877d] scroll-m-20">
84-
<a href="#explore-runes" className="not-prose group text-sm uppercase">Explore Runes</a>
85-
</h4>
86-
87-
---
88-
89-
<Cards>
9077
<SmallCard
9178
icon={<API />}
9279
href="/bitcoin/runes/api"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: TBD
3+
description: TBD
4+
---
5+
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Overview
3+
description: The Bitcoin Indexer enables you to build ordinals event streams, so you can create accurate, lightweight databases that gracefully handle Bitcoin forks and reorgs.
4+
---
5+
6+
import { SecondaryCard } from '@/components/card';
7+
import { Step, Steps } from 'fumadocs-ui/components/steps';
8+
9+
The Bitcoin Indexer is a reorg-aware indexer that automatically handles chain forks, so you don't need to waste time or resources reindexing your database yourself.
10+
11+
You can customize what ordinals data you index in order to create lightweight databases for faster query responses and a better user experience.
12+
13+
## Installation
14+
15+
```terminal
16+
$ git clone https://github.com/hirosystems/bitcoin-indexer.git
17+
$ cd bitcoin-indexer
18+
$ cargo bitcoin-indexer-install
19+
```
20+
21+
Alternatively, you can use Docker images from [Docker Hub](https://hub.docker.com/r/hirosystems/bitcoin-indexer).
22+
23+
## Get started
24+
25+
<Cards>
26+
<SecondaryCard
27+
href="/bitcoin/indexer/quickstart"
28+
title="Quickstart"
29+
description="Learn how to scan for Bitcoin activity using the Bitcoin Indexer."
30+
/>
31+
</Cards>
32+
33+
## System Requirements
34+
35+
Before running the indexer, ensure your system meets these requirements:
36+
37+
- **CPU**: Multi-core support for parallel processing
38+
- **Memory**: Minimum 16GB RAM
39+
- **Storage**: SSD or NVMe recommended
40+
- **OS**: Support for 4096+ open file descriptors
41+
- **Postgres**: Version 17+ recommended
42+
43+
## Related tools
44+
45+
- **[Ordinals API](/bitcoin/ordinals/api)**: Skip the infrastructure setup and get the ordinals data you need from our Ordinals API, which is powered by the Bitcoin Indexer.
46+
- **[Ordinals Explorer](https://ordinals.hiro.so/)**: Explore ordinals inscriptions and BRC-20 tokens rapidly in our Ordinals Explorer.
47+
48+
<br />
49+
50+
<Callout title="Need help building with the Bitcoin Indexer?" type="help">
51+
Reach out to us on the <span className="font-bold">#indexer</span> channel on [Discord](https://stacks.chat/) under the Hiro Developer Tools section. There's also a [weekly office hours](https://www.addevent.com/event/kI22007085) call every Wednesday at 1pm ET.
52+
</Callout>
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"title": "Bitcoin Indexer",
3+
"root": true,
4+
"pages": [
5+
"---Bitcoin Indexer---",
6+
"index",
7+
"installation",
8+
"quickstart"
9+
]
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Quickstart
3+
description: Learn how to scan the Bitcoin blockchain for Ordinals activity.
4+
---
5+
6+
import { Steps, Step } from 'fumadocs-ui/components/steps';
7+
8+
In this quickstart guide, you will set up the Bitcoin Indexer to index Ordinals or Runes activity on the Bitcoin blockchain.
9+
10+
<Steps>
11+
<Step title="Install Bitcoin Indexer">
12+
Clone the repository and install the indexer:
13+
```terminal
14+
$ git clone https://github.com/hirosystems/bitcoin-indexer.git
15+
$ cd bitcoin-indexer
16+
$ cargo bitcoin-indexer-install
17+
```
18+
</Step>
19+
20+
<Step title="Configure the Indexer">
21+
Generate a new configuration file:
22+
```terminal
23+
$ bitcoin-indexer config new
24+
```
25+
26+
Configure your Postgres database in the generated TOML file:
27+
```toml
28+
[ordinals.db]
29+
database = "metaprotocols"
30+
host = "localhost"
31+
port = 5432
32+
username = "postgres"
33+
password = "postgres"
34+
```
35+
</Step>
36+
37+
<Step title="Start the Indexer">
38+
Run the following command to start indexing Ordinals activity:
39+
```terminal
40+
$ bitcoin-indexer ordinals service start --config-path <path>
41+
```
42+
43+
For Runes indexing, use:
44+
```terminal
45+
$ bitcoin-indexer runes service start --config-path <path>
46+
```
47+
</Step>
48+
</Steps>
49+
50+
<Callout type="info">
51+
A fully synced Bitcoin node is required for indexing to start.
52+
</Callout>
53+
54+
## Next steps
55+
56+
<Cards>
57+
<Card
58+
href="/ordinals/explorer"
59+
title="Ordinals Explorer"
60+
description="Explore the Ordinals Explorer to view inscriptions and transfers."
61+
/>
62+
<Card
63+
href="/bitcoin/ordinals/api"
64+
title="Ordinals API"
65+
description="Learn how to interact with Ordinals data using our API."
66+
/>
67+
<Card
68+
href="/bitcoin/runes/api"
69+
title="Runes API"
70+
description="Explore our Runes blockchain API documentation."
71+
/>
72+
</Cards>

content/docs/bitcoin/meta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"index",
66
"get-started",
77
"---Tools---",
8-
"ordinals/ordhook",
8+
"indexer",
99
"---APIs---",
1010
"ordinals/api",
1111
"runes/api",

content/docs/bitcoin/ordinals/api/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The Ordinals API uses REST endpoints and cached responses in order to optimize p
4141

4242
## Related tools
4343

44-
- **[Ordhook](/bitcoin/ordinals/ordhook)**: Want to run your own infra? [Set up your own Ordhook](/bitcoin/ordinals/ordhook/guides/ordhook-as-a-service), the indexer that powers the Ordinals API.
44+
- **[Bitcoin Indexer](/bitcoin/indexer)**: Want to run your own infra? [Set up your own Bitcoin Indexer](/bitcoin/indexer), the indexer that powers the Ordinals API.
4545
- **[Ordinals Explorer](https://ordinals.hiro.so/)**: The Ordinals API powers Hiro’s Ordinals Explorer, which lets you rapidly discover inscriptions and verify on-chain activity.
4646

4747
<br />

0 commit comments

Comments
 (0)