DartHwApi class

HwApi pure-Dart backend.

Every method throws BuError: the pure-Dart package has no USB transport and ships no HW message codecs yet. Use NativeHwApi via blockchainUtils.setRustApi() (Rust hw core) instead.

Implemented types
Available extensions

Constructors

DartHwApi()
Creates a pure-Dart hardware-wallet backend; every method throws BuError.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bitboxBtcPubRequest({required int coin, required BuBytes pathU32, required int xpubType, required bool display}) → BuBytes
BitBox02: builds Request{btc_pub}; pure-Dart stub always throws BuError.
override
bitboxDecrypt({required BuBytes ciphertext}) → BuBytes
BitBox02: decrypts one message; pure-Dart stub always throws BuError.
override
bitboxEncrypt({required BuBytes plaintext}) → BuBytes
BitBox02: encrypts one message; pure-Dart stub always throws BuError.
override
bitboxFree() → void
BitBox02: closes session; pure-Dart stub always throws BuError.
override
bitboxHsHash() → BuBytes
BitBox02: handshake hash; pure-Dart stub always throws BuError.
override
bitboxHsM1() → BuBytes
BitBox02: handshake m1; pure-Dart stub always throws BuError.
override
bitboxHsM2({required BuBytes m2}) → void
BitBox02: ingests handshake m2; pure-Dart stub always throws BuError.
override
bitboxHsM3() → BuBytes
BitBox02: handshake m3; pure-Dart stub always throws BuError.
override
bitboxHsNew({required BuBytes staticPriv32, required BuBytes ephemeralPriv32}) → void
BitBox02: opens initiator session; pure-Dart stub always throws BuError.
override
bitboxHsSplit() → void
BitBox02: splits into transport keys; pure-Dart stub always throws BuError.
override
bitboxPubParse({required BuBytes response}) → String
BitBox02: parses Response to xpub string; pure-Dart stub always throws BuError.
override
bitboxSignChange({required BuBytes pathU32, required int amountSat, required int scriptConfigIndex}) → BuBytes
BitBox02: builds change Request{btc_sign_output}; pure-Dart stub always throws BuError.
override
bitboxSignInit({required int coin, required BuBytes pathU32, required int simpleType, required int version, required int inputsCount, required int outputsCount, required int locktime}) → BuBytes
BitBox02: builds Request{btc_sign_init}; pure-Dart stub always throws BuError.
override
bitboxSignInput({required BuBytes prevHash32, required int prevIndex, required int amountSat, required int sequence, required BuBytes pathU32, required int scriptConfigIndex}) → BuBytes
BitBox02: builds Request{btc_sign_input}; pure-Dart stub always throws BuError.
override
bitboxSignNextParse({required BuBytes response}) → (int, int)
BitBox02: parses sign_next; pure-Dart stub always throws BuError.
override
bitboxSignNextPrevIndex({required BuBytes response}) → int
BitBox02: extracts prev_index; pure-Dart stub always throws BuError.
override
bitboxSignNextSignature({required BuBytes response}) → BuBytes
BitBox02: extracts DONE signature; pure-Dart stub always throws BuError.
override
bitboxSignOutput({required int outputType, required int amountSat, required BuBytes payload}) → BuBytes
BitBox02: builds external Request{btc_sign_output}; pure-Dart stub always throws BuError.
override
bitboxSignPrevtxInit({required int version, required int inputsCount, required int outputsCount, required int locktime}) → BuBytes
BitBox02: builds prevtx_init; pure-Dart stub always throws BuError.
override
bitboxSignPrevtxInput({required BuBytes prevHash32, required int prevIndex, required BuBytes scriptSig, required int sequence}) → BuBytes
BitBox02: builds prevtx_input; pure-Dart stub always throws BuError.
override
bitboxSignPrevtxOutput({required int amountSat, required BuBytes script}) → BuBytes
BitBox02: builds prevtx_output; pure-Dart stub always throws BuError.
override
defaultHwPath(CryptoCoins<BaseCoinConfig> coin) → String

Available on HwApi, provided by the EasyHwApiX extension

