Commit Graph

1494 Commits

Author SHA1 Message Date
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
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
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
Vitor Pamplona 6371f2e0d0 Fixes Url 2026-03-29 21:41:57 -04:00
Vitor Pamplona 207fc6beba removes Volatile (missing import) 2026-03-29 21:30:12 -04:00
Claude 092c057e6f feat: implement NIP-C7 chat messages (kind 9)
Add ChatEvent in quartz/nipC7Chats with support for kind 9 chat
messages and q-tag based replies per the NIP-C7 specification.
Wire up rendering in NoteCompose and NoteMaster (ThreadFeedView).

https://claude.ai/code/session_01BmAMHBCRKXG612i6zrhhP4
2026-03-30 01:17:28 +00:00
Vitor Pamplona c89a02eb0d Merge branch 'main' into claude/implement-nip5a-rendering-5ioVq 2026-03-29 20:43:02 -04:00
Vitor Pamplona 365a526b12 Merge pull request #2016 from vitorpamplona/claude/implement-nip7d-rendering-d4zgy
feat: implement NIP-7D thread events (kind 11)
2026-03-29 20:19:18 -04:00
Vitor Pamplona 5e20806229 Merge pull request #2015 from vitorpamplona/claude/implement-nip87-rendering-PBlES
Add NIP-87 Ecash support with Cashu and Fedimint event types
2026-03-29 20:13:32 -04:00
Vitor Pamplona f91f68a74e Merge pull request #2013 from vitorpamplona/claude/refactor-url-detector-FCLCA
Refactor URL detection and path normalization for clarity
2026-03-29 19:16:05 -04:00
Claude c4044858a9 feat: implement NIP-87 ecash mint discoverability
Add protocol support and UI rendering for NIP-87 which defines ecash
mint discovery via three event kinds: MintRecommendationEvent (38000),
CashuMintEvent (38172), and FedimintEvent (38173).

https://claude.ai/code/session_01JR2nFVPjPGG9jTV4Qq2PUW
2026-03-29 22:25:46 +00:00
Claude 776bc6d36f feat: implement NIP-5A static website event rendering
Add Quartz protocol support for NIP-5A Pubkey Static Websites with
RootSiteEvent (kind 15128) and NamedSiteEvent (kind 35128), including
tag parsers for path, server, title, description, and source. Wire up
rendering in NoteCompose and ThreadFeedView to display site metadata.

https://claude.ai/code/session_01XTmqQ9QatUA7aPCWt7NHNt
2026-03-29 22:18:02 +00:00
Claude 8e66776ee1 feat: implement NIP-7D thread events (kind 11)
Add support for NIP-7D thread events with title rendering in both
NoteCompose (feed view) and ThreadFeedView (detail view). Replies
use existing NIP-22 kind 1111 comments.

https://claude.ai/code/session_01MR2hLpmq3pkzzT11t86dAt
2026-03-29 22:15:21 +00:00
Vitor Pamplona ebbcb603fb Fixes lazy on trimming service 2026-03-29 10:20:06 -04:00
Vitor Pamplona 56510e4213 Merge pull request #2010 from vitorpamplona/claude/nip43-relay-members-dWO19
Add NIP-43 relay members support with UI screens
2026-03-29 10:17:29 -04:00
Vitor Pamplona a4ce8439de Merge branch 'main' into claude/add-nip-61-support-KTkuk 2026-03-29 10:17:11 -04:00
Vitor Pamplona 2c5f80f613 Merge pull request #2009 from vitorpamplona/claude/add-nip60-support-DOf8B
Add NIP-60 Cashu wallet and spending history event support
2026-03-29 10:16:46 -04:00
Claude cad0ff3d80 fix: Make add/remove member events support multiple p tags and add NIP-43 to NoteMaster
Changes memberPubKey() to memberPubKeys() returning a list of all p tags
in RelayAddMemberEvent and RelayRemoveMemberEvent. Updates renderers to
display multiple members. Adds NIP-43 event rendering to ThreadFeedView
(NoteMaster) alongside NoteCompose.

https://claude.ai/code/session_01PRqe4bBCb9u62oPh8u9sHx
2026-03-29 14:13:41 +00:00
Vitor Pamplona 03c692a8cf Merge pull request #2005 from davotoula/Introduce-log-level-filtering
Introduce log level filtering
2026-03-29 09:56:21 -04:00
davotoula 380026c7be optimise imports 2026-03-29 15:38:51 +02:00
davotoula c40c1ed383 perf: convert remaining 12 interpolated log calls to lambda overloads
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 13:07:34 +02:00
davotoula 6d89de9444 refactor: simplify PlatformLog actuals and convert remaining interpolated log calls to lambdas
- Extract private log() helper in JVM and iOS PlatformLog to reduce
  copy-paste branching
- Fix JVM formatter to be private and non-nullable
- Convert 60+ interpolated Log.w/e/i calls to lambda overloads,
  including hot-path Filter.kt toJson() and LocalCache event processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 10:58:11 +02:00
davotoula 3b81731771 perf: convert 194 interpolated Log.d() calls to lambda overloads
Defers string construction until after the level check, avoiding
allocation when debug logging is filtered in release/benchmark builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 10:58:10 +02:00