Add network definition for blockcypher test net
See original GitHub issueSince the official testnet3 is very unreliable, other solutions have to be found for automated testing. Blockcypher manages a separate test network with identical properties of the bitcoin main network. One exception is that they use a different prefix for addresses.
I tried to use their test network with addresses generated with bitcoinjs-lib, but neither the main nor the testnet network definitions from bitcoinjs-lib produce valid addresses for their test network. It would be great if there was a network definition for the blockcypher test network in bitcoinjs-lib.
Here is the information about that network, quoted from https://www.blockcypher.com/dev/bitcoin/#testing:
We offer two different options for testing your blockchain application: Bitcoin Testnet3, and BlockCypher’s Test Chain. We offer automated faucets for both Testnet3 and BlockCypher’s Test Chain, but we recommend using BlockCypher’s Test Chain for a variety of reasons:
It’s nearly identical in characteristics to Bitcoin Main, with a few differences listed below.
- The prefix for standard addreses is ‘B’ or 'C’ (0x1B). The prefix for multisig addresses is ’D’ (0x1F). This is also known as the “address version byte,” which you can read more about here.
- The chain is private (no data is broadcasted, only BlockCypher mines the transactions), making it much more predictable than the Bitcoin’s testnet (which is frequently under attack).
- New blocks get built every minute, confirming the transactions that have been created using our transaction API.
It would be great if someone could add such a network definition, or tell me which values have to be changed (with respect to the quoted information above) in the following code snippet, so I can make a PR myself:
{
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (10 by maintainers)
Quick update: the version is actually
0x49
not0x80
.adding it kinda seems like a plug for an external service… so I am starting to lean towards no, actually now that I think of it.