https://github.com/blockfrost/blockfrost-haskell
Haskell SDK for Blockfrost.io
https://github.com/blockfrost/blockfrost-haskell
Last synced: 3 months ago
JSON representation
Haskell SDK for Blockfrost.io
- Host: GitHub
- URL: https://github.com/blockfrost/blockfrost-haskell
- Owner: blockfrost
- License: apache-2.0
- Created: 2021-08-23T12:09:07.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-25T12:58:44.000Z (10 months ago)
- Last Synced: 2025-03-22T14:11:15.305Z (4 months ago)
- Language: Haskell
- Size: 327 KB
- Stars: 28
- Watchers: 2
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/blockfrost/blockfrost-haskell/actions/workflows/ci.yaml)
[](https://hackage.haskell.org/package/blockfrost-api)
[](https://hackage.haskell.org/package/blockfrost-client)
[](https://hackage.haskell.org/package/blockfrost-pretty)
[](https://fivebinaries.com/)
# blockfrost-haskell
Haskell SDK for Blockfrost.io API.
About •
Getting started •
Installation •
Usage
## About
The repository provides an API definition, data types, client and utilities
for working with Blockfrost. We are striving to provide beginner-friendly
interface while adding a bit of type safety, especially when working with monetary
values.### Packages
* [`blockfrost-api`](./blockfrost-api/#readme)
Types, sample data, API definition and tests. See the [`README.md`](./blockfrost-api/#readme)
for quick tutorial
* [`blockfrost-client-core`](./blockfrost-client-core/#readme)
Instances and helpers shared by all clients.
* [`blockfrost-client`](./blockfrost-client/#readme)
Blockfrost client for use with `mtl`. Its [`README.md`](./blockfrost-api/#readme)
contains an introduction and usage examples.
* [`blockfrost-pretty`](./blockfrost-pretty/#readme)
Pretty printing utilities for pretty printing Ada values
and various Blockfrost types.## Getting started
To use this SDK, you first need to log in to [blockfrost.io](https://blockfrost.io), create your project and retrieve the API token.
## Installation
Packages are available on Hackage, you only need to add `blockfrost-client`
to your package dependencies.Haddocks available on Hackage:
* [](https://hackage.haskell.org/package/blockfrost-api)
* [](https://hackage.haskell.org/package/blockfrost-client)
* [](https://hackage.haskell.org/package/blockfrost-pretty)## Development setup
You can either work within this repository using plain `cabal` or in combination
with `nix`.### `cabal`
If you already have `GHC` and `cabal` installed:
```bash
git clone https://github.com/blockfrost/blockfrost-haskell
cd blockfrost-haskell
cabal update
cabal build all
cabal repl blockfrost-client
```Note: Due to TLS support, you might need to
provide `zlib` headers if compilation
of `http-client-tls` fails. (On NixOS this is `nix-shell -p zlib.dev`).### `nix`
Using `nix-shell`, you can obtain a preconfigured environment
with `GHC` and `cabal`:```bash
git clone https://github.com/blockfrost/blockfrost-haskell
cd blockfrost-haskell
nix-shell
cabal build all
cabal repl blockfrost-client
```## Usage
See [blockfrost-client](./blockfrost-client/#readme) for a tutorial
and usage examples.Readme of [blockfrost-api](./blockfrost-api/#readme)
contains a short primer for working with Blockfrost
types, data samples and monetary values.