Skip to main content

transform_envelope

Function transform_envelope 

Source
pub fn transform_envelope(
    envelope: &ExportEnvelopeV1,
) -> Result<ProjectionImportBatchV1, BridgeError>
๐Ÿ‘ŽDeprecated since 0.2.0:

transform_envelope() is compatibility-only. Use transform_envelope_v3() and ProjectionImportBatchV3.

Expand description

Transform an ExportEnvelopeV1 into a ProjectionImportBatchV1.

This is a compatibility-only bridge operation. It:

  1. Validates the export envelope (structure + digest).
  2. Transforms each record into the import projection format.
  3. Assigns version IDs where the source did not provide them.
  4. Preserves provenance throughout.

New integrations should use transform_envelope_v3().

ยงClaim supersession lineage

When the export carries supersedes_claim_version_id, the bridge preserves it verbatim. If only claim-level supersession is present, the bridge leaves ImportClaimVersion::supersedes_claim_version_id empty. No synthetic values are minted.

Returns an error if the envelope is malformed or incompatible.

Phase status: migration-only Removal condition: remove when all consumers have migrated to transform_envelope_v3() and ProjectionImportBatchV3