ChainPath is used to describe BIP-32 KeyChain path.
use hdwallet::{ChainPath, SubPath, KeyIndex};
let chain_path = ChainPath::from("m/2147483649H/1".to_string())
.iter()
.collect::<Result<Vec<_>, _>>()
.unwrap();
assert_eq!(chain_path, vec![
SubPath::Root,
SubPath::Child(KeyIndex::hardened_from_normalize_index(1).unwrap()),
SubPath::Child(KeyIndex::Normal(1))
]);
An SubPath iterator over the ChainPath from Root to child keys.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static