Full default path m/purpose'/coinIdx'/defPath (defPath already contains the account level, e.g. BTC 0'/0/0, Tezos 0'/0').
executeGetAddress({required int device, required int coin, required BuBytes pathU32, required BuHwTransport transport}) → Future<BuBytes>
Builds request then exchanges via transport and parses address bytes; pure-Dart stub always throws BuError.
override
executeSign({required int device, required int coin, required BuBytes pathU32, required BuBytes payload, required BuHwTransport transport}) → Future<BuBytes>
Builds request then exchanges via transport; pure-Dart stub always throws BuError.
override
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 own addressEncoder → ready address string. (Monero intentionally throws — it has no coin-config address derivation.)
getAddressRequest({required int device, required int coin, required BuBytes pathU32}) → BuBytes
Builds USB request bytes for device, coin and pathU32; pure-Dart stub always throws BuError.
override
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. path defaults to defaultHwPath. Needs a connected transport (USB) except the validation part — throws before touching transport on bad input.
hidFrame({required BuBytes payload, int channel = BuHwHid.channelDefault, int tag = BuHwHid.tagApdu}) → BuBytes
Chunks payload into concatenated 64-byte HID reports; pure-Dart stub always throws BuError.
override
hidUnframe({required BuBytes reports, int channel = BuHwHid.channelDefault, int tag = BuHwHid.tagApdu}) → BuBytes
Reassembles concatenated 64-byte HID reports; pure-Dart stub always throws BuError.
override
hwCoinIdFor(CryptoCoins<BaseCoinConfig> coin) → int

Available on HwApi, provided by the EasyHwApiX extension

Connector coin id for coin, or throws BuError when the coin has no HW flow (unknown SLIP44 / unsupported curve variant).
identityEncode({required String proto, String user = '', String host = '', String port = '', String path = '', int index = 0}) → BuBytes
Trezor: encodes IdentityType; pure-Dart stub always throws BuError.
override
isAirgap({required int device}) → bool
Returns whether device is QR/SD-only; pure-Dart stub always throws BuError.
override
isCoinSupportedByHw(CryptoCoins<BaseCoinConfig> coin, {required int device}) → bool

Available on HwApi, provided by the EasyHwApiX extension

Offline check: does device speak this coin's curve? Pure backend table lookup (HwApi.supportsCoin) — no transport, no HW.
ledgerFingerprint() → BuBytes
Builds Ledger v2 GET_MASTER_FINGERPRINT request; pure-Dart stub always throws BuError.
override
ledgerFingerprintParse({required BuBytes response}) → BuBytes
Parses 4-byte fingerprint; pure-Dart stub always throws BuError.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseAddressResponse({required int device, required BuBytes response}) → BuBytes
Parses USB response bytes for device to pubkey/address bytes; pure-Dart stub always throws BuError.
override
parsePath(String path) → BuBytes
Parses BIP path string path to <u32 LE> bytes; pure-Dart stub always throws BuError.
override
parseSignResponse({required int device, required BuBytes response}) → BuBytes
Parses sign response; pure-Dart stub always throws BuError.
override
parseTxRequest({required int device, required BuBytes response}) → (int, int)
Parses one TxRequest; pure-Dart stub always throws BuError.
override
psbtCounts({required BuBytes psbt}) → (int, int)
Returns (inputCount, outputCount) for PSBT psbt; pure-Dart stub always throws BuError.
override
qrParse({required int device, required String qr}) → BuBytes
Parses single-part airgap QR qr for device to payload bytes; pure-Dart stub always throws BuError.
override
qrRequest({required int device, required int coin, required BuBytes pathU32}) → String
Builds airgap QR string for device, coin and pathU32; pure-Dart stub always throws BuError.
override
signedIdentityAddress({required BuBytes response}) → String
Trezor: parses SignedIdentity.address; pure-Dart stub always throws BuError.
override
signedIdentityPubkey({required BuBytes response}) → BuBytes
Trezor: parses SignedIdentity.public_key; pure-Dart stub always throws BuError.
override
signedIdentitySignature({required BuBytes response}) → BuBytes
Trezor: parses SignedIdentity.signature; pure-Dart stub always throws BuError.
override
signIdentityRequest({required BuBytes identity, required BuBytes hidden, String visual = '', int curve = 0}) → BuBytes
Trezor: builds framed SignIdentity; pure-Dart stub always throws BuError.
override
signRequest({required int device, required int coin, required BuBytes pathU32, required BuBytes payload}) → BuBytes
Builds sign-request bytes; pure-Dart stub always throws BuError.
override
signTxStart({required int device, required int coin, required int inputsCount, required int outputsCount}) → BuBytes
Opens a Trezor SignTx session; pure-Dart stub always throws BuError.
override
supportsCoin({required int device, required int coin}) → bool
Offline curve-table check whether device supports coin; pure-Dart stub always throws BuError.
override
toString() → String
A string representation of this object.
inherited
txAckBinOutput({required BuBytes scriptPubKey, required int amountSat}) → BuBytes
TxAck for previous-transaction TXOUTPUT; pure-Dart stub always throws BuError.
override
txAckChange({required BuBytes pathU32, required int amountSat, required int scriptType}) → BuBytes
TxAck for TXOUTPUT (change); pure-Dart stub always throws BuError.
override
txAckInput({required BuBytes prevHash32, required int prevIndex, required BuBytes pathU32, required int amountSat, required BuBytes scriptSig, required int scriptType}) → BuBytes
TxAck for TXINPUT; pure-Dart stub always throws BuError.
override
txAckMeta({required int version, required int lockTime, required int inputsCount, required int outputsCount}) → BuBytes
TxAck for TXMETA; pure-Dart stub always throws BuError.
override
txAckOutput({required String address, required int amountSat, required int scriptType}) → BuBytes
TxAck for TXOUTPUT (address); pure-Dart stub always throws BuError.
override
txRequestSerialized({required int device, required BuBytes response}) → BuBytes
TXFINISHED serialized transaction; pure-Dart stub always throws BuError.
override
txRequestSignature({required int device, required BuBytes response}) → BuBytes
TXFINISHED signature bytes; pure-Dart stub always throws BuError.
override
txRequestTxHash({required int device, required BuBytes response}) → BuBytes
TxRequest prev-tx hash; pure-Dart stub always throws BuError.
override
urDecodePayload(String ur) → BuBytes
Decodes UR ur to payload bytes; pure-Dart stub always throws BuError.
override
urDecodeType(String ur) → String
Decodes UR ur to its type string; pure-Dart stub always throws BuError.
override
urEncode({required String type, required BuBytes payload}) → String
Encodes payload as single-part ur:<type>/... string; pure-Dart stub always throws BuError.
override
validatePath({required int device, required int coin, required BuBytes pathU32}) → void
Validates pathU32 shape for device and coin; pure-Dart stub always throws BuError.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited