Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 #
Instances
newtype HotCommitteeCredential Source #
Instances
newtype DRepCredential Source #
Instances
Instances
Generic DRep Source # | |
Show DRep Source # | |
Eq DRep Source # | |
Eq DRep Source # | |
FromData DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
ToData DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
UnsafeFromData DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty DRep Source # | |
Lift DefaultUni DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts lift ∷ DRep → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
Typeable DefaultUni DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts typeRep ∷ Proxy DRep → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # | |
type Rep DRep Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts type Rep DRep = D1 ('MetaData "DRep" "PlutusLedgerApi.V3.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "DRep_6989586621680846073" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) |
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
Generic Voter Source # | |
Show Voter Source # | |
Eq Voter Source # | |
Eq Voter Source # | |
FromData Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
ToData Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
UnsafeFromData Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty Voter Source # | |
Lift DefaultUni Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts lift ∷ Voter → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
Typeable DefaultUni Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts typeRep ∷ Proxy Voter → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # | |
type Rep Voter Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts type Rep Voter = D1 ('MetaData "Voter" "PlutusLedgerApi.V3.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "Voter_6989586621680850282" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) |
pattern CommitteeVoter ∷ HotCommitteeCredential → Voter Source #
pattern DRepVoter ∷ DRepCredential → Voter Source #
pattern StakePoolVoter ∷ PubKeyHash → Voter Source #
A vote. The optional anchor is omitted.
Instances
Generic Vote Source # | |
Show Vote Source # | |
Eq Vote Source # | |
Eq Vote Source # | |
FromData Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
ToData Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
UnsafeFromData Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty Vote Source # | |
Lift DefaultUni Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts lift ∷ Vote → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
Typeable DefaultUni Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts typeRep ∷ Proxy Vote → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # | |
type Rep Vote Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts type Rep Vote = D1 ('MetaData "Vote" "PlutusLedgerApi.V3.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "Vote_6989586621680851356" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) |
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.
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.
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
Generic TxInfo Source # | |
Show TxInfo Source # | |
FromData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
ToData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
UnsafeFromData TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty TxInfo Source # | |
Lift DefaultUni TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts lift ∷ TxInfo → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
Typeable DefaultUni TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts typeRep ∷ Proxy TxInfo → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # | |
type Rep TxInfo Source # | |
Defined in PlutusLedgerApi.V3.Data.Contexts type Rep TxInfo = D1 ('MetaData "TxInfo" "PlutusLedgerApi.V3.Data.Contexts" "plutus-ledger-api-1.39.0.0-inplace" 'True) (C1 ('MetaCons "TxInfo_6989586621680863458" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) |
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.