Nostrify with NDK ​
Nostrify provides an adapter for NDK with @nostrify/ndk. This enables you to use NDK as a storage backend for Nostrify.
Installation ​
sh
npm install @nostrify/ndksh
yarn add @nostrify/ndksh
pnpm add @nostrify/ndksh
bun add @nostrify/ndkUsage ​
Set up NDK as normal, and then pass your NDK instance into NDKStore to make it available as a Nostrify relay.
ts
import NDK from '@nostr-dev-kit/ndk';
import { NDKStore } from '@nostrify/ndk';
const ndk = new NDK(/* set up NDK */);
await ndk.connect();
const relay = new NDKStore(ndk); // Now it works like a Nostrify relay!