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

@yumikodev/pades-bridge

v1.1.0

Published

A high-level utility for PAdES-compliant digital signing in Node.js. It facilitates the creation of placeholders, hash calculation, and integration with external signing providers (HSMs/APIs).

Readme

@yumikodev/pades-bridge

A lightweight, high-level utility for PAdES-compliant digital signing in Node.js. This library acts as a bridge between your PDF documents and external signing providers (HSMs, Remote APIs, or Local Providers).

Features

  • PAdES Compatible: Generates PDF structures compatible with international standards (ETSI CAdES-detached).
  • External Signing Support: Decouples the PDF processing from the cryptographic operation. Perfect for cloud HSMs (AWS CloudHSM, Azure Key Vault) or local providers.
  • Easy Placeholder Management: Built-in helpers to add signature widgets and form fields to existing PDFs.
  • TypeScript First: Full type safety for a better developer experience.

Installation

pnpm add @yumikodev/pades-bridge
# or
npm install @yumikodev/pades-bridge

Quick Start

1. Add a Placeholder

First, prepare your PDF by adding a space for the signature.

import { addPlaceholder } from "@yumikodev/pades-bridge";

const { pdfWithPlaceholder } = await addPlaceholder(originalPdfBuffer, {
  reason: "Surgery Report Validation",
  contactInfo: "[email protected]",
  name: "Dr. Edwin Jibaja",
  location: "Lima, Peru",
  signatureLength: 8192, // Space reserved for the PKCS7 signature (check @signpdf/utils)
});

2. Implement your External Signer

Create a handler that talks to your certificate provider.

import { ExternalSigner } from "@yumikodev/pades-bridge";

// This function receives the SHA-256 hash of the PDF bytes
const myRemoteHSMHandler = async (hash: Buffer): Promise<Buffer> => {
  // 1. Send hash to your Provider API
  // 2. Receive the PKCS7/CMS signature
  return signatureFromProvider;
};

const signer = new ExternalSigner(myRemoteHSMHandler);

3. Sign the PDF

Finally, merge everything into a valid signed PDF.

import { signPdf } from "@yumikodev/pades-bridge";

const signedPdfBuffer = await signPdf(pdfWithPlaceholder, signer);
// signedPdfBuffer is now a valid PAdES-signed PDF

API Reference

addPlaceholder(pdf, options)

Prepares the document.

  • pdf: Buffer | Uint8Array.
  • options: Configuration for the signature field (reason, location, etc.).

ExternalSigner(handler)

Class to handle the cryptographic part.

  • handler: An async function (hash: Buffer) => Promise<Buffer>.

signPdf(pdfBuffer, signer)

The main orchestrator that returns the final signed document.

License

This project is licensed under the GPL-3.0 License.

Author

Edwin Jibaja - GitHub, Linktree


Open to contributions!