{"id":13832718,"url":"https://github.com/tcheeric/nostr-java","last_synced_at":"2025-12-24T05:59:22.024Z","repository":{"id":92310216,"uuid":"579673703","full_name":"tcheeric/nostr-java","owner":"tcheeric","description":"A nostr library, written in java, for generating, signing and publishing events.","archived":false,"fork":false,"pushed_at":"2024-05-28T17:30:01.000Z","size":1473,"stargazers_count":63,"open_issues_count":9,"forks_count":18,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-29T08:32:58.825Z","etag":null,"topics":["java","nostr"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tcheeric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-18T13:51:35.000Z","updated_at":"2024-05-31T14:46:27.465Z","dependencies_parsed_at":"2024-01-13T16:28:47.420Z","dependency_job_id":"87accfd6-df3a-49a0-a889-7220dc7b6d2d","html_url":"https://github.com/tcheeric/nostr-java","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcheeric%2Fnostr-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcheeric%2Fnostr-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcheeric%2Fnostr-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcheeric%2Fnostr-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcheeric","download_url":"https://codeload.github.com/tcheeric/nostr-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225581824,"owners_count":17491794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","nostr"],"created_at":"2024-08-04T11:00:28.704Z","updated_at":"2025-12-24T05:59:22.019Z","avatar_url":"https://github.com/tcheeric.png","language":"Java","readme":"# nostr-java\n[![CI](https://github.com/tcheeric/nostr-java/actions/workflows/ci.yml/badge.svg)](https://github.com/tcheeric/nostr-java/actions/workflows/ci.yml)\n[![CI Matrix: docker + no-docker](https://img.shields.io/badge/CI%20Matrix-docker%20%2B%20no--docker-blue)](https://github.com/tcheeric/nostr-java/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/tcheeric/nostr-java/branch/main/graph/badge.svg)](https://codecov.io/gh/tcheeric/nostr-java)\n[![GitHub release](https://img.shields.io/github/v/release/tcheeric/nostr-java)](https://github.com/tcheeric/nostr-java/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Qodana](https://github.com/tcheeric/nostr-java/actions/workflows/qodana_code_quality.yml/badge.svg)](https://github.com/tcheeric/nostr-java/actions/workflows/qodana_code_quality.yml)\n\n`nostr-java` is a Java SDK for the [Nostr](https://github.com/nostr-protocol/nips) protocol. It provides utilities for creating, signing and publishing Nostr events to relays.\n\n## Requirements\n- Maven\n- Java 21+\n\nSee [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) for installation and usage instructions.\n\n## Running Tests\n\n- Full test suite (requires Docker for Testcontainers ITs):\n\n  `mvn -q verify`\n\n- Without Docker (skips Testcontainers-based integration tests via profile):\n\n  `mvn -q -Pno-docker verify`\n\nThe `no-docker` profile excludes tests under `**/nostr/api/integration/**` and sets `noDocker=true` for conditional test disabling.\n\n## Troubleshooting\n\nFor diagnosing relay send issues and capturing failure details, see the how‑to guide: [docs/howto/diagnostics.md](docs/howto/diagnostics.md).\n\n## Documentation\n\n- Docs index: [docs/README.md](docs/README.md) — quick entry point to all guides and references.\n- Operations: [docs/operations/README.md](docs/operations/README.md) — logging, metrics, configuration, diagnostics.\n- Getting started: [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) — install via Maven/Gradle and build from source.\n- API how‑to: [docs/howto/use-nostr-java-api.md](docs/howto/use-nostr-java-api.md) — create, sign, and publish basic events.\n- Streaming subscriptions: [docs/howto/streaming-subscriptions.md](docs/howto/streaming-subscriptions.md) — open and manage long‑lived, non‑blocking subscriptions.\n- Custom events how‑to: [docs/howto/custom-events.md](docs/howto/custom-events.md) — define, sign, and send custom event types.\n- API reference: [docs/reference/nostr-java-api.md](docs/reference/nostr-java-api.md) — classes, key methods, and short examples.\n- Extending events: [docs/explanation/extending-events.md](docs/explanation/extending-events.md) — guidance for extending the event model.\n- Codebase overview and contributing: [docs/CODEBASE_OVERVIEW.md](docs/CODEBASE_OVERVIEW.md) — layout, testing, and contribution workflow.\n\n## Examples\n\nExamples are located in the [`nostr-java-examples`](./nostr-java-examples) module. See the [API Examples Guide](docs/howto/api-examples.md) for detailed walkthroughs.\n\n### Key Examples\n\n- [`NostrApiExamples`](nostr-java-examples/src/main/java/nostr/examples/NostrApiExamples.java) – Comprehensive examples covering 13+ use cases including text notes, encrypted DMs, reactions, channels, and more. See the [guide](docs/howto/api-examples.md) for details.\n\n- [`SpringSubscriptionExample`](nostr-java-examples/src/main/java/nostr/examples/SpringSubscriptionExample.java) – Shows how to open a non-blocking `NostrSpringWebSocketClient` subscription and close it after a fixed duration.\n \n## Features\n\n- ✅ **Clean Architecture** - Modular design following SOLID principles\n- ✅ **Comprehensive NIP Support** - 25 NIPs implemented covering core protocol, encryption, payments, and more\n- ✅ **Type-Safe API** - Strongly-typed events, tags, and messages with builder patterns\n- ✅ **Non-Blocking Subscriptions** - Spring WebSocket client with reactive streaming support\n- ✅ **Well-Documented** - Extensive JavaDoc, architecture guides, and code examples\n- ✅ **Production-Ready** - High test coverage, CI/CD pipeline, code quality checks\n\n## Recent Improvements (v1.0.0)\n\n🎯 **API Cleanup \u0026 Removals (breaking)**\n- Deprecated APIs removed: `Constants.Kind`, `Encoder.ENCODER_MAPPER_BLACKBIRD`, and NIP01 Identity-based overloads\n- NIP01 now exclusively uses the instance-configured sender; builder simplified accordingly\n\n🚀 **Performance \u0026 Serialization**\n- Centralized JSON mapper via `nostr.event.json.EventJsonMapper` (Blackbird module); unified across event encoders\n\n📚 **Documentation \u0026 Structure**\n- Migration guide updated for 1.0.0 removals and replacements\n- Troubleshooting moved to dedicated how‑to: `docs/howto/diagnostics.md`\n- README streamlined to focus on users; maintainer topics moved under docs\n\n🛠️ **Build \u0026 Release Tooling**\n- CI workflow split for Docker vs no‑Docker runs\n- Release automation (`scripts/release.sh`) with bump/tag/verify/publish steps\n\nSee [docs/explanation/architecture.md](docs/explanation/architecture.md) for detailed architecture overview.\n\n## Supported NIPs\n\n**25 NIPs implemented** - comprehensive coverage of core protocol, security, and advanced features.\n\n### NIP Compliance Matrix\n\n| Category | NIP | Description | Status |\n|----------|-----|-------------|--------|\n| **Core Protocol** | [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md) | Basic protocol flow | ✅ Complete |\n| | [NIP-02](https://github.com/nostr-protocol/nips/blob/master/02.md) | Follow List | ✅ Complete |\n| | [NIP-12](https://github.com/nostr-protocol/nips/blob/master/12.md) | Generic Tag Queries | ✅ Complete |\n| | [NIP-19](https://github.com/nostr-protocol/nips/blob/master/19.md) | Bech32 encoding | ✅ Complete |\n| | [NIP-20](https://github.com/nostr-protocol/nips/blob/master/20.md) | Command Results | ✅ Complete |\n| **Security \u0026 Identity** | [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) | DNS-based identifiers | ✅ Complete |\n| | [NIP-42](https://github.com/nostr-protocol/nips/blob/master/42.md) | Client authentication | ✅ Complete |\n| | [NIP-46](https://github.com/nostr-protocol/nips/blob/master/46.md) | Remote signing | ✅ Complete |\n| **Encryption** | [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md) | Encrypted DMs | ✅ Complete |\n| | [NIP-44](https://github.com/nostr-protocol/nips/blob/master/44.md) | Versioned encryption | ✅ Complete |\n| **Content Types** | [NIP-08](https://github.com/nostr-protocol/nips/blob/master/08.md) | Handling Mentions | ✅ Complete |\n| | [NIP-09](https://github.com/nostr-protocol/nips/blob/master/09.md) | Event Deletion | ✅ Complete |\n| | [NIP-14](https://github.com/nostr-protocol/nips/blob/master/14.md) | Subject tags | ✅ Complete |\n| | [NIP-23](https://github.com/nostr-protocol/nips/blob/master/23.md) | Long-form content | ✅ Complete |\n| | [NIP-25](https://github.com/nostr-protocol/nips/blob/master/25.md) | Reactions | ✅ Complete |\n| | [NIP-28](https://github.com/nostr-protocol/nips/blob/master/28.md) | Public Chat | ✅ Complete |\n| | [NIP-30](https://github.com/nostr-protocol/nips/blob/master/30.md) | Custom Emoji | ✅ Complete |\n| | [NIP-32](https://github.com/nostr-protocol/nips/blob/master/32.md) | Labeling | ✅ Complete |\n| | [NIP-52](https://github.com/nostr-protocol/nips/blob/master/52.md) | Calendar Events | ✅ Complete |\n| **Commerce \u0026 Payments** | [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) | Marketplace | ✅ Complete |\n| | [NIP-57](https://github.com/nostr-protocol/nips/blob/master/57.md) | Lightning Zaps | ✅ Complete |\n| | [NIP-60](https://github.com/nostr-protocol/nips/blob/master/60.md) | Cashu Wallets | ✅ Complete |\n| | [NIP-61](https://github.com/nostr-protocol/nips/blob/master/61.md) | Nutzaps | ✅ Complete |\n| | [NIP-99](https://github.com/nostr-protocol/nips/blob/master/99.md) | Classified Listings | ✅ Complete |\n| **Utilities** | [NIP-03](https://github.com/nostr-protocol/nips/blob/master/03.md) | OpenTimestamps | ✅ Complete |\n| | [NIP-40](https://github.com/nostr-protocol/nips/blob/master/40.md) | Expiration Timestamp | ✅ Complete |\n\n**Coverage:** 25/100+ NIPs (core protocol + most commonly used extensions)\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for:\n- Coding standards and conventions\n- How to add new NIPs\n- Pull request guidelines\n- Testing requirements\n\nFor architectural guidance, see [docs/explanation/architecture.md](docs/explanation/architecture.md).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":["Install from Source","Libraries","网络编程"],"sub_categories":["Nostr","Client reviews and/or comparisons","Spring Cloud框架"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcheeric%2Fnostr-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcheeric%2Fnostr-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcheeric%2Fnostr-java/lists"}