• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / catalyst-libs / 21003583286

14 Jan 2026 05:27PM UTC coverage: 70.193% (+0.4%) from 69.765%
21003583286

Pull #781

github

web-flow
Merge 5ca23108d into bfceceaed
Pull Request #781: chore(rust/signed-doc): `builder` module, providing corresponding builders for every document type

713 of 771 new or added lines in 45 files covered. (92.48%)

2 existing lines in 1 file now uncovered.

16536 of 23558 relevant lines covered (70.19%)

2311.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.59
/rust/signed_doc/src/builder/proposal_comment_form_template.rs
1
use crate::{
2
    CatalystSignedDocument, ContentEncoding, ContentType,
3
    builder::{Builder, ed25519::Ed25519SigningKey},
4
    catalyst_id::CatalystId,
5
    doc_types,
6
    uuid::UuidV7,
7
};
8

9
pub fn proposal_comment_form_template_doc(
12✔
10
    content: &serde_json::Value,
12✔
11
    parameters: &CatalystSignedDocument,
12✔
12
    sk: &Ed25519SigningKey,
12✔
13
    kid: CatalystId,
12✔
14
    id: Option<UuidV7>,
12✔
15
) -> anyhow::Result<CatalystSignedDocument> {
12✔
16
    let (id, ver) = id.map_or_else(
12✔
17
        || {
12✔
18
            let id = UuidV7::new();
12✔
19
            (id, id)
12✔
20
        },
12✔
NEW
21
        |v| (v, UuidV7::new()),
×
22
    );
23
    let parameters_ref = parameters.doc_ref()?;
12✔
24

25
    Builder::new()
12✔
26
        .with_json_metadata(serde_json::json!({
12✔
27
            "content-type": ContentType::SchemaJson,
12✔
28
            "content-encoding": ContentEncoding::Brotli,
12✔
29
            "type": doc_types::PROPOSAL_COMMENT_FORM_TEMPLATE.clone(),
12✔
30
            "id": id,
12✔
31
            "ver": ver,
12✔
32
            "parameters": [parameters_ref]
12✔
NEW
33
        }))?
×
34
        .with_json_content(content)?
12✔
35
        .add_signature(|m| sk.sign(&m), kid)?
12✔
36
        .build()
12✔
37
}
12✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc