Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Mainnet = AddNetwork(&Network{ Name: "mainnet", Alias: "livenet", PubKeyHash: 0x00, ScriptHash: 0x05, PrivateKey: 0x80, Bech32Prefix: "bc", XPubKey: 0x0488B21E, XPrivKey: 0x0488ADE4, NetworkMagic: IntegerToMagic(0xD9B4BEF9), Port: 8333, DNSServers: []string{ "seed.bitcoin.sipa.be", "dnsseed.bluematt.me", "seed.bitcoinstats.com", "seed.bitnodes.io", }, }) Testnet = AddNetwork(&Network{ Name: "testnet", Alias: "test", PubKeyHash: 0x6F, ScriptHash: 0xC4, PrivateKey: 0xEF, Bech32Prefix: "tb", XPubKey: 0x043587CF, XPrivKey: 0x04358394, NetworkMagic: IntegerToMagic(0x0709110B), Port: 18333, DNSServers: []string{ "testnet-seed.bitcoin.jonasschnelli.ch", "seed.tbtc.petertodd.org", "testnet-seed.bluematt.me", "testnet-seed.bitcoin.schildbach.de", }, }) Default = Mainnet )
Default networks
Functions ¶
func IntegerToMagic ¶
IntegerToMagic converts a 32-bit int to 4-byte magic buffer
Types ¶
type Network ¶
type Network struct {
Name string
Alias string
PubKeyHash byte
ScriptHash byte
PrivateKey byte
Bech32Prefix string
XPubKey uint32
XPrivKey uint32
NetworkMagic [4]byte
Port int
DNSServers []string
}
Network represents a Bitcoin network configuration
func AddNetwork ¶
AddNetwork registers a new network configuration
Click to show internal directories.
Click to hide internal directories.