Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function HomePage(): JSX.Element {
</div>
<div className="flex flex-wrap gap-2">
<Badge className="bg-[#f6f5f3] dark:bg-[#181717] text-primary dark:text-[#8c877d]">
ORDHOOK
BITCOIN INDEXER
</Badge>
<Badge className="bg-[#f6f5f3] dark:bg-[#181717] text-primary dark:text-[#8c877d]">
ORDINALS API
Expand Down
11 changes: 11 additions & 0 deletions app/cookbook/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ import {
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
import { Metadata } from "next/types";
import { getRouteMetadata, createMetadata } from "@/utils/metadata";

interface Param {
id: string;
}

export const dynamicParams = false;

export async function generateMetadata({
params,
}: {
params: { id: string };
}): Promise<Metadata> {
const routeMetadata = getRouteMetadata("/cookbook");
return createMetadata(routeMetadata);
}

export default async function Page({
params,
}: {
Expand Down
7 changes: 7 additions & 0 deletions app/cookbook/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Recipe } from "@/types/recipes";
import Link from "next/link";
import { Badge } from "@/components/ui/badge";
import { CopyButton } from "@/components/docskit/copy-button";
import { Metadata } from "next/types";
import { getRouteMetadata, createMetadata } from "@/utils/metadata";

function RecipeCard({
recipe,
Expand Down Expand Up @@ -49,6 +51,11 @@ function RecipeCard({
);
}

export async function generateMetadata(): Promise<Metadata> {
const routeMetadata = getRouteMetadata("/cookbook");
return createMetadata(routeMetadata);
}

export default async function Page() {
// Pre-render the recipe cards with Code components on the server
const recipes = await loadRecipes();
Expand Down
25 changes: 3 additions & 22 deletions content/docs/bitcoin/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import { API, Container, Chainhook, BitcoinIcon } from '@/components/ui/icon';
<SecondaryCard
className="group"
icon={<Chainhook className='transition-colors duration-500 ease-in-out group-hover:text-primary' />}
href="/bitcoin/ordinals/ordhook/quickstart"
href="/bitcoin/indexer"
title="Stream custom blockchain events"
description="Use Ordhook to filter and stream for contract deployments."
tag='Ordhook'
description="Use the Bitcoin Indexer to filter and stream for contract deployments."
tag='Bitcoin Indexer'
/>
<SecondaryCard
className="group"
Expand All @@ -37,25 +37,6 @@ import { API, Container, Chainhook, BitcoinIcon } from '@/components/ui/icon';
/>
</Cards>

<div className='flex flex-col'>

<h4 id="installation-guides" className="text-[#595650] dark:text-[#8c877d] scroll-m-20">
<a href="#installation-guides" className="not-prose group text-sm uppercase">Installation guides</a>
</h4>

---

<Cards>
<SmallCard
icon={<BitcoinIcon />}
href="/guides/sync-a-bitcoin-node"
title="Sync a Bitcoin node"
description="Set up and run a Bitcoin node to use tools like Ordhook."
/>
</Cards>

</div>

<Callout type="tip">
For more, check out our [guides](/guides) section.
</Callout>
Expand Down
27 changes: 7 additions & 20 deletions content/docs/bitcoin/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ import heroImage from '@/public/bitcoin-hero.svg';

<div className='flex flex-col'>

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

---

<Cards>
<SmallCard
icon={<Ordinals />}
href="/bitcoin/ordinals/api"
title="Ordinals API"
description="Fetch on-chain data for Ordinals and meta-protocols with our hosted API."
href="/bitcoin/indexer"
title="Bitcoin Indexer"
description="Use the Bitcoin Indexer to index and query Bitcoin blockchain data."
/>
<SmallCard
icon={<API />}
Expand All @@ -70,23 +70,10 @@ import heroImage from '@/public/bitcoin-hero.svg';
/>
<SmallCard
icon={<Play />}
href="/ordinals/explorer"
title="Explorer"
href="https://ordinals.hiro.so/"
title="Ordinals Explorer"
description="View on-chain data for Ordinals and meta-protocols with our explorer."
/>
</Cards>

</div>

<div className='flex flex-col'>

<h4 id="explore-runes" className="text-[#595650] dark:text-[#8c877d] scroll-m-20">
<a href="#explore-runes" className="not-prose group text-sm uppercase">Explore Runes</a>
</h4>

---

<Cards>
<SmallCard
icon={<API />}
href="/bitcoin/runes/api"
Expand Down
5 changes: 5 additions & 0 deletions content/docs/bitcoin/indexer/guides/run-indexer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: TBD
description: TBD
---

52 changes: 52 additions & 0 deletions content/docs/bitcoin/indexer/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Overview
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.
---

import { SecondaryCard } from '@/components/card';
import { Step, Steps } from 'fumadocs-ui/components/steps';

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.

You can customize what ordinals data you index in order to create lightweight databases for faster query responses and a better user experience.

## Installation

```terminal
$ git clone https://github.com/hirosystems/bitcoin-indexer.git
$ cd bitcoin-indexer
$ cargo bitcoin-indexer-install
```

Alternatively, you can use Docker images from [Docker Hub](https://hub.docker.com/r/hirosystems/bitcoin-indexer).

## Get started

<Cards>
<SecondaryCard
href="/bitcoin/indexer/quickstart"
title="Quickstart"
description="Learn how to scan for Bitcoin activity using the Bitcoin Indexer."
/>
</Cards>

## System Requirements

Before running the indexer, ensure your system meets these requirements:

- **CPU**: Multi-core support for parallel processing
- **Memory**: Minimum 16GB RAM
- **Storage**: SSD or NVMe recommended
- **OS**: Support for 4096+ open file descriptors
- **Postgres**: Version 17+ recommended

## Related tools

- **[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.
- **[Ordinals Explorer](https://ordinals.hiro.so/)**: Explore ordinals inscriptions and BRC-20 tokens rapidly in our Ordinals Explorer.

<br />

<Callout title="Need help building with the Bitcoin Indexer?" type="help">
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.
</Callout>
10 changes: 10 additions & 0 deletions content/docs/bitcoin/indexer/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"title": "Bitcoin Indexer",
"root": true,
"pages": [
"---Bitcoin Indexer---",
"index",
"installation",
"quickstart"
]
}
72 changes: 72 additions & 0 deletions content/docs/bitcoin/indexer/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Quickstart
description: Learn how to scan the Bitcoin blockchain for Ordinals activity.
---

import { Steps, Step } from 'fumadocs-ui/components/steps';

In this quickstart guide, you will set up the Bitcoin Indexer to index Ordinals or Runes activity on the Bitcoin blockchain.

<Steps>
<Step title="Install Bitcoin Indexer">
Clone the repository and install the indexer:
```terminal
$ git clone https://github.com/hirosystems/bitcoin-indexer.git
$ cd bitcoin-indexer
$ cargo bitcoin-indexer-install
```
</Step>

<Step title="Configure the Indexer">
Generate a new configuration file:
```terminal
$ bitcoin-indexer config new
```

Configure your Postgres database in the generated TOML file:
```toml
[ordinals.db]
database = "metaprotocols"
host = "localhost"
port = 5432
username = "postgres"
password = "postgres"
```
</Step>

<Step title="Start the Indexer">
Run the following command to start indexing Ordinals activity:
```terminal
$ bitcoin-indexer ordinals service start --config-path <path>
```

For Runes indexing, use:
```terminal
$ bitcoin-indexer runes service start --config-path <path>
```
</Step>
</Steps>

<Callout type="info">
A fully synced Bitcoin node is required for indexing to start.
</Callout>

## Next steps

<Cards>
<Card
href="/ordinals/explorer"
title="Ordinals Explorer"
description="Explore the Ordinals Explorer to view inscriptions and transfers."
/>
<Card
href="/bitcoin/ordinals/api"
title="Ordinals API"
description="Learn how to interact with Ordinals data using our API."
/>
<Card
href="/bitcoin/runes/api"
title="Runes API"
description="Explore our Runes blockchain API documentation."
/>
</Cards>
2 changes: 1 addition & 1 deletion content/docs/bitcoin/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"index",
"get-started",
"---Tools---",
"ordinals/ordhook",
"indexer",
"---APIs---",
"ordinals/api",
"runes/api",
Expand Down
2 changes: 1 addition & 1 deletion content/docs/bitcoin/ordinals/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The Ordinals API uses REST endpoints and cached responses in order to optimize p

## Related tools

- **[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.
- **[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.
- **[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.

<br />
Expand Down
Loading