/lophus

Fully-modular TypeScript implementation of the Nostr protocol, oriented to web standards and edge environments

Primary LanguageTypeScriptMIT LicenseMIT

Lophus

🚧 Still under development and not ready for use.

CI codecov

Lophus is an experimental TypeScript library for development of Nostr clients and relays, oriented to web standards and edge environments.

Features

  • Modular 🔌 - NIPs and high-level interfaces are implemented as optional TypeScript modules, which makes your apps as small as possible.
  • Fast ⚡ - Carefully designed to be performant. Fully asynchronous and non-blocking. Use native code of a runtime via Web APIs.
  • Portable 📦 - No runtime-specific code or external dependencies in the core modules so that it can work on various platforms.
  • Type-safe 🛡️ - Thoroughly typed with insanity.
  • Compatible 🤝 - Shares the same data structure for events as nostr-tools.

Project Structure

Provides a set of modules that implement the Nostr protocol and its extensions. Supposed to be the entry point for most developers who want to use Lophus.

Provides high-level interfaces and utilities, and functionalities that depends on third-party libraries.

Contains the core modules that implement the basic architecture of Lophus. Used for implementation of NIPs, or possibly your own Nostr-like protocols.

General-purpose modules that are developed for Lophus, but not directly related to the Nostr protocol. You may use them in any TypeScript project.

A SSR-oriented Nostr client application that demonstrates how to use the library.

Performance tests for Lophus and other Nostr libraries. Highly experimental.

Sponsors

Software for the next generation of social media.

Soapbox

References

Development of Lophus is inspired by the following projects:

  • NIPs - Nostr Implementation Possibilities
  • nostr-tools - Reference implementation of the protocol in TypeScript
  • nostring - A Nostr relay library written in Deno
  • Hono - A fast, lightweight, and multi-platform Web framework for edges