Skip to content

Bitkit Core support for hardware wallet activities #1029

@ovitrif

Description

@ovitrif

Part of #998.

Scope

Add Bitkit Core support for hardware-wallet watcher activity so hardware transactions can reuse normal activity capabilities where appropriate:

  • Stable detail loading.
  • Inputs/outputs via Bitkit Core transaction details fetched from the configured Electrum/electrs backend.
  • Tag add/remove support.
  • Unified activity listing so hardware-wallet activity and normal Bitkit wallet activity can be returned in the same sorted list.
  • After the Bitkit Core support lands, update Bitkit Android's hardware-wallet activity path to use those Core activity/details/tag records so Activity Detail shows tags and inputs/outputs instead of the current watch-only fallback.

Hardware activity visibility must stay scoped to paired hardware-wallet identities:

  • Android should create and persist an app-owned walletId for each paired hardware wallet.
  • Android passes that walletId to Core when syncing watcher activity and when deleting that wallet's activity metadata.
  • walletId can be opaque/random; Core does not need to derive it from Trezor public material.
  • Removing a device deletes that wallet's hardware activity/details/tag metadata from Bitkit Core so the activity DB does not grow for unpaired devices.
  • Re-adding the same wallet without restored metadata should rebuild visible history from the watcher and fetch details again as needed.

Android-owned wallet metadata

Android owns the hardware-wallet metadata model, including walletId creation and backup/restore behavior until/unless that moves elsewhere.

  • Store the app-generated walletId with the paired hardware-wallet record.
  • Keep enough public wallet metadata on the app side to match a later Trezor connection to an existing paired-wallet record when possible, e.g. the watched account xpubs/descriptors already used for watcher sync.
  • If hardware-wallet metadata is backed up/restored, include the app-owned walletId with it so a restored Android install can pass the same id back to Core.
  • If a restored wallet is later connected on another platform, that platform should be able to reuse the restored app-owned walletId when it restores the same hardware-wallet metadata; otherwise it may create a fresh id and resync under that id.
  • When deleting a restored hardware wallet, call Core cleanup with the restored app-owned walletId so restored activity/details/tags for that wallet are removed.

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions