• Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    JavaScript
  • License
    ISC License
  • Created about 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cross-platform GUI for Decred.

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:

  • Node: 14.16.1
  • Npm: 6.4+
  • Yarn: 1.12+

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

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:

  • app/node_modules/blake-hash/bin/win32-x64-64/blake-hash.node
  • app/node_modules/dcrwin32ipc/build/Release/dcrwin32ipc.node
  • app/node_modules/grpc/src/node/extension_binary/electron-v3.0-win32-x64/grpc_node.node

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.

More Repositories

1

dcrd

Decred daemon in Go (golang).
Go
724
star
2

atomicswap

On-chain atomic swaps for Decred and other cryptocurrencies.
Go
505
star
3

dcrwallet

A secure Decred wallet daemon written in Go (golang).
Go
207
star
4

dcrdex

The Decred Decentralized Exchange (DEX), powered by atomic-swaps.
Go
186
star
5

dcrdata

Decred block explorer, with packages and apps for data collection and storage. Written in Go.
Go
129
star
6

politeia

Go
110
star
7

decred-release

Decred binary releases.
Go
86
star
8

dcrdocs

Documentation for Decred.
Shell
81
star
9

dcrstakepool

Stakepool for Decred.
Go
73
star
10

politeiagui

JavaScript
62
star
11

dcraddrgen

dcraddrgen is a simple offline address generator for Decred.
Go
60
star
12

decred-binaries

Binary archives for Decred releases.
56
star
13

dcps

Decred Change Proposals (DCPs).
40
star
14

dcrweb

Decred website code.
SCSS
37
star
15

cspp

Decred CoinShuffle++
Go
33
star
16

dcrpool

decred mining pool
Go
31
star
17

dcrtime

Decred anchored timestamp client, proxy, and server.
Go
28
star
18

tinydecred

Python tools for Decred
Python
27
star
19

vspd

A Voting Service Provider (VSP) for the Decred network.
Go
19
star
20

dcrwebapi

Go
18
star
21

dcrtimegui

Timestamp files with blockchain
JavaScript
15
star
22

dcrdesign

Decred Design System
15
star
23

pi-ui

Politeia UI library
JavaScript
14
star
24

contractor-mgmt

Contractor management system written in Go that uses politeiad as a backend
Go
12
star
25

tumblebit

Go
11
star
26

dcrseeder

Decred Seeder
Go
11
star
27

dcrros

Go
10
star
28

dcrdocker

Dockerfiles for Decred.
10
star
29

decred-php-api

PHP API for the Decred Cryptocurrency
PHP
9
star
30

umbrel-app-store

8
star
31

dcrpayments

mono repo that houses various libraries/utilities for accepting Decred payments
PHP
8
star
32

base58

Go
7
star
33

RFPs

Decred Request For Proposals (RFPs).
7
star
34

dcrvotingweb

Demo for Decred hard fork voting.
CSS
6
star
35

dcrdevdocs

Decred Development Documentation
Shell
5
star
36

dcraddrscanner

Kotlin
5
star
37

dcrlnlpd

Go
5
star
38

release

Go
4
star
39

decred-magento-plugin

Decred API for Magento
PHP
4
star
40

dexweb

HTML
3
star
41

testnetfaucet

Decred testnet faucet.
Go
3
star
42

dcrbounty

SCSS
3
star
43

dcrctl

Command-line client for interacting with the JSON-RPC servers of dcrd and dcrwallet
Go
3
star
44

haste

2
star
45

cmsgui

JavaScript
2
star
46

dcrtest

Go
2
star
47

dcrdex-assets

static assets for dcrdex
Go
1
star
48

dcrblog

Decred Blog
SCSS
1
star