blockfrost_openapi/models/stake.rs
1use crate::models;
2use serde::{Deserialize, Serialize};
3
4/// Stake : Stake represents the stakes of a participant in the Cardano chain
5#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6pub struct Stake {
7 /// Stake share as computed in the 'stake distribution' by the Cardano Node, multiplied by a billion (1.0e9)
8 #[serde(rename = "stake")]
9 pub stake: i64,
10}
11
12impl Stake {
13 /// Stake represents the stakes of a participant in the Cardano chain
14 pub fn new(stake: i64) -> Stake {
15 Stake {
16 stake,
17 }
18 }
19}
20