Skip to content
dweller long gone edited this page May 28, 2026 · 14 revisions

ASN.1 Instance Builder Wiki

ASN.1 Instance Builder is a browser-based ASN.1 instance construction tool and reusable TypeScript API. It creates concrete DER-encoded data from ASN.1-oriented schema models, with a small browser app for hands-on work and host-neutral core APIs for browser or Webview integrations.

ASN.1 Instance Builder screenshot

The package is published as:

npm install @pkistudio/asn1instancebuilder

Current package version: 0.1.13

What to Read First

  • Getting Started: install, run locally, load definitions, edit instance input with the Form/JSON views, build DER, and inspect output.
  • Browser App: understand the Definition pane, hybrid Instance Input pane, Diagnostics pane, API Log, and PkiStudioJS viewer routing.
  • Core API: use parseAsn1Definition, createInstance, diagnostics helpers, byte helpers, shared PKI definitions, and generated DER parsing helpers.
  • Schema and Instance Model: understand the supported ASN.1 subset, Schema Model shape, instance JSON forms, binary inputs, OID names, tagging, and current parser limits.
  • Embedding: mount the app in a browser page or Webview host and pass initial schema or instance data.
  • Testing: understand parser, diagnostics, DER, fixture, build, and browser smoke-check coverage.
  • Development: local commands, package entry points, wiki preview, version metadata, and release notes.

Key Guarantees

  • ASN.1 definition parsing, instance validation, and DER construction run locally in the browser.
  • The core API stays UI-independent and does not depend on DOM, VS Code, or host-specific file APIs.
  • Browser-specific file access, dialogs, persistence, and Webview lifecycle stay outside the reusable core package.
  • Schema diagnostics can be collected before DER generation with validateSchemaModule().
  • Instance diagnostics can be collected before DER generation with validateInstance().
  • The browser app blocks DER generation when schema or instance diagnostics contain errors.
  • Generated DER is opened in a standalone PkiStudioJS viewer tab for ASN.1 inspection.
  • PkiStudioJS is used for generated DER parsing and viewer behavior; ASN.1 Instance Builder owns schema parsing, instance validation, and DER construction.

Repository Links

Clone this wiki locally