From e7b36ec86035f98181c13a137737b6b05432a0d5 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 28 Jun 2018 14:52:53 +0200 Subject: [PATCH] defs: add bip115 to coindef --- defs/coins/tools/coindef.proto | 35 ----------- defs/coins/tools/coindef.py | 111 --------------------------------- tools/coindef.py | 3 + 3 files changed, 3 insertions(+), 146 deletions(-) delete mode 100644 defs/coins/tools/coindef.proto delete mode 100644 defs/coins/tools/coindef.py diff --git a/defs/coins/tools/coindef.proto b/defs/coins/tools/coindef.proto deleted file mode 100644 index 66c8a5b27..000000000 --- a/defs/coins/tools/coindef.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto2"; - -message CoinDef { - optional string coin_name = 1; - optional string coin_shortcut = 2; - optional string coin_label = 3; - optional string curve_name = 4; - optional uint32 address_type = 5; - optional uint32 address_type_p2sh = 6; - optional uint64 maxfee_kb = 7; - optional uint64 minfee_kb = 8; - optional bytes signed_message_header = 9; - optional bytes hash_genesis_block = 10; - optional uint32 xprv_magic = 11; - optional uint32 xpub_magic = 12; - optional uint32 xpub_magic_segwit_p2sh = 13; - optional uint32 xpub_magic_segwit_native = 14; - optional string bech32_prefix = 15; - optional string cashaddr_prefix = 16; - optional uint32 slip44 = 17; - optional bool segwit = 18; - optional bool decred = 19; - optional uint32 fork_id = 20; - optional bool force_bip143 = 21; - optional uint64 dust_limit = 22; - optional string address_prefix = 23; - optional uint32 min_address_length = 24; - optional uint32 max_address_length = 25; - optional bytes icon = 26; - optional uint32 version_group_id = 27; - optional string website = 28; - optional string github = 29; - optional string maintainer = 30; - optional uint32 blocktime_seconds = 31; -} diff --git a/defs/coins/tools/coindef.py b/defs/coins/tools/coindef.py deleted file mode 100644 index 598dc68b3..000000000 --- a/defs/coins/tools/coindef.py +++ /dev/null @@ -1,111 +0,0 @@ -# Automatically generated by pb2py -from trezorlib import protobuf as p - - -class CoinDef(p.MessageType): - FIELDS = { - 1: ('coin_name', p.UnicodeType, 0), - 2: ('coin_shortcut', p.UnicodeType, 0), - 3: ('coin_label', p.UnicodeType, 0), - 4: ('curve_name', p.UnicodeType, 0), - 5: ('address_type', p.UVarintType, 0), - 6: ('address_type_p2sh', p.UVarintType, 0), - 7: ('maxfee_kb', p.UVarintType, 0), - 8: ('minfee_kb', p.UVarintType, 0), - 9: ('signed_message_header', p.BytesType, 0), - 10: ('hash_genesis_block', p.BytesType, 0), - 11: ('xprv_magic', p.UVarintType, 0), - 12: ('xpub_magic', p.UVarintType, 0), - 13: ('xpub_magic_segwit_p2sh', p.UVarintType, 0), - 14: ('xpub_magic_segwit_native', p.UVarintType, 0), - 15: ('bech32_prefix', p.UnicodeType, 0), - 16: ('cashaddr_prefix', p.UnicodeType, 0), - 17: ('slip44', p.UVarintType, 0), - 18: ('segwit', p.BoolType, 0), - 19: ('decred', p.BoolType, 0), - 20: ('fork_id', p.UVarintType, 0), - 21: ('force_bip143', p.BoolType, 0), - 22: ('dust_limit', p.UVarintType, 0), - 23: ('address_prefix', p.UnicodeType, 0), - 24: ('min_address_length', p.UVarintType, 0), - 25: ('max_address_length', p.UVarintType, 0), - 26: ('icon', p.BytesType, 0), - 27: ('version_group_id', p.UVarintType, 0), - 28: ('website', p.UnicodeType, 0), - 29: ('github', p.UnicodeType, 0), - 30: ('maintainer', p.UnicodeType, 0), - 31: ('blocktime_seconds', p.UVarintType, 0), - } - - def __init__( - self, - coin_name: str = None, - coin_shortcut: str = None, - coin_label: str = None, - curve_name: str = None, - address_type: int = None, - address_type_p2sh: int = None, - maxfee_kb: int = None, - minfee_kb: int = None, - signed_message_header: bytes = None, - hash_genesis_block: bytes = None, - xprv_magic: int = None, - xpub_magic: int = None, - xpub_magic_segwit_p2sh: int = None, - xpub_magic_segwit_native: int = None, - bech32_prefix: str = None, - cashaddr_prefix: str = None, - slip44: int = None, - segwit: bool = None, - decred: bool = None, - fork_id: int = None, - force_bip143: bool = None, - dust_limit: int = None, - address_prefix: str = None, - min_address_length: int = None, - max_address_length: int = None, - icon: bytes = None, - version_group_id: int = None, - website: str = None, - github: str = None, - maintainer: str = None, - blocktime_seconds: int = None, - default_fee_b: dict = None, - bitcore: dict = None, - blockbook: dict = None - ): - self.coin_name = coin_name - self.coin_shortcut = coin_shortcut - self.coin_label = coin_label - self.curve_name = curve_name - self.address_type = address_type - self.address_type_p2sh = address_type_p2sh - self.maxfee_kb = maxfee_kb - self.minfee_kb = minfee_kb - self.signed_message_header = signed_message_header - self.hash_genesis_block = hash_genesis_block - self.xprv_magic = xprv_magic - self.xpub_magic = xpub_magic - self.xpub_magic_segwit_p2sh = xpub_magic_segwit_p2sh - self.xpub_magic_segwit_native = xpub_magic_segwit_native - self.bech32_prefix = bech32_prefix - self.cashaddr_prefix = cashaddr_prefix - self.slip44 = slip44 - self.segwit = segwit - self.decred = decred - self.fork_id = fork_id - self.force_bip143 = force_bip143 - self.dust_limit = dust_limit - self.address_prefix = address_prefix - self.min_address_length = min_address_length - self.max_address_length = max_address_length - self.icon = icon - self.version_group_id = version_group_id - self.website = website - self.github = github - self.maintainer = maintainer - self.blocktime_seconds = blocktime_seconds - self.default_fee_b = default_fee_b - self.bitcore = bitcore - self.blockbook = blockbook - p.MessageType.__init__(self) diff --git a/tools/coindef.py b/tools/coindef.py index fad14fbc0..6bbbab183 100644 --- a/tools/coindef.py +++ b/tools/coindef.py @@ -34,6 +34,7 @@ class CoinDef(p.MessageType): 29: ('github', p.UnicodeType, 0), 30: ('maintainer', p.UnicodeType, 0), 31: ('blocktime_seconds', p.UVarintType, 0), + 32: ('bip115', p.BoolType, 0), } def __init__( @@ -59,6 +60,7 @@ class CoinDef(p.MessageType): decred: bool = None, fork_id: int = None, force_bip143: bool = None, + bip115: bool = None, dust_limit: int = None, address_prefix: str = None, min_address_length: int = None, @@ -94,6 +96,7 @@ class CoinDef(p.MessageType): self.decred = decred self.fork_id = fork_id self.force_bip143 = force_bip143 + self.bip115 = bip115 self.dust_limit = dust_limit self.address_prefix = address_prefix self.min_address_length = min_address_length