nostrdevkit/nostr

repository·master·Indexed 20 days ago

https://github.com/nostrdevkit/nostr

A comprehensive Rust-based ecosystem for the Nostr protocol, including the nostr crate (v0.45.0-alpha.8) for low-level protocol implementation and nostr-sdk for high-level client and bot development. The ecosystem provides database traits via nostr-database with backends for Memory, LMDB, SQLite, and nostrdb, as well as gossip implementations and tools for the Blossom protocol via nostr-blossom. It supports WASM targets and includes a local-relay module with support for various NIPs.

Tokens
57.8K
Snippets
188
Records
243
Agent score
71%

What's inside nostrdevkit-nostr

  1. Overview of Nostr Connect (NIP46)

    master
    Nostr Connect (NIP46) is a protocol designed for remote signing in Nostr. It enables secure, decentralized event signing by allowing a Nostr client to communicate with a remote signer (such as a hardware device). The primary goal is to minimize private key exposure and improve overall security through a two-way communication channel between the client and the signer.
  2. Overview of the Nostr project structure

    master

    The nostrdevkit/nostr repository is organized into several specialized crates that provide different layers of the Nostr protocol implementation, storage, and connectivity. Developers can choose specific crates based on their needs:

    Core Protocol

    • nostr: The primary Rust implementation of the Nostr protocol.
    • nostr-blossom: A library for interacting with the Blossom protocol.
    • nostr-sdk: A high-level, full-featured SDK designed for building high-performance and reliable Nostr applications.

    Signers and Connectivity

    • nostr-browser-signer: Implementation of the Nostr Browser signer (NIP-07).
    • nostr-browser-signer-proxy: A proxy to allow native applications to use the Nostr Browser signer (NIP-07).
    • nostr-connect: Implementation of Nostr Connect (NIP-46).
    • nwc: A Nostr Wallet Connect (NWC) client (NIP-47).

    Databases and Storage

    • nostr-database: Defines the traits for an events database.
      • nostr-memory: In-memory implementation of the events database.
      • nostr-lmdb: LMDB storage backend.
      • nostr-ndb: nostrdb storage backend.
      • nostr-sqlite: SQLite storage backend.

    Gossip Implementation

    • nostr-gossip: Defines traits for gossip protocols.
      • nostr-gossip-memory: In-memory gossip database.
      • nostr-gossip-sqlite: SQLite storage for gossip.
  3. Use the Nostr Browser signer (NIP-07)

    master

    This library provides an implementation of the NIP-07 standard, which allows web applications to request signatures from a browser extension (like Alby or Nos2x) via a JavaScript window object.

    Warning: This library is currently in an ALPHA state. While implemented features are generally functional, the API is subject to breaking changes.

  4. Use the Nostr in-memory database

    master

    The nostr-memory package provides an in-memory storage backend designed for Nostr applications. It is useful for scenarios where persistent storage is not required or for high-speed, volatile data handling.

    Warning: This library is currently in an ALPHA state. While implemented features are generally functional, the API is subject to breaking changes.

  5. Choose a Nostr database backend

    master

    The nostr-database crate supports several backend implementations depending on your requirements for persistence and environment (native vs. web):

    • Memory: RAM-based storage, available for both native and web environments via nostr-memory.
    • LMDB: Native high-performance storage via nostr-lmdb.
    • SQLite: Supports both native and web environments via nostr-sqlite.
    • nostrdb: Native storage via nostr-ndb.