lndclient is a golang native wrapper for lnd's gRPC interface.
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
lndthat is pulled in when compilinglndclient. It is defined ingo.mod. This usually is the latest released version oflnd, because its RPC definitions are kept backward compatible. This means that a new field added in the latest version oflndmight already be available inlndclient's code, but whether or not that field will actually be set at run time is dependent on the actual version oflndthat's being connected to. - RPC level dependency: This is defined in
minimalCompatibleVersioninlnd_services.go. When connecting tolnd, the version returned by its version service is checked and if it doesn't meet the minimal required version defined inlnd_services.go, an error will be returned. Users oflndclientcan 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:
signrpcwalletrpcchainrpcinvoicesrpc
We follow the following strategy to maintain different versions of this library
that have different lnd compatibilities:
- The
masteris always backward compatible with the last major version. - 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.
- We rebase the branches if needed and use tags to track versions that we depend on in other projects.
- Once a new major version of
lndis final, all branches of minor versions lower than that are merged into master.