Commit Graph

1516 Commits

Author SHA1 Message Date
Claude 3c486a383b docs: add NIP-100 draft for WebRTC calls over Nostr
Specifies the signaling protocol for P2P voice/video calls:
- 6 event kinds (25050-25055) for offer/answer/ICE/hangup/reject/renegotiate
- NIP-59 gift wrap delivery (no seal layer)
- Follow-gated spam prevention
- Short expiration for ephemeral signaling data

https://claude.ai/code/session_017hZm7yu7CzmcQgZGSaqSXS
2026-04-02 01:20:00 +00:00
Claude 2ee48da064 feat: add WebRTC voice/video call infrastructure
Implements P2P calling over Nostr relays using WebRTC for media
transport and NIP-59 Gift Wraps for encrypted signaling. No custom
server required — only public STUN servers for NAT traversal.

Protocol layer (quartz/nip100WebRtcCalls):
- 6 new event kinds (25050-25055): offer, answer, ICE candidate,
  hangup, reject, renegotiate
- WebRtcCallFactory for creating and gift-wrapping signaling events
- CallIdTag and CallTypeTag for event metadata
- Events registered in EventFactory

Call state machine (commons/call):
- CallState sealed interface with full lifecycle states
- CallManager orchestrating signaling and state transitions
- Follow-gate spam prevention: only followed users can ring,
  non-follows are silently ignored

Android WebRTC integration (amethyst/service/call):
- WebRtcCallSession wrapping Google WebRTC PeerConnection
- CallForegroundService for keeping calls alive in background
- IceServerConfig with default public STUN servers
- User-configurable TURN server support

Android UI (amethyst/ui/call):
- CallScreen with offering, connecting, connected, and ended states
- IncomingCallUI with accept/reject buttons
- ConnectedCallUI with mute, video toggle, speaker, and timer
- Call button added to 1-on-1 DM chat header
- ActiveCall route added to navigation

https://claude.ai/code/session_017hZm7yu7CzmcQgZGSaqSXS
2026-04-02 01:20:00 +00:00
Vitor Pamplona 9587026abc v1.08.0 2026-04-01 15:45:46 -04:00
Vitor Pamplona cd11503b1e v1.07.5 2026-03-31 20:18:34 -04:00
Vitor Pamplona 5cd83bbaa4 v1.07.4 2026-03-31 19:19:24 -04:00
Vitor Pamplona 48d90a8252 Fixes Wallet import encoding bug 2026-03-31 19:10:15 -04:00
Vitor Pamplona 69099728b2 v1.07.3 2026-03-31 17:32:23 -04:00
Vitor Pamplona a4e3625f26 Migrates to the new 10008 profile badges kind 2026-03-31 16:52:24 -04:00
Claude b960a4692a feat: migrate BookmarkListEvent from kind 30001 to 10003
Rename the existing BookmarkListEvent (kind 30001) to OldBookmarkListEvent
and create a new BookmarkListEvent with kind 10003 as per the updated spec.

- OldBookmarkListEvent (kind 30001): Kept as-is for backward compatibility,
  displayed as "Old Bookmarks" in the Bookmark Lists screen
- BookmarkListEvent (kind 10003): New replaceable event, all new bookmark
  operations (save/check/remove) use this kind
- Both kinds are displayed as separate items in the Bookmark Lists screen
- Old Bookmarks screen includes a "Move All to New Bookmarks" button that
  migrates public bookmarks to public and private to private
- Created PrivateReplaceableTagArrayEvent base class for replaceable events
  with encrypted private tags (kind 10003 is in the 10000-19999 range)
- Updated all relay filters, search queries, and profile views to fetch
  both kinds
- Updated Android and Desktop modules

https://claude.ai/code/session_01U9sjQHQMVVHxYiesoXjqop
2026-03-31 13:24:27 +00:00
Vitor Pamplona f291bb126a Merge branch 'main' into claude/migrate-quartz-nip58-XQ8bw 2026-03-31 09:17:11 -04:00
Vitor Pamplona 26798e2b57 Fixes assertion 2026-03-31 08:59:38 -04:00
Vitor Pamplona 9cb7f9cc21 Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2026-03-31 08:57:49 -04:00
davotoula 4d1e9cb8d5 Merge branch 'main-upstream' into chess-enhancements-and-bug-fixes 2026-03-31 07:26:39 +02:00
Claude a4bf093cb3 refactor: migrate NIP-58 badges to nip88Polls-style sub-package structure
Restructures the flat nip58Badges package into sub-packages following
the established nip88Polls pattern with proper tag classes, TagArrayExt,
and TagArrayBuilderExt for each event type:

