Deserialize one entry bundle, refusing an unexpected schema.
(bundle: &pb::VersionedBytes)
| 82 | |
| 83 | /// Deserialize one entry bundle, refusing an unexpected schema. |
| 84 | fn 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. |
| 96 | fn intent_sources(bundle: &EntryBundle) -> crate::commands::intent::bridge::AttestationSources { |
no outgoing calls
no test coverage detected