Skip to main content

parse_signed_note_c2sp

Function parse_signed_note_c2sp 

Source
pub fn parse_signed_note_c2sp(
    note: &str,
) -> Result<(String, Vec<C2spSignature>), TransparencyError>
Expand description

Parse a signed note whose signatures use the standard C2SP wire layout.

Returns the note body (ending in \n, byte-identical to crate::checkpoint::Checkpoint::to_note_body) and each signature as a C2spSignature (key_id[4] || signature, no algorithm byte). Use this for external logs (Sigstore Rekor) and C2SP witnesses; use parse_signed_note for auths’ own alg-byte-prefixed checkpoints.

Args:

  • note — The full signed-note text.

Usage:

let (body, sigs) = parse_signed_note_c2sp(rekor_checkpoint)?;