pub struct ConnectionIdentifier {
pub version: u8,
pub front_door_did: String,
pub identity_pubkey_hex: String,
pub wireguard_pubkey_hex: String,
pub overlay_addr: String,
pub rendezvous: Vec<RendezvousHint>,
pub relation_type: String,
pub display_name: String,
pub created_at: u64,
pub expires_at: u64,
pub nonce: String,
pub signature_hex: String,
}Expand description
The universal, self-certifying connection payload.
Fields§
§version: u8§front_door_did: StringThe peer’s front-door DID (identifier, not identity).
identity_pubkey_hex: Stringed25519 identity public key (hex) — verifies signature_hex.
wireguard_pubkey_hex: StringWireGuard public key (hex) — the peering material.
overlay_addr: StringDerived overlay address (CGA-like, from the WireGuard pubkey).
rendezvous: Vec<RendezvousHint>Ordered rendezvous hints (domain, edge, nym, relay, libp2p…).
relation_type: StringProposed relationship type (spc:relationType id) — the agreement seed.
display_name: String§created_at: u64§expires_at: u640 = no expiry.
nonce: StringSingle-use nonce (anti-replay).
signature_hex: Stringed25519 signature (hex) over signing_payload.
Implementations§
Source§impl ConnectionIdentifier
impl ConnectionIdentifier
Sourcepub fn signing_payload(&self) -> Vec<u8> ⓘ
pub fn signing_payload(&self) -> Vec<u8> ⓘ
The canonical bytes the signature covers (everything except the signature itself).
Sourcepub fn sign(&mut self, key: &SigningKey)
pub fn sign(&mut self, key: &SigningKey)
Sign the identifier with the ed25519 identity key (sets identity_pubkey_hex + signature_hex).
Sourcepub fn verify(&self) -> Result<(), String>
pub fn verify(&self) -> Result<(), String>
Verify the self-certifying signature. Does not check expiry (see is_expired).
pub fn is_expired(&self, now_unix: u64) -> bool
Trait Implementations§
Source§impl Clone for ConnectionIdentifier
impl Clone for ConnectionIdentifier
Source§fn clone(&self) -> ConnectionIdentifier
fn clone(&self) -> ConnectionIdentifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionIdentifier
impl Debug for ConnectionIdentifier
Source§impl<'de> Deserialize<'de> for ConnectionIdentifier
impl<'de> Deserialize<'de> for ConnectionIdentifier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConnectionIdentifier
impl PartialEq for ConnectionIdentifier
Source§fn eq(&self, other: &ConnectionIdentifier) -> bool
fn eq(&self, other: &ConnectionIdentifier) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ConnectionIdentifier
impl Serialize for ConnectionIdentifier
impl StructuralPartialEq for ConnectionIdentifier
Auto Trait Implementations§
impl Freeze for ConnectionIdentifier
impl RefUnwindSafe for ConnectionIdentifier
impl Send for ConnectionIdentifier
impl Sync for ConnectionIdentifier
impl Unpin for ConnectionIdentifier
impl UnsafeUnpin for ConnectionIdentifier
impl UnwindSafe for ConnectionIdentifier
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more