BCH-Consolidating-CoinJoin / ccoinjoin-server

koa API server implementing a Consolidating CoinJoin described here: https://gist.github.com/christroutner/457b99b8033fdea5ae565687e6360323
MIT License
0 stars 0 forks source link

Consolidating CoinJoin

This is an API server forked from this koa boilerplate. It implements the Consolidating CoinJoin protocol. It works with this BCH command-line wallet.

Disclaimer: It is the opinion of some educated people that a server running this software on BCH mainnet may be subject to USA money transmission laws. Other educated people disagree with that opinion (source). No effort has been expended to research the legality of the this software, that is the responsibility of the end user. This software is intended to only run on testnet, as a proof-of-concept of how software can be used to protect individual sovereignty and defend against government overreach.

Efforts are currently under way to allow users to run this server as a tor hidden service (with a .onion address). If you'd like to know more, feel free to ask for a status update on this Discord channel

Future improvements to be made:

js-standard-style

Build Status

Coverage Status

Greenkeeper badge

Requirements

Installation

Installation is different depending on if you want to create a development server for developing the code, or a production server for setting up your own Consolidating CoinJoin service.

Development

Production

This server requires a Mongo database, and runs over tor by default, so it uses Docker Compose to run in production. This tutorial shows how to setup Docker. This tutorial shows how to setup Docker Compose. Here are some commands to build and run this application with Docker Compose:

By default, the server connects to the tor network and broadcasts its .onion address on the IPFS network.

It is assumed that a production server will have nginx sitting in front of the docker containers when running the server on the regular internet. Nginx will serve static content, handle SSL, and proxy API calls to the docker container on port 5000.

Structure

├── bin
│   └── server.js            # Bootstrapping and entry point
├── config                   # Server configuration settings
│   ├── env                  # Environment specific config
│   │   ├── common.js
│   │   ├── development.js
│   │   ├── production.js    # Customize YOUR server settings here.
│   │   └── test.js
│   ├── index.js             # Config entrypoint - exports config according to envionrment and commons
│   └── passport.js          # Passportjs config of strategies
├── src                      # Source code
│   ├── 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

License

MIT