Commit Graph

1319 Commits

Author SHA1 Message Date
Vitor Pamplona d431b12f94 Migrates EventStore from Android's SQLLite to KMP
Fixes testing of libsodium between java and android
2026-03-20 16:00:17 -04:00
Vitor Pamplona c5066d89c3 Fixes serialization issues when the code falls back to Kotlin Serialization 2026-03-20 15:58:17 -04:00
Claude afb3221446 feat: add attestations package to quartz experimental
Implement the Attestations NIP with four event types:
- AttestationEvent (31871, addressable) - validity claims about other events
- AttestationRequestEvent (31872, addressable) - request attestation from attestors
- AttestorRecommendationEvent (31873, addressable) - recommend attestors for kinds
- AttestorProficiencyEvent (11871, replaceable) - declare verification proficiency

Each event follows Quartz's tag-per-file pattern with TagArrayExt and
TagArrayBuilderExt for reading/building tags.

https://claude.ai/code/session_01UswHRVTNqn1ToU4P4XDh2V
2026-03-19 20:40:19 +00:00
Vitor Pamplona 3f4e265dc0 Brings the creation of Zap Polls back. 2026-03-19 12:40:14 -04:00
Vitor Pamplona ec29a47dc4 More debugging information 2026-03-19 09:34:52 -04:00
Vitor Pamplona 3e3adaff10 Finalizes the RelaySync utility 2026-03-18 17:35:05 -04:00
Vitor Pamplona e57023cad9 Fix: Filters onCannotConnect to the relays that sent a req 2026-03-18 17:34:50 -04:00
Vitor Pamplona bc5b254d01 merge 2026-03-17 15:57:44 -04:00
Vitor Pamplona 3e19195e4a Renaming and making a test case that considers limits.
Fixes active filter index bug
2026-03-17 15:45:52 -04:00
Claude 5029db2302 refactor: reorganize nip47 wallet connect package into subpackages
Split the flat nip47WalletConnect package into logical subpackages:
- rpc/ - JSON-RPC protocol models (Request, Response, Notification, NwcMethod, NwcErrorCode, NwcTransaction, etc.)
- events/ - Nostr event types (LnZapPaymentRequestEvent, LnZapPaymentResponseEvent, NwcInfoEvent, NwcNotificationEvent)
- cache/ - Decryption caches (NostrWalletConnectRequestCache, NostrWalletConnectResponseCache)

Root level keeps the entry points: Nip47WalletConnect (URI parsing), Nip47Client, Nip47Server.
Existing subpackages (tags/, kotlinSerialization/, jackson/) remain unchanged.

https://claude.ai/code/session_018YcwMeTHPXmeqpbZHcBEUg
2026-03-17 19:04:24 +00:00
Vitor Pamplona aaa3bcfb2a Merge pull request #1870 from vitorpamplona/claude/fix-event-counter-per-filter-Aps6R
Add per-filter event counting for relay pagination
2026-03-17 13:46:10 -04:00
Claude 76c00dea3c fix: track event counts per filter in downloadFromRelay
Change the event counter from a single global counter to per-filter
tracking using Filter.match(). Each filter's limit is now respected
individually - fulfilled filters are excluded from subsequent pages,
and pagination stops when all filters with limits are satisfied.

https://claude.ai/code/session_01Baaira4xoEHEsaSQCX52Sy
2026-03-17 17:41:40 +00:00
Vitor Pamplona dd9e57542f Merge branch 'main' into claude/event-sync-screen-sYGtN 2026-03-17 13:28:36 -04:00
Vitor Pamplona cc98ac72c1 Revert to 20 since Alby only replies if limit is 20. 2026-03-17 12:04:10 -04:00
Claude 034cc0ab6d feat: move downloadFromRelay pagination logic to Quartz library
Extract the paginated relay download into a reusable INostrClient
extension (NostrClientDownloadFromRelayExt.kt) in the Quartz
commonMain accessories package. Uses Channel-based event collection
for KMP compatibility (no JVM-only atomics).

EventSyncViewModel.downloadFromRelay now delegates to the Quartz
extension, keeping the ViewModel thin.

Add NostrClientDownloadFromRelayTest integration test against
wss://nos.lol with Filter(kinds = [MetadataEvent.KIND], limit = 10)
to verify paginated downloads return correctly-typed events.

