Skip to main content

Module hosted_account

Module hosted_account 

Source
Expand description

Hosted-account record and mint state machine.

The mint path is intentionally split around the user signature:

  1. HostedAccountMint::begin consumes an already-allocated account name and generates a fresh per-account ES256 #atproto key.
  2. HostedAccountMint::seal_did_document builds the canonical DID document (B2/#1164) from that generated key, and HostedAccountMint::prepare_genesis binds the sealed artifact.
  3. The user signs PendingHostedAccountMint::signing_bytes with the required priority-zero Hybrid rotation key.
  4. PendingHostedAccountMint::seal verifies that signature before it can produce an AccountRecord.

A host never receives the user’s rotation private key. The generated ES256 private key is returned separately from the public account record so a caller can place it in the deployment’s secret store; it is never serialized into the record or genesis operation.

A2 (#1160) owns label allocation and never-reuse. A3 (#1162) owns deriving the host from the configured deployment zone. This module consumes the narrow seam between them as AllocatedAccountName and independently revalidates the permanent host-form DID before signing anything.

Structs§

AccountRecord
The public durable record locating a hosted account’s permanent genesis.
AllocatedAccountName
The output of the A2 allocation + A3 configured-zone seam.
DirectoryHostedAccountStore
Fail-closed filesystem persistence for newly minted hosted accounts.
HostedAccountMint
Mint state after label allocation and per-account ES256 generation.
PendingHostedAccountMint
Mint state waiting for the user-held priority-zero signature.
SealedHostedAccount
Fully sealed account artifacts ready for an atomic persistence boundary.

Constants§

ACCOUNT_RECORD_VERSION
Version of the durable hosted-account record.
ATPROTO_SIGNING_KEY_FILE
Secret account-specific P-256 key paired with the public #atproto verification method in the immutable account record and DID document.
DID_DOCUMENT_FILE
GENESIS_DID_OP_FILE

Functions§

is_hosted_account_staging_directory
Return whether name is an unpublished account-mint staging directory.