common/protob: Add AuthorizeCoinJoin message.

This commit is contained in:
Andrew Kozlik
2020-06-29 13:11:43 +02:00
committed by Andrew Kozlik
parent 59002118c0
commit bbab13f6e7
9 changed files with 109 additions and 2 deletions

View File

@@ -0,0 +1,42 @@
# Automatically generated by pb2py
# fmt: off
from .. import protobuf as p
if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
EnumTypeInputScriptType = Literal[0, 1, 2, 3, 4]
except ImportError:
pass
class AuthorizeCoinJoin(p.MessageType):
MESSAGE_WIRE_TYPE = 51
def __init__(
self,
coordinator: str = None,
max_total_fee: int = None,
fee_per_anonymity: int = None,
address_n: List[int] = None,
coin_name: str = None,
script_type: EnumTypeInputScriptType = None,
) -> None:
self.coordinator = coordinator
self.max_total_fee = max_total_fee
self.fee_per_anonymity = fee_per_anonymity
self.address_n = address_n if address_n is not None else []
self.coin_name = coin_name
self.script_type = script_type
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('coordinator', p.UnicodeType, 0), # required
2: ('max_total_fee', p.UVarintType, 0), # required
3: ('fee_per_anonymity', p.UVarintType, 0),
4: ('address_n', p.UVarintType, p.FLAG_REPEATED),
5: ('coin_name', p.UnicodeType, 0), # default=Bitcoin
6: ('script_type', p.EnumType("InputScriptType", (0, 1, 2, 3, 4)), 0), # default=SPENDADDRESS
}

View File

@@ -57,6 +57,7 @@ GetOwnershipId = 43 # type: Literal[43]
OwnershipId = 44 # type: Literal[44]
GetOwnershipProof = 49 # type: Literal[49]
OwnershipProof = 50 # type: Literal[50]
AuthorizeCoinJoin = 51 # type: Literal[51]
CipherKeyValue = 23 # type: Literal[23]
CipheredKeyValue = 48 # type: Literal[48]
SignIdentity = 53 # type: Literal[53]

View File

@@ -4,6 +4,7 @@
from .Address import Address
from .ApplyFlags import ApplyFlags
from .ApplySettings import ApplySettings
from .AuthorizeCoinJoin import AuthorizeCoinJoin
from .BackupDevice import BackupDevice
from .BinanceAddress import BinanceAddress
from .BinanceCancelMsg import BinanceCancelMsg