Skip to content

Commit

Permalink
Fix base58 and bech32 prefixes for signet addresses and keys
Browse files Browse the repository at this point in the history
These prefixes  had values based on some early signet branch of Bitcoin Core,
and they were changed afterwards, now they are the same as for testnet
  • Loading branch information
dgpv committed Nov 22, 2021
1 parent 9a5018c commit 394d267
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bitcointx/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ class CBech32BitcoinTestnetAddress(CBech32CoinAddress,

class CBech32BitcoinSignetAddress(CBech32CoinAddress,
CBitcoinSignetAddress):
bech32_hrp = 'sb'
bech32_hrp = 'tb'


class CBech32BitcoinRegtestAddress(CBech32CoinAddress,
Expand Down Expand Up @@ -714,7 +714,7 @@ class P2PKHBitcoinRegtestAddress(P2PKHCoinAddress,

class P2PKHBitcoinSignetAddress(P2PKHCoinAddress,
CBase58BitcoinSignetAddress):
base58_prefix = bytes([125])
base58_prefix = bytes([111])


class P2SHBitcoinRegtestAddress(P2SHCoinAddress,
Expand All @@ -724,7 +724,7 @@ class P2SHBitcoinRegtestAddress(P2SHCoinAddress,

class P2SHBitcoinSignetAddress(P2SHCoinAddress,
CBase58BitcoinSignetAddress):
base58_prefix = bytes([87])
base58_prefix = bytes([196])


class P2WSHBitcoinAddress(P2WSHCoinAddress, CBech32BitcoinAddress):
Expand Down Expand Up @@ -869,7 +869,7 @@ class CBitcoinRegtestKey(CCoinKey, WalletBitcoinRegtestClass):


class CBitcoinSignetKey(CCoinKey, WalletBitcoinSignetClass):
base58_prefix = bytes([217])
base58_prefix = bytes([239])


class CCoinExtPubKey(CBase58DataDispatched, CExtPubKeyBase,
Expand Down
3 changes: 3 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Added Taproot support:

Removed bitcointx.core.serialize.VarBytesSerializer - it was a duplicate of BytesSerializer

Fixed base58 and bech32 prefixes for signet addresses and keys (they had values based on some early
signet branch of Bitcoin Core, and they were changed afterwards, now they are the same as for testnet)

...

## v1.1.2
Expand Down

0 comments on commit 394d267

Please sign in to comment.