DCore integration with General Bytes ATM
This repository contains:
- DCore wallet wraper to serve as hot wallet
- Extension library
- Setup tutorial for hot wallet, Bittrex exchange and extension library
DCore unix wallet setup
1.Clone repository to your custom destination on ATM server
git clone https://github.com/DECENTfoundation/DCore-ATM-integration
2.Check the version of docker
If you dont have docker
sudo apt-get install docker-ce
Or look further here
wget -qO- https://get.docker.com/ | sh
3.Replace USERNAME with your username on the machine (if you don't know your username, use 'whoami' command)
sudo usermod -aG docker USERNAME
4.Logout from server and login again
5.Enter custom DCore wallet folder and execute commands one at the time
cd decent\_atm sudo su sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose docker-compose -f production.yml up -d docker ps
6.Now you should see 3 decent docker images running
7.Import your private key/account into the wallet
You do this by making a HTTP call to localhost:9696 and providing your account name and private key You can install httpie for making http calls from command line
replace ACCONT_NAME_ON_DECENTNETWORK and PRIVATE_KEY with your credentials
http -b :9696/de/initialSetup/ACCONT_NAME_ON_DECENTNETWORK,PRIVATE_KEY
Thats all, with this step your DCore wallet is up and running. Make sure your imported account has enough balance on it. If it doesn't, you need to send some DCT to it.
The API for wallet is here
You can check if account was properly imported by
http -b :9696/d/listMyAccounts
Check the balance on imported accounts
http -b :9696/balance
If you want to import another account, you need to delete file wallet.json
and import new account again.
Complete wallet API is here
Library installation on server
1.Upload file on server
(You can use cyberduck on MAC to upload conveniently)
2.switch to root
3.Enter General Bytes server folder:
4.copy JAR extension into this folder
cp /path_where_you_downloaded_jar . cd ../../..
5.restart the server
./batm-manage stop all ./batm-manage start all
This part is done, now go into admin setup
1.Go to Crypto settings
At this stage you should see DCT in the menu Crypto Currency
Set parameters EXACTLY like on this screenshot
3.In the Hot Wallet Buy - parameters field put
5.Go to Terminals and pick your terminal where you want to add DCT coin
6.In terminal settings in Currencies part add DCT crypto currency
7.In Crypto Settings part set DCT settings as you name them
Now you are all ready to go. You might need to restart physical machine in order to have new settings to show up
Bittrex exchange integration
1.Go to Bittrex exchange and click Settings.
2.Click on API Keys to view key settings.
3.Add new key, and allow all settings like you see in this screenshot
4.Click Save, put your Authenticator key - two factor authentication (if you don't have it activated, you will need to do that in Two-Factor Authentication in the same Settings screen)
Now you will be able to see Key and Secret, like this
Write down the Key and the Secret in the safe place, because this is the only time you are able to copy a key secret. If you lose it, you will later need to re-create new key to see new secret.
5.Now go to General Bytes admin.
Add new Crypto setting, where you setup new DCT buy configuration with Bittrex exchange.
You should see option of Bittrex exchange visible
Put parameters in the format
6.Choose appropriate strategy, and you are good to go.
BITTREX INTEGRATION WORKS ONLY WITH BTC / DCT PAIR AND NO OTHER! YOU NEED TO ENSURE YOU HAVE ENOUGH FUNDS IN BTC OR DCT
If you upgraded General Bytes server or terminal, you need to copy library into extension folder again, Your ATM will not work due to connection errors. You can see this setup in library installation guide
If you want to check logs from DCore wallet, go to home directory of wallet /DCore-ATM-integration and run command
docker-compose -f production.yml logs -f atm