Expand description
The permanent genesis operation for a hyprstream-hosted did:web account.
This module deliberately implements only operation zero. Successor-chain validation, fork selection, and historical key-validity queries belong to C1 (#1167). The bytes emitted here are nevertheless the first record in that future log, so their grammar is a one-way door for every minted account.
§Rotation custody is structural
GenesisRotationKeys is not a Vec. It has exactly three ordered slots:
- a required
UserRotationKey; - an enrolled recovery key or an explicit
RecoveryKeyEnrollment::Declined; - an enrolled host key or an explicit
HostKeyEnrollment::Absent.
A HostRotationKey therefore cannot be passed as priority zero:
use hyprstream_pds::{
GenesisRotationKeys, HostKeyEnrollment, HostRotationKey,
RecoveryKeyEnrollment,
};
let _ = GenesisRotationKeys::new(
host,
RecoveryKeyEnrollment::Declined,
HostKeyEnrollment::Absent,
);The wire form preserves those slots as a fixed three-element
rotation_keys array. A declined/absent slot is encoded as a role-bearing
map whose key is null, so recovery absence is a signed decision rather
than an omitted field or decoder default.
§Hybrid pin
Rotation is not an atproto interoperability surface. Every rotation key and the genesis signature therefore consists of Ed25519 + ML-DSA-65, with both components required. There is no classical constructor or verification mode.
Structs§
- DidOp
Signature - The decomposed, context-bound composite signature stored in a
DidOp. - Genesis
DidOp - A sealed, self-signed genesis operation.
- Genesis
Rotation Keys - The only representable genesis rotation-key ordering.
- Host
Rotation Key - An optional host-held rotation key, representable only at priority two.
- Hybrid
Rotation Key - A pinned-Hybrid public key authorized to control a hosted account.
- Recovery
Rotation Key - A user-held recovery key kept on a device distinct from the primary key.
- Rotation
Slot Ref - A reference to one ordered genesis rotation slot.
- Unsigned
Genesis DidOp - Operation zero without its signature.
- User
Rotation Key - The required user-held key occupying genesis priority zero.
Enums§
- Genesis
Repo Head - The repo state deliberately recorded at genesis.
- Host
KeyEnrollment - Whether the deployment is enrolled as the lowest-priority rotation actor.
- Recovery
KeyEnrollment - The deliberate outcome of the recovery-key enrollment offer.
Constants§
- DID_
OP_ SIGNATURE_ CONTEXT - Domain-separation context bound into both signature components.
- DID_
OP_ VERSION - Version sealed into operation number zero.
Functions§
- sign_
genesis - Sign operation zero with the user-held priority-zero key.