Struct signed::HostSessionProof
zaun_community_protocol::signed::HostSessionProof · Struct
pub struct HostSessionProof { … }The host’s proof of key possession in session.welcome. Signed by the host key.
Fields
Section titled “Fields”host_id: HostId
Section titled “host_id: HostId”2: the host.
client_nonce: Nonce
Section titled “client_nonce: Nonce”3: from session.hello.
host_challenge: Challenge
Section titled “host_challenge: Challenge”4: the challenge sent in this welcome.
community_id: Option<CommunityId>
Section titled “community_id: Option<CommunityId>”5: the bound or requested community.
delegation_epoch: Option<u64>
Section titled “delegation_epoch: Option<u64>”6: the epoch the host operates under for field 5.
issued_at: u64
Section titled “issued_at: u64”7: ms since the epoch.
Methods
Section titled “Methods”verify_for_client
Section titled “verify_for_client”pub fn verify_for_client(signed: &SignedJson, host_public_key: &PublicKey, client_nonce: &Nonce, pair: Option<&ValidPair>) -> Result<Signed<Self>, SessionProofError>The client’s check: verifies under host_public_key, requires host_id to
derive from it and client_nonce to be the client’s fresh nonce. When a community is
named, pair must be a (descriptor, delegation) pair already validated by
super::validate_pair for that community, delegating to this host_id under this
epoch; its min_suite then applies to the proof’s signature.
Errors
Section titled “Errors”SessionProofError for a bad signature, encoding or mismatch.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Decode, Encode, Eq, PartialEq, SignedObject, StructuralPartialEq