shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.Credential

Synopsis

Documentation

data Credential (kr ∷ KeyRole) era Source #

Script hash or key hash for a payment or a staking object.

Note that credentials (unlike raw key hashes) do appear to vary from era to era, since they reference the hash of a script, which can change. This parameter is a phantom, however, so in actuality the instances will remain the same.

Constructors

ScriptHashObj !(ScriptHash era) 
KeyHashObj !(KeyHash kr (Crypto era)) 

Instances

Instances details
HasKeyRole Credential Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

coerceKeyRole ∷ ∀ (r ∷ KeyRole) crypto (r' ∷ KeyRole). Credential r crypto → Credential r' crypto Source #

Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

Methods

toExpStakeCreds era → Exp (Map (Credential 'Staking era) SlotNo) Source #

Eq (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

(==)Credential kr era → Credential kr era → Bool #

(/=)Credential kr era → Credential kr era → Bool #

Ord (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

compareCredential kr era → Credential kr era → Ordering #

(<)Credential kr era → Credential kr era → Bool #

(<=)Credential kr era → Credential kr era → Bool #

(>)Credential kr era → Credential kr era → Bool #

(>=)Credential kr era → Credential kr era → Bool #

maxCredential kr era → Credential kr era → Credential kr era #

minCredential kr era → Credential kr era → Credential kr era #

Show (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

showsPrecIntCredential kr era → ShowS #

showCredential kr era → String #

showList ∷ [Credential kr era] → ShowS #

Generic (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Associated Types

type Rep (Credential kr era) ∷ TypeType #

Methods

fromCredential kr era → Rep (Credential kr era) x #

toRep (Credential kr era) x → Credential kr era #

NFData (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

rnfCredential kr era → () #

(Typeable kr, Era era, Typeable (Script era)) ⇒ ToCBOR (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

toCBORCredential kr era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (Credential kr era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Credential kr era] → Size Source #

(Typeable kr, Era era, Typeable (Script era)) ⇒ FromCBOR (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

fromCBORDecoder s (Credential kr era) Source #

labelProxy (Credential kr era) → Text Source #

NoThunks (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

noThunks ∷ Context → Credential kr era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → Credential kr era → IO (Maybe ThunkInfo)

showTypeOfProxy (Credential kr era) → String

Era era ⇒ FromJSON (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

parseJSON ∷ Value → Parser (Credential kr era)

parseJSONList ∷ Value → Parser [Credential kr era]

Era era ⇒ ToJSON (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

toJSONCredential kr era → Value

toEncodingCredential kr era → Encoding

toJSONList ∷ [Credential kr era] → Value

toEncodingList ∷ [Credential kr era] → Encoding

Era era ⇒ FromJSONKey (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

fromJSONKey ∷ FromJSONKeyFunction (Credential kr era)

fromJSONKeyList ∷ FromJSONKeyFunction [Credential kr era]

Era era ⇒ ToJSONKey (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

toJSONKey ∷ ToJSONKeyFunction (Credential kr era)

toJSONKeyList ∷ ToJSONKeyFunction [Credential kr era]

type Rep (Credential kr era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

type Rep (Credential kr era) = D1 ('MetaData "Credential" "Shelley.Spec.Ledger.Credential" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ScriptHashObj" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (ScriptHash era))) :+: C1 ('MetaCons "KeyHashObj" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash kr (Crypto era)))))

newtype GenesisCredential era Source #

Instances

Instances details
Eq (GenesisCredential era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Ord (GenesisCredential era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Show (GenesisCredential era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Generic (GenesisCredential era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Associated Types

type Rep (GenesisCredential era) ∷ TypeType #

Methods

fromGenesisCredential era → Rep (GenesisCredential era) x #

toRep (GenesisCredential era) x → GenesisCredential era #

(Typeable era, Era era) ⇒ ToCBOR (GenesisCredential era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

toCBORGenesisCredential era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (GenesisCredential era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [GenesisCredential era] → Size Source #

type Rep (GenesisCredential era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

type Rep (GenesisCredential era) = D1 ('MetaData "GenesisCredential" "Shelley.Spec.Ledger.Credential" "shelley-spec-ledger-0.1.0.0-inplace" 'True) (C1 ('MetaCons "GenesisCredential" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGenesisCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (KeyHash 'Genesis (Crypto era)))))

data Ptr Source #

Pointer to a slot, transaction index and index in certificate list.

Constructors

Ptr !SlotNo !Ix !Ix 

Instances

Instances details
Eq Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

(==)PtrPtrBool #

(/=)PtrPtrBool #

Ord Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

comparePtrPtrOrdering #

(<)PtrPtrBool #

(<=)PtrPtrBool #

(>)PtrPtrBool #

(>=)PtrPtrBool #

maxPtrPtrPtr #

minPtrPtrPtr #

Show Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

showsPrecIntPtrShowS #

showPtrString #

showList ∷ [Ptr] → ShowS #

Generic Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Associated Types

type Rep PtrTypeType #

Methods

fromPtrRep Ptr x #

toRep Ptr x → Ptr #

NFData Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

rnfPtr → () #

ToCBOR Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

toCBORPtrEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PtrSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Ptr] → Size Source #

FromCBOR Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

NoThunks Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

noThunks ∷ Context → PtrIO (Maybe ThunkInfo)

wNoThunks ∷ Context → PtrIO (Maybe ThunkInfo)

showTypeOfProxy PtrString

FromCBORGroup Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

ToCBORGroup Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

type Rep Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

data StakeReference era Source #

Instances

Instances details
Eq (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

(==)StakeReference era → StakeReference era → Bool #

(/=)StakeReference era → StakeReference era → Bool #

Ord (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Show (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

showsPrecIntStakeReference era → ShowS #

showStakeReference era → String #

showList ∷ [StakeReference era] → ShowS #

Generic (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Associated Types

type Rep (StakeReference era) ∷ TypeType #

Methods

fromStakeReference era → Rep (StakeReference era) x #

toRep (StakeReference era) x → StakeReference era #

NFData (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

rnfStakeReference era → () #

NoThunks (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Methods

noThunks ∷ Context → StakeReference era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → StakeReference era → IO (Maybe ThunkInfo)

showTypeOfProxy (StakeReference era) → String

type Rep (StakeReference era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

type Rep (StakeReference era) = D1 ('MetaData "StakeReference" "Shelley.Spec.Ledger.Credential" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "StakeRefBase" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StakeCredential era))) :+: (C1 ('MetaCons "StakeRefPtr" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ptr)) :+: C1 ('MetaCons "StakeRefNull" 'PrefixI 'False) (U1TypeType)))