Skip to main content

Store

Struct Store 

Source
pub struct Store { /* private fields */ }

Implementations§

Source§

impl Store

Source

pub fn activate_owner_handoff( &mut self, credential: &str, id: &str, ) -> Result<SignedState>

Trusted local-owner activation. All imported decisions, the durable key reference and accepted handoff commit together. No source process is used.

Source§

impl Store

Source

pub fn start_owner_preparation( &mut self, credential: &str, id: Uuid, successor: &str, ) -> Result<Value>

Prepare streams and collect readiness only. This never stops signing; issuing a handoff remains a separate explicitly authorized local action.

Source

pub fn owner_preparation_status( &self, credential: &str, id: Uuid, ) -> Result<Value>

Source§

impl Store

Source

pub fn owner_handoff_manifest( &self, credential: &str, id: &str, ) -> Result<Manifest>

Owner-only private export. Contains decision summaries, never signing keys.

Source

pub fn owner_handoff_page( &self, credential: &str, id: &str, index: usize, ) -> Result<Vec<u8>>

Source

pub fn begin_owner_handoff_import( &mut self, credential: &str, id: &str, authorization: &SignedOwnerTransition, manifest: &Manifest, ) -> Result<Value>

Source

pub fn import_owner_handoff_page( &mut self, credential: &str, id: &str, index: usize, body: &[u8], ) -> Result<Value>

Source

pub fn owner_handoff_import_status( &self, credential: &str, id: &str, ) -> Result<Value>

Source§

impl Store

Source

pub fn owner_handoff_readiness( &mut self, credential: &str, id: &str, ) -> Result<SignedReadiness>

Signs only after checking the successor’s protected key, installed streams, durable reader confirmations and local bidirectional data links.

Source

pub fn record_owner_readiness( &mut self, credential: &str, candidate: &SignedOwnerCandidate, report: &SignedReadiness, ) -> Result<()>

Records evidence on the source without freezing it. New authorization verifies the same evidence again at the decision’s current checkpoint.

Source§

impl Store

Source

pub fn prepare_owner_configuration( &self, credential: &str, candidate_id: &str, request: Uuid, peer: (&str, &[u8]), ) -> Result<ConfigurationPreparation>

Source

pub fn authorize_owner_configuration( &mut self, credential: &str, preparation: &ConfigurationPreparation, ) -> Result<SignedConfigurationGrant>

Authorize one exact Welcome durably. Once a handoff is issued only already committed authorizations may be returned; no new grant is signed.

Source

pub fn install_owner_configuration( &self, credential: &str, request: Uuid, grant: &SignedConfigurationGrant, ) -> Result<ConfigurationInvitation>

Source

pub fn receive_owner_configuration( &self, credential: &str, invitation: &ConfigurationInvitation, ) -> Result<Receipt>

The receipt proves this reader installed the exact origin durably. It proves transport readiness only, never acceptance of an owner handoff.

Source

pub fn confirm_owner_configuration( &self, credential: &str, receipt: &Receipt, ) -> Result<()>

Source§

impl Store

Source

pub fn prepare_owner_handoff( &mut self, credential: &str, id: &str, ) -> Result<SignedOwnerCandidate>

Local-owner preparation API for the future handoff coordinator. No MCP operation invokes it, and it changes no active signing authority.

Source

pub fn authorize_owner_handoff( &mut self, credential: &str, candidate: &SignedOwnerCandidate, ) -> Result<SignedOwnerTransition>

Irrevocable once returned or committed: no timeout clears this fence. The coordinator must finish activation, never resume the old writer.

Source

pub fn accept_owner_handoff( &mut self, credential: &str, id: &str, authorization: &SignedOwnerTransition, ) -> Result<SignedState>

Save the successor’s signature without installing its key or activating the state. Retries preserve the same result, including after expiry.

Source§

impl Store

Source

pub fn queue_owner_handoff_delivery( &self, credential: &str, id: &str, ) -> Result<Value>

Trusted local owner API; no remote request can initiate a signing stop.

Source§

impl Store

Source

