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

@logicartisan/eid-bridge

v1.4.2

Published

TypeScript-client voor de Logicartisan eID-bridge — leest de Belgische eID via een lokale PC/SC-helper.

Downloads

132

Readme

@logicartisan/eid-bridge

TypeScript-client voor de Logicartisan eID-bridge — een lokale helper-app die de Belgische eID-kaart uitleest via een PC/SC-kaartlezer.

npm install @logicartisan/eid-bridge zod

Naast deze client heb je de bridge zelf nodig (de native binary + installer in eid-bridge/installers/dist/). Zonder de bridge geen verbinding met de kaartlezer.

Quickstart

import { pingBridge, readEidViaBridge } from "@logicartisan/eid-bridge";

// 1) Draait de bridge?
const health = await pingBridge();
if (!health) {
  alert("Installeer de eID-bridge eerst.");
  return;
}

// 2) Lees de eID uit, met live statusupdates.
const data = await readEidViaBridge((status) => {
  console.log("status:", status);
});

console.log(data.firstName, data.lastName, data.rrn);

Custom configuratie

import { createBridgeClient } from "@logicartisan/eid-bridge";

const bridge = createBridgeClient({
  httpUrl: "http://127.0.0.1:53195",   // default
  readTimeoutMs: 60_000,               // default 120_000
});
const data = await bridge.read();

Types

interface EidData {
  firstName?: string;
  middleName?: string;
  lastName?: string;
  dateOfBirth?: string;          // yyyy-MM-dd
  birthPlace?: string;
  gender?: "m" | "v" | "x";
  cardNumber?: string;
  nationality?: string;
  rrn?: string;                  // XX.XX.XX-XXX.XX
  photo?: string;                // data:image/jpeg;base64,...
  street?: string;
  houseNumber?: string;
  houseNumberAddition?: string;  // bus
  postalCode?: string;
  city?: string;
}

Server-side validatie

Wanneer je de data verder verstuurt naar je backend, valideer daar opnieuw — de bridge draait per slot op de pc van de eindgebruiker:

import { eidDataSchema, sanitizeEidPhoto } from "@logicartisan/eid-bridge";

// In je Next.js Server Action / API route:
const parsed = eidDataSchema.safeParse(input);
if (!parsed.success) throw new Error("ongeldige eID-data");

// Voor het foto-veld: extra check op data-URL-vorm + max-grootte
const safePhoto = sanitizeEidPhoto(parsed.data.photo);

Hulpmiddelen

splitBelgianStreet("Kerkstraat 12 bus 3"){ street, houseNumber, houseNumberAddition }

Browserondersteuning

  • Chrome, Edge, Firefox, Safari (alles met native fetch + WebSocket).
  • Node 22+ (native WebSocket en fetch).
  • Node 18-21: polyfill globalThis.WebSocket zelf (bv. via ws).

Origin-allowlist

De bridge accepteert standaard requests vanaf:

  • http://localhost:3636, http://127.0.0.1:3636 (Rijflow dev)
  • http://rijflow.com, https://rijflow.com, https://www.rijflow.com
  • http://localhost:3010, http://127.0.0.1:3010 (DiamondPos / juwelier-POS dev)
  • https://portal.diamondpos.cloud, https://diamondpos.cloud

Onbekende origins krijgen automatisch een toestemming-prompt in de browser ("Eenmaal toestaan / Altijd toestaan / Weigeren") — geen rebuild nodig om nieuwe klanten toegang te geven.

Productie-domeinen toevoegen: start de bridge met --origin https://jouw-app.com.

Beveiliging

De bridge bindt op 127.0.0.1 (loopback-only) en doet:

  • Host-headercontrole (anti-DNS-rebinding)
  • CORS-allowlist + Origin-check
  • Eenmalige 256-bit nonce per uitlezing

Voor het volledige bedreigingsmodel, zie SECURITY.md in de hoofd-repo.

Licentie

MIT — © Logicartisan.