cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Predicate

Synopsis

Documentation

matchesUtxoPredicate :: IsCardanoEra era => UtxoPredicate -> TxOut CtxUTxO era -> Bool Source #

Check if a UTxO entry matches a UtxoPredicate. All present fields are combined with AND logic.

extractAddressesFromPredicate :: UtxoPredicate -> Maybe (Set AddressAny) Source #

Try to extract a set of exact addresses from the predicate for use with QueryUTxOByAddress. Returns Just if the optimization is applicable, Nothing otherwise.

matchesAddressPattern :: IsCardanoEra era => AddressPattern -> AddressInEra era -> Bool Source #

Check if an address matches an AddressPattern. All present fields (exact, payment, delegation) must match (AND logic). Byron addresses only support exact matching; payment/delegation filters reject them.

matchesAssetPattern :: AssetPattern -> Value -> Bool Source #

Check if a Value contains a native asset matching an AssetPattern. Ada entries are always skipped; zero-quantity entries do not match.

matchesTxOutputPattern :: IsCardanoEra era => TxOutputPattern -> TxOut CtxUTxO era -> Bool Source #

Check if a tx output matches a TxOutputPattern. Address and asset filters are combined with AND; absent fields are vacuously true.

matchesAnyUtxoPattern :: IsCardanoEra era => AnyUtxoPattern -> TxOut CtxUTxO era -> Bool Source #

Check if a UTxO entry matches an AnyUtxoPattern. Delegates to the Cardano-specific TxOutputPattern if present.

serialisePaymentCredential :: PaymentCredential -> ByteString Source #

Serialise a PaymentCredential to raw bytes (the key or script hash).

serialiseStakeCredential :: StakeCredential -> ByteString Source #

Serialise a StakeCredential to raw bytes (the key or script hash).