Documentation
¶
Index ¶
- Variables
- type BlockLimits
- type Checkpoint
- type Deployment
- type KeyPrefix
- type NamesParams
- type Network
- func Ensure(n *Network) *Network
- func FromAddress(hrp string, prefer ...NetworkType) *Network
- func FromMagic(magic uint32, prefer ...NetworkType) *Network
- func FromPrivate(prefix uint32, prefer ...NetworkType) *Network
- func FromPrivate58(prefix string, prefer ...NetworkType) *Network
- func FromPublic(prefix uint32, prefer ...NetworkType) *Network
- func FromPublic58(prefix string, prefer ...NetworkType) *Network
- func FromWIF(prefix uint32, prefer ...NetworkType) *Network
- func Get(t NetworkType) *Network
- func Primary() *Network
- func SelectNetwork(t NetworkType) *Network
- func SetPrimary(t NetworkType) *Network
- type NetworkType
- type POWParams
- type TimeSource
Constants ¶
This section is empty.
Variables ¶
View Source
var Networks = map[NetworkType]*Network{ Mainnet: mainNet(), Testnet: testNet(), Regtest: regTest(), Simnet: simNet(), }
Functions ¶
This section is empty.
Types ¶
type BlockLimits ¶
type Checkpoint ¶
type Deployment ¶
type NamesParams ¶
type NamesParams struct {
AuctionStart uint32
RolloutInterval uint32
LockupPeriod uint32
RenewalWindow uint32
RenewalPeriod uint32
RenewalMaturity uint32
ClaimPeriod uint32
AlexaLockupPeriod uint32
ClaimFrequency uint32
BiddingPeriod uint32
RevealPeriod uint32
TreeInterval uint32
TransferLockup uint32
AuctionMaturity uint32
NoRollout bool
NoReserved bool
}
type Network ¶
type Network struct {
Type string
Seeds []string
Magic uint32
Port uint16
BrontidePort uint16
CheckpointMap map[uint32]string
LastCheckpoint uint32
Checkpoints []Checkpoint
HalvingInterval uint32
CoinbaseMaturity uint32
Genesis gen.Net
GenesisBlock string
UnknownBitsMask uint32
POW POWParams
Names NamesParams
GoosigStop uint32
Block BlockLimits
ActivationThreshold uint32
MinerWindow uint32
Deployments map[string]Deployment
Deploys []Deployment
KeyPrefix KeyPrefix
AddressPrefix string
ClaimPrefix string
RequireStandard bool
MinRelay uint32
FeeRate uint32
MaxFeeRate uint32
RPCPort uint16
WalletPort uint16
NSPort uint16
RSPort uint16
IdentityKeyHex string
SelfConnect bool
RequestMempool bool
DeflationHeight uint32
TxStartHeight uint32
// contains filtered or unexported fields
}
func FromAddress ¶
func FromAddress(hrp string, prefer ...NetworkType) *Network
FromAddress finds a network by its bech32 address prefix.
func FromMagic ¶
func FromMagic(magic uint32, prefer ...NetworkType) *Network
FromMagic finds a network by magic number.
func FromPrivate ¶
func FromPrivate(prefix uint32, prefer ...NetworkType) *Network
FromPrivate finds a network by its xprivkey prefix.
func FromPrivate58 ¶
func FromPrivate58(prefix string, prefer ...NetworkType) *Network
FromPrivate58 finds a network by its xprivkey base58 prefix.
func FromPublic ¶
func FromPublic(prefix uint32, prefer ...NetworkType) *Network
FromPublic finds a network by xpubkey prefix.
func FromPublic58 ¶
func FromPublic58(prefix string, prefer ...NetworkType) *Network
FromPublic58 finds a network by its xpubkey base58 prefix.
func FromWIF ¶
func FromWIF(prefix uint32, prefer ...NetworkType) *Network
FromWIF finds a network by WIF prefix.
func SelectNetwork ¶
func SelectNetwork(t NetworkType) *Network
func SetPrimary ¶
func SetPrimary(t NetworkType) *Network
SetPrimary sets the default/primary network.
func (*Network) ByBit ¶
func (n *Network) ByBit(bit uint32) *Deployment
func (*Network) SetTimeSource ¶
func (n *Network) SetTimeSource(ts TimeSource)
type NetworkType ¶
type NetworkType string
const ( Mainnet NetworkType = "main" Testnet NetworkType = "testnet" Regtest NetworkType = "regtest" Simnet NetworkType = "simnet" )
type TimeSource ¶
Click to show internal directories.
Click to hide internal directories.