| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V4.Contexts
Synopsis
- newtype AccountId = AccountId Credential
- data AccountBalanceInterval
- newtype AccountBalanceIntervals = AccountBalanceIntervals (Map AccountId AccountBalanceInterval)
- newtype ColdCommitteeCredential = ColdCommitteeCredential Credential
- newtype HotCommitteeCredential = HotCommitteeCredential Credential
- newtype DRepCredential = DRepCredential Credential
- data DRep
- data Delegatee
- data TxCert
- = TxCertRegAccount AccountId Lovelace
- | TxCertUnRegAccount AccountId Lovelace
- | TxCertDelegAccount AccountId Delegatee
- | TxCertRegAccountDeleg AccountId Delegatee Lovelace
- | TxCertRegDRep DRepCredential Lovelace
- | TxCertUpdateDRep DRepCredential
- | TxCertUnRegDRep DRepCredential Lovelace
- | TxCertPoolRegister PubKeyHash PubKeyHash
- | TxCertPoolRetire PubKeyHash Integer
- | TxCertAuthHotCommittee ColdCommitteeCredential HotCommitteeCredential
- | TxCertResignColdCommittee ColdCommitteeCredential
- data Voter
- data Vote
- data GovernanceActionId where
- pattern GovernanceActionId ∷ TxId → Integer → GovernanceActionId
- data Committee where
- newtype Constitution = Constitution {}
- data ProtocolVersion where
- pattern ProtocolVersion ∷ Integer → Integer → ProtocolVersion
- newtype ChangedParameters = ChangedParameters {}
- data GovernanceAction
- = ParameterChange (Maybe GovernanceActionId) ChangedParameters (Maybe ScriptHash)
- | HardForkInitiation (Maybe GovernanceActionId) ProtocolVersion
- | TreasuryWithdrawals (Map Credential Lovelace) (Maybe ScriptHash)
- | NoConfidence (Maybe GovernanceActionId)
- | UpdateCommittee (Maybe GovernanceActionId) [ColdCommitteeCredential] (Map ColdCommitteeCredential Integer) Rational
- | NewConstitution (Maybe GovernanceActionId) Constitution
- | InfoAction
- data ProposalProcedure where
- pattern ProposalProcedure ∷ Lovelace → Credential → GovernanceAction → ProposalProcedure
- data ScriptPurpose
- data ScriptInfo
- data TxInInfo = TxInInfo {}
- data TxInfo = TxInfo {
- txInfoId ∷ TxId
- txInfoSubTxIx ∷ Maybe Integer
- txInfoInputs ∷ [TxInInfo]
- txInfoReferenceInputs ∷ [TxInInfo]
- txInfoOutputs ∷ [TxOut]
- txInfoMint ∷ MintValue
- txInfoTxCerts ∷ [TxCert]
- txInfoWithdrawals ∷ Map Credential Lovelace
- txInfoDirectDeposits ∷ Map Credential Lovelace
- txInfoAccountBalanceIntervals ∷ AccountBalanceIntervals
- txInfoValidRange ∷ POSIXTimeRange
- txInfoGuards ∷ [Credential]
- txInfoRequiredTopLevelGuards ∷ Map Credential (Maybe Datum)
- txInfoRedeemers ∷ Map ScriptPurpose Redeemer
- txInfoData ∷ Map DatumHash Datum
- txInfoVotes ∷ Map Voter (Map GovernanceActionId Vote)
- txInfoProposalProcedures ∷ [ProposalProcedure]
- txInfoCurrentTreasuryAmount ∷ Maybe Lovelace
- txInfoTreasuryDonation ∷ Lovelace
- data TopTxInfoSimplified = TopTxInfoSimplified {
- ttisIds ∷ [TxId]
- ttisInputs ∷ [TxInInfo]
- ttisReferenceInputs ∷ [TxInInfo]
- ttisOutputs ∷ [TxOut]
- ttisMints ∷ MintValue
- ttisBurns ∷ MintValue
- ttisTxCerts ∷ [TxCert]
- ttisWithdrawals ∷ Map Credential Lovelace
- ttisDirectDeposits ∷ Map Credential Lovelace
- ttisValidRange ∷ POSIXTimeRange
- ttisGuards ∷ [Credential]
- ttisRequiredTopLevelGuards ∷ [Credential]
- ttisScriptPurposes ∷ [ScriptPurpose]
- ttisData ∷ Map DatumHash Datum
- ttisVotes ∷ Map Voter (Map GovernanceActionId Vote)
- ttisProposalProcedures ∷ [ProposalProcedure]
- ttisCurrentTreasuryAmount ∷ Maybe Lovelace
- ttisTreasuryDonations ∷ Lovelace
- data TopTxInfo = TopTxInfo {}
- data ScriptContext = ScriptContext {}
- findOwnInput ∷ ScriptContext → Maybe TxInInfo
- findDatum ∷ DatumHash → TxInfo → Maybe Datum
- findDatumHash ∷ Datum → TxInfo → Maybe DatumHash
- findTxInByTxOutRef ∷ TxOutRef → TxInfo → Maybe TxInInfo
- findContinuingOutputs ∷ ScriptContext → [Integer]
- getContinuingOutputs ∷ ScriptContext → [TxOut]
- txSignedBy ∷ TxInfo → PubKeyHash → Bool
- pubKeyOutputsAt ∷ PubKeyHash → TxInfo → [Value]
- valuePaidTo ∷ TxInfo → PubKeyHash → Value
- valueSpent ∷ TxInfo → Value
- valueProduced ∷ TxInfo → Value
- ownCurrencySymbol ∷ ScriptContext → CurrencySymbol
- spendsOutput ∷ TxInfo → TxId → Integer → Bool
Documentation
Constructors
| AccountId Credential |
Instances
data AccountBalanceInterval Source #
Constructors
| AccountBalanceLowerBound Lovelace | |
| AccountBalanceUpperBound Lovelace | |
| AccountBalanceBothBounds Lovelace Lovelace | |
| AccountBalanceExact Lovelace |
Instances
newtype AccountBalanceIntervals Source #
Constructors
| AccountBalanceIntervals (Map AccountId AccountBalanceInterval) |
Instances
newtype ColdCommitteeCredential Source #
Constructors
| ColdCommitteeCredential Credential |
Instances
newtype HotCommitteeCredential Source #
Constructors
| HotCommitteeCredential Credential |
Instances
newtype DRepCredential Source #
Constructors
| DRepCredential Credential |
Instances
Constructors
| DRep DRepCredential | |
| DRepAlwaysAbstain | |
| DRepAlwaysNoConfidence |
Instances
Constructors
| DelegStake PubKeyHash | |
| DelegVote DRep | |
| DelegStakeVote PubKeyHash DRep |
Instances
Constructors
Instances
Constructors
| CommitteeVoter HotCommitteeCredential | |
| DRepVoter DRepCredential | |
| StakePoolVoter PubKeyHash |
Instances
A vote. The optional anchor is omitted.
Instances
data GovernanceActionId where Source #
Bundled Patterns
| pattern GovernanceActionId ∷ TxId → Integer → GovernanceActionId |
Instances
Instances
newtype Constitution Source #
Constructors
| Constitution | |
Fields | |
Instances
data ProtocolVersion where Source #
Bundled Patterns
| pattern ProtocolVersion ∷ Integer → Integer → ProtocolVersion |
Instances
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.
Invariant: This map is non-empty, and the keys are stored in ascending order.
This Data object has the following format (in pseudocode):
ChangedParametersData = Map ChangedIdData ChangedManyValueData ChangedIdData = I Integer ChangedManyValueData = ChangedSingleValueData | List[ChangedSingleValueData...] -- ^ an arbitrary-length, heterogeneous (integer or ratio) list of values (to support sub-parameters)
ChangedSingleValueData = I Integer -- a proposed integer value | List[I Integer, I Integer] -- a proposed numerator,denominator (ratio value) -- ^ a 2-exact element list; *BE CAREFUL* because this can be alternatively (ambiguously) interpreted -- as a many-value data (sub-parameter) of two integer single-value data.
, where Map,I,List are the constructors of Data
and Integer is the usual arbitrary-precision PlutusTx/Haskell Integer.
Constructors
| ChangedParameters | |
Fields | |
Instances
data GovernanceAction Source #
Constructors
Instances
data ProposalProcedure where Source #
Bundled Patterns
| pattern ProposalProcedure ∷ Lovelace → Credential → GovernanceAction → ProposalProcedure |
Instances
data ScriptPurpose Source #
Constructors
Instances
data ScriptInfo Source #
Constructors
| MintingScript CurrencySymbol | |
| SpendingScript TxOutRef (Maybe Datum) | |
| WithdrawingScript AccountId | |
| CertifyingScript | |
Fields
| |
| VotingScript Voter | |
| ProposingScript | |
Fields
| |
| GuardingScript Integer (Maybe TopTxInfo) | Whenever a |
Instances
An input of a pending transaction.
Constructors
| TxInInfo | |
Fields | |
Instances
Constructors
Instances
data TopTxInfoSimplified Source #
Constructors
| TopTxInfoSimplified | |
Fields
| |
Instances
Constructors
| TopTxInfo | |
Fields
| |
Instances
data ScriptContext Source #
Constructors
| ScriptContext | |
Fields
| |
Instances
findContinuingOutputs ∷ ScriptContext → [Integer] Source #
Find the indices of outputs in the current sub-transaction or top-level transaction that pay to the same script address we are currently spending from. This does not search the outputs of the whole transaction.
getContinuingOutputs ∷ ScriptContext → [TxOut] Source #
Get the outputs in the current sub-transaction or top-level transaction that pay to the same script address we are currently spending from. This does not search the outputs of the whole transaction.
txSignedBy ∷ TxInfo → PubKeyHash → Bool Source #
pubKeyOutputsAt ∷ PubKeyHash → TxInfo → [Value] Source #
valuePaidTo ∷ TxInfo → PubKeyHash → Value Source #
valueSpent ∷ TxInfo → Value Source #
valueProduced ∷ TxInfo → Value Source #