15 lines
340 B
Rust
Raw Normal View History

2025-11-26 14:53:26 +02:00
/// Trait, that reperesents a Node in hierarchical key tree
2025-11-07 16:21:14 +02:00
pub trait KeyNode {
2025-11-26 14:53:26 +02:00
/// Tree root node
2025-11-07 16:21:14 +02:00
fn root(seed: [u8; 64]) -> Self;
2025-11-26 14:53:26 +02:00
/// `cci`'s child of node
fn nth_child(&self, cci: u32) -> Self;
2025-11-07 16:21:14 +02:00
fn chain_code(&self) -> &[u8; 32];
2025-11-26 07:18:25 +02:00
fn child_index(&self) -> Option<u32>;
2025-11-07 16:21:14 +02:00
fn address(&self) -> nssa::Address;
}