Skip to main content

pwr_rs/block/
mod.rs

1
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Serialize, Deserialize)]
5#[serde(rename_all = "camelCase")]
6pub struct BlockTransaction {
7    pub identifier: u32,
8    pub transaction_hash: String,
9}
10
11#[derive(Debug, Serialize, Deserialize)]
12#[serde(rename_all = "camelCase")]
13pub struct Block {
14    #[serde(default)]
15    pub processed_without_critical_errors: bool,
16    pub block_hash: String,
17    pub previous_block_hash: String,
18    pub proposer: String,
19    #[serde(default)]
20    pub blockchain_version: u64,
21    #[serde(default)]
22    pub burned_fees: u64,
23    pub block_reward: u64,
24    pub transactions: Vec<BlockTransaction>,
25    #[serde(default)]
26    pub timestamp: u64,
27    pub size: u32,
28    pub block_number: u32,
29    pub root_hash: String,
30    #[serde(default)]
31    pub new_shares_per_spark: u64,
32}