Skip to content

Commit

Permalink
Config: new value initial_host_pub_key
Browse files Browse the repository at this point in the history
  • Loading branch information
zo-el committed Jun 4, 2024
1 parent 954b405 commit 9c2c3b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
19 changes: 3 additions & 16 deletions core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pub enum Config {
revocation_pub_key: PublicKey,
// /1 derivation path of the device bundle base36 encoded
holoport_id: String,
// This is a HoloHash version of the holoport_id
initial_host_pub_key: String,
/// Holo registration code is used to identify and authenticate its users
registration_code: String,
/// The pub-key in settings is the holoport key that is used for verifying login signatures
Expand Down Expand Up @@ -118,6 +120,7 @@ impl Config {
device_derivation_path,
revocation_pub_key,
holoport_id,
initial_host_pub_key: public_key::to_holochain_encoded_agent_key(&device_pub_key),
registration_code,
settings: Settings { admin: admin },
},
Expand All @@ -134,22 +137,6 @@ impl Config {
}
}

// fn generate_keypair(
// email: String,
// password: String,
// maybe_seed: Option<Seed>,
// ) -> Result<(Seed, Keypair, PublicKey), Error> {
// let master_seed = match maybe_seed {
// None => OsRng::new()?.gen::<Seed>(),
// Some(s) => s,
// };
// let master_secret_key = SecretKey::from_bytes(&master_seed)?;
// let master_public_key = PublicKey::from(&master_secret_key);

// let admin_keypair = admin_keypair_from(master_public_key, &email, &password)?;
// Ok((master_seed, admin_keypair, master_public_key))
// }

pub fn admin_keypair_from(
holochain_public_key: PublicKey,
email: &str,
Expand Down
1 change: 1 addition & 0 deletions core/tests/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ mod tests {
device_derivation_path,
revocation_pub_key,
holoport_id,
initial_host_pub_key: _,
registration_code,
settings,
} = hpos_config.0
Expand Down

0 comments on commit 9c2c3b0

Please sign in to comment.