- definition/ - BadgeDefinitionEvent (kind 30009) with NameTag, ImageTag,
  DescriptionTag, ThumbTag supporting dimensions per spec
- award/ - BadgeAwardEvent (kind 8) with build() method
- profiles/ - BadgeProfilesEvent (kind 30008) with AcceptedBadge tag
  for proper paired a+e tag parsing per NIP-58 spec

Adds build() companion methods to all three event types and full
spec compliance including image/thumb dimension support.

https://claude.ai/code/session_019Uvxfa7jJbjeprLxECoJ8s
2026-03-31 03:08:25 +00:00
Vitor Pamplona c5edcab051 Fixes the loading of old labeled bookmarks 2026-03-30 22:03:51 -04:00
Vitor Pamplona 8e4ee7a618 v1.07.2 2026-03-30 16:46:01 -04:00
greenart7c3 198e049873 Assign rejected based on the presence of the "rejected" key in intent extras rather than retrieving its specific boolean value 2026-03-30 17:18:02 -03:00
Vitor Pamplona 640c47e29f v1.07.1 2026-03-30 13:53:25 -04:00
Claude 13bd492e32 refactor: replace synchronized with lock-free CAS in BleChunkAssembler
Use AtomicReference holding an immutable list with a compare-and-set loop,
eliminating the synchronized block while maintaining thread safety.

https://claude.ai/code/session_01KLRz7FJgWRtgCcZe3qD1VX
2026-03-30 17:48:58 +00:00
Claude ef8b9be0e8 refactor: replace synchronized with Channel + AtomicBoolean in BLE relay classes
Use Channel(UNLIMITED) as a lock-free send queue and AtomicBoolean with
atomic exchange for the isSending flag, eliminating all synchronized blocks
while maintaining thread safety via a double-check pattern.

https://claude.ai/code/session_01KLRz7FJgWRtgCcZe3qD1VX
2026-03-30 17:37:23 +00:00
Vitor Pamplona 0c4e5be1ea v1.07.0 2026-03-30 12:29:41 -04:00
davotoula a7259b21ee Merge branch 'main-upstream' into chess-enhancements-and-bug-fixes 2026-03-30 17:40:40 +02:00
Vitor Pamplona f81631d95c Merge pull request #2034 from vitorpamplona/claude/simplify-relay-md-docs-GXKoW
Simplify RELAY.md documentation for clarity and brevity
2026-03-30 08:48:28 -04:00
Vitor Pamplona 5214470209 Merge pull request #2033 from vitorpamplona/claude/create-nostr-readme-BUScG
Add comprehensive Nostr client documentation guide
2026-03-30 08:48:14 -04:00
Claude f65fd30728 docs: simplify RELAY.md by removing verbose sections
Remove architecture diagram, NIP support table, module table,
Live Subscriptions explanation, serve method details, production-ready
example, and excessive code comments. Keep the readable Quick Start,
Store options, and Policy documentation in a more concise form.

https://claude.ai/code/session_01U3iW3eRD7bfLwrM3L9gkDc
2026-03-30 12:46:38 +00:00
Vitor Pamplona a468f3b6d6 Merge pull request #2031 from vitorpamplona/claude/simplify-relay-api-Zq3o8
Add AutoCloseable support and simplify relay connection lifecycle
2026-03-30 08:36:44 -04:00
Claude df88cab92d refactor: simplify relay API with AutoCloseable and serve() helper
- NostrServer and IEventStore implement AutoCloseable for .use {} support
- Add NostrServer.serve() to handle session lifecycle automatically
- IRelayPolicy + operator now returns PolicyStack instead of List
- Deprecate shutdown() in favor of close()
- Update RELAY.md guide to use simplified API patterns

https://claude.ai/code/session_013oL9PkQaFyNQHKVg2vw9qs
2026-03-30 12:35:27 +00:00
Claude 3d400d4197 docs: add CLIENT.md guide for building Nostr clients with Quartz
Companion to the existing RELAY.md, this guide covers the client side:
Ktor WebSocket transport implementation, subscribing to events (Flow
and callback APIs), publishing signed events, filters, key management,
and multi-relay patterns.

