MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / binding_tree_entries

Function binding_tree_entries

atomic-repository/src/git_binding/privacy.rs:54–63  ·  view source on GitHub ↗

The exact Git-safe blobs of one binding publication, in tree order. Every byte here comes from an allowlisted, separately signed or hash-bound field. Nothing else may be added to a binding tree.

(
    binding: &super::codec::GitStateBinding,
    summary: Option<&super::summary::SignedAttestationSummary>,
)

Source from the content-addressed store, hash-verified

52/// Every byte here comes from an allowlisted, separately signed or
53/// hash-bound field. Nothing else may be added to a binding tree.
54pub fn binding_tree_entries(
55 binding: &super::codec::GitStateBinding,
56 summary: Option<&super::summary::SignedAttestationSummary>,
57) -> Result<Vec<(&'static str, Vec<u8>)>, BindingTreeError> {
58 let mut entries = vec![(BINDING_BLOB_NAME, binding.encode())];
59 if let Some(summary) = summary {
60 entries.push((ATTESTATION_SUMMARY_BLOB_NAME, summary.encode()));
61 }
62 Ok(entries)
63}
64
65/// Select the change objects allowed into the optional `changes.pack`.
66///

Callers 1

create_binding_commitMethod · 0.85

Calls 2

pushMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected