1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

Update address prefixes for Zcash.

This commit is contained in:
Daira Hopwood 2016-10-09 20:39:35 +01:00 committed by Pavol Rusnak
parent 69d99d202d
commit 6bfe487f19
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 15 additions and 13 deletions

View File

@ -21,14 +21,16 @@
#include "coins.h"
// filled CoinType Protobuf structure defined in https://github.com/trezor/trezor-common/blob/master/protob/types.proto#L133
// address types > 0xFF represent a two-byte prefix in big-endian order
const CoinType coins[COINS_COUNT] = {
{true, "Bitcoin", true, "BTC", true, 0, true, 100000, true, 5, true, 6, true, 10, true, "\x18" "Bitcoin Signed Message:\n"},
{true, "Testnet", true, "TEST", true, 111, true, 10000000, true, 196, true, 3, true, 40, true, "\x18" "Bitcoin Signed Message:\n"},
{true, "Namecoin", true, "NMC", true, 52, true, 10000000, true, 5, false, 0, false, 0, true, "\x19" "Namecoin Signed Message:\n"},
{true, "Litecoin", true, "LTC", true, 48, true, 1000000, true, 5, false, 0, false, 0, true, "\x19" "Litecoin Signed Message:\n"},
{true, "Dogecoin", true, "DOGE", true, 30, true, 1000000000, true, 22, false, 0, false, 0, true, "\x19" "Dogecoin Signed Message:\n"},
{true, "Dash", true, "DASH", true, 76, true, 100000, true, 16, false, 0, false, 0, true, "\x19" "DarkCoin Signed Message:\n"},
{true, "Zcash", true, "ZEC", true, 65, true, 1000000, true, 5, false, 0, false, 0, true, "\x16" "Zcash Signed Message:\n"},
{true, "Bitcoin", true, "BTC", true, 0, true, 100000, true, 5, true, 6, true, 10, true, "\x18" "Bitcoin Signed Message:\n"},
{true, "Testnet", true, "TEST", true, 111, true, 10000000, true, 196, true, 3, true, 40, true, "\x18" "Bitcoin Signed Message:\n"},
{true, "Namecoin", true, "NMC", true, 52, true, 10000000, true, 5, false, 0, false, 0, true, "\x19" "Namecoin Signed Message:\n"},
{true, "Litecoin", true, "LTC", true, 48, true, 1000000, true, 5, false, 0, false, 0, true, "\x19" "Litecoin Signed Message:\n"},
{true, "Dogecoin", true, "DOGE", true, 30, true, 1000000000, true, 22, false, 0, false, 0, true, "\x19" "Dogecoin Signed Message:\n"},
{true, "Dash", true, "DASH", true, 76, true, 100000, true, 16, false, 0, false, 0, true, "\x19" "DarkCoin Signed Message:\n"},
{true, "Zcash", true, "ZEC", true, 0x1CB8, true, 1000000, true, 0x1CBD, false, 0, false, 0, true, "\x16" "Zcash Signed Message:\n"},
{true, "Zcash Testnet", true, "TAZ", true, 0x1CBA, true, 1000000, true, 0x1D25, false, 0, false, 0, true, "\x16" "Zcash Signed Message:\n"},
};
const CoinType *coinByShortcut(const char *shortcut)

View File

@ -22,7 +22,7 @@
#include "types.pb.h"
#define COINS_COUNT 7
#define COINS_COUNT 8
extern const CoinType coins[COINS_COUNT];

View File

@ -2,7 +2,7 @@ Features.vendor max_size:33
Features.device_id max_size:25
Features.language max_size:17
Features.label max_size:33
Features.coins max_count:7
Features.coins max_count:8
Features.revision max_size:20
Features.bootloader_hash max_size:32

View File

@ -536,7 +536,7 @@ typedef struct _Features {
bool has_label;
char label[33];
size_t coins_count;
CoinType coins[7];
CoinType coins[8];
bool has_initialized;
bool initialized;
bool has_revision;
@ -835,7 +835,7 @@ extern const uint32_t SimpleSignTx_lock_time_default;
/* Initializer values for message structs */
#define Initialize_init_default {0}
#define GetFeatures_init_default {0}
#define Features_init_default {false, "", false, 0, false, 0, false, 0, false, 0, false, "", false, 0, false, 0, false, "", false, "", 0, {CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default}, false, 0, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0, false, 0}
#define Features_init_default {false, "", false, 0, false, 0, false, 0, false, 0, false, "", false, 0, false, 0, false, "", false, "", 0, {CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default, CoinType_init_default}, false, 0, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0, false, 0}
#define ClearSession_init_default {0}
#define ApplySettings_init_default {false, "", false, "", false, 0, false, {0, {0}}}
#define ChangePin_init_default {false, 0}
@ -901,7 +901,7 @@ extern const uint32_t SimpleSignTx_lock_time_default;
#define DebugLinkFlashErase_init_default {false, 0}
#define Initialize_init_zero {0}
#define GetFeatures_init_zero {0}
#define Features_init_zero {false, "", false, 0, false, 0, false, 0, false, 0, false, "", false, 0, false, 0, false, "", false, "", 0, {CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero}, false, 0, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0, false, 0}
#define Features_init_zero {false, "", false, 0, false, 0, false, 0, false, 0, false, "", false, 0, false, 0, false, "", false, "", 0, {CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero, CoinType_init_zero}, false, 0, false, {0, {0}}, false, {0, {0}}, false, 0, false, 0, false, 0}
#define ClearSession_init_zero {0}
#define ApplySettings_init_zero {false, "", false, "", false, 0, false, {0, {0}}}
#define ChangePin_init_zero {false, 0}
@ -1206,7 +1206,7 @@ extern const pb_field_t DebugLinkFlashErase_fields[2];
/* Maximum encoded size of messages (where known) */
#define Initialize_size 0
#define GetFeatures_size 0
#define Features_size (248 + 7*CoinType_size)
#define Features_size (254 + 8*CoinType_size)
#define ClearSession_size 0
#define ApplySettings_size 1083
#define ChangePin_size 2