Beginner8 min read
Edit on GitHub

Recommended Libraries

Curated list of Cardano libraries that work well with Nacho API

This page lists the best Cardano libraries for each language and use case, with guidance on when to use each one.

TypeScript / JavaScript

Lucid

Best for: Transaction building, wallet backends, full control over transaction construction

npm install lucid-cardano
ProsCons
Lightweight and modularLearning curve for beginners
Great TypeScript supportLess opinionated
Active maintenanceDocumentation can be sparse

When to use: Backend services, custom wallet implementations, smart contract interactions where you need fine-grained control.

Lucid Documentation

MeshJS

Best for: dApp frontends, React applications, rapid prototyping

npm install @meshsdk/core @meshsdk/react
ProsCons
React components includedLarger bundle size
Wallet connection helpersMore opinionated
Great documentationMay include features you don't need

When to use: Web applications, dApp frontends, projects that need quick wallet integration.

MeshJS Documentation

cardano-serialization-lib

Best for: Low-level CBOR serialization, building your own abstractions

npm install @emurgo/cardano-serialization-lib-browser
# or for Node.js
npm install @emurgo/cardano-serialization-lib-nodejs
ProsCons
Official Emurgo libraryVery low-level
Complete CBOR supportSteep learning curve
WASM performanceVerbose API

When to use: Building custom libraries, performance-critical applications, when you need direct CBOR control.

cardano-serialization-lib on GitHub

Python

PyCardano

Best for: Backend services, automation, data analysis

pip install pycardano
ProsCons
Pythonic APIAsync support could be better
Good documentationSmaller community than JS
Active maintenance

When to use: Backend services, scripts, data pipelines, any Python project.

PyCardano Documentation

blockfrost-python (for comparison)

While we recommend using Nacho API, you may see code examples using Blockfrost's SDK:

# Blockfrost style (for reference)
from blockfrost import ApiUrls, BlockFrostApi

# Nacho API equivalent - just use HTTP/WebSocket directly
# No SDK needed, standard aiohttp or requests works great

Rust

Pallas

Best for: High-performance applications, chain sync, indexers

# Cargo.toml
[dependencies]
pallas = "0.19"
ProsCons
Excellent performanceRust learning curve
Great for indexersSmaller ecosystem
TxPipe maintained

When to use: High-throughput applications, custom indexers, performance-critical services.

Pallas on GitHub

cardano-serialization-lib-rust

# Cargo.toml
[dependencies]
cardano-serialization-lib = "11"

When to use: Direct CBOR manipulation, building transactions without higher-level abstractions.

Go

go-cardano-serialization

go get github.com/echovl/cardano-go
ProsCons
Native GoLess mature than other options
Good for microservicesLimited documentation

When to use: Go microservices, when you need native Go without CGO.

cardano-go on GitHub

CLI Tools

cardano-cli

The official Cardano CLI from IOG. Useful for:

  • Key generation
  • Address derivation
  • Transaction signing (offline)

Note: For querying and submission, use Nacho API instead of running your own node.

ogmios

While Nacho API is Ogmios-compatible, you might want the local client for testing:

npm install @cardano-ogmios/client

Code written for Ogmios works directly with Nacho API - just change the endpoint URL.

Choosing the Right Library

                         ┌─────────────────────────────────┐
                         │      What are you building?
                         └─────────────────┬───────────────┘

                    ┌──────────────────────┴──────────────────────┐
                    │                                              │
              ┌─────▼─────┐                                 ┌──────▼──────┐
              │  Frontend │                                 │   Backend   │
              └─────┬─────┘                                 └──────┬──────┘
                    │                                              │
         ┌──────────┴──────────┐                     ┌─────────────┴────────────┐
         │                     │                     │                          │
    ┌────▼────┐          ┌─────▼────┐         ┌──────▼─────┐            ┌───────▼───────┐
    │  React  │          │ Vanilla  │         │  Node.js   │            │    Python     │
    │         │          │    JS    │         │            │            │               │
    └────┬────┘          └─────┬────┘         └──────┬─────┘            └───────┬───────┘
         │                     │                     │                          │
         ▼                     ▼                     ▼                          ▼
      MeshJS               Lucid                  Lucid                    PyCardano

Integration Patterns

All these libraries can work with Nacho API. The pattern is:

  1. Library handles: Transaction building, signing, serialization
  2. Nacho API handles: Blockchain queries, transaction submission, chain sync
// Universal pattern
const library = initializeCardanoLibrary()
const nachoClient = new NachoClient(apiKey)

// Build with library
const tx = library.buildTransaction(...)

// Query with Nacho API
const utxos = await nachoClient.queryUtxos(address)

// Submit with Nacho API
const txHash = await nachoClient.submitTransaction(tx.toCbor())

Community Resources

  • Cardano StackExchange - Q&A for Cardano development
  • Cardano Forum - Discussion and announcements
  • TxPipe Discord - Pallas and Oura community
  • IOG Discord - Official Cardano development

Start Simple

If you're not sure which library to use, start with Lucid (TypeScript) or PyCardano (Python). They have the best balance of features and ease of use.

Was this page helpful?