Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate remaining ledger certificates #119

Merged
merged 10 commits into from
Jul 17, 2023

Commits on Jul 17, 2023

  1. Introduce internal module Cardano.Api.ReexposeLedger. This module

    imports cardano-ledger's Cardano.Ledger.Api module and other necessary
    modules from cardano-ledger
    Introduce external module Cardano.Api.Ledger. This module reexports
    Cardano.Api.ReexposeLedger with the aim of transitioning cardano-api
    (and cardano-cli) to be fully reliant on cardano-ledger-api
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    58d7f3e View commit details
    Browse the repository at this point in the history
  2. Redefine Certificate era to be a sum type of two data constructors:

    ShelleyRelatedCertificate and ConwayCertificate. These wrap the data
    types exposed by cardano-ledger that correspond to the certificates
    of the aforementioned eras. Certificate era is also a GADT now.
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    8a042a9 View commit details
    Browse the repository at this point in the history
  3. Introduce ConwayEraOnwards and AtMostBabbageEra GADTs in order to

    resolve cardano-ledger's certificate related type families to the
    correct type given an era.
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    517a6c6 View commit details
    Browse the repository at this point in the history
  4. Implement the following GADTs to be more explicit about the

    different requirements of certificates across changing eras:
      StakeDelegationRequirements era
      StakePoolRegistrationRequirements era
      StakePoolRetirementRequirements era
      GenesisKeyDelegationRequirements era
      MirCertificateRequirements era
      DRepRegistrationRequirements era
      CommitteeHotKeyAuthorizationRequirements era
      CommitteeColdkeyResignationRequirements era
      DRepUnregistrationRequirements era
    
    In combination with the following GADTs: ConwayEraOnwards era and
    AtMostBabbageEra era.
    
    We inherit the type safety of the ledger's type families via
    the ConwayEraOnwards and AtMostBabbageEra GADTs.
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    e13f833 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c53ef68 View commit details
    Browse the repository at this point in the history
  6. Update HasTextEnvelope (Certificate era) instance

    Add helper functions selectStakeCredential and filterUnRegCreds
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    ede3820 View commit details
    Browse the repository at this point in the history
  7. Expose new conway certificate constructor functions:

      makeCommitteeColdkeyResignationCertificate
      makeCommitteeHotKeyAuthorizationCertificate
      makeDrepRegistrationCertificate
      makeDrepUnregistrationCertificate
    
    Re-export ledger types:
      MIRTarget
      MIRPot
    
    Import Cardano.Api.ReexposeLedger with the aim of consolidating all of
    the ledger modules cardano-api depends on. This will make it easier to
    hand off the cardano-api's ledger functionality to the ledger team.
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    60640b8 View commit details
    Browse the repository at this point in the history
  8. Propagate new Cardano.Api.ReexposeLedger module exports in

    Cardano.Api.Certificate
    Jimbo4350 committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    e899efd View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0a8a62f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    da9be77 View commit details
    Browse the repository at this point in the history