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

@hieco/mirror

v1.0.0

Published

Hedera Mirror Node REST API client for JavaScript/TypeScript

Readme

@hieco/mirror

@hieco/mirror is the Hieco client for read-only Hedera data from Mirror Node.

Use it when you want typed access to public blockchain data without bringing in signer logic, transaction execution, or framework-specific state management.

Why This Package Exists

Many Hedera apps spend most of their time reading:

  • accounts and balances
  • tokens and NFTs
  • transactions
  • contracts and logs
  • topics and messages
  • schedules, blocks, and network state

@hieco/mirror gives those reads a cleaner shape with one client, domain-specific APIs, and shared result types that power the CLI, MCP server, and framework wrappers.

When To Use It

Choose @hieco/mirror when you are building:

  • server-side data fetchers
  • read-only dashboards
  • indexing or reporting tools
  • scripts that inspect public chain data
  • framework wrappers or internal services that need Mirror Node access

If you want framework-native query APIs, use one of the wrapper packages:

Installation

npm install @hieco/mirror
pnpm add @hieco/mirror
yarn add @hieco/mirror
bun add @hieco/mirror

Quick Start

import { MirrorNodeClient } from "@hieco/mirror";

const mirror = new MirrorNodeClient({ network: "testnet" });

const account = await mirror.account.getInfo("0.0.1001");
const transactions = await mirror.transaction.listPaginated({
  accountId: "0.0.1001",
  limit: 10,
  order: "desc",
});

The Client Shape

MirrorNodeClient is organized by domain instead of raw endpoint path.

Main namespaces include:

  • account
  • balance
  • block
  • contract
  • network
  • schedule
  • token
  • topic
  • transaction

That keeps common tasks easy to discover and makes the same data model reusable across the rest of the ecosystem.

Common Workflows

Read account data

const info = await mirror.account.getInfo("0.0.1001");
const balances = await mirror.balance.list({
  account: "0.0.1001",
  limit: 1,
});

Inspect token and NFT state

const token = await mirror.token.getInfo("0.0.2001");
const nfts = await mirror.token.getNfts("0.0.2001", {
  serialNumber: 1,
});

Explore contract activity

const contract = await mirror.contract.getInfo("0.0.3001");
const logs = await mirror.contract.getLogs("0.0.3001", {
  topic0: "0xddf252ad",
});

Network Configuration

Built-in networks work out of the box through network. If you need a custom endpoint, pass mirrorNodeUrl.

That same model is what the framework wrappers, CLI, and MCP server build on.

Packaging And Runtime Support

@hieco/mirror ships browser-friendly ESM output with explicit conditional exports for browser, worker, workerd, node, and default.

The important effect for consumers is simple: the package is easier to reuse in browser tools, edge-style runtimes, and server code without changing the API.

API At A Glance

Core exports:

  • MirrorNodeClient
  • domain API classes such as AccountApi, TokenApi, and ContractApi
  • shared pagination and response types
  • shared result and network types used across the Hieco package family

Related Packages