Skip to content

Commit

Permalink
trezor: add support for pre-signed external inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
matejcik committed Mar 23, 2022
1 parent 6c42d14 commit 6054be5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hwilib/devices/trezor.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ def ignore_input() -> None:
if _use_external_script_type(self.client):
txinputtype.script_type = messages.InputScriptType.EXTERNAL
txinputtype.script_pubkey = utxo.scriptPubKey
if psbt_in.final_script_sig:
txinputtype.script_sig = psbt_in.final_script_sig
witness = psbt_in.final_script_witness.serialize()
if witness:
txinputtype.witness = witness
else:
txinputtype.address_n = [0x80000000 | 84, 0x80000000 | (0 if self.chain == Chain.MAIN else 1), 0x80000000, 0, 0]
txinputtype.script_type = messages.InputScriptType.SPENDWITNESS
Expand Down

0 comments on commit 6054be5

Please sign in to comment.