Overview
In this guide, we'll walk you through creating a Cardano wallet, receiving test ada (tAda) on a testnet network, and executing basic transactions. We'll explore essential tools like cardano-cli and cardano-wallet to demonstrate their functionalities.
Prerequisites
- Ensure
cardano-nodeandcardano-cliare installed (Installation Guide). - Your
cardano-nodemust be synchronized with a testnet network (Setup Guide).
Types of Cardano Wallets
1. Daedalus Wallet
- Type: Full-node GUI wallet (Linux, macOS, Windows).
Features:
- Downloads the entire blockchain for decentralized validation.
- Developed by Input Output Global (IOG).
2. Yoroi Wallet
- Type: Light wallet (mobile app/browser extension).
Features:
- No full blockchain download—uses backend servers for faster access.
- Developed by Emurgo.
3. cardano-wallet
- Type: CLI/API wallet backend.
Features:
- Powers Daedalus; supports REST API for integrations.
- API Documentation.
4. cardano-cli
- Type: Command-line tool for advanced operations.
Features:
- Key generation, transaction building, stake pool management.
Creating a Wallet with cardano-cli
Step-by-Step Process
Generate Payment Keys
mkdir -p $HOME/cardano/keys cd $HOME/cardano/keys cardano-cli address key-gen \ --verification-key-file payment1.vkey \ --signing-key-file payment1.skeyDerive Wallet Address
cardano-cli address build \ --payment-verification-key-file payment1.vkey \ --out-file payment1.addr \ --testnet-magic 1097911063Fund the Wallet
- Request
tAdafrom the Cardano Testnet Faucet.
- Request
Check UTXO
cardano-cli query utxo \ --testnet-magic 1097911063 \ --address $(cat payment1.addr)
Sending Transactions with cardano-cli
Prepare Protocol Parameters
cardano-cli query protocol-parameters \ --testnet-magic 1097911063 \ --out-file protocol.jsonBuild and Submit Transaction
cardano-cli transaction build-raw \ --tx-in <TxHash>#<TxIx> \ --tx-out $(cat payment2.addr)+250000000 \ --tx-out $(cat payment1.addr)+749825831 \ --fee 174169 \ --out-file tx.draft cardano-cli transaction sign \ --tx-body-file tx.draft \ --signing-key-file payment1.skey \ --testnet-magic 1097911063 \ --out-file tx.signed cardano-cli transaction submit \ --tx-file tx.signed \ --testnet-magic 1097911063
Managing Wallets with cardano-wallet
1. Start the Wallet Server
cardano-wallet serve \
--port 1337 \
--testnet $HOME/cardano/testnet-byron-genesis.json \
--database wallets/db \
--node-socket $CARDANO_NODE_SOCKET_PATH2. Create a Wallet via API
curl -X POST http://localhost:1337/v2/wallets \
-H "Content-Type: application/json" \
-d '{
"name": "test_wallet",
"mnemonic_sentence": ["word1", "word2", ...],
"passphrase": "secure123"
}'3. Send Funds
curl -X POST http://localhost:1337/v2/wallets/<walletId>/transactions \
-H "Content-Type: application/json" \
-d '{
"payments": [{
"address": "addr_test1...",
"amount": {"quantity": 250000000, "unit": "lovelace"}
}],
"passphrase": "secure123"
}'FAQs
1. What’s the difference between cardano-cli and cardano-wallet?
cardano-cli: Low-level tool for advanced operations (e.g., key generation, stake pools).cardano-wallet: Higher-level API for wallet management (e.g., balance checks, transfers).
2. How do I secure my wallet keys?
- Store
.skeyfiles offline. - Use strong passphrases for encrypted wallets in
cardano-wallet.
3. Why is my transaction failing?
- Ensure sufficient funds and correct fee calculation.
- Verify the node is fully synchronized.
Key Takeaways
- Cardano offers diverse wallet options for different use cases.
cardano-cliprovides granular control, whilecardano-walletsimplifies wallet management.- Always download wallets from official sources.
👉 Explore Cardano Developer Tools
👉 Master Blockchain Integration