https://claude.ai/code/session_01KFos33kA9VoMhKdBPNLquF
2026-03-30 12:34:51 +00:00
Vitor Pamplona b808f5a1f6 Merge pull request #2030 from vitorpamplona/claude/nip89-compliance-modernize-BWso3
Add PlatformLinkTag parsing and NIP-89 app handler extensions
2026-03-30 08:22:36 -04:00
davotoula 17f071b0f4 Merge branch 'main' into chess-enhancements-and-bug-fixes
# Conflicts:
#	commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventBroadcaster.kt
2026-03-30 13:14:33 +02:00
Claude 4ba92931f6 docs: add relay README for building with Ktor, NostrServer, and SQLite EventStore
Comprehensive guide covering the full relay stack: NostrServer setup,
SQLite EventStore configuration, Ktor WebSocket integration, policy
system (VerifyPolicy, FullAuthPolicy, PolicyStack), indexing strategies,
testing patterns, and NIP support matrix.

https://claude.ai/code/session_01CTyiKDNhgXdfCFBBBXf1NF
2026-03-30 04:13:53 +00:00
Claude 940e59b323 feat: NIP-89 compliance fixes, modernize package structure, link NIP-88 polls
Fix PlatformLinkTag.parse() off-by-one bug where tag indices were shifted
(platform/uri/entityType read from wrong positions). Add missing TagArrayExt
and EventExt files for definition and recommendation packages to align with
the modern pattern used by nip88Polls. Parameterize DiscoverNIP89FeedFilter
by targetKind and create NIP-89 poll app discovery infrastructure linking
NIP-88 polls (kind 1068) to the NIP-89 app handler discovery system.

https://claude.ai/code/session_013r2LXj11SieWa5PaLesKfC
2026-03-30 03:49:21 +00:00
Claude 273af03c9f feat: add reader methods to all DVM request events for server processing
Each request event now exposes typed reader methods so DVM servers can
extract inputs, parameters, and configuration from incoming requests:
- inputs() returns List<InputTag> with value, type, relay, marker
- Kind-specific readers like language(), model(), searchQuery(), pow(), etc.
- Shared TagArrayExt with dvmParam(), dvmParamAll(), dvmParamValues()

Also adds readers to existing 5300/5301 events (dvmPubKey, user, relays).

https://claude.ai/code/session_017aamEDeRtQ2H9u5U9B5F1C
2026-03-30 03:21:19 +00:00
Claude cd4b352bdf feat: add typed build parameters and shared DVM tag infrastructure
Add shared tag classes (InputTag, OutputTag) and TagArrayBuilder
extensions (inputUrl, inputText, inputEvent, inputJob, inputPrompt,
output, param) for all DVM kinds to reuse.

Update all 17 request event build() methods with typed parameters
matching their spec:
- 5000: inputUrl, outputMimeType, range, alignment
- 5001: eventIds, length, outputMimeType
- 5002: eventIds, language
- 5050: prompt, model, maxTokens, temperature, topK, topP, frequencyPenalty
- 5100: prompt, sourceImageUrl, model, lora, ratio, size, negativePrompt
- 5200: videoUrl, outputMimeType, range
- 5201: videoUrl, language, subtitle, range, outputFormat
- 5202: imageUrl
- 5250: text, language
- 5302: searchQuery, users, since, until, maxResults
- 5303: searchQuery, maxResults
- 5400: inputs, relays, groups, filterJson
- 5500: fileUrl
- 5900: eventId
- 5901: text
- 5905: eventJson, relays
- 5970: eventJson, pow

https://claude.ai/code/session_017aamEDeRtQ2H9u5U9B5F1C
2026-03-30 03:07:07 +00:00
Claude 4f32776b24 feat: add all NIP-90 DVM kind event classes from data-vending-machines spec
Add request/response event classes for all 19 DVM kinds defined in
nostr-protocol/data-vending-machines: text extraction (5000/6000),
summarization (5001/6001), translation (5002/6002), text generation
(5050/6050), image generation (5100/6100), video conversion (5200/6200),
video translation (5201/6201), image-to-video (5202/6202), text-to-speech
(5250/6250), content search (5302/6302), people search (5303/6303),
event count (5400/6400), malware scanning (5500/6500), event timestamping
(5900/6900), OP_RETURN creation (5901/6901), event publish schedule
(5905/6905), and event PoW delegation (5970/6970).

