Skip to main content

OwnerKey

Struct OwnerKey 

Source
pub struct OwnerKey(/* private fields */);
Expand description

Owner signing authority, distinct from the local owner RPC credential and node keys. Deliberately has no Debug or Serialize implementation.

Implementations§

Source§

impl OwnerKey

Source

pub fn bind_legacy_agent( &self, state: &VerifiedState, agent: &str, node: &str, now: u64, ) -> Result<SignedLegacyAgentBinding>

Trusted owner migration approval. The runtime must retain unique bindings and reject a chat UUID already assigned to a different node.

Source§

impl OwnerKey

Source

pub fn authorize_configuration_stream( &self, state: &VerifiedState, group: &[u8], origin: Digest, endpoints: (&str, &str), now: u64, ) -> Result<SignedConfigurationGrant>

Source

pub fn authorize_standby_configuration_stream( &self, state: &VerifiedState, candidate: &SignedOwnerCandidate, group: &[u8], origin: Digest, reader: &str, now: u64, ) -> Result<SignedConfigurationGrant>

Source

pub fn generate() -> Result<Self>

Source

pub fn from_secret_bytes(bytes: &[u8; 32]) -> Self

Source

pub fn expose_secret(&self) -> Zeroizing<[u8; 32]>

For protected endpoint storage only. Never pass the result to a chat or relay.

Source

pub fn public_key(&self) -> PublicKey

Source

pub fn create_cluster( &self, name: &str, first: &NodeIdentity, node_name: &str, now: u64, ) -> Result<VerifiedState>

Source

pub fn create_cluster_with_id( &self, cluster: (&str, &str), first: &NodeIdentity, node_name: &str, policy: Policy, now: u64, ) -> Result<VerifiedState>

Bootstrap a locally owned cluster while preserving an existing local ID. This does not authorize replacing any previously pinned trust anchor.

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.