pub struct ControlPlane { /* private fields */ }Expand description
The Control Plane as this member holds it for one epoch.
A SPLIT epoch (the community carries a held control_pk) subscribes and
verifies by that address while decrypting under the community_root-derived
read key; its signer is present only when this member holds the epoch’s
control_root AND it derives to the held address (staff, fail-closed on a
corrupt secret). A LEGACY epoch is the concord/control derivation whole —
address, signer, and encryption in one key every member holds.
Implementations§
Source§impl ControlPlane
impl ControlPlane
Sourcepub fn of(community: &CommunityV2) -> ControlPlane
pub fn of(community: &CommunityV2) -> ControlPlane
The CURRENT epoch’s view of community’s Control Plane.
Sourcepub fn legacy(group: &GroupKey) -> ControlPlane
pub fn legacy(group: &GroupKey) -> ControlPlane
A whole legacy plane view from its single group key (tests, migrations).
Sourcepub fn pk(&self) -> PublicKey
pub fn pk(&self) -> PublicKey
The plane address — what authors filters and wrap-author checks match.
pub fn pk_hex(&self) -> String
Sourcepub fn signer_keys(&self) -> Option<&Keys>
pub fn signer_keys(&self) -> Option<&Keys>
The signer Keys when held (NIP-42 auth as the plane, staff only on a split epoch).
Sourcepub fn write_group(&self) -> Result<GroupKey, String>
pub fn write_group(&self) -> Result<GroupKey, String>
The WRITE group: address, signing secret, and read conv_key composed for
the seal/wrap builders. Errs when the epoch is split and this member does
not hold its control_root — publishing there would mint a wrap that
fails the plane’s signature check at every reader and relay.
Sourcepub fn open(
&self,
wrap: &Event,
) -> Result<(ParsedEdition, OpenedStream), ControlError>
pub fn open( &self, wrap: &Event, ) -> Result<(ParsedEdition, OpenedStream), ControlError>
Open a control wrap under this view — open_control_edition with the
split’s mandatory wrap-signature check on a restricted plane (CORD-01
Write-Restricted Streams: the signature IS the write gate there).
Trait Implementations§
Source§impl Clone for ControlPlane
impl Clone for ControlPlane
Source§fn clone(&self) -> ControlPlane
fn clone(&self) -> ControlPlane
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ControlPlane
impl RefUnwindSafe for ControlPlane
impl Send for ControlPlane
impl Sync for ControlPlane
impl Unpin for ControlPlane
impl UnsafeUnpin for ControlPlane
impl UnwindSafe for ControlPlane
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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