Skip to content

Kronkmeister/testnet-faucet2

 
 

Repository files navigation

eCash Testnet Faucet

A testnet faucet for the eCash network.

This is based on the work from Chris Troutner.

Features

Provide several DoS mitigation features:

  • IP request rate limiting
  • Give-out rate limiting
  • Address reuse prevention

Requirements

  • node ^10.15.1
  • npm ^6.7.0

Installation

git clone https://github.com/Fabcien/testnet-faucet2.git faucet
cd faucet

npm install

Create a wallet.json file at the root of the project, with a content similar to:

{
  "mnemonic": "Your faucet wallet mnemonic",
  "cashAddress": "bchtest:qzcpnsw4nfgzn0k5lnf59pphws0egs74fc7k7lzaa4",
  "legacyAddress": "mwa65TNGEVCPfHt55aQqcwEjcWgfokuttN"
}

Then:

docker-compose up -d koa-mongodb

BCHJSTOKEN=<your fullstack.cash API token> \
npm start

Then navigate to front-end/index.html.

Structure

├── bin
│   └── server.js            # Bootstrapping and entry point
├── config                    # Server configuration settings
│   ├── env                  # Environment specific config
│   │   ├── common.js
│   │   ├── development.js
│   │   ├── production.js
│   │   └── test.js
│   ├── index.js             # Config entrypoint - exports config according to envionrment and commons
│   └── passport.js          # Passportjs config of strategies
|
├── production               # Dockerfile for build production container
|
├── src                      # Source code
│   ├── lib                  # Business logic libraries
│   ├── modules
│   │   ├── controller.js    # Module-specific controllers
│   │   └── router.js        # Router definitions for module
│   ├── models               # Mongoose models
│   └── middleware           # Custom middleware
│       └── validators       # Validation middleware
└── test                     # Unit tests

Usage

  • npm start Start server on live mode
  • npm run dev Start server on dev mode with nodemon
  • npm run docs Generate API documentation
  • npm test Run mocha tests
  • docker-compose build Build a 'production' Docker container
  • docker-compose up Run the docker container

Documentation

API documentation is written inline and generated by apidoc.

Call npm run docs to generate, then visit docs/index.html to view the docs.

Dependencies

IPFS

v2.3.0 uploaded to IPFS:

  • Get it: ipfs get QmUz4b2KwNLNvHZRTYcgrPCuKAhMB73XWN8vY8LLVVEYV1
  • Pin it: ipfs pin add -r QmUz4b2KwNLNvHZRTYcgrPCuKAhMB73XWN8vY8LLVVEYV1

License

MIT

About

A BCH testnet faucet

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages