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

Cometa.Transaction.Input

Description

References to consumed or observed transaction outputs.

firstOutput transactionId = input transactionId 0
Synopsis

Documentation

data Input Source #

Output identity. Ordering compares transaction hash bytes then numeric index. An index occupies the native unsigned 64-bit range; assembly does not establish that the referenced output exists or is spendable in a particular ledger era.

Instances

Instances details
Show Input Source # 
Instance details

Defined in Cometa.Transaction.Input

Methods

showsPrec :: Int -> Input -> ShowS #

show :: Input -> String #

showList :: [Input] -> ShowS #

Eq Input Source # 
Instance details

Defined in Cometa.Transaction.Input

Methods

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

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

Ord Input Source # 
Instance details

Defined in Cometa.Transaction.Input

Methods

compare :: Input -> Input -> Ordering #

(<) :: Input -> Input -> Bool #

(<=) :: Input -> Input -> Bool #

(>) :: Input -> Input -> Bool #

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

max :: Input -> Input -> Input #

min :: Input -> Input -> Input #

input :: TransactionId -> Word64 -> Input Source #

Reference an output by transaction-body hash and zero-based output index.

transactionId :: Input -> TransactionId Source #

Hash of the transaction that created the output.

index :: Input -> Word64 Source #

Zero-based output index, from zero through 2^64 - 1.

encodeCbor :: Input -> ByteString Source #

Fresh two-element CBOR array with exact hash bytes and shortest index.

decodeCbor :: ByteString -> Either Error Input Source #

Decode one definite or indefinite pair, requiring a 32-byte hash and uint64 index. Malformed input, extra fields and trailing bytes return InvalidTransactionCbor.