pub struct LocalCredentials { /* private fields */ }Expand description
Persistent private-domain identity and epoch-zero key material.
Implementations§
Source§impl LocalCredentials
impl LocalCredentials
Sourcepub fn load(root: impl AsRef<Path>) -> Result<Self, SecurityError>
pub fn load(root: impl AsRef<Path>) -> Result<Self, SecurityError>
Loads an existing owner-only encrypted local key vault without creating files.
Sourcepub fn load_or_create(root: impl AsRef<Path>) -> Result<Self, SecurityError>
pub fn load_or_create(root: impl AsRef<Path>) -> Result<Self, SecurityError>
Loads or creates an owner-only encrypted local key vault.
Sourcepub fn create_for_domain(
root: impl AsRef<Path>,
seed: &DomainSeed,
) -> Result<Self, SecurityError>
pub fn create_for_domain( root: impl AsRef<Path>, seed: &DomainSeed, ) -> Result<Self, SecurityError>
Creates a new device identity in an existing trusted domain.
Sourcepub fn signer(&self) -> IrohSigner
pub fn signer(&self) -> IrohSigner
Returns the iroh endpoint signer used by this database.
Sourcepub fn domain_key(&self) -> DomainKey
pub fn domain_key(&self) -> DomainKey
Returns the epoch-zero private-domain key.
Sourcepub fn domain_seed(&self) -> DomainSeed
pub fn domain_seed(&self) -> DomainSeed
Exports sensitive domain bootstrap material for a trusted invitation flow.
Sourcepub fn store_domain(&self, seed: &DomainSeed) -> Result<(), SecurityError>
pub fn store_domain(&self, seed: &DomainSeed) -> Result<(), SecurityError>
Persists a domain seed in the owner-only encrypted device catalog.
Sourcepub fn replace_domain(&self, seed: &DomainSeed) -> Result<(), SecurityError>
pub fn replace_domain(&self, seed: &DomainSeed) -> Result<(), SecurityError>
Atomically advances a catalog domain while retaining both epoch keys locally.
Sourcepub fn load_domain(
&self,
domain_id: DomainId,
) -> Result<DomainSeed, SecurityError>
pub fn load_domain( &self, domain_id: DomainId, ) -> Result<DomainSeed, SecurityError>
Loads one domain seed from the encrypted device catalog.
Sourcepub fn load_domain_epoch(
&self,
domain_id: DomainId,
epoch: u64,
) -> Result<DomainSeed, SecurityError>
pub fn load_domain_epoch( &self, domain_id: DomainId, epoch: u64, ) -> Result<DomainSeed, SecurityError>
Loads a retained historical epoch key without changing the active catalog entry.
Sourcepub fn domains(&self) -> Result<Vec<DomainId>, SecurityError>
pub fn domains(&self) -> Result<Vec<DomainId>, SecurityError>
Lists every domain available to this device.
Sourcepub fn endpoint_secret_key(&self) -> SecretKey
pub fn endpoint_secret_key(&self) -> SecretKey
Returns the same secret identity used to authenticate the iroh endpoint.
Trait Implementations§
Source§impl Clone for LocalCredentials
impl Clone for LocalCredentials
Source§fn clone(&self) -> LocalCredentials
fn clone(&self) -> LocalCredentials
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more