forked from ygcool/go-hdwallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.go
56 lines (48 loc) · 1.77 KB
/
params.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
package hdwallet
import (
"github.com/btcsuite/btcd/chaincfg"
)
// init net params
var (
BTCParams = chaincfg.MainNetParams
BTCTestnetParams = chaincfg.TestNet3Params
LTCParams = chaincfg.MainNetParams
DOGEParams = chaincfg.MainNetParams
DASHParams = chaincfg.MainNetParams
BCHParams = chaincfg.MainNetParams
QTUMParams = chaincfg.MainNetParams
USDTParams = chaincfg.MainNetParams
)
func init() {
// ltc net params
// https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp
LTCParams.Bech32HRPSegwit = "ltc"
LTCParams.PubKeyHashAddrID = 0x30 // 48
LTCParams.ScriptHashAddrID = 0x32 // 50
LTCParams.PrivateKeyID = 0xb0 // 176
// doge net params
// https://github.com/dogecoin/dogecoin/blob/master/src/chainparams.cpp
DOGEParams.PubKeyHashAddrID = 0x1e // 30
DOGEParams.ScriptHashAddrID = 0x16 // 22
DOGEParams.PrivateKeyID = 0x9e // 158
// dash net params
// https://github.com/dashpay/dash/blob/master/src/chainparams.cpp
DASHParams.PubKeyHashAddrID = 0x4c // 76
DASHParams.ScriptHashAddrID = 0x10 // 16
DASHParams.PrivateKeyID = 0xcc // 204
// bch net params
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/chainparams.cpp
BCHParams.PubKeyHashAddrID = 0x00 // 0
BCHParams.ScriptHashAddrID = 0x05 // 5
BCHParams.PrivateKeyID = 0x80 // 128
// qtum net params
// https://github.com/qtumproject/qtum/blob/master/src/chainparams.cpp
QTUMParams.PubKeyHashAddrID = 0x3a // 58
QTUMParams.ScriptHashAddrID = 0x32 // 50
QTUMParams.PrivateKeyID = 0x80 // 128
// usdt net params
// https://github.com/OmniLayer/omnicore/blob/master/src/chainparams.cpp
USDTParams.PubKeyHashAddrID = 0x00 // 0
USDTParams.ScriptHashAddrID = 0x05 // 5
USDTParams.PrivateKeyID = 0x80 // 128
}