solana_genesis/
lib.rs

1#![cfg_attr(
2    not(feature = "agave-unstable-api"),
3    deprecated(
4        since = "3.1.0",
5        note = "This crate has been marked for formal inclusion in the Agave Unstable API. From \
6                v4.0.0 onward, the `agave-unstable-api` crate feature must be specified to \
7                acknowledge use of an interface that may break without warning."
8    )
9)]
10#![allow(clippy::arithmetic_side_effects)]
11pub mod address_generator;
12pub mod genesis_accounts;
13pub mod stakes;
14pub mod unlocks;
15
16use serde::{Deserialize, Serialize};
17
18/// An account where the data is encoded as a Base64 string.
19#[derive(Serialize, Deserialize, Debug)]
20pub struct Base64Account {
21    pub balance: u64,
22    pub owner: String,
23    pub data: String,
24    pub executable: bool,
25}
26
27#[derive(Serialize, Deserialize, Debug)]
28pub struct ValidatorAccountsFile {
29    pub validator_accounts: Vec<StakedValidatorAccountInfo>,
30}
31
32/// Info needed to create a staked validator account,
33/// including relevant balances and vote- and stake-account addresses
34#[derive(Serialize, Deserialize, Debug)]
35pub struct StakedValidatorAccountInfo {
36    pub balance_lamports: u64,
37    pub stake_lamports: u64,
38    pub identity_account: String,
39    pub vote_account: String,
40    pub stake_account: String,
41    pub bls_pubkey: Option<String>,
42}