pub struct HostedAccountMint { /* private fields */ }Expand description
Mint state after label allocation and per-account ES256 generation.
This type is deliberately neither Clone nor Debug: it owns secret key
material.
Implementations§
Source§impl HostedAccountMint
impl HostedAccountMint
Sourcepub fn begin(
name: AllocatedAccountName,
rotations: GenesisRotationKeys,
) -> Result<Self>
pub fn begin( name: AllocatedAccountName, rotations: GenesisRotationKeys, ) -> Result<Self>
Begin minting. A user-held priority-zero key is mandatory in
rotations; there is no overload that omits it.
Sourcepub fn atproto_verifying_key(&self) -> AtprotoVerifyingKey
pub fn atproto_verifying_key(&self) -> AtprotoVerifyingKey
The generated account-specific #atproto key used by B2 to build the
canonical DID document before genesis is signed.
Sourcepub fn seal_did_document(
&self,
pds_endpoint: &str,
) -> Result<SealedHostedDidDocument>
pub fn seal_did_document( &self, pds_endpoint: &str, ) -> Result<SealedHostedDidDocument>
Build the canonical DID document from this mint’s DID and generated
account-specific #atproto key.
Sourcepub fn prepare_genesis(
self,
did_document: SealedHostedDidDocument,
head_at_op: GenesisRepoHead,
) -> Result<PendingHostedAccountMint>
pub fn prepare_genesis( self, did_document: SealedHostedDidDocument, head_at_op: GenesisRepoHead, ) -> Result<PendingHostedAccountMint>
Bind the sealed DID document and deliberate genesis repo-head state.
Accepting the artifact instead of a free-form CID makes DID/key substitution unrepresentable at this boundary.
Sourcepub fn prepare_pds_genesis(
self,
did_document: SealedHostedDidDocument,
rev: Tid,
) -> Result<(PendingHostedAccountMint, HostedRepoGenesis)>
pub fn prepare_pds_genesis( self, did_document: SealedHostedDidDocument, rev: Tid, ) -> Result<(PendingHostedAccountMint, HostedRepoGenesis)>
Create and sign the account’s empty initial repo, then bind that commit CID into the hosted DID’s genesis operation.
The generated #atproto key never crosses this boundary: it signs the
repo commit in place and remains owned by the pending account mint.
Auto Trait Implementations§
impl Freeze for HostedAccountMint
impl RefUnwindSafe for HostedAccountMint
impl Send for HostedAccountMint
impl Sync for HostedAccountMint
impl Unpin for HostedAccountMint
impl UnsafeUnpin for HostedAccountMint
impl UnwindSafe for HostedAccountMint
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
§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>
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