Cryptocurrency token transaction router and mass distribution system.
Host the server-side applications required for Bitsplit to run properly:
- Daemon that processes distributions
- API that allows insert/view of distributions
- Bitcoin (BTC)
- Counterparty (XCP)
The Bitsplit code relies on Python 2.7.x, and can be run in a virtual environment to ensure that it is run properly in a sandbox. It also relies on the servers/APIs installed "somewhere" that let you interface with the Bitcoin, Counterparty, etc. networks.
Basic software dependencies:
- Python 2.7.x - https://www.python.org/downloads/
- MongoDB 3.0.x - https://www.mongodb.org/downloads/
- Hardening is likely required, but has not been researched yet.
- Bitcoind - https://github.com/bitcoin/bitcoin
- Counterpartyd - https://github.com/CounterpartyXCP/counterpartyd
- Requires fully up to date and indexed bitcoind node.
-
Clone the repository.
$ git clone git@github.com:tokenly/bitsplit-server.git
-
Move to the source code folder and create a virtual environment.
$ cd bitsplit-server $ virtualenv venv
-
Turn on the virtual environment, and install the required packages.
$ source venv/bin/activate $ pip install -r requirements.txt
Now that you have things installed, you need only start the two primary services that make up the Bitsplit project:
-
Start the Daemon and process distributions:
./bitsplitd
-
Start the API and allow end-users to make requests:
./api
All endpoints accept and return data in JSON format.
Create a new distribution.
Receive the details for a specific distribution.
Inside the /settings/ folder, there are three major files:
- bitcoin.py - Bitcoind settings and credentials
- bitsplit.py - Bitsplit, mongo, fees, constants, and mailer settings
- counterparty.py - Counterpartyd settings and credentials
The majority of what you will need to change are the bitcoin and counterparty credentials to point to the instances you wish to use; as noted in the earlier sections.
Other sections of note, primarily in the bitsplit.py file, are:
- Database settings (currently default)
- SMTP settings
- Reporting email addresses
Inside the /settings/ folder, there will be two major files:
- bitsplit.py - As mentioned above, these are the system settings
- api.py - The host/ports for the API
The majority of what you will need, with respect to the API, will be in the api.py file.
- Create distribution via API, providing protocol, addresses, and quantities.
- Distribution created, providing the address to send BTC funds to, including any additional fees.
- Verify that funds are provided for BTC to fund distribution.
- Create listed distributions transactions of the funds requested to
the addresses provided. Making use of
sendmany
call. - Verify that all transactions have been completed via confirmations.
- Process any webhooks or notification steps.
- Finalize distribution and archive.
- Create distribution via API, providing protocol, asset, addresses, and quantities.
- Distribution created, providing the address to send BTC funds and XCP assets to, including any additional fees.
- Verify that funds are provided for BTC and XCP to fund distribution.
- Create listed distributions transactions of the asset requested to the addresses provided.
- Verify that all transactions have been completed via confirmations.
- Process any webhooks or notification steps.
- Finalize distribution and archive.