haskoin-core-0.19.0: Bitcoin & Bitcoin Cash library for Haskell
CopyrightNo rights reserved
LicenseMIT
Maintainerjprupp@protonmail.ch
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Haskoin.Constants

Contents

Description

Network constants for various networks, including Bitcoin SegWit (BTC), Bitcoin Cash (BCH), and corresponding public test and private regression test networks.

Synopsis

Constants

data Network Source #

Constants for network.

Constructors

Network 

Fields

Instances

Instances details
Eq Network Source # 
Instance details

Defined in Haskoin.Constants

Methods

(==) :: Network -> Network -> Bool #

(/=) :: Network -> Network -> Bool #

Read Network Source # 
Instance details

Defined in Haskoin.Constants

Show Network Source # 
Instance details

Defined in Haskoin.Constants

IsString Network Source # 
Instance details

Defined in Haskoin.Constants

Methods

fromString :: String -> Network #

Generic Network Source # 
Instance details

Defined in Haskoin.Constants

Associated Types

type Rep Network :: Type -> Type #

Methods

from :: Network -> Rep Network x #

to :: Rep Network x -> Network #

Serialize Network Source # 
Instance details

Defined in Haskoin.Constants

NFData Network Source # 
Instance details

Defined in Haskoin.Constants

Methods

rnf :: Network -> () #

type Rep Network Source # 
Instance details

Defined in Haskoin.Constants

type Rep Network = D1 ('MetaData "Network" "Haskoin.Constants" "haskoin-core-0.19.0-inplace" 'False) (C1 ('MetaCons "Network" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "getNetworkName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "getNetworkIdent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :*: (S1 ('MetaSel ('Just "getAddrPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "getScriptPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8))) :*: ((S1 ('MetaSel ('Just "getSecretPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "getExtPubKeyPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "getExtSecretPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "getNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)))) :*: (((S1 ('MetaSel ('Just "getGenesisHeader") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockHeader) :*: S1 ('MetaSel ('Just "getMaxBlockSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "getMaxSatoshi") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "getHaskoinUserAgent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString))) :*: ((S1 ('MetaSel ('Just "getDefaultPort") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "getAllowMinDifficultyBlocks") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "getPowNoRetargetting") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "getPowLimit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "getBip34Block") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BlockHeight, BlockHash))))))) :*: ((((S1 ('MetaSel ('Just "getBip65Height") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockHeight) :*: S1 ('MetaSel ('Just "getBip66Height") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockHeight)) :*: (S1 ('MetaSel ('Just "getTargetTimespan") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "getTargetSpacing") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32))) :*: ((S1 ('MetaSel ('Just "getCheckpoints") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(BlockHeight, BlockHash)]) :*: S1 ('MetaSel ('Just "getBip44Coin") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "getSeeds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String]) :*: S1 ('MetaSel ('Just "getSigHashForkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Word32))))) :*: (((S1 ('MetaSel ('Just "getEdaBlockHeight") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Word32)) :*: S1 ('MetaSel ('Just "getDaaBlockHeight") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Word32))) :*: (S1 ('MetaSel ('Just "getAsertActivationTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Word32)) :*: S1 ('MetaSel ('Just "getAsertHalfLife") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))) :*: ((S1 ('MetaSel ('Just "getSegWit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "getCashAddrPrefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "getBech32Prefix") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "getReplaceByFee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "getHalvingInterval") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32))))))))

btc :: Network Source #

Bitcoin SegWit network. Symbol: BTC.

btcTest :: Network Source #

Testnet for Bitcoin SegWit network.

btcRegTest :: Network Source #

RegTest for Bitcoin SegWit network.

bch :: Network Source #

Bitcoin Cash network. Symbol: BCH.

bchTest :: Network Source #

Testnet for Bitcoin Cash network.

bchRegTest :: Network Source #

RegTest for Bitcoin Cash network.

allNets :: [Network] Source #

List of all networks supported by this library.

netByName :: String -> Maybe Network Source #

Query known networks by name.

netByIdent :: String -> Maybe Network Source #

Query known networks by Haskell identifier.