Application-layer TLSNotary toolkit: wraps the upstream tlsn-verifier Rust binary with replay protection, ReDoS-safe condition evaluation, server-identity matching, attestation freshness checks, and credential-leakage safeguards.
- The
tlsn-verifierbinary must be onPATHor built from upstreamtlsnotary/tlsn. The toolkit auto-detects the binary; if absent,validateTlsn()returnsavailable: false.
import {
validateTlsn,
evaluateCondition,
isTlsnVerifierAvailable,
isSuspiciousRegex,
type TlsnValidationResult,
} from "@anchr/tlsn-toolkit/tlsn-validation";
import {
validateNoCredentials,
SENSITIVE_HEADER_NAMES,
} from "@anchr/tlsn-toolkit/proof-redaction";- Replay protection — SHA-256 dedup of accepted presentations
- ReDoS-safe condition language —
contains/regex/jsonpathevaluators with catastrophic-backtracking guard - Server identity matching — verified server name vs target URL hostname
- Attestation freshness — configurable max-age policy on the verified timestamp
- Subprocess wrapper — invokes
tlsn-verifierwith timeout + stdin/stdout marshalling - Credential leakage guard —
validateNoCredentialsblocks Bearer/Basic/api_key patterns from being published
deno task testValidation tests use a mock verifier binary so they run without the real Rust crate built.
@anchr/core-runtime— forspawn, module-dir lookup, shared loggerTlsnAttestation/TlsnRequirement/TlsnVerifiedDataare exposed from this package itself at@anchr/tlsn-toolkit/tlsn-types.
MIT
{ "imports": { "@anchr/tlsn-toolkit": "jsr:@anchr/tlsn-toolkit@^0.1", "@anchr/core-runtime": "jsr:@anchr/core-runtime@^0.1" } }