加密货币版本字节列表(地址前缀)

Posted

技术标签:

【中文标题】加密货币版本字节列表(地址前缀)【英文标题】:List of Cryptocurrency version bytes (address prefix) 【发布时间】:2019-08-02 19:44:32 【问题描述】:

在哪里可以找到比特币实现后每种货币的版本字节列表(地址前缀)(P2PKH 地址编码)

我浏览了官方的比特币 github 和 BIP,但找不到任何相关信息。那里只列出了货币 ID。

我在WalletGenerator.net github上发现index.html的代码中有这样一个列表。

例如:

 //name,               networkVersion, privateKeyPrefix, WIF_Start, CWIF_Start
 ("Bitcoin",             0x00,           0x80, "5",    "[LK]" )
 ("BitcoinCash",         0x00,           0x80, "5",    "[LK]" )
 ("Blackcoin",           0x19,           0x99, "6",    "P"    )
 ("Litecoin",            0x30,           0xb0, "6",    "T"    )
 ...

是否有任何官方或更新的来源提供所有加密货币的地址前缀(版本字节)列表?

【问题讨论】:

【参考方案1】:

检查这一点的唯一好方法 - 查看来源。通常这些前缀在chainparams.cpp 中定义。我不相信在某个地方存在所有基于比特币的加密货币的所有前缀的最新表。以下示例:

Bitcoin:

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
base58Prefixes[EXT_PUBLIC_KEY] = 0x04, 0x88, 0xB2, 0x1E;
base58Prefixes[EXT_SECRET_KEY] = 0x04, 0x88, 0xAD, 0xE4;

Litecoin:

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,50);
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,176);
base58Prefixes[EXT_PUBLIC_KEY] = 0x04, 0x88, 0xB2, 0x1E;
base58Prefixes[EXT_SECRET_KEY] = 0x04, 0x88, 0xAD, 0xE4;

Dash:

// Dash addresses start with 'X'
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,76);
// Dash script addresses start with '7'
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,16);
// Dash private keys start with '7' or 'X'
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,204);
// Dash BIP32 pubkeys start with 'xpub' (Bitcoin defaults)
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
// Dash BIP32 prvkeys start with 'xprv' (Bitcoin defaults)
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();

ZCash:

// These prefixes are the same as the testnet prefixes
base58Prefixes[PUBKEY_ADDRESS]     = 0x1D,0x25;
base58Prefixes[SCRIPT_ADDRESS]     = 0x1C,0xBA;
base58Prefixes[SECRET_KEY]         = 0xEF;
// do not rely on these BIP32 prefixes; they are not specified and may change
base58Prefixes[EXT_PUBLIC_KEY]     = 0x04,0x35,0x87,0xCF;
base58Prefixes[EXT_SECRET_KEY]     = 0x04,0x35,0x83,0x94;
base58Prefixes[ZCPAYMENT_ADDRRESS] = 0x16,0xB6;
base58Prefixes[ZCVIEWING_KEY]      = 0xA8,0xAC,0x0C;
base58Prefixes[ZCSPENDING_KEY] = 0xAC,0x08;

【讨论】:

以上是关于加密货币版本字节列表(地址前缀)的主要内容,如果未能解决你的问题,请参考以下文章

加密货币监控和区块链分析如何帮助避免加密货币欺诈?

加密货币量化交易系统的设计与实现(0.1最初版本,为了应付毕设的版本)

加密货币交易所 API 框架 CCXT

加密货币交易所 API 框架 CCXT

加密货币交易所 API 框架 CCXT

什么是加密货币 加密货币怎么赚钱