causalHash

tcmts.store.causalHash · #aai7fz6s · term · runs on the server

uses tcmts.store.hash32, which uses node:crypto

A causal's hash: its namespace and its parents (in order of hash), nothing else.

import { hash32 } from "#codebase/tcmts/store";

export const causalHash = (namespace: string, parents: string[]) => hash32("tcm-causal-v1", JSON.stringify(["causal", namespace, [...new Set(parents)].sort()]))

uses

used by