utils

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mainnet  Network     = "mainnet"
	Testnet  Network     = "testnet"
	Electrum BackendName = "electrum"
	Btcd     BackendName = "btcd"
)

Variables

This section is empty.

Functions

func GenesisBlock

func GenesisBlock(network Network) string

func GetDefaultServer

func GetDefaultServer(network Network, backend BackendName, addr string) (string, string)

Picks a default server for electrum or localhost for btcd Returns a pair of hostname:port (or pseudo-port for electrum)

func Max

func Max(num uint32, nums ...uint32) uint32

func PanicOnError

func PanicOnError(err error)

PanicOnError panics if err is not nil

func VerifyMandN

func VerifyMandN(m int, n int) error

Types

type BackendName

type BackendName string

type Network

type Network string

func AddressToNetwork

func AddressToNetwork(addr string) Network

func (Network) ChainConfig

func (n Network) ChainConfig() *chaincfg.Params

ChainConfig returns a given chaincfg.Params for a given Network

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL