getPublicKey method
Future<BuBytes>
getPublicKey({
- required CryptoCoins<
BaseCoinConfig> coin, - required int device,
- String? path,
- required BuHwTransport transport,
Parse + validate + fetch pubkey in one call. path defaults to
defaultHwPath. Needs a connected transport (USB) except the
validation part — throws before touching transport on bad input.
Implementation
Future<BuBytes> getPublicKey({
required CryptoCoins coin,
required int device,
String? path,
required BuHwTransport transport,
}) async {
final coinId = hwCoinIdFor(coin);
final pathU32 = parsePath(path ?? defaultHwPath(coin));
validatePath(device: device, coin: coinId, pathU32: pathU32);
return executeGetAddress(
device: device,
coin: coinId,
pathU32: pathU32,
transport: transport,
);
}