| 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 = GovernanceActionId {}
- data Committee = Committee {}
- newtype Constitution = Constitution {}
- data ProtocolVersion = 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 = ProposalProcedure {}
- data ScriptPurpose
- data ScriptInfo
- data TxInInfo = TxInInfo {}
- data TxInfo = TxInfo {
- txInfoId ∷ TxId
- txInfoSubTxIx ∷ Maybe Integer
- txInfoInputs ∷ [TxInInfo]
- txInfoReferenceInputs ∷ [TxInInfo]
- txInfoOutputs ∷ [TxOut]
- txInfoFee ∷ Lovelace
- txInfoMint ∷ MintValue
- txInfoTxCerts ∷ [TxCert]
- txInfoWithdrawals ∷ Map AccountId Lovelace
- txInfoDirectDeposits ∷ Map AccountId 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 AccountId Lovelace
- ttisDirectDeposits ∷ Map AccountId Lovelace
- ttisValidRange ∷ POSIXTimeRange
- ttisGuards ∷ Map Credential ()
- ttisScriptPurposes ∷ Map 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 Source #
Similar to TxOutRef, but for GovActions
Constructors
| GovernanceActionId | |
Fields | |
Instances
Constructors
| Committee | |
Fields
| |
Instances
newtype Constitution Source #
A constitution. The optional anchor is omitted.
Constructors
| Constitution | |
Fields | |
Instances
data ProtocolVersion Source #
Constructors
| 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
| ParameterChange (Maybe GovernanceActionId) ChangedParameters (Maybe ScriptHash) | Hash of the constitution script |
| HardForkInitiation (Maybe GovernanceActionId) ProtocolVersion | proposal to update protocol version |
| TreasuryWithdrawals (Map Credential Lovelace) (Maybe ScriptHash) | Hash of the constitution script |
| NoConfidence (Maybe GovernanceActionId) | |
| UpdateCommittee | |
Fields
| |
| NewConstitution (Maybe GovernanceActionId) Constitution | |
| InfoAction | |
Instances
data ProposalProcedure Source #
A proposal procedure. The optional anchor is omitted.
Constructors
| ProposalProcedure | |
Instances
data ScriptPurpose Source #
Constructors
Instances
data ScriptInfo Source #
Constructors
Instances
An input of a pending transaction.
Constructors
| TxInInfo | |
Fields | |
Instances
Constructors
Instances
data TopTxInfoSimplified Source #
Constructors
Instances
Constructors
| TopTxInfo | |
Instances
data ScriptContext Source #
Constructors
| ScriptContext | |
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 #