mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-28 17:18:29 +00:00
common: Add witness field to TxInputType.
This commit is contained in:
parent
872768928b
commit
cc655575c8
@ -216,6 +216,7 @@ message TxAck {
|
|||||||
// optional uint32 decred_script_version = 10; // only for Decred // deprecated -> only 0 is supported
|
// optional uint32 decred_script_version = 10; // only for Decred // deprecated -> only 0 is supported
|
||||||
// optional bytes prev_block_hash_bip115 = 11; // BIP-115 support dropped
|
// optional bytes prev_block_hash_bip115 = 11; // BIP-115 support dropped
|
||||||
// optional uint32 prev_block_height_bip115 = 12; // BIP-115 support dropped
|
// optional uint32 prev_block_height_bip115 = 12; // BIP-115 support dropped
|
||||||
|
optional bytes witness = 13; // witness data, only set for EXTERNAL inputs
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Structure representing compiled transaction output
|
* Structure representing compiled transaction output
|
||||||
|
@ -26,6 +26,7 @@ class TxInputType(p.MessageType):
|
|||||||
multisig: MultisigRedeemScriptType = None,
|
multisig: MultisigRedeemScriptType = None,
|
||||||
amount: int = None,
|
amount: int = None,
|
||||||
decred_tree: int = None,
|
decred_tree: int = None,
|
||||||
|
witness: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address_n = address_n if address_n is not None else []
|
self.address_n = address_n if address_n is not None else []
|
||||||
self.prev_hash = prev_hash
|
self.prev_hash = prev_hash
|
||||||
@ -36,6 +37,7 @@ class TxInputType(p.MessageType):
|
|||||||
self.multisig = multisig
|
self.multisig = multisig
|
||||||
self.amount = amount
|
self.amount = amount
|
||||||
self.decred_tree = decred_tree
|
self.decred_tree = decred_tree
|
||||||
|
self.witness = witness
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_fields(cls) -> Dict:
|
def get_fields(cls) -> Dict:
|
||||||
@ -49,4 +51,5 @@ class TxInputType(p.MessageType):
|
|||||||
7: ('multisig', MultisigRedeemScriptType, 0),
|
7: ('multisig', MultisigRedeemScriptType, 0),
|
||||||
8: ('amount', p.UVarintType, 0),
|
8: ('amount', p.UVarintType, 0),
|
||||||
9: ('decred_tree', p.UVarintType, 0),
|
9: ('decred_tree', p.UVarintType, 0),
|
||||||
|
13: ('witness', p.BytesType, 0),
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ TransactionType.extra_data max_size:1024
|
|||||||
TxInputType.address_n max_count:8
|
TxInputType.address_n max_count:8
|
||||||
TxInputType.prev_hash max_size:32
|
TxInputType.prev_hash max_size:32
|
||||||
TxInputType.script_sig max_size:1650
|
TxInputType.script_sig max_size:1650
|
||||||
|
TxInputType.witness max_size:109
|
||||||
|
|
||||||
TxOutputType.address max_size:130
|
TxOutputType.address max_size:130
|
||||||
TxOutputType.address_n max_count:8
|
TxOutputType.address_n max_count:8
|
||||||
|
@ -26,6 +26,7 @@ class TxInputType(p.MessageType):
|
|||||||
multisig: MultisigRedeemScriptType = None,
|
multisig: MultisigRedeemScriptType = None,
|
||||||
amount: int = None,
|
amount: int = None,
|
||||||
decred_tree: int = None,
|
decred_tree: int = None,
|
||||||
|
witness: bytes = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.address_n = address_n if address_n is not None else []
|
self.address_n = address_n if address_n is not None else []
|
||||||
self.prev_hash = prev_hash
|
self.prev_hash = prev_hash
|
||||||
@ -36,6 +37,7 @@ class TxInputType(p.MessageType):
|
|||||||
self.multisig = multisig
|
self.multisig = multisig
|
||||||
self.amount = amount
|
self.amount = amount
|
||||||
self.decred_tree = decred_tree
|
self.decred_tree = decred_tree
|
||||||
|
self.witness = witness
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_fields(cls) -> Dict:
|
def get_fields(cls) -> Dict:
|
||||||
@ -49,4 +51,5 @@ class TxInputType(p.MessageType):
|
|||||||
7: ('multisig', MultisigRedeemScriptType, 0),
|
7: ('multisig', MultisigRedeemScriptType, 0),
|
||||||
8: ('amount', p.UVarintType, 0),
|
8: ('amount', p.UVarintType, 0),
|
||||||
9: ('decred_tree', p.UVarintType, 0),
|
9: ('decred_tree', p.UVarintType, 0),
|
||||||
|
13: ('witness', p.BytesType, 0),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user