packages feed

blockfrost-api 0.2.1.0 → 0.3.0.0

raw patch · 5 files changed

+23/−6 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Blockfrost.Lens: instance Blockfrost.Lens.HasDataHash Blockfrost.Types.Cardano.Transactions.UtxoInput (GHC.Maybe.Maybe Data.Text.Internal.Text)
- Blockfrost.Lens: instance Blockfrost.Lens.HasDataHash Blockfrost.Types.Cardano.Transactions.UtxoOutput (GHC.Maybe.Maybe Data.Text.Internal.Text)
+ Blockfrost.Lens: class HasDatumHash s a | s -> a
+ Blockfrost.Lens: class HasFee s a | s -> a
+ Blockfrost.Lens: class HasPurpose s a | s -> a
+ Blockfrost.Lens: class HasScriptHash s a | s -> a
+ Blockfrost.Lens: class HasUnitMem s a | s -> a
+ Blockfrost.Lens: class HasUnitSteps s a | s -> a
+ Blockfrost.Lens: class HasValidContract s a | s -> a
+ Blockfrost.Lens: datumHash :: HasDatumHash s a => Lens' s a
+ Blockfrost.Lens: fee :: HasFee s a => Lens' s a
+ Blockfrost.Lens: instance (a GHC.Types.~ Blockfrost.Types.Shared.Ada.Lovelaces) => Blockfrost.Lens.HasFee Blockfrost.Types.Cardano.Transactions.TransactionRedeemer a
+ Blockfrost.Lens: instance Blockfrost.Lens.HasDataHash Blockfrost.Types.Cardano.Transactions.UtxoInput (GHC.Maybe.Maybe Blockfrost.Types.Shared.DatumHash.DatumHash)
+ Blockfrost.Lens: instance Blockfrost.Lens.HasDataHash Blockfrost.Types.Cardano.Transactions.UtxoOutput (GHC.Maybe.Maybe Blockfrost.Types.Shared.DatumHash.DatumHash)
+ Blockfrost.Lens: instance Blockfrost.Lens.HasDatumHash Blockfrost.Types.Cardano.Transactions.TransactionRedeemer Blockfrost.Types.Shared.DatumHash.DatumHash
+ Blockfrost.Lens: instance Blockfrost.Lens.HasPurpose Blockfrost.Types.Cardano.Transactions.TransactionRedeemer Blockfrost.Types.Cardano.Transactions.ValidationPurpose
+ Blockfrost.Lens: instance Blockfrost.Lens.HasScriptHash Blockfrost.Types.Cardano.Transactions.TransactionRedeemer Blockfrost.Types.Shared.ScriptHash.ScriptHash
+ Blockfrost.Lens: instance Blockfrost.Lens.HasTxIndex Blockfrost.Types.Cardano.Transactions.TransactionRedeemer GHC.Integer.Type.Integer
+ Blockfrost.Lens: instance Blockfrost.Lens.HasUnitMem Blockfrost.Types.Cardano.Transactions.TransactionRedeemer Blockfrost.Types.Shared.Quantity.Quantity
+ Blockfrost.Lens: instance Blockfrost.Lens.HasUnitSteps Blockfrost.Types.Cardano.Transactions.TransactionRedeemer Blockfrost.Types.Shared.Quantity.Quantity
+ Blockfrost.Lens: instance Blockfrost.Lens.HasValidContract Blockfrost.Types.Cardano.Transactions.Transaction GHC.Types.Bool
+ Blockfrost.Lens: purpose :: HasPurpose s a => Lens' s a
+ Blockfrost.Lens: scriptHash :: HasScriptHash s a => Lens' s a
+ Blockfrost.Lens: unitMem :: HasUnitMem s a => Lens' s a
+ Blockfrost.Lens: unitSteps :: HasUnitSteps s a => Lens' s a
+ Blockfrost.Lens: validContract :: HasValidContract s a => Lens' s a
+ Blockfrost.Types.Cardano.Transactions: [_transactionValidContract] :: Transaction -> Bool
- Blockfrost.Types.Cardano.Transactions: Transaction :: Text -> BlockHash -> Integer -> Slot -> Integer -> [Amount] -> Lovelaces -> Lovelaces -> Integer -> Maybe Text -> Maybe Text -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Transaction
+ Blockfrost.Types.Cardano.Transactions: Transaction :: Text -> BlockHash -> Integer -> Slot -> Integer -> [Amount] -> Lovelaces -> Lovelaces -> Integer -> Maybe Text -> Maybe Text -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Bool -> Transaction
- Blockfrost.Types.Cardano.Transactions: TransactionRedeemer :: Integer -> ValidationPurpose -> Text -> Text -> Quantity -> Quantity -> Lovelaces -> TransactionRedeemer
+ Blockfrost.Types.Cardano.Transactions: TransactionRedeemer :: Integer -> ValidationPurpose -> ScriptHash -> DatumHash -> Quantity -> Quantity -> Lovelaces -> TransactionRedeemer
- Blockfrost.Types.Cardano.Transactions: UtxoInput :: Address -> [Amount] -> Text -> Integer -> Bool -> Maybe Text -> UtxoInput
+ Blockfrost.Types.Cardano.Transactions: UtxoInput :: Address -> [Amount] -> Text -> Integer -> Bool -> Maybe DatumHash -> UtxoInput
- Blockfrost.Types.Cardano.Transactions: UtxoOutput :: Address -> [Amount] -> Maybe Text -> Integer -> UtxoOutput
+ Blockfrost.Types.Cardano.Transactions: UtxoOutput :: Address -> [Amount] -> Maybe DatumHash -> Integer -> UtxoOutput
- Blockfrost.Types.Cardano.Transactions: [_transactionRedeemerDatumHash] :: TransactionRedeemer -> Text
+ Blockfrost.Types.Cardano.Transactions: [_transactionRedeemerDatumHash] :: TransactionRedeemer -> DatumHash
- Blockfrost.Types.Cardano.Transactions: [_transactionRedeemerScriptHash] :: TransactionRedeemer -> Text
+ Blockfrost.Types.Cardano.Transactions: [_transactionRedeemerScriptHash] :: TransactionRedeemer -> ScriptHash
- Blockfrost.Types.Cardano.Transactions: [_utxoInputDataHash] :: UtxoInput -> Maybe Text
+ Blockfrost.Types.Cardano.Transactions: [_utxoInputDataHash] :: UtxoInput -> Maybe DatumHash
- Blockfrost.Types.Cardano.Transactions: [_utxoOutputDataHash] :: UtxoOutput -> Maybe Text
+ Blockfrost.Types.Cardano.Transactions: [_utxoOutputDataHash] :: UtxoOutput -> Maybe DatumHash

