blockfrost-api 0.3.1.0 → 0.4.0.0
raw patch · 6 files changed
+17/−7 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Blockfrost.Lens: instance Blockfrost.Lens.HasActiveEpoch Blockfrost.Types.Cardano.Accounts.AccountInfo GHC.Integer.Type.Integer
- Blockfrost.Lens: instance Blockfrost.Lens.HasTxHash Blockfrost.Types.Cardano.Metadata.TxMetaCBOR Data.Text.Internal.Text
- Blockfrost.Lens: instance Blockfrost.Lens.HasTxHash Blockfrost.Types.Cardano.Metadata.TxMetaJSON Data.Text.Internal.Text
- Blockfrost.Lens: instance Blockfrost.Lens.HasTxHash Blockfrost.Types.Cardano.Transactions.UtxoInput Data.Text.Internal.Text
+ Blockfrost.Lens: instance Blockfrost.Lens.HasActiveEpoch Blockfrost.Types.Cardano.Accounts.AccountInfo (GHC.Maybe.Maybe GHC.Integer.Type.Integer)
+ Blockfrost.Lens: instance Blockfrost.Lens.HasTxHash Blockfrost.Types.Cardano.Metadata.TxMetaCBOR Blockfrost.Types.Shared.TxHash.TxHash
+ Blockfrost.Lens: instance Blockfrost.Lens.HasTxHash Blockfrost.Types.Cardano.Metadata.TxMetaJSON Blockfrost.Types.Shared.TxHash.TxHash
+ Blockfrost.Lens: instance Blockfrost.Lens.HasTxHash Blockfrost.Types.Cardano.Transactions.UtxoInput Blockfrost.Types.Shared.TxHash.TxHash
- Blockfrost.Types.Cardano.Accounts: AccountInfo :: Address -> Bool -> Integer -> Lovelaces -> Lovelaces -> Lovelaces -> Lovelaces -> Lovelaces -> Lovelaces -> Maybe PoolId -> AccountInfo
+ Blockfrost.Types.Cardano.Accounts: AccountInfo :: Address -> Bool -> Maybe Integer -> Lovelaces -> Lovelaces -> Lovelaces -> Lovelaces -> Lovelaces -> Lovelaces -> Maybe PoolId -> AccountInfo
- Blockfrost.Types.Cardano.Accounts: [_accountInfoActiveEpoch] :: AccountInfo -> Integer
+ Blockfrost.Types.Cardano.Accounts: [_accountInfoActiveEpoch] :: AccountInfo -> Maybe Integer
- Blockfrost.Types.Cardano.Metadata: TxMetaCBOR :: Text -> Maybe Text -> TxMetaCBOR
+ Blockfrost.Types.Cardano.Metadata: TxMetaCBOR :: TxHash -> Maybe Text -> TxMetaCBOR
- Blockfrost.Types.Cardano.Metadata: TxMetaJSON :: Text -> Maybe Value -> TxMetaJSON
+ Blockfrost.Types.Cardano.Metadata: TxMetaJSON :: TxHash -> Maybe Value -> TxMetaJSON
- Blockfrost.Types.Cardano.Metadata: [_txMetaCBORTxHash] :: TxMetaCBOR -> Text
+ Blockfrost.Types.Cardano.Metadata: [_txMetaCBORTxHash] :: TxMetaCBOR -> TxHash
- Blockfrost.Types.Cardano.Metadata: [_txMetaJSONTxHash] :: TxMetaJSON -> Text
+ Blockfrost.Types.Cardano.Metadata: [_txMetaJSONTxHash] :: TxMetaJSON -> TxHash
- Blockfrost.Types.Cardano.Transactions: UtxoInput :: Address -> [Amount] -> Text -> Integer -> Bool -> Maybe DatumHash -> UtxoInput
+ Blockfrost.Types.Cardano.Transactions: UtxoInput :: Address -> [Amount] -> TxHash -> Integer -> Bool -> Maybe DatumHash -> UtxoInput
- Blockfrost.Types.Cardano.Transactions: [_utxoInputTxHash] :: UtxoInput -> Text
+ Blockfrost.Types.Cardano.Transactions: [_utxoInputTxHash] :: UtxoInput -> TxHash
Files
- CHANGELOG.md +10/−0
- blockfrost-api.cabal +1/−1
- src/Blockfrost/Types/Cardano/Accounts.hs +2/−2
- src/Blockfrost/Types/Cardano/Metadata.hs +2/−2
- src/Blockfrost/Types/Cardano/Transactions.hs +1/−1
- test/Cardano/Accounts.hs +1/−1
CHANGELOG.md view
@@ -1,3 +1,13 @@+# Version [0.4.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/v0.3.1.0...v0.4.0.0) (2022-03-09)++* Changes+ * `AccountInfo`+ * `activeEpoch` field type changed from `Integer` to `Maybe Integer`+ * `UtxoInput`+ * `txHash` field type changed from `Text` to `TxHash` newtype+ * `TxMetaJSON` and `TxMetaCBOR`+ * `txHash` field type changed from `Text` to `TxHash` newtype+ # Version [0.3.1.0](https://github.com/blockfrost/blockfrost-haskell/compare/v0.3.0.0...v0.3.1.0) (2022-02-17) * Additions
blockfrost-api.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: blockfrost-api-version: 0.3.1.0+version: 0.4.0.0 synopsis: API definitions for blockfrost.io description: Core types and Servant API description homepage: https://github.com/blockfrost/blockfrost-haskell
src/Blockfrost/Types/Cardano/Accounts.hs view
@@ -20,7 +20,7 @@ data AccountInfo = AccountInfo { _accountInfoStakeAddress :: Address -- ^ Bech32 stake address , _accountInfoActive :: Bool -- ^ Registration state of an account- , _accountInfoActiveEpoch :: Integer -- ^ Epoch of the most recent action - registration or deregistration+ , _accountInfoActiveEpoch :: Maybe Integer -- ^ Epoch of the most recent action - registration or deregistration , _accountInfoControlledAmount :: Lovelaces -- ^ Balance of the account in Lovelaces , _accountInfoRewardsSum :: Lovelaces -- ^ Sum of all funds rewards for the account in the Lovelaces , _accountInfoWithdrawalsSum :: Lovelaces -- ^ Sum of all the withdrawals for the account in the Lovelaces@@ -37,7 +37,7 @@ toSamples = pure $ singleSample $ AccountInfo { _accountInfoStakeAddress = "stake1ux3g2c9dx2nhhehyrezyxpkstartcqmu9hk63qgfkccw5rqttygt7" , _accountInfoActive = True- , _accountInfoActiveEpoch = 412+ , _accountInfoActiveEpoch = pure 412 , _accountInfoControlledAmount = 619154618165 , _accountInfoRewardsSum = 319154618165 , _accountInfoWithdrawalsSum = 12125369253
src/Blockfrost/Types/Cardano/Metadata.hs view
@@ -32,7 +32,7 @@ -- | Transaction metadata content in JSON data TxMetaJSON = TxMetaJSON- { _txMetaJSONTxHash :: Text -- ^ Transaction hash that contains the specific metadata+ { _txMetaJSONTxHash :: TxHash -- ^ Transaction hash that contains the specific metadata , _txMetaJSONJSONMetadata :: Maybe Value -- ^ Content of the JSON metadata } deriving stock (Show, Eq, Generic)@@ -62,7 +62,7 @@ -- | Transaction metadata content in CBOR data TxMetaCBOR = TxMetaCBOR- { _txMetaCBORTxHash :: Text -- ^ Transaction hash that contains the specific metadata+ { _txMetaCBORTxHash :: TxHash -- ^ Transaction hash that contains the specific metadata , _txMetaCBORMetadata :: Maybe Text -- ^ Content of the CBOR metadata } deriving stock (Show, Eq, Generic)
src/Blockfrost/Types/Cardano/Transactions.hs view
@@ -86,7 +86,7 @@ data UtxoInput = UtxoInput { _utxoInputAddress :: Address -- ^ Input address , _utxoInputAmount :: [Amount]- , _utxoInputTxHash :: Text -- ^ Hash of the UTXO transaction+ , _utxoInputTxHash :: TxHash -- ^ Hash of the UTXO transaction , _utxoInputOutputIndex :: Integer -- ^ UTXO index in the transaction , _utxoInputCollateral :: Bool -- ^ UTXO is a script collateral input , _utxoInputDataHash :: Maybe DatumHash -- ^ The hash of the transaction output datum
test/Cardano/Accounts.hs view
@@ -75,7 +75,7 @@ accountExpected = AccountInfo { _accountInfoStakeAddress = "stake1ux3g2c9dx2nhhehyrezyxpkstartcqmu9hk63qgfkccw5rqttygt7" , _accountInfoActive = True- , _accountInfoActiveEpoch = 412+ , _accountInfoActiveEpoch = pure 412 , _accountInfoControlledAmount = 619154618165 , _accountInfoRewardsSum = 319154618165 , _accountInfoWithdrawalsSum = 12125369253