Skip to main content

@0xintuition/iid-spec

Version: V2
View Markdown

What it's for​

This package distributes IID specification documents and machine-readable conformance fixtures. It has no JavaScript runtime API; the canonical authority for these docs is the separate Intuition Identifier specification.

When to use it​

Use the documents and fixtures to implement or compare identifier producers. Use iid for application parsing and derivation, and iid-registry for classification and provider planning. The packaged copy differs from the canonical source, so a package fixture alone does not establish canonical-spec conformance.

Install​

npm install @0xintuition/iid-spec@0.1.0

The JSON artifacts can be read from Node; there is no root runtime export.

Entry points​

SubpathPurpose
./conformance/*.jsonMachine-readable fixture documents, including canonicalization, parsing, validation, normalization, and derivation vectors.

Depends on and works with​

Runtime dependencies: none.

Published peers: none.

Example​

This Node example loads a published data artifact through its exported path; it does not invent a runtime import from the package root.

import { readFileSync } from 'node:fs';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);
const vectorsPath = require.resolve(
'@0xintuition/iid-spec/conformance/canonicalization.json',
);
const packagedVectors: unknown = JSON.parse(readFileSync(vectorsPath, 'utf8'));
console.log({ loadedConformanceDocument: typeof packagedVectors === 'object' });

For an independent implementation, compare against the canonical registry and test vectors as well as the packaged corpus. Loading the file is not a conformance test.

Canonical and packaged specifications differ

The canonical specification is version 0.1.0. Its §7.8 distinguishes identity data from companion metadata. The package copy omits §7.8, accepts typed wd values and adds the apple-podcasts, letterboxd and podcast-index schemes. Both sources define weak acct handles. The package makes that form ineligible for P0 and sets P1 as its minimum profile. The identifier bytes stay the same. Chapters 00, 01, 04, 05 and 09 also differ. Canonical representation profiles · Canonical account scheme · Packaged amendments

Source​

Package README at the pinned release.

Canonical specification · Canonical registry governance · Packaged representation profiles.

Applies to V2 · @0xintuition/iid-spec 0.1.0