cardano-ledger-binary-1.3.3.0: Binary serialization library used throughout ledger
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Binary.Encoding.EncCBOR

Synopsis

Documentation

class Typeable a ⇒ EncCBOR a where Source #

Minimal complete definition

Nothing

Methods

encCBOR ∷ a → Encoding Source #

default encCBORToCBOR a ⇒ a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy a → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [a] → Size Source #

Instances

Instances details
EncCBOR Void Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVoidEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy VoidSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Void] → Size Source #

EncCBOR Int16 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORInt16Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Int16Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Int16] → Size Source #

EncCBOR Int32 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORInt32Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Int32Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Int32] → Size Source #

EncCBOR Int64 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORInt64Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Int64Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Int64] → Size Source #

EncCBOR Int8 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORInt8Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Int8Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Int8] → Size Source #

EncCBOR Word16 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWord16Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Word16Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Word16] → Size Source #

EncCBOR Word32 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWord32Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Word32Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Word32] → Size Source #

EncCBOR Word64 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWord64Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Word64Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Word64] → Size Source #

EncCBOR Word8 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWord8Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy Word8Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Word8] → Size Source #

EncCBOR ByteString Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORByteStringEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ByteStringSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ByteString] → Size Source #

EncCBOR ByteString Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORByteStringEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ByteStringSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ByteString] → Size Source #

EncCBOR ShortByteString Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR Proof Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORProofEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ProofSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Proof] → Size Source #

EncCBOR SignKey Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SignKeySize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SignKey] → Size Source #

EncCBOR VerKey Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy VerKeySize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [VerKey] → Size Source #

EncCBOR PreEncoded Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORPreEncodedEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy PreEncodedSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [PreEncoded] → Size Source #

EncCBOR Encoding Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREncodingEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EncodingSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Encoding] → Size Source #

EncCBOR Version Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVersionEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy VersionSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Version] → Size Source #

EncCBOR BlockNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORBlockNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy BlockNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [BlockNo] → Size Source #

EncCBOR EpochInterval Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR EpochNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREpochNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EpochNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [EpochNo] → Size Source #

EncCBOR EpochSize Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREpochSizeEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EpochSizeSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [EpochSize] → Size Source #

EncCBOR SlotNo Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSlotNoEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SlotNoSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SlotNo] → Size Source #

EncCBOR SystemStart Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSystemStartEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SystemStartSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SystemStart] → Size Source #

EncCBOR ByteArray Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORByteArrayEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ByteArraySize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ByteArray] → Size Source #

EncCBOR SlicedByteArray Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR Encoding Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREncodingEncoding0 Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy EncodingSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Encoding] → Size Source #

EncCBOR Term Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORTermEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy TermSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Term] → Size Source #

EncCBOR ByteArray Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORByteArrayEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ByteArraySize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ByteArray] → Size Source #

EncCBOR IPv4 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORIPv4Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy IPv4Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [IPv4] → Size Source #

EncCBOR IPv6 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORIPv6Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy IPv6Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [IPv6] → Size Source #

EncCBOR Data Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORDataEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy DataSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Data] → Size Source #

EncCBOR ScriptContext Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR ScriptContext Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR ScriptContext Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR Text Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORTextEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy TextSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Text] → Size Source #

EncCBOR UTCTime Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORUTCTimeEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy UTCTimeSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [UTCTime] → Size Source #

EncCBOR Integer Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORIntegerEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy IntegerSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Integer] → Size Source #

EncCBOR Natural Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORNaturalEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy NaturalSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Natural] → Size Source #

EncCBOR () Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ () → Encoding Source #

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

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

EncCBOR Bool Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORBoolEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy BoolSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Bool] → Size Source #

EncCBOR Double Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORDoubleEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy DoubleSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Double] → Size Source #

EncCBOR Float Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORFloatEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy FloatSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Float] → Size Source #

EncCBOR Int Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORIntEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy IntSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Int] → Size Source #

EncCBOR Word Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWordEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy WordSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Word] → Size Source #

EncCBOR a ⇒ EncCBOR (Ratio a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORRatio a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Ratio a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Ratio a] → Size Source #

DSIGNAlgorithm v ⇒ EncCBOR (SigDSIGN v) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSigDSIGN v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SigDSIGN v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SigDSIGN v] → Size Source #

DSIGNAlgorithm v ⇒ EncCBOR (SignKeyDSIGN v) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyDSIGN v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SignKeyDSIGN v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SignKeyDSIGN v] → Size Source #

