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

@healchain/sdk

v1.1.0

Published

JavaScript SDK for HealChain — self-healing decentralized storage via Reed-Solomon erasure coding

Readme

@healchain/sdk

JavaScript SDK for HealChain — self-healing decentralized storage using Reed-Solomon erasure coding across multiple EVM chains.

Install

npm install @healchain/sdk

Quick Start

import HealChain from '@healchain/sdk';

const hc = new HealChain({
  apiUrl: 'https://api.healchain.org',
  apiKey: 'your-api-key',
});

// Store data — oracle fulfills automatically
const { recordId, chainId } = await hc.store('Hello World', {
  label: 'my first record',
});
console.log(`Stored as record #${recordId} on chain ${chainId}`);

// Retrieve — auto-discovers chain from GlobalRegistry
const { text, chainId: retrievedFrom } = await hc.retrieve(recordId);
console.log(`Retrieved from chain ${retrievedFrom}: ${text}`);

API

new HealChain(options)

| Option | Type | Default | Description | |---|---|---|---| | apiUrl | string | https://api.healchain.org | API base URL | | apiKey | string | — | API key (required for store/retrieve) | | chain | string | 'auto' | Chain: 'auto', 'sepolia', 'arbitrum', 'base', etc. | | preference | string | '' | 'cheapest' | 'fastest' | 'redundant' | '' (auto weighted) | | pollInterval | number | 4000 | Oracle poll interval in ms | | pollTimeout | number | 120000 | Max wait for oracle fulfillment in ms | | dataShards | number | 10 | Default RS data shards | | parityShards | number | 4 | Default RS parity shards |


hc.store(data, options?)

Store data on-chain. Polls until the oracle fulfills the request.

Parameters:

  • datastring or Uint8Array
  • options.label — record label (default: 'sdk upload')
  • options.chain — override chain for this store
  • options.preference — override preference for this store
  • options.onFulfilled — callback when oracle fulfills: (result) => void

Returns: { recordId, tx, chainId, originalSize, encodedSize, ciDigestHash }


hc.retrieve(id)

Retrieve data by record ID. Auto-discovers which chain the record lives on.

Returns: { text, hex, chainId, originalSize, label }


hc.estimateFee(sizeBytes, chain?)

Estimate the fee for storing data of a given size.

Returns: { feeCents, feeUsd, sizeBytes, chain }

const fee = await hc.estimateFee(1024, 'auto');
console.log(`Fee: ${fee.feeUsd}`); // e.g. "$0.05"

hc.chainScores()

Get current chain scoring data (cost, reliability, latency).

Returns: array of chain score objects


hc.getMetadata(id)

Get record metadata without retrieving the data.

Returns: { id, label, originalSize, encodedSize, dataShards, parityShards, owner, timestamp, chainId }


hc.list(page?, limit?)

List stored records.

Returns: { records, total, pages }


hc.getBillingBalance(walletAddress)

Get testnet credit balance for a wallet.


hc.health()

Check API health.

Returns: { status, version, lastBlock }


Error Handling

import HealChain, { HealChainError } from '@healchain/sdk';

try {
  const result = await hc.store('my data', { label: 'test' });
} catch (err) {
  if (err instanceof HealChainError) {
    console.error(err.message, err.status, err.code);
  }
}

Supported Chains

| Chain | ID | Identifier | |---|---|---| | Ethereum Sepolia | 11155111 | sepolia | | Arbitrum Sepolia | 421614 | arbitrum | | Base Sepolia | 84532 | base | | Optimism Sepolia | 11155420 | optimism | | Unichain Sepolia | 1301 | unichain | | Avalanche Fuji | 43113 | avalanche | | And 7 more testnets... | | auto selects best |

Use chain: 'auto' (default) to let the scoring engine pick the optimal chain.

License

MIT © HealChain