pub struct PortalStore { /* private fields */ }Expand description
In-memory portal store used by the server relay and tests.
Implementations§
Source§impl PortalStore
impl PortalStore
Sourcepub fn new(config: GenesisCeremonyConfig) -> Self
pub fn new(config: GenesisCeremonyConfig) -> Self
Construct an empty portal store for a ceremony.
Sourcepub fn envelope_count(&self) -> usize
pub fn envelope_count(&self) -> usize
Number of accepted relay envelopes.
Sourcepub fn query(
&self,
phase: Option<CeremonyPhase>,
payload_kind: Option<CeremonyPayloadKind>,
recipient_did: Option<&Did>,
) -> Vec<CeremonyEnvelope>
pub fn query( &self, phase: Option<CeremonyPhase>, payload_kind: Option<CeremonyPayloadKind>, recipient_did: Option<&Did>, ) -> Vec<CeremonyEnvelope>
Return accepted envelopes matching all of the supplied filters; a None
filter matches any value. Envelopes are relay data — already signed and
(for round two) encrypted — so returning them to rostered participants is
the read half of the relay, used to collect round-one packages, pull
recipient-bound round-two packages, and gather signing commitments/shares.
Sourcepub fn submit(&mut self, envelope: CeremonyEnvelope) -> Result<Hash256>
pub fn submit(&mut self, envelope: CeremonyEnvelope) -> Result<Hash256>
Submit a signed envelope to the relay.
Sourcepub fn dkg_transcript_hash(&self) -> Result<Hash256>
pub fn dkg_transcript_hash(&self) -> Result<Hash256>
Canonical hash over the complete accepted DKG relay transcript.
Sourcepub fn final_transcript_hash(&self) -> Result<Hash256>
pub fn final_transcript_hash(&self) -> Result<Hash256>
Canonical final ceremony transcript hash, including all accepted final key confirmation envelopes. This is the transcript hash root artifacts must bind before root signing begins.