feat(wallet): ADA Handle resolution ($handle → address)
- Add resolveHandle() to CardanoClient interface - Implement via Koios asset_addresses API with Handle policy ID - Add HandleResolved state to RecipientResolutionState - Detect $handle prefix in PaymentEntryPresenter - Show "Resolved from $handle ✓" card in PaymentEntryView - 1-hour in-memory cache for handle lookups - Case-insensitive handle resolution (normalize to lowercase) - Add resolveHandle to FakeCardanoClient for testing
This commit is contained in:
parent
dde0dd9f4f
commit
af05e51916
6 changed files with 231 additions and 7 deletions
|
|
@ -70,4 +70,15 @@ interface CardanoClient {
|
|||
* @return List of [TxSummary] objects, most recent first
|
||||
*/
|
||||
suspend fun getAddressTransactions(address: String, limit: Int = 20): Result<List<TxSummary>>
|
||||
|
||||
/**
|
||||
* Resolve an ADA Handle to a Cardano address.
|
||||
*
|
||||
* ADA Handles are human-readable names (e.g., $cobb) that resolve to Cardano addresses.
|
||||
* Handle resolution is case-insensitive.
|
||||
*
|
||||
* @param handle Handle name WITHOUT the $ prefix (e.g., "cobb" not "$cobb")
|
||||
* @return Bech32 Cardano address if handle exists, null if not found
|
||||
*/
|
||||
suspend fun resolveHandle(handle: String): Result<String?>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue