CounterpartyXCP / counterwallet

Counterparty web wallet
https://counterwallet.io
147 stars 177 forks source link

Build Status Travis Build Status Circle Slack Status

Counterwallet

Online Webwallet for Counterparty.

Originally based off of Carbonwallet (however virtually all the original code has been removed or rewritten).

Counterwallet User Documentation

Production Systems

Features

Browser Support

Desktop

Notably, Internet Explorer is not supported, due to its lack of full Content-Security-Policy support (even with IE 11).

Mobile

Build Instructions

Before running the build system:

sudo npm install -g grunt-cli bower browserify

To build:

cd src
bower install
cd vendors/bitcoinjs-lib
npm install
browserify --standalone bitcoinjs src/index.js | uglifyjs -c --mangle reserved=['BigInteger','ECPair','Point'] -o bitcoinjs.min.js
cd ../../../
npm install

To (re)build the static (i.e. minified) site:

grunt build

To regenerate dependencies hash file (src/.bowerhashes):

grunt freeze

To enable localizations (optional):

  1. Create an account on Transifex
  2. In your home directory, create a file named .transifex and put your Transifex username and password into it in this format: user:password
  3. Run grunt build to download translations
  4. Add the languages you want to support to AVAILABLE_LANGUAGES in counterwallet.conf.json - you can use counterwallet.conf.json.example as a template. The template file contains only the setting relevant to languages and does not replace the rest of variables required in that file (refer to Federeated Node documentation for additional details about counterwallet.conf).

Setting up your own Counterwallet Server

See this link for more info.

Development

The easiest way to develop locally is to install Federated Node in Docker environment. If you already have Bitcoin Core addrindex, Counterparty Server and Counterblock, then Counterwallet can be manually installed using either of these approaches:

Manual installation in local environment (Ubuntu 16.04):

  1. Clone repository and cd into result folder
  2. NodeJS 9.x + NPM installation (if you don't have it):
    curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
    sudo apt-get install -y nodejs
  3. Dowload dependencies in the root folder: npm install
  4. Build: npm run build. The application will be stored in the ./build subdirectory.
  5. Configure: Copy counterwallet.conf.json.example to ./build/counterwallet.conf.json.
    • Notice the servers parameter in JSON file. It's responsible for API endpoint(s). By default it's https://wallet.counterwallet.io
  6. Run: npm run serve
  7. Use: Visit http://localhost:3000

Notes:

Note concerning npm install

npm install triggers a prepublish which is configured to do grunt build and will bork if you haven't done a grunt freeze after making changes to dependencies. You can use npm update to circumvent this during development.

Running tests in browser

You can run tests in your browser by doing the above steps and;

Running tests from CLI (using phantomjs headless browser)

Development without a full node

To work on counterwallet without running a full node and supporting services locally, please see the scripts located in the local development folder.

License

http://opensource.org/licenses/CDDL-1.0