| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Cardano.Api.Value
Contents
Synopsis
- containsValue :: Value -> Value -> Bool
- minUTxOValue :: PParams LedgerEra -> TxOut CtxTx Era -> Value
- valueSize :: Value -> Int
- fromLedgerValue :: MaryValue -> Value
- fromLedgerMultiAsset :: MultiAsset -> Value
- toLedgerValue :: Value -> MaryValue
- fromPlutusValue :: Value -> Maybe Value
Extras
minUTxOValue :: PParams LedgerEra -> TxOut CtxTx Era -> Value Source #
Calculate minimum ada as Value for a TxOut.
NOTE: This function can throw although you can't tell from the signature.
toLedgerValue can error out with _Illegal Value in TxOut_
Type Conversions
fromLedgerValue :: MaryValue -> Value Source #
fromLedgerMultiAsset :: MultiAsset -> Value Source #
Convert a cardano-ledger MultiAsset into a cardano-api Value. The
cardano-api currently does not have an asset-only type. So this conversion
will construct a Value with no AdaAssetId entry in it.
toLedgerValue :: Value -> MaryValue Source #