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

@linkiez/boleto-sdk

v1.1.2

Published

SDK for Brazilian banking boletos and CNAB files processing

Readme

🎫 BoletoSDK

Brazilian bank slip (boleto) & CNAB processing library with type safety, validation, and ready-to-render assets.

npm version GitHub release CI Coverage License: MIT TypeScript

Parse, generate, and validate CNAB 240/400 files with consistent APIs.

🌟 Highlights

  • CNAB 240/400 parsing, generation, and validation
  • Boleto assets: barcode, PIX QR, HTML/PDF (pt-BR labels)
  • Bank constants, layout validation, and robust tests

🧾 Boleto Generation

import {
  buildBoletoHtml,
  generateBarcode,
  generateBoletoEmail,
  generateBoletoPdfBuffer,
  generatePixQRCode,
} from '@linkiez/boleto-sdk';

const barcode = generateBarcode({
  bankCode: '341',
  currencyCode: '9',
  dueDate: new Date('2026-02-28'),
  amount: 150.5,
  freeField: '1234567890123456789012345',
});

const pix = generatePixQRCode({
  key: '12345678000195',
  amount: 150.5,
  merchantName: 'ACME CORP',
  merchantCity: 'SAO PAULO',
  transactionId: 'INV001',
});

const boletoData = {
  beneficiary: {
    name: 'ACME CORP',
    document: '12345678000195',
    address: 'Avenida 1, 1000',
  },
  payer: {
    name: 'Joao da Silva',
    document: '12345678901',
    address: 'Rua 2, 200',
  },
  payment: {
    documentNumber: 'DOC-001',
    ourNumber: '12345678',
    amount: 150.5,
    dueDate: new Date('2026-02-28'),
    barcode: barcode.barcode,
    digitableLine: barcode.digitableLine,
    pix: { payload: pix.payload },
  },
  bank: { code: '341', name: 'ITAU UNIBANCO SA' },
};

const html = buildBoletoHtml(boletoData, { layout: 'detailed' });
const pdf = await generateBoletoPdfBuffer(boletoData, { includePixQr: true });

🚀 Quick Start

npm install @linkiez/boleto-sdk
import { parseCnab, generateCnab } from '@linkiez/boleto-sdk';

const parsed = parseCnab(content);
const output = generateCnab(parsed);
import {
  generateBarcode,
  generatePixQRCode,
  generateBoletoPdfBuffer,
} from '@linkiez/boleto-sdk';

const { barcode, digitableLine } = generateBarcode({
  bankCode: '341',
  dueDate: new Date('2025-02-10'),
  amount: 150.5,
  freeField: '1234567890123456789012345',
});

const pix = generatePixQRCode({
  key: '12345678000195',
  amount: 150.5,
  merchantName: 'ACME CORP',
  merchantCity: 'SAO PAULO',
  transactionId: 'INV001',
});

const pdf = await generateBoletoPdfBuffer({
  beneficiary: { name: 'ACME CORP', document: '12345678000195', address: 'Avenida 1' },
  payer: { name: 'Joao da Silva', document: '12345678901', address: 'Rua 2' },
  payment: {
    documentNumber: 'DOC-001',
    ourNumber: '12345678',
    amount: 150.5,
    dueDate: new Date('2025-02-10'),
    barcode,
    digitableLine,
    pix: { payload: pix.payload },
  },
  bank: { code: '341', name: 'ITAU UNIBANCO SA' },
});

🏦 Bank Adapters (Itaú)

import { createItauAdapter } from '@linkiez/boleto-sdk';

const adapter = createItauAdapter();

adapter.assertSupportedWallet('109');

const ourNumber = adapter.buildOurNumber('12345678');
// { baseNumber: '12345678', checkDigit: 2, formatted: '123456782' }

For complete examples, see Adapters Guide.

📚 Documentation

Core

Specs and Validation

Supporting Docs

Project

🛠️ Development

See CONTRIBUTING.md and TESTING.md for setup, workflows, and conventions.

📜 License

APACHE. See LICENSE.

🔗 Links