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

besu-runner-lib

v1.0.1

Published

A library for running and managing Besu nodes

Downloads

5

Readme

Besu Runner Library

A TypeScript library for running and managing Hyperledger Besu nodes. This library simplifies the process of installing, starting, and connecting to Besu nodes via Docker. By default, Besu stores data in the Forest of Tries format. Here We Stores Data in bonsai format.

Features

  • Install the Besu Docker image.
  • Start a Besu node with specific network configurations.
  • Connect to a Besu node using custom network settings.
  • Supports real-time logs after starting or restarting a container.
  • Allows restarting and attaching to existing Besu containers.
  • Run besu on specific web socket

Prerequisites

  • Docker must be installed and running on your machine.
  • Node.js and npm must be installed to use the library and run the commands.

Installation

Besu-Runner  can be run via both github and npm library

Via Github

  1. Clone the repository:

    git clone https://github.com/metakul/besu.git
    cd besu
  2. Install the required dependencies:

    npm install

    This will install both the runtime dependencies and TypeScript development tools.

Via Npm

You can install the Besu Runner Library globally via npm to run it directly from the command line:
  1. Install the library globally:

    npm install -g besu-runner-lib
    cd besu
  2. Verify the installation:

    besu-runner-lib --help

This will show the available commands for starting, connecting, managing Besu containers.

Usage

1. Installing the Besu Docker Image

You can pull the latest Besu Docker image using the following command:

npm run install-besu

2. Starting a Besu Node

Use the besu-start command with the required command line options to start a node. Enter the information for network name, RPC HTTP port, WebSocket port (optional), and P2P port.

Supported Networks

  • MAINNET
  • SEPOLIA
  • HOLESKY
  • LUKSO
  • EPHEMERY
  • DEV
  • FUTURE_EIPS
  • EXPERIMENTAL_EIPS
  • CLASSIC
  • MORDOR

It uses --sync-mode=SNAP for a faster sync

npm run start-besu

3. Restarting an Existing Besu Container

If a Besu container was previously stopped, you can restart it and view its logs:

    1. List existing Besu containers.

    2. Choose a container ID to restart.

    3. Attach to the restarted container and view real-time logs.

Example Command Flow

 npm run start-besu

Enter the network (default: holesky): mainnet

Enter the RPC HTTP Port (default: 8545): 8001

Enter the P2P Port (default: 30303): 8002

Do you want to enable RPC Web socket (y/n)? y

Enter the RPC WebSocket Port (default: 8546): 8002

Starting Besu node with the following command:
docker run -p 8545:8545 -p 8546:8546 -p 30303:30303 -e BESU_RPC_HTTP_ENABLED=true -e BESU_NETWORK=mainnet hyperledger/besu:latest --rpc-http-enabled --rpc-ws-enabled --sync-mode=SNAP --data-storage-format=BONSAI --data-path=mainnet/besu-data