@hackage lnd-client0.1.0.1

Lightning Network Daemon (LND) client library for Haskell

lnd-client

Lightning Network Daemon (LND) client library for Haskell. Nix is the only thing required to get started. Development environment is packed into nix-shell.

Quickstart

Spawn shell:

./nix/shell.sh

Develop in shell:

vi .

Run all tests with hot code reloading:

ghcid

Run specific tests with hot code reloading:

ghcid --setup ":set args -m fromJSON"

Optional environment variables:

vi ~/.profile

export VIM_BACKGROUND="light" # or "dark"
export VIM_COLOR_SCHEME="PaperColor" # or "jellybeans"
export NIX_EXTRA_BUILD_INPUTS='[(import (fetchTarball "https://github.com/21it/ultimate-haskell-ide/tarball/ebfcd25eeac74ba813efa0b5929174cd59c4f4d2") {bundle = "haskell"; withGit = false;})]'
export NIX_WITH_SHELL_HOOK="true"

gRPC schema upgrade

  • We are using lnd version 0.14.1-beta
  • Run ./script/update-protobuf.sh (This will download latest proto files from github, so make sure that lnd version is consistent with latest protobufs)
  • Manually split lightning.proto into 3 smaller files, because at the single file is way too big and GHC-8.10.7 requires too much RAM to compile it. The issue might disappear with GHC-9.X.X.
  • Run ./script/generate-protoc.sh (This will generate haskell types and instances for downloaded protos)