Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/cardano/getting-started/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Getting Started",
"position": 1
}

224 changes: 224 additions & 0 deletions docs/cardano/getting-started/cardano-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
---
title: Cardano CLI
sidebar_position: 3
hide_title: true
---

# Cardano CLI Quick Start

## Prerequisites

- **Cardano Node** – running and synchronized with your chosen network
- **Cardano CLI** – command-line interface (version 8.0+ for Conway era support)
- **Understanding** – Basic knowledge of UTxO model and public key cryptography

---

## Environment Setup

Configure these environment variables:

```bash
# Path to your node socket
export CARDANO_NODE_SOCKET_PATH=/path/to/node.socket

# Network ID
export CARDANO_NODE_NETWORK_ID=2 # Preview testnet (recommended for testing)
# export CARDANO_NODE_NETWORK_ID=1 # Preprod testnet
# export CARDANO_NODE_NETWORK_ID=4 # SanchoNet
# export CARDANO_NODE_NETWORK_ID=mainnet # Mainnet
```

### Network Selection

:::note
If you did not set the `CARDANO_NODE_NETWORK_ID` environment variable, you **must** explicitly specify the target network with one of the flags below for every `cardano-cli` command.
:::

```bash
# Preview testnet
--testnet-magic 2

# Preprod testnet
--testnet-magic 1

# SanchoNet (Conway testnet)
--testnet-magic 4

# Mainnet
--mainnet
```

Verify connection:

```bash
cardano-cli latest query tip
```

---

## Key Generation

Cardano uses Ed25519 cryptographic keys for securing funds and controlling stake delegation.

### Payment Keys

Payment keys control spending of UTxOs. Generate a payment key pair:

```bash
cardano-cli latest address key-gen \
--verification-key-file payment.vkey \
--signing-key-file payment.skey
```

This creates:
- **`payment.skey`** – Private signing key (keep secure!)
- **`payment.vkey`** – Public verification key

### Stake Keys

Stake keys control delegation and reward withdrawal:

```bash
cardano-cli latest stake-address key-gen \
--verification-key-file stake.vkey \
--signing-key-file stake.skey
```

### Key File Format

Standard keys are stored as JSON text envelopes:

```json
{
"type": "PaymentVerificationKeyShelley_ed25519",
"description": "Payment Verification Key",
"cborHex": "5820..."
}
```

For programmatic use, you can extract key hashes:

```bash
cardano-cli latest address key-hash \
--payment-verification-key-file payment.vkey
```

---

## Building Addresses

