Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ColdCommitteeCredential = ColdCommitteeCredential Credential
- newtype HotCommitteeCredential = HotCommitteeCredential Credential
- newtype DRepCredential = DRepCredential Credential
- data DRep
- data Delegatee
- data TxCert
- = TxCertRegStaking Credential (Maybe Lovelace)
- | TxCertUnRegStaking Credential (Maybe Lovelace)
- | TxCertDelegStaking Credential Delegatee
- | TxCertRegDeleg Credential 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 {
- txInfoInputs :: [TxInInfo]
- txInfoReferenceInputs :: [TxInInfo]
- txInfoOutputs :: [TxOut]
- txInfoFee :: Lovelace
- txInfoMint :: Value
- txInfoTxCerts :: [TxCert]
- txInfoWdrl :: Map Credential Lovelace
- txInfoValidRange :: POSIXTimeRange
- txInfoSignatories :: [PubKeyHash]
- txInfoRedeemers :: Map ScriptPurpose Redeemer
- txInfoData :: Map DatumHash Datum
- txInfoId :: TxId
- txInfoVotes :: Map Voter (Map GovernanceActionId Vote)
- txInfoProposalProcedures :: [ProposalProcedure]
- txInfoCurrentTreasuryAmount :: Maybe Lovelace
- txInfoTreasuryDonation :: Maybe Lovelace
- 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
newtype ColdCommitteeCredential Source #
Instances
newtype HotCommitteeCredential Source #
Instances
newtype DRepCredential Source #
Instances
Instances
Instances
TxCertRegStaking Credential (Maybe Lovelace) | Register staking credential with an optional deposit amount |
TxCertUnRegStaking Credential (Maybe Lovelace) | Un-Register staking credential with an optional refund amount |
TxCertDelegStaking Credential Delegatee | Delegate staking credential to a Delegatee |
TxCertRegDeleg Credential Delegatee Lovelace | Register and delegate staking credential to a Delegatee in one certificate. Note that deposit is mandatory. |
TxCertRegDRep DRepCredential Lovelace | Register a DRep with a deposit value. The optional anchor is omitted. |
TxCertUpdateDRep DRepCredential | Update a DRep. The optional anchor is omitted. |
TxCertUnRegDRep DRepCredential Lovelace | UnRegister a DRep with mandatory refund value |
TxCertPoolRegister | A digest of the PoolParams |
| |
TxCertPoolRetire PubKeyHash Integer | The retirement certificate and the Epoch in which the retirement will take place |
TxCertAuthHotCommittee ColdCommitteeCredential HotCommitteeCredential | Authorize a Hot credential for a specific Committee member's cold credential |
TxCertResignColdCommittee ColdCommitteeCredential |
Instances
Instances
A vote. The optional anchor is omitted.
Instances
data GovernanceActionId Source #
Similar to TxOutRef, but for GovActions
Instances
Committee | |
|
Instances
newtype Constitution Source #
A constitution. The optional anchor is omitted.
Instances
data ProtocolVersion Source #
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.
Instances
data GovernanceAction Source #
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 | |
| |
NewConstitution (Maybe GovernanceActionId) Constitution | |
InfoAction |
Instances
data ProposalProcedure Source #
A proposal procedure. The optional anchor is omitted.
Instances
data ScriptPurpose Source #
A ScriptPurpose
uniquely identifies a Plutus script within a transaction.
Minting CurrencySymbol | |
Spending TxOutRef | |
Rewarding Credential | |
Certifying | |
| |
Voting Voter | |
Proposing | |
|
Instances
data ScriptInfo Source #
Like ScriptPurpose
but with an optional datum for spending scripts.
MintingScript CurrencySymbol | |
SpendingScript TxOutRef (Maybe Datum) | |
RewardingScript Credential | |
CertifyingScript | |
| |
VotingScript Voter | |
ProposingScript | |
|
Instances
An input of a pending transaction.
Instances
TxInfo for PlutusV3
TxInfo | |
|
Instances
data ScriptContext Source #
The context that the currently-executing script can access.
ScriptContext | |
|
Instances
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 -> [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 -> [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 -> [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.