1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 Wilder Management Inc. (d/b/a Wilder Robotics) <rob@wilder-robotics.com>
// pask-wire is licensed Apache-2.0. No commercial agreement is required to use,
// modify or redistribute it; see LICENSING.md in the workspace root.
//! The canonical example instance carried by the profile document.
//!
//! The example embedded in the Internet-Draft is emitted from this function,
//! never typed by hand. A test asserts the two are byte-identical, so a change
//! to the wire format that is not reflected in the document fails CI rather
//! than shipping.
//!
//! This exists because the `-00` revision embedded a hand-written figure that
//! used unquoted placeholders (`"sizeBytes": <int>`). It was a schema template
//! presented in a JSON code block, and it was never parseable JSON, so nothing
//! in the build could have caught the three attestation members that had
//! drifted away from the implementation.
use ;
use crate::;
/// Emits the canonical example instance, pretty-printed for the document.
///
/// The value is parsed and validated as a [`Payload`], re-serialized to its
/// JCS form, and then indented. Key order is JCS key order; indentation is two
/// spaces. The output is deterministic.
///
/// # Errors
///
/// Returns an error if the canonical test vector fails payload validation or
/// cannot be serialized — either of which is a defect in this crate.
/// Emits the canonical example instance for the 0.6 profile, pretty-printed.
///
/// Same construction as [`canonical_example`] but starts from the 0.5 minimal
/// vector with `spec` changed to `wilder.pser/0.6`. Uses
/// [`Payload::from_json_for_production`] so the `chain.hash` is recomputed
/// for the 0.6 JCS form rather than inherited from the 0.5 vector.
///
/// # Errors
///
/// Returns an error if the 0.6 payload fails validation (including the
/// timestamp containment check) or cannot be serialized.