mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-26 16:18:22 +00:00
xmr: proto - add fields for protocol optimization
This commit is contained in:
parent
6901cb7cdf
commit
25b6e9058f
@ -364,6 +364,8 @@ message MoneroKeyImageSyncStepRequest {
|
||||
optional bytes tx_pub_key = 2;
|
||||
repeated bytes additional_tx_pub_keys = 3;
|
||||
optional uint64 internal_output_index = 4;
|
||||
optional uint32 sub_addr_major = 5;
|
||||
optional uint32 sub_addr_minor = 6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,15 @@ class MoneroTransferDetails(p.MessageType):
|
||||
tx_pub_key: bytes = None,
|
||||
additional_tx_pub_keys: List[bytes] = None,
|
||||
internal_output_index: int = None,
|
||||
sub_addr_major: int = None,
|
||||
sub_addr_minor: int = None,
|
||||
) -> None:
|
||||
self.out_key = out_key
|
||||
self.tx_pub_key = tx_pub_key
|
||||
self.additional_tx_pub_keys = additional_tx_pub_keys if additional_tx_pub_keys is not None else []
|
||||
self.internal_output_index = internal_output_index
|
||||
self.sub_addr_major = sub_addr_major
|
||||
self.sub_addr_minor = sub_addr_minor
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -31,4 +35,6 @@ class MoneroTransferDetails(p.MessageType):
|
||||
2: ('tx_pub_key', p.BytesType, 0),
|
||||
3: ('additional_tx_pub_keys', p.BytesType, p.FLAG_REPEATED),
|
||||
4: ('internal_output_index', p.UVarintType, 0),
|
||||
5: ('sub_addr_major', p.UVarintType, 0),
|
||||
6: ('sub_addr_minor', p.UVarintType, 0),
|
||||
}
|
||||
|
@ -18,11 +18,15 @@ class MoneroTransferDetails(p.MessageType):
|
||||
tx_pub_key: bytes = None,
|
||||
additional_tx_pub_keys: List[bytes] = None,
|
||||
internal_output_index: int = None,
|
||||
sub_addr_major: int = None,
|
||||
sub_addr_minor: int = None,
|
||||
) -> None:
|
||||
self.out_key = out_key
|
||||
self.tx_pub_key = tx_pub_key
|
||||
self.additional_tx_pub_keys = additional_tx_pub_keys if additional_tx_pub_keys is not None else []
|
||||
self.internal_output_index = internal_output_index
|
||||
self.sub_addr_major = sub_addr_major
|
||||
self.sub_addr_minor = sub_addr_minor
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -31,4 +35,6 @@ class MoneroTransferDetails(p.MessageType):
|
||||
2: ('tx_pub_key', p.BytesType, 0),
|
||||
3: ('additional_tx_pub_keys', p.BytesType, p.FLAG_REPEATED),
|
||||
4: ('internal_output_index', p.UVarintType, 0),
|
||||
5: ('sub_addr_major', p.UVarintType, 0),
|
||||
6: ('sub_addr_minor', p.UVarintType, 0),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user