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

@ghostchain1/ghost-sdk

v2.0.0

Published

Ghost SDK for GhostChain L1, GhostL2, and GhostL3

Readme

@ghostchain1/ghost-sdk

JavaScript and TypeScript SDK for GhostChain L1, GhostL2, and GhostL3.

Install

npm install @ghostchain1/ghost-sdk

Quick Start

import { createGhostSDK, GHOST_MAINNET } from "@ghostchain1/ghost-sdk";

const sdk = createGhostSDK(GHOST_MAINNET);
console.log(await sdk.health());

Chain presets

import {
  GHOST_MAINNET,  // L1 — chainId 14000101
  GHOSTL2_MAINNET, // L2 — chainId 901
  GHOSTL3_MAINNET, // L3 — chainId 903
  GHOST_DEVNET,
  GHOSTL2_DEVNET,
  GHOSTL3_DEVNET
} from "@ghostchain1/ghost-sdk";

GRC-20 balance

const balance = await sdk.getGRC20Balance("0xTokenAddress", "0xWalletAddress");
console.log(balance);

GRC-20 transfer

const tx = await sdk.transferGRC20("PRIVATE_KEY", {
  tokenAddress: "0xToken",
  to: "0xRecipient",
  amount: "25"
});

Native balance

const balance = await sdk.getNativeBalance("0xYourWallet");
console.log(balance.formatted, balance.symbol); // e.g. "1.5 GST"

Bridge — L1 to L2

import {
  createGhostSDK,
  GHOST_DEVNET,
  GhostBridgeClient,
  DEFAULT_BRIDGE_ROUTES
} from "@ghostchain1/ghost-sdk";

const sdk = createGhostSDK(GHOST_DEVNET);
const bridge = new GhostBridgeClient(sdk, DEFAULT_BRIDGE_ROUTES);

const tx = await bridge.depositToL2("PRIVATE_KEY", "ghost-devnet-l1-l2", {
  routeKey: "ghost-devnet-l1-l2",
  recipient: "0xRecipient",
  amount: "1.0"
});

Typed token client

import {
  createGhostSDK,
  GHOST_MAINNET,
  GHOST_TOKEN_REGISTRIES,
  requireTokenBySymbol,
  GhostTokenClient
} from "@ghostchain1/ghost-sdk";

const sdk = createGhostSDK(GHOST_MAINNET);
const gbtc = requireTokenBySymbol(GHOST_TOKEN_REGISTRIES, "ghostchain", "gBTC");
const token = new GhostTokenClient(sdk, gbtc);

console.log(await token.info());
console.log(await token.balance("0xYourWallet"));

Event parsing

import { parseGRC20TransferEvent, createGhostSDK, GHOST_MAINNET } from "@ghostchain1/ghost-sdk";

const sdk = createGhostSDK(GHOST_MAINNET);
const logs = await sdk.getLogs({ address: "0xToken", fromBlock: 0, toBlock: "latest" });
const transfers = logs.map(parseGRC20TransferEvent).filter(Boolean);

Username resolver

import { GhostSDK, GHOST_MAINNET } from "@ghostchain1/ghost-sdk";

const sdk = new GhostSDK(GHOST_MAINNET, async (username) => {
  // resolve username to address from your app's user registry
  return null;
});

Explorer URL builders

import { buildExplorerTxUrl, GHOST_MAINNET } from "@ghostchain1/ghost-sdk";
console.log(buildExplorerTxUrl(GHOST_MAINNET, "0xTxHash"));

GRC-20 mint / burn guards

import { assertCanMintGRC20, assertCanBurnGRC20 } from "@ghostchain1/ghost-sdk";

await assertCanMintGRC20(sdk, { tokenAddress: "0xToken" }, "0xWallet");

License

MIT