Commit Graph

821 Commits

Author SHA1 Message Date
KotlinGeekDev eb99febb2b Merge branch 'vitorpamplona:main' into followset-improvements 2025-10-04 06:48:59 +00:00
Vitor Pamplona cf8c8e47a2 Creates an option to ignore reconnection relays that should be used when the network settings change. 2025-10-03 18:03:04 -04:00
Vitor Pamplona 26462a150e Makes sure the scope is cancelled when the NostrClient is done 2025-10-03 18:01:34 -04:00
Vitor Pamplona b002f9f37e Uses the new isHex64 in the ContactList 2025-10-03 15:58:38 -04:00
Vitor Pamplona 7994945209 30% Faster isHex for strings with 64 bytes. 2025-10-03 15:58:01 -04:00
KotlinGeekDev 2df575d4af Modify the models to support creating a new list with several profiles. Use IO dispatcher in FollowSetState. Introduce follow set copying/cloning, with custom names/descriptions for the clones. 2025-10-03 16:02:15 +01:00
Vitor Pamplona 97668513b5 Fixes passing onClosed messages forward from NostrClient 2025-10-03 09:11:28 -04:00
Vitor Pamplona bc8e18a01b Initial test cases for NostrClient and extensions 2025-10-02 17:54:56 -04:00
Vitor Pamplona 90b682a38f Avoid sending close to subs that are already closed. 2025-10-02 17:48:06 -04:00
Vitor Pamplona c6107dd784 Starts NostrClient in active instead of waiting for a connect() call 2025-10-02 17:47:39 -04:00
Vitor Pamplona fd6be80b7e Offers a way to destroy subscriptions 2025-10-02 17:46:54 -04:00
Vitor Pamplona f901f8ab8f Must use unlimited channels to avoid blocking the OkHttp threads. 2025-10-02 17:46:35 -04:00
Vitor Pamplona b83ea61522 Moves OKHttp relay implementations to use a Channel in order to guarantee incoming message order. 2025-10-02 17:45:58 -04:00
Vitor Pamplona 168caf0ec6 Fixes comment 2025-10-02 17:42:33 -04:00
Vitor Pamplona 04f5e8738a Forces an updateFilter at the start of new subs. 2025-10-02 16:54:34 -04:00
Vitor Pamplona c8f51380aa Fixes error messages in BasicRelayClient 2025-10-02 16:41:47 -04:00
Vitor Pamplona 612dd175b3 Creates the relay on sending new requests instead of waiting for updatePool method. 2025-10-02 16:40:45 -04:00
Vitor Pamplona a56d9631ed Solves the issue of not connecting in the first time reconnect is called 2025-10-02 16:40:16 -04:00
Vitor Pamplona 1fd5ba0451 Adds ease of use functions for the downloadFirst Event extension method 2025-10-02 16:39:47 -04:00
Vitor Pamplona 132c00d434 Fixes suspending on coroutineScope and never returning bug 2025-10-02 16:39:20 -04:00
Vitor Pamplona 47cc8fc4ae Improves log class for JVM 2025-10-02 16:38:34 -04:00
KotlinGeekDev dfb683e00d Continue refactoring of models to make things correct. 2025-09-30 15:37:02 +01:00
Vitor Pamplona bb1d805080 Removes the need to use kotlinx.datetime on quartz 2025-09-29 18:06:58 -04:00
Vitor Pamplona 631f1d9cfc Makes the relayDB not private in HintIndexer 2025-09-26 16:10:30 -04:00
Vitor Pamplona a8a6a10d6e With filter serialization, prints kinds before anything else to help debug 2025-09-26 16:10:04 -04:00
Vitor Pamplona d04cf97418 Better logs on BasicRelayClient 2025-09-24 19:24:27 -04:00
Vitor Pamplona 6ba60dce3f Throws an error if the RelayStats cannot be created. 2025-09-24 12:38:01 -04:00
greenart7c3 6391ddbbaa Show a dialog to select a signer when using multiple signers 2025-09-24 09:09:51 -03:00
Vitor Pamplona ce81157dad Adds a maven publishing to ship quartz 2025-09-23 15:16:26 -04:00
Vitor Pamplona 0499dcc647 Refining the test case to avoid json comparisons 2025-09-23 13:57:34 -04:00
Vitor Pamplona 748085078d Fixes imports for Tlv tests 2025-09-23 13:46:04 -04:00
Vitor Pamplona fadd9c1940 Creates a shared JVM-test module and moves the jackson inlining tests there 2025-09-23 13:45:48 -04:00
KotlinGeekDev 3f8abd74ba Merge branch 'main' of https://github.com/vitorpamplona/amethyst into upstream-main 2025-09-23 12:22:45 +01:00
Vitor Pamplona 0026668aca Merging with upstream 2025-09-22 19:49:26 -04:00
Vitor Pamplona 7a280a3cde - Migrates Quartz from Android to CommonMain
- Fully converts OpenTimestamp Java codebase to Kotlin, migrating the sync and async HTTP call interfaces to OkHttp and coroutines
- Redesigns parsing of relay commands, messages and filters for performance in Jackson.
- Starts the use of KotlinX Serialization when speed is not a requirement
- Migrates all Jackson field annotations to Kotlin Serialization
- Migrates Regex use in Quarts to Kotlin's Regex class
- Migrates Base64 from Android to Kotlin
- Migrates UUID from Android/Java to Kotlin
- Migrates LRUCache usage from Android/Java to Kotlin collections
- Migrates all String to bytearray conversions to Kotlin methods
- Migrates all System.arraycopy calls to kotlin native ones.
- Separates parsing code from the data classes Companion objects
- Exposes Rfc3986 normalizations to each platform.
- Exposes URI parsing classes to each platform.
- Exposes URL Encoders to each platform.
- Exposes BigDecimal to each platform.
- Exposes the Url Detector to each platform.
- Exposes MacInstances to each platform
- Exposes Diggest instances to each platform.
- Exposes a BitSet to each platform.
- Exposes GZip to each platform.
- Exposes Secp256k1 to each platform.
- Exposes SecureRandom to each platform.
- Exposes Time in seconds to each platform.
- Exposes the LargeCache to each platform.
- Exposes AES CBC and AES GCM encryption/decryption to each platform
- Migrate test assertions to Kotlin Tests
- Exposes Address class to each platform because of the Parceleable
- Creates our own ByteArrayOutputStream.
- Removes Lock features inside the Bloomfilters because we don't need data consistency/
- Migrates UserMetadata parser from Jackson to Kotlin serialization
- Removes the need for Static methods in each tag.
- Adds an event template serializer
- Adds KotlinX Datetime to migrate some of the date-based logs
- Adds support for LibSodium in the JVM platform
- Creates a shared test build for iOS targets
- Fixes several usages of Reflection when serializing classes
- Fixes a bug on loading RelayDB for the HintBloom filter test
- Increases the Bloom filter space to better use hints in the app.
- Removes support for iOS in x86
- Creates a Jackson mapper just for NIP-55, which stays in the Android build only.
- Keeps the event store in the android build as well.
- Removes @Syncronized tags in favor of Mutexes.
- Improved sendAndWaitForResponse NostrClient method to properly account for returns from each relay.
- Removes the need for GlobalScope and async calls in the downloadFirstEvent method.
- Restructures the parser and serialization of the relay messages and commands for performance with Jackson
- Removes the dependency on Jackson's error classes across the codebase.
- Moves the hint to quote tag extension methods to their own packages.
- Speeds up the generation of Bech32 addresses
- Migrates NIP-6 and Blossom uploads to use Kotlin Serialization
2025-09-22 19:44:51 -04:00
KotlinGeekDev a07ebc6e12 Update addFollowSet() method to optionally create a list with first member. 2025-09-22 14:20:59 +01:00
KotlinGeekDev acade3c762 Merge branch 'vitorpamplona:main' into profiles-list-management 2025-09-18 13:32:24 +00:00
davotoula b20eb860ff Increase LruCache max size from 100 to 1,000 since we have so many more relays active with outbox 2025-09-17 20:38:40 +02:00
davotoula 4f3b7b24f2 remove unused imports 2025-09-17 16:19:40 +02:00
Vitor Pamplona faffe2a936 About 30-40% event hashing performance boost 2025-09-17 08:40:06 -04:00
Vitor Pamplona c375fa0ab8 Adds another catch to get object errors when parsing NIP-28 metadata 2025-09-17 08:40:06 -04:00
Vitor Pamplona 83e87c2cf4 Adds an event id hash check that doesn't create a separate bytearray to compare between the incoming hex from the relay and the recalculated byte array from SHA256. 2025-09-17 08:40:06 -04:00
KotlinGeekDev 6eab098f2e Merge branch 'vitorpamplona:main' into profiles-list-management 2025-09-16 13:02:13 +00:00
Vitor Pamplona eaf8cb3384 Don't check for the max size in string anymore 2025-09-15 17:25:47 -04:00
Vitor Pamplona cd0b1b65fb Merge expanding and checking Hmac functions to avoid re-creating the Mac instance. 2025-09-15 17:25:36 -04:00
Vitor Pamplona e329b096ba Moves the message key to the HKDF function 2025-09-15 16:21:11 -04:00
Vitor Pamplona 239cac430e Adds a test for native vs libsodium chacha20 2025-09-15 16:15:07 -04:00
Vitor Pamplona 24a5750155 Generalizes fixed key setup 2025-09-15 16:14:43 -04:00
Vitor Pamplona 98aaef61c7 Faster Hkdf functions with less array copying and allocations (which can be impactful if the ciphertext is large) 2025-09-15 15:15:44 -04:00
KotlinGeekDev 1d3dadace2 Merge branch 'vitorpamplona:main' into profiles-list-management 2025-09-15 18:39:36 +00:00