pub trait HDPath {
fn len(&self) -> u8;
fn get(&self, pos: u8) -> Option<PathValue>;
fn to_bytes(&self) -> Vec<u8> { ... }
fn parent(&self) -> Option<CustomHDPath> { ... }
fn as_custom(&self) -> CustomHDPath { ... }
}
Expand description
General trait for an HDPath.
Common implementations are StandardHDPath
, AccountHDPath
and CustomHDPath
Required Methods
Provided Methods
Encode as bytes, where first byte is number of elements in path (always 5 for StandardHDPath) following by 4-byte BE values
fn parent(&self) -> Option<CustomHDPath>
fn parent(&self) -> Option<CustomHDPath>
Get parent HD Path.
Return None
if the current path is empty (i.e. already at the top)
fn as_custom(&self) -> CustomHDPath
fn as_custom(&self) -> CustomHDPath
Convert current to CustomHDPath
structure