{-# OPTIONS --safe #-}
open import Ledger.Dijkstra.Specification.Transaction
module Ledger.Dijkstra.Specification.Script.ScriptPurpose (txs : TransactionStructure) where
open import Ledger.Prelude
open TransactionStructure txs
open import Ledger.Dijkstra.Specification.Certs govStructure
data ScriptPurpose : Type where
Cert : DCert → ScriptPurpose
Rwrd : RewardAddress → ScriptPurpose
Mint : ScriptHash → ScriptPurpose
Spend : TxIn → ScriptPurpose
Vote : GovVoter → ScriptPurpose
Propose : GovProposal → ScriptPurpose
Guard : Credential → ScriptPurpose
mutual
record TxInfo : Type where
inductive
field
realizedInputs : UTxO
txOuts : Ix ⇀ TxOut
txFee : Maybe Fees
mint : Value
txCerts : List DCert
txWithdrawals : Withdrawals
txVldt : Maybe Slot × Maybe Slot
vkKey : ℙ KeyHash
txGuards : ℙ Credential
txData : ℙ Datum
txId : TxId
txInfoSubTxs : Maybe (List SubTxInfo)
SubTxInfo : Type
SubTxInfo = TxInfo