Merge pull request #1212 from IntersectMBO/release/cardano-api-11.2.0.0
Release cardano-api 11.2.0.0
Release cardano-api 11.2.0.0
Add evaluateTransaction to Cardano.Api.Experimental
Strip the deprecated legacy `Certificate era` GADT, its `ShelleyRelatedCertificate`/`ConwayCertificate` constructors, every `make*Certificate` constructor function, every `*Requirements` GADT, `selectStakeCredentialWitness`, `toShelleyCertificate`, `fromShelleyCertificate`, `isDRepRegOrUpdateCert`, and the legacy `AnchorDataFromCertificateError` + `getAnchorDataFromCertificate`. The module is now responsible only for the (non-deprecated) pool parameter types and their conversion helpers. Update consumers: - `Sign.hs` re-exports `AsTxId` by importing it directly from `Cardano.Api.Tx.Internal.TxIn` (the previous re-export chain went through the legacy `AsType (AsCertificate, AsTxId)` in Internal). The `-Wno-deprecations` pragma is dropped because no deprecated symbol remains. - `Body.hs` and `Certificate/Internal/OperationalCertificate.hs` drop their `Cardano.Api.Certificate.Internal` imports, which became unused once the legacy surface was removed.
Add `AsOperationalCertificate` and `AsOperationalCertificateIssueCounter` to the `AsType` re-export list of `Cardano.Api.Experimental.Certificate` so consumers that drop the public `Cardano.Api.Certificate` import have a single place to pick up the op-cert data-family constructors.
The public `Cardano.Api.Certificate` module exists only to re-export deprecated names. Delete it (and the cabal `exposed-modules` entry, and the `Cardano.Api` re-export) and migrate every remaining consumer to `Cardano.Api.Experimental.Certificate`. Test modules pick up `KESPeriod`, `OperationalCertificate`, `OperationalCertificateIssueCounter`, `issueOperationalCertificate`, `AsOperationalCertificate`, `AsOperationalCertificateIssueCounter`, `DRepMetadata`, `OperationalCertIssueError`, and `StakePoolMetadataValidationError` from the experimental module directly. `cardano-wasm` switches its `PoolId` import to the experimental module. `Cardano.Api.Tx.Internal.Body` swaps its `Cardano.Api.Certificate` import for the internal module (where the re-exports still live for now). `Cardano.Api.Certificate.Internal` itself is unchanged in this commit — the slim-down happens next.
Replace the legacy `genCertificate :: ShelleyBasedEra era -> Gen (Certificate era)` generator with one that produces `Exp.Certificate (ShelleyLedgerEra era)` directly using ledger constructors gated by ShelleyToBabbageEra/ConwayEraOnwards evidence. Delete `extractCertificate` (no longer needed, since there is no legacy-to-experimental conversion to perform) and the 11 obsolete `gen*Requirements` helpers. Update `genTxCertificates` and `genScriptWitnessedTxCertificates` to consume the new generator directly. Drop now-redundant `Typeable era` constraints that were only required by the legacy GADT's `Typeable era =>` constructor signatures (`genTxCertificates`, `genScriptWitnessedTxCertificates`, `genTxBodyContent`, `genValidTxBody`, `genTxBody`, `genTx`, `genWitnesses`, `genShelleyBootstrapWitness`, `genShelleyKeyWitness`, `genShelleyWitness`, `genCardanoKeyWitness`) and the `Data.Typeable` import that became unused as a result.
Strip the deprecated legacy `Certificate era` GADT, its `ShelleyRelatedCertificate`/`ConwayCertificate` constructors, every `make*Certificate` constructor function, every `*Requirements` GADT, `selectStakeCredentialWitness`, `toShelleyCertificate`, `fromShelleyCertificate`, `isDRepRegOrUpdateCert`, and the legacy `AnchorDataFromCertificateError` + `getAnchorDataFromCertificate`. The module is now responsible only for the (non-deprecated) pool parameter types and their conversion helpers. Update consumers: - `Sign.hs` re-exports `AsTxId` by importing it directly from `Cardano.Api.Tx.Internal.TxIn` (the previous re-export chain went through the legacy `AsType (AsCertificate, AsTxId)` in Internal). The `-Wno-deprecations` pragma is dropped because no deprecated symbol remains. - `Body.hs` and `Certificate/Internal/OperationalCertificate.hs` drop their `Cardano.Api.Certificate.Internal` imports, which became unused once the legacy surface was removed.
The public `Cardano.Api.Certificate` module exists only to re-export deprecated names. Delete it (and the cabal `exposed-modules` entry, and the `Cardano.Api` re-export) and migrate every remaining consumer to `Cardano.Api.Experimental.Certificate`. Test modules pick up `KESPeriod`, `OperationalCertificate`, `OperationalCertificateIssueCounter`, `issueOperationalCertificate`, `AsOperationalCertificate`, `AsOperationalCertificateIssueCounter`, `DRepMetadata`, `OperationalCertIssueError`, and `StakePoolMetadataValidationError` from the experimental module directly. `cardano-wasm` switches its `PoolId` import to the experimental module. `Cardano.Api.Tx.Internal.Body` swaps its `Cardano.Api.Certificate` import for the internal module (where the re-exports still live for now). `Cardano.Api.Certificate.Internal` itself is unchanged in this commit — the slim-down happens next.
Add `AsOperationalCertificate` and `AsOperationalCertificateIssueCounter` to the `AsType` re-export list of `Cardano.Api.Experimental.Certificate` so consumers that drop the public `Cardano.Api.Certificate` import have a single place to pick up the op-cert data-family constructors.
Both functions already operate on the experimental `Exp.Certificate` wrapper; they only lived in `Cardano.Api.Certificate.Internal` for historical reasons. Move them next to the type they operate on and re-export them from `Cardano.Api.Experimental.Certificate`. Update the sole caller in Query/Internal/Convenience.hs to import directly from the new location.
Replace the legacy `genCertificate :: ShelleyBasedEra era -> Gen (Certificate era)` generator with one that produces `Exp.Certificate (ShelleyLedgerEra era)` directly using ledger constructors gated by ShelleyToBabbageEra/ConwayEraOnwards evidence. Delete `extractCertificate` (no longer needed, since there is no legacy-to-experimental conversion to perform) and the 11 obsolete `gen*Requirements` helpers. Update `genTxCertificates` and `genScriptWitnessedTxCertificates` to consume the new generator directly. Drop now-redundant `Typeable era` constraints that were only required by the legacy GADT's `Typeable era =>` constructor signatures (`genTxCertificates`, `genScriptWitnessedTxCertificates`, `genTxBodyContent`, `genValidTxBody`, `genTxBody`, `genTx`, `genWitnesses`, `genShelleyBootstrapWitness`, `genShelleyKeyWitness`, `genShelleyWitness`, `genCardanoKeyWitness`) and the `Data.Typeable` import that became unused as a result.
Delete the deprecated `data Certificate era` GADT in `Cardano.Api.Certificate.Internal` along with all 13 `make*Certificate` functions, all 11 `*Requirements` GADTs, and the helpers `selectStakeCredentialWitness`, `toShelleyCertificate`, `fromShelleyCertificate`, `isDRepRegOrUpdateCert`, and the legacy `getAnchorDataFromCertificate`. The internal module is reduced to pool parameters, relays, metadata references, and their conversion functions. Delete the public `Cardano.Api.Certificate` re-export module and remove it from cabal `exposed-modules` and from `Cardano.Api`. Consumers should use `Cardano.Api.Experimental.Certificate` (Era-parameterized, Conway onwards) or `Cardano.Api.Compatible.Certificate` (covers all Shelley-based eras). Move `filterUnRegCreds` and `filterUnRegDRepCreds` to `Cardano.Api.Experimental.Tx.Internal.Certificate` and re-export them via `Cardano.Api.Experimental.Certificate`. Re-export `AsOperationalCertificate` and `AsOperationalCertificateIssueCounter` via `Cardano.Api.Experimental.Certificate` so test consumers can roundtrip op-certs without depending on the internal module. Rewrite `genCertificate` in `gen/Test/Gen/Cardano/Api/Typed.hs` to produce `Exp.Certificate (ShelleyLedgerEra era)` directly using ledger constructors gated by `ShelleyToBabbageEra`/`ConwayEraOnwards` evidence. Delete `extractCertificate` and all 11 obsolete `gen*Requirements` helpers. Drop now-redundant `Typeable era` constraints that cascaded from the legacy GADT. Rewire remaining consumers: `Sign.hs` imports `AsTxId` directly from `Tx.Internal.TxIn` and drops `-Wno-deprecations`; `Body.hs` and `OperationalCertificate.hs` drop their unused `Cardano.Api.Certificate.Internal` imports; `Query/Internal/Convenience.hs` gets `filterUnRegCreds`/`filterUnRegDRepCreds` from the experimental module; `wasm/StakeCertificate.hs` gets `PoolId` from `Cardano.Api.Experimental.Certificate`; test modules pick up `OperationalCertIssueError`, `StakePoolMetadataValidationError`, `DRepMetadata`, and the op-cert `AsType` constructors from `Cardano.Api.Experimental.Certificate`.
Remove legacy TxOut from Compatible and Experimental APIs
Fix haddock urls