https://claude.ai/code/session_01U8qF9mK4UBvXsXP1zNMXfX
2026-03-17 15:34:17 +00:00
Claude 883a2f995e style: apply ktlint formatting fixes
https://claude.ai/code/session_01HeWiRdKDTnMGfEBUegk3d1
2026-03-17 03:43:19 +00:00
Vitor Pamplona 56cce46858 Solving all problems with Quartz tests 2026-03-16 19:22:28 -04:00
Vitor Pamplona 962da3280b Moves the N44 test to Jvmtest 2026-03-16 18:57:00 -04:00
Vitor Pamplona 6ffc902598 Unifies UriParser 2026-03-16 18:15:43 -04:00
Vitor Pamplona 790fd45470 Removes warnings 2026-03-16 18:10:55 -04:00
Vitor Pamplona f708f6c265 Specify which .def file is used between simulators and ios Devices 2026-03-16 17:46:20 -04:00
Vitor Pamplona 7f61b4819b new log fuctions mocked 2026-03-16 17:45:05 -04:00
Vitor Pamplona e7760dc7c7 adds bundleId to the binary file 2026-03-16 17:16:18 -04:00
Vitor Pamplona 7e2912ffd8 removes more warnings 2026-03-16 17:15:33 -04:00
Vitor Pamplona b96c1c2c3a Fixes iosGzip 2026-03-16 16:38:31 -04:00
Vitor Pamplona b916817247 Finishes serialization features for NIP-47 2026-03-16 16:35:05 -04:00
Vitor Pamplona abf2151bac Damus' relay is way too restrictive 2026-03-16 16:28:42 -04:00
Vitor Pamplona 7c22c4e6c5 Migrates to collections 1.6, which deprecates iOS Intel targets. 2026-03-16 13:45:01 -04:00
Vitor Pamplona 78ffd5ec6b Moves nip06 tests to the right package. 2026-03-15 21:32:02 -04:00
Vitor Pamplona 8b4a45cb5b Removing deprecated library addresses and deprecated apis 2026-03-15 20:52:01 -04:00
Vitor Pamplona bda7e48a84 removes more warnings 2026-03-15 20:33:31 -04:00
Vitor Pamplona 49f5d9518e Fixes warnings 2026-03-15 20:26:31 -04:00
Vitor Pamplona 19ca7afcb8 fixes warnings 2026-03-15 20:06:20 -04:00
Vitor Pamplona 1cdd061b06 removing warnings 2026-03-15 20:03:39 -04:00
Vitor Pamplona 0e476c8988 Adds test and some refinements. 2026-03-15 19:51:39 -04:00
Vitor Pamplona 61089fa866 Merge branch 'main' into claude/add-relay-event-counters-c7stK 2026-03-15 17:30:23 -04:00
Vitor Pamplona 91a9dcb9a1 Merge branch 'main' of https://github.com/vitorpamplona/amethyst
* 'main' of https://github.com/vitorpamplona/amethyst:
  Rename build step for Benchmark APK in workflow
  compilation error fix: Changed map to mapNotNull
  spotlessApply
2026-03-15 17:16:00 -04:00
Vitor Pamplona cef8f5acde Fixes test case 2026-03-15 17:14:57 -04:00
Vitor Pamplona 6216f7a618 no casts needed 2026-03-15 16:55:00 -04:00
Vitor Pamplona 0c939bd447 converted from Java arraylist to kotlin arraylist 2026-03-15 16:50:34 -04:00
davotoula 3cfa9e1619 compilation error fix: Changed map to mapNotNull 2026-03-15 21:37:21 +01:00
davotoula cd9d345a0e spotlessApply 2026-03-15 21:35:23 +01:00
Vitor Pamplona 30b76347c5 Spotless 2026-03-15 16:15:44 -04:00
Claude d10687d6fe feat: Implement iOS OptimizedJsonMapper using KotlinSerializationMapper
Replace all TODO stubs in the iOS actual implementation with delegation
to KotlinSerializationMapper. Wraps SerializationException into
IllegalArgumentException to match the jvmAndroid error handling pattern.

https://claude.ai/code/session_01QBc4Pb7a6m4TfLZSJKVdjw
2026-03-15 19:58:40 +00:00
Claude 3bea2f795c refactor: Move KSerializers to their respective NIP packages
- Bunker serializers → nip46RemoteSigner/kotlinSerialization/
- NIP-47 serializers → nip47WalletConnect/kotlinSerialization/
- Rumor serializer → nip59Giftwrap/rumors/kotlinSerialization/

Mirrors the existing Jackson serializer directory structure which uses
a jackson/ subpackage within each NIP package.

https://claude.ai/code/session_01QBc4Pb7a6m4TfLZSJKVdjw
2026-03-15 19:55:19 +00:00
Claude ffac682238 feat: Add kotlinx.serialization KSerializers mirroring all Jackson custom serializers
Add 15 KSerializer implementations in commonMain that replicate the exact
behavior of all 21 Jackson serializer/deserializer registrations:

- EventKSerializer, TagArrayKSerializer, FilterKSerializer
- EventTemplateKSerializer, RumorKSerializer, CountResultKSerializer
- MessageKSerializer (8 message types), CommandKSerializer (5 command types)
- BunkerRequest/Response/MessageKSerializer (NIP-46)
- Nip47Request/Response/NotificationKSerializer (NIP-47)
- KotlinSerializationMapper as the main entry point

Uses JsonElement-based approach for performance. All serializers produce
identical JSON output to Jackson. Includes comprehensive test suite (35+
tests) verifying exact output parity and cross-deserialization between
Jackson and kotlinx.serialization.

https://claude.ai/code/session_01QBc4Pb7a6m4TfLZSJKVdjw
2026-03-15 16:37:22 +00:00
Claude 22945b7faa feat: add queryCountSuspend utility to Quartz and simplify ViewModels
Add INostrClient.queryCountSuspend() extension functions in Quartz that
wrap NIP-45 COUNT queries as suspend functions, managing subscription
lifecycle internally. Two overloads: single-relay and multi-relay.

Simplify BasicRelaySetupInfoModel and Nip65RelayListViewModel to use the
new utility — removes IRelayClientListener implementation, subId tracking
maps, onIncomingMessage handlers, and cleanup logic from both ViewModels.

https://claude.ai/code/session_016158D5mq5BygS1uBbLNbsA
2026-03-15 16:14:24 +00:00
Vitor Pamplona 3bd6ef5f6c changes from damus to nos.lol for more stable relay behavior in tests 2026-03-15 11:44:20 -04:00
Vitor Pamplona 2b157cc383 Fixes throw vs null test cases and nsec hallucinations 2026-03-15 11:18:39 -04:00
Vitor Pamplona 0380927f7e fromJsonTo calls throw, they should always be wrapped if we want null results. 2026-03-15 11:05:40 -04:00