Getting started
Installation
You can install NDK core using your favorite package manager.
sh
npm i @nostr-dev-kit/ndksh
pnpm add @nostr-dev-kit/ndksh
yarn add @nostr-dev-kit/ndksh
bun add @nostr-dev-kit/ndkNDK is compatible with node v16+
Other packages
For other functionality you might need additional packages:
Extras
- @nostr-dev-kit/blossom: Blossom Protocol Support for assets
- @nostr-dev-kit/sessions: Session Management with Multi-Account support
- @nostr-dev-kit/sync: Event synchronization using Negentropy
- @nostr-dev-kit/wallet: Support for WebLN, NWC, Cashu/eCash wallets
- @nostr-dev-kit/wot: Web of Trust (WOT) utilities
Framework Integrations
- @nostr-dev-kit/react: Hooks and utilities to integrate Nostr into your React applications
- @nostr-dev-kit/svelte: Modern, performant, and beautiful Svelte 5 integration
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.
- @nostr-dev-kit/cache-memory: In-memory LRU cache adapter
- @nostr-dev-kit/cache-nostr: Local Nostr relay cache adapter
- @nostr-dev-kit/cache-redis: A cache adapter for Redis
- @nostr-dev-kit/cache-dexie: Dexie (IndexedDB, in browser database) adapter
- @nostr-dev-kit/cache-sqlite: SQLite (better-sqlite3) adapter
- @nostr-dev-kit/cache-sqlite-wasm: In browser (WASM) SQLite adapter