Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
003200b
Update CONTRIBUTING.md
tcheeric Aug 19, 2025
9372d84
docs: clarify PR branch
tcheeric Aug 20, 2025
a3611a5
Merge pull request #396 from tcheeric/codex/update-contributing-instr…
tcheeric Aug 20, 2025
c8217fa
docs: reinforce PR submission guidelines
tcheeric Aug 20, 2025
e4ee959
Merge pull request #397 from tcheeric/codex/update-agents.md-for-pr-g…
tcheeric Aug 20, 2025
af49981
remove GitHub action for assigning Copilot reviewer
Aug 21, 2025
152b6c1
docs: update AGENTS.md with additional guidelines for new features an…
Aug 21, 2025
c2bd047
docs: update AGENTS.md to include guideline for describing test methods
Aug 21, 2025
56995d9
ci: show build log errors
tcheeric Aug 21, 2025
2bec13f
ci: surface build errors in failure issues
tcheeric Aug 21, 2025
5242b14
Merge pull request #399 from tcheeric/codex/update-ci-workflow-to-cre…
tcheeric Aug 21, 2025
6d7a130
Merge branch 'develop' into codex/update-ci-workflow-to-log-build-errors
tcheeric Aug 21, 2025
6669f36
Merge pull request #398 from tcheeric/codex/update-ci-workflow-to-log…
tcheeric Aug 21, 2025
1d688bd
ci: add codex label step
tcheeric Aug 21, 2025
ad3e4c7
Merge pull request #400 from tcheeric/codex/add-label-to-issues-in-wo…
tcheeric Aug 21, 2025
1c069d8
docs: list NIP titles
tcheeric Aug 21, 2025
9e368be
Merge pull request #401 from tcheeric/codex/add-nip-title-to-stopped-…
tcheeric Aug 21, 2025
05d7a91
ci: simplify PR title regex
tcheeric Aug 21, 2025
3cfbcf4
Merge pull request #402 from tcheeric/codex/update-pr-title-validatio…
tcheeric Aug 21, 2025
b51d5c5
feat: harden NIP-05 validator HTTP handling
tcheeric Aug 21, 2025
6acec2c
Merge pull request #403 from tcheeric/codex/refactor-nip05validator-f…
tcheeric Aug 21, 2025
4d0f8be
fix: add signing exception class
tcheeric Aug 21, 2025
61a2261
fix: handle event encoding errors
tcheeric Aug 21, 2025
be0df6b
fix: remove default marker assignment in EventTag
tcheeric Aug 21, 2025
78f879f
Merge pull request #404 from tcheeric/codex/introduce-signingexceptio…
tcheeric Aug 21, 2025
c7c39f8
Merge pull request #405 from tcheeric/codex/refactor-baseeventencoder…
tcheeric Aug 21, 2025
48e9b35
Merge pull request #406 from tcheeric/codex/refactor-marker-handling-…
tcheeric Aug 21, 2025
4529fcb
docs: enforce PR template usage
tcheeric Aug 21, 2025
200f059
Merge pull request #407 from tcheeric/codex/update-agent.md-to-enforc…
tcheeric Aug 21, 2025
f195b0b
chore: bump version to 0.2.2.1
tcheeric Aug 21, 2025
b5766b7
Merge pull request #408 from tcheeric/codex/update-version-to-0.2.2.1
tcheeric Aug 21, 2025
37b06d1
Update nostr-java-event/src/main/java/nostr/event/json/codec/EventEnc…
tcheeric Aug 21, 2025
4c5ef4c
test: add validation tests for more event types
tcheeric Aug 22, 2025
4ea39e0
Merge pull request #410 from tcheeric/codex/add-unit-tests-for-event-…
tcheeric Aug 22, 2025
7b1128e
refactor: remove unused Nip05Obj inner class
tcheeric Aug 22, 2025
18f3f2f
refactor: use EventEncodingException for encoding
tcheeric Aug 22, 2025
b6b81e7
Merge pull request #411 from tcheeric/codex/remove-nip05obj-inner-class
tcheeric Aug 22, 2025
88f51c6
Merge pull request #412 from tcheeric/codex/replace-jsonprocessingexc…
tcheeric Aug 22, 2025
be4d51b
refactor: unify decoder interface
tcheeric Aug 22, 2025
94ea72e
Merge pull request #413 from tcheeric/codex/update-decoders-to-confor…
tcheeric Aug 22, 2025
3e0994a
docs: update AGENTS.md to include guideline for adding test descriptions
Aug 22, 2025
b8accba
add GitHub action for resolving Codex-labeled issues
Aug 22, 2025
5d1cb68
ci: restrict codex workflow to CI-created issues
tcheeric Aug 22, 2025
9924626
Merge pull request #414 from tcheeric/codex/update-codex-job-conditio…
tcheeric Aug 22, 2025
7f6132b
chore(deps): bump spring-boot.version from 3.5.4 to 3.5.5
dependabot[bot] Aug 26, 2025
827e3d1
chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin
dependabot[bot] Aug 26, 2025
10f063f
chore(deps): bump actions/setup-java from 4 to 5
dependabot[bot] Aug 26, 2025
8f92263
chore(deps): bump actions/checkout from 3 to 5
dependabot[bot] Aug 26, 2025
a7842f7
chore(deps): bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Aug 26, 2025
9f3bae5
ci: configure release-please
tcheeric Aug 27, 2025
510b1a5
Merge pull request #420 from tcheeric/codex/create-release-configurat…
tcheeric Aug 27, 2025
2d1dd2e
ci: add workflow to publish artifacts
tcheeric Aug 27, 2025
e37bfee
Merge pull request #421 from tcheeric/codex/add-github-workflow-for-m…
tcheeric Aug 27, 2025
46cc49c
Merge pull request #416 from tcheeric/dependabot/maven/develop/org.ap…
tcheeric Aug 27, 2025
21e5db6
Merge pull request #417 from tcheeric/dependabot/github_actions/devel…
tcheeric Aug 27, 2025
77cce53
Merge pull request #418 from tcheeric/dependabot/github_actions/devel…
tcheeric Aug 27, 2025
f385122
chore: add maven configuration file
Aug 28, 2025
3bf07b5
chore: add commitlint configuration for commit message validation
Aug 28, 2025
675c0a7
docs: add commit message guidelines for consistency
Aug 28, 2025
95dbbea
chore: remove redundant workflow file
Aug 28, 2025
57c36f8
Merge remote-tracking branch 'origin/develop' into develop
Aug 28, 2025
bfc474c
ci: add workflow for verifying conventional commits
Aug 28, 2025
5366182
ci: add google-java-format workflow for code formatting
Aug 28, 2025
002ca9e
Google Java Format
Aug 28, 2025
bc9ee2d
ci: trigger publish on release workflow run
tcheeric Aug 28, 2025
0a60469
ci: trigger release-please on CodeQL success
tcheeric Aug 28, 2025
fe42be7
ci: run CodeQL after CI workflow
tcheeric Aug 28, 2025
f9afe90
ci: run after Format workflow
tcheeric Aug 28, 2025
1c44aaf
ci: guard google-java-format workflow
tcheeric Aug 28, 2025
10c3a36
Merge pull request #423 from tcheeric/codex/update-release-please.yml…
tcheeric Aug 28, 2025
f898b23
Google Java Format
Aug 28, 2025
be126fa
Merge pull request #422 from tcheeric/codex/modify-github-actions-pub…
tcheeric Aug 28, 2025
333ce25
Merge pull request #424 from tcheeric/codex/update-codeql-analysis-wo…
tcheeric Aug 28, 2025
d35c035
Merge pull request #425 from tcheeric/codex/update-ci-triggers-in-ci.yml
tcheeric Aug 28, 2025
33e48ab
Merge pull request #426 from tcheeric/codex/update-google-java-format…
tcheeric Aug 28, 2025
45d1abe
docs(agents): update test method documentation guidelines
Aug 28, 2025
efdf035
docs(contributing): update contribution guidelines for clarity
Aug 28, 2025
cfbc3f6
chore(license): update copyright holder in LICENSE file
Aug 28, 2025
e2571c3
Add qodana.yaml file
qodana-bot Aug 30, 2025
d146127
Add github workflow file
qodana-bot Aug 30, 2025
133b238
Merge pull request #427 from tcheeric/qodana-automation-1618672767
tcheeric Aug 30, 2025
b4d0b00
docs(api): add comprehensive Javadocs and clean up
Aug 31, 2025
9fcab91
chore(release): bump version to 0.2.3.0 (next minor)
Aug 31, 2025
1a7673b
Merge pull request #428 from tcheeric/docs/api-javadocs
tcheeric Aug 31, 2025
7130bd3
refactor: remove redundant rethrow and reuse HttpClient
Aug 31, 2025
e9b750d
docs: add PR 1 draft description
Aug 31, 2025
dd1355b
build: bump version to 0.2.4 and add PR draft
Aug 31, 2025
e410d35
Merge branch 'develop' into refactor/rethrow-and-httpclient
tcheeric Aug 31, 2025
ee41aa6
Merge pull request #429 from tcheeric/refactor/rethrow-and-httpclient
tcheeric Aug 31, 2025
c8c31b7
refactor(deserializer): replace forEachRemaining with while loop for …
Aug 31, 2025
38b6b90
refactor(nip): update StringEscapeUtils import to use commons.text pa…
Aug 31, 2025
ec59bec
chore(pom): bump version to 0.3.0 and add commons-text dependency
Aug 31, 2025
9c70f4a
fix(CreateOrUpdateStallEvent): improve validation for stall fields
Aug 31, 2025
b40a9b6
refactor(merchant-event): streamline error handling for entity valida…
Aug 31, 2025
9938071
refactor(nip): simplify nip05 validation and improve error handling
Aug 31, 2025
c5393e4
refactor(nostr): update retryable annotation to include IOException
Aug 31, 2025
7135a2e
Merge pull request #430 from tcheeric/refactor/rethrow-and-httpclient…
tcheeric Aug 31, 2025
616664c
Merge pull request #419 from tcheeric/dependabot/maven/develop/org.sp…
tcheeric Aug 31, 2025
2e646b2
Merge remote-tracking branch 'origin/dependabot/maven/develop/spring-…
Aug 31, 2025
0837154
Merge pull request #431 from tcheeric/release/0.3.1-refactor-deprecat…
tcheeric Aug 31, 2025
4878f29
chore(workflows): remove CodeQL analysis workflow
Aug 31, 2025
8752c7e
chore(workflows): update workflow triggers for formatting and CI
Aug 31, 2025
7dec7e0
chore(pom): bump nostr-java version to 0.3.1
Aug 31, 2025
2147498
ci(workflows): update publish workflow for release events
Aug 31, 2025
c06f6f4
Merge pull request #432 from tcheeric/publish_action
tcheeric Aug 31, 2025
383046f
chore(deps): bump JetBrains/qodana-action from 2025.1 to 2025.2
dependabot[bot] Sep 2, 2025
cd00a3d
chore(deps): bump actions/checkout from 3 to 5
dependabot[bot] Sep 2, 2025
625dfce
chore: tidy spring websocket client files
tcheeric Oct 3, 2025
2d6a242
docs: add spring subscription example client
tcheeric Oct 3, 2025
924599e
fix: avoid blocking subscription close
tcheeric Oct 3, 2025
4b0a175
chore: add .qodana to gitignore
Oct 3, 2025
932d643
refactor(api): enable non-blocking subscription handling
Oct 3, 2025
d2635dc
refactor(api): restore override for decode method
Oct 3, 2025
14ad06b
docs(bech32): improve method documentation for encode and decode
Oct 3, 2025
e34c7c8
refactor(api): make classTypeTagsMap final for immutability
Oct 3, 2025
5a521f2
docs(schnorr): enhance method documentation for sign and verify
Oct 3, 2025
ab99fe4
refactor(api): remove unused id field from ZapRequest
Oct 3, 2025
b811357
refactor(api): remove redundant assertion handling in product event v…
Oct 3, 2025
22d3f93
refactor(api): restore override annotation for decode method
Oct 3, 2025
0bd966c
refactor(api): restore override annotation for decode method
Oct 3, 2025
024ec93
refactor(api): restore override annotation for decode method
Oct 3, 2025
ba98567
refactor(api): suppress resource warning for HttpClient instantiation
Oct 3, 2025
33543a3
refactor(api): restore override annotations and clean up method docum…
Oct 3, 2025
d0818b5
refactor(api): make relayName and relayUri final fields
Oct 3, 2025
74858ea
refactor: deleted files
Oct 3, 2025
03a405f
refactor(api): simplify tag addition logic in CalendarContent
Oct 3, 2025
5968fcc
refactor: update pull request template to clarify purpose section
Oct 3, 2025
18de8cd
Merge pull request #448 from tcheeric/codex/add-non-blocking-subscrip…
tcheeric Oct 3, 2025
f0e3cb7
chore(pom): update version to 0.4.0
Oct 3, 2025
df880ac
wip: migrate nostr-java to nostr-java-bom - needs BOM update for Spri…
Oct 5, 2025
2d21380
feat: migrate nostr-java to nostr-java-bom and bump to 0.5.0
Oct 5, 2025
f7b3a3b
chore: add PR document for BOM migration
Oct 5, 2025
ddf23e5
chore: update GitHub workflow triggers for Qodana and formatting
Oct 5, 2025
4777ced
chore: configure CI to run on pull requests and pushes
Oct 5, 2025
7e7547f
Merge pull request #434 from tcheeric/dependabot/github_actions/devel…
tcheeric Oct 5, 2025
ce4ed73
Merge pull request #433 from tcheeric/dependabot/github_actions/devel…
tcheeric Oct 5, 2025
c400c3d
chore(pom): delete
Oct 5, 2025
1a113d6
chore: bump version to 0.5.0
Oct 5, 2025
643539c
docs: Revamp docs, add streaming subscriptions guide, and add navigat…
Oct 5, 2025
b3a8b6d
docs: comprehensive documentation improvements and fixes
Oct 5, 2025
61fb3ab
docs: update relay URLs to use 398ja relay
Oct 5, 2025
5bfeb08
docs: remove redundant examples from CODEBASE_OVERVIEW.md
Oct 5, 2025
38bc38e
fix: source plugin versions from properties
tcheeric Oct 5, 2025
08b1d6c
Merge pull request #450 from tcheeric/codex/address-comment-in-pom.xml
tcheeric Oct 5, 2025
368eeec
Merge pull request #449 from tcheeric/feat/bom-migration
tcheeric Oct 5, 2025
11a268b
chore: bump version to 0.5.1
Oct 5, 2025
d56ff99
docs: add PR document for documentation improvements
Oct 5, 2025
b8b65e1
docs(agents): enhance coding and documentation guidelines
Oct 5, 2025
66a1a6d
Merge branch 'develop' into docs/revamp-docs
tcheeric Oct 5, 2025
3048ccf
chore: align module versions with 0.5.1
tcheeric Oct 5, 2025
2f064ad
Merge pull request #451 from tcheeric/docs/revamp-docs
tcheeric Oct 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Revamp docs, add streaming subscriptions guide, and add navigat…
…ion links
  • Loading branch information
