| CARVIEW |
blockfrost-api: API definitions for blockfrost.io
Modules
[Index] [Quick Jump]
- Blockfrost
- Blockfrost.API
- Blockfrost.API.Cardano
- Blockfrost.API.Cardano.Accounts
- Blockfrost.API.Cardano.Addresses
- Blockfrost.API.Cardano.Assets
- Blockfrost.API.Cardano.Blocks
- Blockfrost.API.Cardano.Epochs
- Blockfrost.API.Cardano.Governance
- Blockfrost.API.Cardano.Ledger
- Blockfrost.API.Cardano.Mempool
- Blockfrost.API.Cardano.Metadata
- Blockfrost.API.Cardano.Network
- Blockfrost.API.Cardano.Pools
- Blockfrost.API.Cardano.Scripts
- Blockfrost.API.Cardano.Transactions
- Blockfrost.API.Cardano.Utils
- Blockfrost.API.Common
- Blockfrost.API.IPFS
- Blockfrost.API.NutLink
- Blockfrost.API.Cardano
- Blockfrost.Auth
- Blockfrost.Env
- Blockfrost.Lens
- Blockfrost.Types
- Blockfrost.Types.ApiError
- Blockfrost.Types.Cardano
- Blockfrost.Types.Cardano.Accounts
- Blockfrost.Types.Cardano.Addresses
- Blockfrost.Types.Cardano.Assets
- Blockfrost.Types.Cardano.Blocks
- Blockfrost.Types.Cardano.Epochs
- Blockfrost.Types.Cardano.Genesis
- Blockfrost.Types.Cardano.Governance
- Blockfrost.Types.Cardano.Mempool
- Blockfrost.Types.Cardano.Metadata
- Blockfrost.Types.Cardano.Network
- Blockfrost.Types.Cardano.Pools
- Blockfrost.Types.Cardano.Scripts
- Blockfrost.Types.Cardano.Transactions
- Blockfrost.Types.Cardano.Utils
- Blockfrost.Types.Common
- Blockfrost.Types.IPFS
- Blockfrost.Types.NutLink
- Blockfrost.Types.Shared
- Blockfrost.Types.Shared.Ada
- Blockfrost.Types.Shared.Address
- Blockfrost.Types.Shared.Amount
- Blockfrost.Types.Shared.AssetId
- Blockfrost.Types.Shared.BlockHash
- Blockfrost.Types.Shared.BlockIndex
- Blockfrost.Types.Shared.CBOR
- Blockfrost.Types.Shared.DRepId
- Blockfrost.Types.Shared.DatumHash
- Blockfrost.Types.Shared.Epoch
- Blockfrost.Types.Shared.Opts
- Blockfrost.Types.Shared.POSIXMillis
- Blockfrost.Types.Shared.PolicyId
- Blockfrost.Types.Shared.PoolId
- Blockfrost.Types.Shared.Quantity
- Blockfrost.Types.Shared.ScriptHash
- Blockfrost.Types.Shared.Slot
- Blockfrost.Types.Shared.TxHash
- Blockfrost.Types.Shared.ValidationPurpose
- Util
- Blockfrost.Util.LensRules
- Blockfrost.Util.Pagination
- Blockfrost.Util.Sorting
- Blockfrost.Util.Tag
- Blockfrost.Util.UserAgent
- Blockfrost.API
- Paths_blockfrost_api
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| production | Production build | Disabled |
Automatic Flags
| Name | Description | Default |
|---|---|---|
| buildfast | Turn off optimizations | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- blockfrost-api-0.14.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.3.0.0, 0.3.1.0, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.6.0.0, 0.7.0.0, 0.7.1.0, 0.8.0.0, 0.8.1.0, 0.9.0.0, 0.10.0.0, 0.11.0.0, 0.12.0.0, 0.12.1.0, 0.12.2.0, 0.13.0.0, 0.14.0.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | aeson (>=2.0 && <3.0), base (>=4.7 && <5), bytestring, containers, data-default-class, deriving-aeson, lens (>=5.0 && <5.4), safe-money (>=0.9 && <0.10), servant (>=0.18 && <0.21), servant-docs, servant-multipart-api, template-haskell, text, time, vector [details] |
| License | Apache-2.0 |
| Copyright | 2021 blockfrost.io |
| Author | blockfrost.io |
| Maintainer | srk@48.io |
| Uploaded | by srk at 2025-12-02T14:29:08Z |
| Category | Cardano |
| Home page | https://github.com/blockfrost/blockfrost-haskell |
| Source repo | head: git clone https://github.com/blockfrost/blockfrost-haskell |
| Distributions | NixOS:0.13.0.0 |
| Reverse Dependencies | 4 direct, 0 indirect [details] |
| Downloads | 3544 total (71 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-12-02 [all 1 reports] |
Readme for blockfrost-api-0.14.0.0
[back to package description]blockfrost-api
Core types and Servant API definitions.
Exploring data types
All data types have a ToSample instance
for servant-docs
which can be used to get a sample response in cabal repl:
λ: import Data.Proxy
λ: import Servant.Docs
λ: Just block = toSample (Proxy :: Proxy Block)
λ: _blockHash block
BlockHash "4ea1ba291e8eef538635a53e59fddba7810d1679631cc3aed7c8e6c4091a516a"
Lenses
Instead of using long record names, it is recommended to use provided lenses and a lens or similar package.
λ: import Control.Lens (^.)
λ: import Blockfrost.Lens
λ: block ^. epoch
Just (Epoch 425)
Monetary values
Ada values and values of assets are represented using Discrete type
from safe-money library.
We use a type alias type Lovelaces = Money.Discrete "ADA" "lovelace"
for Ada values and SomeDiscrete for asset values. This should allow working
with monetary values safely, preventing summing different currencies.
See the blog post by the library author.
λ: block ^. fees
Just (Discrete "ADA" 1000000%1 592661)