MCPcopy Create free account
hub / github.com/SethGammon/Citadel / attachIntegrity

Function attachIntegrity

core/telemetry/integrity.js:75–83  ·  view source on GitHub ↗
(record, options = {})

Source from the content-addressed store, hash-verified

73}
74
75function attachIntegrity(record, options = {}) {
76 const body = stripIntegrityFields(record);
77 const hashed = {
78 ...body,
79 _hash: hashRecord(body),
80 _hash_v: HASH_VERSION,
81 };
82 return signRecord(hashed, options);
83}
84
85function createEventId(record) {
86 return shortHash({

Callers 1

createIntegrityRecordFunction · 0.85

Calls 3

stripIntegrityFieldsFunction · 0.85
signRecordFunction · 0.85
hashRecordFunction · 0.70

Tested by

no test coverage detected