🌱 Nostr Development

    Nostrify

    Bring your projects to life on Nostr. 🌱

    A flexible TypeScript library for building Nostr apps with relays, signers, storages, and more. Works in browsers, Node.js, Deno, and mobile apps.

    $ npx jsr add @nostrify/nostrify
    // Available on JSR, a modern alternative to npm
    main.ts
    import { NostrEvent, NRelay1 } from '@nostrify/nostrify';
    // Simple, powerful, cross-platform
    const relay = new NRelay1('wss://relay.damus.io');
    for await (const msg of relay.req([{])) {
    if (msg[0] === 'EVENT') break;
    }
    JSR
    Modern Registry
    Async
    Generators
    NIP-07
    Compatible

    Simple Modules That Do One Thing Well

    Nostrify provides flexible building blocks that work together. Each module implements standard interfaces so you can easily switch implementations or build your own.

    🛰️ Relays

    Automatically reconnect and gather events efficiently from pools. Uses AsyncGenerators for powerful streaming.

    📦 Storages

    Store events in memory, SQL databases, and relays all using the same interface. Interchangeable with relays.

    ✒️ Signers

    Sign events with private keys, hardware wallets, remote signers, and more. Full NIP-07 compatibility.

    📜 Schemas

    Parse Nostr events, relay messages, and other untrusted sources with built-in validation.

    👩‍⚖️ Policies

    Reject events in clients and relays based on custom rules. Composable moderation pipelines.

    🖼️ Uploaders

    Upload files to Blossom, nostr.build, and more with NIP-94 compatible metadata.

    See Nostrify in Action

    AsyncGenerators, standard interfaces, and powerful abstractions make Nostr development elegant.

    AsyncGenerator-Based Relay Streaming

    Stream events from relays using for-await loops with automatic cleanup

    import { NRelay1 } from '@nostrify/nostrify';
    const relay = new NRelay1('wss://relay.damus.io');
    for await (const msg of relay.req([{ kinds: [1, 6] }])) {
    if (msg[0] === 'EVENT') console.log(msg[2]);
    if (msg[0] === 'EOSE') break;
    }
    // Breaking out of loop automatically sends CLOSE 🚀

    Learn Nostrify

    Comprehensive guides, tutorials, and documentation to get you building fast.

    Getting Started

    Quick Start Guide

    Build your first Nostr application with Nostrify - relays, storage, and signers in minutes.

    5 min readRead Guide
    Documentation

    Complete Documentation

    Explore all modules - relays, storages, signers, policies, uploaders, and integrations.

    ComprehensiveBrowse Docs
    Source Code

    GitLab Repository

    Open source TypeScript library. Contribute, report issues, or explore the code.

    MIT LicenseView Source

    Start Building with Nostrify

    Join the growing community of developers building the decentralized future with TypeScript and Nostr.

    $ npx jsr add @nostrify/nostrify
    Available on JSR ⚡