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

@bpanel/faucet

v0.1.2

Published

A plugin for adding a faucet interface for your bPanel instance, includes rate limiting for the API requests

Downloads

15

Readme

bPanel Faucet Plugin

This plugin adds a rate limited faucet plugin to your bPanel instance. There are both client and server side components to this plugin, which means that a minimum version of bPanel v1.0.0-beta is required (since older versions do not support backend plugins).

preview

Features

  • Multi-network support: Bitcoin, Bitcoin Cash, Handshake
  • Automatic address validation
  • Server-side rate limiting (defaults to 1 request per hour)
  • Blacklisting all non-faucet wallet endpoints
  • Displays faucet balance and a return address
  • Plugs into the bPanel theming system for easy, custom skins

Installation

Make sure you've got the latest version of bpanel-cli installed

$ npm install -g @bpanel/bpanel-cli

Then install the plugin with bpanel-cli:

$ bpanel-cli install @bpanel/faucet

Finally, if you've got bPanel already running, make sure to restart the server. Otherwise, just start bPanel as normal:

# from your bPanel project directory
$ npm run start

This plugin is purely an interface with a compatible wallet node. By default, you will need to have a wallet server running on the node you're connecting to and it will need to have a (funded) wallet with the id faucet in order to have full functionality. See steps below for additional configuration options.

Development and Setup

By default, the plugin will blacklist all backend calls to wallet endpoints not made to a wallet with the id faucet. This is to avoid accidentally opening up other wallets on your server to the faucet service.

Faucet Admin

Absent any other kind of authentication, you can set the config variable faucet-admin in your bPanel configs which will disable the blacklisting and rate limiting. This can be helpful when testing during development.

Faucet ID

Another useful configuration is faucet-id which lets you set a custom wallet id for the faucet source. For example, if you're using a dedicated node for your faucet, you might just want to use your primary wallet since that is the default wallet created by a bcoin, bcash, or hsd node.

Faucet Passphrase

If your faucet wallet has a passphrase set (highly recommended), you can set it for your client with the faucet-passphrase config.

Setting configs

The bPanel Faucet plugin uses the bPanel configuration system, built with bcfg. These can be set at runtime (i.e. npm run start -- --faucet-admin=true --faucet-id=foobar), in your bpanel's config.js file or with an environment variable (BPANEL_FAUCET_ID=primary). Read more about bPanel's configurations here.

Customizing the Rate Limiter

The rate limiter uses the express-rate-limit middleware for Express. To customize the limiter, you can change the options in the apiLimiter handler in /server/handlers.js.