Also fixes existing events:
- Content discovery response (6300) now parses both "a" and "e" tags
- User discovery response (6301) now has innerTags() to parse "p" tags

All new events registered in EventFactory.

https://claude.ai/code/session_017aamEDeRtQ2H9u5U9B5F1C
2026-03-30 02:45:54 +00:00
Vitor Pamplona 21488561e0 Merge pull request #2023 from vitorpamplona/claude/refactor-nip90-structure-ugeNj
Refactor NIP90 DVMs: reorganize packages and extract tag classes
2026-03-29 22:26:02 -04:00
Vitor Pamplona 570f7d787d Merge pull request #2022 from vitorpamplona/claude/nostr-ble-messaging-i2rrJ
Add NIP-BE Bluetooth Low Energy mesh networking support
2026-03-29 22:24:43 -04:00
Claude 6e7f6eccf1 refactor: reorganize NIP-BE into subpackages and add README
Restructured nipBEBle/ into logical subpackages:
- Root: public API surface (BleNostrMesh, BleConfig, BlePeer, BleRole)
- protocol/: wire format (BleMessageChunker, BleChunkAssembler)
- transport/: platform BLE abstraction (BleTransport, AndroidBleTransport)
- relay/: Nostr protocol over BLE (BleNostrClient, BleNostrServer, BleMeshManager)

Added README.md with quick start guide, package structure overview,
advanced usage examples, and wire protocol reference.

https://claude.ai/code/session_01Tz5E73Rj7tL48A3qUGS5DT
2026-03-30 02:23:49 +00:00
Claude ce3de5caf7 refactor: restructure NIP90 DVMs to match NIP88 Polls pattern
Each event kind now gets its own subpackage with dedicated tag classes,
TagArrayExt for parsing, and TagArrayBuilderExt for building. Events use
the eventTemplate pattern instead of manual tag construction.

New structure:
- status/ (kind 7000) with StatusTag, AmountTag
- contentDiscoveryRequest/ (kind 5300) with RelaysTag, ParamTag
- contentDiscoveryResponse/ (kind 6300)
- userDiscoveryRequest/ (kind 5301)
- userDiscoveryResponse/ (kind 6301)

https://claude.ai/code/session_01JeB9nAK4SKuwKZBEd6EAPd
2026-03-30 02:22:54 +00:00
Claude 28f68382dd feat: add BleNostrMesh facade for simpler developer API
Before (4 steps, manual wiring):
  val transport = AndroidBleTransport(context)
  val mesh = BleMeshManager(transport, object : BleMeshListener { ... })
  transport.setListener(mesh)
  mesh.start()

After (2 steps, auto-wired):
  val mesh = BleNostrMesh(AndroidBleTransport(context))
  mesh.onEvent { event, peer -> saveEvent(event) }
  mesh.start()

The facade uses lambda callbacks instead of interface implementation,
and auto-wires the transport listener via AndroidBleTransportContract.
BleMeshManager remains available for advanced use cases.

https://claude.ai/code/session_01Tz5E73Rj7tL48A3qUGS5DT
2026-03-30 02:18:24 +00:00
Claude 57aec95e8d fix: align NIP-BE chunk format with KoalaSat/samiz reference implementation
Reviewed the samiz BLE implementation and fixed compatibility issues:

- Chunk index: changed from 2 bytes to 1 byte (matching samiz/NIP-BE example)
- Chunk overhead: 2 bytes total (1 index + 1 total count), not 3
- chunkSize parameter now means payload size (500), not total chunk size
- Android: TX power HIGH, advertise timeout indefinite (matching samiz)
- Android: request MTU 512 and CONNECTION_PRIORITY_HIGH on connect
- Android: discover services after MTU negotiation (samiz flow)
- Android: set WRITE_TYPE_DEFAULT on write characteristic
- MTU-to-chunkSize: properly accounts for ATT overhead (3) + chunk overhead (2)

These changes ensure wire-level compatibility with samiz devices.

