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 🙏

© 2025 – Pkg Stats / Ryan Hefner

noob-ethereum

v3.0.4

Published

A simple Ethereum library

Readme

About The Project

This repository was made to provide various utilities for interacting with Ethereum along with implementation of methods highlighting crucial tasks conducted by in the permissionless environment inherent with blockchain networks.

The goal of this repository is to educate developers about how various aspects of Ethereum (and blockchain protocols in general) and to provide modules to not re-invent the wheel when dealing with Ethereum.

What Can I Do?

  • Use either your local full node or Alchemy/Infura for making JSON-RPC queries (and getting sanitised results).
  • Seed blocks or transaction receipts (based on certain conditions).
  • Verify Merkle root integrity and compute Merkle proofs.
  • RLP serialisation utilities

Getting Started

Install the package with:

npm i noob-ethereum

Provider Use

You can instantiate a provider as shown below (you will require a JSON-RPC endpoint which you can get from your full node or a JSON-RPC provider like Alchemy, Infura etc):

import { Provider, Searcher, utils } from 'noob-ethereum';

// Insert RPC URL as argument (e.g. http://localhost:8545 for full node, or any Alchemy or Infura endpoint)
const provider = Provider.init('<RPC-URL>');
// or
const provider = Provider.init(process.env.INFURA_URL as string);

/* Fetch latest block */
const block = await provider.getLatestBlock();
/* Fetch block by number */
const query = await provider.getBlockByNumber(12_964_760, true);

/* Seed latest block to JSON file (include full transaction objects)  */
await provider.seedLatestBlock(true, 'src/junk').then();

/* Seed block by number to JSON file (only include transaction hashes - preferable if you are not interested in transaction data) */
await provider.seedBlockByNumber(false, 12_964_760, 'src/junk').then();

/* Get Ethereum block by number */
provider.getBlockByNumber(15_447_147, true).then(console.log);

/* Detect for Optimism batch publication from latest block */
provider.getLatestBlock(true).then((res) => {
  const sequencer = '0x6887246668a3b87F54DeB3b94Ba47a6f63F32985'.toLowerCase();
  const ctc = '0x5E4e65926BA27467555EB562121fac00D24E9dD2'.toLowerCase();

  const batchTxs = Searcher.findTransactionInteraction(res, sequencer, ctc);
  console.log(`batch tx hashes (from block ${utils.decimal(res.number)})`, batchTxs);
});

Other Dependencies

This library aims to be as local as possible, hence dependencies are kept to a minimum, the wheel is only re-invented where it is determined to be relevant. Stuff like cryptographic hash functions like SHA3 (keccak256) are best left to the professionals hence it is required as a dependency here.