Coder Social home page Coder Social logo

xcp-gui's Introduction

xcp-gui

Description

A platform-independent, Qt-based python GUI for the XCP currency and exchange. The intention of this app is to provided a standalone bundle that automatically takes care of running counterpartyd in the background, much like Bitcoin's own Bitcoin-qt app. On startup, the app takes care of making sure that the following prerequisites are satisifed, and if not alerts the user of this problem before quitting gracefully. In order, these are:

  1. Make sure bitcoind is up and running
  2. Verify bitcoind has an up to date blockchain, and if not it will wait until it does
  3. Starts counterpartyd
  4. Makes sure the counterparty db is up to date
  5. Starts the app

Dependencies

To run, the project has the following dependencies:

If possible, the project will look for PyQt5 to be installed, and then fallback to PyQt4 if needed, as is the case for Windows 7.

In addition, since the project bundles in counterpartyd within the app, and the repo itself has added it as a submodule, the dependencies for counterpartyd are needed as well and are reproduced below.

  • Python 3 packages: apsw, requests, appdirs, prettytable, python-dateutil, json-rpc, cherrypy, pycoin, pyzmq(v2.2+) (see this link for exact working versions)

To initialize the counterpartyd submodule once cloned run this from within the git directory: git submodule init followed by git submodule update --recursive

Usage

To run the program, simply run python gui.py from the command line. The usage is the same as the usage for the counterpartyd.py script, with a few exceptions.

For example, a simple command setting the appropriate RPC usernames and passwords is:

python gui.py --rpc-user=rpcuser --rpc-password=rpcpassword --bitcoind-rpc-password=PASSWORD --testnet

  • Since the app is responsible for both the GUI and and the counterpartyd server, the RPC password is no longer required in configuration, and the GUI will automatically choose one to give to both the server and the GUI.
  • There is one additional configuration parameter, --no-counterpartyd, that allows the GUI to be run without also starting the counterpartyd server. In this case, the GUI relies on a server that is already running to connect to.

Installation

The project also is meant to be built as a standalone application (akin to Bitcoin-Qt). To freeze the application, the project relies on py2app.

If installed correctly, the package can be compiled to an executable with python setup.py py2app on any architecture with all the above dependencies installed. The freezing process has not been tested so far, and there are expected to be problems, but this demonstrates a proof of concept of the cross-platform nature of this project.

xcp-gui's People

Contributors

btcfanatic avatar ecbtln avatar

Watchers

 avatar  avatar  avatar

xcp-gui's Issues

Encrypted wallet

look what happens if wallet is encrypted. Prompt user for password?

Make sure to send SIGINT to other background threads

the thread that polls for updates to the blockchain and also the thread that listens for changes to the block chain on the server side (if the server part is enabled) both need to be send the sigint / manually killed

more optimal polling by only getting diff

there are options to get the api results, such as get_issuances, and we should be able to filter based on block number to only get the diff in issuances, rather than having to reprocess all of them every time there's one new block.

support for calls on the marketplace

  1. place an order
  2. view matched orders / open orders
  3. for matched orders that need btc pay, present this interface

will be able to cancel any orders listed as open

will work between any two assets

Added error handling!

need to be able to put callbacks back on main thread to be able to alert errors and such.

Add in error handling for when the app first starts up

  • . We can potentially have a different screen for this. AKA:
  • verify bitcoind server is running
  • verify block chain is done loading. do an RPC call to check for this
  • verify counterpartyd server is running
  • verify counterpartyd block chain is done indexing
  • GO!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.