pub struct UploadBundle {Show 23 fields
pub asset_id: Uuid,
pub album_id: Uuid,
pub crypto_suite_id: u16,
pub protocol_version: String,
pub amk_version: u32,
pub original: OriginalCiphertext,
pub ciphertext_hash: Hash32,
pub plaintext_size: u64,
pub chunk_size: u32,
pub content_type: String,
pub key_mode: KeyMode,
pub metadata_blob: Vec<u8>,
pub provenance_blob: Vec<u8>,
pub metadata_blob_hash: Option<Hash32>,
pub derivatives: Vec<DerivativeBlob>,
pub derivative_manifests: Vec<Vec<u8>>,
pub created_by_user: Uuid,
pub created_by_device: Uuid,
pub client_version: String,
pub timestamp: String,
pub action: Action,
pub prior_provenance_hash: Option<Hash32>,
pub retention_until: Option<String>,
}Expand description
Everything needed to push one managed asset: its identity, the re-derived original
ciphertext, the exact sealed metadata blob, any derivative blobs, and the manifest-envelope
projection fields the server validates. Carries no Workspace internals and no album key
material — the AMK never leaves the workspace. The one secret it holds is the original’s
per-file key, privately inside OriginalCiphertext, which can open that one file and
nothing else.
Every field maps one-for-one onto the upload protocol’s POST /upload body
(capsule_sdk::push owns that mapping).
Fields§
§asset_id: UuidThe asset id — equal to the manifest’s file_id.
album_id: UuidThe album the asset belongs to.
crypto_suite_id: u16The primitive bundle the manifest was produced under.
protocol_version: StringThe date-based wire protocol version the manifest is pinned to.
amk_version: u32The AMK epoch the asset is sealed under.
original: OriginalCiphertextThe original’s ciphertext, re-derived on demand from the plaintext on disk and the
manifest’s recorded nonce_prefix. It is never held whole: see OriginalCiphertext.
ciphertext_hash: Hash32The original ciphertext’s content address (equal to the manifest’s ciphertext_hash).
plaintext_size: u64Total plaintext byte length of the original.
chunk_size: u32Plaintext bytes per STREAM chunk.
content_type: StringThe original’s content_type as declared on the wire: the signed sidecar’s MIME
type when the upload protocol’s closed enum names it, otherwise the opaque
application/octet-stream (wire_content_type). The sidecar keeps the true type;
this is only what the server is told.
key_mode: KeyModeHow the file key is obtained (derived / wrapped).
metadata_blob: Vec<u8>The exact sealed metadata-blob wire bytes the manifest commits to.
provenance_blob: Vec<u8>The exact provenance-blob wire bytes: the canonical CBOR of the chain’s create
ProvenanceRecord, its genesis.
The records after it are not uploaded: they reach the server as lifecycle ops once it
has indexed this one.
This is the asset’s envelope object — the provenance blob of
provenance.md § Physical Storage,
stored by the server verbatim and served back unchanged on the sync feed. It is the
record and not the bare manifest because the server’s chain head is the SHA-256 of these
bytes, while a client’s next prior_provenance_hash is record_hash() — the digest of
the canonical record — so no other encoding lets a later lifecycle op chain onto what
this upload established. The manifest travels inside it, canonically encoded and
therefore byte-identical to its own signed bytes: “the signed bytes are the served
bytes” holds through the wrapper.
Always present, unlike metadata_blob_hash: a managed asset
always has a create record, even when it binds no metadata blob.
metadata_blob_hash: Option<Hash32>The content address of the sealed metadata blob, when the create binds one.
derivatives: Vec<DerivativeBlob>The asset’s derivative blobs, if any were generated and persisted.
derivative_manifests: Vec<Vec<u8>>The exact derivative_manifest-blob wire bytes: the canonical CBOR of each signed
[DerivativeManifest] a receiver needs to open this bundle’s derivative tiers (#556).
One per shipped DerivativeBlob, plus one per format = "original" sentinel tier,
which has no blob of its own and is only this manifest: without it a receiver could
not tell “this tier is the original” from “this tier is missing”. In the order the
library recorded them. A manifest whose derivative is skipped is skipped with it, so
nothing here names a blob the bundle does not carry.
Signed CBOR, not ciphertext: like Self::provenance_blob it is deliberately
server-visible (it holds no plaintext secret by construction), and it is served back
unchanged so the receiver verifies the bytes the producer signed.
created_by_user: UuidThe authoring user.
created_by_device: UuidThe authoring device.
client_version: StringThe exact client build that authored the create manifest.
timestamp: StringRFC3339 authoring timestamp of the create manifest.
action: ActionThe create manifest’s lifecycle action: create.
prior_provenance_hash: Option<Hash32>The create manifest’s prior-provenance link: null, as for every create.
retention_until: Option<String>The create manifest’s retention floor: unset, as it is set only for delete.
Implementations§
Source§impl UploadBundle
impl UploadBundle
Sourcepub fn ciphertext_size(&self) -> u64
pub fn ciphertext_size(&self) -> u64
The original ciphertext’s size in bytes — what POST /upload declares as size for
the original blob.
Trait Implementations§
Source§impl Clone for UploadBundle
impl Clone for UploadBundle
Source§fn clone(&self) -> UploadBundle
fn clone(&self) -> UploadBundle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for UploadBundle
impl RefUnwindSafe for UploadBundle
impl Send for UploadBundle
impl Sync for UploadBundle
impl Unpin for UploadBundle
impl UnsafeUnpin for UploadBundle
impl UnwindSafe for UploadBundle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more