Golang client library for lnd
  • Go 99.2%
  • Makefile 0.7%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-10-05 13:10:20 +02:00
.github build: bump Go to 1.24.6 2025-09-05 22:04:35 -03:00
testdata walletkit: add RPC GetTransaction 2025-06-24 17:37:29 -03:00
tools bump tools/golangci-lint to v2 2025-09-05 21:58:34 -03:00
.editorconfig add .editorconfig 2023-09-15 14:39:15 +02:00
.gitignore gitignore: .idea folder 2025-02-19 15:06:52 +01:00
.golangci.yml build: bump Go to 1.24.6 2025-09-05 22:04:35 -03:00
basic_client.go refactor: replaced deprecated ioutil calls with os equivalents 2024-01-15 18:48:07 +01:00
basic_client_test.go refactor: replaced deprecated ioutil calls with os equivalents 2024-01-15 18:48:07 +01:00
chainkit_client.go lint: enable lll 2025-08-25 17:13:46 +02:00
chainnotifier_client.go lint: add revive for exported docstrings 2025-08-25 17:43:26 +02:00
go.mod Revert "build: bump lnd to the latest master" 2025-09-09 15:41:05 -03:00
go.sum Revert "build: bump lnd to the latest master" 2025-09-09 15:41:05 -03:00
invoices_client.go lndclient: thread through all params for AddHoldInvoice 2025-02-19 15:08:38 +01:00
LICENSE Initial commit 2020-06-16 11:48:07 -07:00
lightning_client.go lndclient: expose forward history peer alias 2025-10-05 13:10:20 +02:00
lightning_client_test.go multi: update linter, fix issues 2025-03-13 11:03:15 -05:00
lnd_services.go lndclient: Add the watchtower client service 2025-09-03 09:19:31 +02:00
lnd_services_test.go bump tools/golangci-lint to v2 2025-09-05 21:58:34 -03:00
log.go go.mod: update btclog and LND dependencies 2025-05-21 14:15:46 +02:00
macaroon_pouch.go lint: add revive for exported docstrings 2025-08-25 17:43:26 +02:00
macaroon_recipes.go lndclient: Add the watchtower client service 2025-09-03 09:19:31 +02:00
macaroon_recipes_test.go multi: update linter, fix issues 2025-03-13 11:03:15 -05:00
macaroon_service.go bump tools/golangci-lint to v2 2025-09-05 21:58:34 -03:00
macaroon_service_test.go bump tools/golangci-lint to v2 2025-09-05 21:58:34 -03:00
Makefile linter: enable caching 2025-08-25 16:35:09 +02:00
network.go network+lnd_services: add testnet4 support 2025-05-21 14:15:46 +02:00
README.md mod+README: bump lnd version to 0.18.5, update net/x 2025-03-13 11:03:27 -05:00
router_client.go Revert "build: bump lnd to the latest master" 2025-09-09 15:41:05 -03:00
signer_client.go lint: enable lll 2025-08-25 17:13:46 +02:00
state_client.go multi: add RawClientWithMacAuth to every client 2025-02-19 15:08:37 +01:00
tx_utils.go lndclient: expose new option to recv the block w/ a conf ntfn 2023-09-15 14:39:13 +02:00
versioner_client.go multi: add RawClientWithMacAuth to every client 2025-02-19 15:08:37 +01:00
walletkit_client.go lint: add revive for exported docstrings 2025-08-25 17:43:26 +02:00
wtclient_client.go lndclient: Add watchtower client interface 2025-09-03 09:19:20 +02:00

Golang client library for lnd

lndclient is a golang native wrapper for lnd's gRPC interface.

Compatibility matrix

This library depends heavily on lnd for obvious reasons. To support backward compatibility with older versions of lnd, we use different branches for different versions. There are two "levels" of depending on a version of lnd:

  • Code level dependency: This is the version of lnd that is pulled in when compiling lndclient. It is defined in go.mod. This usually is the latest released version of lnd, because its RPC definitions are kept backward compatible. This means that a new field added in the latest version of lnd might already be available in lndclient's code, but whether or not that field will actually be set at run time is dependent on the actual version of lnd that's being connected to.
  • RPC level dependency: This is defined in minimalCompatibleVersion in lnd_services.go. When connecting to lnd, the version returned by its version service is checked and if it doesn't meet the minimal required version defined in lnd_services.go, an error will be returned. Users of lndclient can also overwrite this minimum required version when creating a new client.

The current compatibility matrix reads as follows:

lndclient git tag lnd version in go.mod minimum required lnd version
master / v0.18.5-13 v0.18.5-beta v0.18.5-beta

By default, lndclient requires (and enforces) the following RPC subservers to be active in lnd:

  • signrpc
  • walletrpc
  • chainrpc
  • invoicesrpc

Branch strategy

We follow the following strategy to maintain different versions of this library that have different lnd compatibilities:

  1. The master is always backward compatible with the last major version.
  2. We create branches for all minor versions and future major versions and merge PRs to those branches, if the features require that version to work.
  3. We rebase the branches if needed and use tags to track versions that we depend on in other projects.
  4. Once a new major version of lnd is final, all branches of minor versions lower than that are merged into master.