Skip to content

NDK (Nostr Development Kit)

NDK is a TypeScript/JavaScript library that simplifies building Nostr clients, relays, and related applications.

WARNING

The documentation of the NDK project is under heavy construction. More information available in open pull request.

Features

  • Event creation, validation, and wrappers for major NIPs
  • Flexible subscription API with caching, batching, and auto-closing
  • Event Signing through private key, encrypted keys (NIP-49), browser extension (NIP-07) or remote signer (NIP-46)
  • Relay connection pool with automatic reconnection and failover
  • Outbox model support
  • Pluggable cache adapters (Redis, Dexie, SQLite, etc)
  • Data Vending Machine support (NIP-90)
  • Zap utilities (NIP-57, NIP-61)
  • Threading, event kinds, and utility functions (URL normalization, metadata tags, filters)
  • Modular design with packages for different frameworks (Mobile, Svelte, React)

NIP Support

Multi-Repo

NDK is a monorepo with different packages. The main package is @nostr-dev-kit/core and contains the core functionality.

For other functionality you might need additional packages:

Extras

Framework Integrations

Cache Adapters

These NDK adapters are used to store and retrieve data from a cache so relays do not need to be re-queried for the same data.