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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hashgraph/mirror-report

v0.1.5

Published

Generates a report showing an account's hbar transfers

Downloads

376

Readme

Mirror Node Report Tool

This tool is a CLI tool that queries the REST API for an account and produces a report showing any transfers to or from the account and its resulting balance.

Install

First ensure Node and NPM are installed. Following the instructions specific to your operating system.

MacOS

Open the Terminal app and run the following commands:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 22
npm install -g @hashgraph/mirror-report

Windows

Download the Node.js 22 prebuilt installer for Windows x64. Follow the prompts to complete the installation with the default options. Open the Command Prompt application and run the following:

npm install -g @hashgraph/mirror-report

Upgrading

To upgrade the version of the report tool, re-run the NPM install command to grab the latest version:

npm install -g @hashgraph/mirror-report

Running

To generate the report, use the mirror command line tool from the installation section.

Usage: mirror [options] [command]

Options:
  -h, --help        display help for command

Commands:
  report [options]  Generate a report for specific accounts
  help [command]    display help for command

Run the report sub-command to generate the report data. Pass at least one account you want to include in the report. By default, it generates a report for the current date. Pass the --start-date YYYY-MM-DD and --end-date YYYY-MM-DD arguments to customize the time range the report should cover.

Usage: mirror report [options]

Generate a report for the given accounts.

Options:
  -a, --account <accountId...>  The accounts to include in the report
  -c, --combined                Whether a single combined report should be generated for all accounts. By default it produces separate reports
  -f, --from-date <YYYY-MM-DD>  The day the report should start (inclusive) (default: "2024-12-20")
  -n, --network <network>       The Hedera network to connect to (choices: "mainnet", "testnet", "previewnet", default: "mainnet")
  -t, --to-date <YYYY-MM-DD>    The day the report should end (exclusive) (default: "2024-12-19")
  -h, --help                    display help for command

Example execution :

mirror report -a 0.0.1000 -a 0.0.1001 -f 2024-11-29 -n testnet
2024-12-17T04:52:04.353Z Generating testnet report for the given accounts: ["0.0.1000","0.0.1001"]
2024-12-17T04:52:04.353Z Invoking https://testnet.mirrornode.hedera.com/api/v1/accounts/0.0.1000?timestamp=1732838400
2024-12-17T04:52:04.643Z Starting balance of 1300000002 for account 0.0.1000 at 1732837599.823821194
2024-12-17T04:52:04.643Z Invoking https://testnet.mirrornode.hedera.com/api/v1/transactions?account.id=0.0.1000&limit=100&order=asc&timestamp=gt:1732837599.823821194&timestamp=lt:1732924800
2024-12-17T04:52:04.719Z Invoking https://testnet.mirrornode.hedera.com/api/v1/accounts/0.0.1001?timestamp=1732838400
2024-12-17T04:52:04.800Z Starting balance of 197103815708295 for account 0.0.1001 at 1732837599.823821194
2024-12-17T04:52:04.800Z Invoking https://testnet.mirrornode.hedera.com/api/v1/transactions?account.id=0.0.1001&limit=100&order=asc&timestamp=gt:1732837599.823821194&timestamp=lt:1732924800
2024-12-17T04:52:04.875Z Generated report successfully at report-2024-11-29.csv with 1 entries
cat report-2024-11-29.csv
timestamp,sender,receiver,fees,amount,balance
1732901875.430169000,0.0.5190744,0.0.1000,0,100000000,1400000002