-
Notifications
You must be signed in to change notification settings - Fork 1
/
chaincfg.go
61 lines (48 loc) · 2 KB
/
chaincfg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package pkg
import (
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/chaincfg"
)
// litecoinMainNetParams defines the network parameters for the main Litecoin network.
var litecoinMainNetParams = chaincfg.Params{
Name: "mainnet",
Net: wire.MainNet,
DefaultPort: "9333",
// Human-readable part for Bech32 encoded segwit addresses, as defined in
// BIP 173.
Bech32HRPSegwit: "ltc", // always ltc1 for main net
// Address encoding magics
PubKeyHashAddrID: 0x30, // starts with L
ScriptHashAddrID: 0x50, // starts with M
PrivateKeyID: 0xB0, // starts with 6 (uncompressed) or T (compressed)
WitnessPubKeyHashAddrID: 0x06, // starts with p2
WitnessScriptHashAddrID: 0x0A, // starts with 7Xh
// BIP32 hierarchical deterministic extended key magics
HDPrivateKeyID: [4]byte{0x04, 0x88, 0xad, 0xe4}, // starts with xprv
HDPublicKeyID: [4]byte{0x04, 0x88, 0xb2, 0x1e}, // starts with xpub
// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 2,
}
// dogecoinMainNetParams defines the network parameters for the main Dogecoin network.
var dogecoinMainNetParams = chaincfg.Params{
Name: "mainnet",
Net: wire.MainNet,
DefaultPort: "9333",
// Address encoding magics
PubKeyHashAddrID: 30, // starts with D
// TODO: update below here
// Human-readable part for Bech32 encoded segwit addresses, as defined in
// BIP 173.
Bech32HRPSegwit: "ltc", // always ltc1 for main net
ScriptHashAddrID: 0x50, // starts with M
PrivateKeyID: 0xB0, // starts with 6 (uncompressed) or T (compressed)
WitnessPubKeyHashAddrID: 0x06, // starts with p2
WitnessScriptHashAddrID: 0x0A, // starts with 7Xh
// BIP32 hierarchical deterministic extended key magics
HDPrivateKeyID: [4]byte{0x04, 0x88, 0xad, 0xe4}, // starts with xprv
HDPublicKeyID: [4]byte{0x04, 0x88, 0xb2, 0x1e}, // starts with xpub
// BIP44 coin type used in the hierarchical deterministic path for
// address generation.
HDCoinType: 3,
}