Home

Awesome

decrediton

Build Status ISC License

decrediton is a cross-platform GUI for decred written in node.js using Electron.

Installation

Currently decrediton is available on Windows, Linux, and macOS.

Decrediton will NOT use or in any way disrupt the CLI wallet file you may already be using at this time.

Download the decrediton release for your operating system on decred/decred-binaries.

On macOS, Ubuntu (14.04 LTS kernel 3.16 and later), and recent Debians, there should be no additional dependencies needed (exception: Ubuntu 18.04+, see issue #1404).

On Fedora or similar distros you may need to install the libXScrnSaver package if you see this error:

error while loading shared libraries: libXss.so.1

You can install this on a recent Fedora with the command:

sudo dnf -y install libXScrnSaver

On linux you will need to decompress the package:

tar -xvzf decrediton-X.X.X.tar.gz

and then run the file:

./decrediton

This will start dcrd and dcrwallet for you.

On macOS, double-click the .dmg file, drag the .app to your Applications folder. Double click on Decrediton.app to start.

You can also install via brew cask:

brew cask install decrediton

From there follow the on screen instructions to setup your wallet.

Options

When running a release version, there are a few options available.

To see additional debug information (including the output of dcrd and dcrwallet) run:

decrediton --debug

To pass additional arguments to dcrwallet (such as to increase the logging level run:

decrediton --extrawalletargs='-d=debug'

Development Setup

Node and Electron Versions

You need to use compatible node and electron versions to build native modules and in general to ensure the code you're working on will behave correctly in production.

The current recommended versions for the main tools are:

To ease node version management, install all top-level tools (node/npm/yarn) using nvm.

Electron extensions

Decrediton uses electron-devtools-installer to automatically install react and redux dev tools in the userData/extensions directory.

The extensions will not be updated unless you set the UPGRADE_EXTENSIONS environment variable to true.

Decred Binaries

Development using the master version of decrediton usually requires using a corresponding master version of dcrd, dcrwallet and dcrlnd.

Follow the instructions to install these from source from their respective repos:

Basic Development Setup

These steps are usually the only ones required for basic development on linux/macOS (after compiling dcrd/dcrwallet/dcrlnd from source).

For Windows users, it's usually a good idea to use MSYS2 instead of the standard cmd.exe (see below for more Windows tips).

git clone https://github.com/decred/decrediton.git
cd decrediton
mkdir bin/
cp $GOPATH/bin/dcr* bin/
yarn
yarn dev

Requirements for DEX Development Usage

The building of the dex module requires Go to be installed.

Keeping up with dcrd/dcrwallet changes

If you're developing decrediton improvements on a daily basis, you need to also keep up to date with dcrd/dcrwallet changes (especially when developing things like new grpc calls).

In that case, instead of copying the binaries to /bin it's better to symlink them so that you only need a single step (go install) to run newer versions of these tools:

cd bin
ln -s `which dcrd` dcrd
ln -s `which dcrwallet` dcrwallet
ln -s `which dcrlnd` dcrlnd

Advanced Daemon Mode

This step is only recommended if you're constantly restarting decrediton. If you're not developing on a daily basis, you can safely ignore this for the moment.

When starting decrediton in RPC (or "normal") mode, it automatically runs dcrd in the backgound to gather blockchain data. If you need to constantly restart decrediton, loading the node every time may be time consuming.

In that case, it's helpful to run the dcrd node in a separate process and simply attach to it between decrediton restarts. In order to see the advanced daemon configuration options either start decrediton with the --advanced option or open config.json and set the daemon_start_advanced flag to true as follows:

"daemon_start_advanced": true,

Note: Your config.json file is located in the following directories:

Windows - C:\Users\<your-username>\AppData\Local\Decrediton\config.json

macOS - $HOME/Library/Application\ Support/Decrediton/config.json

Linux - ~/.config/decrediton/config.json

Run the following to start the Decred daemon in a standalone terminal window:

Windows - dcrd --testnet -u USER -P PASSWORD --rpclisten=127.0.0.1:19119 --rpccert=C:\Users\<username>\AppData\Local\Dcrd\rpc.cert

macOS - dcrd --testnet -u USER -P PASSWORD --rpclisten=127.0.0.1:19119 --rpccert=$HOME/Library/Application\ Support/Dcrd/rpc.cert

Linux - dcrd --testnet -u USER -P PASSWORD --rpclisten=127.0.0.1:19119 --rpccert=~/.dcrd/rpc.cert

Once you restart decrediton, you should be presented with a screen to specify the node parameters. Note that all of them are present in the command you used to start the node for your respective system.

CLI options (including --advanced) when running yarn dev are currently not supported.

When generating the TLS keypairs for the rpc endpoint you should use the P-256 curve by starting the daemon with --tlscurve=P-256. Note that the rpccert/rpckey files need to be deleted before this.

Platform-specific instructions

macOS

To start decrediton from command-line (assuming it is installed in /Applications):

$ /Applications/decrediton.app/Contents/MacOS/decrediton

Windows

Requires at least Windows 10.

Windows is tricky, due to some things working better on MSYS2, while some things only working on cmd.exe, and native module building being very tough to get right.

On a day-to-day basis, for development and testing (of general decrediton functionality) MSYS2 is fine, and usually useful for providing GNU-like CLI tools.

However, for building native modules, you'll need to use the cmd.exe prompt.

First, from an administrative prompt (cmd.exe), install windows-build-tools:

npm install --global --production windows-build-tools

This usually works, but sometimes bugs out. If it does, try manually installing the vs tools by going opening an explorer window to c:\users\[user]\.windows-build-tools, then running vs_BuildTools.exe.

After installing windows-build-tools, open a non-administrative prompt (cmd.exe) and then try recompiling the native modules:

yarn
yarn rebuild-natives

If you have multiple versions of VS Build Tools installed, you may need to configure which version to use:

npm config set msvs_version 2015 -g

Sometimes you have to nuke /node_modules and /app/node_modules for the native modules to be forced to rebuild.

You might also run into trouble when compiling or trying to use modules compiled with a different version of node than the one that electron internally uses. In that case, switch to the same version of node from electron (check the electron/node version here) then try everything again.

The end result for module compilation should be the following files:

Note: yarn start does not currently correctly load the dcrwin32ipc module, so testing with yarn build/start will fail to correctly unload dcrd/dcrwallet when closing.

When using git bash, cmd.exe or Powershell, you might need to install MingW-w64 to get access to gcc and be able to compile libdex. After installing it, ensure gcc and python are accessible in console (add the appropriate binary paths to the %PATH% environment variable).

Raspberry Pi & Other Platforms

Building on a Raspberry Pi (and other less common platforms) requires rebuilding the native modules, given that most of them (specially grpc) do not come with precompiled binaries for them.

Do note that for the moment, support for this platform is experimental, so you might need to tweak stuff (in particular, you'll need to disable hardware acceleration and ui animations) to run decrediton on it.

yarn rebuild-natives

Building release versions

You need the binaries copied into the bin/ directly (note that symlinks don't work for production builds: you need to actually copy the executables).

You can test the production version (without most of the debugging info and with compiled and minified code) by using:

yarn build
yarn start

And finally, a packaged version (including the final standalone electron binaries) for the current platform can be built with:

yarn package

Linux

You need to make sure you have the rpm-build package installed for the building to work.

yarn package-linux

After it is finished it will have the built rpm, deb and tar.gz in the release/ directory.

If you're only interested in a tar.gz, you can alternatively use:

yarn package-dev-linux

Contact

If you have any further questions you can find us at: https://decred.org/community/

Issue Tracker

The integrated github issue tracker is used for this project.

License

decrediton is licensed under the copyfree ISC License.