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 Jul 1, 2024
1 parent 1f42572 commit 1985b0f
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 @@ -439,6 +439,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 1985b0f

Please sign in to comment.