def _derive_path(root: bip32.HDNode, path: Bip32Path) -> bip32.HDNode: """Clone and derive path from the root.""" node = root.clone() node.derive_path(path) return node
def node_derive(root: bip32.HDNode, address_n: list): node = root.clone() node.derive_path(address_n) return node
def derive_path_cardano(root: bip32.HDNode, path: Bip32Path) -> bip32.HDNode: node = root.clone() for i in path: node.derive_cardano(i) return node