Files

CHANGELOG.md view
@@ -1,3 +1,15 @@+# Version [0.3.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/v0.2.1.0...v0.3.0.0) (2022-02-07)++* Changes+  * `UtxoInput` and `UtxoOutput` `dataHash` fields changed from `Maybe Text` to `Maybe DataHash`+  * `TransactionRedeemer`+    * `scriptHash` field changed from `Maybe Text` to `Maybe ScriptHash`+    * `datumHash` field changed from `Maybe Text` to `Maybe DatumHash`++* Additions+  * `Transaction` grows `Bool`ean `validContract` field+  * Lenses for `TransactionRedeemer`+ # Version [0.2.1.0](https://github.com/blockfrost/blockfrost-haskell/compare/v0.2.0.0...v0.2.1.0) (2021-11-15)  * Additions
blockfrost-api.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                blockfrost-api-version:             0.2.1.0+version:             0.3.0.0 synopsis:            API definitions for blockfrost.io description:         Core types and Servant API description homepage:            https://github.com/blockfrost/blockfrost-haskell
src/Blockfrost/Lens.hs view
@@ -72,6 +72,7 @@ makeFields ''TransactionPoolRetiring makeFields ''TransactionMetaJSON makeFields ''TransactionMetaCBOR+makeFields ''TransactionRedeemer  makeLensesWith blockfrostFieldRules ''IPFSAdd makeLensesWith blockfrostFieldRules ''IPFSPinChange
src/Blockfrost/Types/Cardano/Transactions.hs view
@@ -50,6 +50,7 @@   , _transactionPoolRetireCount      :: Integer -- ^ Count of the stake pool retirement certificates within the transaction   , _transactionAssetMintOrBurnCount :: Integer -- ^ Count of asset mints and burns within the transaction   , _transactionRedeemerCount        :: Integer -- ^ Count of redeemers within the transaction+  , _transactionValidContract        :: Bool    -- ^ True if this is a valid transaction, False in case of contract validation failure   }   deriving stock (Show, Eq, Generic)   deriving (FromJSON, ToJSON)@@ -78,6 +79,7 @@       , _transactionPoolRetireCount = 0       , _transactionAssetMintOrBurnCount = 0       , _transactionRedeemerCount = 0+      , _transactionValidContract = True       }  -- | Transaction input UTxO@@ -87,7 +89,7 @@   , _utxoInputTxHash      :: Text -- ^ Hash of the UTXO transaction   , _utxoInputOutputIndex :: Integer -- ^ UTXO index in the transaction   , _utxoInputCollateral  :: Bool -- ^ UTXO is a script collateral input-  , _utxoInputDataHash    :: Maybe Text -- ^ The hash of the transaction output datum+  , _utxoInputDataHash    :: Maybe DatumHash -- ^ The hash of the transaction output datum   }   deriving stock (Show, Eq, Generic)   deriving (FromJSON, ToJSON)@@ -111,7 +113,7 @@ data UtxoOutput = UtxoOutput   { _utxoOutputAddress     :: Address -- ^ Output address   , _utxoOutputAmount      :: [Amount] -- ^ Transaction output amounts-  , _utxoOutputDataHash    :: Maybe Text -- ^ The hash of the transaction output datum+  , _utxoOutputDataHash    :: Maybe DatumHash -- ^ The hash of the transaction output datum   , _utxoOutputOutputIndex :: Integer -- ^ UTXO index in the transaction   } deriving stock (Show, Eq, Generic)   deriving (FromJSON, ToJSON)@@ -170,8 +172,8 @@ data TransactionRedeemer = TransactionRedeemer   { _transactionRedeemerTxIndex   :: Integer -- ^ Index of the redeemer within a transaction   , _transactionRedeemerPurpose   :: ValidationPurpose -- ^ Validation purpose-  , _transactionRedeemerScriptHash:: Text -- ^ Script hash-  , _transactionRedeemerDatumHash :: Text -- ^ Datum hash+  , _transactionRedeemerScriptHash:: ScriptHash -- ^ Script hash+  , _transactionRedeemerDatumHash :: DatumHash -- ^ Datum hash   , _transactionRedeemerUnitMem   :: Quantity -- ^ The budget in Memory to run a script   , _transactionRedeemerUnitSteps :: Quantity -- ^ The budget in Steps to run a script   , _transactionRedeemerFee       :: Lovelaces -- ^ The fee consumed to run the script
test/Cardano/Transactions.hs view
@@ -102,7 +102,8 @@   "pool_update_count": 0,   "pool_retire_count": 0,   "asset_mint_or_burn_count": 0,-  "redeemer_count": 0+  "redeemer_count": 0,+  "valid_contract": true } |] @@ -138,6 +139,7 @@     , _transactionPoolRetireCount = 0     , _transactionAssetMintOrBurnCount = 0     , _transactionRedeemerCount = 0+    , _transactionValidContract = True     }  transactionUtxosSample = [r|