packages feed

blockfrost-client 0.10.0.0 → 0.11.0.0

raw patch · 3 files changed

+26/−21 lines, 3 filesdep ~blockfrost-apidep ~blockfrost-client-corePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: blockfrost-api, blockfrost-client-core

API changes (from Hackage documentation)

- Blockfrost.Client.Types: BlockfrostNotFound :: BlockfrostError
+ Blockfrost.Client.Types: BlockfrostNotFound :: Text -> BlockfrostError

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+# Version [0.11.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/client-0.10.0.0...client-0.11.0.0) (2025-12-02)++* Changes+  * Add `CustomURL` to `Env`, to allow arbitrary Blockfrost instance [#79](https://github.com/blockfrost/blockfrost-haskell/pull/79)+  * `BlockfrostNotFound` constructor of `BlockfrostError` is now `BlockfrostNotFound Text`+    containing path that resulted in 404 error [#80](https://github.com/blockfrost/blockfrost-haskell/pull/80)+  * Drop `Sanchonet` `Env` [#79](https://github.com/blockfrost/blockfrost-haskell/pull/79)+ # Version [0.10.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/client-0.9.2.0...client-0.10.0.0) (2025-06-03)  * Additions
blockfrost-client.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                blockfrost-client-version:             0.10.0.0+version:             0.11.0.0 synopsis:            blockfrost.io basic client description:         Simple Blockfrost clients for use with transformers or mtl homepage:            https://github.com/blockfrost/blockfrost-haskell@@ -69,8 +69,8 @@                       , Blockfrost.Client.IPFS                       , Blockfrost.Client.NutLink    build-depends:       base                     >= 4.7 && < 5-                      , blockfrost-api           >= 0.13-                      , blockfrost-client-core   ^>= 0.6+                      , blockfrost-api           >= 0.14+                      , blockfrost-client-core   ^>= 0.7                       , bytestring                       , directory                       , data-default
example/Main.hs view
@@ -16,20 +16,20 @@     latestBlocks <- getLatestBlock     (ers :: Either BlockfrostError [AccountReward]) <-       tryError $ getAccountRewards "gonnaFail"-    -    allMempoolTxs <- ++    allMempoolTxs <-       getMempoolTransactions prj def def-    -    if null allMempoolTxs ++    if null allMempoolTxs     then return $ (latestBlocks, ers, allMempoolTxs, Nothing)     else do let lastTxInMempool = TxHash . unTxHashObject $ last allMempoolTxs             lastMempoolTx <- getMempoolTransaction prj lastTxInMempool-                +             return (latestBlocks, ers, allMempoolTxs, Just lastMempoolTx) -    +   -- variant accepting @Paged@ and @SortOrder@ arguments   -- getAccountRewards' "gonnaFail" (page 10) desc-  case res of +  case res of     Left e -> print e     Right ((latestBlocks, ers, allMempoolTxs, lastMempoolTx)) -> do        print "Latest blocks:"@@ -45,16 +45,13 @@       print lastMempoolTx       putStrLn "" -      case lastMempoolTx of +      case lastMempoolTx of         Nothing -> print "No mempool transactions found."         Just mempoolTx -> do-          let inputs = _inputs mempoolTx-          if null inputs -          then print "No mempool transactions found" -- Should be impossible-          else -            do let address = Address . _address $ head inputs-               mempoolTxByAddress <- runBlockfrost prj $ getMempoolTransactionsByAddress prj address def def-               print "Mempool transactions by address:"-               print mempoolTxByAddress-               -  +          case _inputs mempoolTx of+            [] -> print "No mempool transaction inputs found" -- Should be impossible+            (inp:_) -> do+              let address = Address $ _address inp+              mempoolTxByAddress <- runBlockfrost prj $ getMempoolTransactionsByAddress prj address def def+              print "Mempool transactions by address:"+              print mempoolTxByAddress