pub fn create_invitation( &mut self, credential: &str, request: &str, can_configure: bool, continuation: Option<&str>, ) -> Result<Zeroizing<Vec<u8>>>

Owner-only local API. The returned bytes are for protected transfer, never an MCP response or a public account-service request.

Source

pub fn create_invitation_with_replacement( &mut self, credential: &str, request: &str, can_configure: bool, continuation: Option<&str>, replace_node: Option<&str>, ) -> Result<Zeroizing<Vec<u8>>>

Source

pub fn activate_invitation(&mut self, credential: &str, id: &str) -> Result<()>

Called after the account service confirms the exact persisted draft. The activation itself does not make an account or cryptographic member.

Source

pub fn revoke_invitation(&mut self, credential: &str, id: &str) -> Result<()>

Source

pub fn begin_invitation( &mut self, id: &str, hello: &Hello, ) -> Result<(PendingSession, Vec<u8>)>

Source

pub fn invitation_attempt_seen(&self, id: &str, attempt: &str) -> Result<bool>

Scheduling hint only. Admission rechecks under the invitation lock and commits the ID before releasing a handshake response. A lost in-memory session must never be reconstructed from an already admitted Hello.

Source

pub fn accept_invitation( &mut self, pending: PendingSession, frames: &[Vec<u8>], ) -> Result<Session>

Source

pub fn invitation_call( &mut self, session: &mut Session, frames: &[Vec<u8>], ) -> Result<Vec<Vec<u8>>>

Source§

impl Store

Install a previously authenticated pair of two-node directional streams.

Source§

impl Store

Source

pub fn prepare_configuration_proposal(&self, id: &str) -> Result<Commit>

Reapply a retained edit against the current committed authority. Calling this again at the same head returns identical ciphertext. A changed head creates a new candidate with the same operation ID and salted intent. The transport checks for an existing service receipt before calling this.

Source§

impl Store

Source

pub fn pending_configuration_proposals(&self) -> Result<Vec<String>>

Source

pub fn configuration_proposal_intent( &self, id: &str, ) -> Result<Option<[u8; 32]>>

Source

pub fn prepare_configuration_log( &mut self, credential: &str, ) -> Result<Bootstrap>

Trusted local administration, not an MCP operation. The runtime must finish migration acceptance before exposing this through the CLI.

Source

pub fn configuration_log_head(&self) -> Result<Option<Head>>

Source

pub fn configuration_log_migration(&self) -> Result<Option<Commit>>

Source

pub fn accept_configuration_commit( &mut self, commit: &Commit, ) -> Result<Receipt>

Called with bytes fetched from the authenticated ordering service. A locally prepared proposal is never passed here before service commitment.

Source§

impl Store

Source

pub fn require_provisioning_owner(&self) -> Result<()>

Called by offline owner provisioning while holding daemon.lock. Service registration cannot turn a joined node into a cryptographic owner.

Source

pub fn require_provisioning_member(&self) -> Result<()>

Source

pub fn require_provisioning_joined(&self) -> Result<()>

Source

pub fn require_service_setup_role(&self, originally_owner: bool) -> Result<()>

Service setup records describe enrollment history. A signed handoff can change the configuration writer without changing account ownership or removing either node’s relay access.

Source

pub fn open(home: &Path) -> Result<Self>

Source

pub fn handle(&mut self, request: Request) -> Response

Source

pub fn maintain(&mut self) -> Result<()>

The owner daemon renews its lease without requiring a chat turn. Chat RPCs never bypass expiry or trigger a renewal themselves.

Source

pub fn install_joined( home: &Path, node: &NodeIdentity, state: &VerifiedState, ) -> Result<()>

Trusted enrollment API. The supplied authority must already be verified through protected pairing. It installs no owner signing secret.

Auto Trait Implementations§

§

impl !Freeze for Store

§

impl !RefUnwindSafe for Store

§

impl !Sync for Store

§

impl !UnwindSafe for Store

§

impl Forget for Store

§

impl Move for Store

§

