Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ The public API remains **100% compatible** between 0.4.0 and 0.5.1. All existing
```java
// This code works in both 0.4.0 and 0.5.1
Identity identity = Identity.generateRandomIdentity();
Map<String, String> relays = Map.of("damus", "wss://relay.398ja.xyz");
Map<String, String> relays = Map.of("398ja", "wss://relay.398ja.xyz");

new NIP01(identity)
.createTextNoteEvent("Hello nostr")
Expand Down
6 changes: 3 additions & 3 deletions docs/explanation/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,16 @@ protected void validateTags() {
**Examples:**
```java
// RelayUri - validates WebSocket URIs
RelayUri relay = new RelayUri("wss://relay.damus.io");
RelayUri relay = new RelayUri("wss://relay.398ja.xyz");
// Throws IllegalArgumentException if not ws:// or wss://

// SubscriptionId - type-safe subscription identifiers
SubscriptionId subId = SubscriptionId.of("my-subscription");
// Throws IllegalArgumentException if blank

// Equality based on value, not object identity
RelayUri r1 = new RelayUri("wss://relay.damus.io");
RelayUri r2 = new RelayUri("wss://relay.damus.io");
RelayUri r1 = new RelayUri("wss://relay.398ja.xyz");
RelayUri r2 = new RelayUri("wss://relay.398ja.xyz");
assert r1.equals(r2); // true - same value
```

Expand Down
4 changes: 2 additions & 2 deletions docs/howto/api-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static final Map<String, String> RELAYS = Map.of("local", "localhost:555

**For testing**, you can:
- Use a local relay (e.g., [nostr-rs-relay](https://github.com/scsibug/nostr-rs-relay))
- Replace with public relays: `Map.of("damus", "wss://relay.398ja.xyz")`
- Replace with public relays: `Map.of("398ja", "wss://relay.398ja.xyz")`

---

Expand Down Expand Up @@ -644,7 +644,7 @@ private static final Map<String, String> RELAYS =

// Use public relays
private static final Map<String, String> RELAYS = Map.of(
"damus", "wss://relay.398ja.xyz",
"398ja", "wss://relay.398ja.xyz",
"nos", "wss://nos.lol"
);
```
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/streaming-subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import nostr.base.Kind;
import nostr.event.filter.Filters;
import nostr.event.filter.KindFilter;

Map<String, String> relays = Map.of("damus", "wss://relay.398ja.xyz");
Map<String, String> relays = Map.of("398ja", "wss://relay.398ja.xyz");

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

Expand Down
2 changes: 1 addition & 1 deletion docs/howto/use-nostr-java-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import java.util.Map;
public class QuickStart {
public static void main(String[] args) {
Identity identity = Identity.generateRandomIdentity();
Map<String, String> relays = Map.of("damus", "wss://relay.398ja.xyz");
Map<String, String> relays = Map.of("398ja", "wss://relay.398ja.xyz");

new NIP01(identity)
.createTextNoteEvent("Hello nostr")
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/nostr-java-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Base checked exception for utility methods.
Identity id = Identity.generateRandomIdentity();
NIP01 nip01 = new NIP01(id).createTextNoteEvent("Hello Nostr");
NostrIF client = NostrSpringWebSocketClient.getInstance(id)
.setRelays(Map.of("damus","wss://relay.398ja.xyz"));
.setRelays(Map.of("398ja","wss://relay.398ja.xyz"));
client.sendEvent(nip01.getEvent());
```

Expand Down