cardano-ledger-canonical-state-9.9.9.9: Instaces for working with canonical ledger state representation
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.CanonicalState.BasicTypes

Synopsis

Documentation

data OnChain a Source #

Wrapper type that tells that the type is the type that is kept on-chain for such types we want to keep exactly the same encoding as on the wire.

We still tag the type with an original one to be able to distinguish between them.

Constructors

OnChain 

Fields

Instances

Instances details
DecodeOnChain v a ⇒ FromCanonicalCBOR v (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

ToCanonicalCBOR v (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Methods

toCanonicalCBOR ∷ proxy v → OnChain a → CanonicalEncoding Source #

Generic (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Associated Types

type Rep (OnChain a) 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

type Rep (OnChain a) = D1 ('MetaData "OnChain" "Cardano.Ledger.CanonicalState.BasicTypes" "cardano-ledger-canonical-state-9.9.9.9-inplace" 'False) (C1 ('MetaCons "OnChain" 'PrefixI 'True) (S1 ('MetaSel ('Just "getValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "getWireEncoding") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)))

Methods

fromOnChain a → Rep (OnChain a) x #

toRep (OnChain a) x → OnChain a #

Show a ⇒ Show (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Methods

showsPrecIntOnChain a → ShowS #

showOnChain a → String #

showList ∷ [OnChain a] → ShowS #

Eq a ⇒ Eq (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Methods

(==)OnChain a → OnChain a → Bool #

(/=)OnChain a → OnChain a → Bool #

Ord a ⇒ Ord (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Methods

compareOnChain a → OnChain a → Ordering #

(<)OnChain a → OnChain a → Bool #

(<=)OnChain a → OnChain a → Bool #

(>)OnChain a → OnChain a → Bool #

(>=)OnChain a → OnChain a → Bool #

maxOnChain a → OnChain a → OnChain a #

minOnChain a → OnChain a → OnChain a #

type Rep (OnChain a) Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

type Rep (OnChain a) = D1 ('MetaData "OnChain" "Cardano.Ledger.CanonicalState.BasicTypes" "cardano-ledger-canonical-state-9.9.9.9-inplace" 'False) (C1 ('MetaCons "OnChain" 'PrefixI 'True) (S1 ('MetaSel ('Just "getValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "getWireEncoding") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)))

class DecodeOnChain (v ∷ Symbol) a where Source #

Helper types to encode on-chain types, it's used so it would be possible to pass input bytestring to toPlainDecoder.

Instances

Instances details
(EraTxOut era, EraScript era, TxOut era ~ x) ⇒ DecodeOnChain "utxo/v0" x Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.Namespace.UTxO.V0

newtype CanonicalCoin Source #

Wrapper for the coin type.

Despite the fact that Coin is on-chain type, we do not want to use OnChain wrapper for it. Because it's expected that if we keep chain structure like transaction in canonical state, then we should keep entire structure there and keep that as a whole, like UTxOut.

Constructors

CanonicalCoin 

Fields

Instances

Instances details
Generic CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Associated Types

type Rep CanonicalCoin 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

type Rep CanonicalCoin = D1 ('MetaData "CanonicalCoin" "Cardano.Ledger.CanonicalState.BasicTypes" "cardano-ledger-canonical-state-9.9.9.9-inplace" 'True) (C1 ('MetaCons "CanonicalCoin" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CompactForm Coin))))
Show CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Eq CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

Ord CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

FromCanonicalCBOR v CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

ToCanonicalCBOR v CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

type Rep CanonicalCoin Source # 
Instance details

Defined in Cardano.Ledger.CanonicalState.BasicTypes

type Rep CanonicalCoin = D1 ('MetaData "CanonicalCoin" "Cardano.Ledger.CanonicalState.BasicTypes" "cardano-ledger-canonical-state-9.9.9.9-inplace" 'True) (C1 ('MetaCons "CanonicalCoin" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CompactForm Coin))))

Orphan instances

(Era era, NamespaceEra v ~ era) ⇒ FromCanonicalCBOR v Anchor Source # 
Instance details

(Era era, NamespaceEra v ~ era) ⇒ FromCanonicalCBOR v ScriptHash Source # 
Instance details

FromCanonicalCBOR v SlotNo Source # 
Instance details

(Era era, NamespaceEra v ~ era) ⇒ ToCanonicalCBOR v Anchor Source # 
Instance details

Methods

toCanonicalCBOR ∷ proxy v → AnchorCanonicalEncoding Source #

(Era era, NamespaceEra v ~ era) ⇒ ToCanonicalCBOR v ScriptHash Source # 
Instance details

ToCanonicalCBOR v SlotNo Source # 
Instance details

Methods

toCanonicalCBOR ∷ proxy v → SlotNoCanonicalEncoding Source #

(Era era, NamespaceEra v ~ era, Typeable kr) ⇒ FromCanonicalCBOR v (Credential kr) Source # 
Instance details

(Era era, NamespaceEra v ~ era, Typeable kr) ⇒ FromCanonicalCBOR v (KeyHash kr) Source # 
Instance details

FromCanonicalCBOR v a ⇒ FromCanonicalCBOR v (StrictMaybe a) Source # 
Instance details

(Era era, NamespaceEra v ~ era) ⇒ ToCanonicalCBOR v (Credential kr) Source # 
Instance details

Methods

toCanonicalCBOR ∷ proxy v → Credential kr → CanonicalEncoding Source #

(Era era, NamespaceEra v ~ era) ⇒ ToCanonicalCBOR v (KeyHash kr) Source # 
Instance details

Methods

toCanonicalCBOR ∷ proxy v → KeyHash kr → CanonicalEncoding Source #

ToCanonicalCBOR v a ⇒ ToCanonicalCBOR v (StrictMaybe a) Source # 
Instance details

HashAlgorithm a ⇒ FromCanonicalCBOR v (Hash a b) Source # 
Instance details

ToCanonicalCBOR v (Hash a b) Source # 
Instance details

Methods

toCanonicalCBOR ∷ proxy v → Hash a b → CanonicalEncoding Source #