impl Send for Store
where Connection: Send, RefCell<VecDeque<(HelperOffer, RangeInclusive<i64>)>>: Send, Weak<Direct>: Send, RawVecInner: Send, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send, NodeRef<Owned, String, RelayGrant, LeafOrInternal>: Send, BoxRaw<(String, RelayGrant)>: Send, NodeRef<Owned, String, AdminGrant, LeafOrInternal>: Send, BoxRaw<(String, AdminGrant)>: Send, NodeRef<Owned, String, GroupAdminGrant, LeafOrInternal>: Send, BoxRaw<(String, GroupAdminGrant)>: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, NodeRef<Owned, String, NodeMember, LeafOrInternal>: Send, BoxRaw<(String, NodeMember)>: Send, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send, BoxRaw<(String, SetValZST)>: Send, NodeRef<Owned, [u8; 32], SetValZST, LeafOrInternal>: Send, BoxRaw<([u8; 32], SetValZST)>: Send, Arc<Notify>: Send, Arc<Health>: Send,

§

impl Unpin for Store
where *mut sqlite3: Unpin, Arc<Mutex<*mut sqlite3>>: Unpin, *const u8 is !null: Unpin, *const Node<Arc<str>, RawStatement> is !null: Unpin, Arc<Url>: Unpin, *const ArcInner<Direct> is !null: Unpin, *const LeafNode<String, Vec<String>> is !null: Unpin, Box<(String, Vec<String>)>: Unpin, *const LeafNode<String, RelayGrant> is !null: Unpin, Box<(String, RelayGrant)>: Unpin, *const LeafNode<String, AdminGrant> is !null: Unpin, Box<(String, AdminGrant)>: Unpin, *const LeafNode<String, GroupAdminGrant> is !null: Unpin, Box<(String, GroupAdminGrant)>: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, *const LeafNode<String, NodeMember> is !null: Unpin, Box<(String, NodeMember)>: Unpin, *const LeafNode<String, SetValZST> is !null: Unpin, Box<(String, SetValZST)>: Unpin, *const LeafNode<[u8; 32], SetValZST> is !null: Unpin, Box<([u8; 32], SetValZST)>: Unpin, Arc<Notify>: Unpin, Arc<Health>: Unpin,

§

impl UnsafeUnpin for Store
where *mut sqlite3: UnsafeUnpin, *const ArcInner<Mutex<*mut sqlite3>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<*mut sqlite3>>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<NonNull<Node<Arc<str>, RawStatement>>>: UnsafeUnpin, *const Node<Arc<str>, RawStatement> is !null: UnsafeUnpin, PhantomData<(HelperOffer, RangeInclusive<i64>)>: UnsafeUnpin, *const ArcInner<Direct> is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Rule>: UnsafeUnpin, *const LeafNode<String, Vec<String>> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, Vec<String>)>>: UnsafeUnpin, *const LeafNode<String, RelayGrant> is !null: UnsafeUnpin, PhantomData<Box<(String, RelayGrant)>>: UnsafeUnpin, *const LeafNode<String, AdminGrant> is !null: UnsafeUnpin, PhantomData<Box<(String, AdminGrant)>>: UnsafeUnpin, *const LeafNode<String, GroupAdminGrant> is !null: UnsafeUnpin, PhantomData<Box<(String, GroupAdminGrant)>>: UnsafeUnpin, *const LeafNode<String, Value> is !null: UnsafeUnpin, PhantomData<Box<(String, Value)>>: UnsafeUnpin, PhantomData<SignedOwnerTransition>: UnsafeUnpin, *const LeafNode<String, NodeMember> is !null: UnsafeUnpin, PhantomData<Box<(String, NodeMember)>>: UnsafeUnpin, *const LeafNode<String, SetValZST> is !null: UnsafeUnpin, PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin, *const LeafNode<[u8; 32], SetValZST> is !null: UnsafeUnpin, PhantomData<Box<([u8; 32], SetValZST)>>: UnsafeUnpin, *const ArcInner<Notify> is !null: UnsafeUnpin, PhantomData<ArcInner<Notify>>: UnsafeUnpin, *const ArcInner<Health> is !null: UnsafeUnpin, PhantomData<ArcInner<Health>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more