JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 83
  • Score
    100M100P100Q74481F
  • License MIT

Reusable Nostr messaging system with NIP-04 and NIP-17 support

Package Exports

  • @samthomson/nostr-messaging/core
  • @samthomson/nostr-messaging/package.json
  • @samthomson/nostr-messaging/react
  • @samthomson/nostr-messaging/storage
  • @samthomson/nostr-messaging/ui

Readme

@nostr-dm/messaging

Reusable Nostr messaging system with NIP-04 and NIP-17 support.

Installation

npm install @nostr-dm/messaging

Usage

// Core library (pure functions)
import { dmLib } from '@nostr-dm/messaging/core';

// Storage (IndexedDB)
import { writeMessagesToDB } from '@nostr-dm/messaging/storage';

// React context (TODO: not yet extracted)
// import { NewDMProvider } from '@nostr-dm/messaging/react';

// UI components (TODO: not yet extracted)
// import { NewDMChatArea } from '@nostr-dm/messaging/ui';

Development

Build

npm install
npm run build
# In this repo
npm link

# In your app
npm link @nostr-dm/messaging

Watch mode

npm run dev  # Rebuilds on changes

Status

  • ✅ Core library (pure functions, types, constants)
  • ✅ Storage (IndexedDB utilities)
  • ⏳ React context (needs extraction from Silent)
  • ⏳ UI components (needs extraction from Silent)

License

MIT