npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pkistudio/asn1resolver

v0.1.3

Published

Local-only explainable ASN.1 definition candidate resolver built on DerEditor.

Readme

ASN.1 Resolver

ASN.1 Resolver is a deterministic, explainable ASN.1 definition candidate resolver. It parses DER, BER, PEM, headerless Base64, and hexadecimal input through DerEditor, compares the local TLV structure with ASN.1 definition corpora, and returns ranked candidates with evidence, diagnostics, ambiguities, and matched paths.

The resolver and its standalone viewer run locally. Document bytes, ASN.1 definitions, candidate reports, and OID lookups are not sent to a remote service.

Current version: 0.1.3

Independence

@pkistudio/dereditor is the only PkiStudio runtime dependency. ASN.1 Resolver owns its neutral TLV contract, schema model, ASN.1 definition parser, matching logic, built-in PKI corpus, reports, and Resolver shell. Its document pane mounts the Viewer exported by DerEditor. It does not depend on PkiStudioJS, ASN.1 Instance Builder, DerBuilder, a remote OID service, or an AI model.

Install

npm install @pkistudio/asn1resolver

Core API

const resolver = require('@pkistudio/asn1resolver');

async function inspect(input) {
  const report = await resolver.createPkiCandidateReport(input, {
    profiles: ['components', 'x509'],
    includeSubtrees: true,
    maxResults: 5
  });

  console.log(report.roots[0].summary.bestCandidate);
}

inspect('300d06092a864886f70d01010b0500');

Use a custom ASN.1 definition corpus with parseAsn1DefinitionCorpus():

const corpus = resolver.parseAsn1DefinitionCorpus(`
Example DEFINITIONS ::= BEGIN
  Counter ::= SEQUENCE { value INTEGER }
END
`);

const nodes = await resolver.parseInputToTlvNodes('3003020101', {
  format: 'hex'
});
const candidates = resolver.findAsn1Candidates(nodes[0], {
  schemaCorpus: corpus
});

The practical ASN.1 parser supports module definitions, aliases, primitive types, SEQUENCE, SET, CHOICE, SEQUENCE OF, SET OF, OPTIONAL, DEFAULT, and context/application/private/universal EXPLICIT or IMPLICIT tags. Constraints are accepted and ignored by the structural matcher.

Package exports:

  • @pkistudio/asn1resolver: Core API.
  • @pkistudio/asn1resolver/core: Core API alias.
  • @pkistudio/asn1resolver/viewer: standalone browser viewer API.
  • @pkistudio/asn1resolver/styles.css: viewer styles.

Local viewer

npm ci
npm test
npm run test:package
node app/server.js

Open http://localhost:8080/. Files, pasted input, local ASN.1 corpora, and OID resolution remain on the local machine. The Node.js service only serves static package files. The viewer favicon uses the PkiStudio icon published by the installed DerEditor package. The document pane is the editable DerEditor Viewer, including its Load, Save, Close, Tools, and About menus. Resolver candidates refresh after DerEditor loads or changes a document. Corpora and Resolver About are available beside the application name in the top toolbar. The Corpora dialog manages local definitions through file or clipboard addition, editing, removal, revert, and JSON load/save actions. The candidate pane uses a compact expandable tree with definition alternatives, scores, confidence, and subtree paths. The selected pane presents evidence, diagnostics, ambiguities, matched paths, and bytes as separate cards. Drag the pane separators, or focus one and use the arrow, Home, and End keys, to resize the document, selected-candidate, and local-log areas.

The same local-only viewer is deployed to GitHub Pages. Pages receives only static application assets; selected files and pasted data stay in the browser.

Development

npm test
npm run test:package
npm run check
npm run audit:offline
npm run pack:dry-run

See the architecture notes and the API specification for the ownership and offline boundaries. Release preparation is documented in the release process, with separate npm publishing and GitHub prerequisite guides. Pages packaging and deployment are described in the deployment guide. The current notes are in the v0.1.3 release notes.

License

ASN.1 Resolver is licensed under the MIT License. See LICENSE.