Skip to content

Commit

Permalink
Add section for Indexer SDK (#756)
Browse files Browse the repository at this point in the history
* indexer sdk

* add initial setup page

* add steps page

* fix lint

* remove documentation.mdx

* feedback

* fix links
  • Loading branch information
rtso authored Jan 9, 2025
1 parent 63bb7a4 commit e582226
Show file tree
Hide file tree
Showing 19 changed files with 482 additions and 494 deletions.
23 changes: 19 additions & 4 deletions apps/nextra/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,28 @@ export default withBundleAnalyzer(
permanent: true,
},
{
source: "/indexer/custom-processors/e2e-tutorial",
destination: "/en/build/indexer/custom-processors/e2e-tutorial",
source: "/indexer/indexer-sdk/quickstart",
destination: "/en/build/indexer/indexer-sdk/quickstart",
permanent: true,
},
{
source: "/indexer/custom-processors/parsing-txns",
destination: "/en/build/indexer/custom-processors/parsing-txns",
source: "/indexer/indexer-sdk/documentation",
destination: "/en/build/indexer/indexer-sdk/documentation",
permanent: true,
},
{
source: "/indexer/indexer-sdk/documentation/setup",
destination: "/en/build/indexer/indexer-sdk/documentation/setup",
permanent: true,
},
{
source: "/indexer/indexer-sdk/documentation/steps",
destination: "/en/build/indexer/indexer-sdk/documentation/steps",
permanent: true,
},
{
source: "/indexer/indexer-sdk/documentation/parsing-txns",
destination: "/en/build/indexer/indexer-sdk/documentation/parsing-txns",
permanent: true,
},
{
Expand Down
4 changes: 2 additions & 2 deletions apps/nextra/pages/en/build/cli/running-a-local-network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ As you can see from the example output in step 4, once the local network is runn
- [Node API](../../network/nodes/aptos-api-spec.mdx): This is a REST API that runs directly on the node. It enables core write functionality such as transaction submission and a limited set of read functionality, such as reading account resources or Move module information.
- [Indexer API](../indexer/aptos-hosted.mdx): This is a [GraphQL](https://graphql.org/) API that provides rich read access to indexed blockchain data. If you click on the URL for the Indexer API above, by default [http://127.0.0.1:8090](http://127.0.0.1:8090/), it will open the Hasura Console, a web UI that will help you query the Indexer GraphQL API.
- [Transaction Stream Service](../indexer/txn-stream.mdx): This is a gRPC stream of transactions used by the Indexer API. This is only relevant to you if you are developing a [custom processor](../indexer/custom-processors.mdx).
- [Transaction Stream Service](../indexer/txn-stream.mdx): This is a gRPC stream of transactions used by the Indexer API and SDK. This is only relevant to you if you are developing a [Indexer SDK](../indexer/indexer-sdk.mdx) custom processor.
- [Postgres](https://www.postgresql.org/): This is the database that the Indexer processors write to. The Indexer API reads from this database.
- [Faucet](../apis/faucet-api.mdx): You can use this to fund accounts on your local network.
Expand Down Expand Up @@ -166,7 +166,7 @@ const client = new Aptos(config);
Sometimes while developing it is helpful to reset the local network back to its initial state, for example:
- You made backwards incompatible changes to a Move module, and you'd like to redeploy it without renaming it or using a new account.
- You are building a [custom indexer processor](../indexer/custom-processors.mdx) and would like to index using a fresh network.
- You are building an [Indexer SDK](../indexer/indexer-sdk.mdx) custom processor and would like to index using a fresh network.
- You want to clear all on chain state, e.g. accounts, objects, etc.
To start with a brand new local network, use the `--force-restart` flag:
Expand Down
6 changes: 3 additions & 3 deletions apps/nextra/pages/en/build/indexer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ If the hosted Indexer API is not enough, you can customize and host your own ver
<Card.Title>Architecture</Card.Title>
<Card.Description>Detailed layout of the Indexer's architecture.</Card.Description>
</Card>
<Card href="indexer/custom-processors">
<Card.Title>Custom Processors</Card.Title>
<Card.Description>Customize way data is processed and shared in the Indexer</Card.Description>
<Card href="indexer/indexer-sdk">
<Card.Title>Indexer SDK</Card.Title>
<Card.Description>Create a custom processor with the Indexer SDK</Card.Description>
</Card>
<Card href="indexer/txn-stream">
<Card.Title>Transaction Streaming Service</Card.Title>
Expand Down
4 changes: 2 additions & 2 deletions apps/nextra/pages/en/build/indexer/_meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default {
type: "separator",
title: "Indexer Customizations (Advanced)",
},
"custom-processors": {
title: "Custom Processors",
"indexer-sdk": {
title: "Indexer SDK",
},
"txn-stream": {
title: "Transaction Stream Service",
Expand Down
4 changes: 2 additions & 2 deletions apps/nextra/pages/en/build/indexer/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Here is how the Indexer creates that API at a high-level:
/>
</center>

The Indexer uses the [Transaction Stream Service](./txn-stream.mdx) and [Custom Processors](./custom-processors.mdx) to update a database with rich tables. Then it exposes an API for Aptos apps to access the consolidated data.
The Indexer uses the [Transaction Stream Service](./txn-stream.mdx) and custom processors written with the [Indexer SDK](./indexer-sdk.mdx) to update a database with rich tables. Then it exposes an API for Aptos apps to access the consolidated data.

For situations where you need to go beyond the Aptos hosted Indexer API data, you will want to create a [custom processor](./custom-processors.mdx).
For situations where you need to go beyond the Aptos hosted Indexer API data, you will want to create a custom processor with the Indexer SDK (./indexer-sdk.mdx).

Writing a custom processor can help you:
1. Get access to different types of data.
Expand Down
23 changes: 0 additions & 23 deletions apps/nextra/pages/en/build/indexer/custom-processors.mdx

This file was deleted.

Loading

0 comments on commit e582226

Please sign in to comment.