Quartz
Quartz is a Kotlin Multiplatform Nostr library developed by Vitor Pamplona. It is the shared protocol and data layer behind Amethyst’s push toward Android, desktop, and eventually iOS from one codebase.
How It Works
Quartz provides core Nostr functionality as a shared library:
- Event Handling: Parsing, validation, and creation of Nostr events
- Cryptography: Secp256k1 signing, NIP-44 encryption, key management
- Relay Communication: Connection management, message ordering, subscription handling
- NIP Support: Implementation of common NIPs including NIP-06, NIP-19, NIP-44, and more
Why It Matters
Quartz moves protocol-heavy logic out of a single app and into a reusable library. That matters because relay handling, event parsing, encryption, and storage rules become easier to share across clients instead of being reimplemented per platform.
The concrete result already showed up in Amethyst’s desktop work. The grant-backed refactor moved shared code into Kotlin Multiplatform modules such as commonMain, jvmAndroid, and jvmMain, making desktop support a library and module problem instead of a full rewrite.
Architecture
The library uses a modular source set structure:
commonMain: Shared code for all platformsjvmAndroid: Code shared between JVM and AndroidandroidMain: Android-specific implementationsjvmMain: Desktop JVM implementationsiosMain: iOS-specific implementations
Current Status
In December 2025, OpenSats announced funding for Quartz in its fourteenth wave of Nostr grants. The repo exists as a standalone library, but much of the visible progress so far has landed through Amethyst PRs that convert app modules into multiplatform code and track feature parity across targets.
Primary sources:
Mentioned in:
See also: