add Bech32HRPSegwit (human-readable part for segwit addresses) to chaincfg.Params
This commit is contained in:
parent
948d80b198
commit
9822ffad68
1 changed files with 20 additions and 0 deletions
|
@ -195,6 +195,10 @@ type Params struct {
|
|||
// Mempool parameters
|
||||
RelayNonStdTxs bool
|
||||
|
||||
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||
// BIP 173.
|
||||
Bech32HRPSegwit string
|
||||
|
||||
// Address encoding magics
|
||||
PubKeyHashAddrID byte // First byte of a P2PKH address
|
||||
ScriptHashAddrID byte // First byte of a P2SH address
|
||||
|
@ -284,6 +288,10 @@ var MainNetParams = Params{
|
|||
// Mempool parameters
|
||||
RelayNonStdTxs: false,
|
||||
|
||||
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||
// BIP 173.
|
||||
Bech32HRPSegwit: "bc", // always bc for main net
|
||||
|
||||
// Address encoding magics
|
||||
PubKeyHashAddrID: 0x00, // starts with 1
|
||||
ScriptHashAddrID: 0x05, // starts with 3
|
||||
|
@ -349,6 +357,10 @@ var RegressionNetParams = Params{
|
|||
// Mempool parameters
|
||||
RelayNonStdTxs: true,
|
||||
|
||||
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||
// BIP 173.
|
||||
Bech32HRPSegwit: "tb", // always tb for test net
|
||||
|
||||
// Address encoding magics
|
||||
PubKeyHashAddrID: 0x6f, // starts with m or n
|
||||
ScriptHashAddrID: 0xc4, // starts with 2
|
||||
|
@ -431,6 +443,10 @@ var TestNet3Params = Params{
|
|||
// Mempool parameters
|
||||
RelayNonStdTxs: true,
|
||||
|
||||
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||
// BIP 173.
|
||||
Bech32HRPSegwit: "tb", // always tb for test net
|
||||
|
||||
// Address encoding magics
|
||||
PubKeyHashAddrID: 0x6f, // starts with m or n
|
||||
ScriptHashAddrID: 0xc4, // starts with 2
|
||||
|
@ -500,6 +516,10 @@ var SimNetParams = Params{
|
|||
// Mempool parameters
|
||||
RelayNonStdTxs: true,
|
||||
|
||||
// Human-readable part for Bech32 encoded segwit addresses, as defined in
|
||||
// BIP 173.
|
||||
Bech32HRPSegwit: "sb", // always sb for sim net
|
||||
|
||||
// Address encoding magics
|
||||
PubKeyHashAddrID: 0x3f, // starts with S
|
||||
ScriptHashAddrID: 0x7b, // starts with s
|
||||
|
|
Loading…
Reference in a new issue