cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.Address

Description

Addresses across Shelley, Byron and reward-account forms. This sum retains each family's validated representation; it does not establish whether an address is an admissible transaction output for a particular ledger era.

import qualified Cometa.Address as Address

normalize text = Address.toText $ Address.fromText text
Synopsis

Documentation

data Address Source #

Address families. Equality and ordering compare constructors then values; use toBytes when serialization order is required.

Constructors

ShelleyAddress !Address

Base, enterprise or pointer payment address.

ByronAddress !Address

Historical bootstrap address.

RewardAddress !RewardAddress

Reward account; assembly does not imply output admissibility.

Instances

Instances details
Show Address Source # 
Instance details

Defined in Cometa.Address

Eq Address Source # 
Instance details

Defined in Cometa.Address

Methods

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

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

Ord Address Source # 
Instance details

Defined in Cometa.Address

fromBytes :: ByteString -> Either Error Address Source #

Decode the complete address according to its header. Validation errors retain the corresponding family's structured error.

toBytes :: Address -> ByteString Source #

Exact validated address bytes.

fromText :: Text -> Either Error Address Source #

Decode Bech32 payment/reward forms or Base58 bootstrap addresses.

toText :: Address -> Text Source #

Bech32 for Shelley/reward addresses and Base58 for Byron addresses.