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
|
2025-11-26 07:07:58 +02:00
|
|
|
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
|
|
|
|
2025-11-27 13:46:35 +02:00
|
|
|
fn account_id(&self) -> nssa::AccountId;
|
2025-11-07 16:21:14 +02:00
|
|
|
}
|