params

package
v0.0.0-...-78810ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParams

func GetParams(cfg *xc.ChainConfig) (*chaincfg.Params, error)

Types

type Network

type Network string

UTXO chains have mainnet, testnet, and regtest/devnet network types built in.

const Mainnet Network = "mainnet"
const Regtest Network = "regtest"
const Testnet Network = "testnet"

type NetworkTriple

type NetworkTriple struct {
	Mainnet *chaincfg.Params
	Testnet *chaincfg.Params
	Regtest *chaincfg.Params
}
var DogeNetworks *NetworkTriple = &NetworkTriple{
	Mainnet: &chaincfg.Params{
		Name: "mainnet",
		Net:  0xc0c0c0c0,

		PubKeyHashAddrID: 30,
		ScriptHashAddrID: 22,
		PrivateKeyID:     158,

		HDPrivateKeyID: [4]byte{0x02, 0xfa, 0xc3, 0x98},
		HDPublicKeyID:  [4]byte{0x02, 0xfa, 0xca, 0xfd},

		Bech32HRPSegwit: "doge",
	},
	Testnet: &chaincfg.Params{
		Name: "testnet",
		Net:  0xfcc1b7dc,

		PubKeyHashAddrID: 113,
		ScriptHashAddrID: 196,
		PrivateKeyID:     241,

		HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94},
		HDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf},

		Bech32HRPSegwit: "doget",
	},
	Regtest: &chaincfg.Params{
		Name: "regtest",

		Net: 0xfabfb5da,

		PubKeyHashAddrID: 111,
		ScriptHashAddrID: 196,
		PrivateKeyID:     239,

		HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94},
		HDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf},

		Bech32HRPSegwit: "dogert",
	},
}
var LtcNetworks *NetworkTriple = &NetworkTriple{
	Mainnet: &chaincfg.Params{
		Name: "mainnet",
		Net:  0xfbc0b6db,

		PubKeyHashAddrID: 48,
		ScriptHashAddrID: 50,
		PrivateKeyID:     176,

		HDPrivateKeyID: [4]byte{0x04, 0x88, 0xAD, 0xE4},
		HDPublicKeyID:  [4]byte{0x04, 0x88, 0xB2, 0x1E},

		Bech32HRPSegwit: "ltc",
	},
	Testnet: &chaincfg.Params{
		Name: "testnet",
		Net:  0xfdd2c8f1,

		PubKeyHashAddrID: 111,
		ScriptHashAddrID: 196,
		PrivateKeyID:     239,

		HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94},
		HDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xCF},

		Bech32HRPSegwit: "tltc",
	},
	Regtest: &chaincfg.Params{
		Name: "regtest",

		Net: 0xfabfb5da,

		PubKeyHashAddrID: 111,
		ScriptHashAddrID: 196,
		PrivateKeyID:     239,

		HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94},
		HDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf},

		Bech32HRPSegwit: "rltc",
	},
}

func (*NetworkTriple) GetParams

func (n *NetworkTriple) GetParams(network string) *chaincfg.Params

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL