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

Function parse_entry_bundle

atomic-cli/src/commands/rpc.rs:84–93  ·  view source on GitHub ↗

Deserialize one entry bundle, refusing an unexpected schema.

(bundle: &pb::VersionedBytes)

Source from the content-addressed store, hash-verified

82
83/// Deserialize one entry bundle, refusing an unexpected schema.
84fn parse_entry_bundle(bundle: &pb::VersionedBytes) -> CliResult<EntryBundle> {
85 if bundle.schema != "atomic.vault.entry.bundle.v1" {
86 return Err(CliError::Internal(anyhow::anyhow!(
87 "unknown entry bundle schema '{}'",
88 bundle.schema
89 )));
90 }
91 serde_json::from_slice(&bundle.payload)
92 .map_err(|error| CliError::Internal(anyhow::anyhow!("entry bundle: {error}")))
93}
94
95/// The intent bridge's sources off one bundle.
96fn intent_sources(bundle: &EntryBundle) -> crate::commands::intent::bridge::AttestationSources {

Callers 1

print_attestation_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected