bitswipe-admin
v0.5.14
Published
Lamassu admin server. First part of Lamassu stack you need to install.
Downloads
4
Readme
Bitswipe Admin Frontend
Lamassu ATM Process Improvement Documentation
Background
BitSwipe has been contracted to assist a client with their conversion of fiat currency to Bitcoin. This client receives fiat currency from their deployed Lamassu ATMs and needs to convert this currency to Bitcoin in order to pay their ATM customers. In the process, the client receives a percent of each transaction in the form of revenue.
Current process
- The client receives fiat currency from the Lamassu ATM and deposits the currency into their bank account.
- The client then wires this currency over to a BitSwipe bank account.
- BitSwipe wires these funds to the Kraken exchange.
- BitSwipe exhanges these funds for Bitcoin.
- BitSwipe sends Bitcoin to the client’s wallet.
- The client uses the new Bitcoin to pay customer when they deposit fiat currency into the Lamassu ATM.
Proposed process
- The client receives fiat currency from the Lamassu ATM.
- The Lamassu server initiates an exchange of fiat currency to Bitcoin on the client’s behalf.
- The Lamassu server sends the Bitcoin to the customer’s wallet
- The client deposits fiat currency received from the ATM to their bank account and then wires these funds to their Kraken account.
Technical background
The Lamassu ATM runs on open source technology. The front-end ATM interface runs on javascript and Ruby and the back-end server runs on Javascript. There are various plugins for wallets (BitGo, Bitcoind, Coinapult, Blockchain.info, GreenAddress) and exchanges (Kraken, Bitstamp, Coinbase, Coinapult, Coinfloor, itBit).
Implementation Requirements for Kraken API
Signup
First, sign up for a Kraken account: https://www.kraken.com/en-us/signup
Then, verify your account in order to deposit and withdraw funds: https://www.kraken.com/u/verify
Once verified, deposit fiat funds to the USD balance of your account.
Create an API key
Under settings, and API, create a new key:
https://www.kraken.com/u/settings/api
Assign it the following permissions:
Copy down the API Key and Private Key shown.
Configuring in your admin
Open the 'Third Party Services / Kraken' panel in your Lamassu admin. Input the API Key and Private Key credentials, clicking Submit:
Then navigate to the 'Global Settings / Wallet Settings' panel. Select Kraken from the Exchange and Ticker drop-down list under the tab for each currency that you'd like to enable trading for:
Testing
Test trades by placing purchases at the machine and ensure fiat is converted into the relevant cryptocurrency in your Kraken balances.
Documentation Articles
TODO
- Research implementation for cloud infrastructure
- Kubernetes or Docker
- Simplify setup process
- Security and penetration testing
- Automate server configuration
- Documentation updates and fix broken links
- Process improvement for user experience
- Engineering team call =======
lamassu-admin
Lamassu admin server. First part of Lamassu stack you need to install.
Installation
git clone [email protected]:lamassu/lamassu-admin.git
cd lamassu-admin
npm install
You also need a Postgres running. Postgres is required for storing configuration of the remote server. Install Postgres with your package manager of choice, then:
sudo su - postgres
createuser --superuser lamassu
createdb -U lamassu lamassu
Then you need SQL scripts to seed initial configs. They are under /database
.
You can bootstrap your database by running:
psql lamassu lamassu < database/lamassu.sql
Configuration
You'll be able to configure your stack when you start the server for the first time.
Running
node app.js
Then, open it.
Deployment
Heroku
Both lamassu-admin
and lamassu-server
are deployable to Heroku.
First, you need to get a Heroku account and install the Heroku toolkit.
The easy way
deploy-all.sh
is an easy installation and deployment script. You can run it
standalone, without cloning lamassu-admin
. It'll clone both repositories to
your current working directory and deploy them to Heroku:
mkdir lamassu
curl https://raw.github.com/lamassu/lamassu-admin/master/deploy-all.sh > deploy-all.sh
chmod +x deploy-all.sh
./deploy-all.sh
You can deploy updates to your applications by rerunning deploy-all.sh
.
A bit harder way
You can also clone and deploy each app individually. To do that, clone both
lamassu-admin
and lamassu-server
.
git clone https://github.com/lamassu/lamassu-admin.git
git clone https://github.com/lamassu/lamassu-server.git
Next, deploy lamassu-admin
:
cd lamassu-admin
./deploy.sh
Visit the deployed application to configure your Lamassu ATM. Make sure to input all required API keys.
Next, to deploy lamassu-server
you need to grab DATABASE_URL
for the Postgres
database our deployment script created.
db=$(heroku config:get DATABASE_URL)
Then, go to lamassu-server
and deploy it:
DATABASE_URL="$db" ./deploy.sh
You need to pass DATABASE_URL
to it since both lamassu-admin
and lamassu-server
use the same database.
Both applications should be deployed and running.