Struct signed::MemberKeyRegistration
zaun_community_protocol::signed::MemberKeyRegistration · Struct
pub struct MemberKeyRegistration { … }Proves that the client holds the private key of the member key it registers. Signed by that key.
Fields
Section titled “Fields”purpose: Purpose
Section titled “purpose: Purpose”2: why the key is registered.
community_id: CommunityId
Section titled “community_id: CommunityId”3: the community.
host_id: HostId
Section titled “host_id: HostId”4: the host this registration is made to.
host_challenge: Challenge
Section titled “host_challenge: Challenge”5: from this connection’s latest session.welcome.
member_public_key: PublicKey
Section titled “member_public_key: PublicKey”6: the key being registered; the signer.
issued_at: u64
Section titled “issued_at: u64”7: ms since the epoch.
Methods
Section titled “Methods”verify_for_host
Section titled “verify_for_host”pub fn verify_for_host(signed: &SignedJson, member_public_key: &PublicKey, expected: &RegistrationExpectation, min_suite: u8) -> Result<Signed<Self>, RegistrationError>The host’s check: verifies under the command’s member_public_key (the signer,
supplied by the caller rather than read from the unverified bytes), then requires field
6 to be that key and fields 2–5 to match. Consuming the challenge is the caller’s job.
Errors
Section titled “Errors”RegistrationError for a bad signature, encoding or mismatch.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Decode, Encode, Eq, PartialEq, SignedObject, StructuralPartialEq