From c2efd09795a9039f4ab01568d449a500cd2a118a Mon Sep 17 00:00:00 2001 From: Franco Testagrossa Date: Tue, 24 Sep 2024 18:29:40 +0200 Subject: [PATCH] client: fix GET /txs/{hash}/cbor endpoint return type --- blockfrost-api/CHANGELOG.md | 2 ++ blockfrost-api/src/Blockfrost/API/Cardano/Transactions.hs | 2 +- blockfrost-client/CHANGELOG.md | 2 ++ .../src/Blockfrost/Client/Cardano/Transactions.hs | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/blockfrost-api/CHANGELOG.md b/blockfrost-api/CHANGELOG.md index 0203842..c871b83 100644 --- a/blockfrost-api/CHANGELOG.md +++ b/blockfrost-api/CHANGELOG.md @@ -1,5 +1,7 @@ # Version [next](https://github.com/blockfrost/blockfrost-haskell/compare/api-0.12.0.0...master) (2024-MM-DD) +* Fix return type of `/txs/:hash/cbor` endpoint from `[TransactionCBOR]` to `TransactionCBOR.` + # Version [0.12.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/api-0.11.0.0...api-0.12.0.0) (2024-09-19) * Additions diff --git a/blockfrost-api/src/Blockfrost/API/Cardano/Transactions.hs b/blockfrost-api/src/Blockfrost/API/Cardano/Transactions.hs index 1688242..99f6802 100644 --- a/blockfrost-api/src/Blockfrost/API/Cardano/Transactions.hs +++ b/blockfrost-api/src/Blockfrost/API/Cardano/Transactions.hs @@ -89,7 +89,7 @@ data TransactionsAPI route = :> Description "Obtain the CBOR serialized transaction." :> Capture "hash" TxHash :> "cbor" - :> Get '[JSON] [TransactionCBOR] + :> Get '[JSON] TransactionCBOR , _txMetadataCBOR :: route :- Summary "Transaction metadata in CBOR" diff --git a/blockfrost-client/CHANGELOG.md b/blockfrost-client/CHANGELOG.md index 25dd220..c18cde7 100644 --- a/blockfrost-client/CHANGELOG.md +++ b/blockfrost-client/CHANGELOG.md @@ -1,5 +1,7 @@ # Version [next](https://github.com/blockfrost/blockfrost-haskell/compare/client-0.9.0.0...master) (2024-MM-DD) +* Fix return type of `getTxCBOR` and `_getTxCBOR'` from `[TransactionCBOR]` to `TransactionCBOR`. + # Version [0.9.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/client-0.8.0.1...client-0.9.0.0) (2024-09-19) * Additions diff --git a/blockfrost-client/src/Blockfrost/Client/Cardano/Transactions.hs b/blockfrost-client/src/Blockfrost/Client/Cardano/Transactions.hs index e608398..e61805e 100644 --- a/blockfrost-client/src/Blockfrost/Client/Cardano/Transactions.hs +++ b/blockfrost-client/src/Blockfrost/Client/Cardano/Transactions.hs @@ -93,11 +93,11 @@ getTxMetadataJSON_ = _txMetadataJSON . transactionsClient getTxMetadataJSON :: MonadBlockfrost m => TxHash -> m [TransactionMetaJSON] getTxMetadataJSON t = go (`getTxMetadataJSON_` t) -getTxCBOR_ :: MonadBlockfrost m => Project -> TxHash -> m [TransactionCBOR] +getTxCBOR_ :: MonadBlockfrost m => Project -> TxHash -> m TransactionCBOR getTxCBOR_ = _txCBOR . transactionsClient -- | Get transaction in CBOR -getTxCBOR :: MonadBlockfrost m => TxHash -> m [TransactionCBOR] +getTxCBOR :: MonadBlockfrost m => TxHash -> m TransactionCBOR getTxCBOR t = go (`getTxCBOR_` t) getTxMetadataCBOR_ :: MonadBlockfrost m => Project -> TxHash -> m [TransactionMetaCBOR]