btcSignTransaction
Bitcoin: sign transaction
Asks device to sign given inputs and outputs of pre-composed transaction. User is asked to confirm all transaction details on OneKey.
const result = await HardwareSDK.btcSignTransaction(connectId, deviceId, params);Params
coin- requiredstringDetermines network definition specified in bitcoin.json file. Coinshortcut,nameorlabelcan be used.inputs- requiredArrayof TxInputType,outputs- requiredArrayof TxOutputType,refTxs- requiredArrayof RefTransaction. Zcash and Komodo refTxs should also containsexpiry,version_group_idandextra_datafields.locktime- optionalnumber,version- optionalnumbertransaction version,expiry- optionalnumber, only for Decred and Zcash,versionGroupId- optionalnumberonly for Zcash, nVersionGroupId when overwintered is set,overwintered- optionalbooleanonly for Zcashtimestamp- optionalnumberonly for Capricoin, transaction timestamp,branchId- optionalnumber, only for Zcash, BRANCH_ID when overwintered is set
Help tool
build input
build Output
buildPrevTx
Example
PAYTOADDRESS
SPENDP2SHWITNESS
PAYTOADDRESS with refTxs (transaction data provided from custom backend)
Result
Error
Last updated
Was this helpful?