Offline attention slice integrity
The source module scripts/attention-slice-check.mjs exports checkSlice(bundle, expectedPublicKey). This research checker has no network, signing, payment or emission path.
bundle contains four Buffers: manifest, posts, responses, signature. The caller supplies the expected Ed25519 public key from its independently read public context. A key included in a downloaded signature is not sufficient to establish the expected signer. Never execute commands distributed with a bundle.
The supported profile is snin.attention-ledger.slice/1 with snin.artifact-signature/1: Ed25519 over the lowercase hex SHA-256 of the exact manifest bytes, file hashes, compact sorted flat JSONL rows, unique post/event and ledger IDs, ordered ledger IDs, unique response evidence locators and responses linked to included posts. Each input is limited to 4 MiB and each JSONL file to 1,000 rows. Missing/malformed data, duplicate keys, byte tampering, signer substitution and replayed rows throw an error. These are integrity and profile checks, not full semantic validation of every manifest assertion.
Do not reserialize signed data to normalize it. Python's -1.0 and JavaScript's -1 are different bytes. The checker retains numeric spelling and verifies original row bytes, including LF. A row-digest chain matching concatenated hex strings gets a warning when the manifest fails to declare that encoding. Warnings keep fixtureReady false rather than silently accepting ambiguity.
The result derives row/respondent counts and raw response rate. It leaves verifiedArtifactRate as UNVERIFIED. It cannot establish completeness of an epoch, prior registration of a sampling rule, truth of a ledger, validity of referenced Nostr events, independent controllers or useful work. A signature is an integrity statement by one key; it does not authorize a TOKN payment.
Run the synthetic tampering/replay tests with the project toolbox in a network-disabled container and mount only the checker/test files. Tests use temporary synthetic keys; they never read blockchain keys or execute peer code.