ITADN

cardano-api removal: migrate unsigned Shelley tx builder and delete cert helpers

#5285Openpaolino 创建于 2026-05-13
P
paolinocommented
## Parent #5243. Depends on #5288. Followed by #5289. ## P1 user story As a wallet maintainer, I can construct unsigned Shelley transactions through the ledger-native body builder and remove the obsolete cardano-api certificate helper modules from the wallet package. ## Current state Already landed: - #5287 plumbed mint/burn values through `buildLedgerTx` and `buildLedgerTxRaw`. - #5286 routed the signed-body path through `Cardano.Wallet.Shelley.Transaction.Ledger.mkTransaction` and removed the old signed-path wrapper. The old `mkTransactionLedger` name is gone. Still blocking this ticket: - #5288 must add script-witness parity to `Transaction.Ledger` before `mkUnsignedTransaction` / `mkUnsignedTx` can move off `Cardano.createTransactionBody` safely. ## Scope - Migrate `mkUnsignedTransaction` / `mkUnsignedTx` in `Cardano.Wallet.Shelley.Transaction` from cardano-api body construction to the ledger-native builder. - Preserve existing unsigned transaction bytes for supported eras and witness scenarios. - Replace the remaining certificate-helper call sites with ledger-native certificate values. - Delete the obsolete `Cardano.Wallet.Transaction.Delegation` and `Cardano.Wallet.Transaction.Voting` helper modules after their call sites are migrated. - Remove the corresponding exposed-module entries from `cardano-wallet.cabal`. ## Acceptance criteria - [ ] `mkUnsignedTransaction` / `mkUnsignedTx` no longer call `Cardano.createTransactionBody` or assemble `Cardano.TxBodyContent`. - [ ] The ledger-native unsigned builder covers the script-witness cases added in #5288. - [ ] Certificate helper call sites use ledger-native certificate constructors instead of cardano-api helper modules. - [ ] `Cardano.Wallet.Transaction.Delegation` and `Cardano.Wallet.Transaction.Voting` are deleted and pruned from the cabal file. - [ ] Existing unsigned transaction tests remain green, with added coverage for the migrated ledger path where needed. - [ ] `lib/wallet` builds and the Shelley transaction unit specs pass. - [ ] The PR modifies no files under `lib/integration/**`. ## Integration test policy - [ ] Do not modify integration test source files, integration fixtures, integration cabal metadata, or integration expectations under `lib/integration/**`. - [ ] Existing integration tests may be run unchanged as verification signal only; they are not part of the implementation scope. - [ ] If this slice appears to require an integration-test edit, stop and open a separate ticket instead of folding it into this PR. ## Non-goals - Rewriting Shelley transaction signing; tracked by #5289. - Removing `Cardano.Api.Extra` or package-level `cardano-api` dependencies; tracked by #5290. - Adding Dijkstra support; tracked separately by #5209 where relevant. - Editing integration tests.
2 条评论