shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.Address

Synopsis

Documentation

mkVKeyRwdAcnt :: Crypto crypto => Network -> KeyPair 'Staking crypto -> RewardAcnt crypto Source #

scriptsToAddr :: Crypto crypto => Network -> (MultiSig crypto, MultiSig crypto) -> Addr crypto Source #

Create a base address from a pair of multi-sig scripts (pay and stake)

scriptToCred :: Crypto crypto => MultiSig crypto -> Credential kr crypto Source #

Convert a given multi-sig script to a credential by hashing it and wrapping into the Credential data type.

toAddr :: Crypto crypto => Network -> (KeyPair 'Payment crypto, KeyPair 'Staking crypto) -> Addr crypto Source #

toCred :: Crypto crypto => KeyPair kr crypto -> Credential kr crypto Source #

serialiseAddr :: Addr crypto -> ByteString Source #

Serialise an address to the external format.

deserialiseAddr :: Crypto crypto => ByteString -> Maybe (Addr crypto) Source #

Deserialise an address from the external format. This will fail if the input data is not in the right format (or if there is trailing data).

deserialiseAddrStakeRef :: Crypto crypto => ByteString -> Maybe (StakeReference crypto) Source #

Deserialise a stake refence from a address. This will fail if this is a Bootstrap address (or malformed).

data Addr crypto Source #

An address for UTxO.

Instances

