1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! # Apibara SDK
//!
//! This crate is the official SDK for [Apibara](https://www.apibara.com).
//! Apibara is the fastest way to build production-grade web3 indexers.
//!
//! The SDK provides the following features:
//!
//! - A client to stream onchain data. The client handles authentication and connection timeouts.
//! - Chain-specific filter builders and data parsers.
//!
//! ## Features
//!
//! By default, the SDK is built without any chain support. To enable support for a chain, you need to enable the corresponding feature.
//!
//! - `starknet`: enable Starknet support.
//!
//! ## Authentication
//!
//! If you're connected to a protected endpoint (like the ones hosted by Apibara), you need to provide a valid API key.
//!
//! The main mechanism to provide authentication is through the [BearerTokenProvider] trait. We provide two implementations:
//!
//! - [BearerTokenFromEnv]: reads the API key from the `DNA_TOKEN` environment variable.
//! - [StaticBearerToken]: uses the API key provided at construction.
//!
//! You are free to implement your own bearer token provider, for example one that fetches the token from a remote vault server.
//!
//! ## Connection issues
//!
//! The client does not reconnect automatically. If the connection is lost, you need to create a new client.
//! This is done to prevent your application not processing a block or processing the same block twice.
//! By handling reconnection within your application, you can decide whether you want to process blocks
//! at least or at most once.
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate;
pub use crateStreamDataRequestBuilder;
/// Contains the gRPC types to interact with the Apibara DNA service.
pub use stream as proto;