/ README.md
README.md
1 <p align="center"> 2 <img width="400" src="https://user-images.githubusercontent.com/282580/176315678-e7ab5a9b-5561-41e4-b314-62f99fd90d2f.png" /> 3 </p> 4 5 --- 6 7 # Apibara Direct Node Access and SDK 8 9 This repository contains the canonical implementation of the Apibara Direct Node 10 Access (DNA) protocol and the integrations built on top of it.\ 11 The protocol enables developers to easily and efficiently stream any onchain 12 data directly into their application. 13 14 ### Stream 15 16 Stream data directly from the node into your application. DNA enables you to get 17 exactly the data you need using _filters_. Filters are a collection of rules 18 that are applied to each block to select what data to send in the stream. 19 20 ### Transform 21 22 Data is transformed evaluating a Javascript or Typescript function on each batch 23 of data. The resulting data is automatically sent and synced with the target 24 integration. 25 26 ### Integrate 27 28 We provide a collection of integrations that send data directly where it's 29 needed. Our integrations support all data from genesis block to the current 30 pending block and they ensure data is kept up-to-date. 31 32 - **Webhook**: call an HTTP endpoint for each batch of data. 33 - **PostgreSQL**: stream data into a specific table, keeping it up-to-date on 34 new blocks and chain reorganizations. 35 - **MongoDB**: store data into a specific collection, keeping it up-to-date on 36 new blocks and chain reorganizations. 37 - **Parquet**: generate Parquet files to be used for data analysis. 38 39 ## Getting started 40 41 You can get started using Apibara by installing the official CLI tool. 42 43 If you'd like to interact with the DNA protocol directly, you can use one of the 44 official SDKs: 45 46 - [Typescript](https://www.apibara.com/docs/typescript-sdk) 47 - [Python](https://www.apibara.com/docs/python-sdk) 48 49 ## Docker images 50 51 We publish docker images on quay.io: 52 53 - [Starknet DNA](https://quay.io/repository/apibara/starknet?tab=tags) 54 55 ## Development 56 57 Apibara DNA is developed against stable Rust. We provide a 58 [nix](https://nixos.org/) environment to simplify installing all dependencies 59 required by DNA. 60 61 - if you have nix installed, simply run `nix develop`. 62 - otherwise, you can launch a devcontainer which installs and configures nix for 63 you. 64 65 ## Project Structure 66 67 The project is comprised of several crates, refer to their READMEs to learn more 68 about each one of them. 69 70 - `core`: types shared by all other crates. 71 - `starknet`: StarkNet source node. 72 - `sdk`: connect to streams using Rust. 73 - `sink-common`: base crate to develop custom sinks. 74 - `sink-*`: sink implementations. 75 76 ## License 77 78 Copyright 2023 GNC Labs Limited 79 80 Licensed under the Apache License, Version 2.0 (the "License"); you may not use 81 this file except in compliance with the License. You may obtain a copy of the 82 License at 83 84 http://www.apache.org/licenses/LICENSE-2.0 85 86 Unless required by applicable law or agreed to in writing, software distributed 87 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 88 CONDITIONS OF ANY KIND, either express or implied. See the License for the 89 specific language governing permissions and limitations under the License.