pub struct DerivativeContext<'a> {
pub source_asset_id: Uuid,
pub crypto_suite_id: u16,
pub protocol_version: String,
pub amk_version: AmkVersion,
pub generated_by_device: Uuid,
pub generated_by_client: String,
pub generated_at: String,
pub device_signer: &'a dyn Signer,
pub write_tier_signer: &'a dyn Signer,
pub sealer: &'a dyn DerivativeSealer,
pub prior_heads: &'a HashMap<DerivativeRole, Hash32>,
pub original: SealedDerivative,
}Expand description
Everything the manifest signer needs that the pixels do not carry: the asset identity, the epoch/authorisation context, and the two signing keys that produce the manifest’s two hybrid signatures.
Fields§
§source_asset_id: UuidThe asset the derivatives are generated from.
crypto_suite_id: u16Primitive bundle in force.
protocol_version: StringDate-based wire protocol version (matches the album pin).
amk_version: AmkVersionThe AMK epoch whose write-tier key signs the manifests.
generated_by_device: UuidDevice that generated the derivatives.
generated_by_client: StringGenerating client version string.
generated_at: StringRFC 3339 generation time (audit-only).
device_signer: &'a dyn SignerThe device DSK (provenance signature); may be hardware-backed.
write_tier_signer: &'a dyn SignerThe per-epoch write-tier key (authorisation signature).
sealer: &'a dyn DerivativeSealerEncrypts each generated derivative so its manifest can commit to the ciphertext.
prior_heads: &'a HashMap<DerivativeRole, Hash32>The current head of each role’s derivative chain, when this asset already has one.
A HashMap rather than a BTreeMap because DerivativeRole derives Hash + Eq and
not Ord, and adding Ord to a signed wire type to key a lookup would be the tail
wagging the dog. Iteration order never escapes this map — it is only ever queried by
key — so the non-determinism a HashMap would otherwise introduce cannot reach the
signed bytes.
A role’s manifests are append-only across time, not merely within one call: a backfill that adds the AVIF variant to an asset that already has a JXL thumbnail extends that role’s chain rather than starting a second one. Empty on a create, which is why the import path passes an empty map; a regeneration reads it off the persisted bundle.
original: SealedDerivativeWhat the original’s own manifest committed to. The original sentinel generates no
bytes and encrypts nothing: it is a reference to the original blob, so it signs the
original’s ciphertext address and the original’s nonce prefix, and a receiver resolves it
against the blob it already has.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DerivativeContext<'a>
impl<'a> !Send for DerivativeContext<'a>
impl<'a> !Sync for DerivativeContext<'a>
impl<'a> !UnwindSafe for DerivativeContext<'a>
impl<'a> Freeze for DerivativeContext<'a>
impl<'a> Unpin for DerivativeContext<'a>
impl<'a> UnsafeUnpin for DerivativeContext<'a>
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
§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