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
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
Responseto 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
DONEsignature; 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 pathm/purpose'/coinIdx'/defPath(defPathalready contains the account level, e.g. BTC0'/0/0, Tezos0'/0'). -
executeGetAddress(
{required int device, required int coin, required BuBytes pathU32, required BuHwTransport transport}) → Future< BuBytes> -
Builds request then exchanges via
transportand 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 ownaddressEncoder→ 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,coinandpathU32; 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.pathdefaults to defaultHwPath. Needs a connectedtransport(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
payloadinto 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 forcoin, 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
deviceis 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: doesdevicespeak this coin's curve? Pure backend table lookup (HwApi.supportsCoin) — no transport, no HW. -
ledgerFingerprint(
) → BuBytes -
Builds Ledger v2
GET_MASTER_FINGERPRINTrequest; 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
responsebytes fordeviceto pubkey/address bytes; pure-Dart stub always throws BuError.override -
parsePath(
String path) → BuBytes -
Parses BIP path string
pathto<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 PSBTpsbt; pure-Dart stub always throws BuError.override -
qrParse(
{required int device, required String qr}) → BuBytes -
Parses single-part airgap QR
qrfordeviceto 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,coinandpathU32; 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, 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
SignTxsession; pure-Dart stub always throws BuError.override -
supportsCoin(
{required int device, required int coin}) → bool -
Offline curve-table check whether
devicesupportscoin; pure-Dart stub always throws BuError.override -
toString(
) → String -
A string representation of this object.
inherited
-
txAckBinOutput(
{required BuBytes scriptPubKey, required int amountSat}) → BuBytes -
TxAckfor previous-transactionTXOUTPUT; pure-Dart stub always throws BuError.override -
txAckChange(
{required BuBytes pathU32, required int amountSat, required int scriptType}) → BuBytes -
TxAckforTXOUTPUT(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 -
TxAckforTXINPUT; pure-Dart stub always throws BuError.override -
txAckMeta(
{required int version, required int lockTime, required int inputsCount, required int outputsCount}) → BuBytes -
TxAckforTXMETA; pure-Dart stub always throws BuError.override -
txAckOutput(
{required String address, required int amountSat, required int scriptType}) → BuBytes -
TxAckforTXOUTPUT(address); pure-Dart stub always throws BuError.override -
txRequestSerialized(
{required int device, required BuBytes response}) → BuBytes -
TXFINISHEDserialized transaction; pure-Dart stub always throws BuError.override -
txRequestSignature(
{required int device, required BuBytes response}) → BuBytes -
TXFINISHEDsignature bytes; pure-Dart stub always throws BuError.override -
txRequestTxHash(
{required int device, required BuBytes response}) → BuBytes -
TxRequestprev-tx hash; pure-Dart stub always throws BuError.override -
urDecodePayload(
String ur) → BuBytes -
Decodes UR
urto payload bytes; pure-Dart stub always throws BuError.override -
urDecodeType(
String ur) → String -
Decodes UR
urto its type string; pure-Dart stub always throws BuError.override -
urEncode(
{required String type, required BuBytes payload}) → String -
Encodes
payloadas single-partur:<type>/...string; pure-Dart stub always throws BuError.override -
validatePath(
{required int device, required int coin, required BuBytes pathU32}) → void -
Validates
pathU32shape fordeviceandcoin; pure-Dart stub always throws BuError.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited