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

dlt-hub-sdk

v1.0.1

Published

JavaScript/TypeScript SDK for the unified DLT Hub API (bootcamp, mainHub, talent)

Downloads

218

Readme

dlt-hub-sdk

Official JavaScript client for the DLT Hub unified API. One client, three namespaces: bootcamp, mainHub, and talent.

Requirements: Node.js 18+ (native fetch) or any modern browser. Credentials (cookies) are sent by default in the browser.


Installation

npm install dlt-hub-sdk

From the monorepo:

{
  "dependencies": {
    "dlt-hub-sdk": "file:../sdk"
  }
}

Quick start

import { createDLTHubClient, DLT_HUB_BACKEND_URL } from "dlt-hub-sdk";


const client = createDLTHubClient(DLT_HUB_BACKEND_URL, {
  getAccessToken: () => localStorage.getItem("accessToken"), // optional
});

// Bootcamp
const { data } = await client.bootcamp.auth.login({ email, password });

// MainHub
await client.mainHub.newsletter.subscribe({ emailAddress });

// Talent
const talents = await client.talent.talents.getAll();

API overview

| Namespace | Path | Resources | |------------|------------------------|-----------| | bootcamp | /api/v1/bootcamp | Auth, contact, waitlist, events, cohorts, settings | | mainHub | /api/v1/mainHub | Ideas, newsletter, projects, testimonials | | talent | /api/v1/talent | Talents, skills, contact (hire form) |


Bootcamp

// Auth
await client.bootcamp.auth.registerTeam({ ... });
await client.bootcamp.auth.login({ email, password });
await client.bootcamp.auth.logout();
await client.bootcamp.auth.loginStatus();
await client.bootcamp.auth.forgotPassword({ email });
await client.bootcamp.auth.resetPassword(resetToken, { password });
await client.bootcamp.auth.verifyUser(verificationToken);
await client.bootcamp.auth.getSingleTeam();        // protected
await client.bootcamp.auth.sendVerificationEmail(); // protected

// Contact
await client.bootcamp.contact.contactUs({ name, email, message });
await client.bootcamp.contact.getAll();            // protected
await client.bootcamp.contact.get(contactId);
await client.bootcamp.contact.delete(contactId);
await client.bootcamp.contact.updateStatus(contactId, { status });

// Waitlist
await client.bootcamp.waitlist.join({ name, email, phone });
await client.bootcamp.waitlist.getAll();           // protected
await client.bootcamp.waitlist.delete(id);

// Events
await client.bootcamp.events.create({ ... });      // protected
await client.bootcamp.events.getAll();
await client.bootcamp.events.get(eventId);
await client.bootcamp.events.upcoming();
await client.bootcamp.events.past();
await client.bootcamp.events.update(eventId, { ... });
await client.bootcamp.events.delete(eventId);

// Cohorts
await client.bootcamp.cohorts.studentRegister({ ... });
await client.bootcamp.cohorts.corperRegister({ ... });
await client.bootcamp.cohorts.upgradeAdmission({ ... }); // protected
await client.bootcamp.cohorts.getAllAdmissions();        // protected
await client.bootcamp.cohorts.getAllCorpers();          // protected

// Settings
await client.bootcamp.settings.getWaitlistStatus();
await client.bootcamp.settings.updateWaitlistStatus({ ... }); // protected

MainHub

// Ideas
await client.mainHub.ideas.suggest({ fullName, emailAddress, why });
await client.mainHub.ideas.getAll();
await client.mainHub.ideas.get(id);
await client.mainHub.ideas.delete(ideaId);

// Newsletter
await client.mainHub.newsletter.subscribe({ emailAddress });
await client.mainHub.newsletter.getAll();
await client.mainHub.newsletter.get(id);
await client.mainHub.newsletter.delete(subId);

// Projects
await client.mainHub.projects.register({ ... });
await client.mainHub.projects.getAll();
await client.mainHub.projects.get(id);
await client.mainHub.projects.delete(projectId);

// Testimonials
await client.mainHub.testimonials.testify({ ... });
await client.mainHub.testimonials.getAll();
await client.mainHub.testimonials.get(testyId);
await client.mainHub.testimonials.delete(testyId);

Talent

// Talents
await client.talent.talents.register({ ... });
await client.talent.talents.getAll();
await client.talent.talents.get(id);
await client.talent.talents.delete(id);

// Skills
await client.talent.skills.create({ ... });
await client.talent.skills.getAll();
await client.talent.skills.update({ ... });
await client.talent.skills.delete({ ... });

// Contact (hire form)
await client.talent.contact.create({ emailAddress, talentId, companyName, calendlyLink });

Client options

| Option | Description | |--------|-------------| | baseURL | Backend URL. Omit in the browser to use the current origin; in Node defaults to http://localhost:6000. | | getAccessToken | () => string \| Promise<string> — Used for protected routes (adds Authorization: Bearer <token>). | | fetch | Custom fetch implementation (e.g. for tests or Node < 18). |


Response & errors

  • Success: Methods return the API payload (e.g. { success: true, data, message }).
  • HTTP errors: Thrown as an Error with .status (e.g. 401) and .data (parsed response body).
try {
  await client.bootcamp.auth.login({ email, wrongPassword });
} catch (err) {
  console.log(err.status, err.data?.message);
}

Development

From the repo root:

cd sdk
node -e "import('./src/index.js').then(m => { const c = m.createDLTHubClient('http://localhost:6000'); console.log('bootcamp', Object.keys(c.bootcamp)); console.log('mainHub', Object.keys(c.mainHub)); console.log('talent', Object.keys(c.talent)); })"