Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A nostr library, written in java, for generating, signing and publishing events.

License

NotificationsYou must be signed in to change notification settings

tcheeric/nostr-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CICI Matrix: docker + no-dockercodecovGitHub releaseLicense: MITQodana

nostr-java is a Java SDK for theNostr protocol. It provides utilities for creating, signing and publishing Nostr events to relays.

Requirements

  • Maven
  • Java 21+

Seedocs/GETTING_STARTED.md for installation and usage instructions.

Running Tests

  • Full test suite (requires Docker for Testcontainers ITs):

    mvn -q verify

  • Without Docker (skips Testcontainers-based integration tests via profile):

    mvn -q -Pno-docker verify

Theno-docker profile excludes tests under**/nostr/api/integration/** and setsnoDocker=true for conditional test disabling.

Troubleshooting

For diagnosing relay send issues and capturing failure details, see the how‑to guide:docs/howto/diagnostics.md.

Documentation

Examples

Examples are located in thenostr-java-examples module. See theAPI Examples Guide for detailed walkthroughs.

Key Examples

  • NostrApiExamples – Comprehensive examples covering 13+ use cases including text notes, encrypted DMs, reactions, channels, and more. See theguide for details.

  • SpringSubscriptionExample – Shows how to open a non-blockingNostrSpringWebSocketClient subscription and close it after a fixed duration.

Features

  • Clean Architecture - Modular design following SOLID principles
  • Comprehensive NIP Support - 25 NIPs implemented covering core protocol, encryption, payments, and more
  • Type-Safe API - Strongly-typed events, tags, and messages with builder patterns
  • Non-Blocking Subscriptions - Spring WebSocket client with reactive streaming support
  • Well-Documented - Extensive JavaDoc, architecture guides, and code examples
  • Production-Ready - High test coverage, CI/CD pipeline, code quality checks

Recent Improvements (v1.0.0)

🎯API Cleanup & Removals (breaking)

  • Deprecated APIs removed:Constants.Kind,Encoder.ENCODER_MAPPER_BLACKBIRD, and NIP01 Identity-based overloads
  • NIP01 now exclusively uses the instance-configured sender; builder simplified accordingly

🚀Performance & Serialization

  • Centralized JSON mapper vianostr.event.json.EventJsonMapper (Blackbird module); unified across event encoders

📚Documentation & Structure

  • Migration guide updated for 1.0.0 removals and replacements
  • Troubleshooting moved to dedicated how‑to:docs/howto/diagnostics.md
  • README streamlined to focus on users; maintainer topics moved under docs

🛠️Build & Release Tooling

  • CI workflow split for Docker vs no‑Docker runs
  • Release automation (scripts/release.sh) with bump/tag/verify/publish steps

Seedocs/explanation/architecture.md for detailed architecture overview.

Supported NIPs

25 NIPs implemented - comprehensive coverage of core protocol, security, and advanced features.

NIP Compliance Matrix

CategoryNIPDescriptionStatus
Core ProtocolNIP-01Basic protocol flow✅ Complete
NIP-02Follow List✅ Complete
NIP-12Generic Tag Queries✅ Complete
NIP-19Bech32 encoding✅ Complete
NIP-20Command Results✅ Complete
Security & IdentityNIP-05DNS-based identifiers✅ Complete
NIP-42Client authentication✅ Complete
NIP-46Remote signing✅ Complete
EncryptionNIP-04Encrypted DMs✅ Complete
NIP-44Versioned encryption✅ Complete
Content TypesNIP-08Handling Mentions✅ Complete
NIP-09Event Deletion✅ Complete
NIP-14Subject tags✅ Complete
NIP-23Long-form content✅ Complete
NIP-25Reactions✅ Complete
NIP-28Public Chat✅ Complete
NIP-30Custom Emoji✅ Complete
NIP-32Labeling✅ Complete
NIP-52Calendar Events✅ Complete
Commerce & PaymentsNIP-15Marketplace✅ Complete
NIP-57Lightning Zaps✅ Complete
NIP-60Cashu Wallets✅ Complete
NIP-61Nutzaps✅ Complete
NIP-99Classified Listings✅ Complete
UtilitiesNIP-03OpenTimestamps✅ Complete
NIP-40Expiration Timestamp✅ Complete

Coverage: 25/100+ NIPs (core protocol + most commonly used extensions)

Contributing

Contributions are welcome! SeeCONTRIBUTING.md for:

  • Coding standards and conventions
  • How to add new NIPs
  • Pull request guidelines
  • Testing requirements

For architectural guidance, seedocs/explanation/architecture.md.

License

This project is licensed under the MIT License - see theLICENSE file for details.

About

A nostr library, written in java, for generating, signing and publishing events.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors14


[8]ページ先頭

©2009-2025 Movatter.jp