Sample
@types/node 26.2.0
Verified sample for npm @types/node 26.2.0. The contract ran on node 22 · linux alpine/x64 · docker and passed: package manifest specifies index.d.ts type…
sha256:6e22e3c0ddf09387c2d23538166fdc38ead45d3a2e928e842dd7b8dc903d5047
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux 24 · ubuntu · glibc 2.39 x64 npm
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-23 |
Case
HOW- Goal
- verify pkg:npm/%40types/node@26.2.0
- Packages
- Created
- 2026-08-23T05:54:10Z
Contract
- package manifest specifies index.d.ts type declarations, TypeScript version, and dependencies
- root index.d.ts references essential Node.js module declaration files
- declares node:events EventEmitter class, EventEmitterOptions, and EventEmitterEventMap interfaces
- declares node:fs functions, Stats, Dirent, and node:fs/promises module
- declares node:stream Stream, Readable, Writable, Duplex, and Transform classes
- declares node:sqlite DatabaseSyncOptions interface, DatabaseSync class, and StatementSync class
- declares node:crypto createHash and randomBytes functions
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Source
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:npm/%40types/node@26.2.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40types/node@26.2.0
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:11603929e06cb1eda3e2158b827ff2d8e567a9f65b174c267fe11b176cb33fa3","contract":["package manifest specifies index.d.ts type declarations, TypeScript version, and dependencies","root index.d.ts references essential Node.js module declaration files","declares node:events EventEmitter class, EventEmitterOptions, and EventEmitterEventMap interfaces","declares node:fs functions, Stats, Dirent, and node:fs/promises module","declares node:stream Stream, Readable, Writable, Duplex, and Transform classes","declares node:sqlite DatabaseSyncOptions interface, DatabaseSync class, and StatementSync class","declares node:crypto createHash and randomBytes functions"],"goal":"verify pkg:npm/%40types/node@26.2.0","kind":"HOW","packages":["pkg:npm/%40types/node@26.2.0"],"schemaVersion":1},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40types/node@26.2.0"],"schemaVersion":1,"subject":"pkg:npm/%40types/node@26.2.0","verifierAdapter":"node-typescript@1"}
{
"name": "sample-types-node",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-types-node",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@types/node": "26.2.0"
}
},
"node_modules/@types/node": {
"version": "26.2.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.2.0.tgz",
"integrity": "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==",
"license": "MIT",
"dependencies": {
"undici-types": "~8.3.0"
}
},
"node_modules/undici-types": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
"license": "MIT"
}
}
}
{
"name": "sample-types-node",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT-0",
"dependencies": {
"@types/node": "26.2.0"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/%40types/node@26.2.0",
"kind": "HOW",
"packages": [
"pkg:npm/%40types/node@26.2.0"
]
}
import assert from 'node:assert/strict';
import { createRequire } from 'node:module';
import fs from 'node:fs';
import path from 'node:path';
const require = createRequire(import.meta.url);
// 1. Resolve @types/node package manifest and verify type declaration entry points
const pkgPath = require.resolve('@types/node/package.json');
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
assert.equal(pkg.name, '@types/node', 'Package name must be @types/node');
assert.equal(pkg.version, '26.2.0', 'Package version must be 26.2.0');
assert.equal(pkg.types, 'index.d.ts', 'Package types entry must point to index.d.ts');
assert.equal(pkg.typeScriptVersion, '5.6', 'TypeScript version must be 5.6');
assert.equal(typeof pkg.dependencies?.['undici-types'], 'string', 'Must depend on undici-types');
assert.ok(pkg.typesVersions?.['<=5.6']?.['*'], 'typesVersions <=5.6 mapping must be present');
assert.ok(pkg.typesVersions?.['<=5.7']?.['*'], 'typesVersions <=5.7 mapping must be present');
const typesDir = path.dirname(pkgPath);
const indexDts = fs.readFileSync(path.join(typesDir, 'index.d.ts'), 'utf8');
// 2. Verify root index.d.ts references essential Node.js module declaration files
assert.ok(indexDts.includes('/// <reference path="globals.d.ts" />'), 'index.d.ts must reference globals.d.ts');
assert.ok(indexDts.includes('/// <reference path="events.d.ts" />'), 'index.d.ts must reference events.d.ts');
assert.ok(indexDts.includes('/// <reference path="fs.d.ts" />'), 'index.d.ts must reference fs.d.ts');
assert.ok(indexDts.includes('/// <reference path="stream.d.ts" />'), 'index.d.ts must reference stream.d.ts');
assert.ok(indexDts.includes('/// <reference path="crypto.d.ts" />'), 'index.d.ts must reference crypto.d.ts');
assert.ok(indexDts.includes('/// <reference path="sqlite.d.ts" />'), 'index.d.ts must reference sqlite.d.ts');
// 3. Verify node:events declarations
const eventsDts = fs.readFileSync(path.join(typesDir, 'events.d.ts'), 'utf8');
assert.ok(eventsDts.includes('declare module "node:events"'), 'events.d.ts must declare module node:events');
assert.ok(eventsDts.includes('class EventEmitter<T extends EventMap<T> = any>'), 'EventEmitter class must be declared');
assert.ok(eventsDts.includes('interface EventEmitterOptions'), 'EventEmitterOptions interface must be declared');
assert.ok(eventsDts.includes('interface EventEmitterEventMap'), 'EventEmitterEventMap interface must be declared');
// 4. Verify node:fs declarations
const fsDts = fs.readFileSync(path.join(typesDir, 'fs.d.ts'), 'utf8');
assert.ok(fsDts.includes('declare module "node:fs"'), 'fs.d.ts must declare module node:fs');
assert.ok(fsDts.includes('interface Stats extends StatsBase<number> {}'), 'fs.d.ts must declare Stats interface');
assert.ok(fsDts.includes('class Dirent<Name extends string | Buffer = string>'), 'fs.d.ts must declare Dirent class');
assert.ok(fsDts.includes('function readFileSync('), 'fs.d.ts must declare readFileSync function overloads');
const fsPromisesDts = fs.readFileSync(path.join(typesDir, 'fs', 'promises.d.ts'), 'utf8');
assert.ok(fsPromisesDts.includes('declare module "node:fs/promises"'), 'fs/promises.d.ts must declare module node:fs/promises');
// 5. Verify node:stream declarations
const streamDts = fs.readFileSync(path.join(typesDir, 'stream.d.ts'), 'utf8');
assert.ok(streamDts.includes('declare module "node:stream"'), 'stream.d.ts must declare module node:stream');
assert.ok(streamDts.includes('class Readable extends Stream'), 'stream.d.ts must declare Readable class');
assert.ok(streamDts.includes('class Writable extends Stream'), 'stream.d.ts must declare Writable class');
assert.ok(streamDts.includes('class Duplex extends Stream'), 'stream.d.ts must declare Duplex class');
assert.ok(streamDts.includes('class Transform extends Duplex'), 'stream.d.ts must declare Transform class');
// 6. Verify node:sqlite declarations
const sqliteDts = fs.readFileSync(path.join(typesDir, 'sqlite.d.ts'), 'utf8');
assert.ok(sqliteDts.includes('declare module "node:sqlite"'), 'sqlite.d.ts must declare module node:sqlite');
assert.ok(sqliteDts.includes('interface DatabaseSyncOptions'), 'sqlite.d.ts must declare DatabaseSyncOptions interface');
assert.ok(sqliteDts.includes('class DatabaseSync implements Disposable'), 'sqlite.d.ts must declare DatabaseSync class');
assert.ok(sqliteDts.includes('class StatementSync'), 'sqlite.d.ts must declare StatementSync class');
// 7. Verify node:crypto declarations
const cryptoDts = fs.readFileSync(path.join(typesDir, 'crypto.d.ts'), 'utf8');
assert.ok(cryptoDts.includes('declare module "node:crypto"'), 'crypto.d.ts must declare module node:crypto');
assert.ok(cryptoDts.includes('function createHash(algorithm: string, options?: HashOptions): Hash;'), 'crypto.d.ts must declare createHash function');
assert.ok(cryptoDts.includes('function randomBytes(size: number): NonSharedBuffer;'), 'crypto.d.ts must declare randomBytes function');
console.log('Contract tests passed successfully.');
Origin Seeder
anonymous