| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Transaction.Input
Description
References to consumed or observed transaction outputs.
firstOutput transactionId = input transactionId 0
Synopsis
- data Input
- input :: TransactionId -> Word64 -> Input
- transactionId :: Input -> TransactionId
- index :: Input -> Word64
- encodeCbor :: Input -> ByteString
- decodeCbor :: ByteString -> Either Error Input
Documentation
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.
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.
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.