The open source cryptocurrency wallet for ada, built to grow with the community
See the codeDocument maintainer: Daniel Main
Document status: Active
Daedalus - Cryptocurrency Wallet
For help using Daedalus or troubleshooting an individual wallet issue, see the Daedalus Support guide.
Service response and GitHub issue triage targets are documented in Service Level Targets.
Community contributions to Daedalus are welcome. For information about reporting issues, working on issues, testing changes and submitting pull requests, see CONTRIBUTING.md.
GitHub issue labeling, assignment and Good First Issue standards are documented in Issue Triage.
Yarn is required to install npm dependencies to build Daedalus.
Nix is needed to run Daedalus in nix develop shell.
Install upstream nix using Determinate Nix Installer
$ curl -fsSL https://install.determinate.systems/nix | sh -s -- install
Employ the signed IOHK binary cache:
$ sudo mkdir -p /etc/nix
$ sudo vi /etc/nix/nix.custom.conf # ..or any other editor, if you prefer
and then add the following 5 settings are set to:
trusted-users = <your_user_id>
substituters = https://cache.iog.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
experimental-features = nix-command flakes
# If you are running on a Mac with Apple Silicon chip, but want to also build for Intel:
extra-platforms = x86_64-darwin aarch64-darwin
Reload nix-daemon.
sudo launchctl remove org.nixos.nix-daemon
ps aux | grep nix-daemon
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo systemctl stop nix-daemon.service nix-daemon.socket determinate-nixd.socket
ps aux | grep nix-daemon
sudo systemctl start nix-daemon.socket determinate-nixd.socket
Run nix develop with a correct argument or by using existing package.json scripts to load a shell with all the correct versions of all the required dependencies for development, e.g.:
nix develop -L .#mainnetyarn nix:mainnetIf you have direnv installed, you can use it to automatically load the appropriate Nix development shell when entering the project directory.
Allow direnv for this directory:
$ direnv allow
By default, the preprod environment will be loaded. To use a different network, set the DAEDALUS_CLUSTER environment variable:
$ export DAEDALUS_CLUSTER=mainnet # Use mainnet
$ export DAEDALUS_CLUSTER=preview # Use preview testnet
The environment will automatically reload when you cd into the project directory.
Notes:
If you get SSL error when running nix develop (SSL peer certificate or SSH remote key was not OK) try the next steps:
$ nix-env -e *
$ curl -L https://nixos.org/nix/install | sh
Notes:
If you get a chrome sandbox error when running Daedalus, you can disable the sandbox by setting the environment variable.
$ export ELECTRON_DISABLE_SANDBOX=true
Notes:
| Parameter | Value |
|---|---|
| slotLength | 0.2 sec |
| epochLength | 50 slots |
| desiredPoolNumber | 3 |
| minimumUtxoValue | 1 ADA |
yarn nix:mainnet from daedalus.yarn dev from the subsequent shellyarn nix:preview from daedalus.yarn dev from the subsequent shellyarn nix:preprod from daedalus.yarn dev from the subsequent shellDaedalus, by default, uses the following metadata server for all networks except for the mainnet: https://metadata.cardano-testnet.iohkdev.io/.
It's also possible to use a mock server locally by running the following command in nix develop prior to starting Daedalus:
$ mock-token-metadata-server --port 65432 ./utils/cardano/native-tokens/registry.json
Mock metadata server running with url http://localhost:65432/
Then proceed to launch Daedalus and make sure to provide the mock token metadata server port:
$ MOCK_TOKEN_METADATA_SERVER_PORT=65432 yarn dev
This enables you to modify the metadata directly by modifying the registry file directly:
$ vi ./utils/cardano/native-tokens/registry.json # ..or any other editor, if you prefer
Use the following command to check if the mock server is working correctly:
$ curl -i -H "Content-type: application/json" --data '{"subjects":["789ef8ae89617f34c07f7f6a12e4d65146f958c0bc15a97b4ff169f1"],"properties":["name","description","ticker","unit","logo"]}'
http://localhost:65432/metadata/query
... and expect a "200 OK" response.
This option is only for troubleshooting windows specific issues with hardware wallets. It is not recommended to use Windows as a developer environment.
Most of the commands need nix and will run only on Linux or macOS.
C:\Program Files\Daedalus Testnetyarn global add windows-build-tools (if this does not work extract daedalus\nix\windows-usb-libs.zip under daedalus\build folder)yarn config set msvsversion 2015 --globalyarn installyarn dev:windowsNix flake is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in flake.nix.
Dependencies are updated in the inputs section of flake.nix followed with e.g.:
nix flake lock --update-input cardano-wallet
Api documentation for edge cardano-wallet version: https://input-output-hk.github.io/cardano-wallet/api/edge/
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']
You can debug the main process by following one of these approaches:
The inspector runs on port 9229
You can link libraries with Daedalus using one of the following steps:
yalcyalc globally using yarn global add yalc.yalc publish from the library's root directory that you want to link with Daedalus.yalc add <package-name> or preferably yalc link <package-name>.yalc push.yarn linknode_modules/react and yarn link.react-dom package in the same directory and run yarn link again.yarn link, yarn link react and yarn link react-dom.yarn link <package-name>.yarn build:watch from the library's root directory.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!
It is possible to build, and run just the Daedalus package, that would be bundled inside an installer, avoiding building of the installer.
Build:
nix build -L .#daedalus-mainnet
Run:
nix run -L .#daedalus-mainnet
Build:
nix build -L .#daedalus-mainnet
Run:
nix run -L .#daedalus-mainnet
If you want to run an Intel build from an Apple Silicon machine:
nix run -L .#packages.x86_64-darwin.daedalus-mainnet
Platform-specific build commands facilitate building Daedalus installers the way it is built by the IOHK CI:
These commands require Nix, optionally configured with the IOHK binary cache (recommended, see above).
Run this from a Linux machine:
nix build -L .#installer-mainnet
The result can be found at result/daedalus-*.bin.
Run this from a Linux machine (cross-building):
nix build -L .#installer-mainnet-x86_64-windows
The result will can be found at result/daedalus-*.exe.
Run this from a macOS machine:
nix build -L .#installer-mainnet
If you want to build an Intel version from an Apple Silicon machine:
nix build -L .#packages.x86_64-darwin.installer-mainnet
The result can be found at result/daedalus-*.pkg.
111,745 followers · starred Jan 2018
771 followers · starred May 2021
125 followers · starred Feb 2018
76 followers · starred Apr 2021
The open source cryptocurrency wallet for ada, built to grow with the community
See the codeDocument maintainer: Daniel Main
Document status: Active
Daedalus - Cryptocurrency Wallet
For help using Daedalus or troubleshooting an individual wallet issue, see the Daedalus Support guide.
Service response and GitHub issue triage targets are documented in Service Level Targets.
Community contributions to Daedalus are welcome. For information about reporting issues, working on issues, testing changes and submitting pull requests, see CONTRIBUTING.md.
GitHub issue labeling, assignment and Good First Issue standards are documented in Issue Triage.
Yarn is required to install npm dependencies to build Daedalus.
Nix is needed to run Daedalus in nix develop shell.
Install upstream nix using Determinate Nix Installer
$ curl -fsSL https://install.determinate.systems/nix | sh -s -- install
Employ the signed IOHK binary cache:
$ sudo mkdir -p /etc/nix
$ sudo vi /etc/nix/nix.custom.conf # ..or any other editor, if you prefer
and then add the following 5 settings are set to:
trusted-users = <your_user_id>
substituters = https://cache.iog.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
experimental-features = nix-command flakes
# If you are running on a Mac with Apple Silicon chip, but want to also build for Intel:
extra-platforms = x86_64-darwin aarch64-darwin
Reload nix-daemon.
sudo launchctl remove org.nixos.nix-daemon
ps aux | grep nix-daemon
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo systemctl stop nix-daemon.service nix-daemon.socket determinate-nixd.socket
ps aux | grep nix-daemon
sudo systemctl start nix-daemon.socket determinate-nixd.socket
Run nix develop with a correct argument or by using existing package.json scripts to load a shell with all the correct versions of all the required dependencies for development, e.g.:
nix develop -L .#mainnetyarn nix:mainnetIf you have direnv installed, you can use it to automatically load the appropriate Nix development shell when entering the project directory.
Allow direnv for this directory:
$ direnv allow
By default, the preprod environment will be loaded. To use a different network, set the DAEDALUS_CLUSTER environment variable:
$ export DAEDALUS_CLUSTER=mainnet # Use mainnet
$ export DAEDALUS_CLUSTER=preview # Use preview testnet
The environment will automatically reload when you cd into the project directory.
Notes:
If you get SSL error when running nix develop (SSL peer certificate or SSH remote key was not OK) try the next steps:
$ nix-env -e *
$ curl -L https://nixos.org/nix/install | sh
Notes:
If you get a chrome sandbox error when running Daedalus, you can disable the sandbox by setting the environment variable.
$ export ELECTRON_DISABLE_SANDBOX=true
Notes:
| Parameter | Value |
|---|---|
| slotLength | 0.2 sec |
| epochLength | 50 slots |
| desiredPoolNumber | 3 |
| minimumUtxoValue | 1 ADA |
yarn nix:mainnet from daedalus.yarn dev from the subsequent shellyarn nix:preview from daedalus.yarn dev from the subsequent shellyarn nix:preprod from daedalus.yarn dev from the subsequent shellDaedalus, by default, uses the following metadata server for all networks except for the mainnet: https://metadata.cardano-testnet.iohkdev.io/.
It's also possible to use a mock server locally by running the following command in nix develop prior to starting Daedalus:
$ mock-token-metadata-server --port 65432 ./utils/cardano/native-tokens/registry.json
Mock metadata server running with url http://localhost:65432/
Then proceed to launch Daedalus and make sure to provide the mock token metadata server port:
$ MOCK_TOKEN_METADATA_SERVER_PORT=65432 yarn dev
This enables you to modify the metadata directly by modifying the registry file directly:
$ vi ./utils/cardano/native-tokens/registry.json # ..or any other editor, if you prefer
Use the following command to check if the mock server is working correctly:
$ curl -i -H "Content-type: application/json" --data '{"subjects":["789ef8ae89617f34c07f7f6a12e4d65146f958c0bc15a97b4ff169f1"],"properties":["name","description","ticker","unit","logo"]}'
http://localhost:65432/metadata/query
... and expect a "200 OK" response.
This option is only for troubleshooting windows specific issues with hardware wallets. It is not recommended to use Windows as a developer environment.
Most of the commands need nix and will run only on Linux or macOS.
C:\Program Files\Daedalus Testnetyarn global add windows-build-tools (if this does not work extract daedalus\nix\windows-usb-libs.zip under daedalus\build folder)yarn config set msvsversion 2015 --globalyarn installyarn dev:windowsNix flake is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in flake.nix.
Dependencies are updated in the inputs section of flake.nix followed with e.g.:
nix flake lock --update-input cardano-wallet
Api documentation for edge cardano-wallet version: https://input-output-hk.github.io/cardano-wallet/api/edge/
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']
You can debug the main process by following one of these approaches:
The inspector runs on port 9229
You can link libraries with Daedalus using one of the following steps:
yalcyalc globally using yarn global add yalc.yalc publish from the library's root directory that you want to link with Daedalus.yalc add <package-name> or preferably yalc link <package-name>.yalc push.yarn linknode_modules/react and yarn link.react-dom package in the same directory and run yarn link again.yarn link, yarn link react and yarn link react-dom.yarn link <package-name>.yarn build:watch from the library's root directory.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!
It is possible to build, and run just the Daedalus package, that would be bundled inside an installer, avoiding building of the installer.
Build:
nix build -L .#daedalus-mainnet
Run:
nix run -L .#daedalus-mainnet
Build:
nix build -L .#daedalus-mainnet
Run:
nix run -L .#daedalus-mainnet
If you want to run an Intel build from an Apple Silicon machine:
nix run -L .#packages.x86_64-darwin.daedalus-mainnet
Platform-specific build commands facilitate building Daedalus installers the way it is built by the IOHK CI:
These commands require Nix, optionally configured with the IOHK binary cache (recommended, see above).
Run this from a Linux machine:
nix build -L .#installer-mainnet
The result can be found at result/daedalus-*.bin.
Run this from a Linux machine (cross-building):
nix build -L .#installer-mainnet-x86_64-windows
The result will can be found at result/daedalus-*.exe.
Run this from a macOS machine:
nix build -L .#installer-mainnet
If you want to build an Intel version from an Apple Silicon machine:
nix build -L .#packages.x86_64-darwin.installer-mainnet
The result can be found at result/daedalus-*.pkg.
111,745 followers · starred Jan 2018
771 followers · starred May 2021
125 followers · starred Feb 2018
76 followers · starred Apr 2021