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

alphaledger-js

v0.1.6

Published

AlphaLedger embed SDK for partner integrations

Readme

AlphaLedger JS SDK (alphaledger-js)

The official AlphaLedger JavaScript SDK for B2B partner integrations. Embed the AlphaLedger trading and analytics terminal seamlessly into any brokerage platform or web application.


Installation

Install the package via npm, yarn, or bun:

npm install alphaledger-js
# or
yarn add alphaledger-js
# or
bun add alphaledger-js

Or load it directly inside HTML using a script tag from a public CDN:

<!-- Load the latest version -->
<script src="https://unpkg.com/alphaledger-js/dist/index.global.js"></script>

<!-- Or load a specific version (recommended for production) -->
<script src="https://unpkg.com/[email protected]/dist/index.global.js"></script>

Quick Start

1. Plain HTML / CDN Integration

Create a placeholder container div with a specified height, and initialize the SDK:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Broker Dashboard</title>
</head>
<body>

  <!-- Container for the embed -->
  <div id="alphaledger-container" style="width: 100%; height: 100vh;"></div>

  <!-- Load SDK -->
  <script src="https://unpkg.com/alphaledger-js/dist/index.global.js"></script>

  <!-- Initialize -->
  <script>
    new AlphaLedger.AlphaLedger({
      containerId: "alphaledger-container",
      apiKey: "al_live_YOUR_API_KEY_HERE"
    }).init();
  </script>

</body>
</html>

2. Next.js / React Integration

Create a client component to mount the terminal inside a container on component mount:

"use client";

import { useEffect, useRef } from "react";
import { AlphaLedger } from "alphaledger-js";

interface AlphaLedgerEmbedProps {
  apiKey: string;
}

export default function AlphaLedgerEmbed({ apiKey }: AlphaLedgerEmbedProps) {
  const initialized = useRef(false);

  useEffect(() => {
    if (initialized.current) return;
    initialized.current = true;

    new AlphaLedger({
      containerId: "alphaledger-embed-target",
      apiKey,
    }).init();
  }, [apiKey]);

  return (
    <div
      id="alphaledger-embed-target"
      style={{ width: "100%", height: "100vh" }}
    />
  );
}

Important: Container Height Rule

The AlphaLedger terminal is a fully-featured dashboard layout. It requires a sufficient height in order to display scrollable elements and sidebars correctly.

  • DO NOT leave the container height unset (or at 0px).
  • DO NOT set the height too small (minimum recommended is 700px).
  • DO use height: 100vh (full-page embed) or height: 800px (inline sections).
<!-- ❌ WRONG (No height set; iframe will shrink to 0px) -->
<div id="alphaledger-container"></div>

<!-- ❌ WRONG (Height too small; content will crop) -->
<div id="alphaledger-container" style="height: 300px;"></div>

<!-- ✅ CORRECT (Takes full viewport height) -->
<div id="alphaledger-container" style="width: 100%; height: 100vh;"></div>

SDK Configuration Reference

When instantiating new AlphaLedger(config), the following configuration options are supported:

| Property | Type | Required | Description | |---|---|---|---| | containerId | string | Yes | The DOM element ID where the terminal iframe will be inserted. | | apiKey | string | Yes | Your unique B2B partner API key. | | token | string | No | Pre-authenticated SSO session token (if configured). | | baseUrl | string | No | Overrides the target app URL (defaults to production App). |


License

MIT © AlphaLedger