diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sleep_register.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sleep_register.rs b/src/sleep_register.rs index 668bb62..3e1c48e 100644 --- a/src/sleep_register.rs +++ b/src/sleep_register.rs @@ -12,6 +12,7 @@ use rand::{OsRng, Rng}; use errors::*; use sleep_file::*; +use protocol::make_discovery_key; /// Abstract access to Hypercore register pub trait HyperRegister { @@ -362,6 +363,10 @@ impl SleepDirRegister { sf.check()?; Ok(sf) } + + pub fn discovery_key(&self) -> Vec<u8> { + make_discovery_key(&self.pub_key) + } } impl HyperRegister for SleepDirRegister { |