Daedalus - cryptocurrency wallet
JavaScript CSS Haskell Gherkin Python Nix Other
Switch branches/tags
Clone or download
DominikGuzei Merge pull request #1039 from input-output-hk/fix/ddw-372-fix-double-…
…window-bug-in-dev-mode

Fix/ddw 372 fix double window bug in dev mode
Latest commit 955c006 Aug 8, 2018
Permalink
Failed to load latest commit information.
.buildkite [DEVOPS-788] buildkite: Put linux installers in public S3 bucket May 22, 2018
.github [DDW-325] update docs to yarn Jun 21, 2018
.storybook [DDW-148] fix merge conflicts with release/0.9.0 Feb 28, 2018
features [DDW-372] fix issues with the webwepback-stream and electron-connect … Aug 7, 2018
flow [DDW-159] Updating after develop merge May 24, 2018
installers Merge branch 'develop' into release/0.11.0 Aug 3, 2018
scripts [DDW-354] Merge in release/0.11.0 and fix conflicts Jul 13, 2018
source Merge branch 'develop' into release/0.11.0 Aug 3, 2018
storybook Merge branch 'develop' into release/0.11.0 Aug 3, 2018
tests [DEVOPS-846] shellcheck CI test for daedalus Jun 4, 2018
tls [DDW-324] Improved documentation info section Jun 20, 2018
translations [DDW-169] Fix translation manager issues Mar 16, 2018
.babelrc [DDW-47] package.json and dependencies cleanup Jan 9, 2018
.editorconfig add basic webpack electron setup with react Oct 11, 2016
.eslintignore WIP: implement the wallet send screen UI Oct 13, 2016
.eslintrc [DEVOPS-919] installers: provide BUILD_NUMBER and API_VERSION Jun 21, 2018
.flowconfig [DDW-325] ignore jsonlint in flow tests Jun 21, 2018
.gitignore [DEVOPS-846] shellcheck compliance of all scripts Jun 6, 2018
.nonsense [DEVOPS-13] Dhall configs derived (#806) Apr 14, 2018
.nvmrc [DDW47] upgrade to webpack 3 with electron-webpack Jan 8, 2018
CHANGELOG.md Merge branch 'develop' into release/0.11.0 Aug 3, 2018
LICENSE [DAEF-435] Add MIT license Sep 7, 2017
README.md [DDW-342] Update shell.nix to have fixYarnLock attribute Jul 30, 2018
appveyor.yml [DEVOPS-814] refactor installer May 23, 2018
cardano-sl-src.json cardano-sl: bump to the tip of release/1.3.0 Jul 31, 2018
cardano-sl.nix [DEVOPS-673] Move cardano-sl daedalus bridge into own nix file Mar 21, 2018
default.nix [DEVOPS-919] installers: provide BUILD_NUMBER and API_VERSION Jun 21, 2018
fetch-nixpkgs.nix work-around for nix-shell.sh wanting to build nixpkgs Mar 16, 2018
fetchNixpkgs.nix the nix 2.0 installer method Mar 16, 2018
gulpfile.js [DDW-372] fix issues with the webwepback-stream and electron-connect … Aug 7, 2018
installer-clusters.cfg [DEVOPS-814] initial testnet installer May 23, 2018
launcher-config.yaml [DEVOPS-13] webpack: provide a developer-oriented launcher-config.yaml Apr 17, 2018
lib.nix [DEVOPS-673] Pin cardano-sl git revision in one place Mar 21, 2018
nixpkgs-src.json libsass requires nixpkgs fda4b93cd4fd3775408117c380aab0f33737d30f Mar 25, 2018
nodemon.json [DDW-47] fix merge conflicts between latest base branch Jan 25, 2018
package-lock.json [DDW-342] package-lock.json Jul 25, 2018
package.json [DDW-342] Returning eslint-scope to 3.7.3 after CI is fixed Jul 30, 2018
release.nix [DEVOPS-943] release.nix: pass buildNum to installer Jul 9, 2018
shell.nix [DDW-342] Update shell.nix to have fixYarnLock attribute Jul 30, 2018
yarn.lock Merge branch 'fix/ddw-342-fix-white-screen-rendering-bug' of https://… Jul 30, 2018
yarn2nix.nix [DEVOPS-919] installers: provide BUILD_NUMBER and API_VERSION Jun 21, 2018

README.md

Document maintainer: Nikola Glumac
Document status: Active

Daedalus

Build status Windows build status Release

Daedalus - cryptocurrency wallet

Automated build

CI/dev build scripts

Platform-specific build scripts facilitate building Daedalus the way it is built by the IOHK CI:

Linux/macOS

This script requires Nix, (optionally) configured with the IOHK binary cache.

scripts/build-installer-unix.sh [OPTIONS..]

The result can be found at installers/csl-daedalus/daedalus-*.pkg.

Pure Nix installer build

This will use nix to build a Linux installer. Using the IOHK binary cache will speed things up.

nix build -f ./release.nix mainnet.installer

The result can be found at ./result/daedalus-*.bin.

Nix Shell

shell.nix provides a way to load a shell with all the correct versions of all the required dependencies for development. Run nix-shell in the daedalus directory to start the shell.

shell.nix also provides a script for updating yarn.lock. Run nix-shell -A fixYarnLock to update yarn.lock file.

Windows

This batch file requires Node.js and 7zip.

scripts/build-installer-win64.bat

The result will can be found at .\daedalus-*.exe.

Stepwise build

Install Node.js dependencies.

To ensure secure and reproducible builds we are using yarn to manage dependencies.

$ yarn install

Development

Run with:

$ export CARDANO_TLS_PATH={path-to-cardano-sl}/run/tls-files/
$ yarn run dev

Note: requires a node version >= 8 and an yarn version >= 1.7.0.

Development - with Cardano Wallet

Build and run Cardano SL

Build with:

$ brew install haskell-stack # OR curl -ssl https://get.haskellstack.org/ | sh
$ stack setup
$ stack install cpphs
$ brew install xz # OR sudo apt-get install xz-utils
$ brew install rocksdb # OR sudo apt-get install librocksdb-dev
$ git clone git@github.com:input-output-hk/cardano-sl.git
$ cd cardano-sl/
$ ./scripts/build/cardano-sl.sh

Run with:

$ tmux new-session -s cardano
$ WALLET_CLIENT_AUTH_DISABLE=1 ./scripts/launch/demo-with-wallet-api.sh

Stop with:

$ tmux kill-session -t cardano

Development - network options

There are three different network options you can run Daedalus in: mainnet, testnet and development (default). To set desired network option use NETWORK environment variable:

$ export NETWORK=testnet
$ yarn run dev

Testing

You can run the test suite in two different modes:

One-time run: For running tests once using the application in production mode:

$ yarn run test

Watch & Rerun on file changes: For development purposes run the tests continuously in watch mode which will re-run tests when source code changes:

$ yarn run test:watch

You can find more details regarding tests setup within Running Daedalus acceptance tests README file.

CSS Modules

This boilerplate out of the box is configured to use css-modules.

All .css file extensions will use css-modules unless it has .global.css.

If you need global styles, stylesheets with .global.css will not go through the css-modules loader. e.g. app.global.css

Externals

If you use any 3rd party libraries which can't or won't be built with webpack, you must list them in your webpack.config.base.js

externals: [
  // put your node 3rd party libraries which can't be built with webpack here (mysql, mongodb, and so on..)
]

For a common example, to install Bootstrap, yarn install --save bootstrap and link them in the head of app.html

<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
<link rel="image/svg+xml" href="../node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot" />
...

Make sure to list bootstrap in externals in webpack.config.base.js or the app won't include them in the package:

externals: ['bootstrap']

Packaging

$ yarn run package

To package apps for all platforms:

$ yarn run package:all

To package apps with options:

$ yarn run package -- --[option]

Options

  • --name, -n: Application name (default: ElectronReact)
  • --version, -v: Electron version (default: latest version)
  • --asar, -a: asar support (default: false)
  • --icon, -i: Application icon
  • --all: pack for all platforms

Use electron-packager to pack your app with --all options for darwin (osx), linux and win32 (windows) platform. After build, you will find them in release folder. Otherwise, you will only find one for your os.