haskoin-core-0.5.2: Bitcoin & Bitcoin Cash library for Haskell

Safe HaskellNone
LanguageHaskell2010

Network.Haskoin.Address

Contents

Synopsis

Documentation

data Address Source #

Address format for Bitcoin and Bitcoin Cash.

Constructors

PubKeyAddress

pay to public key hash (regular)

ScriptAddress

pay to script hash

WitnessPubKeyAddress

pay to witness public key hash

WitnessScriptAddress

pay to witness script hash

Instances
Eq Address Source # 
Instance details

Defined in Network.Haskoin.Address

Methods

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

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

Ord Address Source # 
Instance details

Defined in Network.Haskoin.Address

Read Address Source # 
Instance details

Defined in Network.Haskoin.Address

Show Address Source # 
Instance details

Defined in Network.Haskoin.Address

Generic Address Source # 
Instance details

Defined in Network.Haskoin.Address

Associated Types

type Rep Address :: * -> * #

Methods

from :: Address -> Rep Address x #

to :: Rep Address x -> Address #

ToJSON Address Source # 
Instance details

Defined in Network.Haskoin.Address

NFData Address Source # 
Instance details

Defined in Network.Haskoin.Address

Methods

rnf :: Address -> () #

type Rep Address Source # 
Instance details

Defined in Network.Haskoin.Address

addrToString :: Address -> Maybe Text Source #

Convert address to human-readable string. Uses Base58, Bech32, or CashAddr depending on network.

stringToAddr :: Network -> Text -> Maybe Address Source #

Parse Base58, Bech32 or CashAddr address, depending on network.

addrFromJSON :: Network -> Value -> Parser Address Source #

JSON parsing for Bitcoin addresses. Works with Base58, CashAddr and Bech32.

pubKeyAddr :: Network -> PubKeyI -> Address Source #

Obtain a P2PKH address from a public key.

Private Key Wallet Import Format (WIF)

fromWif :: Network -> Base58 -> Maybe SecKeyI Source #

Decode private key from WIF (wallet import format) string.

toWif :: Network -> SecKeyI -> Base58 Source #

Encode private key into a WIF string.