Daedalus For Developers¶
Installation¶
Nix¶
Nix is needed to run Daedalus in nix-shell
.
Note: There are special instructions for installing Nix on macOS Catalina.
Install nix:
curl https://nixos.org/nix/install | sh
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
Run
nix-shell
with correct list of arguments or by using existingpackage.json
scripts to load a shell with all the correct versions of all the required dependencies for development.
Running Daedalus with Cardano Node¶
Selfnode¶
Run
yarn nix:selfnode
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
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 runningyarn yoroi:wallet:importer
script.
Mainnet¶
Run
yarn nix:mainnet
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Flight¶
Run
yarn nix:flight
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Testnet¶
Run
yarn nix:testnet
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Staging¶
Run
yarn nix:staging
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Shelley Local¶
Run
nix-shell -A devops
fromdaedalus
.Run
start-cluster
to launch the cluster (runstop-cluster
to stop it).Run
yarn nix:shelley_local
fromdaedalus
in a separate Terminal window.Run
yarn dev
from the subsequentnix-shell
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¶
Run
yarn nix:shelley_testnet
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Shelley QA Testnet¶
Run
yarn nix:shelley_qa
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Running Daedalus with Jormungandr¶
ITN Selfnode¶
Run
yarn nix:itn_selfnode
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
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 runningyarn itn:byron:wallet:importer
script.
ITN Rewards V1¶
Run
yarn nix:itn
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
QA Testnet¶
Run
yarn nix:qa
fromdaedalus
.Run
yarn dev
from the subsequentnix-shell
Nightly Testnet¶
Run
yarn nix:nightly
fromdaedalus
.Run
yarn dev
from the subsequentnix-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"
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']