gandlafbtc / cashu-faucet

A simple nodejs faucet that slowly releases cashu tokens

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cashu faucet 🥜🚰

⚠️ Early development, use at own risk

A faucet that you can charge up with Cashu tokens and then releases fractions of that token slooowlyyy.

How to install

git clone https://github.com/gandlafbtc/cashu-faucet.git
cd cashu-faucet
npm i

How to use

Setting up a Cashu faucet is a easy 3 step process:

1. Configure

Set the values to your liking in the .env file:

# Express server port
PORT=3000
# Cashu mint URL
MINT_URL='https://legend.lnbits.com/cashu/api/v1/4gr9Xcmz3XEkUNwiBiQGoC'
# Min Interval in milliseconds. Only schedules new token after the current token is redeemed 
FAUCET_INTERVAL=10000
# Satoshis per interval. 
SATS_PER_INTERVAL=10

2. Run

Run this command in the directory:cashu-faucet

node server.js

3. Charge

Go to your browser, and call the following url. Make sure you provide a valid token:

https://{your-host}:{port}/charge?token={cashu_token}

Done!

The faucet will now start dripping Cashu tokens at https://{your-host}:{port}/

😎

About

A simple nodejs faucet that slowly releases cashu tokens


Languages

Language:JavaScript 100.0%