element-x-ada/docs/build-logs/ssss-build-result.md

71 lines
2.8 KiB
Markdown

# SSSS Wallet Backup Build Result
Date: 2026-03-28 17:30
## Commits
### matrix-rust-sdk (gitea: kayos/matrix-rust-sdk-ada)
Branch: `sulkta/send-raw-v1`
Commit: `2dc91ef4ea1e50b2b91512571eaaf8f9c3a40c1c`
### element-x-android (gitea: Sulkta-Coop/element-x-ada)
Branch: `phase1-dev`
Commits:
- `0388cd7d06` - feat(wallet): add SSSS backup for wallet seed phrase
- `1308a8299a` - feat(wallet): implement import wallet from mnemonic
## What Was Built
### Phase 1: Rust SDK FFI
- Created `bindings/matrix-sdk-ffi/src/secret_storage.rs` — SecretStoreWrapper with put_secret/get_secret
- Modified `bindings/matrix-sdk-ffi/src/client.rs` — added open_secret_store() method
- Modified `bindings/matrix-sdk-ffi/src/lib.rs` — module export
- Modified `bindings/matrix-sdk-ffi/src/error.rs` — From<SecretStorageError> impl
### Phase 2: Kotlin SDK Wrappers
- Created `libraries/matrix/api/.../secretstorage/SecretStorage.kt` — interfaces
- Created `libraries/matrix/impl/.../secretstorage/RustSecretStorage.kt` — implementations
- Modified `MatrixClient.kt` — added secretStorage property
- Modified `RustMatrixClient.kt` — implemented secretStorage
- Fixed SDK compatibility issues (Sentry config removed from TracingService)
### Phase 3: Wallet Backup Feature
- Created `features/wallet/api/.../backup/WalletBackupService.kt` — interface
- Created `features/wallet/impl/.../backup/WalletBackupServiceImpl.kt` — implementation
- Modified `WalletSetupState.kt` — added BACKUP_TO_MATRIX step
- Modified `WalletSetupPresenter.kt` — added recovery key handling
- Modified `WalletSetupView.kt` — added Matrix backup UI with FLAG_SECURE
### Phase 3b: Import Wallet from Mnemonic
- Added `IMPORT_MNEMONIC` step to wallet setup flow
- Live word count display (12/24 words)
- BIP39 mnemonic validation via cardano-client-lib
- FLAG_SECURE on import screen
- Paste-friendly single text area input
- Clear button and inline error messages
## APK
Available at: http://192.168.0.5:8888/element-x-ada-fdroid.apk
## Deviations from Plan
1. **SDK Breaking Changes**: The updated SDK removed Sentry configuration from TracingConfiguration.
Fixed by making sentryConfig a no-op in RustTracingService and RustAnalyticsSdkManager.
2. **Settings Button**: Not implemented in this build. The backup-on-setup flow is complete;
settings integration can be added separately.
3. **Restore on Login**: Not implemented. This would require changes to the login flow.
Current implementation allows backup during wallet setup.
## Secret Name
`com.sulkta.cardano.wallet_seed`
## Build Environment
- Rust SDK built with Docker mingc/android-build-box:latest
- Targets: aarch64-linux-android, x86_64-linux-android
- AAR placed at: libraries/rustsdk/matrix-rust-sdk.aar
- Build target directory: /mnt/cache_nvme/rust-build (symlinked from /tmp/matrix-rust-sdk/target due to disk space)