nrobi144
3a1e38a2f2
fix(desktop): address code review findings for NIP-46 bunker login
...
- Add bounds check in fromBunkerUri for missing query params (P2-1)
- Preserve bunker keys on transient force-logout (P2-3)
- Replace debug printlns with DebugConfig.log() (P2-4)
- Replace unused Unstable with Disconnected state (P2-5)
- Move validateBunkerUri to account package (P3-9)
- Fix Compose state update from IO thread (P3-11)
- Add disconnectNip46Client() to onDispose cleanup (P3-12)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 10:16:10 +02:00
nrobi144
1821b9ff71
test: add NIP-46 test suite for desktop, quartz, and fix pre-existing chess test errors
...
Add comprehensive test coverage for NIP-46 bunker login across quartz and desktopApp:
Quartz (4 files, 48 tests):
- ResponseParserTest: all 7 response parsers (success/error/unexpected)
- FromBunkerUriTest: URI parsing, validation, edge cases
- ConvertExceptionsTest: SignerResult→Exception mapping
- NostrConnectEventTest: canDecrypt, talkingWith, verifiedRecipientPubKey
Desktop (6 files, 45 tests):
- BunkerUriUtilsTest: validateBunkerUri + stripBunkerSecret
- AccountManagerKeyLoginTest: nsec/npub/invalid login, save, generate
- AccountManagerLogoutTest: logout, forceLogout, state transitions
- AccountManagerLoadAccountTest: internal/bunker/missing-key scenarios
- AccountManagerBunkerLoginTest: hasBunkerAccount, setConnectingRelays
- AccountManagerHeartbeatTest: start/stop, no-crash with internal signer
Production changes:
- AccountManager: constructor private→internal, add homeDir param for test injection, extract stripBunkerSecret to internal top-level, constants internal
- desktopApp/build.gradle.kts: add mockk test dependency
Fix pre-existing chess test compilation errors:
- ChessStateReconstructorTest: add missing jester subpackage imports
- ChessGameEventTest: altText()→alt() + add nip31Alts import
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 10:16:09 +02:00
Vitor Pamplona
88e6825028
Merge pull request #1789 from nrobi144/fix/nip46-quartz-bugs
...
fix(quartz): fix NIP-44 key mutation and NIP-46 connect response handling
2026-03-10 08:08:08 -04:00
nrobi144
e56b0d2b83
fix(quartz): connect() returns Unit, caller calls getPublicKey separately
...
Per Amber maintainer: connect never returns a pubkey — response is
"ack" or the secret string. Rewrote ConnectResponse.parse() to check
result/error fields directly on base BunkerResponse (matching Jackson
deserialization). connect() is now a pure protocol handshake; callers
call getPublicKey() separately as a domain concern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-10 07:24:57 +02:00
nrobi144
39393d328b
fix(quartz): fix NIP-44 key mutation and NIP-46 connect response handling
...
Two bugs in quartz's NIP-46 remote signer:
1. FixedKey.getEncoded() returned the raw byte array reference. javax.crypto.Mac
zeroes the key via destroy() after HMAC computation, corrupting the NIP-44
saltPrefix ("nip44-v2") after the first computeConversationKey call. All
subsequent NIP-44 decryptions with different key pairs fail with Invalid Mac.
Fix: return key.copyOf() instead of key.
2. NostrSignerRemote.connect() only handled pubkey responses. Amber (and other
signers) may respond with "ack" or "already connected" error. Added
ConnectResponse parser that maps these to success and falls back to
getPublicKey() to retrieve the actual pubkey.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-09 07:49:58 +02:00
Vitor Pamplona
e3f99051db
Applies new UrlDetector to the RichTextViewer
2026-03-07 16:38:25 -05:00
Vitor Pamplona
030921c963
Adds treatment for the transition between ASCII and non-ASCII in the middle of urls
2026-03-07 15:19:24 -05:00
Vitor Pamplona
109a5e7cd7
Adds single label domains to parse nostr: urls too
2026-03-07 10:51:19 -05:00
Vitor Pamplona
f4d401bc56
Switches to our own version of the Url Detector
2026-03-06 10:58:59 -05:00
Vitor Pamplona
d662cd6b64
Merge pull request #1757 from KotlinGeekDev/kmp-completeness
...
KMP Completeness, Part 1.
2026-03-04 10:27:24 -05:00
Vitor Pamplona
089600d7f0
Fixes test case
2026-03-04 10:26:21 -05:00
Vitor Pamplona
8501c86663
Further organizes Calendar events
2026-03-04 10:25:51 -05:00
KotlinGeekDev
68a262fa88
Merge branch 'main' of https://github.com/vitorpamplona/amethyst into upstream-main
...
# Conflicts:
# gradle/libs.versions.toml
# quartz/build.gradle.kts
# quartz/src/androidHostTest/kotlin/com/vitorpamplona/quartz/TestResourceLoader.android.kt
# quartz/src/iosMain/kotlin/com/vitorpamplona/quartz/utils/GZip.ios.kt
# quartz/src/iosTest/kotlin/com/vitorpamplona/quartz/TestResourceLoader.kt
2026-03-04 00:37:10 +01:00
Claude
b8cda402cb
test(quartz/utils): add GZipTest to commonTest
...
Covers the full expect/actual contract across all platforms (Android,
JVM, iOS):
- round-trip for empty, single-char, simple, unicode, and JSON strings
- repetitive input compresses to a smaller size
- gzip magic number (0x1F 0x8B) present in compressed output
- compressed bytes differ from raw input bytes
- decompress of invalid data throws an exception
- special/control characters survive a round-trip
https://claude.ai/code/session_0125CGfu6aMAnSv6ZzAxFHvV
2026-02-27 01:57:10 +00:00
Vitor Pamplona
086e2046db
Fixes test file loader for iOS
2026-02-18 12:34:55 -05:00
Vitor Pamplona
ee7d20e939
Minor adjustment in class names
2026-02-18 12:25:48 -05:00
Vitor Pamplona
907ff6e844
Moves deterministic signer to the test package since it's only used there.
2026-02-18 11:24:33 -05:00
Vitor Pamplona
cf7bdef028
Adds missing actual implementations on iOS
2026-02-17 19:00:24 -05:00
KotlinGeekDev
68c7f5e884
Linter fixes, plus a lint suppression for Buffer.kt.
2026-02-12 14:28:59 +01:00
KotlinGeekDev
3f9614dd8f
Merge branch 'main' of https://github.com/vitorpamplona/amethyst into upstream-main
...
# Conflicts:
# gradle/libs.versions.toml
2026-02-11 13:57:01 +01:00
nrobi144
5f15f0c3b1
fix: address Copilot review comments
...
- ChessPosition: include all fields in equals/hashCode
- AcceptedGamesRegistry: add thread safety with synchronized
- ChessEventBroadcaster: use valid filter for connection trigger
- ChessEventBroadcaster: fix misleading relayResults
- Remove println debug logging from ChessSubscription/Broadcaster
- UserProfileScreen: use proper JSON parsing via MetadataEvent
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-10 16:39:24 +02:00
nrobi144
8d098cf86d
feat(chess): focused polling, promotion fix, and game end celebration
...
- Add focused game mode to ChessPollingDelegate: when viewing a game,
only that game is polled instead of all active games
- Fix pawn promotion by parsing promotion suffix in publishMove
(e.g., "e8q" -> "e8" + QUEEN)
- Add game end overlay with victory/defeat/draw celebration
- Remove all debug println statements for production readiness
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-10 12:14:34 +02:00
nrobi144
19c36c2979
initial nip64 implementation
2026-02-10 11:54:36 +02:00
KotlinGeekDev
dcb10b249a
Foundations(iOS Sourceset): Provide implementation for MacInstance(using external library). Bring some tests into commonTest to make sure it works.
2026-02-09 21:57:54 +01:00
Vitor Pamplona
710f15f790
- Fixes copyright using KDoc patterns instead of simpler comments
...
- Moves spotless and git-hooks to hidden folders
2026-02-09 13:06:41 -05:00
Vitor Pamplona
7bc7265757
Refactors the old NIP-05 code on Quartz
...
New Caching system for User metadata
New Caching system for NIP-05 verifications
2026-02-04 14:31:30 -05:00
KotlinGeekDev
94a5237eaa
Foundations(iOS Sourceset): Provide implementation for fastFindURLs(). Make a test for it.
2026-01-26 16:56:11 +01:00
Vitor Pamplona
6097a0b5b7
Removes the need for an extra object for the tag array in the custom emoji nip
2026-01-13 17:32:38 -05:00
Vitor Pamplona
b65546487d
Adjusts tests to be more flexible when reading NIPs from NIP-11
2026-01-06 18:57:56 -05:00
Vitor Pamplona
93b139da62
Fixes test case
2026-01-06 18:39:51 -05:00
Vitor Pamplona
fe1e0e46c3
Fixes warnings on test case
2026-01-04 16:38:21 -05:00
Vitor Pamplona
c3d741ebd1
Implements AND queries for tags: https://github.com/nostr-protocol/nips/pull/1365
2025-12-30 12:29:04 -05:00
Vitor Pamplona
31d7e135cb
Updates kotlin, compose, multiplatform, activity, serialization, media3, mockk, secp256, tor, androidxCamera, stdlib
2025-12-29 14:23:48 -05:00
Vitor Pamplona
23a7e3b535
Fixes kind being a number
2025-12-22 12:23:34 -05:00
Vitor Pamplona
8d15f0478f
Faster MurMur hash for 64bit results.
2025-12-18 17:30:53 -05:00
Vitor Pamplona
84eb0a9abb
Adds a large array test case
2025-12-12 17:40:38 -05:00
Vitor Pamplona
95723479d6
Adds MurMur3128bits for x64
2025-12-12 16:54:34 -05:00
davotoula
24bd1d0c97
add custom serializer that accepts both single integers and arrays
...
add tests
2025-12-02 12:53:51 +01:00
Vitor Pamplona
ad879fcf63
Fix test
2025-11-21 16:42:07 -05:00
Vitor Pamplona
0d7f2ce838
Adds support for Trust Provider lists
2025-11-21 11:29:46 -05:00
Vitor Pamplona
f186b78ca9
Adds test case for empty d-tags in naddr1
2025-11-13 10:30:26 -05:00
davotoula
c3c75b46a7
optimise imports
2025-10-30 19:20:02 +01:00
Vitor Pamplona
4c633c7dec
Merge branch 'main' of https://github.com/vitorpamplona/amethyst
2025-10-18 08:44:21 -04:00
davotoula
5d6e7d1921
change from runBlocking to runTest where appropriate
2025-10-15 21:00:00 +02:00
Vitor Pamplona
7a05f527dd
Moving Log.java to Log.kt
2025-10-14 15:18:45 -04:00
Vitor Pamplona
4af576f5f4
Merge branch 'main' of https://github.com/vitorpamplona/amethyst
2025-10-14 14:15:38 -04:00
davotoula
85bdf67ac3
added failing test: Public tags should be preserved when removing from private bookmarks
2025-10-14 13:21:46 +02:00
Vitor Pamplona
5c09cd0b55
Rejects additional urls with %20 and fixes Wss ones.
2025-10-10 10:55:46 -04:00
Vitor Pamplona
0708936c23
Mocks the android log on test cases
2025-10-10 10:47:59 -04:00
Vitor Pamplona
0499dcc647
Refining the test case to avoid json comparisons
2025-09-23 13:57:34 -04:00