/cardano-wallet

HTTP server & command-line for managing UTxOs and HD wallets in Cardano.

Primary LanguageHaskellApache License 2.0Apache-2.0

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:

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

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

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

# clean up the node-db directory
rm -rf $NODE_DB/db

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/snapshots/mainnet/$(curl -s https://downloads.csnapshots.io/snapshots/mainnet/mainnet-db-snapshot.json| jq -r .[].file_name ) | lz4 -c -d - | tar -x -C $NODE_DB
elif [ $NETWORK == "preprod" ]
then
    curl -o - https://downloads.csnapshots.io/snapshots/testnet/$(curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json| jq -r .[].file_name ) | lz4 -c -d - | tar -x -C $NODE_DB
else
    echo "NETWORK must be mainnet or preprod"
    exit 1
fi

# set the node tag and wallet tag to compatible versions
export NODE_TAG=8.7.3
export WALLET_TAG=2023.12.18
export WALLET_VERSION=v2023-12-18

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

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

# get the docker-compose.yml file
rm -rf docker-compose.yml
wget https://raw.githubusercontent.com/cardano-foundation/cardano-wallet/$WALLET_VERSION/docker-compose.yml

# start the services
docker-compose up

# clear the services
docker-compose down

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

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