MCPcopy Index your code
hub / github.com/apibara/dna

github.com/apibara/dna @v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.0 ↗ · + Follow
136 symbols 238 edges 21 files 10 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img width="400" src="https://user-images.githubusercontent.com/282580/176315678-e7ab5a9b-5561-41e4-b314-62f99fd90d2f.png" />

Apibara Server

Apibara is a tool to build serverless APIs that integrate web3 data and web2 services.

Architecture

Apibara applications are made of two components: the Apibara Server and the client application. The server is responsible for all common tasks such as indexing on-chain events, exposing a GraphQL API, and providing monitoring metrics. The client application implements the application-specific business logic and communicates with the server through a gRPC stream.

Developers implement applications using the Apibara SDK, available in the following languages:

  • Python
  • Typescript: coming soon

Roadmap

Blockchain indexing

Index events from Ethereum-like chains and StarkNet. The Apibara Server listens for events on-chain and sends them to the registered indexers. The server handles all logic to fetch events and handle chain reorganizations, while the clients focus on the business logic.

Chain-aware storage

Provide a document storage interface that indexers use to store their data. Data is automatically deleted in response to a chain reorganization.

Automatic API generation

Applications can declaratively define the resources they wish to expose. Apibara Server automatically creates the GraphQL API to serve them.

Streaming Support

Support GraphQL subscriptions so that clients can stream resources as they are stored in the database.

License

Copyright 2022 GNC Labs Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Extension points exported contracts — how you extend this code

ChainProvider (Interface)
(no doc) [2 implementers]
apibara/src/chain/provider.rs
IndexerPersistence (Interface)
(no doc) [1 implementers]
apibara/src/indexer/persistence.rs

Core symbols most depended-on inside this repo

as_bytes
called by 18
apibara/src/chain/types.rs
to_vec
called by 15
apibara/src/chain/types.rs
into
called by 15
apibara/src/server/indexer_service.rs
make_block_header
called by 15
apibara/src/head_tracker/mod.rs
try_into
called by 7
apibara/src/chain/starknet.rs
indexers_collection
called by 5
apibara/src/persistence/mongo.rs
start_head_tracker
called by 5
apibara/src/head_tracker/mod.rs
get_indexer
called by 4
apibara/src/indexer/manager.rs

Shape

Method 79
Class 34
Function 14
Enum 7
Interface 2

Languages

Rust100%

Modules by API surface

apibara/src/chain/types.rs22 symbols
apibara/src/chain/ethereum.rs13 symbols
apibara/src/server/indexer_service.rs12 symbols
apibara/src/head_tracker/mod.rs12 symbols
apibara/src/persistence/mongo.rs10 symbols
apibara/src/indexer/service.rs10 symbols
apibara/src/chain/starknet.rs10 symbols
apibara/src/configuration.rs9 symbols
apibara/src/indexer/manager.rs7 symbols
apibara/src/persistence/mod.rs6 symbols
apibara/src/indexer/persistence.rs6 symbols
apibara/src/network_manager.rs4 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add dna \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact