zcash_primitives: Improve ZIP 32 comments
This commit is contained in:
parent
f7726141c3
commit
7064efe697
|
@ -350,7 +350,7 @@ impl ExtendedSpendingKey {
|
|||
})
|
||||
}
|
||||
|
||||
/// Reads and decodes the encoded form of the extended spending key as define in
|
||||
/// Reads and decodes the encoded form of the extended spending key as defined in
|
||||
/// [ZIP 32](https://zips.z.cash/zip-0032) from the provided reader.
|
||||
pub fn read<R: Read>(mut reader: R) -> io::Result<Self> {
|
||||
let depth = reader.read_u8()?;
|
||||
|
|
|
@ -55,6 +55,9 @@ impl ConditionallySelectable for AccountId {
|
|||
pub struct ChildIndex(u32);
|
||||
|
||||
impl ChildIndex {
|
||||
/// Parses the given ZIP 32 child index.
|
||||
///
|
||||
/// Returns `None` if the hardened bit is not set.
|
||||
pub fn from_index(i: u32) -> Option<Self> {
|
||||
if i >= (1 << 31) {
|
||||
Some(ChildIndex(i))
|
||||
|
|
Loading…
Reference in New Issue