Trait zcash_primitives::consensus::Parameters [−][src]
pub trait Parameters: Clone { fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>; fn coin_type(&self) -> u32; fn hrp_sapling_extended_spending_key(&self) -> &str; fn hrp_sapling_extended_full_viewing_key(&self) -> &str; fn hrp_sapling_payment_address(&self) -> &str; fn b58_pubkey_address_prefix(&self) -> [u8; 2]; fn b58_script_address_prefix(&self) -> [u8; 2]; fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool { ... } }
Expand description
Zcash consensus parameters.
Required methods
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>
Returns the activation height for a particular network upgrade, if an activation height has been set.
fn hrp_sapling_extended_spending_key(&self) -> &str
fn hrp_sapling_extended_spending_key(&self) -> &str
Returns the human-readable prefix for Bech32-encoded Sapling extended spending keys the network to which this Parameters value applies.
Defined in ZIP 32.
fn hrp_sapling_extended_full_viewing_key(&self) -> &str
fn hrp_sapling_extended_full_viewing_key(&self) -> &str
Returns the human-readable prefix for Bech32-encoded Sapling extended full viewing keys for the network to which this Parameters value applies.
Defined in ZIP 32.
fn hrp_sapling_payment_address(&self) -> &str
fn hrp_sapling_payment_address(&self) -> &str
Returns the Bech32-encoded human-readable prefix for Sapling payment addresses viewing keys for the network to which this Parameters value applies.
Defined in section 5.6.4 of the Zcash Protocol Specification.
fn b58_pubkey_address_prefix(&self) -> [u8; 2]
fn b58_pubkey_address_prefix(&self) -> [u8; 2]
Returns the human-readable prefix for Base58Check-encoded transparent pay-to-public-key-hash payment addresses for the network to which this Parameters value applies.
fn b58_script_address_prefix(&self) -> [u8; 2]
fn b58_script_address_prefix(&self) -> [u8; 2]
Returns the human-readable prefix for Base58Check-encoded transparent pay-to-script-hash payment addresses for the network to which this Parameters value applies.
Provided methods
fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool
fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool
Determines whether the specified network upgrade is active as of the provided block height on the network to which this Parameters value applies.