Getting Started
Installation
Learn how to install Hydra SDK packages in your project
@hydra-sdk/bridge v2 is on the next tag. v2 targets hydra-node2.x and is a breaking change; the latest tag still resolves to 1.3.2, which speaks hydra-node1.x.Running a v2 node? Install explicitly:pnpm add @hydra-sdk/bridge@next
Using an AI assistant? Point it at
INSTALL.md in the repo for a rule-based setup guide, or connect the docs MCP server so it can query these pages directly.The Hydra SDK is published as individual packages on NPM, allowing you to install only what you need for your project.
Install with an AI assistant
Paste this prompt into your AI coding assistant (Claude, Cursor, Copilot…) to install and configure Hydra SDK. It points the assistant at the machine-readable docs and spells out the rules that commonly trip people up:
Install and configure Hydra SDK (@hydra-sdk) in this project.
Read these for the exact steps:
- https://hydrasdk.com/raw/getting-started/installation.md
- https://hydrasdk.com/raw/getting-started/configuration.md
Rules (follow strictly):
1. Always install @hydra-sdk/cardano-wasm together with the other @hydra-sdk/* packages.
2. Never import @emurgo/cardano-serialization-lib directly — use @hydra-sdk/cardano-wasm.
3. NETWORK_ID is a Record<Network, number> with keys MAINNET | PREPROD | PREVIEW (no TESTNET), not an enum.
4. For a browser build with Vite, add vite-plugin-wasm + vite-plugin-top-level-await + a buffer polyfill, and exclude @hydra-sdk/cardano-wasm from optimizeDeps.
Then create an AppWallet on PREPROD and log its base address to verify the setup.
System Requirements
Before installing the SDK, ensure your system meets these requirements:
- Node.js: >= 18.20.0
- npm: >= 8.0.0 (or pnpm >= 8.0.0, yarn >= 1.22.0)
- TypeScript: >= 5.0.0 (optional but recommended)
Core Packages
Install Individual Packages
Install the packages you need — but always include @hydra-sdk/cardano-wasm:
# Core wallet functionality
npm install @hydra-sdk/core @hydra-sdk/cardano-wasm
# Hydra Layer 2 integration
npm install @hydra-sdk/bridge @hydra-sdk/cardano-wasm
# Transaction building utilities
npm install @hydra-sdk/transaction @hydra-sdk/cardano-wasm
@hydra-sdk/cardano-wasm is the WASM core that every other package imports through. Even though it is pulled in transitively, install it as a direct dependency so your bundler can configure it (vite-plugin-wasm, excluding it from optimizeDeps) and so pnpm's strict node_modules resolves it. See Configuration for bundler setup.Install Complete Bundle
For most projects, install the core packages together:
# Install all essential packages
npm install @hydra-sdk/core @hydra-sdk/bridge @hydra-sdk/transaction @hydra-sdk/cardano-wasm
Next Steps
Now that you have the SDK installed, continue with:
- Quick Start Guide - Create your first wallet
- Configuration Guide - Set up your build tools
- Build a Wallet App - Complete working React & Vue apps
- API Reference - Explore the full API
