Skip to content

Commit 6054be5

Browse files
committed
trezor: add support for pre-signed external inputs
1 parent 6c42d14 commit 6054be5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hwilib/devices/trezor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ def ignore_input() -> None:
434434
if _use_external_script_type(self.client):
435435
txinputtype.script_type = messages.InputScriptType.EXTERNAL
436436
txinputtype.script_pubkey = utxo.scriptPubKey
437+
if psbt_in.final_script_sig:
438+
txinputtype.script_sig = psbt_in.final_script_sig
439+
witness = psbt_in.final_script_witness.serialize()
440+
if witness:
441+
txinputtype.witness = witness
437442
else:
438443
txinputtype.address_n = [0x80000000 | 84, 0x80000000 | (0 if self.chain == Chain.MAIN else 1), 0x80000000, 0, 0]
439444
txinputtype.script_type = messages.InputScriptType.SPENDWITNESS

0 commit comments

Comments
 (0)