atlas-cardano-0.9.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Types.TxCert

Description

 
Synopsis

Documentation

data GYTxCert v #

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.

Instances

Instances details
Show (GYTxCert v) # 
Instance details

Defined in GeniusYield.Types.TxCert.Internal

Methods

showsPrecIntGYTxCert v → ShowS #

showGYTxCert v → String #

showList ∷ [GYTxCert v] → ShowS #

Eq (GYTxCert v) # 
Instance details

Defined in GeniusYield.Types.TxCert.Internal

Methods

(==)GYTxCert v → GYTxCert v → Bool #

(/=)GYTxCert v → GYTxCert v → Bool #

mkStakeAddressRegistrationCertificateGYStakeCredentialGYTxBuildWitness v → GYTxCert v #

Post conway, newer stake address registration certificate also require a witness.

mkStakeAddressDeregistrationCertificateGYStakeCredentialGYTxBuildWitness v → GYTxCert v #

Note that deregistration certificate requires following preconditions:

  1. The stake address must be registered.
  2. The corresponding rewards balance is zero.

mkStakeAddressCombinedRegistrationAndDelegationCertificateGYStakeCredentialGYDelegateeGYTxBuildWitness v → GYTxCert v #

Rules for combined registration and delegation certificate are same as for individual registration and delegation certificates.

mkDRepRegistrationCertificateGYCredential 'GYKeyRoleDRepMaybe GYAnchorGYTxBuildWitness v → GYTxCert v #

Note that delegation certificate requires following preconditions:

  1. DRep must not already be registered.
  2. Deposit amount should be that given by corresponding protocol parameter.
  3. Signature from the corresponding DRep key.

mkDRepUpdateCertificateGYCredential 'GYKeyRoleDRepMaybe GYAnchorGYTxBuildWitness v → GYTxCert v #

Note that update certificate requires following preconditions:

  1. DRep must already be registered.
  2. Signature from the corresponding DRep key.

mkDRepUnregistrationCertificateGYCredential 'GYKeyRoleDRepNaturalGYTxBuildWitness v → GYTxCert v #

Note that unregistration certificate requires following preconditions:

  1. DRep must already be registered.
  2. Refund amount should be same as the deposit made by DRep while registration.
  3. Signature from the corresponding DRep key.

mkStakePoolRegistrationCertificateGYPoolParamsGYTxCert v #

Note that stake pool registration certificate requires following preconditions:

  1. poolCost must be more than minimum pool cost specified in protocol parameters.
  2. Signature from the key corresponding to poolId.
  3. If registering for the first time, then deposit is also deducted to that given by corresponding protocol parameter (ppPoolDepositL).
  4. Signature from pool owners.

mkStakePoolRetirementCertificateGYKeyHash 'GYKeyRoleStakePoolGYEpochNoGYTxCert v #

Note that stake pool retirement certificate requires following preconditions:

  1. Signature from the key corresponding to poolId.
  2. Epoch must be greater than the current epoch and less than or equal to ppEMax after the current epoch.
  3. The pool must be registered.

Note that deposit made earlier is returned at epoch transition.

mkCommitteeHotKeyAuthCertificateGYCredential 'GYKeyRoleColdCommitteeGYCredential 'GYKeyRoleHotCommitteeGYTxCert v #

Note that committee hot key auth certificate requires following preconditions:

  1. Cold key must not have resigned from the committee.
  2. Should be part of current committee or future committee as dictated by a governance action.
  3. Signature from the corresponding cold committee key.

mkCommitteeColdKeyResignationCertificate #

Arguments

GYCredential 'GYKeyRoleColdCommittee 
Maybe GYAnchor

Potential explanation for resignation.

GYTxCert v 

Note that committee cold key resignation certificate requires following preconditions:

  1. Cold key must not have resigned from the committee.
  2. Should be part of current committee or future committee as dictated by a governance action.
  3. Signature from the corresponding cold committee key.