What is cardano-wallet?
This project provides an HTTP Application Programming Interface (API) and a command-line interface (CLI) for working with your wallet.
Prerequisites for running cardano-wallet
The cardano-wallet has been built for and tested on Linux and will support Docker as a target environment. It may also run on Mac OS X or Windows operating systems, but they are not officially supported.
cardano-wallet web API reference
cardano-wallet includes a Web API as an extensible framework for building HTTP based services that can be accessed in different applications on different platforms such as web, windows, mobile, etc.
Cardano-wallet comes with a command-line interface that can be used as a quick alternative to cURL or wget to interact with a server running on the localhost. Every endpoint of the API is mapped to a corresponding command which often offers a better user experience than directly interacting with the API as a human (API are for programs, command-lines are for humans).
The command line also provides some useful helpers like a command to generate mnemonic sentences or doing key derivation. For more details, see the wallet command-line user manual.
Building and Running cardano-wallet
Option 1: To build the cardano-wallet API using Docker (Recommended):
Alternatively, all components are built automatically using docker-compose. To build all components using docker-compose see the following GitHub pages for instructions here
Once you have completed these steps, you will be able to use the cardano-wallet API to view data from the PostgreSQL database, and the submit transaction API to submit transactions.
Option 2: To build the cardano-wallet using Nix:
Follow the instructions in iohk-nix/docs/nix.md to install Nix and set up the IOHK binary cache.
serve accepts extra command-line arguments for logging (also called “tracing”). Use --help-tracing to show the options, the tracer names, and the possible log levels.
cardano-wallet serve --help-tracing
Additional tracing options:
--log-level SEVERITY Global minimum severity for a message to be logged.
Defaults to "DEBUG" unless otherwise configured.
--trace-NAME=off Disable logging on the given tracer.
--trace-NAME=SEVERITY Set the minimum logging severity for the given
tracer. Defaults to "INFO".
The possible log levels (lowest to highest) are:
debug info notice warning error critical alert emergency
|The possible tracers are:|
|application||About start-up logic and the server's surroundings.|
|api-server||About the HTTP API requests and responses.|
|wallet-engine||About background wallet workers events and core wallet engine.|
|wallet-db||About database operations of each wallet.|
|pools-engine||About the background worker monitoring stake pools and stake pools engine.|
|pools-db||About database operations on stake pools.|
|network||About network communication with the node.|
Use these options to enable debug-level tracing for certain components of the wallet. For example, to log all database queries for the wallet databases, use:
$ cardano-wallet serve --trace-wallet-db=debug ...