DSIGNAlgorithm v ⇒ EncCBOR (VerKeyDSIGN v) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyDSIGN v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (VerKeyDSIGN v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [VerKeyDSIGN v] → Size Source #

DSIGNAlgorithm d ⇒ EncCBOR (SigKES (CompactSingleKES d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

(OptimizedKESAlgorithm d, HashAlgorithm h) ⇒ EncCBOR (SigKES (CompactSumKES h d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSigKES (CompactSumKES h d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SigKES (CompactSumKES h d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SigKES (CompactSumKES h d)] → Size Source #

KnownNat t ⇒ EncCBOR (SigKES (MockKES t)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSigKES (MockKES t) → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (SigKES (MockKES t)) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [SigKES (MockKES t)] → Size Source #

(DSIGNAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ EncCBOR (SigKES (SimpleKES d t)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSigKES (SimpleKES d t) → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (SigKES (SimpleKES d t)) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [SigKES (SimpleKES d t)] → Size Source #

DSIGNAlgorithm d ⇒ EncCBOR (SigKES (SingleKES d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSigKES (SingleKES d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SigKES (SingleKES d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SigKES (SingleKES d)] → Size Source #

(KESAlgorithm d, HashAlgorithm h) ⇒ EncCBOR (SigKES (SumKES h d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSigKES (SumKES h d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SigKES (SumKES h d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SigKES (SumKES h d)] → Size Source #

DSIGNAlgorithm d ⇒ EncCBOR (SignKeyKES (CompactSingleKES d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

(OptimizedKESAlgorithm d, HashAlgorithm h) ⇒ EncCBOR (SignKeyKES (CompactSumKES h d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyKES (CompactSumKES h d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SignKeyKES (CompactSumKES h d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SignKeyKES (CompactSumKES h d)] → Size Source #

KnownNat t ⇒ EncCBOR (SignKeyKES (MockKES t)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyKES (MockKES t) → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (SignKeyKES (MockKES t)) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [SignKeyKES (MockKES t)] → Size Source #

(DSIGNAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ EncCBOR (SignKeyKES (SimpleKES d t)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyKES (SimpleKES d t) → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (SignKeyKES (SimpleKES d t)) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [SignKeyKES (SimpleKES d t)] → Size Source #

DSIGNAlgorithm d ⇒ EncCBOR (SignKeyKES (SingleKES d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyKES (SingleKES d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SignKeyKES (SingleKES d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SignKeyKES (SingleKES d)] → Size Source #

(KESAlgorithm d, HashAlgorithm h) ⇒ EncCBOR (SignKeyKES (SumKES h d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignKeyKES (SumKES h d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SignKeyKES (SumKES h d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SignKeyKES (SumKES h d)] → Size Source #

DSIGNAlgorithm d ⇒ EncCBOR (VerKeyKES (CompactSingleKES d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

(OptimizedKESAlgorithm d, HashAlgorithm h) ⇒ EncCBOR (VerKeyKES (CompactSumKES h d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyKES (CompactSumKES h d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (VerKeyKES (CompactSumKES h d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [VerKeyKES (CompactSumKES h d)] → Size Source #

KnownNat t ⇒ EncCBOR (VerKeyKES (MockKES t)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyKES (MockKES t) → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (VerKeyKES (MockKES t)) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [VerKeyKES (MockKES t)] → Size Source #

(DSIGNAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ EncCBOR (VerKeyKES (SimpleKES d t)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyKES (SimpleKES d t) → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (VerKeyKES (SimpleKES d t)) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [VerKeyKES (SimpleKES d t)] → Size Source #

DSIGNAlgorithm d ⇒ EncCBOR (VerKeyKES (SingleKES d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyKES (SingleKES d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (VerKeyKES (SingleKES d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [VerKeyKES (SingleKES d)] → Size Source #

(KESAlgorithm d, HashAlgorithm h) ⇒ EncCBOR (VerKeyKES (SumKES h d)) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVerKeyKES (SumKES h d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (VerKeyKES (SumKES h d)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [VerKeyKES (SumKES h d)] → Size Source #

EncCBOR (CertVRF MockVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORCertVRF MockVRFEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (CertVRF MockVRF) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [CertVRF MockVRF] → Size Source #

EncCBOR (CertVRF SimpleVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR (CertVRF PraosVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Typeable v ⇒ EncCBOR (OutputVRF v) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOROutputVRF v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (OutputVRF v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [OutputVRF v] → Size Source #

EncCBOR (SignKeyVRF MockVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR (SignKeyVRF SimpleVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR (SignKeyVRF PraosVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR (VerKeyVRF MockVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR (VerKeyVRF SimpleVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR (VerKeyVRF PraosVRF) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

EncCBOR a ⇒ EncCBOR (Sized a) Source #

Discards the size.

Instance details

Defined in Cardano.Ledger.Binary.Decoding.Sized

Methods

encCBORSized a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Sized a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Sized a] → Size Source #

Typeable xs ⇒ EncCBOR (LengthOf xs) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORLengthOf xs → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (LengthOf xs) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [LengthOf xs] → Size Source #

EncCBORGroup a ⇒ EncCBOR (CBORGroup a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Group

Methods

encCBORCBORGroup a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (CBORGroup a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [CBORGroup a] → Size Source #

(Serialise t, Typeable t) ⇒ EncCBOR (WithOrigin t) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORWithOrigin t → Encoding Source #

encodedSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy (WithOrigin t) → Size Source #

encodedListSizeExpr ∷ (∀ t0. EncCBOR t0 ⇒ Proxy t0 → Size) → Proxy [WithOrigin t] → Size Source #

EncCBOR a ⇒ EncCBOR (StrictMaybe a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORStrictMaybe a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (StrictMaybe a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [StrictMaybe a] → Size Source #

EncCBOR a ⇒ EncCBOR (StrictSeq a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORStrictSeq a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (StrictSeq a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [StrictSeq a] → Size Source #

EncCBOR a ⇒ EncCBOR (Seq a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSeq a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Seq a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Seq a] → Size Source #

(Ord a, EncCBOR a) ⇒ EncCBOR (Set a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSet a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Set a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Set a] → Size Source #

EncCBOR a ⇒ EncCBOR (Vector a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVector a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Vector a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Vector a] → Size Source #

(EncCBOR a, Prim a) ⇒ EncCBOR (Vector a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVector a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Vector a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Vector a] → Size Source #

(EncCBOR a, Storable a) ⇒ EncCBOR (Vector a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVector a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Vector a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Vector a] → Size Source #

(EncCBOR a, Unbox a) ⇒ EncCBOR (Vector a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVector a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Vector a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Vector a] → Size Source #

EncCBOR a ⇒ EncCBOR (NonEmpty a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORNonEmpty a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (NonEmpty a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [NonEmpty a] → Size Source #

EncCBOR a ⇒ EncCBOR (Maybe a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORMaybe a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Maybe a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Maybe a] → Size Source #

EncCBOR a ⇒ EncCBOR [a] Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ [a] → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [a] → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [[a]] → Size Source #

(EncCBOR a, EncCBOR b) ⇒ EncCBOR (Either a b) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOREither a b → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Either a b) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Either a b] → Size Source #

Typeable p ⇒ EncCBOR (Fixed p) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORFixed p → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Fixed p) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Fixed p] → Size Source #

(DSIGNAlgorithm v, Typeable a) ⇒ EncCBOR (SignedDSIGN v a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSignedDSIGN v a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (SignedDSIGN v a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SignedDSIGN v a] → Size Source #

(HashAlgorithm h, Typeable a) ⇒ EncCBOR (Hash h a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORHash h a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Hash h a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Hash h a] → Size Source #

(VRFAlgorithm v, Typeable a) ⇒ EncCBOR (CertifiedVRF v a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORCertifiedVRF v a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (CertifiedVRF v a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [CertifiedVRF v a] → Size Source #

(Ord k, EncCBOR k, EncCBOR v) ⇒ EncCBOR (Map k v) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORMap k v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Map k v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Map k v] → Size Source #

EncCBOR (TokensTokens) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (TokensTokens) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (TokensTokens) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TokensTokens] → Size Source #

(EncCBOR a, EncCBOR b) ⇒ EncCBOR (a, b) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (a, b) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (a, b) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [(a, b)] → Size Source #

(Typeable s, EncCBOR a) ⇒ EncCBOR (Tagged s a) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORTagged s a → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Tagged s a) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Tagged s a] → Size Source #

(EncCBOR a, EncCBOR b, EncCBOR c) ⇒ EncCBOR (a, b, c) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (a, b, c) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (a, b, c) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [(a, b, c)] → Size Source #

(Ord k, EncCBOR k, EncCBOR v, Vector kv k, Vector vv v, Typeable kv, Typeable vv) ⇒ EncCBOR (VMap kv vv k v) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORVMap kv vv k v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (VMap kv vv k v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [VMap kv vv k v] → Size Source #

(EncCBOR a, EncCBOR b, EncCBOR c, EncCBOR d) ⇒ EncCBOR (a, b, c, d) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (a, b, c, d) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (a, b, c, d) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [(a, b, c, d)] → Size Source #

(EncCBOR a, EncCBOR b, EncCBOR c, EncCBOR d, EncCBOR e) ⇒ EncCBOR (a, b, c, d, e) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (a, b, c, d, e) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (a, b, c, d, e) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [(a, b, c, d, e)] → Size Source #

(EncCBOR a, EncCBOR b, EncCBOR c, EncCBOR d, EncCBOR e, EncCBOR f) ⇒ EncCBOR (a, b, c, d, e, f) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (a, b, c, d, e, f) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (a, b, c, d, e, f) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [(a, b, c, d, e, f)] → Size Source #

(EncCBOR a, EncCBOR b, EncCBOR c, EncCBOR d, EncCBOR e, EncCBOR f, EncCBOR g) ⇒ EncCBOR (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBOR ∷ (a, b, c, d, e, f, g) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (a, b, c, d, e, f, g) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [(a, b, c, d, e, f, g)] → Size Source #

withWordSize ∷ (Integral s, Integral a) ⇒ s → a Source #

Compute encoded size of an integer

newtype PreEncoded Source #

Constructors

PreEncoded 

Instances

Instances details
EncCBOR PreEncoded Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORPreEncodedEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy PreEncodedSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [PreEncoded] → Size Source #

toByronCBOREncCBOR a ⇒ a → Encoding Source #

Convert a versioned EncCBOR instance to a plain Encoding using Byron protocol version.

Size of expressions

data Range b Source #

A range of values. Should satisfy the invariant forall x. lo x <= hi x.

Constructors

Range 

Fields

  • lo ∷ b
     
  • hi ∷ b
     

Instances

Instances details
(Ord b, Num b) ⇒ Num (Range b) Source #

The Num instance for Range uses interval arithmetic. Note that the signum method is not lawful: if the interval x includes 0 in its interior but is not symmetric about 0, then abs x * signum x /= x.

Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

(+)Range b → Range b → Range b Source #

(-)Range b → Range b → Range b Source #

(*)Range b → Range b → Range b Source #

negateRange b → Range b Source #

absRange b → Range b Source #

signumRange b → Range b Source #

fromIntegerIntegerRange b Source #

Buildable (Range Natural) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

szEval ∷ (∀ t. EncCBOR t ⇒ (Proxy t → Size) → Proxy t → Range Natural) → SizeRange Natural Source #

Fully evaluate a size expression by applying the given function to any suspended computations. szEval g effectively turns each "thunk" of the form TodoF f x into g x, then evaluates the result.

type Size = Fix SizeF Source #

Expressions describing the statically-computed size bounds on a type's possible values.

data Case t Source #

An individual labeled case.

Constructors

Case Text t 

Instances

Instances details
Functor Case Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

fmap ∷ (a → b) → Case a → Case b Source #

(<$) ∷ a → Case b → Case a Source #

Buildable t ⇒ Buildable (Case t) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

buildCase t → Builder Source #

caseValueCase t → t Source #

Discard the label on a case.

newtype LengthOf xs Source #

A type used to represent the length of a value in Size computations.

Constructors

LengthOf xs 

Instances

Instances details
Typeable xs ⇒ EncCBOR (LengthOf xs) Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORLengthOf xs → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (LengthOf xs) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [LengthOf xs] → Size Source #

data SizeOverride Source #

Override mechanisms to be used with szWithCtx.

Constructors

SizeConstant Size

Replace with a fixed Size.

SizeExpression ((∀ a. EncCBOR a ⇒ Proxy a → Size) → Size)

Recursively compute the size.

SelectCases [Text]

Select only a specific case from a CasesF.

isTodoSizeBool Source #

Is this expression a thunk?

szCases ∷ [Case Size] → Size Source #

Create a case expression from individual cases.

szLazyEncCBOR a ⇒ Proxy a → Size Source #

Evaluate the expression lazily, by immediately creating a thunk that will evaluate its contents lazily.

ghci> putStrLn $ pretty $ szLazy (Proxy @TxAux)
(_ :: TxAux)

szGreedyEncCBOR a ⇒ Proxy a → Size Source #

Evaluate an expression greedily. There may still be thunks in the result, for types that did not provide a custom encodedSizeExpr method in their EncCBOR instance.

ghci> putStrLn $ pretty $ szGreedy (Proxy @TxAux)
(0 + { TxAux=(2 + ((0 + (((1 + (2 + ((_ :: LengthOf [TxIn]) * (2 + { TxInUtxo=(2 + ((1 + 34) + { minBound=1 maxBound=5 })) })))) + (2 + ((_ :: LengthOf [TxOut]) * (0 + { TxOut=(2 + ((0 + ((2 + ((2 + withWordSize((((1 + 30) + (_ :: Attributes AddrAttributes)) + 1))) + (((1 + 30) + (_ :: Attributes AddrAttributes)) + 1))) + { minBound=1 maxBound=5 })) + { minBound=1 maxBound=9 })) })))) + (_ :: Attributes ()))) + (_ :: Vector TxInWitness))) })

szForceSizeSize Source #

Force any thunks in the given Size expression.

ghci> putStrLn $ pretty $ szForce $ szLazy (Proxy @TxAux)
(0 + { TxAux=(2 + ((0 + (_ :: Tx)) + (_ :: Vector TxInWitness))) })

szWithCtxEncCBOR a ⇒ Map TypeRep SizeOverrideProxy a → Size Source #

Greedily compute the size bounds for a type, using the given context to override sizes for specific types.

szSimplifySizeEither Size (Range Natural) Source #

Simplify the given Size, resulting in either the simplified Size or, if it was fully simplified, an explicit upper and lower bound.

apMonoText → (NaturalNatural) → SizeSize Source #

Apply a monotonically increasing function to the expression. There are three cases when applying f to a Size expression: * When applied to a value x, compute f x. * When applied to cases, apply to each case individually. * In all other cases, create a deferred application of f.

Crypto

encodedVerKeyDSIGNSizeExpr ∷ ∀ v. DSIGNAlgorithm v ⇒ Proxy (VerKeyDSIGN v) → Size Source #

Size expression for VerKeyDSIGN which is using sizeVerKeyDSIGN encoded as Size.

encodedSignKeyDSIGNSizeExpr ∷ ∀ v. DSIGNAlgorithm v ⇒ Proxy (SignKeyDSIGN v) → Size Source #

Size expression for SignKeyDSIGN which is using sizeSignKeyDSIGN encoded as Size.

encodedSigDSIGNSizeExpr ∷ ∀ v. DSIGNAlgorithm v ⇒ Proxy (SigDSIGN v) → Size Source #

Size expression for SigDSIGN which is using sizeSigDSIGN encoded as Size.

encodedVerKeyKESSizeExpr ∷ ∀ v. KESAlgorithm v ⇒ Proxy (VerKeyKES v) → Size Source #

Size expression for VerKeyKES which is using sizeVerKeyKES encoded as Size.

encodedSignKeyKESSizeExpr ∷ ∀ v. KESAlgorithm v ⇒ Proxy (SignKeyKES v) → Size Source #

Size expression for SignKeyKES which is using sizeSignKeyKES encoded as Size.

encodedSigKESSizeExpr ∷ ∀ v. KESAlgorithm v ⇒ Proxy (SigKES v) → Size Source #

Size expression for SigKES which is using sizeSigKES encoded as Size.

encodedVerKeyVRFSizeExpr ∷ ∀ v. VRFAlgorithm v ⇒ Proxy (VerKeyVRF v) → Size Source #

Size expression for VerKeyVRF which is using sizeVerKeyVRF encoded as Size.

encodedSignKeyVRFSizeExpr ∷ ∀ v. VRFAlgorithm v ⇒ Proxy (SignKeyVRF v) → Size Source #

Size expression for SignKeyVRF which is using sizeSignKeyVRF encoded as Size

encodedCertVRFSizeExpr ∷ ∀ v. VRFAlgorithm v ⇒ Proxy (CertVRF v) → Size Source #

Size expression for CertVRF which is using sizeCertVRF encoded as Size.