Safe Haskell | None |
---|---|
Language | Haskell98 |
Network specific constants
- data Network = Network {
- getNetworkName :: !String
- getAddrPrefix :: !Word8
- getScriptPrefix :: !Word8
- getSecretPrefix :: !Word8
- getExtPubKeyPrefix :: !Word32
- getExtSecretPrefix :: !Word32
- getNetworkMagic :: !Word32
- getGenesisHeader :: !BlockHeader
- getMaxBlockSize :: !Int
- getMaxSatoshi :: !Word64
- getHaskoinUserAgent :: !ByteString
- getDefaultPort :: !Int
- getAllowMinDifficultyBlocks :: !Bool
- getPowLimit :: !Integer
- getTargetTimespan :: !Word32
- getTargetSpacing :: !Word32
- getCheckpoints :: ![(Int, BlockHash)]
- prodnet :: Network
- testnet3 :: Network
- switchToTestnet3 :: IO ()
- setNetwork :: Network -> IO ()
- getNetwork :: Network
- networkName :: String
- addrPrefix :: Word8
- scriptPrefix :: Word8
- secretPrefix :: Word8
- extPubKeyPrefix :: Word32
- extSecretPrefix :: Word32
- networkMagic :: Word32
- genesisHeader :: BlockHeader
- maxBlockSize :: Int
- maxSatoshi :: Word64
- haskoinUserAgent :: ByteString
- defaultPort :: Int
- allowMinDifficultyBlocks :: Bool
- powLimit :: Integer
- targetTimespan :: Word32
- targetSpacing :: Word32
- checkpoints :: [(Int, BlockHash)]
Data
Network | |
|
Functions
switchToTestnet3 :: IO () Source #
Switch to Testnet3. Do at start of program.
setNetwork :: Network -> IO () Source #
Change network constants manually. If switching to Testnet3, use switchToTestnet3 instead.
getNetwork :: Network Source #
Read current network constants record
Network parameters
networkName :: String Source #
Name of the bitcoin network
addrPrefix :: Word8 Source #
Prefix for base58 PubKey hash address
scriptPrefix :: Word8 Source #
Prefix for base58 script hash address
secretPrefix :: Word8 Source #
Prefix for private key WIF format
extPubKeyPrefix :: Word32 Source #
Prefix for extended public keys (BIP32)
extSecretPrefix :: Word32 Source #
Prefix for extended private keys (BIP32)
networkMagic :: Word32 Source #
Network magic bytes
genesisHeader :: BlockHeader Source #
Genesis block header information
maxBlockSize :: Int Source #
Maximum size of a block in bytes
maxSatoshi :: Word64 Source #
Maximum number of satoshi
haskoinUserAgent :: ByteString Source #
User agent string
defaultPort :: Int Source #
Default port
allowMinDifficultyBlocks :: Bool Source #
Allow relaxed difficulty transition rules
targetTimespan :: Word32 Source #
Time between difficulty cycles (2 weeks on average)
targetSpacing :: Word32 Source #
Time between blocks (10 minutes per block)
checkpoints :: [(Int, BlockHash)] Source #
Checkpoints to enfore