Skip to content

cardano-foundation/cardano-wallet

Repository files navigation

Cardano Wallet


Overview

Cardano Wallet is software that helps you manage your Ada. You can use it to send and receive payments on the Cardano blockchain.

This project provides an HTTP Application Programming Interface (API) and command-line interface (CLI) for working with your wallet.

It can be used as a component of a frontend such as Daedalus, which provides a friendly user interface for wallets. Most users who would like to use Cardano should start with Daedalus.

Quickstart

The cardano-wallet executable is an HTTP server that manages your wallet(s). Here is one way to start both node and wallet using Docker and running the nightly version of the wallet.

THE FOLLOWING EXPOSES THE WALLET PORT. DO NOT USE IT WITH mainnet !

Prerequisties:
    - 100GB of disk space
    - 13GB of RAM

Copy this script to a file, e.g. `start.sh` and make it executable with `chmod +x start.sh`

```bash
#! /bin/bash

set -euo pipefail

# set the network, mainnet or preprod or sanchonet
export NETWORK=preprod

# set a directory for the node-db
export NODE_DB=`pwd`/node-db
# set a directory for the wallet-db
export WALLET_DB=`pwd`/wallet-db

# set the node tag and wallet tag to compatible versions
export NODE_TAG=8.9.2
export WALLET_TAG=2024.5.5

# set a port for the wallet server
export WALLET_PORT=8090


if [ "$(ls -A "${NODE_DB}")" ]
then
    echo "Node state is present, not downloading the snapshot."
else
    if [ $NETWORK == "mainnet" ]
    then
        # download the node-db snapshot, or wait for the node to sync for a long time
        curl -o - https://downloads.csnapshots.io/mainnet/$(curl -s https://downloads.csnapshots.io/mainnet/mainnet-db-snapshot.json| jq -r .[].file_name ) | lz4 -c -d - | tar -x -C $NODE_DB
        mv $NODE_DB/db/* $NODE_DB/
        rm -rf $NODE_DB/db
    elif [ $NETWORK == "preprod" ]
    then
        curl -o - https://downloads.csnapshots.io/testnet/$(curl -s https://downloads.csnapshots.io/testnet/testnet-db-snapshot.json| jq -r .[].file_name ) | lz4 -c -d - | tar -x -C $NODE_DB
        mv $NODE_DB/db/* $NODE_DB/
        rm -rf $NODE_DB/db
    elif [ $NETWORK == "sanchonet" ]
    then echo "no cache for sancho";
    else
        echo "NETWORK must be mainnet or preprod or sanchonet"
        exit 1
    fi
fi

# start the services
docker-compose up

Fantastic! server is up-and-running, waiting for HTTP requests on localhost:8090

curl http://localhost:8090/v2/network/information

or to be accessed via CLI, e.g.:

docker run --network host --rm cardanofoundation/cardano-wallet network information

Icarus UI will be available at

http://localhost:4444

To stop the services, press Ctrl+C.

See also Docker for more information about using docker.

NixOS users can also use the NixOS service.

Obtaining cardano-wallet

Executables (Linux / Windows / Mac OS)

We provide executables as part of our releases. Please also see the installation instructions highlighted in the release notes.

Building from source

See Building

Testing

See Testing

History

The cardano-wallet repository was introduced during the Shelley phase of the Cardano blockchain. Previously, during the Byron phase, the wallet was part of the cardano-sl repository. (This is useful to know — sometimes the ghosts of the past come back to haunt us in the form of obscure bugs.)

Documentation

Link Audience
Documentation
User Manual Users of Cardano Wallet
  ⤷ CLI Manual Users of the Cardano Wallet API
  ⤷ API Documentation Users of the Cardano Wallet API
Design Documents Anyone interested in wallet design and specifications
  ⤷ Specifications Anyone interested in wallet design and specifications
Contributor Manual Anyone interested in the project and our development process
Adrestia Documentation Anyone interested in the project and our development process