How to build and run cardano-wallet using Nix
Using Nix package manager for the first time... no issue. To install Nix package manager and IOHK binaries please see Installing Nix and IOHK binaries support article
The following steps are a recommended way of building and running a cardano-wallet using:
Step 1: Install IOHK binaries
https://github.com/input-output-hk/cardano-node/blob/master/doc/getting-started/building-the-node-using-nix.md/
Step 2: Clone cardano-node
git clone https://github.com/input-output-hk/cardano-node.git
cd cardano-node
Step 3: Build and run cardano-node
Mainnet: nix-build -A scripts.mainnet.node -o mainnet-node-local && ./mainnet-node-local
Testnet: nix-build -A scripts.testnet.node -o testnet-node-local && ./testnet-node-local
Step 4: Clone cardano-wallet
git clone https://github.com/input-output-hk/cardano-wallet
cd cardano-wallet
Step 5: Checkout the required version from GitHub
https://github.com/input-output-hk/cardano-wallet/releases
Step 6: Build cardano-wallet
nix-build -A cardano-wallet
Step7: Download the latest supported configuration
https://hydra.iohk.io/build/7191656/download/1/index.html
Step 8: Run cardano-wallet using latest supported configuration
Mainnet: result/bin/cardano-wallet serve --node-socket ~/cardano-node/state-node-mainnet/node.socket --mainnet ~/cardano-wallet/mainnet-byron-genesis.json --database /tmp/mainnet
Testnet: result/bin/cardano-wallet serve --node-socket ~/cardano-node/state-node-testnet/node.socket --testnet ~/cardano-wallet/testnet-byron-genesis.json --database /tmp/testnet
Step 9: Restore /Creat a wallet 12 /15 word mnemonic to cardano-wallet
curl -X POST http://localhost:8090/v2/byron-wallets \
-H "Content-Type: application/json" \
-d '{
"style": "random",
"name": "MyFirstWallet",
"passphrase": "myfirstpassword",
"Mnemonic_sentence": ["...","....","...","....","....","....","...","....","....","....","....","...."]}'
cardano-wallet API
The cardano-wallet Byron API is a Web API extensible framework for building HTTP-based services that can be accessed from different platforms in separate locations. This service can be used for creating and searching information about transactions, addresses, and time periods (epochs and slots) in the Cardano network.
For details, see the API documentation.
cardano-wallet CLI
The CLI is a proxy to the wallet server, which is required for most commands. Commands are turned into corresponding API calls and submitted to an up-and-running server. Some commands do not require an active server and can be run "offline". (e.g. 'mnemonic generate').
For details, see the CLI documentation.