feat: Add Monero wallet integration (Garnet merge - Phase 1-4)
Ported monero wallet infrastructure from Garnet fork with KMP adaptations:
Quartz Events (KMP commonMain):
- MoneroTipEvent.kt: Kind 1814 tip event with kotlinx.serialization, new
async sign() API from NostrSigner
- TipSplitSetup.kt: monero tag parsing extension functions for tip splits
- EventFactory.kt: Registered MoneroTipEvent.KIND = 1814
Model Layer (Android amethyst/src/main/java):
- Wallet.kt: JNI wrapper around libmonerujo.so (~230 external calls)
- WalletManager.kt: Wallet lifecycle factory (open/create/delete)
- MoneroWalletListener.kt: Wallet lifecycle event interface
- PendingTransaction.kt: JNI wrapper for pending tx creation
- TransactionInfo/History.kt: Transaction history models
- Subaddress, Transfer, ProofInfo: Supporting data classes
Service Layer:
- WalletService.kt: Android Service for wallet lifecycle (~700 lines)
- MoneroDataSource.kt: Flow-based data source adapter
- TipHandler.kt: Stub for tip orchestration
- TipEventDataSource.kt: Stub for tip verification background processor
Existing files modified:
- Account.kt: Added moneroSpendKey/seed/restoreHeight/password flows,
walletService binding, startMonero/stopMonero, balance getters,
address validation, tip/sendMonero stubs
- User.kt (commons): Added moneroAddress() method
- UserMetadataCache.kt (commons): Added moneroAddressFromAbout() helper
Resources & Build:
- build.gradle.kts: Added MONERO_NETWORK buildConfigField
- strings.xml: ~40 monero-specific strings added
- monero.xml: Vector drawable icon
Native Libraries:
- monerujo.cpp/.h: C++ JNI bridge from Monero Rujoo wallet
- wallet2_api.h: Monero wallet API header
- .gitignore: Added jniLibs/*.so exclusion
Build: Kotlin compilation passes (compileFdroidDebugKotlin)
This commit is contained in:
@@ -477,6 +477,27 @@ By contributing to this repository, you agree to license your work under the MIT
|
||||
<img src="https://contrib.rocks/image?repo=vitorpamplona/amethyst" />
|
||||
</a>
|
||||
|
||||
## Monero Integration Status
|
||||
|
||||
An integration of Garnet's Monero tipping/zapping feature was attempted against the latest Amethyst codebase. The work lives on the `amethyst-with-monero` branch.
|
||||
|
||||
**What was accomplished:**
|
||||
- Kotlin source code compiled successfully — `./gradlew compileFdroidDebugKotlin` passes
|
||||
- 21 new files added covering model, service, and account layers
|
||||
- Wallet key generation, service infrastructure, and account integration implemented
|
||||
|
||||
**What's stubbed:**
|
||||
- `TipHandler` — placeholder implementations only
|
||||
- `TipEventDataSource` — not yet wired to the event layer
|
||||
- `MoneroDataSource` — pending full Monero node integration
|
||||
|
||||
**What's next:**
|
||||
- Complete the UI layer for wallet display, transfer flows, and tip rendering
|
||||
- Implement the remaining stubbed methods on `Account`
|
||||
- Connect `TipHandler` to the existing NIP-57 zap machinery for parallel Lightning/monero support
|
||||
|
||||
See [AGENTS.md](./AGENTS.md) for full project notes, build findings, and the merge plan.
|
||||
|
||||
# MIT License
|
||||
|
||||
<pre>
|
||||
|
||||
Reference in New Issue
Block a user