• Stars
    star
    1,230
  • Rank 38,147 (Top 0.8 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated 29 days ago

Reviews

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

Repository Details

The open source cryptocurrency wallet for ada, built to grow with the community
Document maintainer: Daniel Main
Document status: Active

Daedalus

Build status Release

Daedalus - Cryptocurrency Wallet

Setup development environment

Linux/macOS

Yarn

Yarn is required to install npm dependencies to build Daedalus.

Nix

Nix is needed to run Daedalus in nix develop shell.

  1. Install nix: sh <(curl -L https://nixos.org/nix/install)

  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 4 settings are set to:

    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
    
  3. 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 .#mainnet
    • … which is equivalent to yarn nix:mainnet

Notes:

If you get SSL error when running nix develop (SSL peer certificate or SSH remote key was not OK) try the next steps:

  1. Reinstall nix
    $ nix-env -e *
    $ curl -L https://nixos.org/nix/install | sh
  2. Download certificate from https://docs.certifytheweb.com/docs/kb/kb-202109-letsencrypt/ and import to your keychain.

Running Daedalus with Cardano Node

Selfnode
  1. Run yarn nix:selfnode from daedalus.
  2. Run yarn dev from the subsequent nix develop shell (use KEEP_LOCAL_CLUSTER_RUNNING environment variable to keep the local cluster running after Daedalus exits: KEEP_LOCAL_CLUSTER_RUNNING=true yarn dev)
  3. Once Daedalus has started and has gotten past the loading screen run the following commands from a new terminal window if you wish to import funded wallets:
  • Byron wallets: yarn byron:wallet:importer
  • Shelley wallets: yarn shelley:wallet:importer
  • Mary wallets: yarn mary:wallet:importer (all of which contain native tokens which are visible once selfnode enters Mary era)
  • Yoroi Byron wallets: yarn yoroi:wallet:importer
  • ITN Byron wallets: yarn itn:byron:wallet:importer [Deprecated]
  • ITN Shelley wallets: yarn itn:shelley:wallet:importer [Deprecated]

These scripts import 3 wallets by default. You can import up to 10 wallets by supplying WALLET_COUNT environment variable (e.g. WALLET_COUNT=10 yarn mary:wallet:importer).

List of all funded wallet recovery phrases can be found here: https://github.com/input-output-hk/daedalus/blob/develop/utils/api-importer/mnemonics.js

Notes:

  • Cardano wallet process ID shown on the "Diagnostics" screen is faked and expected to match the Cardano node process ID.
  • Stake pool metadata is fetched directly by default (IOHK SMASH server option is not available).
  • Token metadata is fetched from a mock token metadata server which is automatically ran alongside the local cluster (there is no need to run it manually)
  • Daedalus will ask you if you wish to keep the local cluster running after it exits - this option is useful if you need to preserve local cluster state between Daedalus restarts.
Parameter Value
slotLength 0.2 sec
epochLength 50 slots
desiredPoolNumber 3
minimumUtxoValue 1 ADA
Mainnet
  1. Run yarn nix:mainnet from daedalus.
  2. Run yarn dev from the subsequent shell
Flight
  1. Run yarn nix:flight from daedalus.
  2. Run yarn dev from the subsequent shell
Testnet
  1. Run yarn nix:testnet from daedalus.
  2. Run yarn dev from the subsequent shell
Native token metadata server

Daedalus, 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.

Windows

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.

Requisites

  • Windows 10/11
  • Daedalus testnet installation (similar version used in branch) in C:\Program Files\Daedalus Testnet
  • NodeJS 16
  • Python2
  • yarn global add windows-build-tools (if this does not work extract daedalus\nix\windows-usb-libs.zip under daedalus\build folder)
  • Microsoft Build Tools 2015
  • Microsoft Visual Studio 2017 (Include Desktop development with C++)
  • yarn config set msvsversion 2015 --global

Steps

  • yarn install
  • yarn dev:windows

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

Nix 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-unpatched

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']

Debugging

You can debug the main process by following one of these approaches:

The inspector runs on port 9229

Linking with UI Libraries (e.g. React Polymorph)

You can link libraries with Daedalus using one of the following steps:

1) Using yalc

  1. Install yalc globally using yarn global add yalc.
  2. Run yalc publish from the library's root directory that you want to link with Daedalus.
  3. Switch to Daedalus and run yalc add <package-name> or preferably yalc link <package-name>.
  4. You should be able to start Daedalus and see the changes you are making locally in the library.
  5. To make sure your changes are reflected as you update code in the library, use yalc push.

2) Using yarn link

  1. From the Daedalus root directory, go to node_modules/react and yarn link.
  2. Navigate to the react-dom package in the same directory and run yarn link again.
  3. Go to the library's root directory and run yarn link, yarn link react and yarn link react-dom.
  4. Go back to the Daedalus root directory and run yarn link <package-name>.
  5. Finally, run yarn build:watch from the library's root directory.

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

It is possible to build, and run just the Daedalus package, that would be bundled inside an installer, avoiding building of the installer.

Linux

Build:

nix build -L .#package.mainnet

