pub struct NodeIdentity { /* private fields */ }Expand description
A node’s signing identity. Encryption keys will belong to the selected session protocol. Deliberately has no Debug or Serialize implementation.
Implementations§
Source§impl NodeIdentity
impl NodeIdentity
Source§impl NodeIdentity
impl NodeIdentity
Sourcepub fn observe_recovery(
&self,
state: &VerifiedState,
challenge: &RecoveryChallenge,
now: u64,
) -> Result<SignedRecoveryObservation>
pub fn observe_recovery( &self, state: &VerifiedState, challenge: &RecoveryChallenge, now: u64, ) -> Result<SignedRecoveryObservation>
May report an expired configuration, but never grants new authority.
Source§impl NodeIdentity
impl NodeIdentity
pub fn prepare_owner_candidate( &self, state: &VerifiedState, key: &OwnerKey, request: &str, now: u64, ) -> Result<SignedOwnerCandidate>
Source§impl NodeIdentity
impl NodeIdentity
Sourcepub fn sign_owner_readiness(
&self,
state: &VerifiedState,
key: &OwnerKey,
candidate: &SignedOwnerCandidate,
connections: &[(SignedConfigurationGrant, Receipt)],
now: u64,
) -> Result<SignedReadiness>
pub fn sign_owner_readiness( &self, state: &VerifiedState, key: &OwnerKey, candidate: &SignedOwnerCandidate, connections: &[(SignedConfigurationGrant, Receipt)], now: u64, ) -> Result<SignedReadiness>
The trusted runtime must check durable local links and keys before signing.
Source§impl NodeIdentity
impl NodeIdentity
pub fn sign_stream_receipt( &self, group: &[u8], sequence: u64, digest: Digest, ) -> Result<Receipt>
Sourcepub fn sign_stream_packet(
&self,
group: &[u8],
sequence: u64,
previous: Digest,
ciphertext: &[u8],
) -> Result<Packet>
pub fn sign_stream_packet( &self, group: &[u8], sequence: u64, previous: Digest, ciphertext: &[u8], ) -> Result<Packet>
Authenticate an opaque packet and its position in a directional stream.
pub fn generate() -> Result<Self>
pub fn from_secret_bytes(node_id: &str, bytes: &[u8; 32]) -> Result<Self>
Sourcepub fn replacement(&self) -> Result<Self>
pub fn replacement(&self) -> Result<Self>
Generate replacement signing material while retaining the stable node ID.
Sourcepub fn expose_secret(&self) -> Zeroizing<[u8; 32]>
pub fn expose_secret(&self) -> Zeroizing<[u8; 32]>
For protected endpoint storage only. Never pass the result to a chat or relay.
pub fn id(&self) -> &str
pub fn public_key(&self) -> PublicKey
Sourcepub fn request_enrollment(
&self,
anchor: &TrustAnchor,
base: &Checkpoint,
name: &str,
now: u64,
) -> Result<SignedEnrollment>
pub fn request_enrollment( &self, anchor: &TrustAnchor, base: &Checkpoint, name: &str, now: u64, ) -> Result<SignedEnrollment>
The anchor and checkpoint must be obtained through the trusted pairing flow.
pub fn request_replacement( &self, anchor: &TrustAnchor, base: &Checkpoint, name: &str, replaces: ReplacedNode, now: u64, ) -> Result<SignedEnrollment>
Auto Trait Implementations§
impl Forget for NodeIdentity
impl Freeze for NodeIdentity
impl Move for NodeIdentity
impl RefUnwindSafe for NodeIdentity
impl Send for NodeIdentity
impl Sync for NodeIdentity
impl Unpin for NodeIdentity
impl UnsafeUnpin for NodeIdentity
impl UnwindSafe for NodeIdentity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more