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

bgsminer

v0.2.3

Published

Simple examle for space reservation into BitlleGasStation1 smart contract

Downloads

14

Readme

BitlleGasStation Miner

This script is a simple example built for the implementation of space reservation in BitlleGasStation1 smart contract and BTL mining.

Installation

Use the package manager npm to install BitlleGasStation Miner.

npm install bgsminer

Configuration

Replace the data in the config.js with your own.

{
    address: '0x.......................................',
    privateKey:'0x.......................................................' ,
    valueToMine: 1,
    cashOutVal: 500,
    RPC : 'https://ropsten.infura.io/',
    tankToMine: null
}

Usage

Can be used as node module

var bgsminer = require('bgsminer');
bgsminer.GetGasTank();

or can be run directly

node node_modules/bgsminer/start.js

Descriptions

The script logic is very simple and we can divide it into 4 parts.

  1. Configuration. In order to start one should enter the following to “config.js” file:
  • An address to be used for mining
  • A private key for this address
  • A number of used slots for the epoch (optionally)
  • An amount of accrued BTL for withdrawal, hence, the withdrawal will be processed when the entered amount of BTL is achieved (optionally) RPC (optionally)
  • Mining container ID or "null" for the last container created by the specified address.
  1. Registration of a container. At the start the script is checking if the entered address has any containers. In case containers are available, the script always uses the first container from the list (a smart contract returns the list from the last to the first, which means that a container with the bigger ID will be at the beginning of the list). If there are no containers, the script sends automatically a transaction for its creation and waits for a container to be created. As soon as a container is created a space reservation starts.

  2. Mining. Once per each 15 seconds the script is checking the number of the current epoch. In case it is bigger than the previous one, the script sends a transaction for mining, with the features mentioned in a Config file. Hence, we get 1 transaction per an epoch.

4.BTL Withdrawal. As soon as the quantity of accrued for withdrawal BTL tokens exceeds the set up number in Settings, the withdrawal to the entered address is processed automatically.

License

MIT