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
lnd
that 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 oflnd
might 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 oflnd
that's being connected to. - RPC level dependency: This is defined in
minimalCompatibleVersion
inlnd_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 oflndclient
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.15.0-15 |
v0.15.0-beta |
v0.15.0-beta |
v0.14.3-0 |
v0.14.3-beta |
v0.14.3-beta |
v0.13.0-11 |
lnd @ d9f0f07142ea |
v0.13.0-beta |
By default, lndclient
requires (and enforces) the following RPC subservers to
be active in lnd
:
signrpc
walletrpc
chainrpc
invoicesrpc
We follow the following strategy to maintain different versions of this library
that have different lnd
compatibilities:
- The
master
is 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
lnd
is final, all branches of minor versions lower than that are merged into master.