Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- hydraHeadV1AssetName :: AssetName
- hydraMetadataLabel :: Word64
- mkHydraHeadV1TxName :: Text -> TxMetadata
- assetNameToOnChainId :: AssetName -> OnChainId
- onChainIdToAssetName :: OnChainId -> AssetName
- findFirst :: Foldable t => (a -> Maybe b) -> t a -> Maybe b
- verificationKeyToOnChainId :: VerificationKey PaymentKey -> OnChainId
- headTokensFromValue :: PlutusScript -> Value -> [(AssetName, Quantity)]
- splitUTxO :: UTxO -> (UTxO, UTxO)
- adaOnly :: TxOut CtxUTxO -> TxOut CtxUTxO
- extractInlineDatumFromTxOut :: FromData a => TxOut CtxUTxO -> Maybe a
Documentation
hydraHeadV1AssetName :: AssetName Source #
hydraMetadataLabel :: Word64 Source #
The metadata label used for identifying Hydra protocol transactions. As suggested by a friendly large language model: The number most commonly associated with Hydra is 5, as in the mythological creature Hydra, which had multiple heads, and the number 5 often symbolizes multiplicity or diversity. However, there is no specific numerical association for Hydra smaller than 10000 beyond this mythological reference.
mkHydraHeadV1TxName :: Text -> TxMetadata Source #
Create a transaction metadata entry to identify Hydra transactions (for informational purposes).
assetNameToOnChainId :: AssetName -> OnChainId Source #
onChainIdToAssetName :: OnChainId -> AssetName Source #
findFirst :: Foldable t => (a -> Maybe b) -> t a -> Maybe b Source #
Find first occurrence including a transformation.
verificationKeyToOnChainId :: VerificationKey PaymentKey -> OnChainId Source #
Derive the OnChainId
from a Cardano PaymentKey
. The on-chain identifier
is the public key hash as it is also availble to plutus validators.
headTokensFromValue :: PlutusScript -> Value -> [(AssetName, Quantity)] Source #
splitUTxO :: UTxO -> (UTxO, UTxO) Source #
Split a given UTxO into two, such that the second UTxO is non-empty. This is useful to pick a UTxO to decommit.
extractInlineDatumFromTxOut :: FromData a => TxOut CtxUTxO -> Maybe a Source #
Extract the inline datum from a given TxOut
.