cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.Transaction.Utxo

Description

An unspent-output snapshot pairs a reference with its resolved output. Construction does not query chain state or prove that the output is unspent.

resolved reference output = utxo reference output
Synopsis

Documentation

data Utxo Source #

Owned resolved reference and semantic output. Equality compares both fields.

Instances

Instances details
Show Utxo Source # 
Instance details

Defined in Cometa.Transaction.Utxo

Methods

showsPrec :: Int -> Utxo -> ShowS #

show :: Utxo -> String #

showList :: [Utxo] -> ShowS #

Eq Utxo Source # 
Instance details

Defined in Cometa.Transaction.Utxo

Methods

(==) :: Utxo -> Utxo -> Bool #

(/=) :: Utxo -> Utxo -> Bool #

utxo :: Input -> Output -> Utxo Source #

Assemble a resolved reference and its output without chain-state validation.

input :: Utxo -> Input Source #

Reference identifying the resolved output.

output :: Utxo -> Output Source #

Resolved semantic output; inspecting it has no chain or native effects.

encodeCbor :: Utxo -> ByteString Source #

Fresh native UTxO pair [input, output]. This is a snapshot interchange encoding, not an on-chain transaction-body field.

decodeCbor :: ByteString -> Either Error Utxo Source #

Decode a complete definite or indefinite pair through the public input and output schemas. Malformed data and trailing bytes return structured errors. This snapshot API inspects semantic outputs; use an enclosing exact transaction or EncodedOutput when preserving signed-body identity is required.