Skip to content

Instantly share code, notes, and snippets.

@islishude
Created February 21, 2019 14:24
Show Gist options
  • Save islishude/056f4e4fd11189fdecf7d5b110ecd15b to your computer and use it in GitHub Desktop.
Save islishude/056f4e4fd11189fdecf7d5b110ecd15b to your computer and use it in GitHub Desktop.
chaincfg.go
// Package networks is All Networks params
// HDCoinType @see https://github.com/satoshilabs/slips/blob/master/slip-0044.md
package networks
import "github.com/btcsuite/btcd/chaincfg"
// Litecoin network
// @see https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp#L135
var Litecoin = &chaincfg.Params{
Name: "Litecoin",
PubKeyHashAddrID: 0x30,
ScriptHashAddrID: 0x32,
PrivateKeyID: 0xb0,
HDPublicKeyID: [4]byte{0x04, 0x88, 0xb2, 0x1e},
HDPrivateKeyID: [4]byte{0x04, 0x88, 0xad, 0xe4},
HDCoinType: 0x02,
}
// Dogecoin network
// @see https://github.com/dogecoin/dogecoin/blob/master/src/chainparams.cpp#L128
var Dogecoin = &chaincfg.Params{
Name: "Dogecoin",
PubKeyHashAddrID: 0x1e,
ScriptHashAddrID: 0x16,
PrivateKeyID: 0x9e,
HDPublicKeyID: [4]byte{0x02, 0xfa, 0xca, 0xfd},
HDPrivateKeyID: [4]byte{0x02, 0xfa, 0xc3, 0x98},
HDCoinType: 0x03,
}
// Ethereum network
var Ethereum = &chaincfg.Params{
Name: "Ethereum",
PubKeyHashAddrID: 0x00,
ScriptHashAddrID: 0x05,
PrivateKeyID: 0x80,
HDPublicKeyID: [4]byte{0x04, 0x88, 0xb2, 0x1e},
HDPrivateKeyID: [4]byte{0x04, 0x88, 0xad, 0xe4},
HDCoinType: 0x3c,
}
// EOS Network
var EOS = &chaincfg.Params{
Name: "EOS",
PubKeyHashAddrID: 0x00,
ScriptHashAddrID: 0x05,
PrivateKeyID: 0x80,
HDPublicKeyID: [4]byte{0x04, 0x88, 0xb2, 0x1e},
HDPrivateKeyID: [4]byte{0x04, 0x88, 0xad, 0xe4},
HDCoinType: 0xc2,
}
// Bitcoin network
var Bitcoin = &chaincfg.MainNetParams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment