Repository navigation
RefMint 0.1.0-alpha.1 — public reference codes
Pre-releaseRefMint's first experimental release is for public ticket, document and order references that people need to enter or read back. Generate a code, format it for display, and check it before a database lookup.
What it provides
- Web Crypto generation, a record-type prefix and a standard Bech32m checksum.
- Payload length planning from a lifetime issuance count and collision budget.
- Strict canonical storage keys, documented display normalization and TypeScript namespace brands.
- Zero runtime dependencies, ES modules and included TypeScript declarations.
- A local ticket-lookup demo that distinguishes found, mistyped and valid-but-unknown references.
Install
Requires Node.js 22+ for Node applications. Browser applications need Web Crypto and an ES-module build setup.
npm install --allow-remote=root https://github.com/PerchAnton/refmint/releases/download/v0.1.0-alpha.1/refmint-0.1.0-alpha.1.tgznpm 12 requires explicit permission for URL dependencies. Pass --allow-remote=root on later npm install / npm ci runs for a project that keeps this URL dependency, too. This does not change global npm settings. Alternatively, download the .tgz asset and run npm install ./refmint-0.1.0-alpha.1.tgz. See npm's URL dependency setting.
The command above was verified with npm 12.2.1 against the published release. The published archive's README shows the original command without this npm 12 flag; the package itself and its checksums are unchanged.
import { createReferences } from 'refmint'
const tickets = createReferences({ prefix: 'ticket' })
const id = tickets.generate()
const printed = tickets.format(id).toUpperCase()
const result = tickets.parse(printed)
if (result.ok) console.log(result.id) // canonical key for an authorized lookupThis is a GitHub-distributed package. It is not yet published to the npm registry; use the archive URL above.
Verification
The release includes the package archive, SHA256SUMS.txt, verification.json and evidence.json. The verification manifest identifies the released commit and CI run.
Released commit: 31abd3f. Release CI.
- 25 core tests, TypeScript checks, 2 HTTP integration tests and 9 browser tests.
- Node 22/24/26; Linux, Windows and macOS; Chromium, Firefox and WebKit.
- 912 prefix/payload length combinations and 1,766 exact count/budget boundary cases.
- 21 standard Bech32m vectors and 4,216 enumerated single-symbol substitutions, plus additional finite mutation cases.
These are software checks, not evidence of a lower human error rate or a speed advantage over other libraries.
Alpha scope
The API and reference format may change. References are public identifiers: the checksum is not authentication or proof that a record exists. Keep a UNIQUE storage constraint, bounded collision retries and authorization for lookups. Preserve a namespace's prefix and payload length with your schema.
Original code is licensed MIT OR Apache-2.0; standard checksum and test-vector attribution is included in the package.