【问题标题】: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"    )
 ...

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

【问题讨论】:

    标签: bitcoin cryptocurrency


    【解决方案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};
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-10
      • 2021-07-12
      • 2023-03-04
      • 1970-01-01
      • 1970-01-01
      • 2019-01-13
      • 2022-06-23
      • 1970-01-01
      相关资源
      最近更新 更多