If you intend to run
cardano-explorer-api, you’ll need to connect to either a running a
cardano-node or a postgresql database filled with data from
Instructions on how to build
cardano-db-sync can be found here.
Alternatively, docker images are also provided for these components and available on DockerHub:
$ docker pull inputoutput/cardano-node:latest $ docker pull inputoutput/cardano-db-sync:latest
See also docker-compose.yaml for an example setup wiring these components together.
Nix build (recommended)¶
Use the Nix build if:
You don’t have Haskell development tools installed, but you do have Nix
You would like to cross-compile a build for Windows, or run the tests under
You would like to quickly grab a build of another branch from the Hydra cache, without needing to build it yourself.
:bulb: Follow the instructions in iohk-nix/docs/nix.md to install Nix and set up the IOHK binary cache.
To build the
cardano-explorer-api for your current platform, use:
nix-build -A scripts.<network>.explorer-api
To build the
cardano-submit-api for your current platform, use:
nix-build -A scripts.<network>.submit-api
<network> can be
staging | testnet | mainnet
If you have no local changes in your git repo, then this will download the build from the Hydra cache rather than building locally.
:warning: Make sure you have the following system dependencies installed and available:
Using Haskell Stack to build the project:
Alternatively, you can build only a subset of the available executables. In particular:
stack build cardano-explorer-api stack build cardano-submit-api
for building the explorer API and the transaction submission API respectively.