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

@ar-agents/firma-digital

v0.1.0

Published

Argentine Firma Digital (Ley 25.506 / ONTI) verification primitives as drop-in tools for the Vercel AI SDK. Parse X.509 certs, validate chains anchored at AC-Raíz Argentina, verify CMS/PKCS#7 detached signatures, extract CUIT from signer subject. Read-onl

Readme

@ar-agents/firma-digital

Argentine Firma Digital (Ley 25.506 / ONTI) verification primitives as drop-in tools for the Vercel AI SDK 6.

pnpm add @ar-agents/firma-digital ai zod

Part of the Arg toolkit — open infrastructure for the Argentine AI agent jurisdiction.

What this gives you

  • Parse X.509 certs issued under AR Firma Digital and extract subject info, CUIT (when embedded), validity dates, public-key info.
  • Verify cert chains anchored at AC-Raíz Argentina / ONTI. Heuristic root detection (matches subject DN patterns) plus explicit trust-anchor pinning by fingerprint.
  • Verify CMS / PKCS#7 detached signatures over arbitrary payloads (e.g., firma.p7s produced by AR signing tools).
  • Pure helpers for AR-ONTI heuristic checks, exported standalone.

This package is for VERIFICATION, not signing. AR Firma Digital signing requires a hardware token (eToken, smartcard) or a managed-CSP service that exposes a remote-signing API — out of scope here.

Quick start

import { Experimental_Agent as Agent, stepCountIs } from "ai";
import { firmaDigitalTools } from "@ar-agents/firma-digital";

const agent = new Agent({
  model: "anthropic/claude-sonnet-4-6",
  tools: firmaDigitalTools(),
  stopWhen: stepCountIs(6),
});

const { text } = await agent.generate({
  prompt:
    "Tengo este cert PEM `-----BEGIN CERTIFICATE-----...`. ¿Es de Firma Digital argentina? ¿Quién es el titular?",
});

Direct API

import { parseCert, verifyChain, verifyDetachedCmsSignature } from "@ar-agents/firma-digital";

// Parse a cert.
const cert = parseCert(pem);
console.log(cert.commonName, cert.cuit, cert.isOntiIssued);

// Verify a chain (leaf-first PEM bundle).
const result = verifyChain(chainPem);
if (!result.valid) console.error(result.reason);

// Verify a detached CMS signature (e.g., contents of firma.p7s).
const verified = verifyDetachedCmsSignature(p7sPem, payloadBytes);
console.log(verified.valid, verified.signers[0]?.cert.cuit);

Tool surface

| Tool | Purpose | | ----------------------------- | ---------------------------------------------------------- | | firma_inspect_cert | Parse one PEM cert → structured info. | | firma_verify_chain | Validate a chain leaf → root anchored at AC-Raíz / ONTI. | | firma_is_onti_issued | Quick yes/no for "AR Firma Digital". | | firma_verify_cms_signature | Verify a detached PKCS#7 over a base64 payload. |

See AGENTS.md for tool selection rules.

What this is NOT

  • NOT a signing library. Argentine Firma Digital signing requires hardware tokens or managed-CSP API.
  • NOT a full PAdES verifier. PAdES-LTV (timestamp-token validation, OCSP, CRL) is out of scope. For long-term-validity scenarios pair with a dedicated PDF library.
  • NOT a TSL trust list resolver. The package ships heuristic AR-ONTI matching plus explicit fingerprint pinning. Production callers should pass current AC-Raíz certs from argentina.gob.ar/jefatura/innovacion-publica/ic/ac-raiz.

License

MIT © Nazareno Clemente