Skip to main content

@0xintuition/iid-registry

Version: V2
View Markdown

What it's for​

The registry maps identifier schemes and values to known classifications, provider capability names, and provider hints. These are pure local lookups, not fetched provider responses.

When to use it​

Use it when a parsed identifier needs semantic meaning or an enrichment plan. A provider name does not mean its client is installed, credentials are available, or a match exists. Use atom-enrichment for provider execution; no HTTP request, cache, or credential handling happens here.

Install​

npm install @0xintuition/iid-registry@0.1.1 viem@2.31.4

Use ESM import or CommonJS require() on Node 20+. Public subpaths work in both formats. See installation and peer setup and the runtime compatibility limits.

Entry points​

SubpathPurpose
.Classification lookups, ordered provider plans, provider names, and typed identifier-hint maps.

Depends on and works with​

Runtime dependencies: @0xintuition/classifications, @0xintuition/iid.

Published peers: viem ^2.0.0.

Example​

import {
classificationForIid,
identifierHintsForIid,
providersForIid,
} from '@0xintuition/iid-registry';

const inputIid = 'int:isrc:USRC17607839';
const classification = classificationForIid(inputIid);
const providerPlan = providersForIid(inputIid);
const hints = identifierHintsForIid(inputIid);
const unmapped = classificationForIid('int:iswc:T0345246801');
console.log({ classification, providerPlan, hints, unmapped });

The ISRC maps to music-recording, and its plan lists musicbrainz, spotify, and apple-music capabilities in that order. The example performs no search and returns no recording metadata. The valid ISWC example has no mapped classification: the registry has no music-composition classification.

An empty provider plan does not make an IID invalid. Bare polymorphic values can also remain unclassified. Historical spellings that can be canonicalized may resolve through their canonical form; that does not make those spellings eligible new anchors.

See also Classify and enrich atoms.

Source​

Package README at the pinned release.

Canonical registry governance · Canonical scheme registry · Classification mapping · Provider plans.

Applies to V2 · @0xintuition/iid-registry 0.1.1