Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusLedgerApi.V3.Data.Contexts
Contents
Synopsis
- newtype ColdCommitteeCredential = ColdCommitteeCredential Credential
- newtype HotCommitteeCredential = HotCommitteeCredential Credential
- newtype DRepCredential = DRepCredential Credential
- data DRep
- pattern DRep ∷ DRepCredential → DRep
- pattern DRepAlwaysAbstain ∷ DRep
- pattern DRepAlwaysNoConfidence ∷ DRep
- data Delegatee
- pattern DelegStake ∷ PubKeyHash → Delegatee
- pattern DelegVote ∷ DRep → Delegatee
- pattern DelegStakeVote ∷ PubKeyHash → DRep → Delegatee
- data TxCert
- pattern TxCertRegStaking ∷ Credential → Maybe Lovelace → TxCert
- pattern TxCertUnRegStaking ∷ Credential → Maybe Lovelace → TxCert
- pattern TxCertDelegStaking ∷ Credential → Delegatee → TxCert
- pattern TxCertRegDeleg ∷ Credential → Delegatee → Lovelace → TxCert
- pattern TxCertRegDRep ∷ DRepCredential → Lovelace → TxCert
- pattern TxCertUpdateDRep ∷ DRepCredential → TxCert
- pattern TxCertUnRegDRep ∷ DRepCredential → Lovelace → TxCert
- pattern TxCertPoolRegister ∷ PubKeyHash → PubKeyHash → TxCert
- pattern TxCertPoolRetire ∷ PubKeyHash → Integer → TxCert
- pattern TxCertAuthHotCommittee ∷ ColdCommitteeCredential → HotCommitteeCredential → TxCert
- pattern TxCertResignColdCommittee ∷ ColdCommitteeCredential → TxCert
- data Voter
- pattern CommitteeVoter ∷ HotCommitteeCredential → Voter
- pattern DRepVoter ∷ DRepCredential → Voter
- pattern StakePoolVoter ∷ PubKeyHash → Voter
- data Vote
- pattern VoteNo ∷ Vote
- pattern VoteYes ∷ Vote
- pattern Abstain ∷ Vote
- data GovernanceActionId
- pattern GovernanceActionId ∷ TxId → Integer → GovernanceActionId
- gaidTxId ∷ GovernanceActionId → TxId
- gaidGovActionIx ∷ GovernanceActionId → Integer
- data Committee
- pattern Committee ∷ Map ColdCommitteeCredential Integer → Rational → Committee
- committeeMembers ∷ Committee → Map ColdCommitteeCredential Integer
- committeeQuorum ∷ Committee → Rational
- newtype Constitution = Constitution {}
- data ProtocolVersion
- pattern ProtocolVersion ∷ Integer → Integer → ProtocolVersion
- pvMajor ∷ ProtocolVersion → Integer
- pvMinor ∷ ProtocolVersion → Integer
- newtype ChangedParameters = ChangedParameters {}
- data GovernanceAction
- pattern ParameterChange ∷ Maybe GovernanceActionId → ChangedParameters → Maybe ScriptHash → GovernanceAction
- pattern HardForkInitiation ∷ Maybe GovernanceActionId → ProtocolVersion → GovernanceAction
- pattern TreasuryWithdrawals ∷ Map Credential Lovelace → Maybe ScriptHash → GovernanceAction
- pattern NoConfidence ∷ Maybe GovernanceActionId → GovernanceAction
- pattern UpdateCommittee ∷ Maybe GovernanceActionId → List ColdCommitteeCredential → Map ColdCommitteeCredential Integer → Rational → GovernanceAction
- pattern NewConstitution ∷ Maybe GovernanceActionId → Constitution → GovernanceAction
- pattern InfoAction ∷ GovernanceAction
- data ProposalProcedure
- pattern ProposalProcedure ∷ Lovelace → Credential → GovernanceAction → ProposalProcedure
- ppDeposit ∷ ProposalProcedure → Lovelace
- ppReturnAddr ∷ ProposalProcedure → Credential
- ppGovernanceAction ∷ ProposalProcedure → GovernanceAction
- data ScriptPurpose
- pattern Minting ∷ CurrencySymbol → ScriptPurpose
- pattern Spending ∷ TxOutRef → ScriptPurpose
- pattern Rewarding ∷ Credential → ScriptPurpose
- pattern Certifying ∷ Integer → TxCert → ScriptPurpose
- pattern Voting ∷ Voter → ScriptPurpose
- pattern Proposing ∷ Integer → ProposalProcedure → ScriptPurpose
- data ScriptInfo
- pattern MintingScript ∷ CurrencySymbol → ScriptInfo
- pattern SpendingScript ∷ TxOutRef → Maybe Datum → ScriptInfo
- pattern RewardingScript ∷ Credential → ScriptInfo
- pattern CertifyingScript ∷ Integer → TxCert → ScriptInfo
- pattern VotingScript ∷ Voter → ScriptInfo
- pattern ProposingScript ∷ Integer → ProposalProcedure → ScriptInfo
- data TxInInfo
- pattern TxInInfo ∷ TxOutRef → TxOut → TxInInfo
- txInInfoOutRef ∷ TxInInfo → TxOutRef
- txInInfoResolved ∷ TxInInfo → TxOut
- data TxInfo
- pattern TxInfo ∷ List TxInInfo → List TxInInfo → List TxOut → Lovelace → Value → List TxCert → Map Credential Lovelace → POSIXTimeRange → List PubKeyHash → Map ScriptPurpose Redeemer → Map DatumHash Datum → TxId → Map Voter (Map GovernanceActionId Vote) → List ProposalProcedure → Maybe Lovelace → Maybe Lovelace → TxInfo
- txInfoInputs ∷ TxInfo → List TxInInfo
- txInfoReferenceInputs ∷ TxInfo → List TxInInfo
- txInfoOutputs ∷ TxInfo → List TxOut
- txInfoFee ∷ TxInfo → Lovelace
- txInfoMint ∷ TxInfo → Value
- txInfoTxCerts ∷ TxInfo → List TxCert
- txInfoWdrl ∷ TxInfo → Map Credential Lovelace
- txInfoValidRange ∷ TxInfo → POSIXTimeRange
- txInfoSignatories ∷ TxInfo → List PubKeyHash
- txInfoRedeemers ∷ TxInfo → Map ScriptPurpose Redeemer
- txInfoData ∷ TxInfo → Map DatumHash Datum
- txInfoId ∷ TxInfo → TxId
- txInfoVotes ∷ TxInfo → Map Voter (Map GovernanceActionId Vote)
- txInfoProposalProcedures ∷ TxInfo → List ProposalProcedure
- txInfoCurrentTreasuryAmount ∷ TxInfo → Maybe Lovelace
- txInfoTreasuryDonation ∷ TxInfo → Maybe Lovelace
- data ScriptContext
- pattern ScriptContext ∷ TxInfo → Redeemer → ScriptInfo → ScriptContext
- scriptContextTxInfo ∷ ScriptContext → TxInfo
- scriptContextRedeemer ∷ ScriptContext → Redeemer
- scriptContextScriptInfo ∷ ScriptContext → ScriptInfo
- findOwnInput ∷ ScriptContext → Maybe TxInInfo
- findDatum ∷ DatumHash → TxInfo → Maybe Datum
- findDatumHash ∷ Datum → TxInfo → Maybe DatumHash
- findTxInByTxOutRef ∷ TxOutRef → TxInfo → Maybe TxInInfo
- findContinuingOutputs ∷ ScriptContext → List Integer
- getContinuingOutputs ∷ ScriptContext → List TxOut
- txSignedBy ∷ TxInfo → PubKeyHash → Bool
- pubKeyOutputsAt ∷ PubKeyHash → TxInfo → List Value
- valuePaidTo ∷ TxInfo → PubKeyHash → Value
- valueSpent ∷ TxInfo → Value
- valueProduced ∷ TxInfo → Value
- ownCurrencySymbol ∷ ScriptContext → CurrencySymbol
- spendsOutput ∷ TxInfo → TxId → Integer → Bool
Documentation
newtype ColdCommitteeCredential Source #
Constructors
ColdCommitteeCredential Credential |
Instances
newtype HotCommitteeCredential Source #
Constructors
HotCommitteeCredential Credential |
Instances
newtype DRepCredential Source #
Constructors
DRepCredential Credential |
Instances
Instances
pattern DRep ∷ DRepCredential → DRep Source #
pattern DRepAlwaysAbstain ∷ DRep Source #
pattern DRepAlwaysNoConfidence ∷ DRep Source #
Instances
pattern DelegStake ∷ PubKeyHash → Delegatee Source #
pattern DelegStakeVote ∷ PubKeyHash → DRep → Delegatee Source #
Instances
pattern TxCertRegStaking ∷ Credential → Maybe Lovelace → TxCert Source #
pattern TxCertUnRegStaking ∷ Credential → Maybe Lovelace → TxCert Source #
pattern TxCertDelegStaking ∷ Credential → Delegatee → TxCert Source #
pattern TxCertRegDeleg ∷ Credential → Delegatee → Lovelace → TxCert Source #
pattern TxCertRegDRep ∷ DRepCredential → Lovelace → TxCert Source #
pattern TxCertUpdateDRep ∷ DRepCredential → TxCert Source #
pattern TxCertUnRegDRep ∷ DRepCredential → Lovelace → TxCert Source #
pattern TxCertPoolRegister ∷ PubKeyHash → PubKeyHash → TxCert Source #
pattern TxCertPoolRetire ∷ PubKeyHash → Integer → TxCert Source #
pattern TxCertResignColdCommittee ∷ ColdCommitteeCredential → TxCert Source #
Instances
pattern CommitteeVoter ∷ HotCommitteeCredential → Voter Source #
pattern DRepVoter ∷ DRepCredential → Voter Source #
pattern StakePoolVoter ∷ PubKeyHash → Voter Source #
A vote. The optional anchor is omitted.
Instances
data GovernanceActionId Source #
Similar to TxOutRef, but for GovActions
Instances
pattern GovernanceActionId ∷ TxId → Integer → GovernanceActionId Source #
Instances
newtype Constitution Source #
A constitution. The optional anchor is omitted.
Constructors
Constitution | |
Fields |
Instances
data ProtocolVersion Source #
Instances
pattern ProtocolVersion ∷ Integer → Integer → ProtocolVersion Source #
newtype ChangedParameters Source #
A Plutus Data object containing proposed parameter changes. The Data object contains
a Map
with one entry per changed parameter, from the parameter ID to the new value.
Unchanged parameters are not included.
The mapping from parameter IDs to parameters can be found in conway.cddl. -- editorconfig-checker-disable-file
Invariant: This map is non-empty, and the keys are stored in ascending order.
Constructors
ChangedParameters | |
Fields |
Instances
data GovernanceAction Source #
Instances
pattern ParameterChange ∷ Maybe GovernanceActionId → ChangedParameters → Maybe ScriptHash → GovernanceAction Source #
pattern HardForkInitiation ∷ Maybe GovernanceActionId → ProtocolVersion → GovernanceAction Source #
pattern TreasuryWithdrawals ∷ Map Credential Lovelace → Maybe ScriptHash → GovernanceAction Source #
pattern NoConfidence ∷ Maybe GovernanceActionId → GovernanceAction Source #
pattern UpdateCommittee ∷ Maybe GovernanceActionId → List ColdCommitteeCredential → Map ColdCommitteeCredential Integer → Rational → GovernanceAction Source #
pattern NewConstitution ∷ Maybe GovernanceActionId → Constitution → GovernanceAction Source #
pattern InfoAction ∷ GovernanceAction Source #
data ProposalProcedure Source #
A proposal procedure. The optional anchor is omitted.
Instances
pattern ProposalProcedure ∷ Lovelace → Credential → GovernanceAction → ProposalProcedure Source #
data ScriptPurpose Source #
A ScriptPurpose
uniquely identifies a Plutus script within a transaction.
Instances
pattern Minting ∷ CurrencySymbol → ScriptPurpose Source #
pattern Spending ∷ TxOutRef → ScriptPurpose Source #
pattern Rewarding ∷ Credential → ScriptPurpose Source #
pattern Certifying ∷ Integer → TxCert → ScriptPurpose Source #
pattern Voting ∷ Voter → ScriptPurpose Source #
pattern Proposing ∷ Integer → ProposalProcedure → ScriptPurpose Source #
data ScriptInfo Source #
Like ScriptPurpose
but with an optional datum for spending scripts.
Instances
pattern MintingScript ∷ CurrencySymbol → ScriptInfo Source #
pattern SpendingScript ∷ TxOutRef → Maybe Datum → ScriptInfo Source #
pattern RewardingScript ∷ Credential → ScriptInfo Source #
pattern CertifyingScript ∷ Integer → TxCert → ScriptInfo Source #
pattern VotingScript ∷ Voter → ScriptInfo Source #
pattern ProposingScript ∷ Integer → ProposalProcedure → ScriptInfo Source #
An input of a pending transaction.
Instances
TxInfo for PlutusV3
Instances
pattern TxInfo ∷ List TxInInfo → List TxInInfo → List TxOut → Lovelace → Value → List TxCert → Map Credential Lovelace → POSIXTimeRange → List PubKeyHash → Map ScriptPurpose Redeemer → Map DatumHash Datum → TxId → Map Voter (Map GovernanceActionId Vote) → List ProposalProcedure → Maybe Lovelace → Maybe Lovelace → TxInfo Source #
txInfoMint ∷ TxInfo → Value Source #
data ScriptContext Source #
The context that the currently-executing script can access.
Instances
pattern ScriptContext ∷ TxInfo → Redeemer → ScriptInfo → ScriptContext Source #
findOwnInput ∷ ScriptContext → Maybe TxInInfo Source #
Find the input currently being validated.
findDatum ∷ DatumHash → TxInfo → Maybe Datum Source #
Find the data corresponding to a data hash, if there is one
findDatumHash ∷ Datum → TxInfo → Maybe DatumHash Source #
Find the hash of a datum, if it is part of the pending transaction's hashes
findContinuingOutputs ∷ ScriptContext → List Integer Source #
Find the indices of all the outputs that pay to the same script address we are currently spending from, if any.
getContinuingOutputs ∷ ScriptContext → List TxOut Source #
Get all the outputs that pay to the same script address we are currently spending from, if any.
txSignedBy ∷ TxInfo → PubKeyHash → Bool Source #
Check if a transaction was signed by the given public key.
Validator functions
pubKeyOutputsAt ∷ PubKeyHash → TxInfo → List Value Source #
Get the values paid to a public key address by a pending transaction.
valuePaidTo ∷ TxInfo → PubKeyHash → Value Source #
Get the total value paid to a public key address by a pending transaction.
valueSpent ∷ TxInfo → Value Source #
Get the total value of inputs spent by this transaction.
valueProduced ∷ TxInfo → Value Source #
Get the total value of outputs produced by this transaction.
ownCurrencySymbol ∷ ScriptContext → CurrencySymbol Source #
The CurrencySymbol
of the current validator script.