near_indexer_primitives/
lib.rs1pub use near_primitives::hash::CryptoHash;
2pub use near_primitives::{self, types, views};
3
4#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
6pub struct StreamerMessage {
7 pub block: views::BlockView,
8 pub shards: Vec<IndexerShard>,
9}
10
11#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
12pub struct IndexerChunkView {
13 pub author: types::AccountId,
14 pub header: views::ChunkHeaderView,
15 pub transactions: Vec<IndexerTransactionWithOutcome>,
16 pub receipts: Vec<views::ReceiptView>,
20 #[serde(default)]
23 pub local_receipts: Vec<views::ReceiptView>,
24}
25
26#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
27pub struct IndexerTransactionWithOutcome {
28 pub transaction: views::SignedTransactionView,
29 pub outcome: IndexerExecutionOutcomeWithOptionalReceipt,
30}
31
32#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
33pub struct IndexerExecutionOutcomeWithOptionalReceipt {
34 pub execution_outcome: views::ExecutionOutcomeWithIdView,
35 pub receipt: Option<views::ReceiptView>,
36}
37
38#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
39pub struct IndexerExecutionOutcomeWithReceipt {
40 pub execution_outcome: views::ExecutionOutcomeWithIdView,
41 pub receipt: views::ReceiptView,
42}
43
44#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
45pub struct IndexerShard {
46 pub shard_id: types::ShardId,
47 pub chunk: Option<IndexerChunkView>,
48 pub receipt_execution_outcomes: Vec<IndexerExecutionOutcomeWithReceipt>,
49 pub state_changes: views::StateChangesView,
50}