Fix: keep net.i2p.crypto.eddsa classes from being stripped by R8

Signer.kt/SignatureVerifier.kt in substrate-sdk-android look up the
"EdDSA" JCA provider by name at runtime (Signature.getInstance(...,
"EdDSA")), backed by net.i2p.crypto:eddsa's EdDSASecurityProvider. With
no keep rule, R8 stripped/renamed its classes in the minified release
build, so the provider's own registered service implementation could no
longer be found - "class configured for Signature (provider: EdDSA)
cannot be found", reproduced on-device sending SOL (every Solana
transaction signs with Ed25519, so this path is always hit).
This commit is contained in:
2026-07-17 10:40:01 -07:00
parent b09ba4c303
commit e1a010b779
+10
View File
@@ -77,6 +77,16 @@
-keep class org.bouncycastle.** { *; }
-dontwarn org.bouncycastle.**
# ============================================================
# EdDSA (net.i2p.crypto:eddsa, pulled in transitively by substrate-sdk-android)
# ============================================================
# Signer.kt/SignatureVerifier.kt look up this JCA provider by name at runtime
# (Signature.getInstance(..., "EdDSA")) - every Ed25519 signature (all Solana
# transactions, and any Substrate account using CryptoType.ED25519) goes
# through this provider, so its classes must survive obfuscation intact.
-keep class net.i2p.crypto.eddsa.** { *; }
-dontwarn net.i2p.crypto.eddsa.**
# ============================================================
# Native JNI Bindings (Rust)
# ============================================================