| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Protocol.ExUnitPrices
Description
Exact lovelace prices per memory unit and CPU step. Prices may exceed one lovelace. Serialization places memory before steps.
ExUnitPrices price price assembles prices from validated fractions.
Synopsis
Documentation
data ExUnitPrices Source #
Exact nonnegative lovelace costs per memory unit and CPU step.
Constructors
| ExUnitPrices | Assemble validated components. |
Fields
| |
Instances
| Show ExUnitPrices Source # | |
Defined in Cometa.Internal.ProtocolValues Methods showsPrec :: Int -> ExUnitPrices -> ShowS # show :: ExUnitPrices -> String # showList :: [ExUnitPrices] -> ShowS # | |
| Eq ExUnitPrices Source # | |
Defined in Cometa.Internal.ProtocolValues | |
encodeCbor :: ExUnitPrices -> ByteString Source #
Encode a definite-length ledger CBOR value with shortest integer encodings.
decodeCbor :: ByteString -> Either Error ExUnitPrices Source #
Decode exactly one ledger CBOR value. Invalid fields or trailing data return
InvalidProtocolCbor. Nonminimal integers and indefinite arrays
are accepted; output encoding uses definite arrays and shortest integers.