diff --git a/CHANGELOG.md b/CHANGELOG.md index 0859a1f..c62b587 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,101 @@ ## Unreleased -- Xpub watcher transaction events now include the synchronized wallet's next unused external receive address and full derivation path, allowing clients to render receive state without starting a second account scan. -- The Android AAR now ships targeted R8 consumer keep rules for the UniFFI/JNA FFI surface, so consuming apps can enable R8 full mode without extra keep rules for this library. +## 0.5.11 - 2026-08-27 + +- Add keep consumer rules for JNA types UniFFI needs under R8. + +## 0.5.10 - 2026-08-27 + +- Watch-only watcher events now include the synchronized next unused external address and full derivation path. + +## 0.5.9 - 2026-08-26 + +- Ship the initial Android R8 consumer keep rules for the UniFFI/JNA FFI surface. + +## 0.5.8 - 2026-08-26 + +- Preserve UR decoder scan progress across invalid frames. +- Reject signed PSBT previous-output metadata that differs from the original transaction. +- Enforce encoded UR frame-size bounds. + +## 0.5.7 - 2026-08-24 + - Add a generic hardware-wallet catalog with Foundation Passport support, multipart UR QR encoding and decoding, Passport single-signature account export parsing, and signed PSBT finalization across the UniFFI bindings. + +## 0.5.6 - 2026-08-14 + +- Stop writing secrets and user data to stdout. Library logs go through the `log` facade. + +## 0.5.5 - 2026-08-03 + +- Add `serialized_extended_pubkey` for canonical 78-byte BIP32 xpub/tpub payloads, exposed as Swift `Data` and Kotlin `ByteArray`. + +## 0.5.4 - 2026-07-30 + +- Persist the submarine-swap refund destination so `boltzGetSwap` and `boltzListSwaps` return it after completion. + +## 0.5.3 - 2026-07-28 + +- Validate Boltz create responses, claim and refund addresses, and fee rates before swapping. +- Keep a settled reverse swap pending until its claim txid is recorded locally, and retry those claims on the updates stream. + +## 0.5.2 - 2026-07-20 + - Swap status updates now reconcile against Boltz's REST status whenever a swap is (re)subscribed, both on `boltz_start_swap_updates` and when `boltz_create_reverse_swap` adds a swap to a running stream. A confirmed reverse-swap lockup is therefore caught up and auto-claimed even when its live WebSocket event was missed (for example because the updates stream was down while the lockup confirmed), instead of the swap silently stalling until a manual claim. No FFI signature change. +- Add instant-claim and periodic reconcile for Boltz reverse swaps. + +## 0.5.1 - 2026-07-15 + +- Upgrade `trezor-connect-rs` to 0.4.0. + +## 0.5.0 - 2026-07-15 + +- Add a Boltz module for submarine (onchain → Lightning) and reverse (Lightning → onchain) swaps behind the UniFFI surface. + +## 0.4.4 - 2026-07-28 + +- Add stable ELF build IDs to published Android libraries. + +## 0.4.3 - 2026-07-23 + +- Publish the Android library with NDK r28c and 16 KB page-size validation on the AAR publication path. + +## 0.4.2 - 2026-07-16 + +- Add `serialized_extended_pubkey` for converting Base58Check BIP32 xpub/tpub values into their canonical 78-byte payload, exposed as Swift `Data`, Kotlin `ByteArray`, and Python `bytes`. + +## 0.4.1 - 2026-07-10 + - `onchain_broadcast_raw_tx` now returns the transaction's canonical txid, computed locally in Rust, and treats Electrum "already known / already in mempool / already in block chain" responses as success (returning that same txid). This lets native apps complete Blocktank funding bookkeeping when they retry a broadcast after an ambiguous network failure, without relying on a signer-provided txid. Genuine connectivity failures and unrelated broadcast rejections remain typed `BroadcastError`s, and there is no FFI signature change. + +## 0.4.0 - 2026-07-08 + +- Add Core-owned backup migration for wallet-scoped activity data, covering the backup-JSON boundary so apps can inject a default wallet id on legacy records. + +## 0.3.9 - 2026-07-01 + - Surface a locked Trezor during the THP handshake as the typed `TrezorError::DeviceBusy` instead of a generic connection error, so mobile clients back off and prompt the user to unlock rather than reconnecting in a loop. Backed by `trezor-connect-rs` 0.3.4, which classifies `DeviceLocked` as a distinct, non-retryable state: it no longer churns the transport (close/reopen loop) on a locked device and instead makes a single `try_to_unlock` handshake attempt so the device prompts for unlock. +## 0.3.8 - 2026-06-30 + +- Validate LNURL-pay amount. + +## 0.3.7 - 2026-06-30 + +- Serialized activity records always include `walletId`. + +## 0.3.6 - 2026-06-29 + +- Add `get_supported_hardware_wallets()` so apps render the supported-device catalog from core. +- Improve LNURL-pay payment validation. + +## 0.3.4 - 2026-06-24 + +- Add `derive_wallet_id(device_type, xpubs)` so platforms derive the same hardware watch-only wallet id. +- Expose `get_default_gap_limit()` as the shared BIP44 gap-limit default. +- Watcher emits persistence-ready activities the app can store through the normal activity APIs. + ## 0.3.3 - 2026-06-22 - Surface wrong/cancelled/expected Trezor PIN failures as typed `TrezorError` variants (`InvalidPin`, `PinCancelled`, `PinRequired`) instead of generic device errors, so mobile clients can clear the PIN spinner, prompt a deliberate retry, and avoid reconnecting while the device is mid-flow. Backed by `trezor-connect-rs` 0.3.3, which maps protocol `Failure` codes to typed errors; unknown failure codes remain generic `TrezorError::DeviceError`. diff --git a/Cargo.lock b/Cargo.lock index 9f26a20..891688c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -589,7 +589,7 @@ dependencies = [ [[package]] name = "bitkitcore" -version = "0.5.10" +version = "0.5.11" dependencies = [ "android_logger", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index dc01ce5..ae688a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitkitcore" -version = "0.5.10" +version = "0.5.11" edition = "2021" [lib] diff --git a/Package.swift b/Package.swift index c1bf8d3..66a6554 100644 --- a/Package.swift +++ b/Package.swift @@ -3,8 +3,8 @@ import PackageDescription -let tag = "v0.5.10" -let checksum = "8760267026f7f94bf256ee68341054cae5ca60d0ef0e1421fb6b582af5658cf1" +let tag = "v0.5.11" +let checksum = "dc5653d5f6980c498c0baa3fec675e763eb87040cb92036d97141aa2b5fcdf4d" let url = "https://github.com/synonymdev/bitkit-core/releases/download/\(tag)/BitkitCore.xcframework.zip" let package = Package( diff --git a/bindings/android/gradle.properties b/bindings/android/gradle.properties index d5328d7..3df387e 100644 --- a/bindings/android/gradle.properties +++ b/bindings/android/gradle.properties @@ -3,4 +3,4 @@ android.useAndroidX=true android.enableJetifier=true kotlin.code.style=official group=com.synonym -version=0.5.10 +version=0.5.11 diff --git a/bindings/android/lib/consumer-rules.pro b/bindings/android/lib/consumer-rules.pro index fe5adc7..81e23cd 100644 --- a/bindings/android/lib/consumer-rules.pro +++ b/bindings/android/lib/consumer-rules.pro @@ -21,8 +21,21 @@ native ; } -# @Structure.FieldOrder is read at runtime. +# JNA reads Structure.FieldOrder at runtime. R8 full mode strips that +# annotation unless the annotation type and annotated classes are kept. -keepattributes RuntimeVisibleAnnotations +-keep,allowshrinking,allowoptimization class com.sun.jna.Structure$FieldOrder +-keep,allowshrinking,allowoptimization,allowobfuscation @com.sun.jna.Structure$FieldOrder class com.synonym.bitkitcore.** { + ; + (...); +} + +# libjnidispatch looks up Native/Structure/CallbackReference members by JNI name. +# Subclasses such as com.sun.jna.ptr.IntByReference are kept by the extends rules. +# See https://github.com/java-native-access/jna/blob/master/www/FrequentlyAskedQuestions.md#jna-on-android +-keep class com.sun.jna.* { *; } +-keep class * extends com.sun.jna.* { *; } +-keepclassmembers class * extends com.sun.jna.* { public *; } # JNA's AAR references desktop AWT types that are absent on Android. -dontwarn java.awt.Component diff --git a/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so index 393815b..2c95c18 100755 Binary files a/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so index fcaf504..54dac77 100755 Binary files a/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so index 1efdf7f..12c5b69 100755 Binary files a/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so index e5e6959..06dc0aa 100755 Binary files a/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so differ diff --git a/bindings/ios/BitkitCore.xcframework.zip b/bindings/ios/BitkitCore.xcframework.zip index 9dda3b1..366f4c1 100644 Binary files a/bindings/ios/BitkitCore.xcframework.zip and b/bindings/ios/BitkitCore.xcframework.zip differ diff --git a/bindings/python/bitkitcore/libbitkitcore.dylib b/bindings/python/bitkitcore/libbitkitcore.dylib index cbed382..e8dc02f 100755 Binary files a/bindings/python/bitkitcore/libbitkitcore.dylib and b/bindings/python/bitkitcore/libbitkitcore.dylib differ diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 9612372..2f31bfb 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -2,7 +2,7 @@ setup( name="bitkitcore", - version="0.5.10", + version="0.5.11", packages=find_packages(), package_data={ "bitkitcore": ["*.so", "*.dylib", "*.dll"],