npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hydra-sdk/bridge

v2.0.2

Published

Hydra SDK - Bridge library for integrating with Hydra Layer 2 on Cardano (hydra-node v2.x)

Readme

@hydra-sdk/bridge

Talk to a hydra-node: head lifecycle, real-time events, snapshot UTxOs and L2 transaction submission.

npm

🔗 Supported hydra-node versions

| @hydra-sdk/bridge | hydra-node | Status | | --- | --- | --- | | 2.x | 2.x (tested against 2.3.0) | ✅ Active | | 1.x | 1.x (up to 1.3.0) | 🚫 End of life — no further releases |

The bridge major version tracks the hydra-node major version. Minor and patch versions move independently.

2.0.0 targets the v2 protocol, which removed the commit phase (ADR-33). Upgrading from 1.x is a breaking change — see MIGRATION-v2.md.

🎮 Try it first

The Hydra SDK Playground builds and inspects Hydra transactions in the browser — switch the transaction builder into Hydra mode to see how an L2 transaction differs from an L1 one. When a head rejects a transaction, Hydra Message Trace decodes the node's validationError into something readable.

🚀 Quick Start

pnpm add @hydra-sdk/bridge @hydra-sdk/cardano-wasm
import { HydraBridge } from '@hydra-sdk/bridge'

const bridge = new HydraBridge({ url: 'ws://localhost:4001', verbose: true })
await bridge.connect()

const info = await bridge.headInfo()
const utxos = bridge.snapshotUtxoArray()

url accepts ws://, wss://, http://, https://, and gateway URLs carrying ?X-Api-Key=…. For Socket.IO endpoints with JWT auth, pass a HexcoreConnector as connector instead — see the API reference.

✨ Key Features

  • Head lifecyclecommands.init(), close(), safeClose(), contest(), fanout(), partialFanout()
  • Incremental depositspendingDeposits() and recoverDeposit() replace the v1 commit phase
  • L2 submissionsubmitL2Tx() over POST /transaction, plus submitTxSync() (Promise) and submitTx() (error-first callback)
  • O(1) balance and UTxO reads from an in-memory snapshot cache — no I/O per call
  • Real-time events for every head state transition, with the payload union fully typed
  • Protocol parametersgetProtocolParameters(), and getRawProtocolParameters() for costModels / protocolVersion when budgeting exUnits
  • Auto-reconnect with configurable interval and attempt cap, cancelled safely on disconnect()

📚 Documentation

License

Apache 2.0. Repo | Issues