1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 15:28:10 +00:00

feat(common): add support for Taproot input and output scripts

This commit is contained in:
Pavol Rusnak 2021-07-15 22:50:26 +02:00 committed by Andrew Kozlik
parent c0c2718c1e
commit 4ed9f00c73
5 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@ enum InputScriptType {
EXTERNAL = 2; // reserved for external inputs (coinjoin) EXTERNAL = 2; // reserved for external inputs (coinjoin)
SPENDWITNESS = 3; // native SegWit SPENDWITNESS = 3; // native SegWit
SPENDP2SHWITNESS = 4; // SegWit over P2SH (backward compatible) SPENDP2SHWITNESS = 4; // SegWit over P2SH (backward compatible)
SPENDTAPROOT = 5; // Taproot
} }
/** /**
@ -31,6 +32,7 @@ enum OutputScriptType {
PAYTOOPRETURN = 3; // op_return PAYTOOPRETURN = 3; // op_return
PAYTOWITNESS = 4; // only for change output PAYTOWITNESS = 4; // only for change output
PAYTOP2SHWITNESS = 5; // only for change output PAYTOP2SHWITNESS = 5; // only for change output
PAYTOTAPROOT = 6; // only for change output
} }
/** /**

View File

@ -7,3 +7,4 @@ SPENDMULTISIG = 1
EXTERNAL = 2 EXTERNAL = 2
SPENDWITNESS = 3 SPENDWITNESS = 3
SPENDP2SHWITNESS = 4 SPENDP2SHWITNESS = 4
SPENDTAPROOT = 5

View File

@ -8,3 +8,4 @@ PAYTOMULTISIG = 2
PAYTOOPRETURN = 3 PAYTOOPRETURN = 3
PAYTOWITNESS = 4 PAYTOWITNESS = 4
PAYTOP2SHWITNESS = 5 PAYTOP2SHWITNESS = 5
PAYTOTAPROOT = 6

View File

@ -290,6 +290,7 @@ if TYPE_CHECKING:
EXTERNAL = 2 EXTERNAL = 2
SPENDWITNESS = 3 SPENDWITNESS = 3
SPENDP2SHWITNESS = 4 SPENDP2SHWITNESS = 4
SPENDTAPROOT = 5
class OutputScriptType(IntEnum): class OutputScriptType(IntEnum):
PAYTOADDRESS = 0 PAYTOADDRESS = 0
@ -298,6 +299,7 @@ if TYPE_CHECKING:
PAYTOOPRETURN = 3 PAYTOOPRETURN = 3
PAYTOWITNESS = 4 PAYTOWITNESS = 4
PAYTOP2SHWITNESS = 5 PAYTOP2SHWITNESS = 5
PAYTOTAPROOT = 6
class DecredStakingSpendType(IntEnum): class DecredStakingSpendType(IntEnum):
SSGen = 0 SSGen = 0

View File

@ -298,6 +298,7 @@ class InputScriptType(IntEnum):
EXTERNAL = 2 EXTERNAL = 2
SPENDWITNESS = 3 SPENDWITNESS = 3
SPENDP2SHWITNESS = 4 SPENDP2SHWITNESS = 4
SPENDTAPROOT = 5
class OutputScriptType(IntEnum): class OutputScriptType(IntEnum):
@ -307,6 +308,7 @@ class OutputScriptType(IntEnum):
PAYTOOPRETURN = 3 PAYTOOPRETURN = 3
PAYTOWITNESS = 4 PAYTOWITNESS = 4
PAYTOP2SHWITNESS = 5 PAYTOP2SHWITNESS = 5
PAYTOTAPROOT = 6
class DecredStakingSpendType(IntEnum): class DecredStakingSpendType(IntEnum):