Run:

nix run -L .#package.mainnet

macOS (Intel, and Apple Silicon)

Build:

nix build -L .#package.mainnet

Run:

nix run -L .#package.mainnet

If you want to run an Intel build from an Apple Silicon machine:

nix run -L .#packages.x86_64-darwin.package.mainnet

Installers

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).

Linux/macOS

Run this from a Linux machine:

nix build -L .#installer.mainnet

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

Windows

Run this from a Linux machine (cross-building):

nix build -L .#packages.x86_64-windows.installer.mainnet

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

macOS (Intel, and Apple Silicon)

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.

More Repositories

1

cardano-sl

Cryptographic currency implementing Ouroboros PoS protocol
Haskell
3,757
star
2

cardano-node

The core component that is used to participate in a Cardano decentralised blockchain.
Haskell
2,934
star
3

plutus

The Plutus language implementation and tools
Haskell
1,472
star
4

plutus-pioneer-program

This repository hosts the lectures of the Plutus Pioneers Program. This program is a training course that the IOG Education Team provides to recruit and train software developers in Plutus, the native smart contract language for the Cardano ecosystem.
Haskell
1,389
star
5

essential-cardano

Repository for the Essential Cardano list
738
star
6

haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
Nix
557
star
7

Scorex

Modular blockchain framework. Public domain
JavaScript
503
star
8

nami

Nami Wallet is a browser based wallet extension to interact with the Cardano blockchain. Support requests: https://iohk.zendesk.com/hc/en-us/requests/new
JavaScript
373
star
9

jormungandr

privacy voting blockchain node
Rust
366
star
10

plutus-apps

The Plutus application platform
Haskell
304
star
11

rust-byron-cardano

rust client libraries to deal with the current cardano mainnet (byron / cardano-sl)
Rust
276
star
12

hydra

Implementation of the Hydra Head protocol
Haskell
262
star
13

cardano-documentation

TypeScript
258
star
14

cardano-db-sync

A component that follows the Cardano chain and stores blocks and transactions in PostgreSQL
Haskell
254
star
15

ouroboros-network

An implementation of the Ouroboros family of consensus algorithms, with its networking support
Haskell
254
star
16

mantis

A Scala based client for Ethereum-like Blockchains.
Scala
227
star
17

cardano-ledger

The ledger implementation and specifications of the Cardano blockchain.
Haskell
223
star
18

cardano-js-sdk

JavaScript SDK for interacting with Cardano, providing various key management options, with support for popular hardware wallets
TypeScript
216
star
19

scrypto

Cryptographic primitives for Scala
Scala
201
star
20

plutus-starter

A starter project for Plutus apps
Nix
198
star
21

lobster-challenge

Simple Plutus contract to help give Charles' stuffed lobster a name
Haskell
179
star
22

adrestia

APIs & SDK for interacting with Cardano.
Markdown
177
star
23

marlowe

Prototype implementation of domain-specific language for the design of smart-contracts over cryptocurrencies
Isabelle
174
star
24

bitte

Nix Ops for Terraform, Consul, Vault, Nomad
Nix
156
star
25

symphony-2

Immersive 3D Blockchain Explorer
JavaScript
127
star
26

mithril

Stake-based threshold multi-signatures protocol
Rust
126
star
27

cardano-addresses

Addresses and mnemonic manipulation & derivations
Haskell
125
star
28

iohk-ops

NixOps deployment configuration for IOHK devops
Nix
119
star
29

Alonzo-testnet

repository for the Alonzo testnet
Haskell
112
star
30

cardano-tutorials

ARCHIVED-This content in this repository is now located at https://docs.cardano.org/projects/cardano-node/
Makefile
112
star
31

stack2nix

Generate nix expressions for Haskell projects
Nix
99
star
32

iodb

Multiversioned key-value database, especially useful for blockchain
Scala
96
star
33

nix-tools

Translate Cabals Generic Package Description to a Nix expression
95
star
34

marlowe-cardano

Marlowe smart contract language Cardano implementation
Haskell
90
star
35

cardano-byron-cli

Cardano Command Line Interface (CLI) (Deprecated)
Rust
84
star
36

cardano-base

Code used throughout the Cardano eco-system
Haskell
83
star
37

react-polymorph

React components with highly customizable logic, markup and styles.
JavaScript
79
star
38

high-assurance-legacy

Legacy code connected to the high-assurance implementation of the Ouroboros protocol family
Haskell
78
star
39

shelley-testnet

Support triage for the Shelley testnet
70
star
40

cardano-crypto

This repository provides cryptographic libraries that are used in the Byron era of the Cardano node
C
67
star
41

plutus-use-cases

Plutus Use Cases
66
star
42

cardano-ops

NixOps deployment configuration for IOHK/Cardano devops
Nix
65
star
43

iohk-nix

nix scripts shared across projects
Nix
62
star
44

cardano-rt-view

RTView: real-time watching for Cardano nodes (ARCHIVED)
Haskell
59
star
45

spongix

Proxy for Nix Caching
Go
59
star
46

nix-hs-hello-windows

