Skip to content

buildAltaRecord

buildAltaRecord(input): RegistroAlta

Defined in: src/records.ts:88

Builds a registro de alta, formatting every value exactly once and hashing the resulting literals. The returned record is complete and ready to serialise — the same strings go into the XML and went into the hash, which is the property AEAT’s recomputation depends on.

The Huella: "" placeholder a few lines down (and its anulación counterpart below) is mutation-tested as equivalent, not merely untested: it exists only so record type-checks as a complete RegistroAlta before hashing, is never read by computeHuella (which hashes Encadenamiento’s PREDECESSOR huella, never the record’s own — see huella.test.ts’s “ignores the record’s own Huella field”), and is unconditionally overwritten by the later Huella: computeHuella(record) key in the object spread below. No value the placeholder could hold is ever observable, so no test can kill a mutant of its literal.

AltaInput

RegistroAlta