erict875 committed Oct 5, 2025
commit 643539c4abce09c6f906c0ad9f96ffa7c996d8d2
40 changes: 10 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,24 @@

See [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) for installation and usage instructions.

For a quick API walkthrough, see [`docs/howto/use-nostr-java-api.md`](docs/howto/use-nostr-java-api.md).
## Documentation

See [`docs/CODEBASE_OVERVIEW.md`](docs/CODEBASE_OVERVIEW.md) for details about running tests and contributing.
- Docs index: [docs/README.md](docs/README.md) — quick entry point to all guides and references.
- Getting started: [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) — install via Maven/Gradle and build from source.
- API how‑to: [docs/howto/use-nostr-java-api.md](docs/howto/use-nostr-java-api.md) — create, sign, and publish basic events.
- Streaming subscriptions: [docs/howto/streaming-subscriptions.md](docs/howto/streaming-subscriptions.md) — open and manage long‑lived, non‑blocking subscriptions.
- Custom events how‑to: [docs/howto/custom-events.md](docs/howto/custom-events.md) — define, sign, and send custom event types.
- API reference: [docs/reference/nostr-java-api.md](docs/reference/nostr-java-api.md) — classes, key methods, and short examples.
- Extending events: [docs/explanation/extending-events.md](docs/explanation/extending-events.md) — guidance for extending the event model.
- Codebase overview and contributing: [docs/CODEBASE_OVERVIEW.md](docs/CODEBASE_OVERVIEW.md) — layout, testing, and contribution workflow.