Cardano addresses encode payment and optional delegation rights. See [CIP-19](https://cips.cardano.org/cip/CIP-19) for the full specification.

### Enterprise Address (Type 6)

Payment-only address without staking capability:

```bash
cardano-cli latest address build \
--payment-verification-key-file payment.vkey \
--out-file payment.addr \
```

Use cases:
- Exchange hot wallets
- Smart contract addresses
- Simple payment flows

### Base Address (Type 0)

Full address with payment and delegation parts:

```bash
cardano-cli latest address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--out-file payment_stake.addr \
```

Benefits:
- Can receive staking rewards
- Participate in delegation
- Standard for user wallets

### Address Format

View your generated address:

```bash
cat payment.addr
```

Address prefixes indicate network:

| Prefix | Type | Network |
| -------------- | --------------- | ------- |
| `addr1...` | Payment address | Mainnet |
| `addr_test1...`| Payment address | Testnet |
| `stake1...` | Stake address | Mainnet |
| `stake_test1...`| Stake address | Testnet |

Example testnet addresses:

```
# Enterprise (no stake)
addr_test1vrqlsnsuz5j9kv8dp5s80pt0cgrm4m35kq0jxqw3usk7f8que2vlk

# Base (with stake)
addr_test1qrqlsnsuz5j9kv8dp5s80pt0cgrm4m35kq0jxqw3usk7f8qhk0cxs4hnx7qpmsg4wwzrppt0atpjx7qyddep496mnecsr7f2g9
```

---

## Querying the Blockchain

### Check UTxOs

Queries require a running node. Set the socket path:

```bash
export CARDANO_NODE_SOCKET_PATH=/path/to/node.socket
```

Query unspent outputs at your address:

```bash
cardano-cli latest query utxo \
--address $(cat payment.addr) \
```

Output format:
```
TxHash TxIx Amount
--------------------------------------------------------------------------------------
262c7891f932cde390bcc04c25805f3f422c1a5687d5d47f6681e68bb384fe6d 0 10000000000 lovelace + TxOutDatumNone
```

---

## Getting Test ADA

For new addresses without UTxOs:

1. **Preview/Preprod Testnets**
- [Cardano Testnet Faucet](https://docs.cardano.org/cardano-testnets/tools/faucet)
- Provides test ADA via web interface

2. **SanchoNet (Conway Features)**
- [SanchoNet Faucet](https://sancho.network/faucet)
- For testing governance and Conway era features

3. **Verification**
```bash
# After requesting funds, verify receipt
cardano-cli latest query utxo \
--address $(cat payment.addr) \
```

---

## Next Steps

- [Simple Transactions](../transaction-building/simple-tx) – Build and submit transactions

---
135 changes: 135 additions & 0 deletions docs/cardano/getting-started/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
title: Overview
sidebar_position: 1
hide_title: true
---

# What is Cardano?

Cardano is a third-generation blockchain platform designed to provide a more balanced and sustainable ecosystem for the future of money and decentralized applications. Founded by Charles Hoskinson, one of Ethereum's co-founders, Cardano takes a unique research-first approach to blockchain development.

## Vision and Mission

Cardano was created with a bold vision: **to provide economic identity to the billions who lack it**. The project aims to bring financial services to the developing world, enabling access to banking, loans, insurance, and investment opportunities for those currently excluded from the global financial system.

### Core Mission
- Enable financial inclusion for underserved populations
- Create a platform for sustainable and transparent governance
- Build infrastructure for a fairer, more secure financial system
- Bridge the gap between traditional finance and blockchain technology

## The Three Pillars

Cardano is built on three fundamental pillars that guide its development:

### 1. **Scalability**
The ability to grow and serve billions of users worldwide without compromising performance or accessibility.

### 2. **Interoperability**
Creating bridges between different blockchains and traditional financial systems to enable seamless value transfer.

### 3. **Sustainability**
Building a self-sustaining ecosystem that can fund its own development and evolve through community governance.

## Why Cardano?

### Academic Foundation
Cardano is the first blockchain platform to be built through peer-reviewed research. Every feature and protocol undergoes rigorous academic scrutiny before implementation, ensuring a solid theoretical foundation.

### Real-World Focus
Unlike many blockchain projects focused on speculation, Cardano prioritizes solving real-world problems:
- Banking the unbanked
- Enabling secure voting systems
- Creating transparent supply chains
- Facilitating identity management

### Long-Term Vision
Cardano is designed to last for decades, not years. Its governance model allows the platform to evolve and adapt to changing needs without requiring hard forks or causing community splits.

## The Cardano Roadmap

Cardano's development is organized into five eras, each named after historical figures:

### **Byron** - The Foundation
Established the basic blockchain and allowed users to buy and transfer ADA.

### **Shelley** - Decentralization
Transitioned to community-run stake pools, achieving true decentralization.

### **Goguen** - Smart Contracts
Introduced programmability, allowing developers to build decentralized applications.

### **Basho** - Optimization
Focuses on improving scalability and interoperability.

### **Voltaire** - Self-Governance
Implements treasury and voting systems for community-driven development.

## What Makes Cardano Different?

### Research-Driven Development
Every aspect of Cardano is based on peer-reviewed academic research, bringing scientific rigor to blockchain development.

### Environmental Sustainability
Cardano's proof-of-stake system uses 99% less energy than proof-of-work blockchains like Bitcoin.

### Inclusive Design
Built with developing nations in mind, Cardano considers the needs of those without reliable internet or modern banking infrastructure.

### Regulatory Awareness
Designed to work within existing regulatory frameworks while maintaining decentralization.

### Community Governance
The platform will eventually be entirely governed by its community through a democratic voting system.

## Core Values

### **Transparency**
All development is done in the open, with public repositories and regular updates.

### **Inclusivity**
Building solutions that work for everyone, regardless of location or economic status.

### **Sustainability**
Creating systems that can maintain and improve themselves over time.

### **Collaboration**
Working with governments, institutions, and communities to create positive change.

## Use Cases

Cardano enables a wide range of applications:

- **Financial Services**: Lending, insurance, and savings for the unbanked
- **Supply Chain**: Tracking products from origin to consumer
- **Education**: Verifiable credentials and certificates
- **Healthcare**: Secure medical records and data sharing
- **Governance**: Transparent voting and decision-making systems
- **Digital Identity**: Self-sovereign identity solutions

## Getting Started

To begin your journey with Cardano:

1. **Learn the basics**: Understand blockchain fundamentals and Cardano's approach
2. **Join the community**: Engage with developers, stake pool operators, and enthusiasts
3. **Explore the ecosystem**: Discover projects building on Cardano
4. **Start building**: Use Cardano's tools and resources to create your own solutions

## The Future of Cardano

Cardano's vision extends beyond being just another blockchain. It aims to become the financial operating system for the developing world, enabling:

- Universal access to financial services
- Transparent and accountable governance
- Sustainable economic growth
- Preservation of individual privacy and rights

By combining academic rigor, sustainable design, and a focus on real-world utility, Cardano is building the foundation for a more inclusive global economy.

## Next Steps

- Visit the [Cardano Foundation](https://cardanofoundation.org) for official resources
- Explore the [Cardano Forum](https://forum.cardano.org) to connect with the community
- Learn about [Project Catalyst](https://projectcatalyst.io) for funding opportunities
- Discover [projects building on Cardano](https://www.cardanocube.io)
5 changes: 5 additions & 0 deletions docs/cardano/transaction-building/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Transaction Building",
"position": 2
}

Loading