| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Transaction.Fields
Description
Typed fields common to transaction and Dijkstra subtransaction bodies.
minimalFields = fields [] []
Synopsis
- data Fields = Fields {
- fieldInputs :: ![Input]
- fieldOutputs :: ![Output]
- fieldInvalidAfter :: !(Maybe Word64)
- fieldCertificates :: !(Maybe Certificates)
- fieldWithdrawals :: !(Maybe (Entries RewardAddress Word64))
- fieldAuxiliaryDataHash :: !(Maybe Hash32)
- fieldInvalidBefore :: !(Maybe Word64)
- fieldMint :: !(Maybe Mint)
- fieldScriptDataHash :: !(Maybe Hash32)
- fieldGuards :: !(Maybe [Credential Guard])
- fieldNetworkId :: !(Maybe BodyNetwork)
- fieldReferenceInputs :: !(Maybe [Input])
- fieldVotingProcedures :: !(Maybe VotingProcedures)
- fieldProposalProcedures :: !(Maybe Proposals)
- fieldTreasuryValue :: !(Maybe Word64)
- fieldDonation :: !(Maybe Word64)
- fieldRequiredTopLevelGuards :: !(Maybe (Entries (Credential Guard) (Maybe EncodedPlutusData)))
- fieldDirectDeposits :: !(Maybe (Entries RewardAddress Word64))
- fieldAccountBalanceIntervals :: !(Maybe (Entries RewardAddress BalanceInterval))
- fields :: [Input] -> [Output] -> Fields
- data Mint
- mkMint :: Value -> Either Error Mint
- mintValue :: Mint -> Value
- data Entries key value
- mkEntries :: Ord key => [(key, value)] -> Either Error (Entries key value)
- entries :: Entries key value -> [(key, value)]
- data BalanceInterval
- = ExactBalance !Word64
- | BalanceRange !(Maybe Word64) !(Maybe Word64)
- data BodyNetwork
Documentation
Shared body data. Collections preserve order and duplicates except unique-key
Entries. Optional values distinguish field absence from present zero/empty.
No fee, collateral or nested subtransactions occur in this shared record.
Constructors
| Fields | |
Fields
| |
fields :: [Input] -> [Output] -> Fields Source #
Required inputs and outputs, with every optional field absent. Lists may be empty: this is structural assembly and does not establish ledger admission.
Signed native-asset mint/burn quantities, each within int64. Ada is excluded. Equality compares normalized quantities; zero entries disappear.
mkMint :: Value -> Either Error Mint Source #
Validate signed native-asset quantities and exclude Ada. Quantity overflow
returns InvalidTransactionOutputValue; Ada returns InvalidTransactionField.
mintValue :: Mint -> Value Source #
Signed asset quantities; positive creates units and negative burns them.
data Entries key value Source #
Nonempty unique-key association. Equality compares keys and values, ignoring insertion order. Construction rejects duplicate keys even when values agree.
mkEntries :: Ord key => [(key, value)] -> Either Error (Entries key value) Source #
Validate a nonempty collection of unique keys. Empty or duplicate-key input
returns InvalidTransactionField. No entry is silently overwritten.
entries :: Entries key value -> [(key, value)] Source #
Entries in ascending key order, independent of insertion order.
data BalanceInterval Source #
Dijkstra account-balance condition, measured in lovelace. Range lower bound is inclusive and upper bound is exclusive; Nothing leaves that side unbounded. Representability does not establish satisfiability against ledger account state.
Constructors
| ExactBalance !Word64 | Require exactly this unsigned 64-bit balance. |
| BalanceRange !(Maybe Word64) !(Maybe Word64) | Inclusive lower bound and exclusive upper bound, respectively. |
Instances
| Show BalanceInterval Source # | |
Defined in Cometa.Internal.TransactionFields Methods showsPrec :: Int -> BalanceInterval -> ShowS # show :: BalanceInterval -> String # showList :: [BalanceInterval] -> ShowS # | |
| Eq BalanceInterval Source # | |
Defined in Cometa.Internal.TransactionFields Methods (==) :: BalanceInterval -> BalanceInterval -> Bool # (/=) :: BalanceInterval -> BalanceInterval -> Bool # | |
data BodyNetwork Source #
Transaction bodies carry one of the two ledger network alternatives.