# Rust Bitcoin Proptest Strategies Proptest strategies for Bitcoin-related code. This collection of generators (called _strategies_ in proptest's terminology) helps developers of Bitcoin-related software written in Rust supply random data – both valid and invalid – to their property-based tests. Visit [documentation](https://docs.rs/bitcoin_proptest) for details. ## Example ```rust #[cfg(test)] mod tests { proptest! { #[test] // generates valid hex-encoded public keys, both compressed and uncompressed fn pubkey_parsing(s in prop::secp256k1::public_key::valid::hex()) { prop_assert!(s.len() == 66 || s.len() == 130); prop_assert!(my_parser(s).is_ok()); } } } ```