https://claude.ai/code/session_01Tz5E73Rj7tL48A3qUGS5DT
2026-03-30 02:12:52 +00:00
Vitor Pamplona 2d21529176 Merge pull request #2021 from vitorpamplona/claude/implement-nip-29-MEtLk
Add NIP-29 Relay Groups event types and tag support
2026-03-29 21:58:40 -04:00
Vitor Pamplona bb7cdc973a Merge pull request #2019 from vitorpamplona/claude/implement-nip69-InF2y
Add NIP-69 P2P Order Events support
2026-03-29 21:58:33 -04:00
Claude fb78c1a4c4 feat: implement NIP-BE Nostr BLE Communications Protocol in Quartz
Adds full NIP-BE implementation for BLE-based Nostr peer-to-peer
messaging and synchronization with KMP support across all targets.

Protocol layer (commonMain):
- BleConfig: NIP-BE constants (service UUID, characteristic UUIDs)
- BleMessageChunker: DEFLATE compression + chunk splitting/joining
- BleRole/assignRole: Role assignment based on UUID comparison
- BleTransport: Platform-agnostic BLE transport interface
- BleNostrClient: IRelayClient implementation over BLE
- BleNostrServer: Relay server over BLE with notification support
- BleMeshManager: High-level mesh manager with auto-discovery,
  role assignment, and event broadcasting
- BleChunkAssembler: Thread-safe chunk reassembly

Platform support:
- Deflate expect/actual for jvmAndroid, apple, and linux targets
- AndroidBleTransport: Full Android BLE implementation using GATT
  server/client APIs with scanning, advertising, and MTU negotiation

Tests: Deflate compression, message chunking, role assignment,
and chunk assembly (25 tests passing).

https://claude.ai/code/session_01Tz5E73Rj7tL48A3qUGS5DT
2026-03-30 01:58:26 +00:00
Vitor Pamplona abd53c87a0 Merge pull request #2020 from vitorpamplona/claude/implement-nip-15-kMewH
Add NIP-15 Marketplace event types and data models
2026-03-29 21:58:26 -04:00
Claude c5bd3ebcd3 feat: implement NIP-15 Nostr Marketplace protocol in Quartz
Adds support for the NIP-15 decentralized marketplace protocol with
all event kinds: StallEvent (30017), ProductEvent (30018),
MarketplaceEvent (30019), AuctionEvent (30020), BidEvent (1021),
and BidConfirmationEvent (1022). Follows NIP-88 Polls structure
with JSON content data models and tag builder extensions.

https://claude.ai/code/session_014tf8Fn7J5CNpEgRsyMnhAy
2026-03-30 01:56:01 +00:00
Vitor Pamplona 974b4fcfb8 Removing a hex scheme-less urldetector test to leave it for later. 2026-03-29 21:55:33 -04:00
Claude f1547a020c feat: implement NIP-29 relay-based groups on Quartz
Add protocol-level support for NIP-29 relay-based groups with all
event kinds following the nip88Polls structure pattern.

Event kinds implemented:
- 9000 (put-user), 9001 (remove-user), 9002 (edit-metadata)
- 9005 (delete-event), 9007 (create-group), 9008 (delete-group)
- 9009 (create-invite), 9021 (join-request), 9022 (leave-request)
- 39000 (group-metadata), 39001 (group-admins)
- 39002 (group-members), 39003 (supported-roles)

Shared tags: GroupIdTag (h), PreviousTag, RoleTag, CodeTag, GroupAdminTag

https://claude.ai/code/session_016mcHkA5DUr4M2K5CddAGSq
2026-03-30 01:52:58 +00:00
Claude 0a25018f20 feat: implement NIP-69 P2P Order events (kind 38383) in Quartz
Add support for peer-to-peer order events as defined in NIP-69,
enabling unified liquidity pools across P2P trading platforms.

Implements P2POrderEvent as a BaseAddressableEvent with all required
tags (k, f, s, amt, fa, pm, premium, expires_at, expiration, y, z)
and optional tags (source, rating, network, layer, name, g, bond).
Follows the nip88Polls structure with per-tag classes, TagArrayExt,
and TagArrayBuilderExt. Reuses existing GeoHashTag and ExpirationTag.

https://claude.ai/code/session_01VpvrrRMLdjpB5C9Pq4VupK
2026-03-30 01:52:15 +00:00
Vitor Pamplona 59ea94c248 Fixes PlatformLog's missing file on linux 2026-03-29 21:48:56 -04:00