fn extend_and_serialize(derivation_path: &DerivationPath) -> Vec<u8> {
    let byte = if derivation_path.change().is_some() {
        4
    } else if derivation_path.account().is_some() {
        3
    } else {
        2
    };
    let mut concat_derivation = vec![byte];
    for index in derivation_path.path() {
        concat_derivation.extend_from_slice(&index.to_bits().to_be_bytes());
    }
    concat_derivation
}
/// Build the derivation path byte array from a DerivationPath selection
Build the derivation path byte array from a DerivationPath selection
Build the derivation path byte array from a DerivationPath selection
fn extend_and_serialize(derivation_path: &DerivationPath) -> Vec<u8> {
    let byte = if derivation_path.change().is_some() {
        4
    } else if derivation_path.account().is_some() {
        3
    } else {
        2
    };
    let mut concat_derivation = vec![byte];
    for index in derivation_path.path() {
        concat_derivation.extend_from_slice(&index.to_bits().to_be_bytes());
    }
    concat_derivation
}
fn extend_and_serialize ( derivation_path : & DerivationPath ) -> Vec < u8 > { let byte = if derivation_path . change ( ) . is_some ( ) { 4 } else if derivation_path . account ( ) . is_some ( ) { 3 } else { 2 } ; let mut concat_derivation = vec ! [ byte ] ; for index in derivation_path . path ( ) { concat_derivation . extend_from_slice ( & index . to_bits ( ) . to_be_bytes ( ) ) ; } concat_derivation }
Build the derivation path byte array from a DerivationPath selection
Build the derivation path byte array from a DerivationPath selection
derivation_path
&DerivationPath