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

cbamsdk

v1.0.0

Published

Official Node.js SDK for the CBAM Platform API. Integrate EU Carbon Border Adjustment Mechanism (CBAM) reporting, validation, and AI-powered document extraction.

Readme

cbamsdk

Official Node.js SDK for the CBAM Platform API. Integrate EU Carbon Border Adjustment Mechanism (CBAM) reporting, validation, and AI-powered document extraction into your Node.js or TypeScript applications with ease.

Installation

```bash npm install cbamsdk ```

Quick Start

```javascript const { CBAMClient } = require('cbamsdk');

// Initialize the client // Set sandbox: true to use the testing environment const client = new CBAMClient('cbam_sk_sandbox_YOUR_KEY', { sandbox: true });

async function run() { try { // 1. Get Default Emission Values const defaults = await client.getDefaultValues(); console.log("Default Values:", defaults);

// 2. Perform AI Intake from a Commercial Invoice
const intakeOptions = {
    payloadFormat: 'json',
    language: 'en',
    requestedOutputs: 'official_xml,zip'
};

// Provide the absolute or relative path to the PDF invoice
const result = await client.directIntake('./invoice.pdf', intakeOptions);
console.log("Intake Request ID:", result.data.request_id);

// 3. Download a completed report
// const stream = await client.downloadReport('req-sandbox-12345');
// stream.pipe(fs.createWriteStream('report.zip'));

} catch (error) { console.error(error.message); } }

run(); ```

Advanced Usage (ERP Integration)

For high-security environments like ERP gateways, use the `submitIntegration` method which supports HMAC signatures and custom Idempotency Keys.

```javascript const result = await client.submitIntegration( './fatura.pdf', { external_reference: 'ERP-INV-001', requested_outputs: ['official_xml'] }, { schema_version: 'cbam-intake-v1', target_country: 'DE' }, // optional payload { 'X-CBAM-Timestamp': '1778064000', 'X-CBAM-Nonce': 'ERP-INV-001-01', 'X-CBAM-Signature': 'a1b2c3d4...', 'Idempotency-Key': 'ERP-INV-001' } ); ```

Features

  • Full API Wrapper for `/api/v1/cbam/*`
  • Automatic `multipart/form-data` handling for file uploads
  • Clean error handling wrapping HTTP responses
  • Production and Sandbox ready

License

MIT