## Examples
Examples are located in the [`nostr-java-examples`](./nostr-java-examples) module.

- [`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.

## Streaming subscriptions

The client and API layers expose a non-blocking streaming API for long-lived subscriptions. Use
`NostrSpringWebSocketClient.subscribe` to open a REQ subscription and receive relay messages via a
callback:

```java
Filters filters = new Filters(new KindFilter<>(Kind.TEXT_NOTE));
AutoCloseable subscription =
client.subscribe(
filters,
"example-subscription",
message -> {
// handle EVENT/NOTICE payloads on your own executor to avoid blocking the socket thread
},
error -> log.warn("Subscription error", error));

// ... keep the subscription open while processing events ...

subscription.close(); // sends CLOSE to the relay and releases the underlying WebSocket
```

Subscriptions must be closed by the caller to ensure a CLOSE frame is sent to the relay and to free
the dedicated WebSocket connection created for the REQ. Callbacks run on the WebSocket thread; for
high-throughput feeds, hand off work to a queue or executor to provide backpressure and keep the
socket responsive.


## Supported NIPs
The API currently implements the following [NIPs](https://github.com/nostr-protocol/nips):
- [NIP-1](https://github.com/nostr-protocol/nips/blob/master/01.md) - Basic protocol flow description
Expand Down
2 changes: 2 additions & 0 deletions docs/CODEBASE_OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Codebase Overview

Navigation: [Docs index](README.md) · [Getting started](GETTING_STARTED.md) · [API how‑to](howto/use-nostr-java-api.md) · [API reference](reference/nostr-java-api.md)

This document provides an overview of the project structure and instructions for building and testing the modules.

## Module layout
Expand Down
3 changes: 2 additions & 1 deletion docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Getting Started

Navigation: [Docs index](README.md) · [API how‑to](howto/use-nostr-java-api.md) · [Streaming subscriptions](howto/streaming-subscriptions.md) · [API reference](reference/nostr-java-api.md) · [Codebase overview](CODEBASE_OVERVIEW.md)

## Prerequisites
- Maven
- Java 21+
Expand Down Expand Up @@ -48,4 +50,3 @@ dependencies {
Replace `[VERSION]` with the latest release number from the [releases page](https://github.com/tcheeric/nostr-java/releases).

Examples are available in the [`nostr-java-examples`](../nostr-java-examples) module.

16 changes: 16 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Documentation Index

Quick links to the most relevant guides and references.

- Getting Started
- [GETTING_STARTED.md](GETTING_STARTED.md) — install and consume via Maven/Gradle
- How‑to Guides
- [howto/use-nostr-java-api.md](howto/use-nostr-java-api.md) — create, sign, and publish events
- [howto/streaming-subscriptions.md](howto/streaming-subscriptions.md) — open and manage long‑lived subscriptions
- [howto/custom-events.md](howto/custom-events.md) — build and send custom events
- Reference
- [reference/nostr-java-api.md](reference/nostr-java-api.md) — classes, key methods, and examples
- Explanation
- [explanation/extending-events.md](explanation/extending-events.md) — extend the event model
- Project
- [CODEBASE_OVERVIEW.md](CODEBASE_OVERVIEW.md) — codebase layout, testing, contributing
2 changes: 2 additions & 0 deletions docs/explanation/extending-events.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Extending Events

Navigation: [Docs index](../README.md) · [API how‑to](../howto/use-nostr-java-api.md) · [Custom events](../howto/custom-events.md) · [API reference](../reference/nostr-java-api.md)

This project uses factories and registries to make it easy to introduce new event types while keeping core classes stable.

## Factory and Registry Overview
Expand Down
2 changes: 2 additions & 0 deletions docs/howto/custom-events.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Custom Nostr Events

Navigation: [Docs index](../README.md) · [Getting started](../GETTING_STARTED.md) · [API how‑to](use-nostr-java-api.md) · [Streaming subscriptions](streaming-subscriptions.md) · [API reference](../reference/nostr-java-api.md)

This guide shows how to construct and publish a Nostr event with a non-standard `kind` using **nostr-java**.

## Background
Expand Down
83 changes: 83 additions & 0 deletions docs/howto/streaming-subscriptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Streaming Subscriptions

Navigation: [Docs index](../README.md) · [Getting started](../GETTING_STARTED.md) · [API how‑to](use-nostr-java-api.md) · [Custom events](custom-events.md) · [API reference](../reference/nostr-java-api.md)

This guide explains how to open and manage long‑lived, non‑blocking subscriptions to Nostr relays
using the `nostr-java` API. It covers lifecycle, concurrency/backpressure, multiple relays, and
error handling.

## Overview

- Use `NostrSpringWebSocketClient.subscribe` to open a REQ subscription that streams relay messages
to your callback.
- The method returns immediately with an `AutoCloseable`. Calling `close()` sends a `CLOSE` to the
relay(s) and frees the underlying WebSocket resource(s).
- Callbacks run on the WebSocket thread; offload heavy work to your own executor/queue to keep the
socket responsive.

## Quick start

```java
import java.util.Map;
import nostr.api.NostrSpringWebSocketClient;
import nostr.base.Kind;
import nostr.event.filter.Filters;
import nostr.event.filter.KindFilter;

Map<String, String> relays = Map.of("local", "wss://relay.example");

NostrSpringWebSocketClient client = new NostrSpringWebSocketClient().setRelays(relays);

Filters filters = new Filters(new KindFilter<>(Kind.TEXT_NOTE));

AutoCloseable subscription = client.subscribe(
filters,
"example-subscription",
message -> {
// Handle EVENT/EOSE/NOTICE payloads here. Offload if heavy.
},
error -> {
// Log/report errors. Consider retry or metrics.
}
);

// ... keep the subscription open while processing events ...

subscription.close(); // sends CLOSE and releases resources
client.close(); // closes any remaining relay connections
```

See a runnable example in [../../nostr-java-examples/src/main/java/nostr/examples/SpringSubscriptionExample.java](../../nostr-java-examples/src/main/java/nostr/examples/SpringSubscriptionExample.java).

## Lifecycle and closing

- Each `subscribe` call opens a dedicated WebSocket per relay. Keep the handle while you need the
stream and call `close()` when done.
- Always close subscriptions to ensure a `CLOSE` frame is sent to the relay and resources are freed.
- After `close()`, no further messages will be delivered to your listener.

## Concurrency and backpressure

- Message callbacks execute on the WebSocket thread; avoid blocking. If processing may block, hand
off to a separate executor or queue.
- For high‑throughput feeds, consider batching or asynchronous processing to prevent socket stalls.

## Multiple relays

- When multiple relays are configured via `setRelays`, the client opens one WebSocket per relay and
fans out the same REQ. Your listener receives messages from all configured relays.
- Include an identifier (e.g., relay name/URL) in logs/metrics if you need per‑relay visibility.

## Error handling

- Provide an `errorListener` to capture exceptions raised during subscription or message handling.
- Consider transient vs. fatal errors. You can implement retry logic at the application level if
desired.

## Related API

- Client: `nostr-java-api/src/main/java/nostr/api/NostrSpringWebSocketClient.java`
- WebSocket wrapper: `nostr-java-client/src/main/java/nostr/client/springwebsocket/SpringWebSocketClient.java`
- Interface: `nostr-java-client/src/main/java/nostr/client/springwebsocket/WebSocketClientIF.java`

For method signatures and additional details, see the API reference: [../reference/nostr-java-api.md](../reference/nostr-java-api.md).
5 changes: 5 additions & 0 deletions docs/howto/use-nostr-java-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Using the nostr-java API

Navigation: [Docs index](../README.md) · [Getting started](../GETTING_STARTED.md) · [Streaming subscriptions](streaming-subscriptions.md) · [Custom events](custom-events.md) · [API reference](../reference/nostr-java-api.md)

This guide shows how to set up the library and publish a basic [Nostr](https://github.com/nostr-protocol/nips) event.

## Minimal setup
Expand Down Expand Up @@ -42,3 +44,6 @@ public class QuickStart {
- [`NIP01.createTextNoteEvent`](../../nostr-java-api/src/main/java/nostr/api/NIP01.java)
- [`EventNostr.sign`](../../nostr-java-api/src/main/java/nostr/api/EventNostr.java)
- [`EventNostr.send`](../../nostr-java-api/src/main/java/nostr/api/EventNostr.java)

### Next steps
- Streaming, lifecycle, and backpressure: [streaming-subscriptions.md](streaming-subscriptions.md)
9 changes: 6 additions & 3 deletions docs/reference/nostr-java-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Nostr Java API Reference

Navigation: [Docs index](../README.md) · [Getting started](../GETTING_STARTED.md) · [API how‑to](../howto/use-nostr-java-api.md) · [Streaming subscriptions](../howto/streaming-subscriptions.md) · [Custom events](../howto/custom-events.md)

This document provides an overview of the public API exposed by the `nostr-java` modules. It lists the major classes, configuration objects and their key method signatures, and shows brief examples of how to use them. Where applicable, links to related [Nostr Improvement Proposals (NIPs)](https://github.com/nostr-protocol/nips) are provided.

## Identity (`nostr-java-id`)
Expand Down Expand Up @@ -129,9 +131,10 @@ public void close()
`subscribe` opens a dedicated WebSocket per relay, returns immediately, and streams raw relay
messages to the provided listener. The returned `AutoCloseable` sends a `CLOSE` command and releases
resources when invoked. Because callbacks execute on the WebSocket thread, delegate heavy
processing to another executor to avoid stalling inbound traffic. The
[`SpringSubscriptionExample`](../../nostr-java-examples/src/main/java/nostr/examples/SpringSubscriptionExample.java)
demonstrates how to open a subscription and close it after a fixed duration.
processing to another executor to avoid stalling inbound traffic.

- How‑to guide: [../howto/streaming-subscriptions.md](../howto/streaming-subscriptions.md)
- Example: [../../nostr-java-examples/src/main/java/nostr/examples/SpringSubscriptionExample.java](../../nostr-java-examples/src/main/java/nostr/examples/SpringSubscriptionExample.java)

### Configuration
- `RetryConfig` – enables Spring Retry support.
Expand Down