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:
- Validates the export envelope (structure + digest).
- Transforms each record into the import projection format.
- Assigns version IDs where the source did not provide them.
- 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