IFClite TypeScript API
    Preparing search index...

    Function createIdentityMapSidecar

    • Build a sidecar, sorting and de-duplicating the entries.

      Sorting makes the artifact stable: the same comparison writes the same bytes, so a checked-in sidecar produces an empty git diff when nothing changed. De-duplication is by (base, here) — the identical claim arriving twice is not a conflict.

      Two different claims are handled by side, because the two conflicts are not the same kind of thing:

      • Two heres on one base stay in. That document is not self-contradictory against every pair of files: one of the two head entities may have been deleted since, leaving a single live claim that is simply true. resolveKeyAliases knows the models and adjudicates it (rule 4); resolving it here would hide a fault the consumer can actually judge.
      • Two bases on one here is refused outright by validateIdentityMapSidecar, so this throws. See that function.

      Parameters

      Returns IdentityMapSidecar

      if the result is not a valid sidecar.