Instances details
Eq (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

(==) :: Addr crypto -> Addr crypto -> Bool #

(/=) :: Addr crypto -> Addr crypto -> Bool #

Ord (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

compare :: Addr crypto -> Addr crypto -> Ordering #

(<) :: Addr crypto -> Addr crypto -> Bool #

(<=) :: Addr crypto -> Addr crypto -> Bool #

(>) :: Addr crypto -> Addr crypto -> Bool #

(>=) :: Addr crypto -> Addr crypto -> Bool #

max :: Addr crypto -> Addr crypto -> Addr crypto #

min :: Addr crypto -> Addr crypto -> Addr crypto #

Show (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

showsPrec :: Int -> Addr crypto -> ShowS #

show :: Addr crypto -> String #

showList :: [Addr crypto] -> ShowS #

Generic (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Associated Types

type Rep (Addr crypto) :: Type -> Type #

Methods

from :: Addr crypto -> Rep (Addr crypto) x #

to :: Rep (Addr crypto) x -> Addr crypto #

NFData (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

rnf :: Addr crypto -> () #

ToJSON (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

toJSON :: Addr crypto -> Value Source #

toEncoding :: Addr crypto -> Encoding Source #

toJSONList :: [Addr crypto] -> Value Source #

toEncodingList :: [Addr crypto] -> Encoding Source #

ToJSONKey (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Crypto crypto => FromJSON (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

parseJSON :: Value -> Parser (Addr crypto) Source #

parseJSONList :: Value -> Parser [Addr crypto] Source #

Crypto crypto => FromJSONKey (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Crypto crypto => ToCBOR (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

toCBOR :: Addr crypto -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Addr crypto) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Addr crypto] -> Size Source #

Crypto crypto => FromCBOR (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

fromCBOR :: Decoder s (Addr crypto) Source #

label :: Proxy (Addr crypto) -> Text Source #

NoThunks (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

type Rep (Addr crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

newtype BootstrapAddress crypto Source #

Instances

Instances details
Eq (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

(==) :: BootstrapAddress crypto -> BootstrapAddress crypto -> Bool #

(/=) :: BootstrapAddress crypto -> BootstrapAddress crypto -> Bool #

Ord (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

compare :: BootstrapAddress crypto -> BootstrapAddress crypto -> Ordering #

(<) :: BootstrapAddress crypto -> BootstrapAddress crypto -> Bool #

(<=) :: BootstrapAddress crypto -> BootstrapAddress crypto -> Bool #

(>) :: BootstrapAddress crypto -> BootstrapAddress crypto -> Bool #

(>=) :: BootstrapAddress crypto -> BootstrapAddress crypto -> Bool #

max :: BootstrapAddress crypto -> BootstrapAddress crypto -> BootstrapAddress crypto #

min :: BootstrapAddress crypto -> BootstrapAddress crypto -> BootstrapAddress crypto #

Show (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

showsPrec :: Int -> BootstrapAddress crypto -> ShowS #

show :: BootstrapAddress crypto -> String #

showList :: [BootstrapAddress crypto] -> ShowS #

Generic (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Associated Types

type Rep (BootstrapAddress crypto) :: Type -> Type #

Methods

from :: BootstrapAddress crypto -> Rep (BootstrapAddress crypto) x #

to :: Rep (BootstrapAddress crypto) x -> BootstrapAddress crypto #

NFData (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

rnf :: BootstrapAddress crypto -> () #

NoThunks (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

type Rep (BootstrapAddress crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

type Rep (BootstrapAddress crypto) = D1 ('MetaData "BootstrapAddress" "Shelley.Spec.Ledger.Address" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "BootstrapAddress" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBootstrapAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address)))

bootstrapAddressAttrsSize :: BootstrapAddress crypto -> Int Source #

The size of the extra attributes in a bootstrp (ie Byron) address. Used to help enforce that people do not post huge ones on the chain.

isBootstrapRedeemer :: Addr crypto -> Bool Source #

Return True if a given address is a redeemer address from the Byron Era

data RewardAcnt crypto Source #

An account based address for rewards

Constructors

RewardAcnt 

Instances

Instances details
Eq (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

(==) :: RewardAcnt crypto -> RewardAcnt crypto -> Bool #

(/=) :: RewardAcnt crypto -> RewardAcnt crypto -> Bool #

Ord (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

compare :: RewardAcnt crypto -> RewardAcnt crypto -> Ordering #

(<) :: RewardAcnt crypto -> RewardAcnt crypto -> Bool #

(<=) :: RewardAcnt crypto -> RewardAcnt crypto -> Bool #

(>) :: RewardAcnt crypto -> RewardAcnt crypto -> Bool #

(>=) :: RewardAcnt crypto -> RewardAcnt crypto -> Bool #

max :: RewardAcnt crypto -> RewardAcnt crypto -> RewardAcnt crypto #

min :: RewardAcnt crypto -> RewardAcnt crypto -> RewardAcnt crypto #

Show (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

showsPrec :: Int -> RewardAcnt crypto -> ShowS #

show :: RewardAcnt crypto -> String #

showList :: [RewardAcnt crypto] -> ShowS #

Generic (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Associated Types

type Rep (RewardAcnt crypto) :: Type -> Type #

Methods

from :: RewardAcnt crypto -> Rep (RewardAcnt crypto) x #

to :: Rep (RewardAcnt crypto) x -> RewardAcnt crypto #

NFData (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

rnf :: RewardAcnt crypto -> () #

ToJSON (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

ToJSONKey (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Crypto crypto => FromJSON (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Crypto crypto => FromJSONKey (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Crypto crypto => ToCBOR (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

toCBOR :: RewardAcnt crypto -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (RewardAcnt crypto) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [RewardAcnt crypto] -> Size Source #

Crypto crypto => FromCBOR (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

fromCBOR :: Decoder s (RewardAcnt crypto) Source #

label :: Proxy (RewardAcnt crypto) -> Text Source #

NoThunks (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

type Rep (RewardAcnt crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

type Rep (RewardAcnt crypto) = D1 ('MetaData "RewardAcnt" "Shelley.Spec.Ledger.Address" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "RewardAcnt" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRwdNetwork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "getRwdCred") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'Staking crypto))))

serialiseRewardAcnt :: RewardAcnt crypto -> ByteString Source #

Serialise a reward account to the external format.

deserialiseRewardAcnt :: Crypto crypto => ByteString -> Maybe (RewardAcnt crypto) Source #

Deserialise an reward account from the external format. This will fail if the input data is not in the right format (or if there is trailing data).

getAddr :: Crypto crypto => Get (Addr crypto) Source #

getKeyHash :: Crypto crypto => Get (Credential kr crypto) Source #

bootstrapKeyHash :: forall crypto. Crypto crypto => BootstrapAddress crypto -> KeyHash 'Payment crypto Source #

getRewardAcnt :: Crypto crypto => Get (RewardAcnt crypto) Source #

getScriptHash :: Crypto crypto => Get (Credential kr crypto) Source #

putAddr :: Addr crypto -> Put Source #

newtype Word7 Source #

Constructors

Word7 Word8 

Instances

Instances details
Eq Word7 Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

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

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

Show Word7 Source # 
Instance details

Defined in Shelley.Spec.Ledger.Address

Methods

showsPrec :: Int -> Word7 -> ShowS #

show :: Word7 -> String #

showList :: [Word7] -> ShowS #