mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-24 07:18:09 +00:00
common: Add ownership_proof field to TxInputType.
This commit is contained in:
parent
791ff3fe06
commit
956ea9a94f
@ -217,6 +217,8 @@ message TxAck {
|
||||
// optional bytes prev_block_hash_bip115 = 11; // 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
|
||||
optional bytes ownership_proof = 14; // SLIP-0019 proof of ownership, only set for EXTERNAL inputs
|
||||
|
||||
}
|
||||
/**
|
||||
* Structure representing compiled transaction output
|
||||
|
@ -27,6 +27,7 @@ class TxInputType(p.MessageType):
|
||||
amount: int = None,
|
||||
decred_tree: int = None,
|
||||
witness: bytes = None,
|
||||
ownership_proof: bytes = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.prev_hash = prev_hash
|
||||
@ -38,6 +39,7 @@ class TxInputType(p.MessageType):
|
||||
self.amount = amount
|
||||
self.decred_tree = decred_tree
|
||||
self.witness = witness
|
||||
self.ownership_proof = ownership_proof
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -52,4 +54,5 @@ class TxInputType(p.MessageType):
|
||||
8: ('amount', p.UVarintType, 0),
|
||||
9: ('decred_tree', p.UVarintType, 0),
|
||||
13: ('witness', p.BytesType, 0),
|
||||
14: ('ownership_proof', p.BytesType, 0),
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ TxInputType.address_n max_count:8
|
||||
TxInputType.prev_hash max_size:32
|
||||
TxInputType.script_sig max_size:1650
|
||||
TxInputType.witness max_size:109
|
||||
TxInputType.ownership_proof max_size:171
|
||||
|
||||
TxOutputType.address max_size:130
|
||||
TxOutputType.address_n max_count:8
|
||||
|
@ -27,6 +27,7 @@ class TxInputType(p.MessageType):
|
||||
amount: int = None,
|
||||
decred_tree: int = None,
|
||||
witness: bytes = None,
|
||||
ownership_proof: bytes = None,
|
||||
) -> None:
|
||||
self.address_n = address_n if address_n is not None else []
|
||||
self.prev_hash = prev_hash
|
||||
@ -38,6 +39,7 @@ class TxInputType(p.MessageType):
|
||||
self.amount = amount
|
||||
self.decred_tree = decred_tree
|
||||
self.witness = witness
|
||||
self.ownership_proof = ownership_proof
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -52,4 +54,5 @@ class TxInputType(p.MessageType):
|
||||
8: ('amount', p.UVarintType, 0),
|
||||
9: ('decred_tree', p.UVarintType, 0),
|
||||
13: ('witness', p.BytesType, 0),
|
||||
14: ('ownership_proof', p.BytesType, 0),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user