Sigil documentation
ReferenceRust referencesigil-keyloader

sigil-keyloader · crate

Source declarations, signatures and documentation for crate.

Source: sigil/node/sigil-keyloader/src/lib.rs. SHA-256: 16106d0affea8ed4c43bde11d72ea5177a64d7f4ffc601b7dcc4afac28249301.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

::KeyloaderError

#[derive(Debug, thiserror::Error)]
pub enum KeyloaderError {
    #[error("invalid argument: {0}")]
    InvalidArgument(String),
    #[error("OpenBao request failed: {0}")]
    OpenBao(String),
    #[error("validator key payload is invalid: {0}")]
    InvalidPayload(String),
    #[error("I/O error: {0}")]
    Io(#[from] std::io::Error),
    #[error("JSON error: {0}")]
    Json(#[from] serde_json::Error),
    #[error("HTTP client error: {0}")]
    Http(#[from] reqwest::Error),
}

Source line: 16.

::ValidatorKeys

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ValidatorKeys {
pub consensus_pubkey: String,
pub consensus_secret: String,
pub network_pubkey: String,
pub network_secret: String,
pub validator_did: String,
#[serde(default = "default_tower_addr")]
pub tower_addr: String,
#[serde(default)]
pub tower_region: Option<String>
}

Source line: 32.

::ValidatorKeys::validate

pub fn validate(&self) -> Result<(), KeyloaderError>;

Source line: 45.

::FetchConfig

#[derive(Debug, Clone)]
pub struct FetchConfig {
pub openbao_addr: String,
pub role: String,
pub secret_path: String,
pub token_path: PathBuf,
pub auth_path: String,
pub namespace: Option<String>
}

Source line: 84.

::FetchConfig::validate

pub fn validate(&self) -> Result<(), KeyloaderError>;

Source line: 94.

::openbao_kv2_read_path

pub fn openbao_kv2_read_path(secret_path: &str) -> String;

Source line: 129.

::extract_validator_keys

pub fn extract_validator_keys(payload: &Value) -> Result<ValidatorKeys, KeyloaderError>;

Source line: 144.

::fetch_openbao_validator_keys

pub fn fetch_openbao_validator_keys(config: &FetchConfig) -> Result<ValidatorKeys, KeyloaderError>;

Source line: 155.

::write_validator_keys_atomically

pub fn write_validator_keys_atomically(
    keys: &ValidatorKeys,
    output: &Path,
) -> Result<(), KeyloaderError>;

Source line: 219.

On this page