Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
gandlafbtc committed Feb 14, 2023
0 parents commit 0a42050
Show file tree
Hide file tree
Showing 6 changed files with 2,673 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PORT=3000
MINT_URL='https://legend.lnbits.com/cashu/api/v1/4gr9Xcmz3XEkUNwiBiQGoC'
FAUCET_INTERVAL=10000
SATS_PER_INTERVAL=10
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Cashu faucet

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

## 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:

```properties
# 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`
```bash
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}/`

😎
Loading

0 comments on commit 0a42050

Please sign in to comment.