Skip to main content

parse_threshold_cli

Function parse_threshold_cli 

Source
pub fn parse_threshold_cli(
    s: &str,
    key_count: usize,
) -> Result<Threshold, Error>
Expand description

Parse a threshold argument from the CLI.

Accepts either a plain integer ("2", "a" hex) for Threshold::Simple or a comma-separated fraction list ("1/2,1/2,1/2") for Threshold::Weighted. Rejects mixed shapes ("2,3" with no /) with a clear error.