Beginner5 min read
Edit on GitHub

SDKs & Libraries

Recommended libraries and SDKs for building Cardano applications with Nacho API

Nacho API is compatible with standard Cardano development tools. Rather than providing our own SDK, we recommend using established Cardano libraries that handle transaction building, signing, and serialization - while pointing them at our infrastructure.

LanguageLibraryBest For
TypeScriptLucidTransaction building, wallet integration
TypeScriptMeshJSdApp development, React components
PythonPyCardanoBackend services, automation
RustPallasHigh-performance applications

Why Use These Libraries?

You Don't Need to Reinvent the Wheel

Building Cardano transactions from scratch is complex:

  • UTxO selection algorithms
  • Fee calculation with execution unit estimation
  • CBOR serialization
  • Witness signing
  • Native token handling
  • Script validation

These libraries have solved these problems. Let them handle the complexity while you focus on your application logic.

Nacho API Handles the Network

┌─────────────────────────────────────────────────────────────┐
│                     Your Application                         │
├─────────────────────────────────────────────────────────────┤
Library (Lucid/MeshJS/PyCardano)                          │
- Build transactions                                       │
- Sign with keys                                          │
- Serialize to CBOR
├─────────────────────────────────────────────────────────────┤
│   Nacho API
- Query blockchain state                                   │
- Evaluate transactions                                    │
- Submit transactions                                      │
- Chain synchronization                                    │
└─────────────────────────────────────────────────────────────┘

Integration Pattern

The general pattern for all libraries:

// 1. Create your library instance
const library = initializeLibrary()

// 2. Configure it to use Nacho API
library.setProvider(nachoProvider)

// 3. Build transactions using the library
const tx = await library.buildTransaction(...)

// 4. Sign with your wallet/keys
const signedTx = await library.signTransaction(tx)

// 5. Submit via Nacho API
const txHash = await nachoAPI.submitTransaction(signedTx)

Language-Specific Guides

Direct API Access

If you prefer not to use a library, you can interact with Nacho API directly using standard HTTP or WebSocket clients. This is useful for:

  • Simple read-only queries
  • Custom implementations
  • Languages without Cardano libraries
  • Learning the underlying protocol

See the API Reference for complete endpoint documentation.

Comparison: Library vs Direct API

Use CaseRecommended Approach
Building transactionsUse library (Lucid, MeshJS, etc.)
Signing transactionsUse library or wallet
Querying UTxOsLibrary or direct API
Submitting transactionsLibrary or direct API
Chain synchronizationDirect API (WebSocket)
Real-time monitoringDirect API (WebSocket)

Start Simple

If you're new to Cardano development, start with Lucid (TypeScript) or PyCardano (Python). They have excellent documentation and handle edge cases you might not anticipate.

Was this page helpful?