Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Ledger.Binary.Plain
Description
Module that re-exports everythign from `cardano-binary` package.
Everything that gets defined in this module should most likely be migrated to `cardano-binary` package.
Synopsis
- module Cardano.Binary
- module Codec.CBOR.Term
- showDecoderError ∷ Buildable e ⇒ e → String
- invalidKey ∷ ∀ a m. (Typeable a, MonadFail m) ⇒ Word → m a
- decodeRecordNamed ∷ Text → (a → Int) → Decoder s a → Decoder s a
- decodeRecordNamedT ∷ (MonadTrans m, Monad (m (Decoder s))) ⇒ Text → (a → Int) → m (Decoder s) a → m (Decoder s) a
- decodeRecordSum ∷ Text → (Word → Decoder s (Int, a)) → Decoder s a
- decodeListLikeT ∷ (MonadTrans m, Monad (m (Decoder s))) ⇒ Text → m (Decoder s) a → (a → Int → m (Decoder s) ()) → m (Decoder s) a
- serializeAsHexText ∷ ToCBOR a ⇒ a → Text
- decodeFullFromHexText ∷ FromCBOR a ⇒ Text → Either DecoderError a
- encodeEnum ∷ Enum a ⇒ a → Encoding
- decodeEnumBounded ∷ ∀ a s. (Enum a, Bounded a, Typeable a) ⇒ Decoder s a
- withHexText ∷ (ByteString → Either DecoderError b) → Text → Either DecoderError b
- assertTag ∷ Word → Decoder s ()
- decodeTagMaybe ∷ Decoder s (Maybe Word64)
- decodeRationalWithTag ∷ Decoder s Rational
- encodeRatioWithTag ∷ (t → Encoding) → Ratio t → Encoding
- encodeVerKeyDSIGN ∷ DSIGNAlgorithm v ⇒ VerKeyDSIGN v → Encoding
- decodeVerKeyDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (VerKeyDSIGN v)
- encodeSignKeyDSIGN ∷ DSIGNAlgorithm v ⇒ SignKeyDSIGN v → Encoding
- decodeSignKeyDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (SignKeyDSIGN v)
- encodeSigDSIGN ∷ DSIGNAlgorithm v ⇒ SigDSIGN v → Encoding
- decodeSigDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (SigDSIGN v)
- encodeSignedDSIGN ∷ DSIGNAlgorithm v ⇒ SignedDSIGN v a → Encoding
- decodeSignedDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (SignedDSIGN v a)
- encodeVerKeyKES ∷ KESAlgorithm v ⇒ VerKeyKES v → Encoding
- decodeVerKeyKES ∷ KESAlgorithm v ⇒ Decoder s (VerKeyKES v)
- encodeSignKeyKES ∷ (UnsoundKESAlgorithm v, MonadST m, MonadThrow m) ⇒ SignKeyKES v → m Encoding
- decodeSignKeyKES ∷ ∀ v s m. (UnsoundKESAlgorithm v, MonadST m, MonadThrow m) ⇒ Decoder s (m (Maybe (SignKeyKES v)))
- encodeSigKES ∷ KESAlgorithm v ⇒ SigKES v → Encoding
- decodeSigKES ∷ KESAlgorithm v ⇒ Decoder s (SigKES v)
- encodeSignedKES ∷ KESAlgorithm v ⇒ SignedKES v a → Encoding
- decodeSignedKES ∷ KESAlgorithm v ⇒ Decoder s (SignedKES v a)
- encodeVerKeyVRF ∷ VRFAlgorithm v ⇒ VerKeyVRF v → Encoding
- decodeVerKeyVRF ∷ VRFAlgorithm v ⇒ Decoder s (VerKeyVRF v)
- encodeSignKeyVRF ∷ VRFAlgorithm v ⇒ SignKeyVRF v → Encoding
- decodeSignKeyVRF ∷ VRFAlgorithm v ⇒ Decoder s (SignKeyVRF v)
- encodeCertVRF ∷ VRFAlgorithm v ⇒ CertVRF v → Encoding
- decodeCertVRF ∷ VRFAlgorithm v ⇒ Decoder s (CertVRF v)
Documentation
module Cardano.Binary
module Codec.CBOR.Term
showDecoderError ∷ Buildable e ⇒ e → String Source #
invalidKey ∷ ∀ a m. (Typeable a, MonadFail m) ⇒ Word → m a Source #
Report an error when a numeric key of the type constructor doesn't match.
decodeRecordNamedT ∷ (MonadTrans m, Monad (m (Decoder s))) ⇒ Text → (a → Int) → m (Decoder s) a → m (Decoder s) a Source #
serializeAsHexText ∷ ToCBOR a ⇒ a → Text Source #
Encode a type as CBOR and encode it as base16
decodeFullFromHexText ∷ FromCBOR a ⇒ Text → Either DecoderError a Source #
Try decoding base16 encode bytes and then try to decoding them as CBOR
encodeEnum ∷ Enum a ⇒ a → Encoding Source #
withHexText ∷ (ByteString → Either DecoderError b) → Text → Either DecoderError b Source #
decodeRationalWithTag ∷ Decoder s Rational Source #
Enforces tag 30 to indicate a rational number, as per tag assignment: https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml
DSIGN
encodeVerKeyDSIGN ∷ DSIGNAlgorithm v ⇒ VerKeyDSIGN v → Encoding Source #
decodeVerKeyDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (VerKeyDSIGN v) Source #
encodeSignKeyDSIGN ∷ DSIGNAlgorithm v ⇒ SignKeyDSIGN v → Encoding Source #
decodeSignKeyDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (SignKeyDSIGN v) Source #
encodeSigDSIGN ∷ DSIGNAlgorithm v ⇒ SigDSIGN v → Encoding Source #
decodeSigDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (SigDSIGN v) Source #
encodeSignedDSIGN ∷ DSIGNAlgorithm v ⇒ SignedDSIGN v a → Encoding Source #
decodeSignedDSIGN ∷ DSIGNAlgorithm v ⇒ Decoder s (SignedDSIGN v a) Source #
KES
encodeVerKeyKES ∷ KESAlgorithm v ⇒ VerKeyKES v → Encoding Source #
decodeVerKeyKES ∷ KESAlgorithm v ⇒ Decoder s (VerKeyKES v) Source #
encodeSignKeyKES ∷ (UnsoundKESAlgorithm v, MonadST m, MonadThrow m) ⇒ SignKeyKES v → m Encoding Source #
decodeSignKeyKES ∷ ∀ v s m. (UnsoundKESAlgorithm v, MonadST m, MonadThrow m) ⇒ Decoder s (m (Maybe (SignKeyKES v))) Source #
encodeSigKES ∷ KESAlgorithm v ⇒ SigKES v → Encoding Source #
decodeSigKES ∷ KESAlgorithm v ⇒ Decoder s (SigKES v) Source #
encodeSignedKES ∷ KESAlgorithm v ⇒ SignedKES v a → Encoding Source #
decodeSignedKES ∷ KESAlgorithm v ⇒ Decoder s (SignedKES v a) Source #
VRF
encodeVerKeyVRF ∷ VRFAlgorithm v ⇒ VerKeyVRF v → Encoding Source #
decodeVerKeyVRF ∷ VRFAlgorithm v ⇒ Decoder s (VerKeyVRF v) Source #
encodeSignKeyVRF ∷ VRFAlgorithm v ⇒ SignKeyVRF v → Encoding Source #
decodeSignKeyVRF ∷ VRFAlgorithm v ⇒ Decoder s (SignKeyVRF v) Source #
encodeCertVRF ∷ VRFAlgorithm v ⇒ CertVRF v → Encoding Source #
decodeCertVRF ∷ VRFAlgorithm v ⇒ Decoder s (CertVRF v) Source #