- when user wants to connect, web client generates unique public/private key pair for this connection
- web client generates a unique token
- web client sends request to server with a unique token
- server submits entry to DB with unique token, sends back "success" if added
- on success, web client displays unique token and public key in QR code to mobile client
- after scanning in QR code, mobile client generates its own public/private key pair for this connection, encrypts public addresses and its own public key with web client's public key
- mobile client uploads its device UUID, encrypted public addresses and its encrypted public key, and unique token to server
- server updates DB with these details, sends back "success" to mobile client if added
- web client long polls with unique token to request details
- server returns details if found and removes the entry from DB (otherwise just keeps returning false)
- web client decrypts public addresses and mobile public key and stores them for future use during that session
- web client generates transaction details
- web client encrypts transaction details with mobile client public key
- web client submits transaction details to server with a unique transaction UUID
- server stores transaction details on DB
- server sends push notification to mobile client with transaction UUID and relevant details
- mobile client requests full transaction details from server using unique transaction UUID
- server returns and removes transaction details from DB if found
- mobile client decrypts transaction payload with mobile client private key
- mobile client displays full transaction details and requests TouchID approval
- mobile client signs transaction and executes
If you'd like to keep a separate Python environment for this project's installs, set up virtualenv
$ pip install virtualenv virtualenvwrapper
Add the following to your ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs~
export PROJECT_HOME=$HOME/Devel
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
source /usr/local/bin/virtualenvwrapper.sh
From the project directory, run these commands to install the wallet-bridge package in a virtualenv called "wallet-bridge"
$ mkvirtualenv wallet-bridge
$ pip install -r requirements.txt
$ python setup.py develop
In another terminal, start local Redis instance
$ redis-server
Run the project locally
$ wallet-bridge --redis-local --push-local --api-local
Use a tool like Postman to create requests to interact with the server.