Skip to main content

verify_provider_stream

Function verify_provider_stream 

Source
pub fn verify_provider_stream(
    frame: &Value,
    state: &StreamState,
    profile: Profile,
) -> Result<(VerifiedStreamFrame, StreamState), FrameError>
Expand description

Verifies a provider’s received stream frame against its stream’s state, and returns the frame and the stream’s next state. Before the provider’s first frame the state holds no provider key, so a frame without one is out of order. The first frame’s signer is the key id of the key it carries and the STREAM_OPEN’s target, with seq 0; later frames verify with that key, name that signer and carry no key.