Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data GYTxCert v
- data GYTxCertWitness v
- txCertToApi ∷ GYTxCert' v → (Certificate ApiEra, Maybe (StakeCredential, Witness WitCtxStake ApiEra))
- mkStakeAddressRegistrationCertificate ∷ GYStakeCredential → GYTxCertWitness v → GYTxCert v
- mkStakeAddressDeregistrationCertificate ∷ GYStakeCredential → GYTxCertWitness v → GYTxCert v
- mkStakeAddressDelegationCertificate ∷ GYStakeCredential → GYDelegatee → GYTxCertWitness v → GYTxCert v
Documentation
A transaction certificate.
The parameter v
indicates the minimum version of scripts allowed to witness certificates
in the transaction.
Note that witness is not required for registering a stake address and for moving instantaneous rewards. Thus, we provide helper utilities to interact with GYTxCert
sanely and thus keep it's representation opaque.
data GYTxCertWitness v #
Represents witness type and associated information for a certificate.
GYTxCertWitnessKey | Key witness. |
GYTxCertWitnessScript !(GYStakeValScript v) !GYRedeemer | Script witness with associated script and redeemer. |
Instances
Show (GYTxCertWitness v) # | |
Defined in GeniusYield.Types.TxCert.Internal showsPrec ∷ Int → GYTxCertWitness v → ShowS # show ∷ GYTxCertWitness v → String # showList ∷ [GYTxCertWitness v] → ShowS # | |
Eq (GYTxCertWitness v) # | |
Defined in GeniusYield.Types.TxCert.Internal (==) ∷ GYTxCertWitness v → GYTxCertWitness v → Bool # (/=) ∷ GYTxCertWitness v → GYTxCertWitness v → Bool # |
txCertToApi ∷ GYTxCert' v → (Certificate ApiEra, Maybe (StakeCredential, Witness WitCtxStake ApiEra)) #
mkStakeAddressRegistrationCertificate ∷ GYStakeCredential → GYTxCertWitness v → GYTxCert v #
Post conway, newer stake address registration certificate also require a witness.
mkStakeAddressDeregistrationCertificate ∷ GYStakeCredential → GYTxCertWitness v → GYTxCert v #
Note that deregistration certificate requires following preconditions:
- The stake address must be registered.
- The corresponding rewards balance is zero.