Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize coinparam HDCoinType allocation #419

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions coinparam/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Coinparams

This contains the parameter list for all the supported coins. This is in accordance
with [SLIP-044](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) for mainnet
coins and numbers at 10000+mainnet cointypes for testnet and 20000+mainnet for regtest coins.

| Coin | HDCointype |
| ---------------- | ---------- |
| Bitcoin Testnet | `1` |
| Bitcoin Regtest | `20001` |
| Litecoin Testnet | `10002` |
| Litecoin Regtest | `20002` |
| Vertcoin | `28` |
| Vertcoin Testnet | `10028` |
| Vertcoin Regtest | `20028` |
2 changes: 1 addition & 1 deletion coinparam/bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ var RegressionNetParams = Params{

// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 257,
HDCoinType: 20002,
TestCoin: true,
}

Expand Down
6 changes: 3 additions & 3 deletions coinparam/litecoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var LiteCoinTestNet4Params = Params{

// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 65537, // i dunno, 0x010001 ?
HDCoinType: 10001,
}

// LiteCoinTestNet4Params are the parameters for the litecoin test network 4.
Expand Down Expand Up @@ -139,8 +139,8 @@ var LiteRegNetParams = Params{

// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 258, // i dunno
TestCoin: true,
HDCoinType: 20002,
TestCoin: true,
}

// liteCoinTestNet4GenesisHash is the first hash in litecoin testnet4
Expand Down
4 changes: 2 additions & 2 deletions coinparam/vertcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var VertcoinTestNetParams = Params{

// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 65536,
HDCoinType: 10028,
TestCoin: true,
}

Expand Down Expand Up @@ -126,7 +126,7 @@ var VertcoinRegTestParams = Params{

// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 261,
HDCoinType: 20028,
TestCoin: true,
}

Expand Down
2 changes: 1 addition & 1 deletion test/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

LIT_BIN = "%s/../lit" % paths.abspath(paths.dirname(__file__))

REGTEST_COINTYPE = 257
REGTEST_COINTYPE = 20002

logger = logging.getLogger("testframework")

Expand Down