This commit removes rust-nostr dependency, and replaces the NIP-44 logic with a new NIP-44 module based on the Swift NostrSDK implementation. The decision to move away from rust-nostr and the Swift NostrSDK was made for the following reasons: 1. `rust-nostr` caused the app size to double 2. We only need NIP44 functionality, and we don't need to bring everything else 3. The Swift NostrSDK caused conflicts around the secp256k1 dependency that is hard to address 4. The way we do things in the codebase is far different from the Swift NostrSDK, and we optimize it for use with NostrDB. Bringing it an outside library causes significant complexity in integration with NostrDB, and would effectively cause the codebase to be split into two different ways of achieving the same results. Therefore it is cleaner if we stick to our own Nostr structures and functions and focus on maintaining them. However, the library CryptoSwift was added as a dependency, to bring in ChaCha20 which is not supported by CryptoKit (CryptoKit supports the ChaCha20-Poly1305 cipher, but NIP-44 uses ChaCha20 with HMAC-SHA256 instead) Closes: https://github.com/damus-io/damus/issues/2849 Changelog-Changed: Made internal changes to reduce the app binary size Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
460 B
460 B
Acknowledgements and licenses
- This product contains code derived from Nostr SDK iOS. License
- This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/). License