Skip to content

Commit

Permalink
Wallet accounts ownership proof, need to expose private key to genera…
Browse files Browse the repository at this point in the history
…te a signatures
  • Loading branch information
bayk committed Oct 2, 2024
1 parent 32f77d7 commit d0626e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions keychain/src/keychain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ impl Keychain for ExtKeychain {
ExtendedPubKey::from_private(&self.secp, &self.master, &mut hasher).public_key
}

fn private_root_key(&self) -> SecretKey {
self.master.secret_key.clone()
}

fn derive_key(
&self,
amount: u64,
Expand Down
2 changes: 2 additions & 0 deletions keychain/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ pub trait Keychain: Sync + Send + Clone {
/// The public root key
fn public_root_key(&self) -> PublicKey;

fn private_root_key(&self) -> SecretKey;

fn derive_key(
&self,
amount: u64,
Expand Down

0 comments on commit d0626e3

Please sign in to comment.