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

@fundxgrid/stacks-core

v1.0.2

Published

Production-grade shared Stacks blockchain utilities. Provides core bindings for transaction building, network configuration, and contract interaction on Stacks.

Downloads

346

Readme

@fundxgrid/stacks-core

npm version TypeScript License: MIT

Core infrastructure and shared Stacks blockchain utilities powering the FundX and Chessify SDK ecosystems.

This package provides a strongly-typed, lightweight foundation for interacting with the Stacks blockchain, handling network configuration, and abstracting cross-chain queries.

🚀 Features

  • Strictly Typed: First-class TypeScript support with comprehensive interfaces.
  • Network Agnostic: Built-in support for mainnet, testnet, and devnet environments.
  • Modular Architecture: Designed to be extended by higher-level SDKs without bloating the dependency tree.

📦 Installation

This package requires Stacks core libraries as peer dependencies. You must install them alongside this core utility.

npm

npm install @fundx-grid/stacks-core @stacks/network @stacks/transactions

yarn

yarn add @fundx-grid/stacks-core @stacks/network @stacks/transactions

pnpm

pnpm add @fundx-grid/stacks-core @stacks/network @stacks/transactions

💻 Quick Start

Initialize the core client by passing in your desired network configuration. The client will automatically resolve the correct Hiro API URLs.

import { StacksClient } from '@fundxgrid/stacks-core';

// Initialize for Mainnet
const client = new StacksClient({ network: 'mainnet' });

// Or specify a custom API URL for a local Devnet node
const devClient = new StacksClient({ 
  network: 'devnet', 
  apiUrl: 'http://localhost:3999' 
});

🛠 Advanced Usage

Querying Account Balances

The client provides abstracted methods for standard on-chain queries. Always ensure you are handling potential network errors in production environments.

import { StacksClient } from '@fundx-grid/stacks-core';

async function fetchUserBalance(walletAddress: string) {
  const client = new StacksClient({ network: 'mainnet' });

  try {
    const balance = await client.getAccountBalance(walletAddress);
    console.log(`Balance for ${walletAddress}: ${balance} micro-STX`);
    return balance;
  } catch (error) {
    console.error('Failed to fetch balance. Ensure the Hiro API is reachable:', error);
    throw error;
  }
}

🧩 API Reference

StacksClient

The primary class for interacting with the Stacks network.

  • constructor(config: StacksConfig)
  • getAccountBalance(address: string): Promise<number>

NETWORKS

A constant record containing the default API URLs for Hiro's public nodes.

import { NETWORKS } from '@fundxgrid/stacks-core';

console.log(NETWORKS.testnet); // '[https://api.testnet.hiro.so](https://api.testnet.hiro.so)'

Types

Exported interfaces for strict typing in consumer SDKs:

  • NetworkType: 'mainnet' | 'testnet' | 'devnet'
  • StacksConfig: { network: NetworkType; apiUrl?: string; }

🤝 Development

To build this package from source:

git clone https://github.com/FundX-Grid/stacks-sdks.git
cd stacks-sdks/stacks-core
npm install
npm run build

📄 License

MIT © jadonamite