Getting Started

Introduction

What Hydra SDK is, how its packages fit together, and what you need to get started.

Hydra SDK is a TypeScript toolkit for building Cardano wallet applications with Hydra Layer 2 integration. It wraps the cardano-serialization-lib WASM bindings and the Hydra Head protocol behind a modular, type-safe API — delivering native-level performance in the browser while staying compatible with modern build tools like Vite and Rollup.

Why Hydra SDK?

  • WASM-powered — the core runs on cardano-serialization-lib compiled to WebAssembly, up to 10× faster than JavaScript-based SDKs.
  • Zero bundle issues — no polyfills for util, stream, or crypto. Works out of the box with Vite, Rollup, Nuxt 3, React + Vite, and Next.js.
  • Browser-first — designed for DApps, with an environment-aware WASM loader that also runs on Node.js.
  • Modular — install only the packages you need; each ships ESM + CJS.
  • Type-safe — comprehensive TypeScript definitions across every namespace and builder.
Looking for the latest release notes? See the Changelog.

Prerequisites

Before you begin, make sure you have:

  • Node.js 18.20.0 or higher
  • A package manager — npm, pnpm, or yarn
  • Basic TypeScript / JavaScript knowledge
  • Familiarity with core Cardano concepts (addresses, UTxOs, transactions)

Architecture

The SDK is a monorepo of four packages that build on each other:

PackageResponsibility
@hydra-sdk/coreHD wallet creation & management, UTxO types, Cardano utilities
@hydra-sdk/bridgeHydra Head lifecycle over WebSocket + REST
@hydra-sdk/transactionLow-level TxBuilder for Layer 1 and Hydra
@hydra-sdk/cardano-wasmEnvironment-aware WASM bindings
graph LR
    A[Your App] --> B[core]
    A --> C[bridge]
    A --> D[transaction]

    B --> E[cardano-wasm]
    C --> B
    C --> E
    D --> B
    D --> E

All packages import Cardano primitives through @hydra-sdk/cardano-wasm — never import @emurgo/cardano-serialization-lib directly.

Development workflow

A typical flow when building with the SDK:

Install packages

Add the SDK packages your app needs.

Create a wallet

Initialize an AppWallet (or EmbeddedWallet / CardanoCLIWallet) instance.

Connect to a network

Connect to a Cardano network and/or a Hydra Node.

Build & sign transactions

Compose transactions with the TxBuilder and sign them with the wallet.

Submit

Submit to the Cardano network or into an open Hydra Head.

Next steps

Installation

Install the SDK packages and configure your bundler.

Quick Start

Create your first wallet and run a transaction.

Configuration

Tune the SDK for your framework and environment.

Guides

Build a wallet app, mint tokens, and work with utilities.

Need help? Report issues on GitHub or start a discussion.