Cross compiling Hello World (haskell) to Windows using nix.
Nix
58
star
47

symphony

Symphony v1
JavaScript
53
star
48

cardano-ledger-byron

A re-implementation of the Cardano ledger layer, replacing the Byron release
Haskell
52
star
49

rscoin-haskell

Haskell implementation of RSCoin
Haskell
51
star
50

cardano-node-tests

System and end-to-end (E2E) tests for cardano-node.
Python
51
star
51

project-icarus

Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
45
star
52

cardano-rest

HTTP interfaces for interacting with the Cardano blockchain.
Haskell
44
star
53

foliage

🌿 Foliage is a tool to create custom Haskell package repositories, in a fully reproducible way.
Haskell
42
star
54

offchain-metadata-tools

Tools for creating, submitting, and managing off-chain metadata such as multi-asset token metadata
Haskell
42
star
55

cicero

event-driven automation for Nomad
Go
41
star
56

medusa

3D github repository visualiser
JavaScript
41
star
57

nothunks

Haskell
39
star
58

partner-chains

Substrate node with capability of communicating with Cardano network
Rust
38
star
59

bech32

Haskell implementation of the Bech32 address format (BIP 0173).
Haskell
37
star
60

catalyst-core

⚙️ Core Catalyst Governance Engine and utilities.
Rust
37
star
61

smash

Stakepool Metadata Aggregation Server
Haskell
36
star
62

chain-libs

blockchain libs
Rust
35
star
63

cardanodocs.com-archived

Cardano Settlement Layer Documentation
HTML
35
star
64

devx

The Developer Experience Shell - This repo contains a nix develop shell for haskell. Its primary purpose is to help get a development shell for haskell quickly and across multiple operating systems (and architectures).
Nix
35
star
65

io-sim

Haskell's IO simulator which closely follows core packages (base, async, stm).
Haskell
35
star
66

iohk-monitoring-framework

This framework provides logging, benchmarking and monitoring.
Haskell
33
star
67

mallet

JavaScript
32
star
68

project-icarus-chrome

Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
JavaScript
32
star
69

js-cardano-wasm

various cardano javascript using wasm bindings
Rust
31
star
70

cardano-shell

Node shell, a thin layer for running the node and it's modules.
Haskell
31
star
71

cardano-launcher

Shelley cardano-node and cardano-wallet launcher for NodeJS applications
TypeScript
31
star
72

cardano-world

Cardano world provides preprod and preview cardano networks, configuration documentation and miscellaneous automation.
Nix
30
star
73

rscoin-core

Haskell
29
star
74

quickcheck-dynamic

A library for stateful property-based testing
Haskell
27
star
75

stakepool-management-tools

JavaScript
27
star
76

cardano-haskell-packages

Metadata for Cardano's Haskell package repository
Shell
24
star
77

cardano-haskell

Top level repository for building the Cardano Haskell node and related components and dependencies.
Shell
24
star
78

cardano-configurations

A common place for finding / maintaining configurations of various services of the Cardano eco-system
24
star
79

Developer-Experience-working-group

23
star
80

cardano-transactions

Library utilities for constructing and signing Cardano transactions.
Haskell
23
star
81

psg-cardano-wallet-api

Scala client to the Cardano wallet REST API
Scala
22
star
82

marlowe-ts-sdk

Marlowe TypeScript SDK
TypeScript
22
star
83

sanchonet

Sources for the SanchoNet website
TypeScript
21
star
84

pvss-haskell

Haskell
21
star
85

cardano-wallet-legacy

Official Wallet Backend & API for Cardano-SL
Haskell
21
star
86

scalanet

Scala
20
star
87

cardano-explorer

Backend solution powering the cardano-explorer. ⚠️ See disclaimer below. ⚠️
Haskell
20
star
88

formal-ledger-specifications

Formal specifications of the cardano ledger
Agda
19
star
89

metadata-registry-testnet

Nix
19
star
90

casino

Demo / PoC / implementation of IOHK MPC protocols
Haskell
19
star
91

hackage.nix

Automatically generated Nix expressions for Hackage
19
star
92

cardano-clusterlib-py

Python wrapper for cardano-cli for working with cardano cluster
Python
19
star
93

catalyst-voices

🎙️ Catalyst Voices provides a unified experience and platform including production-ready liquid democracy, meaningful collaboration opportunities & data-driven context for better onboarding & decisions.
Dart
19
star
94

marlowe-starter-kit

This repository contains lessons for using Marlowe via REST and at the command line. It is meant to be used with demeter.run or with a Docker deployment of Marlowe Runtime.
Jupyter Notebook
19
star
95

js-chain-libs

chain-libs javascript SDK
Rust
18
star
96

cardano-coin-selection

A library of algorithms for coin selection and fee balancing.
Haskell
18
star
97

ouroboros-consensus

Implementation of a Consensus Layer for the Ouroboros family of protocols
Haskell
18
star
98

marlowe-pioneer-program

Lectures, documentation, and examples for Marlowe Pioneer Program.
Haskell
18
star
99

chain-wallet-libs

Rust
18
star
100

jortestkit

jormungandr QA
Rust
17
star