Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Ledger.CompactAddress
Contents
Synopsis
- compactAddr :: Addr crypto -> CompactAddr crypto
- decompactAddr :: forall crypto. Crypto crypto => CompactAddr crypto -> Addr crypto
- newtype CompactAddr crypto = UnsafeCompactAddr ShortByteString
- substring :: ShortByteString -> Int -> Int -> ShortByteString
- isPayCredScriptCompactAddr :: CompactAddr crypto -> Bool
- isBootstrapCompactAddr :: CompactAddr crypto -> Bool
- decodeAddr :: forall crypto m. ( Crypto crypto, MonadFail m) => ByteString -> m ( Addr crypto)
- decodeAddrShort :: forall crypto m. ( Crypto crypto, MonadFail m) => ShortByteString -> m ( Addr crypto)
- decodeAddrEither :: forall crypto. Crypto crypto => ByteString -> Either String ( Addr crypto)
- decodeAddrShortEither :: forall crypto. Crypto crypto => ShortByteString -> Either String ( Addr crypto)
- fromCborAddr :: forall crypto s. Crypto crypto => Decoder s ( Addr crypto)
- fromCborBothAddr :: forall crypto s. Crypto crypto => Decoder s ( Addr crypto, CompactAddr crypto)
- fromCborCompactAddr :: forall crypto s. Crypto crypto => Decoder s ( CompactAddr crypto)
- fromCborBackwardsBothAddr :: forall crypto s. Crypto crypto => Decoder s ( Addr crypto, CompactAddr crypto)
- decodeRewardAcnt :: forall crypto b m. ( Crypto crypto, AddressBuffer b, MonadFail m) => b -> m ( RewardAcnt crypto)
- fromCborRewardAcnt :: forall crypto s. Crypto crypto => Decoder s ( RewardAcnt crypto)
- fromCborCompactAddrOld :: forall s crypto. Crypto crypto => Decoder s ( CompactAddr crypto)
- decompactAddrLazy :: forall crypto. Crypto crypto => CompactAddr crypto -> Addr crypto
Documentation
compactAddr :: Addr crypto -> CompactAddr crypto Source #
decompactAddr :: forall crypto. Crypto crypto => CompactAddr crypto -> Addr crypto Source #
newtype CompactAddr crypto Source #
Constructors
UnsafeCompactAddr ShortByteString |
Instances
substring :: ShortByteString -> Int -> Int -> ShortByteString Source #
isPayCredScriptCompactAddr :: CompactAddr crypto -> Bool Source #
Efficiently check whether compated adddress is an address with a credential that is a payment script.
isBootstrapCompactAddr :: CompactAddr crypto -> Bool Source #
Efficiently check whether compated adddress is a Byron address.
decodeAddr :: forall crypto m. ( Crypto crypto, MonadFail m) => ByteString -> m ( Addr crypto) Source #
decodeAddrShort :: forall crypto m. ( Crypto crypto, MonadFail m) => ShortByteString -> m ( Addr crypto) Source #
decodeAddrEither :: forall crypto. Crypto crypto => ByteString -> Either String ( Addr crypto) Source #
decodeAddrShortEither :: forall crypto. Crypto crypto => ShortByteString -> Either String ( Addr crypto) Source #
fromCborBothAddr :: forall crypto s. Crypto crypto => Decoder s ( Addr crypto, CompactAddr crypto) Source #
fromCborCompactAddr :: forall crypto s. Crypto crypto => Decoder s ( CompactAddr crypto) Source #
fromCborBackwardsBothAddr :: forall crypto s. Crypto crypto => Decoder s ( Addr crypto, CompactAddr crypto) Source #
decodeRewardAcnt :: forall crypto b m. ( Crypto crypto, AddressBuffer b, MonadFail m) => b -> m ( RewardAcnt crypto) Source #
fromCborRewardAcnt :: forall crypto s. Crypto crypto => Decoder s ( RewardAcnt crypto) Source #
Exported for benchmarking only
fromCborCompactAddrOld :: forall s crypto. Crypto crypto => Decoder s ( CompactAddr crypto) Source #
decompactAddrLazy :: forall crypto. Crypto crypto => CompactAddr crypto -> Addr crypto Source #
This lazy deserializer is kept around purely for benchmarking, so we can
verify that new deserializer
decodeAddrStateT
is doing the work lazily.