gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 14:20:46 26 4
gpt4 key购买 nike

在哪里可以找到比特币实现(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" )
...

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

最佳答案

检查这一点的唯一好方法 - 查看来源。通常这些前缀在 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};

关于bitcoin - 加密货币版本字节列表(地址前缀),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55119738/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com