/zfaucet

Simple Zcash faucet built with Node.

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

NOTE: The service we used for cryptocurrency mining (Coinhive) for this website shut down, so this no longer works.

zfaucet

Simple Zcash(ZEC) faucet built with Node.

Build Status Coverage Status License GitHub contributors dependencies Status devDependencies Status

DB and Zcash Setup

Install Zcash

Use the Zcash Debian binary packages install guide. The Zcash 1.0 User Guide has additional information if needed. You will have to fully sync the node before you can send any payments.

sudo apt-get install apt-transport-https
wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add -
echo "deb [arch=amd64] https://apt.z.cash/ jessie main" | sudo tee /etc/apt/sources.list.d/zcash.list
sudo apt-get update && sudo apt-get install zcash

Install Redis

wget http://download.redis.io/releases/redis-4.0.9.tar.gz
tar xzf redis-4.0.9.tar.gz
cd redis-4.0.9
make
src/redis-server

Install & Run

Clone the repo.

git clone https://github.com/ovsoinc/zfaucet
cd ~/zfaucet
npm install

Save this under ~/zfaucet/.env.

RPCUSER=[Zcash RPC Username]
RPCPASS=[Zcash RPC Password]
PORT=[Webserver Port]
COINHIVEPUBKEY=[Coinhive Public Key]
COINHIVEPRIVKEY=[Coinhive Private Key]
WITHDRAWTHRESHOLD=[Coinhive Hashes Needed to Withdraw]

Run with PM2.

npm install pm2 -g
pm2 start process.json

Code Update Script

We run this as a crontab */5 * * * * ~/script.sh every 5 minutes.

#!/usr/bin/env sh
cd ~/zfaucet
git fetch && git reset --hard origin/master

External API Admin tool

Create a new key

node admin external new-key

List keys

node admin external list-keys

Contributors (:clap:)

super3 montyanderson marktellez
super3 montyanderson marktellez