unc_indexer_primitives/
lib.rs1pub use unc_primitives::hash::CryptoHash;
2pub use unc_primitives::{self, types, views};
3
4#[derive(Debug, serde::Serialize, serde::Deserialize)]
6pub struct StreamerMessage {
7 pub block: views::BlockView,
8 pub shards: Vec<IndexerShard>,
9}
10
11#[derive(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>,
17}
18
19#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
20pub struct IndexerTransactionWithOutcome {
21 pub transaction: views::SignedTransactionView,
22 pub outcome: IndexerExecutionOutcomeWithOptionalReceipt,
23}
24
25#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
26pub struct IndexerExecutionOutcomeWithOptionalReceipt {
27 pub execution_outcome: views::ExecutionOutcomeWithIdView,
28 pub receipt: Option<views::ReceiptView>,
29}
30
31#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
32pub struct IndexerExecutionOutcomeWithReceipt {
33 pub execution_outcome: views::ExecutionOutcomeWithIdView,
34 pub receipt: views::ReceiptView,
35}
36
37#[derive(Debug, serde::Serialize, serde::Deserialize)]
38pub struct IndexerShard {
39 pub shard_id: types::ShardId,
40 pub chunk: Option<IndexerChunkView>,
41 pub receipt_execution_outcomes: Vec<IndexerExecutionOutcomeWithReceipt>,
42 pub state_changes: views::StateChangesView,
43}