1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

fix(python/build_tx): correct predefined input types

This commit is contained in:
matejcik 2021-11-09 10:38:27 +01:00 committed by matejcik
parent f96e737ef5
commit 9b9f6859d6

View File

@ -29,11 +29,12 @@ from trezorlib.protobuf import to_dict
SESSION = requests.Session()
SESSION.headers.update({"User-Agent": "trezorlib"})
# the following script type mapping is only valid for single-sig Trezor-generated utxos
BITCOIN_CORE_INPUT_TYPES = {
"scripthash": messages.InputScriptType.SPENDADDRESS,
"pubkeyhash": messages.InputScriptType.SPENDP2SHWITNESS,
"pubkeyhash": messages.InputScriptType.SPENDADDRESS,
"scripthash": messages.InputScriptType.SPENDP2SHWITNESS,
"witness_v0_keyhash": messages.InputScriptType.SPENDWITNESS,
"witness_v1_taproot": messages.InputScriptType.SPENDP2SHWITNESS,
"witness_v1_taproot": messages.InputScriptType.SPENDTAPROOT,
}