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

@pledgecamp/blockchain-utils

v0.1.1

Published

Pledgecamp blockchain utilities library

Downloads

18

Readme

Pledgecamp Blockchain Utils

A NodeJS CLI project that allows a user to perform some basic operations (specific to Pledgecamp) with either the Binance or Ethereum network.

Further documentation: https://docs.pledgecamp.com/utilities/blockchain-utils.html

Usage (npm tasks)

Scripts take most of their configuration from environment variables. See the Environment Variables section below.

Append :dev to scripts to run in development mode, e.g. npm run balance:dev

Balance check

npm run balance

Block Info

npm run block-info

Transfer

npm run transfer

Key directories

  • ./src/chains - Helper functions for dealing with supported blockchains (Binance, Ethereum)
  • ./src/cli - Command line tools
  • ./src/config - Library configuration

Environment variables

This section lists all configurable environment variables. These are read from .env. .env.dist can be used as a template.

  • NODE_ENV - Project environment setting

BLOCKCHAIN SETTINGS

  • BLOCKCHAIN_MNEMONIC_PHRASE - 24 word mnemonic phrase

  • BLOCKCHAIN_MNEMONIC_PASS - Wallet password

  • CURRENT_BIP_INDEX - Marker for latest final BIP wallet index (for looping through all drop wallet balances)

  • BALANCE_BINANCE_ASSET - Symbol for Binance DEX PLG token

  • BALANCE_BINANCE_COMMON - Common name for Binance DEX PLG token

  • BALANCE_CONTRACT_ASSET - Symbol for ERC20 PLG token

  • BALANCE_CONTRACT_COMMON - Common name for ERC20 PLG token

  • BINANCE_INITIAL_WALLET_INDEX - Marker for first BIP wallet index for Binance transactions

  • BINANCE_COMMUNAL_WALLET_INDEX - Marker for BIP wallet index for Binance communal wallet

  • BINANCE_BLOCK_TIME - Expected time to wait for a block to complete confirmation process

  • BINANCE_CONFIRMATIONS_NEEDED - Expected number of confirmation to wait for before deeming transaction as confirmed and complete

  • BINANCE_API_URL - Binance API address

  • BINANCE_NETWORK - Identifier for different testnet or mainnet network settings

  • BINANCE_DECIMAL_PLACES - Number of decimal places for Binance DEX token

  • ETHEREUM_INITIAL_WALLET_INDEX - Marker for first BIP wallet index for Ethereum transactions

  • ETHEREUM_COMMUNAL_WALLET_INDEX - Marker for BIP wallet index for Ethereum communal wallet

  • ETHEREUM_BLOCK_TIME - Expected time to wait for a block to complete confirmation process

  • ETHEREUM_CONFIRMATIONS_NEEDED - Expected number of confirmation to wait for before deeming transaction as confirmed and complete

  • ETHEREUM_NETWORK_ID - Ethereum Network ID

  • ETHEREUM_TOKEN_SYMBOL - Ethereum token symbol for PLG

  • ETHEREUM_TOKEN_DECIMAL_PLACES - Number of decimal places for ERC20 token

  • ETHEREUM_BIP_TOKEN_INDEX - BIP Token index code for Ethereum

  • ETHERSCAN_API_URL - Etherscan API addres

  • ETHERSCAN_API_KEY - Etherscan API key

  • ETHERSCAN_RATE_LIMIT - Etherscan API call rate limit

  • ETHEREUM_RPC_PROVIDER_URL - RPC provider URL

  • ETHEREUM_RPC_PROVIDER_METHOD - RPC Provider connection method

  • ETHEREUM_CONTRACTS_PATH - Path to Pledgecamp contract artifacts built with Hardhat

  • ETHEREUM_CONTRACT_ACCOUNT_MANAGER_ADDRESS - Deployed Account Manager contract address

  • ETHEREUM_CONTRACT_ACCOUNT_STORAGE_ADDRESS - Deployed Account Storage contract address

  • ETHEREUM_CONTRACT_ADMINISTRATOR_ADDRESS - Deployed Administrator contract address

  • ETHEREUM_CONTRACT_CAMPSHARE_MANAGER_ADDRESS - Deployed CampShare Manager contract address

  • ETHEREUM_CONTRACT_CAMPSHARE_STORAGE_ADDRESS - Deployed CampShare Storage contract address

  • ETHEREUM_CONTRACT_MODERATOR_ADDRESS - Deployed Moderator contract address

  • ETHEREUM_CONTRACT_TOKEN_ADDRESS - Deployed PLG Token contract address

GAS CALCULATION

ETHEREUM_GAS_OPS_LVX refer to gas multipliers for determining transaction gas price. LV1 is the highest, and results in a more expensive (faster) transaction. LV6 is the lowest, and results in a cheaper (slower) transaction.

  • ETHEREUM_GAS_API_URL - URL for EthGasStation API
  • ETHEREUM_GAS_API_KEY - EthGasStation API key
  • ETHEREUM_GAS_LEVEL_CRITICAL - When a wallet balance has passed this critically low balance threshold a warning will be triggered. This value represents the absolute wallet balance value in wei
  • ETHEREUM_GAS_LEVEL_WARNING_PERCENT - When a wallet balance has passed this low balance threshold a warning will be triggered. This value represents a percentage (in whole numbers) above the critical gas level
  • ETHEREUM_GAS_PRICE_CHECK_INTERVAL - Setting of time interval between each extraction of gas prices from EthGasStation
  • ETHEREUM_GAS_OPS_LV1 - Level 1 (highest) gas multiplier
  • ETHEREUM_GAS_OPS_LV2 - Level 2 gas multiplier
  • ETHEREUM_GAS_OPS_LV3 - Level 3 gas multiplier
  • ETHEREUM_GAS_OPS_LV4 - Level 4 gas multiplier
  • ETHEREUM_GAS_OPS_LV5 - Level 5 gas multiplier
  • ETHEREUM_GAS_OPS_LV6 - Level 6 (lowest) gas multiplier

Testing

Run unit tests using the following command:

npm run test