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

aerochain-node-sdk

v1.0.0

Published

Official Node.js SDK for the Aerochain API

Readme

Aerochain Node SDK

npm version License: MIT Node.js Version

Official Node.js SDK for the Aerochain API - The blockchain-based aviation parts traceability platform.

Installation

npm install aerochain-node-sdk

Quick Start

Authentication with Email/Password

import { AerochainClient } from 'aerochain-node-sdk';

const client = new AerochainClient({
  baseURL: 'https://api.aerochain.com',
  auth: {
    type: 'credentials',
    email: '[email protected]',
    password: 'your-password',
  },
});

await client.initialize();

const parts = await client.parts.list();
console.log(parts);

Authentication with API Key

import { AerochainClient } from 'aerochain-node-sdk';

const client = new AerochainClient({
  baseURL: 'https://api.aerochain.com',
  auth: {
    type: 'apiKey',
    apiKey: 'your-api-key',
  },
});

const parts = await client.parts.list();
console.log(parts);

Features

  • ✅ Email/Password authentication with automatic JWT token renewal
  • ✅ API Key authentication
  • ✅ Full TypeScript support
  • ✅ Automatic token refresh
  • ✅ Comprehensive API coverage

API Reference

Client Initialization

const client = new AerochainClient(config);
await client.initialize(); // Required for credentials auth

Parts

// List parts
const parts = await client.parts.list({ page: 1, filters: { status: 'active' } });

// Get single part
const part = await client.parts.get('part-id');

// Create part
const newPart = await client.parts.create({
  serialNumber: 'SN123',
  partNumber: 'PN456',
  manufacturer: 'org-id',
});

// Create part with event
const formData = new FormData();
formData.append('serialNumber', 'SN123');
formData.append('file', fileBuffer, 'document.pdf');
const partWithEvent = await client.parts.createWithEvent(formData);

Event Shares

// List event shares
const shares = await client.eventShares.list({
  entityType: 'part',
  status: 'pending',
  direction: 'received',
});

// Create event share
const share = await client.eventShares.create({
  entityType: 'part',
  entityUidHex: '0x123...',
  toOrganization: 'org-id',
});

// Accept event share
await client.eventShares.accept('share-id');

// Decline event share
await client.eventShares.decline('share-id');

// Cancel event share
await client.eventShares.cancel('share-id');

Part Events

// List part events
const events = await client.partEvents.list({ partId: 'part-id' });

// Create part event
const event = await client.partEvents.create({
  eventType: 'inspected',
  eventDate: '2024-01-01',
  partId: 'part-id',
});

Aircraft

// List aircraft
const aircraft = await client.aircraft.list();

// Get single aircraft
const plane = await client.aircraft.get('aircraft-id');

// Create aircraft
const newAircraft = await client.aircraft.create({
  registration: 'N12345',
  msn: 'MSN123',
  modelId: 'model-id',
});

Organizations

// Get organization
const org = await client.organizations.get('org-id');

Users

// Get user
const user = await client.users.get('user-id');

Error Handling

try {
  const parts = await client.parts.list();
} catch (error) {
  if (error.response?.status === 401) {
    console.error('Authentication failed');
  } else if (error.response?.status === 422) {
    console.error('Validation errors:', error.formErrors);
  } else {
    console.error('Error:', error.message);
  }
}

TypeScript Support

This SDK is written in TypeScript and includes complete type definitions. All types are exported from the main package:

import { AerochainClient, Part, PartEvent, EventShare, Organization } from 'aerochain-node-sdk';

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Versioning

This project follows Semantic Versioning. For the versions available, see the tags on this repository.

See CHANGELOG.md for a detailed history of changes.

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Built with ❤️ by the Aerochain team for the aviation industry.