mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
Update address prefixes for Zcash.
This commit is contained in:
parent
69d99d202d
commit
6bfe487f19
@ -21,6 +21,7 @@
|
|||||||
#include "coins.h"
|
#include "coins.h"
|
||||||
|
|
||||||
// filled CoinType Protobuf structure defined in https://github.com/trezor/trezor-common/blob/master/protob/types.proto#L133
|
// 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] = {
|
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, "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, "Testnet", true, "TEST", true, 111, true, 10000000, true, 196, true, 3, true, 40, true, "\x18" "Bitcoin Signed Message:\n"},
|
||||||
@ -28,7 +29,8 @@ const CoinType coins[COINS_COUNT] = {
|
|||||||
{true, "Litecoin", true, "LTC", true, 48, true, 1000000, true, 5, false, 0, false, 0, true, "\x19" "Litecoin 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, "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, "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, "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)
|
const CoinType *coinByShortcut(const char *shortcut)
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "types.pb.h"
|
#include "types.pb.h"
|
||||||
|
|
||||||
#define COINS_COUNT 7
|
#define COINS_COUNT 8
|
||||||
|
|
||||||
extern const CoinType coins[COINS_COUNT];
|
extern const CoinType coins[COINS_COUNT];
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Features.vendor max_size:33
|
|||||||
Features.device_id max_size:25
|
Features.device_id max_size:25
|
||||||
Features.language max_size:17
|
Features.language max_size:17
|
||||||
Features.label max_size:33
|
Features.label max_size:33
|
||||||
Features.coins max_count:7
|
Features.coins max_count:8
|
||||||
Features.revision max_size:20
|
Features.revision max_size:20
|
||||||
Features.bootloader_hash max_size:32
|
Features.bootloader_hash max_size:32
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ typedef struct _Features {
|
|||||||
bool has_label;
|
bool has_label;
|
||||||
char label[33];
|
char label[33];
|
||||||
size_t coins_count;
|
size_t coins_count;
|
||||||
CoinType coins[7];
|
CoinType coins[8];
|
||||||
bool has_initialized;
|
bool has_initialized;
|
||||||
bool initialized;
|
bool initialized;
|
||||||
bool has_revision;
|
bool has_revision;
|
||||||
@ -835,7 +835,7 @@ extern const uint32_t SimpleSignTx_lock_time_default;
|
|||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define Initialize_init_default {0}
|
#define Initialize_init_default {0}
|
||||||
#define GetFeatures_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 ClearSession_init_default {0}
|
||||||
#define ApplySettings_init_default {false, "", false, "", false, 0, false, {0, {0}}}
|
#define ApplySettings_init_default {false, "", false, "", false, 0, false, {0, {0}}}
|
||||||
#define ChangePin_init_default {false, 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 DebugLinkFlashErase_init_default {false, 0}
|
||||||
#define Initialize_init_zero {0}
|
#define Initialize_init_zero {0}
|
||||||
#define GetFeatures_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 ClearSession_init_zero {0}
|
||||||
#define ApplySettings_init_zero {false, "", false, "", false, 0, false, {0, {0}}}
|
#define ApplySettings_init_zero {false, "", false, "", false, 0, false, {0, {0}}}
|
||||||
#define ChangePin_init_zero {false, 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) */
|
/* Maximum encoded size of messages (where known) */
|
||||||
#define Initialize_size 0
|
#define Initialize_size 0
|
||||||
#define GetFeatures_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 ClearSession_size 0
|
||||||
#define ApplySettings_size 1083
|
#define ApplySettings_size 1083
|
||||||
#define ChangePin_size 2
|
#define ChangePin_size 2
|
||||||
|
Loading…
Reference in New Issue
Block a user