sign With Hw
Sign a transaction using threshold MPC with a hardware device via Bluetooth.
This method requires an active transport connection via MpcService. It orchestrates the full presign+sign flow with the hardware device in real-time.
Flow:
Get the active transport from MpcService
Delegate to the chain-specific signWithHw implementation (which loads DKG, does presign+sign via transport, compiles signed tx)
Usage from Flutter:
// Connect to HW device first
await sdk.mpc.scanForDevices();
await sdk.mpc.performDkg(groupId);
// Build and sign transaction
final preImageTx = await sdk.blockchainService.preImageHash(tx, from, fee);
final signedTx = await sdk.blockchainService.signWithHw(preImageTx, groupId);
final broadcast = await sdk.blockchainService.sendTransaction(network, signedTx);Content copied to clipboard
Return
Result containing the signed transaction hex string
Parameters
pre Image Tx
The PreImageTx from preImageHash
group Id
The MPC group ID for DKG credential lookup