Skip to content
develop
Go to file
Code

Latest commit

* [DDW-330] Fix wallet delegation min amount logic

* [DDW-330] CHANGELOG

* Prevent showing having trouble syncing after verification

* fix build order

* [DDW-330] Temporary dummy wallets

* [DDW-330] Remove testing function

* [DDW-330] Remove unused error message

* [DDW-330] Fix withdrawal param for createTransaction and getTransactionFee

* [DDW-330] Remove unecessary comment

* [DDW-330] Disable Yoroi ITN wallet restoration, Fix tx create/fee-estimate Api integration

* [DDW-330] Bump Daedalus version

Co-authored-by: Nikola Glumac <niglumac@gmail.com>
Co-authored-by: Samuel Leathers <samuel.leathers@iohk.io>
b919b12

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

README.md

Document maintainer: Nikola Glumac
Document status: Active

Daedalus

Build status Windows build status Release

Daedalus - Cryptocurrency Wallet

Installation

Yarn

Yarn is required to install npm dependencies to build Daedalus.

Nix

Nix is needed to run Daedalus in nix-shell.

Note: There are special instructions for installing Nix on macOS Catalina.

  1. Install nix: curl https://nixos.org/nix/install | sh
  2. Employ the signed IOHK binary cache:
    $ sudo mkdir -p /etc/nix
    $ sudo vi /etc/nix/nix.conf       # ..or any other editor, if you prefer
    and then add the following lines:
    substituters = https://hydra.iohk.io https://cache.nixos.org/
    trusted-substituters =
    trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
    max-jobs = 2  # run at most two builds at once
    cores = 0     # the builder will use all available CPU cores
    extra-sandbox-paths = /System/Library/Frameworks
    
  3. Run nix-shell with correct list of arguments or by using existing package.json scripts to load a shell with all the correct versions of all the required dependencies for development.

Development

Running Daedalus with Cardano Node

Selfnode

  1. Run yarn nix:selfnode from daedalus.
  2. Run yarn dev from the subsequent nix-shell
  3. Once Daedalus has started, and has gotten past the loading screen, run yarn byron:wallet:importer from a new terminal window. This is only required if you wish to import some funded wallets. It is also possible to import funded Yoroi wallets by running yarn yoroi:wallet:importer script.

Mainnet

  1. Run yarn nix:mainnet from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Flight

  1. Run yarn nix:flight from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Testnet

  1. Run yarn nix:testnet from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Staging

  1. Run yarn nix:staging from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Shelley Local

  1. Run nix-shell -A devops from daedalus.
  2. Run start-cluster to launch the cluster (run stop-cluster to stop it).
  3. Run yarn nix:shelley_local from daedalus in a separate Terminal window.
  4. Run yarn dev from the subsequent nix-shell
  5. Once Daedalus has started, and has gotten past the loading screen, run yarn shelley:wallet:importer from a new terminal window. This is only required if you wish to import some funded wallets.

Shelley Testnet

  1. Run yarn nix:shelley_testnet from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Shelley QA Testnet

  1. Run yarn nix:shelley_qa from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Running Daedalus with Jormungandr

ITN Selfnode

  1. Run yarn nix:itn_selfnode from daedalus.
  2. Run yarn dev from the subsequent nix-shell
  3. Once Daedalus has started, and has gotten past the loading screen, run yarn itn:shelley:wallet:importer from a new terminal window. This is only required if you wish to import some funded wallets. It is also possible to import funded legacy wallets by running yarn itn:byron:wallet:importer script.

ITN Rewards V1

  1. Run yarn nix:itn from daedalus.
  2. Run yarn dev from the subsequent nix-shell

QA Testnet

  1. Run yarn nix:qa from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Nightly Testnet

  1. Run yarn nix:nightly from daedalus.
  2. Run yarn dev from the subsequent nix-shell

Updating upstream dependencies (cardano-wallet, cardano-node & Jormungandr)

Niv is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in nix/sources.json.

Dependencies are updated with the follow nix commands:

  • Update to the latest master: nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet"
  • Update to a specific revision: nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet -a rev=91db88f9195de49d4fb4299c68fc3f6de09856ab"

Notes

nix-shell also provides a script for updating yarn.lock file:

nix-shell -A fixYarnLock

Cardano Wallet Api documentation

Api documentation for edge cardano-wallet version: https://input-output-hk.github.io/cardano-wallet/api/edge/

Externals

If you use any 3rd party libraries which can't or won't be built with webpack, you must list them in your source/main/webpack.config.js and/or source/renderer/webpack.config.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']

Testing

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

Notes: Be aware that only a single Daedalus instance can run per state directory. So you have to exit any development instances before running tests!

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: Electron)
  • --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 macOS, Linux and Windows platform. After build, you will find them in release folder. Otherwise, you will only find one for your OS.

Automated builds

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.

Windows

This batch file requires Node.js and 7zip.

scripts/build-installer-win64.bat

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

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.

You can’t perform that action at this time.