EasyHwApiX extension
Easy mode over HwApi: work with CryptoCoins (BIP44/49/84/86/…) and
human paths instead of raw int ids and <u32 LE> blobs.
final pk = await blockchainUtils.api.hw.getPublicKey(
coin: Bip44Coins.ethereum, device: BuHwDevice.ledgerNanoSPlus,
transport: myUsb,
); // m/44'/60'/0'/0/0, validated.
final addr = await blockchainUtils.api.hw.getAddress(
coin: Bip44Coins.tezos, device: BuHwDevice.trezorSafe5, transport: myUsb,
); // 'tz1…'
- on
Methods
-
defaultHwPath(
CryptoCoins< BaseCoinConfig> coin) → String -
Available on HwApi, provided by the EasyHwApiX extension
Full default pathm/purpose'/coinIdx'/defPath(defPathalready contains the account level, e.g. BTC0'/0/0, Tezos0'/0'). -
getAddress(
{required CryptoCoins< BaseCoinConfig> coin, required int device, String? path, required BuHwTransport transport}) → Future<String> -
Available on HwApi, provided by the EasyHwApiX extension
getPublicKey + the coin's ownaddressEncoder→ ready address string. (Monero intentionally throws — it has no coin-config address derivation.) -
getPublicKey(
{required CryptoCoins< BaseCoinConfig> coin, required int device, String? path, required BuHwTransport transport}) → Future<BuBytes> -
Available on HwApi, provided by the EasyHwApiX extension
Parse + validate + fetch pubkey in one call.pathdefaults to defaultHwPath. Needs a connectedtransport(USB) except the validation part — throws before touching transport on bad input. -
hwCoinIdFor(
CryptoCoins< BaseCoinConfig> coin) → int -
Available on HwApi, provided by the EasyHwApiX extension
Connector coin id forcoin, or throws BuError when the coin has no HW flow (unknown SLIP44 / unsupported curve variant). -
isCoinSupportedByHw(
CryptoCoins< BaseCoinConfig> coin, {required int device}) → bool -
Available on HwApi, provided by the EasyHwApiX extension
Offline check: doesdevicespeak this coin's curve? Pure backend table lookup (HwApi.supportsCoin) — no transport, no HW.