Skip to content

feat: core-owned supported hardware-wallet catalog (#107 subtask 4)#111

Open
coreyphillips wants to merge 1 commit into
masterfrom
feat/supported-hardware-wallets
Open

feat: core-owned supported hardware-wallet catalog (#107 subtask 4)#111
coreyphillips wants to merge 1 commit into
masterfrom
feat/supported-hardware-wallets

Conversation

@coreyphillips

Copy link
Copy Markdown
Collaborator

Summary

Subtask 4 of #107. Core now owns the catalog of supported hardware wallets, so iOS and Android render the supported-device list generically instead of each hardcoding Trezor metadata. Follow-up from the review note on synonymdev/bitkit-android#1039 ("this could come from Bitkit-core in the future, because it is where all supported HW info is actually located").

What changed

New UniFFI surface in the trezor module (re-exported from lib.rs):

pub enum HardwareWalletVendor { Trezor }   // extensible to other vendors

pub struct SupportedHardwareWallet {
    vendor: HardwareWalletVendor,
    vendor_name: String,        // "Trezor"
    model: String,              // "Safe 7"  (stable key for image mapping)
    display_name: String,       // "Trezor Safe 7"
    transports: Vec<TrezorTransportType>,
}

pub fn get_supported_hardware_wallets() -> Vec<SupportedHardwareWallet>;

Catalog (Trezor's full lineup):

display_name transports
Trezor Model One Usb
Trezor Model T Usb
Trezor Safe 3 Usb
Trezor Safe 5 Usb
Trezor Safe 7 Usb, Bluetooth

Platform handling

Core stays platform-agnostic. Apps filter on transports:

  • Android supports all models, renders the whole catalog.
  • iOS is Bluetooth-only, so it shows only entries whose transports include Bluetooth (currently just the Safe 7).

Notes

  • Fields are intentionally minimal. Runtime capabilities (passphrase entry, etc.) already come from TrezorFeatures on a connected device, so the catalog only needs identity + transports. Apps map model to their own bundled images.
  • Version bumped to 0.3.5; all platform bindings + native artifacts regenerated via build.sh all, and the Package.swift checksum matches the rebuilt BitkitCore.xcframework.zip.

Tests

cargo test --lib supported_hardware_wallets — asserts the lineup, well-formed entries (USB on every model, display_name = "Trezor {model}"), and that the Bluetooth-capable filter yields exactly the Safe 7.

🤖 Generated with Claude Code

Adds get_supported_hardware_wallets(), backed by HardwareWalletVendor and
SupportedHardwareWallet, so iOS and Android render the supported-device catalog
from core instead of each hardcoding Trezor metadata (follow-up from
synonymdev/bitkit-android#1039).

Catalog is Trezor's full lineup (Model One, Model T, Safe 3, Safe 5, Safe 7),
each with the transports it supports. Only the Safe 7 offers Bluetooth, so iOS
(Bluetooth-only) filters to it while Android shows all — platforms filter on
`transports`, keeping core platform-agnostic.

Bumps version to 0.3.5 and regenerates all platform bindings + native artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coreyphillips coreyphillips requested a review from ovitrif June 25, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant