packages feed

blockfrost-api 0.8.0.0 → 0.8.1.0

raw patch · 4 files changed

+27/−13 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Blockfrost.Lens: instance Blockfrost.Lens.HasAddress Blockfrost.Types.Cardano.Addresses.AddressUtxo Blockfrost.Types.Shared.Address.Address
+ Blockfrost.Types.Cardano.Addresses: [_addressUtxoAddress] :: AddressUtxo -> Address
- Blockfrost.Types.Cardano.Addresses: AddressUtxo :: TxHash -> Integer -> [Amount] -> BlockHash -> Maybe DatumHash -> Maybe InlineDatum -> Maybe ScriptHash -> AddressUtxo
+ Blockfrost.Types.Cardano.Addresses: AddressUtxo :: Address -> TxHash -> Integer -> [Amount] -> BlockHash -> Maybe DatumHash -> Maybe InlineDatum -> Maybe ScriptHash -> AddressUtxo

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# Version [0.8.1.0](https://github.com/blockfrost/blockfrost-haskell/compare/api-0.8.0.0...api-0.8.1.0) (2023-09-18)++* Added `address` field to `AddressUtxo` [#38](https://github.com/blockfrost/blockfrost-haskell/pull/38)+ # Version [0.8.0.0](https://github.com/blockfrost/blockfrost-haskell/compare/v0.7.1.0...api-0.8.0.0) (2023-01-10)  * Removed
blockfrost-api.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                blockfrost-api-version:             0.8.0.0+version:             0.8.1.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/Addresses.hs view
@@ -81,12 +81,13 @@  -- | UTxOs of the address data AddressUtxo = AddressUtxo-  { _addressUtxoTxHash      :: TxHash -- ^ Transaction hash of the UTXO-  , _addressUtxoOutputIndex :: Integer -- ^ UTXO index in the transaction-  , _addressUtxoAmount      :: [Amount] -- ^ Amounts of Lovelaces or tokens-  , _addressUtxoBlock       :: BlockHash -- ^ Block hash of the UTXO-  , _addressUtxoDataHash    :: Maybe DatumHash -- ^ The hash of the transaction output datum-  , _addressUtxoInlineDatum :: Maybe InlineDatum -- ^ CBOR encoded inline datum+  { _addressUtxoAddress             :: Address  -- ^ Address in the UTxO. Useful when querying by payment credential.+  , _addressUtxoTxHash              :: TxHash -- ^ Transaction hash of the UTXO+  , _addressUtxoOutputIndex         :: Integer -- ^ UTXO index in the transaction+  , _addressUtxoAmount              :: [Amount] -- ^ Amounts of Lovelaces or tokens+  , _addressUtxoBlock               :: BlockHash -- ^ Block hash of the UTXO+  , _addressUtxoDataHash            :: Maybe DatumHash -- ^ The hash of the transaction output datum+  , _addressUtxoInlineDatum         :: Maybe InlineDatum -- ^ CBOR encoded inline datum   , _addressUtxoReferenceScriptHash :: Maybe ScriptHash -- ^ The hash of the reference script of the output   } deriving stock (Show, Eq, Generic)   deriving (FromJSON, ToJSON)@@ -95,7 +96,8 @@ instance ToSample AddressUtxo where   toSamples = pure $ samples     [ AddressUtxo-      { _addressUtxoTxHash = "39a7a284c2a0948189dc45dec670211cd4d72f7b66c5726c08d9b3df11e44d58"+      { _addressUtxoAddress = "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz"+      , _addressUtxoTxHash = "39a7a284c2a0948189dc45dec670211cd4d72f7b66c5726c08d9b3df11e44d58"       , _addressUtxoOutputIndex = 0       , _addressUtxoAmount = [ AdaAmount 42000000 ]       , _addressUtxoBlock = "7eb8e27d18686c7db9a18f8bbcfe34e3fed6e047afaa2d969904d15e934847e6"@@ -104,7 +106,8 @@       , _addressUtxoReferenceScriptHash = Nothing       }     , AddressUtxo-      { _addressUtxoTxHash = "4c4e67bafa15e742c13c592b65c8f74c769cd7d9af04c848099672d1ba391b49"+      { _addressUtxoAddress = "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz"+      , _addressUtxoTxHash = "4c4e67bafa15e742c13c592b65c8f74c769cd7d9af04c848099672d1ba391b49"       , _addressUtxoOutputIndex = 0       , _addressUtxoAmount = [ AdaAmount 729235000 ]       , _addressUtxoBlock = "953f1b80eb7c11a7ffcd67cbd4fde66e824a451aca5a4065725e5174b81685b7"@@ -113,7 +116,8 @@       , _addressUtxoReferenceScriptHash = Nothing       }     , AddressUtxo-      { _addressUtxoTxHash = "768c63e27a1c816a83dc7b07e78af673b2400de8849ea7e7b734ae1333d100d2"+      { _addressUtxoAddress = "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz"+      , _addressUtxoTxHash = "768c63e27a1c816a83dc7b07e78af673b2400de8849ea7e7b734ae1333d100d2"       , _addressUtxoOutputIndex = 1       , _addressUtxoAmount =           [ AdaAmount 42000000
test/Cardano/Addresses.hs view
@@ -124,6 +124,7 @@ addressUtxosSample = [r| [     {+        "address": "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz",         "tx_hash": "39a7a284c2a0948189dc45dec670211cd4d72f7b66c5726c08d9b3df11e44d58",         "output_index": 0,         "amount":@@ -139,6 +140,7 @@         "reference_script_hash": null     },     {+        "address": "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz",         "tx_hash": "4c4e67bafa15e742c13c592b65c8f74c769cd7d9af04c848099672d1ba391b49",         "output_index": 0,         "amount":@@ -154,6 +156,7 @@         "reference_script_hash": null     },     {+        "address": "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz",         "tx_hash": "768c63e27a1c816a83dc7b07e78af673b2400de8849ea7e7b734ae1333d100d2",         "output_index": 1,         "amount":@@ -177,7 +180,8 @@  addressUtxosExpected =   [ AddressUtxo-    { _addressUtxoTxHash = "39a7a284c2a0948189dc45dec670211cd4d72f7b66c5726c08d9b3df11e44d58"+    { _addressUtxoAddress = "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz"+    , _addressUtxoTxHash = "39a7a284c2a0948189dc45dec670211cd4d72f7b66c5726c08d9b3df11e44d58"     , _addressUtxoOutputIndex = 0     , _addressUtxoAmount = [ AdaAmount 42000000 ]     , _addressUtxoBlock = "7eb8e27d18686c7db9a18f8bbcfe34e3fed6e047afaa2d969904d15e934847e6"@@ -186,7 +190,8 @@     , _addressUtxoReferenceScriptHash = Nothing     }   , AddressUtxo-    { _addressUtxoTxHash = "4c4e67bafa15e742c13c592b65c8f74c769cd7d9af04c848099672d1ba391b49"+    { _addressUtxoAddress = "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz"+    , _addressUtxoTxHash = "4c4e67bafa15e742c13c592b65c8f74c769cd7d9af04c848099672d1ba391b49"     , _addressUtxoOutputIndex = 0     , _addressUtxoAmount = [ AdaAmount 729235000 ]     , _addressUtxoBlock = "953f1b80eb7c11a7ffcd67cbd4fde66e824a451aca5a4065725e5174b81685b7"@@ -195,7 +200,8 @@     , _addressUtxoReferenceScriptHash = Nothing     }   , AddressUtxo-    { _addressUtxoTxHash = "768c63e27a1c816a83dc7b07e78af673b2400de8849ea7e7b734ae1333d100d2"+    { _addressUtxoAddress = "addr1qxqs59lphg8g6qndelq8xwqn60ag3aeyfcp33c2kdp46a09re5df3pzwwmyq946axfcejy5n4x0y99wqpgtp2gd0k09qsgy6pz"+    , _addressUtxoTxHash = "768c63e27a1c816a83dc7b07e78af673b2400de8849ea7e7b734ae1333d100d2"     , _addressUtxoOutputIndex = 1     , _addressUtxoAmount =         [ AdaAmount 42000000